Commit fbcdcac2 by Ian Romanick

INTEL_shader_integer_functions2: Add compiler front-end support

The changes to glslang/glslang/MachineIndependent/ParseHelper.cpp exist purely to prevent even more instances of "warning: enumeration value ‘EOp...’ not handled in switch" v2: Remove 8-bit types. Overzealous copy-and-paste led to adding support for a bunch of types that the extension doesn't actually enable. v3: Update expected test results file. Just changing an expected results file to make a test pass seems sketchy to me, but I'm not sure what else to do. v4: Add missing entry for EOpAbsDifference in TOutputTraverser::visitBinary. Noticed by JohnK.
parent e0da415d
......@@ -11,7 +11,7 @@ spv.specConstant.vert
Source GLSL 400
Name 4 "main"
Name 9 "arraySize"
Name 14 "foo(vf4[s4393];"
Name 14 "foo(vf4[s4529];"
Name 13 "p"
Name 17 "builtin_spec_constant("
Name 20 "color"
......@@ -102,10 +102,10 @@ spv.specConstant.vert
Store 20(color) 46
48: 10 Load 22(ucol)
Store 47(param) 48
49: 2 FunctionCall 14(foo(vf4[s4393];) 47(param)
49: 2 FunctionCall 14(foo(vf4[s4529];) 47(param)
Return
FunctionEnd
14(foo(vf4[s4393];): 2 Function None 12
14(foo(vf4[s4529];): 2 Function None 12
13(p): 11(ptr) FunctionParameter
15: Label
54: 24(ptr) AccessChain 53(dupUcol) 23
......
......@@ -899,6 +899,15 @@ enum TOperator {
EOpFindLSB,
EOpFindMSB,
EOpCountLeadingZeros,
EOpCountTrailingZeros,
EOpAbsDifference,
EOpAddSaturate,
EOpSubSaturate,
EOpAverage,
EOpAverageRounded,
EOpMul32x16,
EOpTraceNV,
EOpReportIntersectionNV,
EOpIgnoreIntersectionNV,
......
......@@ -213,6 +213,13 @@ bool TOutputTraverser::visitBinary(TVisit /* visit */, TIntermBinary* node)
case EOpLogicalXor: out.debug << "logical-xor"; break;
case EOpLogicalAnd: out.debug << "logical-and"; break;
case EOpAbsDifference: out.debug << "absoluteDifference"; break;
case EOpAddSaturate: out.debug << "addSaturate"; break;
case EOpSubSaturate: out.debug << "subtractSaturate"; break;
case EOpAverage: out.debug << "average"; break;
case EOpAverageRounded: out.debug << "averageRounded"; break;
case EOpMul32x16: out.debug << "multiply32x16"; break;
default: out.debug << "<unknown op>";
}
......@@ -557,6 +564,9 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node)
case EOpFindLSB: out.debug << "findLSB"; break;
case EOpFindMSB: out.debug << "findMSB"; break;
case EOpCountLeadingZeros: out.debug << "countLeadingZeros"; break;
case EOpCountTrailingZeros: out.debug << "countTrailingZeros"; break;
case EOpNoise: out.debug << "noise"; break;
case EOpBallot: out.debug << "ballot"; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment