Hash :
9ff58ddd
Author :
Date :
2020-08-26T01:08:00
Metal: Support array of matrices varying. MSL doesn't support array of matrices as varying variable. This CL converts array of matrices varying to array of vectors. This fixes WebGL test: conformance/glsl/misc/shader-varying-packing-restrictions.html Bug: angleproject:4846 Bug: angleproject:2634 Change-Id: I3cfc638dc01092ddf1add7df02c131d1a5c8ba1d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2392172 Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
//
// Copyright 2020 The ANGLE Project Authors. All rights reserved. Use of this
// source code is governed by a BSD-style license that can be found in the
// LICENSE file.
//
// ReplaceArrayOfMatrixVarying: Find any references to array of matrices varying
// and replace it with array of vectors.
//
#ifndef COMPILER_TRANSLATOR_TREEUTIL_REPLACEARRAYOFMATRIXVARYING_H_
#define COMPILER_TRANSLATOR_TREEUTIL_REPLACEARRAYOFMATRIXVARYING_H_
#include "common/angleutils.h"
namespace sh
{
class TCompiler;
class TIntermBlock;
class TSymbolTable;
class TVariable;
ANGLE_NO_DISCARD bool ReplaceArrayOfMatrixVarying(TCompiler *compiler,
TIntermBlock *root,
TSymbolTable *symbolTable,
const TVariable *varying);
ANGLE_NO_DISCARD bool ReplaceArrayOfMatrixVaryings(TCompiler *compiler,
TIntermBlock *root,
TSymbolTable *symbolTable);
} // namespace sh
#endif