From f6eae2a54ae148ce35ba2c7eb9b4dd587e399170 Mon Sep 17 00:00:00 2001 From: John Kessenich Date: Fri, 22 Jan 2016 17:47:22 -0700 Subject: [PATCH] SPV: Require desktop 140 or ES 310 or above. --- Test/baseResults/spv.100ops.frag.out | 12 +-- Test/baseResults/spv.130.frag.out | 84 +++++++++---------- Test/baseResults/spv.300BuiltIns.vert.out | 82 ++++++++++-------- Test/baseResults/spv.300layout.frag.out | 4 +- Test/baseResults/spv.300layout.vert.out | 4 +- Test/baseResults/spv.300layoutp.vert.out | 4 +- Test/baseResults/spv.always-discard.frag.out | 2 +- Test/baseResults/spv.always-discard2.frag.out | 2 +- Test/baseResults/spv.branch-return.vert.out | 55 +++++++----- Test/baseResults/spv.conversion.frag.out | 2 +- Test/baseResults/spv.dataOut.frag.out | 4 +- Test/baseResults/spv.dataOutIndirect.frag.out | 4 +- Test/baseResults/spv.dataOutIndirect.vert.out | 10 ++- Test/baseResults/spv.discard-dce.frag.out | 2 +- Test/baseResults/spv.do-simple.vert.out | 4 +- .../spv.do-while-continue-break.vert.out | 4 +- Test/baseResults/spv.doWhileLoop.frag.out | 2 +- .../spv.earlyReturnDiscard.frag.out | 2 +- Test/baseResults/spv.flowControl.frag.out | 2 +- .../spv.for-continue-break.vert.out | 4 +- Test/baseResults/spv.for-simple.vert.out | 4 +- Test/baseResults/spv.forLoop.frag.out | 2 +- Test/baseResults/spv.forwardFun.frag.out | 8 +- Test/baseResults/spv.functionCall.frag.out | 4 +- Test/baseResults/spv.length.frag.out | 2 +- Test/baseResults/spv.localAggregates.frag.out | 5 +- Test/baseResults/spv.loops.frag.out | 4 +- Test/baseResults/spv.loopsArtificial.frag.out | 4 +- Test/baseResults/spv.matFun.vert.out | 9 +- Test/baseResults/spv.matrix.frag.out | 2 +- Test/baseResults/spv.nonSquare.vert.out | 17 +++- Test/baseResults/spv.precision.frag.out | 4 +- .../spv.simpleFunctionCall.frag.out | 2 - .../baseResults/spv.structAssignment.frag.out | 4 +- Test/baseResults/spv.structDeref.frag.out | 4 +- Test/baseResults/spv.structure.frag.out | 4 +- Test/baseResults/spv.swizzle.frag.out | 2 +- Test/baseResults/spv.test.vert.out | 9 +- Test/baseResults/spv.texture.frag.out | 5 +- Test/baseResults/spv.texture.vert.out | 9 +- Test/baseResults/spv.types.frag.out | 2 +- Test/baseResults/spv.uint.frag.out | 4 +- Test/baseResults/spv.uniformArray.frag.out | 2 +- .../spv.variableArrayIndex.frag.out | 4 +- Test/baseResults/spv.varyingArray.frag.out | 19 ++--- .../spv.varyingArrayIndirect.frag.out | 19 ++--- Test/baseResults/spv.voidFunction.frag.out | 2 +- .../spv.while-continue-break.vert.out | 4 +- Test/baseResults/spv.while-simple.vert.out | 4 +- Test/baseResults/spv.whileLoop.frag.out | 2 +- Test/spv.100ops.frag | 6 +- Test/spv.130.frag | 5 +- Test/spv.300BuiltIns.vert | 2 +- Test/spv.300layout.frag | 2 +- Test/spv.300layout.vert | 2 +- Test/spv.300layoutp.vert | 2 +- Test/spv.always-discard.frag | 4 +- Test/spv.always-discard2.frag | 4 +- Test/spv.branch-return.vert | 2 +- Test/spv.conversion.frag | 2 +- Test/spv.dataOut.frag | 4 +- Test/spv.dataOutIndirect.frag | 4 +- Test/spv.dataOutIndirect.vert | 4 +- Test/spv.discard-dce.frag | 4 +- Test/spv.do-simple.vert | 2 +- Test/spv.do-while-continue-break.vert | 2 +- Test/spv.doWhileLoop.frag | 4 +- Test/spv.earlyReturnDiscard.frag | 6 +- Test/spv.flowControl.frag | 6 +- Test/spv.for-continue-break.vert | 2 +- Test/spv.for-simple.vert | 2 +- Test/spv.forLoop.frag | 2 +- Test/spv.forwardFun.frag | 4 +- Test/spv.functionCall.frag | 4 +- Test/spv.length.frag | 4 +- Test/spv.localAggregates.frag | 6 +- Test/spv.loops.frag | 4 +- Test/spv.loopsArtificial.frag | 4 +- Test/spv.matFun.vert | 2 +- Test/spv.matrix.frag | 2 +- Test/spv.nonSquare.vert | 2 +- Test/spv.precision.frag | 2 +- Test/spv.simpleFunctionCall.frag | 2 +- Test/spv.structAssignment.frag | 4 +- Test/spv.structDeref.frag | 4 +- Test/spv.structure.frag | 4 +- Test/spv.swizzle.frag | 4 +- Test/spv.test.vert | 2 +- Test/spv.texture.frag | 6 +- Test/spv.texture.vert | 2 +- Test/spv.types.frag | 2 +- Test/spv.uint.frag | 2 +- Test/spv.uniformArray.frag | 2 +- Test/spv.variableArrayIndex.frag | 4 +- Test/spv.varyingArray.frag | 14 ++-- Test/spv.varyingArrayIndirect.frag | 14 ++-- Test/spv.voidFunction.frag | 4 +- Test/spv.while-continue-break.vert | 2 +- Test/spv.while-simple.vert | 2 +- Test/spv.whileLoop.frag | 4 +- glslang/MachineIndependent/ParseHelper.cpp | 2 +- glslang/MachineIndependent/ShaderLang.cpp | 28 +++++-- 102 files changed, 357 insertions(+), 313 deletions(-) diff --git a/Test/baseResults/spv.100ops.frag.out b/Test/baseResults/spv.100ops.frag.out index 11391f6a..82342324 100755 --- a/Test/baseResults/spv.100ops.frag.out +++ b/Test/baseResults/spv.100ops.frag.out @@ -1,4 +1,6 @@ spv.100ops.frag +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked fragment stage: @@ -12,7 +14,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 36 ExecutionMode 4 OriginLowerLeft - Source ESSL 100 + Source ESSL 310 Name 4 "main" Name 8 "foo(" Name 11 "face1" @@ -20,13 +22,13 @@ Linked fragment stage: Name 17 "z" Name 21 "low" Name 26 "high" - Name 36 "gl_FragColor" + Name 36 "Color" Decorate 11(face1) RelaxedPrecision Decorate 13(face2) RelaxedPrecision Decorate 17(z) RelaxedPrecision Decorate 21(low) RelaxedPrecision Decorate 26(high) RelaxedPrecision - Decorate 36(gl_FragColor) RelaxedPrecision + Decorate 36(Color) RelaxedPrecision 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -47,7 +49,7 @@ Linked fragment stage: 28: TypeBool 34: TypeVector 6(float) 4 35: TypePointer Output 34(fvec4) -36(gl_FragColor): 35(ptr) Variable Output + 36(Color): 35(ptr) Variable Output 4(main): 2 Function None 3 5: Label 17(z): 16(ptr) Variable Function @@ -75,7 +77,7 @@ Linked fragment stage: 42: 6(float) FunctionCall 8(foo() 43: 34(fvec4) CompositeConstruct 42 42 42 42 44: 34(fvec4) FAdd 41 43 - Store 36(gl_FragColor) 44 + Store 36(Color) 44 Return FunctionEnd 8(foo(): 6(float) Function None 7 diff --git a/Test/baseResults/spv.130.frag.out b/Test/baseResults/spv.130.frag.out index f4fb19b7..7091d5a9 100644 --- a/Test/baseResults/spv.130.frag.out +++ b/Test/baseResults/spv.130.frag.out @@ -1,5 +1,5 @@ spv.130.frag -WARNING: 0:34: '#extension' : extension is only partially supported: GL_ARB_gpu_shader5 +WARNING: 0:31: '#extension' : extension is only partially supported: GL_ARB_gpu_shader5 Linked fragment stage: @@ -7,14 +7,14 @@ Linked fragment stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 214 +// Id's are bound by 213 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Fragment 4 "main" 17 68 79 99 173 184 185 186 187 + EntryPoint Fragment 4 "main" 17 68 79 99 173 184 185 186 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 SourceExtension "GL_ARB_gpu_shader5" SourceExtension "GL_ARB_shader_texture_lod" SourceExtension "GL_ARB_shading_language_420pack" @@ -50,21 +50,20 @@ Linked fragment stage: Name 184 "fflat" Name 185 "fsmooth" Name 186 "fnop" - Name 187 "gl_Color" - Name 194 "bounds" - Name 195 "s2D" - Name 196 "s2DR" - Name 200 "s2DRS" - Name 204 "s1D" - Name 205 "s2DS" - Name 207 "f" - Name 209 "v2" - Name 211 "v3" - Name 213 "v4" + Name 193 "bounds" + Name 194 "s2D" + Name 195 "s2DR" + Name 199 "s2DRS" + Name 203 "s1D" + Name 204 "s2DS" + Name 206 "f" + Name 208 "v2" + Name 210 "v3" + Name 212 "v4" Decorate 173(gl_ClipDistance) BuiltIn ClipDistance Decorate 184(fflat) Flat Decorate 186(fnop) NoPerspective - Decorate 194(bounds) Binding 0 + Decorate 193(bounds) Binding 0 2: TypeVoid 3: TypeFunction 2 14: TypeFloat 32 @@ -155,33 +154,32 @@ Linked fragment stage: 184(fflat): 128(ptr) Variable Input 185(fsmooth): 128(ptr) Variable Input 186(fnop): 128(ptr) Variable Input - 187(gl_Color): 78(ptr) Variable Input - 188: 96(int) Constant 3 - 189: TypeArray 26(int) 188 - 190: 26(int) Constant 10 - 191: 26(int) Constant 23 - 192: 26(int) Constant 32 - 193: 189 ConstantComposite 190 191 192 - 194(bounds): 20(ptr) Variable UniformConstant - 195(s2D): 20(ptr) Variable UniformConstant - 196(s2DR): 46(ptr) Variable UniformConstant - 197: TypeImage 14(float) Rect depth sampled format:Unknown - 198: TypeSampledImage 197 - 199: TypePointer UniformConstant 198 - 200(s2DRS): 199(ptr) Variable UniformConstant - 201: TypeImage 14(float) 1D sampled format:Unknown - 202: TypeSampledImage 201 - 203: TypePointer UniformConstant 202 - 204(s1D): 203(ptr) Variable UniformConstant - 205(s2DS): 54(ptr) Variable UniformConstant - 206: TypePointer UniformConstant 14(float) - 207(f): 206(ptr) Variable UniformConstant - 208: TypePointer UniformConstant 23(fvec2) - 209(v2): 208(ptr) Variable UniformConstant - 210: TypePointer UniformConstant 39(fvec3) - 211(v3): 210(ptr) Variable UniformConstant - 212: TypePointer UniformConstant 15(fvec4) - 213(v4): 212(ptr) Variable UniformConstant + 187: 96(int) Constant 3 + 188: TypeArray 26(int) 187 + 189: 26(int) Constant 10 + 190: 26(int) Constant 23 + 191: 26(int) Constant 32 + 192: 188 ConstantComposite 189 190 191 + 193(bounds): 20(ptr) Variable UniformConstant + 194(s2D): 20(ptr) Variable UniformConstant + 195(s2DR): 46(ptr) Variable UniformConstant + 196: TypeImage 14(float) Rect depth sampled format:Unknown + 197: TypeSampledImage 196 + 198: TypePointer UniformConstant 197 + 199(s2DRS): 198(ptr) Variable UniformConstant + 200: TypeImage 14(float) 1D sampled format:Unknown + 201: TypeSampledImage 200 + 202: TypePointer UniformConstant 201 + 203(s1D): 202(ptr) Variable UniformConstant + 204(s2DS): 54(ptr) Variable UniformConstant + 205: TypePointer UniformConstant 14(float) + 206(f): 205(ptr) Variable UniformConstant + 207: TypePointer UniformConstant 23(fvec2) + 208(v2): 207(ptr) Variable UniformConstant + 209: TypePointer UniformConstant 39(fvec3) + 210(v3): 209(ptr) Variable UniformConstant + 211: TypePointer UniformConstant 15(fvec4) + 212(v4): 211(ptr) Variable UniformConstant 4(main): 2 Function None 3 5: Label 168: 165 Load 167(sampC) diff --git a/Test/baseResults/spv.300BuiltIns.vert.out b/Test/baseResults/spv.300BuiltIns.vert.out index de5b61c4..dbe9fa1d 100755 --- a/Test/baseResults/spv.300BuiltIns.vert.out +++ b/Test/baseResults/spv.300BuiltIns.vert.out @@ -1,33 +1,38 @@ spv.300BuiltIns.vert +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 40 +// Id's are bound by 49 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 11 23 25 33 39 - Source ESSL 300 + EntryPoint Vertex 4 "main" 11 24 27 48 + Source ESSL 310 Name 4 "main" Name 8 "i" Name 11 "gl_VertexID" Name 16 "j" - Name 23 "gl_Position" - Name 25 "ps" - Name 33 "gl_PointSize" - Name 39 "gl_InstanceID" + Name 22 "gl_PerVertex" + MemberName 22(gl_PerVertex) 0 "gl_Position" + MemberName 22(gl_PerVertex) 1 "gl_PointSize" + Name 24 "" + Name 27 "ps" + Name 48 "gl_InstanceID" Decorate 8(i) RelaxedPrecision Decorate 11(gl_VertexID) BuiltIn VertexId Decorate 16(j) RelaxedPrecision - Decorate 23(gl_Position) Invariant - Decorate 23(gl_Position) BuiltIn Position - Decorate 25(ps) RelaxedPrecision - Decorate 33(gl_PointSize) BuiltIn PointSize - Decorate 39(gl_InstanceID) BuiltIn InstanceId + MemberDecorate 22(gl_PerVertex) 0 Invariant + MemberDecorate 22(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 22(gl_PerVertex) 1 BuiltIn PointSize + Decorate 22(gl_PerVertex) Block + Decorate 27(ps) RelaxedPrecision + Decorate 48(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -38,13 +43,16 @@ Linked vertex stage: 14: 6(int) Constant 10 20: TypeFloat 32 21: TypeVector 20(float) 4 - 22: TypePointer Output 21(fvec4) - 23(gl_Position): 22(ptr) Variable Output - 24: TypePointer Input 20(float) - 25(ps): 24(ptr) Variable Input - 32: TypePointer Output 20(float) -33(gl_PointSize): 32(ptr) Variable Output -39(gl_InstanceID): 10(ptr) Variable Input +22(gl_PerVertex): TypeStruct 21(fvec4) 20(float) + 23: TypePointer Output 22(gl_PerVertex) + 24: 23(ptr) Variable Output + 25: 6(int) Constant 0 + 26: TypePointer Input 20(float) + 27(ps): 26(ptr) Variable Input + 30: TypePointer Output 21(fvec4) + 38: 6(int) Constant 1 + 40: TypePointer Output 20(float) +48(gl_InstanceID): 10(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function @@ -57,20 +65,26 @@ Linked vertex stage: 18: 6(int) IMul 9 17 19: 6(int) ISub 18 14 Store 16(j) 19 - 26: 20(float) Load 25(ps) - 27: 21(fvec4) CompositeConstruct 26 26 26 26 - Store 23(gl_Position) 27 - 28: 6(int) Load 8(i) - 29: 20(float) ConvertSToF 28 - 30: 21(fvec4) Load 23(gl_Position) - 31: 21(fvec4) VectorTimesScalar 30 29 - Store 23(gl_Position) 31 - 34: 20(float) Load 25(ps) - Store 33(gl_PointSize) 34 - 35: 6(int) Load 16(j) - 36: 20(float) ConvertSToF 35 - 37: 20(float) Load 33(gl_PointSize) - 38: 20(float) FMul 37 36 - Store 33(gl_PointSize) 38 + 28: 20(float) Load 27(ps) + 29: 21(fvec4) CompositeConstruct 28 28 28 28 + 31: 30(ptr) AccessChain 24 25 + Store 31 29 + 32: 6(int) Load 8(i) + 33: 20(float) ConvertSToF 32 + 34: 30(ptr) AccessChain 24 25 + 35: 21(fvec4) Load 34 + 36: 21(fvec4) VectorTimesScalar 35 33 + 37: 30(ptr) AccessChain 24 25 + Store 37 36 + 39: 20(float) Load 27(ps) + 41: 40(ptr) AccessChain 24 38 + Store 41 39 + 42: 6(int) Load 16(j) + 43: 20(float) ConvertSToF 42 + 44: 40(ptr) AccessChain 24 38 + 45: 20(float) Load 44 + 46: 20(float) FMul 45 43 + 47: 40(ptr) AccessChain 24 38 + Store 47 46 Return FunctionEnd diff --git a/Test/baseResults/spv.300layout.frag.out b/Test/baseResults/spv.300layout.frag.out index e08f1e92..2876822e 100755 --- a/Test/baseResults/spv.300layout.frag.out +++ b/Test/baseResults/spv.300layout.frag.out @@ -1,4 +1,6 @@ spv.300layout.frag +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked fragment stage: @@ -12,7 +14,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 9 11 15 26 29 ExecutionMode 4 OriginLowerLeft - Source ESSL 300 + Source ESSL 310 Name 4 "main" Name 9 "c" Name 11 "color" diff --git a/Test/baseResults/spv.300layout.vert.out b/Test/baseResults/spv.300layout.vert.out index 02e15a71..f940f7aa 100644 --- a/Test/baseResults/spv.300layout.vert.out +++ b/Test/baseResults/spv.300layout.vert.out @@ -1,4 +1,6 @@ spv.300layout.vert +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked vertex stage: @@ -11,7 +13,7 @@ Linked vertex stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Vertex 4 "main" 9 11 99 101 109 121 129 163 164 - Source ESSL 300 + Source ESSL 310 Name 4 "main" Name 9 "pos" Name 11 "p" diff --git a/Test/baseResults/spv.300layoutp.vert.out b/Test/baseResults/spv.300layoutp.vert.out index b5580b5c..5baf51fb 100755 --- a/Test/baseResults/spv.300layoutp.vert.out +++ b/Test/baseResults/spv.300layoutp.vert.out @@ -1,4 +1,6 @@ spv.300layoutp.vert +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked vertex stage: @@ -11,7 +13,7 @@ Linked vertex stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Vertex 4 "main" 9 11 51 53 61 73 81 115 116 - Source ESSL 300 + Source ESSL 310 Name 4 "main" Name 9 "pos" Name 11 "p" diff --git a/Test/baseResults/spv.always-discard.frag.out b/Test/baseResults/spv.always-discard.frag.out index 73e34bdc..8c19b7b3 100644 --- a/Test/baseResults/spv.always-discard.frag.out +++ b/Test/baseResults/spv.always-discard.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 21 59 ExecutionMode 4 OriginLowerLeft - Source GLSL 110 + Source GLSL 140 Name 4 "main" Name 9 "white" Name 12 "black" diff --git a/Test/baseResults/spv.always-discard2.frag.out b/Test/baseResults/spv.always-discard2.frag.out index b62d10c4..896382e1 100755 --- a/Test/baseResults/spv.always-discard2.frag.out +++ b/Test/baseResults/spv.always-discard2.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 21 38 ExecutionMode 4 OriginLowerLeft - Source GLSL 110 + Source GLSL 140 Name 4 "main" Name 9 "white" Name 12 "black" diff --git a/Test/baseResults/spv.branch-return.vert.out b/Test/baseResults/spv.branch-return.vert.out index 8588d741..19bc3e04 100644 --- a/Test/baseResults/spv.branch-return.vert.out +++ b/Test/baseResults/spv.branch-return.vert.out @@ -1,24 +1,31 @@ spv.branch-return.vert +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 35 +// Id's are bound by 39 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 8 19 34 - Source ESSL 300 + EntryPoint Vertex 4 "main" 8 20 38 + Source ESSL 310 Name 4 "main" Name 8 "gl_InstanceID" - Name 19 "gl_Position" - Name 34 "gl_VertexID" + Name 18 "gl_PerVertex" + MemberName 18(gl_PerVertex) 0 "gl_Position" + MemberName 18(gl_PerVertex) 1 "gl_PointSize" + Name 20 "" + Name 38 "gl_VertexID" Decorate 8(gl_InstanceID) BuiltIn InstanceId - Decorate 19(gl_Position) BuiltIn Position - Decorate 34(gl_VertexID) BuiltIn VertexId + MemberDecorate 18(gl_PerVertex) 0 BuiltIn Position + MemberDecorate 18(gl_PerVertex) 1 BuiltIn PointSize + Decorate 18(gl_PerVertex) Block + Decorate 38(gl_VertexID) BuiltIn VertexId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -26,15 +33,18 @@ Linked vertex stage: 8(gl_InstanceID): 7(ptr) Variable Input 16: TypeFloat 32 17: TypeVector 16(float) 4 - 18: TypePointer Output 17(fvec4) - 19(gl_Position): 18(ptr) Variable Output - 20: 16(float) Constant 0 - 21: 17(fvec4) ConstantComposite 20 20 20 20 - 26: 16(float) Constant 1039918957 - 27: TypeInt 32 0 - 28: 27(int) Constant 0 - 29: TypePointer Output 16(float) - 34(gl_VertexID): 7(ptr) Variable Input +18(gl_PerVertex): TypeStruct 17(fvec4) 16(float) + 19: TypePointer Output 18(gl_PerVertex) + 20: 19(ptr) Variable Output + 21: 6(int) Constant 0 + 22: 16(float) Constant 0 + 23: 17(fvec4) ConstantComposite 22 22 22 22 + 24: TypePointer Output 17(fvec4) + 30: 16(float) Constant 1039918957 + 31: TypeInt 32 0 + 32: 31(int) Constant 0 + 33: TypePointer Output 16(float) + 38(gl_VertexID): 7(ptr) Variable Input 4(main): 2 Function None 3 5: Label 9: 6(int) Load 8(gl_InstanceID) @@ -47,17 +57,18 @@ Linked vertex stage: 10: Label Return 11: Label - Store 19(gl_Position) 21 + 25: 24(ptr) AccessChain 20 21 + Store 25 23 Branch 14 12: Label Return 13: Label Return 14: Label - 30: 29(ptr) AccessChain 19(gl_Position) 28 - 31: 16(float) Load 30 - 32: 16(float) FAdd 31 26 - 33: 29(ptr) AccessChain 19(gl_Position) 28 - Store 33 32 + 34: 33(ptr) AccessChain 20 21 32 + 35: 16(float) Load 34 + 36: 16(float) FAdd 35 30 + 37: 33(ptr) AccessChain 20 21 32 + Store 37 36 Return FunctionEnd diff --git a/Test/baseResults/spv.conversion.frag.out b/Test/baseResults/spv.conversion.frag.out index 405e6a80..a88007a1 100755 --- a/Test/baseResults/spv.conversion.frag.out +++ b/Test/baseResults/spv.conversion.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 39 53 157 322 446 448 450 452 454 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 8 "b" Name 11 "u_i" diff --git a/Test/baseResults/spv.dataOut.frag.out b/Test/baseResults/spv.dataOut.frag.out index d96a6eca..67723d4d 100755 --- a/Test/baseResults/spv.dataOut.frag.out +++ b/Test/baseResults/spv.dataOut.frag.out @@ -1,6 +1,4 @@ spv.dataOut.frag -WARNING: 0:3: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -14,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 12 16 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 12 "gl_FragData" Name 16 "Color" diff --git a/Test/baseResults/spv.dataOutIndirect.frag.out b/Test/baseResults/spv.dataOutIndirect.frag.out index 26a5f77c..1b22e228 100755 --- a/Test/baseResults/spv.dataOutIndirect.frag.out +++ b/Test/baseResults/spv.dataOutIndirect.frag.out @@ -1,6 +1,4 @@ spv.dataOutIndirect.frag -WARNING: 0:3: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -14,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 12 18 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 12 "gl_FragData" Name 15 "i" diff --git a/Test/baseResults/spv.dataOutIndirect.vert.out b/Test/baseResults/spv.dataOutIndirect.vert.out index 62da85f3..c0182b5f 100755 --- a/Test/baseResults/spv.dataOutIndirect.vert.out +++ b/Test/baseResults/spv.dataOutIndirect.vert.out @@ -1,6 +1,5 @@ spv.dataOutIndirect.vert WARNING: 0:3: attribute deprecated in version 130; may be removed in future release -WARNING: 0:4: varying deprecated in version 130; may be removed in future release Linked vertex stage: @@ -8,21 +7,23 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 40 +// Id's are bound by 41 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 25 28 34 39 - Source GLSL 130 + EntryPoint Vertex 4 "main" 25 28 34 39 40 + Source GLSL 140 Name 4 "main" Name 8 "i" Name 25 "colorOut" Name 28 "color" Name 34 "gl_Position" Name 39 "gl_VertexID" + Name 40 "gl_InstanceID" Decorate 34(gl_Position) BuiltIn Position Decorate 39(gl_VertexID) BuiltIn VertexId + Decorate 40(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeInt 32 1 @@ -44,6 +45,7 @@ Linked vertex stage: 35: 6(int) Constant 2 38: TypePointer Input 6(int) 39(gl_VertexID): 38(ptr) Variable Input +40(gl_InstanceID): 38(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(i): 7(ptr) Variable Function diff --git a/Test/baseResults/spv.discard-dce.frag.out b/Test/baseResults/spv.discard-dce.frag.out index c2a8501a..dd1d6296 100755 --- a/Test/baseResults/spv.discard-dce.frag.out +++ b/Test/baseResults/spv.discard-dce.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 21 59 ExecutionMode 4 OriginLowerLeft - Source GLSL 110 + Source GLSL 140 Name 4 "main" Name 9 "white" Name 12 "black" diff --git a/Test/baseResults/spv.do-simple.vert.out b/Test/baseResults/spv.do-simple.vert.out index f63f21ac..d3f090f8 100755 --- a/Test/baseResults/spv.do-simple.vert.out +++ b/Test/baseResults/spv.do-simple.vert.out @@ -1,4 +1,6 @@ spv.do-simple.vert +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked vertex stage: @@ -11,7 +13,7 @@ Linked vertex stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Vertex 4 "main" 22 23 - Source ESSL 300 + Source ESSL 310 Name 4 "main" Name 8 "i" Name 22 "gl_VertexID" diff --git a/Test/baseResults/spv.do-while-continue-break.vert.out b/Test/baseResults/spv.do-while-continue-break.vert.out index c8f0b2f9..98fa1849 100644 --- a/Test/baseResults/spv.do-while-continue-break.vert.out +++ b/Test/baseResults/spv.do-while-continue-break.vert.out @@ -1,4 +1,6 @@ spv.do-while-continue-break.vert +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked vertex stage: @@ -11,7 +13,7 @@ Linked vertex stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Vertex 4 "main" 44 45 - Source ESSL 300 + Source ESSL 310 Name 4 "main" Name 8 "i" Name 14 "A" diff --git a/Test/baseResults/spv.doWhileLoop.frag.out b/Test/baseResults/spv.doWhileLoop.frag.out index 18f32bd0..86423ea7 100755 --- a/Test/baseResults/spv.doWhileLoop.frag.out +++ b/Test/baseResults/spv.doWhileLoop.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 11 33 ExecutionMode 4 OriginLowerLeft - Source GLSL 110 + Source GLSL 140 Name 4 "main" Name 9 "color" Name 11 "BaseColor" diff --git a/Test/baseResults/spv.earlyReturnDiscard.frag.out b/Test/baseResults/spv.earlyReturnDiscard.frag.out index 393a24fc..76888484 100755 --- a/Test/baseResults/spv.earlyReturnDiscard.frag.out +++ b/Test/baseResults/spv.earlyReturnDiscard.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 11 18 107 ExecutionMode 4 OriginLowerLeft - Source GLSL 110 + Source GLSL 140 Name 4 "main" Name 9 "color" Name 11 "BaseColor" diff --git a/Test/baseResults/spv.flowControl.frag.out b/Test/baseResults/spv.flowControl.frag.out index 825a4177..2ca252e7 100755 --- a/Test/baseResults/spv.flowControl.frag.out +++ b/Test/baseResults/spv.flowControl.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 11 18 37 ExecutionMode 4 OriginLowerLeft - Source GLSL 120 + Source GLSL 140 Name 4 "main" Name 9 "color" Name 11 "BaseColor" diff --git a/Test/baseResults/spv.for-continue-break.vert.out b/Test/baseResults/spv.for-continue-break.vert.out index 608ec661..f7530b73 100644 --- a/Test/baseResults/spv.for-continue-break.vert.out +++ b/Test/baseResults/spv.for-continue-break.vert.out @@ -1,4 +1,6 @@ spv.for-continue-break.vert +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked vertex stage: @@ -11,7 +13,7 @@ Linked vertex stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Vertex 4 "main" 46 47 - Source ESSL 300 + Source ESSL 310 Name 4 "main" Name 8 "i" Name 19 "A" diff --git a/Test/baseResults/spv.for-simple.vert.out b/Test/baseResults/spv.for-simple.vert.out index 3d090e5b..c8af4c5b 100755 --- a/Test/baseResults/spv.for-simple.vert.out +++ b/Test/baseResults/spv.for-simple.vert.out @@ -1,4 +1,6 @@ spv.for-simple.vert +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked vertex stage: @@ -11,7 +13,7 @@ Linked vertex stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Vertex 4 "main" 25 26 - Source ESSL 300 + Source ESSL 310 Name 4 "main" Name 8 "i" Name 19 "j" diff --git a/Test/baseResults/spv.forLoop.frag.out b/Test/baseResults/spv.forLoop.frag.out index 9e68e6b2..1d6c425a 100755 --- a/Test/baseResults/spv.forLoop.frag.out +++ b/Test/baseResults/spv.forLoop.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 11 37 105 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 9 "color" Name 11 "BaseColor" diff --git a/Test/baseResults/spv.forwardFun.frag.out b/Test/baseResults/spv.forwardFun.frag.out index 2000a369..0ce0c2e4 100755 --- a/Test/baseResults/spv.forwardFun.frag.out +++ b/Test/baseResults/spv.forwardFun.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 20 30 ExecutionMode 4 OriginLowerLeft - Source ESSL 100 + Source GLSL 140 Name 4 "main" Name 6 "bar(" Name 10 "unreachableReturn(" @@ -25,12 +25,6 @@ Linked fragment stage: Name 30 "gl_FragColor" Name 36 "d" Name 60 "bigColor" - Decorate 18(color) RelaxedPrecision - Decorate 20(BaseColor) RelaxedPrecision - Decorate 27(f) RelaxedPrecision - Decorate 30(gl_FragColor) RelaxedPrecision - Decorate 36(d) RelaxedPrecision - Decorate 60(bigColor) RelaxedPrecision 2: TypeVoid 3: TypeFunction 2 8: TypeFloat 32 diff --git a/Test/baseResults/spv.functionCall.frag.out b/Test/baseResults/spv.functionCall.frag.out index f2d381db..3e3fbd52 100755 --- a/Test/baseResults/spv.functionCall.frag.out +++ b/Test/baseResults/spv.functionCall.frag.out @@ -1,6 +1,4 @@ spv.functionCall.frag -WARNING: 0:4: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -14,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 58 69 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 11 "foo(vf4;" Name 10 "bar" diff --git a/Test/baseResults/spv.length.frag.out b/Test/baseResults/spv.length.frag.out index 84d711cc..c7e8ad8f 100755 --- a/Test/baseResults/spv.length.frag.out +++ b/Test/baseResults/spv.length.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 14 26 ExecutionMode 4 OriginLowerLeft - Source GLSL 120 + Source GLSL 140 Name 4 "main" Name 9 "t" Name 14 "v" diff --git a/Test/baseResults/spv.localAggregates.frag.out b/Test/baseResults/spv.localAggregates.frag.out index 1b5ef924..db540dc1 100755 --- a/Test/baseResults/spv.localAggregates.frag.out +++ b/Test/baseResults/spv.localAggregates.frag.out @@ -1,7 +1,4 @@ spv.localAggregates.frag -WARNING: 0:4: varying deprecated in version 130; may be removed in future release -WARNING: 0:5: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -15,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 40 98 108 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 8 "s1" MemberName 8(s1) 0 "i" diff --git a/Test/baseResults/spv.loops.frag.out b/Test/baseResults/spv.loops.frag.out index 3cf68a06..994dd96d 100755 --- a/Test/baseResults/spv.loops.frag.out +++ b/Test/baseResults/spv.loops.frag.out @@ -1,6 +1,4 @@ spv.loops.frag -WARNING: 0:14: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -14,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 11 616 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 9 "color" Name 11 "BaseColor" diff --git a/Test/baseResults/spv.loopsArtificial.frag.out b/Test/baseResults/spv.loopsArtificial.frag.out index 7de618ff..7fd04d44 100755 --- a/Test/baseResults/spv.loopsArtificial.frag.out +++ b/Test/baseResults/spv.loopsArtificial.frag.out @@ -1,6 +1,4 @@ spv.loopsArtificial.frag -WARNING: 0:14: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -14,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 11 141 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 9 "color" Name 11 "BaseColor" diff --git a/Test/baseResults/spv.matFun.vert.out b/Test/baseResults/spv.matFun.vert.out index bf0a3d1e..1c239d03 100755 --- a/Test/baseResults/spv.matFun.vert.out +++ b/Test/baseResults/spv.matFun.vert.out @@ -5,13 +5,13 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 96 +// Id's are bound by 97 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 72 76 95 - Source GLSL 130 + EntryPoint Vertex 4 "main" 72 76 95 96 + Source GLSL 140 Name 4 "main" Name 14 "xf(mf33;vf3;" Name 12 "m" @@ -31,8 +31,10 @@ Linked vertex stage: Name 84 "param" Name 86 "param" Name 95 "gl_VertexID" + Name 96 "gl_InstanceID" Decorate 72(gl_Position) BuiltIn Position Decorate 95(gl_VertexID) BuiltIn VertexId + Decorate 96(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -63,6 +65,7 @@ Linked vertex stage: 83(m3): 82(ptr) Variable UniformConstant 94: TypePointer Input 33(int) 95(gl_VertexID): 94(ptr) Variable Input +96(gl_InstanceID): 94(ptr) Variable Input 4(main): 2 Function None 3 5: Label 77(param): 18(ptr) Variable Function diff --git a/Test/baseResults/spv.matrix.frag.out b/Test/baseResults/spv.matrix.frag.out index 4507a2fe..62a1636c 100644 --- a/Test/baseResults/spv.matrix.frag.out +++ b/Test/baseResults/spv.matrix.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 12 14 28 140 148 166 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 10 "sum34" Name 12 "m1" diff --git a/Test/baseResults/spv.nonSquare.vert.out b/Test/baseResults/spv.nonSquare.vert.out index 51a42682..abc7d362 100755 --- a/Test/baseResults/spv.nonSquare.vert.out +++ b/Test/baseResults/spv.nonSquare.vert.out @@ -1,17 +1,20 @@ spv.nonSquare.vert +WARNING: 0:3: attribute deprecated in version 130; may be removed in future release +WARNING: 0:4: attribute deprecated in version 130; may be removed in future release + Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 90 +// Id's are bound by 94 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 12 28 55 - Source GLSL 120 + EntryPoint Vertex 4 "main" 12 28 55 92 93 + Source GLSL 140 Name 4 "main" Name 9 "a" Name 12 "v3" @@ -20,7 +23,11 @@ Linked vertex stage: Name 22 "m32" Name 28 "gl_Position" Name 55 "v4" + Name 92 "gl_VertexID" + Name 93 "gl_InstanceID" Decorate 28(gl_Position) BuiltIn Position + Decorate 92(gl_VertexID) BuiltIn VertexId + Decorate 93(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -83,6 +90,10 @@ Linked vertex stage: 87: 6(float) Constant 1090519040 88: 7(fvec2) ConstantComposite 86 87 89: 79 ConstantComposite 82 84 85 88 + 90: TypeInt 32 1 + 91: TypePointer Input 90(int) + 92(gl_VertexID): 91(ptr) Variable Input +93(gl_InstanceID): 91(ptr) Variable Input 4(main): 2 Function None 3 5: Label 9(a): 8(ptr) Variable Function diff --git a/Test/baseResults/spv.precision.frag.out b/Test/baseResults/spv.precision.frag.out index e120eecd..27e48f1e 100755 --- a/Test/baseResults/spv.precision.frag.out +++ b/Test/baseResults/spv.precision.frag.out @@ -1,4 +1,6 @@ spv.precision.frag +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked fragment stage: @@ -12,7 +14,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 23 59 61 73 ExecutionMode 4 OriginLowerLeft - Source ESSL 300 + Source ESSL 310 Name 4 "main" Name 12 "foo(vf3;" Name 11 "mv3" diff --git a/Test/baseResults/spv.simpleFunctionCall.frag.out b/Test/baseResults/spv.simpleFunctionCall.frag.out index 34bdae06..8018da8e 100755 --- a/Test/baseResults/spv.simpleFunctionCall.frag.out +++ b/Test/baseResults/spv.simpleFunctionCall.frag.out @@ -1,6 +1,4 @@ spv.simpleFunctionCall.frag -WARNING: 0:4: varying deprecated in version 130; may be removed in future release - Linked fragment stage: diff --git a/Test/baseResults/spv.structAssignment.frag.out b/Test/baseResults/spv.structAssignment.frag.out index 9675d88f..8edb4f01 100755 --- a/Test/baseResults/spv.structAssignment.frag.out +++ b/Test/baseResults/spv.structAssignment.frag.out @@ -1,6 +1,4 @@ spv.structAssignment.frag -WARNING: 0:4: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -14,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 31 44 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 8 "lunarStruct1" MemberName 8(lunarStruct1) 0 "i" diff --git a/Test/baseResults/spv.structDeref.frag.out b/Test/baseResults/spv.structDeref.frag.out index 8d34ea30..ccfda84d 100755 --- a/Test/baseResults/spv.structDeref.frag.out +++ b/Test/baseResults/spv.structDeref.frag.out @@ -1,6 +1,4 @@ spv.structDeref.frag -WARNING: 0:4: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -14,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 61 99 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 8 "s0" MemberName 8(s0) 0 "i" diff --git a/Test/baseResults/spv.structure.frag.out b/Test/baseResults/spv.structure.frag.out index bcf5222d..866a7bdf 100755 --- a/Test/baseResults/spv.structure.frag.out +++ b/Test/baseResults/spv.structure.frag.out @@ -1,6 +1,4 @@ spv.structure.frag -WARNING: 0:3: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -14,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 45 54 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 8 "scale" Name 18 "lunarStruct1" diff --git a/Test/baseResults/spv.swizzle.frag.out b/Test/baseResults/spv.swizzle.frag.out index bfefdeab..82137e27 100755 --- a/Test/baseResults/spv.swizzle.frag.out +++ b/Test/baseResults/spv.swizzle.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 30 69 ExecutionMode 4 OriginLowerLeft - Source GLSL 110 + Source GLSL 140 Name 4 "main" Name 8 "blendscale" Name 12 "w" diff --git a/Test/baseResults/spv.test.vert.out b/Test/baseResults/spv.test.vert.out index f4dfd580..ef7fd988 100755 --- a/Test/baseResults/spv.test.vert.out +++ b/Test/baseResults/spv.test.vert.out @@ -7,13 +7,13 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 27 +// Id's are bound by 28 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 9 11 15 21 26 - Source GLSL 130 + EntryPoint Vertex 4 "main" 9 11 15 21 26 27 + Source GLSL 140 Name 4 "main" Name 9 "uv" Name 11 "uv_in" @@ -21,8 +21,10 @@ Linked vertex stage: Name 18 "transform" Name 21 "position" Name 26 "gl_VertexID" + Name 27 "gl_InstanceID" Decorate 15(gl_Position) BuiltIn Position Decorate 26(gl_VertexID) BuiltIn VertexId + Decorate 27(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -42,6 +44,7 @@ Linked vertex stage: 24: TypeInt 32 1 25: TypePointer Input 24(int) 26(gl_VertexID): 25(ptr) Variable Input +27(gl_InstanceID): 25(ptr) Variable Input 4(main): 2 Function None 3 5: Label 12: 7(fvec2) Load 11(uv_in) diff --git a/Test/baseResults/spv.texture.frag.out b/Test/baseResults/spv.texture.frag.out index 56279325..0e795191 100755 --- a/Test/baseResults/spv.texture.frag.out +++ b/Test/baseResults/spv.texture.frag.out @@ -1,7 +1,4 @@ spv.texture.frag -WARNING: 0:14: varying deprecated in version 130; may be removed in future release -WARNING: 0:15: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -15,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 47 276 290 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 8 "blendscale" Name 10 "bias" diff --git a/Test/baseResults/spv.texture.vert.out b/Test/baseResults/spv.texture.vert.out index ec48714e..f081ce0e 100755 --- a/Test/baseResults/spv.texture.vert.out +++ b/Test/baseResults/spv.texture.vert.out @@ -5,13 +5,13 @@ Linked vertex stage: // Module Version 10000 // Generated by (magic number): 80001 -// Id's are bound by 145 +// Id's are bound by 146 Capability Shader 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 - EntryPoint Vertex 4 "main" 39 140 144 - Source GLSL 130 + EntryPoint Vertex 4 "main" 39 140 144 145 + Source GLSL 140 Name 4 "main" Name 8 "lod" Name 10 "coords1D" @@ -27,8 +27,10 @@ Linked vertex stage: Name 114 "shadowSampler2D" Name 140 "gl_Position" Name 144 "gl_VertexID" + Name 145 "gl_InstanceID" Decorate 140(gl_Position) BuiltIn Position Decorate 144(gl_VertexID) BuiltIn VertexId + Decorate 145(gl_InstanceID) BuiltIn InstanceId 2: TypeVoid 3: TypeFunction 2 6: TypeFloat 32 @@ -78,6 +80,7 @@ Linked vertex stage: 142: TypeInt 32 1 143: TypePointer Input 142(int) 144(gl_VertexID): 143(ptr) Variable Input +145(gl_InstanceID): 143(ptr) Variable Input 4(main): 2 Function None 3 5: Label 8(lod): 7(ptr) Variable Function diff --git a/Test/baseResults/spv.types.frag.out b/Test/baseResults/spv.types.frag.out index 04a66402..5355a8f0 100755 --- a/Test/baseResults/spv.types.frag.out +++ b/Test/baseResults/spv.types.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 94 104 114 124 134 144 154 164 168 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 8 "b" Name 10 "u_b" diff --git a/Test/baseResults/spv.uint.frag.out b/Test/baseResults/spv.uint.frag.out index 3dc929b4..8c732dc8 100755 --- a/Test/baseResults/spv.uint.frag.out +++ b/Test/baseResults/spv.uint.frag.out @@ -1,4 +1,6 @@ spv.uint.frag +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked fragment stage: @@ -12,7 +14,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 15 68 77 200 ExecutionMode 4 OriginLowerLeft - Source ESSL 300 + Source ESSL 310 Name 4 "main" Name 8 "count" Name 12 "u" diff --git a/Test/baseResults/spv.uniformArray.frag.out b/Test/baseResults/spv.uniformArray.frag.out index 963df924..747aa17e 100755 --- a/Test/baseResults/spv.uniformArray.frag.out +++ b/Test/baseResults/spv.uniformArray.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 47 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 9 "texColor" Name 14 "color" diff --git a/Test/baseResults/spv.variableArrayIndex.frag.out b/Test/baseResults/spv.variableArrayIndex.frag.out index abd39080..3d8162a6 100755 --- a/Test/baseResults/spv.variableArrayIndex.frag.out +++ b/Test/baseResults/spv.variableArrayIndex.frag.out @@ -1,6 +1,4 @@ spv.variableArrayIndex.frag -WARNING: 0:3: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -14,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 54 63 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 8 "iLocal" Name 10 "Count" diff --git a/Test/baseResults/spv.varyingArray.frag.out b/Test/baseResults/spv.varyingArray.frag.out index 26234e84..91ec96a6 100755 --- a/Test/baseResults/spv.varyingArray.frag.out +++ b/Test/baseResults/spv.varyingArray.frag.out @@ -1,9 +1,4 @@ spv.varyingArray.frag -WARNING: 0:3: varying deprecated in version 130; may be removed in future release -WARNING: 0:4: varying deprecated in version 130; may be removed in future release -WARNING: 0:6: varying deprecated in version 130; may be removed in future release -WARNING: 0:8: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -17,11 +12,11 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 19 34 39 45 48 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 9 "texColor" Name 13 "texSampler2D" - Name 19 "gl_TexCoord" + Name 19 "TexCoord" Name 34 "color" Name 39 "alpha" Name 45 "gl_FragColor" @@ -39,7 +34,7 @@ Linked fragment stage: 16: 15(int) Constant 6 17: TypeArray 7(fvec4) 16 18: TypePointer Input 17 - 19(gl_TexCoord): 18(ptr) Variable Input + 19(TexCoord): 18(ptr) Variable Input 20: TypeInt 32 1 21: 20(int) Constant 4 22: TypePointer Input 7(fvec4) @@ -61,9 +56,9 @@ Linked fragment stage: 5: Label 9(texColor): 8(ptr) Variable Function 14: 11 Load 13(texSampler2D) - 23: 22(ptr) AccessChain 19(gl_TexCoord) 21 + 23: 22(ptr) AccessChain 19(TexCoord) 21 24: 7(fvec4) Load 23 - 26: 22(ptr) AccessChain 19(gl_TexCoord) 25 + 26: 22(ptr) AccessChain 19(TexCoord) 25 27: 7(fvec4) Load 26 28: 7(fvec4) FAdd 24 27 30: 6(float) CompositeExtract 28 0 @@ -80,10 +75,10 @@ Linked fragment stage: Store 43 40 50: 22(ptr) AccessChain 48(foo) 49 51: 7(fvec4) Load 50 - 53: 22(ptr) AccessChain 19(gl_TexCoord) 52 + 53: 22(ptr) AccessChain 19(TexCoord) 52 54: 7(fvec4) Load 53 55: 7(fvec4) FAdd 51 54 - 56: 22(ptr) AccessChain 19(gl_TexCoord) 21 + 56: 22(ptr) AccessChain 19(TexCoord) 21 57: 7(fvec4) Load 56 58: 7(fvec4) FAdd 55 57 59: 7(fvec4) Load 9(texColor) diff --git a/Test/baseResults/spv.varyingArrayIndirect.frag.out b/Test/baseResults/spv.varyingArrayIndirect.frag.out index 41ee8657..01b7e43e 100755 --- a/Test/baseResults/spv.varyingArrayIndirect.frag.out +++ b/Test/baseResults/spv.varyingArrayIndirect.frag.out @@ -1,9 +1,4 @@ spv.varyingArrayIndirect.frag -WARNING: 0:3: varying deprecated in version 130; may be removed in future release -WARNING: 0:4: varying deprecated in version 130; may be removed in future release -WARNING: 0:6: varying deprecated in version 130; may be removed in future release -WARNING: 0:8: varying deprecated in version 130; may be removed in future release - Linked fragment stage: @@ -17,13 +12,13 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 19 30 45 50 56 ExecutionMode 4 OriginLowerLeft - Source GLSL 130 + Source GLSL 140 Name 4 "main" Name 9 "texColor" Name 13 "texSampler2D" Name 19 "userIn" Name 22 "b" - Name 30 "gl_TexCoord" + Name 30 "TexCoord" Name 31 "a" Name 45 "color" Name 50 "alpha" @@ -49,7 +44,7 @@ Linked fragment stage: 27: 15(int) Constant 6 28: TypeArray 7(fvec4) 27 29: TypePointer Input 28 - 30(gl_TexCoord): 29(ptr) Variable Input + 30(TexCoord): 29(ptr) Variable Input 31(a): 21(ptr) Variable UniformConstant 36: 20(int) Constant 5 40: TypeVector 6(float) 2 @@ -69,10 +64,10 @@ Linked fragment stage: 25: 24(ptr) AccessChain 19(userIn) 23 26: 7(fvec4) Load 25 32: 20(int) Load 31(a) - 33: 24(ptr) AccessChain 30(gl_TexCoord) 32 + 33: 24(ptr) AccessChain 30(TexCoord) 32 34: 7(fvec4) Load 33 35: 7(fvec4) FAdd 26 34 - 37: 24(ptr) AccessChain 30(gl_TexCoord) 36 + 37: 24(ptr) AccessChain 30(TexCoord) 36 38: 7(fvec4) Load 37 39: 7(fvec4) FAdd 35 38 41: 6(float) CompositeExtract 39 0 @@ -87,10 +82,10 @@ Linked fragment stage: 51: 6(float) Load 50(alpha) 54: 53(ptr) AccessChain 9(texColor) 52 Store 54 51 - 58: 24(ptr) AccessChain 30(gl_TexCoord) 57 + 58: 24(ptr) AccessChain 30(TexCoord) 57 59: 7(fvec4) Load 58 60: 20(int) Load 22(b) - 61: 24(ptr) AccessChain 30(gl_TexCoord) 60 + 61: 24(ptr) AccessChain 30(TexCoord) 60 62: 7(fvec4) Load 61 63: 7(fvec4) FAdd 59 62 64: 7(fvec4) Load 9(texColor) diff --git a/Test/baseResults/spv.voidFunction.frag.out b/Test/baseResults/spv.voidFunction.frag.out index 9ef6e8df..6b9179b8 100755 --- a/Test/baseResults/spv.voidFunction.frag.out +++ b/Test/baseResults/spv.voidFunction.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 37 41 ExecutionMode 4 OriginLowerLeft - Source GLSL 120 + Source GLSL 140 Name 4 "main" Name 6 "foo(" Name 8 "foo2(" diff --git a/Test/baseResults/spv.while-continue-break.vert.out b/Test/baseResults/spv.while-continue-break.vert.out index f933dce9..8086e3b0 100644 --- a/Test/baseResults/spv.while-continue-break.vert.out +++ b/Test/baseResults/spv.while-continue-break.vert.out @@ -1,4 +1,6 @@ spv.while-continue-break.vert +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked vertex stage: @@ -11,7 +13,7 @@ Linked vertex stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Vertex 4 "main" 42 43 - Source ESSL 300 + Source ESSL 310 Name 4 "main" Name 8 "i" Name 19 "A" diff --git a/Test/baseResults/spv.while-simple.vert.out b/Test/baseResults/spv.while-simple.vert.out index f5d13a37..04f53561 100755 --- a/Test/baseResults/spv.while-simple.vert.out +++ b/Test/baseResults/spv.while-simple.vert.out @@ -1,4 +1,6 @@ spv.while-simple.vert +Warning, version 310 is not yet complete; most version-specific features are present, but some are missing. + Linked vertex stage: @@ -11,7 +13,7 @@ Linked vertex stage: 1: ExtInstImport "GLSL.std.450" MemoryModel Logical GLSL450 EntryPoint Vertex 4 "main" 23 24 - Source ESSL 300 + Source ESSL 310 Name 4 "main" Name 8 "i" Name 23 "gl_VertexID" diff --git a/Test/baseResults/spv.whileLoop.frag.out b/Test/baseResults/spv.whileLoop.frag.out index c29ebd37..56e2d1c4 100755 --- a/Test/baseResults/spv.whileLoop.frag.out +++ b/Test/baseResults/spv.whileLoop.frag.out @@ -12,7 +12,7 @@ Linked fragment stage: MemoryModel Logical GLSL450 EntryPoint Fragment 4 "main" 11 34 ExecutionMode 4 OriginLowerLeft - Source GLSL 110 + Source GLSL 140 Name 4 "main" Name 9 "color" Name 11 "BaseColor" diff --git a/Test/spv.100ops.frag b/Test/spv.100ops.frag index b86d0423..b0daf8e2 100644 --- a/Test/spv.100ops.frag +++ b/Test/spv.100ops.frag @@ -1,4 +1,4 @@ -#version 100 +#version 310 es lowp float foo(); @@ -6,6 +6,8 @@ uniform int low, high; lowp float face1 = 11.0; +out lowp vec4 Color; + void main() { int z = 3; @@ -13,7 +15,7 @@ void main() if (2 * low + 1 < high) ++z; - gl_FragColor = face1 * vec4(z) + foo(); + Color = face1 * vec4(z) + foo(); } lowp float face2 = -2.0; diff --git a/Test/spv.130.frag b/Test/spv.130.frag index 0e580e4f..dcbd5be1 100644 --- a/Test/spv.130.frag +++ b/Test/spv.130.frag @@ -1,4 +1,4 @@ -#version 130 +#version 140 #extension GL_ARB_texture_gather : enable vec3 a; @@ -15,9 +15,6 @@ noperspective in float fnop; uniform samplerCube sampC; -in vec4 gl_Color; -flat in vec4 gl_Color; - #extension GL_ARB_texture_rectangle : enable uniform sampler2D samp2D; diff --git a/Test/spv.300BuiltIns.vert b/Test/spv.300BuiltIns.vert index c8104de8..0f40c251 100644 --- a/Test/spv.300BuiltIns.vert +++ b/Test/spv.300BuiltIns.vert @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es in mediump float ps; diff --git a/Test/spv.300layout.frag b/Test/spv.300layout.frag index d80de3ab..5b4c56c2 100644 --- a/Test/spv.300layout.frag +++ b/Test/spv.300layout.frag @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es precision mediump float; diff --git a/Test/spv.300layout.vert b/Test/spv.300layout.vert index 38ff374c..d2db127c 100644 --- a/Test/spv.300layout.vert +++ b/Test/spv.300layout.vert @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es layout(location = 7) in vec3 c; layout(LocatioN = 3) in vec4 p; diff --git a/Test/spv.300layoutp.vert b/Test/spv.300layoutp.vert index a0986e47..79d4093c 100644 --- a/Test/spv.300layoutp.vert +++ b/Test/spv.300layoutp.vert @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es layout(location = 7) in vec3 c; layout(LocatioN = 3) in vec4 p; diff --git a/Test/spv.always-discard.frag b/Test/spv.always-discard.frag index cea4ceec..6cd4d04f 100644 --- a/Test/spv.always-discard.frag +++ b/Test/spv.always-discard.frag @@ -1,5 +1,5 @@ -#version 110 -varying vec2 tex_coord; +#version 140 +in vec2 tex_coord; void main (void) { diff --git a/Test/spv.always-discard2.frag b/Test/spv.always-discard2.frag index a619369d..2b125f32 100644 --- a/Test/spv.always-discard2.frag +++ b/Test/spv.always-discard2.frag @@ -1,5 +1,5 @@ -#version 110 -varying vec2 tex_coord; +#version 140 +in vec2 tex_coord; void main (void) { diff --git a/Test/spv.branch-return.vert b/Test/spv.branch-return.vert index 0b5897bf..e7a7e387 100644 --- a/Test/spv.branch-return.vert +++ b/Test/spv.branch-return.vert @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es void main() { switch (gl_InstanceID) { case 0: return; diff --git a/Test/spv.conversion.frag b/Test/spv.conversion.frag index f17293b8..dbd14e29 100644 --- a/Test/spv.conversion.frag +++ b/Test/spv.conversion.frag @@ -1,4 +1,4 @@ -#version 130 +#version 140 uniform bool u_b; uniform bvec2 u_b2; diff --git a/Test/spv.dataOut.frag b/Test/spv.dataOut.frag index 258f534e..94c6db06 100644 --- a/Test/spv.dataOut.frag +++ b/Test/spv.dataOut.frag @@ -1,6 +1,6 @@ -#version 130 +#version 140 -varying vec4 Color; +in vec4 Color; void main() { diff --git a/Test/spv.dataOutIndirect.frag b/Test/spv.dataOutIndirect.frag index d6b8667d..979a9406 100644 --- a/Test/spv.dataOutIndirect.frag +++ b/Test/spv.dataOutIndirect.frag @@ -1,6 +1,6 @@ -#version 130 +#version 140 -varying vec4 Color; +in vec4 Color; uniform int i; diff --git a/Test/spv.dataOutIndirect.vert b/Test/spv.dataOutIndirect.vert index 7c647fc0..cb6b7e0d 100644 --- a/Test/spv.dataOutIndirect.vert +++ b/Test/spv.dataOutIndirect.vert @@ -1,7 +1,7 @@ -#version 130 +#version 140 attribute vec4 color; -varying vec4 colorOut[6]; +out vec4 colorOut[6]; void main() { diff --git a/Test/spv.discard-dce.frag b/Test/spv.discard-dce.frag index f2fef4d1..e824f76e 100644 --- a/Test/spv.discard-dce.frag +++ b/Test/spv.discard-dce.frag @@ -1,5 +1,5 @@ -#version 110 -varying vec2 tex_coord; +#version 140 +in vec2 tex_coord; void main (void) { diff --git a/Test/spv.do-simple.vert b/Test/spv.do-simple.vert index a7eba1d2..77677a6d 100644 --- a/Test/spv.do-simple.vert +++ b/Test/spv.do-simple.vert @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es void main() { int i = 0; do { diff --git a/Test/spv.do-while-continue-break.vert b/Test/spv.do-while-continue-break.vert index 1aa4bbd4..c085551e 100644 --- a/Test/spv.do-while-continue-break.vert +++ b/Test/spv.do-while-continue-break.vert @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es void main() { int i = 0; int A, B, C, D, E, F, G; diff --git a/Test/spv.doWhileLoop.frag b/Test/spv.doWhileLoop.frag index 3d6f93c5..f4b52403 100644 --- a/Test/spv.doWhileLoop.frag +++ b/Test/spv.doWhileLoop.frag @@ -1,7 +1,7 @@ -#version 110 +#version 140 uniform vec4 bigColor; -varying vec4 BaseColor; +in vec4 BaseColor; uniform float d; void main() diff --git a/Test/spv.earlyReturnDiscard.frag b/Test/spv.earlyReturnDiscard.frag index 718ea72f..d0d15c23 100644 --- a/Test/spv.earlyReturnDiscard.frag +++ b/Test/spv.earlyReturnDiscard.frag @@ -1,10 +1,10 @@ -#version 110 +#version 140 uniform float d; uniform vec4 bigColor, smallColor; uniform vec4 otherColor; -varying float c; +in float c; uniform float threshhold; uniform float threshhold2; @@ -12,7 +12,7 @@ uniform float threshhold3; uniform float minimum; -varying vec4 BaseColor; +in vec4 BaseColor; uniform bool b; diff --git a/Test/spv.flowControl.frag b/Test/spv.flowControl.frag index eaa6fb1d..86046c32 100644 --- a/Test/spv.flowControl.frag +++ b/Test/spv.flowControl.frag @@ -1,11 +1,11 @@ -#version 120 +#version 140 uniform float d; uniform vec4 bigColor, smallColor; uniform vec4 otherColor; -varying float c; -varying vec4 BaseColor; +in float c; +in vec4 BaseColor; void main() { diff --git a/Test/spv.for-continue-break.vert b/Test/spv.for-continue-break.vert index 9044f391..afa31f2b 100644 --- a/Test/spv.for-continue-break.vert +++ b/Test/spv.for-continue-break.vert @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es void main() { int i; int A, B, C, D, E, F, G; diff --git a/Test/spv.for-simple.vert b/Test/spv.for-simple.vert index 7cba22ef..a5be6db2 100644 --- a/Test/spv.for-simple.vert +++ b/Test/spv.for-simple.vert @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es void main() { int i; int j; diff --git a/Test/spv.forLoop.frag b/Test/spv.forLoop.frag index 117ecad1..0da72e19 100644 --- a/Test/spv.forLoop.frag +++ b/Test/spv.forLoop.frag @@ -1,4 +1,4 @@ -#version 130 +#version 140 uniform vec4 bigColor; in vec4 BaseColor; diff --git a/Test/spv.forwardFun.frag b/Test/spv.forwardFun.frag index eb105829..c113e85f 100644 --- a/Test/spv.forwardFun.frag +++ b/Test/spv.forwardFun.frag @@ -1,9 +1,9 @@ -#version 100 +#version 140 precision mediump float; uniform vec4 bigColor; -varying vec4 BaseColor; +in vec4 BaseColor; uniform float d; void bar(); diff --git a/Test/spv.functionCall.frag b/Test/spv.functionCall.frag index e1fc0e07..bf911fd2 100644 --- a/Test/spv.functionCall.frag +++ b/Test/spv.functionCall.frag @@ -1,7 +1,7 @@ -#version 130 +#version 140 uniform vec4 bigColor; -varying vec4 BaseColor; +in vec4 BaseColor; uniform float d; float h = 0.0; diff --git a/Test/spv.length.frag b/Test/spv.length.frag index 956d3be8..5221c833 100644 --- a/Test/spv.length.frag +++ b/Test/spv.length.frag @@ -1,8 +1,8 @@ -#version 120 +#version 140 uniform vec4 u[3]; -varying vec2 v[2]; +in vec2 v[2]; void main() { diff --git a/Test/spv.localAggregates.frag b/Test/spv.localAggregates.frag index 9cfa34ee..47224ba3 100644 --- a/Test/spv.localAggregates.frag +++ b/Test/spv.localAggregates.frag @@ -1,8 +1,8 @@ -#version 130 +#version 140 uniform sampler2D samp2D; -varying vec2 coord; -varying vec4 color; +in vec2 coord; +in vec4 color; struct s1 { int i; diff --git a/Test/spv.loops.frag b/Test/spv.loops.frag index ce2d2a0b..b9e960a6 100644 --- a/Test/spv.loops.frag +++ b/Test/spv.loops.frag @@ -1,4 +1,4 @@ -#version 130 +#version 140 uniform vec4 bigColor; uniform vec4 bigColor1_1; uniform vec4 bigColor1_2; @@ -11,7 +11,7 @@ uniform vec4 bigColor6; uniform vec4 bigColor7; uniform vec4 bigColor8; -varying vec4 BaseColor; +in vec4 BaseColor; uniform float d; uniform float d2; diff --git a/Test/spv.loopsArtificial.frag b/Test/spv.loopsArtificial.frag index 2f196af8..05b3dcbc 100644 --- a/Test/spv.loopsArtificial.frag +++ b/Test/spv.loopsArtificial.frag @@ -1,4 +1,4 @@ -#version 130 +#version 140 uniform vec4 bigColor; uniform vec4 bigColor1_1; uniform vec4 bigColor1_2; @@ -11,7 +11,7 @@ uniform vec4 bigColor6; uniform vec4 bigColor7; uniform vec4 bigColor8; -varying vec4 BaseColor; +in vec4 BaseColor; uniform float d; uniform float d2; diff --git a/Test/spv.matFun.vert b/Test/spv.matFun.vert index e5949964..64328d72 100644 --- a/Test/spv.matFun.vert +++ b/Test/spv.matFun.vert @@ -1,4 +1,4 @@ -#version 130 +#version 140 uniform mat4 m4; uniform mat3 m3; diff --git a/Test/spv.matrix.frag b/Test/spv.matrix.frag index 095bc83f..c62e9669 100644 --- a/Test/spv.matrix.frag +++ b/Test/spv.matrix.frag @@ -1,4 +1,4 @@ -#version 130 +#version 140 in mat3x4 m1; in mat3x4 m2; diff --git a/Test/spv.nonSquare.vert b/Test/spv.nonSquare.vert index 4de21a0c..9ef70559 100644 --- a/Test/spv.nonSquare.vert +++ b/Test/spv.nonSquare.vert @@ -1,4 +1,4 @@ -#version 120 +#version 140 attribute vec3 v3; attribute vec4 v4; diff --git a/Test/spv.precision.frag b/Test/spv.precision.frag index 0c6cb12b..40f790a2 100644 --- a/Test/spv.precision.frag +++ b/Test/spv.precision.frag @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es precision mediump float; in lowp float lowfin; in mediump float mediumfin; diff --git a/Test/spv.simpleFunctionCall.frag b/Test/spv.simpleFunctionCall.frag index 59f0ccd5..a302c334 100644 --- a/Test/spv.simpleFunctionCall.frag +++ b/Test/spv.simpleFunctionCall.frag @@ -1,7 +1,7 @@ #version 150 uniform vec4 bigColor; -varying vec4 BaseColor; +in vec4 BaseColor; uniform float d; vec4 foo() diff --git a/Test/spv.structAssignment.frag b/Test/spv.structAssignment.frag index 072d6b56..0199e9a8 100644 --- a/Test/spv.structAssignment.frag +++ b/Test/spv.structAssignment.frag @@ -1,7 +1,7 @@ -#version 130 +#version 140 uniform sampler2D samp2D; -varying mediump vec2 coord; +in mediump vec2 coord; struct lunarStruct1 { int i; diff --git a/Test/spv.structDeref.frag b/Test/spv.structDeref.frag index b702583d..919361e7 100644 --- a/Test/spv.structDeref.frag +++ b/Test/spv.structDeref.frag @@ -1,7 +1,7 @@ -#version 130 +#version 140 uniform sampler2D samp2D; -varying vec2 coord; +in vec2 coord; struct s0 { int i; diff --git a/Test/spv.structure.frag b/Test/spv.structure.frag index 4ed439da..770ad92b 100644 --- a/Test/spv.structure.frag +++ b/Test/spv.structure.frag @@ -1,6 +1,6 @@ -#version 130 +#version 140 uniform sampler2D samp2D; -varying vec2 coord; +in vec2 coord; struct lunarStruct1 { int i; diff --git a/Test/spv.swizzle.frag b/Test/spv.swizzle.frag index 14f507ec..476136fb 100644 --- a/Test/spv.swizzle.frag +++ b/Test/spv.swizzle.frag @@ -1,10 +1,10 @@ -#version 110 +#version 140 uniform float blend; uniform vec4 u; uniform bool p; -varying vec2 t; +in vec2 t; void main() { diff --git a/Test/spv.test.vert b/Test/spv.test.vert index 213c0acd..c1d58aa5 100644 --- a/Test/spv.test.vert +++ b/Test/spv.test.vert @@ -1,4 +1,4 @@ -#version 130 +#version 140 uniform mat4 transform; diff --git a/Test/spv.texture.frag b/Test/spv.texture.frag index 1d6a1af7..83de4e31 100644 --- a/Test/spv.texture.frag +++ b/Test/spv.texture.frag @@ -1,4 +1,4 @@ -#version 130 +#version 140 uniform sampler1D texSampler1D; uniform sampler2D texSampler2D; @@ -11,8 +11,8 @@ uniform float blend; uniform vec2 scale; uniform vec4 u; -varying vec2 t; -varying vec2 coords2D; +in vec2 t; +in vec2 coords2D; void main() { diff --git a/Test/spv.texture.vert b/Test/spv.texture.vert index a135b9d7..9b03bba0 100644 --- a/Test/spv.texture.vert +++ b/Test/spv.texture.vert @@ -1,4 +1,4 @@ -#version 130 +#version 140 uniform sampler1D texSampler1D; uniform sampler2D texSampler2D; diff --git a/Test/spv.types.frag b/Test/spv.types.frag index 48701d89..038ebd4d 100644 --- a/Test/spv.types.frag +++ b/Test/spv.types.frag @@ -1,4 +1,4 @@ -#version 130 +#version 140 uniform bool u_b; uniform bvec2 u_b2; diff --git a/Test/spv.uint.frag b/Test/spv.uint.frag index 551ef16f..eea01665 100644 --- a/Test/spv.uint.frag +++ b/Test/spv.uint.frag @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es precision mediump float; flat in uvec2 t; in float f; diff --git a/Test/spv.uniformArray.frag b/Test/spv.uniformArray.frag index 7db28764..11a353a5 100644 --- a/Test/spv.uniformArray.frag +++ b/Test/spv.uniformArray.frag @@ -1,4 +1,4 @@ -#version 130 +#version 140 uniform sampler2D texSampler2D; uniform vec3 inColor; uniform vec4 color[6]; diff --git a/Test/spv.variableArrayIndex.frag b/Test/spv.variableArrayIndex.frag index 67fbf93e..2d28c234 100644 --- a/Test/spv.variableArrayIndex.frag +++ b/Test/spv.variableArrayIndex.frag @@ -1,6 +1,6 @@ -#version 130 +#version 140 uniform sampler2D samp2D; -varying vec2 coord; +in vec2 coord; struct lunarStruct1 { int i; diff --git a/Test/spv.varyingArray.frag b/Test/spv.varyingArray.frag index 4bd6f942..f6e043f2 100644 --- a/Test/spv.varyingArray.frag +++ b/Test/spv.varyingArray.frag @@ -1,19 +1,19 @@ -#version 130 +#version 140 uniform sampler2D texSampler2D; -varying vec4 color; -varying float alpha; +in vec4 color; +in float alpha; -varying vec4 gl_TexCoord[6]; +in vec4 TexCoord[6]; -varying vec4 foo[3]; +in vec4 foo[3]; void main() { - vec4 texColor = texture(texSampler2D, vec2(gl_TexCoord[4] + gl_TexCoord[5])); + vec4 texColor = texture(texSampler2D, vec2(TexCoord[4] + TexCoord[5])); texColor += color; texColor.a = alpha; - gl_FragColor = foo[1] + gl_TexCoord[0] + gl_TexCoord[4] + texColor; + gl_FragColor = foo[1] + TexCoord[0] + TexCoord[4] + texColor; } diff --git a/Test/spv.varyingArrayIndirect.frag b/Test/spv.varyingArrayIndirect.frag index e424e6e7..2ab5e205 100644 --- a/Test/spv.varyingArrayIndirect.frag +++ b/Test/spv.varyingArrayIndirect.frag @@ -1,21 +1,21 @@ -#version 130 +#version 140 uniform sampler2D texSampler2D; -varying vec4 color; -varying float alpha; +in vec4 color; +in float alpha; -varying vec4 gl_TexCoord[6]; +in vec4 TexCoord[6]; -varying vec4 userIn[2]; +in vec4 userIn[2]; uniform int a, b; void main() { - vec4 texColor = texture(texSampler2D, vec2(userIn[b] + gl_TexCoord[a] + gl_TexCoord[5])); + vec4 texColor = texture(texSampler2D, vec2(userIn[b] + TexCoord[a] + TexCoord[5])); texColor += color; texColor.a = alpha; - gl_FragColor = gl_TexCoord[0] + gl_TexCoord[b] + texColor + userIn[a]; + gl_FragColor = TexCoord[0] + TexCoord[b] + texColor + userIn[a]; } diff --git a/Test/spv.voidFunction.frag b/Test/spv.voidFunction.frag index 4767f7ab..6658ada2 100644 --- a/Test/spv.voidFunction.frag +++ b/Test/spv.voidFunction.frag @@ -1,7 +1,7 @@ -#version 120 +#version 140 uniform vec4 bigColor; -varying vec4 BaseColor; +in vec4 BaseColor; uniform float d; float bar = 2.0; diff --git a/Test/spv.while-continue-break.vert b/Test/spv.while-continue-break.vert index 751e265c..c81e8d28 100644 --- a/Test/spv.while-continue-break.vert +++ b/Test/spv.while-continue-break.vert @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es void main() { int i = 0; int A, B, C, D; diff --git a/Test/spv.while-simple.vert b/Test/spv.while-simple.vert index 701dc102..0f38325d 100644 --- a/Test/spv.while-simple.vert +++ b/Test/spv.while-simple.vert @@ -1,4 +1,4 @@ -#version 300 es +#version 310 es void main() { int i = 0; while (i<10) { diff --git a/Test/spv.whileLoop.frag b/Test/spv.whileLoop.frag index a9541f91..ef577213 100644 --- a/Test/spv.whileLoop.frag +++ b/Test/spv.whileLoop.frag @@ -1,7 +1,7 @@ -#version 110 +#version 140 uniform vec4 bigColor; -varying vec4 BaseColor; +in vec4 BaseColor; uniform float d; void main() diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index 7d952c65..73684938 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -1530,7 +1530,7 @@ extern bool PureOperatorBuiltins; // void TParseContext::nonOpBuiltInCheck(const TSourceLoc& loc, const TFunction& fnCandidate, TIntermAggregate& callNode) { - // Further maintainance of this function is deprecated, because the "correct" + // Further maintenance of this function is deprecated, because the "correct" // future-oriented design is to not have to do string compares on function names. // If PureOperatorBuiltins == true, then all built-ins should be mapped diff --git a/glslang/MachineIndependent/ShaderLang.cpp b/glslang/MachineIndependent/ShaderLang.cpp index 3a07691a..a2d7181e 100644 --- a/glslang/MachineIndependent/ShaderLang.cpp +++ b/glslang/MachineIndependent/ShaderLang.cpp @@ -111,7 +111,7 @@ enum EPrecisionClass { // A process-global symbol table per version per profile for built-ins common // to multiple stages (languages), and a process-global symbol table per version // per profile per stage for built-ins unique to each stage. They will be sparsely -// populated, so they will only only be generated as needed. +// populated, so they will only be generated as needed. // // Each has a different set of built-ins, and we want to preserve that from // compile to compile. @@ -306,7 +306,7 @@ void SetupBuiltinSymbolTable(int version, EProfile profile, int spv) glslang::ReleaseGlobalLock(); } -bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNotFirst, int defaultVersion, int& version, EProfile& profile) +bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNotFirst, int defaultVersion, int& version, EProfile& profile, int spv) { const int FirstProfileVersion = 150; bool correct = true; @@ -397,7 +397,24 @@ bool DeduceVersionProfile(TInfoSink& infoSink, EShLanguage stage, bool versionNo infoSink.info.message(EPrefixError, "#version: statement must appear first in es-profile shader; before comments or newlines"); } - // A metacheck on the condition of the compiler itself... + // Check for SPIR-V compatibility + if (spv > 0) { + if (profile == EEsProfile) { + if (version < 310) { + correct = false; + infoSink.info.message(EPrefixError, "#version: ES shaders for SPIR-V require version 310 or higher"); + version = 310; + } + } else { + if (version < 140) { + correct = false; + infoSink.info.message(EPrefixError, "#version: Desktop shaders for SPIR-V require version 140 or higher"); + version = 140; + } + } + } + + // A meta check on the condition of the compiler itself... switch (version) { // ES versions @@ -532,7 +549,9 @@ bool ProcessDeferred( version = defaultVersion; profile = defaultProfile; } - bool goodVersion = DeduceVersionProfile(compiler->infoSink, compiler->getLanguage(), versionNotFirst, defaultVersion, version, profile); + + int spv = (messages & EShMsgSpvRules) ? 100 : 0; + bool goodVersion = DeduceVersionProfile(compiler->infoSink, compiler->getLanguage(), versionNotFirst, defaultVersion, version, profile, spv); bool versionWillBeError = (versionNotFound || (profile == EEsProfile && version >= 300 && versionNotFirst)); bool warnVersionNotFirst = false; if (! versionWillBeError && versionNotFirstToken) { @@ -542,7 +561,6 @@ bool ProcessDeferred( versionWillBeError = true; } - int spv = (messages & EShMsgSpvRules) ? 100 : 0; intermediate.setVersion(version); intermediate.setProfile(profile); intermediate.setSpv(spv);