зеркало из https://github.com/AvaloniaUI/angle.git
Remove EvqBaseVertex and EvqBaseInstance qualifiers
They are only used to mark angle_BaseVertex and angle_BaseInstance uniforms, but they make it complicated for the rest of the code to identify them as uniforms. Bug: angleproject:4889 Change-Id: I0c632bb595dc9a7fcda19db11ecb27539b1c33e6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2818144 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
This commit is contained in:
Родитель
0615bbde39
Коммит
1f8e35b55d
|
@ -8,15 +8,15 @@
|
|||
"src/compiler/translator/ParseContext_complete_autogen.h":
|
||||
"5d70fc2310654e6bcb04fe27f883b6cd",
|
||||
"src/compiler/translator/SymbolTable_ESSL_autogen.cpp":
|
||||
"a9526c6a57d0d7afa73ea1f19d49d5be",
|
||||
"de2d78d69330202b3431824a7b82cca5",
|
||||
"src/compiler/translator/SymbolTable_autogen.cpp":
|
||||
"bb5e4fe2438b7138ba79b31fa4bef4d4",
|
||||
"82e2029363cc5b0b1718801c96961d7a",
|
||||
"src/compiler/translator/SymbolTable_autogen.h":
|
||||
"d43593050c4d1b31b0be9cdd3a2d0ea5",
|
||||
"src/compiler/translator/builtin_function_declarations.txt":
|
||||
"337bdd37f549ee3ba84a8ac45e250c0d",
|
||||
"src/compiler/translator/builtin_variables.json":
|
||||
"032da55c155d149d1930b4995d76e951",
|
||||
"a3fa61d753ee97de18b0b53c488bf766",
|
||||
"src/compiler/translator/gen_builtin_symbols.py":
|
||||
"eb24e6333408abf3a0e7b42818dce507",
|
||||
"src/compiler/translator/tree_util/BuiltIn_ESSL_autogen.h":
|
||||
|
|
|
@ -954,9 +954,6 @@ enum TQualifier
|
|||
|
||||
EvqDrawID, // ANGLE_multi_draw
|
||||
|
||||
EvqBaseVertex, // ANGLE_base_vertex_base_instance
|
||||
EvqBaseInstance, // ANGLE_base_vertex_base_instance
|
||||
|
||||
// built-ins read by fragment shader
|
||||
EvqFragCoord,
|
||||
EvqFrontFacing,
|
||||
|
@ -1392,8 +1389,6 @@ inline const char *getQualifierString(TQualifier q)
|
|||
case EvqPosition: return "Position";
|
||||
case EvqPointSize: return "PointSize";
|
||||
case EvqDrawID: return "DrawID";
|
||||
case EvqBaseVertex: return "BaseVertex";
|
||||
case EvqBaseInstance: return "BaseInstance";
|
||||
case EvqFragCoord: return "FragCoord";
|
||||
case EvqFrontFacing: return "FrontFacing";
|
||||
case EvqHelperInvocation: return "HelperInvocation";
|
||||
|
|
|
@ -34,7 +34,6 @@ class TBuiltinsWorkaroundGLSL : public TIntermTraverser
|
|||
ShCompileOptions mCompileOptions;
|
||||
|
||||
bool isBaseInstanceDeclared = false;
|
||||
bool isBaseVertexDeclared = false;
|
||||
};
|
||||
|
||||
TBuiltinsWorkaroundGLSL::TBuiltinsWorkaroundGLSL(TSymbolTable *symbolTable,
|
||||
|
@ -81,7 +80,7 @@ bool TBuiltinsWorkaroundGLSL::visitDeclaration(Visit, TIntermDeclaration *node)
|
|||
for (TIntermNode *variableNode : sequence)
|
||||
{
|
||||
TIntermSymbol *variable = variableNode->getAsSymbolNode();
|
||||
if (variable && variable->variable().symbolType() == SymbolType::AngleInternal)
|
||||
if (variable && variable->variable().symbolType() == SymbolType::BuiltIn)
|
||||
{
|
||||
if (variable->getName() == "angle_BaseInstance")
|
||||
{
|
||||
|
|
|
@ -196,8 +196,6 @@ class CollectVariablesTraverser : public TIntermTraverser
|
|||
bool mVertexIDAdded;
|
||||
bool mPointSizeAdded;
|
||||
bool mDrawIDAdded;
|
||||
bool mBaseVertexAdded;
|
||||
bool mBaseInstanceAdded;
|
||||
|
||||
// Vertex Shader and Geometry Shader builtins
|
||||
bool mPositionAdded;
|
||||
|
@ -285,8 +283,6 @@ CollectVariablesTraverser::CollectVariablesTraverser(
|
|||
mVertexIDAdded(false),
|
||||
mPointSizeAdded(false),
|
||||
mDrawIDAdded(false),
|
||||
mBaseVertexAdded(false),
|
||||
mBaseInstanceAdded(false),
|
||||
mPositionAdded(false),
|
||||
mClipDistanceAdded(false),
|
||||
mCullDistanceAdded(false),
|
||||
|
@ -615,12 +611,6 @@ void CollectVariablesTraverser::visitSymbol(TIntermSymbol *symbol)
|
|||
case EvqDrawID:
|
||||
recordBuiltInAttributeUsed(symbol->variable(), &mDrawIDAdded);
|
||||
return;
|
||||
case EvqBaseVertex:
|
||||
recordBuiltInAttributeUsed(symbol->variable(), &mBaseVertexAdded);
|
||||
return;
|
||||
case EvqBaseInstance:
|
||||
recordBuiltInAttributeUsed(symbol->variable(), &mBaseInstanceAdded);
|
||||
return;
|
||||
case EvqLastFragData:
|
||||
recordBuiltInVaryingUsed(symbol->variable(), &mLastFragDataAdded, mInputVaryings);
|
||||
return;
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -850,7 +850,7 @@ TString Decorate(const ImmutableString &string)
|
|||
TString DecorateVariableIfNeeded(const TVariable &variable)
|
||||
{
|
||||
if (variable.symbolType() == SymbolType::AngleInternal ||
|
||||
variable.symbolType() == SymbolType::Empty)
|
||||
variable.symbolType() == SymbolType::BuiltIn || variable.symbolType() == SymbolType::Empty)
|
||||
{
|
||||
// Besides handling internal variables, we generate names for nameless parameters here.
|
||||
const ImmutableString &name = variable.name();
|
||||
|
|
|
@ -1068,7 +1068,7 @@
|
|||
"type":{
|
||||
"basic":"Int",
|
||||
"precision":"High",
|
||||
"qualifier":"BaseVertex"
|
||||
"qualifier":"Uniform"
|
||||
}
|
||||
},
|
||||
"gl_BaseInstance":{
|
||||
|
@ -1077,7 +1077,7 @@
|
|||
"type":{
|
||||
"basic":"Int",
|
||||
"precision":"High",
|
||||
"qualifier":"BaseInstance"
|
||||
"qualifier":"Uniform"
|
||||
}
|
||||
},
|
||||
"angle_BaseVertex":{
|
||||
|
@ -1086,7 +1086,7 @@
|
|||
"type":{
|
||||
"basic":"Int",
|
||||
"precision":"High",
|
||||
"qualifier":"BaseVertex"
|
||||
"qualifier":"Uniform"
|
||||
}
|
||||
},
|
||||
"angle_BaseInstance":{
|
||||
|
@ -1095,7 +1095,7 @@
|
|||
"type":{
|
||||
"basic":"Int",
|
||||
"precision":"High",
|
||||
"qualifier":"BaseInstance"
|
||||
"qualifier":"Uniform"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -190,9 +190,8 @@ bool EmulateGLBaseVertexBaseInstance(TCompiler *compiler,
|
|||
|
||||
if (builtInVariableBaseVertex)
|
||||
{
|
||||
const TType *type = StaticType::Get<EbtInt, EbpHigh, EvqUniform, 1, 1>();
|
||||
const TVariable *baseVertex =
|
||||
new TVariable(symbolTable, kEmulatedGLBaseVertexName, type, SymbolType::AngleInternal);
|
||||
const TVariable *baseVertex = BuiltInVariable::angle_BaseVertex();
|
||||
const TType &type = baseVertex->getType();
|
||||
const TIntermSymbol *baseVertexSymbol = new TIntermSymbol(baseVertex);
|
||||
|
||||
// AngleInternal variables don't get collected
|
||||
|
@ -200,15 +199,15 @@ bool EmulateGLBaseVertexBaseInstance(TCompiler *compiler,
|
|||
{
|
||||
uniformBaseVertex.name = kEmulatedGLBaseVertexName.data();
|
||||
uniformBaseVertex.mappedName = kEmulatedGLBaseVertexName.data();
|
||||
uniformBaseVertex.type = GLVariableType(*type);
|
||||
uniformBaseVertex.precision = GLVariablePrecision(*type);
|
||||
uniformBaseVertex.type = GLVariableType(type);
|
||||
uniformBaseVertex.precision = GLVariablePrecision(type);
|
||||
uniformBaseVertex.staticUse = symbolTable->isStaticallyUsed(*builtInVariableBaseVertex);
|
||||
uniformBaseVertex.active = true;
|
||||
uniformBaseVertex.binding = type->getLayoutQualifier().binding;
|
||||
uniformBaseVertex.location = type->getLayoutQualifier().location;
|
||||
uniformBaseVertex.offset = type->getLayoutQualifier().offset;
|
||||
uniformBaseVertex.readonly = type->getMemoryQualifier().readonly;
|
||||
uniformBaseVertex.writeonly = type->getMemoryQualifier().writeonly;
|
||||
uniformBaseVertex.binding = type.getLayoutQualifier().binding;
|
||||
uniformBaseVertex.location = type.getLayoutQualifier().location;
|
||||
uniformBaseVertex.offset = type.getLayoutQualifier().offset;
|
||||
uniformBaseVertex.readonly = type.getMemoryQualifier().readonly;
|
||||
uniformBaseVertex.writeonly = type.getMemoryQualifier().writeonly;
|
||||
addBaseVertex = true;
|
||||
}
|
||||
|
||||
|
@ -226,9 +225,8 @@ bool EmulateGLBaseVertexBaseInstance(TCompiler *compiler,
|
|||
|
||||
if (builtInVariableBaseInstance)
|
||||
{
|
||||
const TType *type = StaticType::Get<EbtInt, EbpHigh, EvqUniform, 1, 1>();
|
||||
const TVariable *baseInstance = new TVariable(symbolTable, kEmulatedGLBaseInstanceName,
|
||||
type, SymbolType::AngleInternal);
|
||||
const TVariable *baseInstance = BuiltInVariable::angle_BaseInstance();
|
||||
const TType &type = baseInstance->getType();
|
||||
const TIntermSymbol *baseInstanceSymbol = new TIntermSymbol(baseInstance);
|
||||
|
||||
// AngleInternal variables don't get collected
|
||||
|
@ -236,16 +234,16 @@ bool EmulateGLBaseVertexBaseInstance(TCompiler *compiler,
|
|||
{
|
||||
uniformBaseInstance.name = kEmulatedGLBaseInstanceName.data();
|
||||
uniformBaseInstance.mappedName = kEmulatedGLBaseInstanceName.data();
|
||||
uniformBaseInstance.type = GLVariableType(*type);
|
||||
uniformBaseInstance.precision = GLVariablePrecision(*type);
|
||||
uniformBaseInstance.type = GLVariableType(type);
|
||||
uniformBaseInstance.precision = GLVariablePrecision(type);
|
||||
uniformBaseInstance.staticUse =
|
||||
symbolTable->isStaticallyUsed(*builtInVariableBaseInstance);
|
||||
uniformBaseInstance.active = true;
|
||||
uniformBaseInstance.binding = type->getLayoutQualifier().binding;
|
||||
uniformBaseInstance.location = type->getLayoutQualifier().location;
|
||||
uniformBaseInstance.offset = type->getLayoutQualifier().offset;
|
||||
uniformBaseInstance.readonly = type->getMemoryQualifier().readonly;
|
||||
uniformBaseInstance.writeonly = type->getMemoryQualifier().writeonly;
|
||||
uniformBaseInstance.binding = type.getLayoutQualifier().binding;
|
||||
uniformBaseInstance.location = type.getLayoutQualifier().location;
|
||||
uniformBaseInstance.offset = type.getLayoutQualifier().offset;
|
||||
uniformBaseInstance.readonly = type.getMemoryQualifier().readonly;
|
||||
uniformBaseInstance.writeonly = type.getMemoryQualifier().writeonly;
|
||||
addBaseInstance = true;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче