mirror of
https://github.com/KhronosGroup/glslang
synced 2024-09-19 20:29:54 +00:00
GLSL/SPV: Fix #1196: Require resources to have layout(binding=X).
This commit is contained in:
parent
2d9973de0e
commit
9c9c4e90df
@ -40,7 +40,6 @@ ERROR: 0:119: 'r8ui' : does not apply to signed integer images
|
|||||||
ERROR: 0:128: 'atomic_uint' : samplers and atomic_uints cannot be output parameters
|
ERROR: 0:128: 'atomic_uint' : samplers and atomic_uints cannot be output parameters
|
||||||
ERROR: 0:130: 'return' : type does not match, or is not convertible to, the function's return type
|
ERROR: 0:130: 'return' : type does not match, or is not convertible to, the function's return type
|
||||||
ERROR: 0:136: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: non_uniform_counter
|
ERROR: 0:136: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: non_uniform_counter
|
||||||
ERROR: 0:136: 'atomic_uint' : layout(binding=X) is required
|
|
||||||
ERROR: 0:141: 'atomic_uint' : atomic counters can only be highp
|
ERROR: 0:141: 'atomic_uint' : atomic counters can only be highp
|
||||||
ERROR: 0:141: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
ERROR: 0:141: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
||||||
ERROR: 0:143: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
ERROR: 0:143: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
||||||
@ -84,7 +83,7 @@ WARNING: 0:238: '#define' : names containing consecutive underscores are reserve
|
|||||||
ERROR: 0:244: 'gl_DeviceIndex' : required extension not requested: GL_EXT_device_group
|
ERROR: 0:244: 'gl_DeviceIndex' : required extension not requested: GL_EXT_device_group
|
||||||
ERROR: 0:245: 'gl_ViewIndex' : undeclared identifier
|
ERROR: 0:245: 'gl_ViewIndex' : undeclared identifier
|
||||||
ERROR: 0:255: 'gl_ViewIndex' : undeclared identifier
|
ERROR: 0:255: 'gl_ViewIndex' : undeclared identifier
|
||||||
ERROR: 83 compilation errors. No code generated.
|
ERROR: 82 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 310
|
Shader version: 310
|
||||||
|
@ -2,7 +2,6 @@ atomic_uint.frag
|
|||||||
ERROR: 0:10: 'atomic_uint' : samplers and atomic_uints cannot be output parameters
|
ERROR: 0:10: 'atomic_uint' : samplers and atomic_uints cannot be output parameters
|
||||||
ERROR: 0:12: 'return' : type does not match, or is not convertible to, the function's return type
|
ERROR: 0:12: 'return' : type does not match, or is not convertible to, the function's return type
|
||||||
ERROR: 0:18: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: non_uniform_counter
|
ERROR: 0:18: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: non_uniform_counter
|
||||||
ERROR: 0:18: 'atomic_uint' : layout(binding=X) is required
|
|
||||||
ERROR: 0:23: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
ERROR: 0:23: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
||||||
ERROR: 0:28: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( binding=0 offset=0) uniform atomic_uint' and a right operand of type 'layout( binding=0 offset=0) uniform atomic_uint' (or there is no acceptable conversion)
|
ERROR: 0:28: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( binding=0 offset=0) uniform atomic_uint' and a right operand of type 'layout( binding=0 offset=0) uniform atomic_uint' (or there is no acceptable conversion)
|
||||||
ERROR: 0:29: '-' : wrong operand type no operation '-' exists that takes an operand of type layout( binding=0 offset=0) uniform atomic_uint (or there is no acceptable conversion)
|
ERROR: 0:29: '-' : wrong operand type no operation '-' exists that takes an operand of type layout( binding=0 offset=0) uniform atomic_uint (or there is no acceptable conversion)
|
||||||
@ -10,14 +9,10 @@ ERROR: 0:31: '[]' : scalar integer expression required
|
|||||||
ERROR: 0:34: 'assign' : l-value required "counter" (can't modify a uniform)
|
ERROR: 0:34: 'assign' : l-value required "counter" (can't modify a uniform)
|
||||||
ERROR: 0:34: 'assign' : cannot convert from ' const int' to 'layout( binding=0 offset=0) uniform atomic_uint'
|
ERROR: 0:34: 'assign' : cannot convert from ' const int' to 'layout( binding=0 offset=0) uniform atomic_uint'
|
||||||
ERROR: 0:37: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: acin
|
ERROR: 0:37: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: acin
|
||||||
ERROR: 0:37: 'atomic_uint' : layout(binding=X) is required
|
|
||||||
ERROR: 0:38: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: acg
|
ERROR: 0:38: 'atomic_uint' : atomic_uints can only be used in uniform variables or function parameters: acg
|
||||||
ERROR: 0:38: 'atomic_uint' : layout(binding=X) is required
|
|
||||||
ERROR: 0:40: 'atomic_uint' : layout(binding=X) is required
|
|
||||||
ERROR: 0:46: 'atomic_uint' : layout(binding=X) is required
|
|
||||||
ERROR: 0:47: 'offset' : atomic counters sharing the same offset: 12
|
ERROR: 0:47: 'offset' : atomic counters sharing the same offset: 12
|
||||||
ERROR: 0:48: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
ERROR: 0:48: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
||||||
ERROR: 18 compilation errors. No code generated.
|
ERROR: 13 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 420
|
Shader version: 420
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
glspv.frag
|
glspv.frag
|
||||||
ERROR: 0:4: '#error' : GL_SPIRV is set ( correct , not an error )
|
ERROR: 0:4: '#error' : GL_SPIRV is set ( correct , not an error )
|
||||||
ERROR: 0:6: '#error' : GL_SPIR is 100
|
ERROR: 0:6: '#error' : GL_SPIR is 100
|
||||||
|
ERROR: 0:14: 'f' : non-opaque uniform variables need a layout(location=L)
|
||||||
ERROR: 0:21: 'noise1' : no matching overloaded function found
|
ERROR: 0:21: 'noise1' : no matching overloaded function found
|
||||||
ERROR: 0:22: 'noise2' : no matching overloaded function found
|
ERROR: 0:22: 'noise2' : no matching overloaded function found
|
||||||
ERROR: 0:23: 'noise3' : no matching overloaded function found
|
ERROR: 0:23: 'noise3' : no matching overloaded function found
|
||||||
ERROR: 0:24: 'noise4' : no matching overloaded function found
|
ERROR: 0:24: 'noise4' : no matching overloaded function found
|
||||||
ERROR: 0:27: 'input_attachment_index' : only allowed when using GLSL for Vulkan
|
ERROR: 0:27: 'atomic_uint' : layout(binding=X) is required
|
||||||
ERROR: 0:27: '' : syntax error, unexpected IDENTIFIER, expecting LEFT_BRACE or COMMA or SEMICOLON
|
ERROR: 0:28: 'input_attachment_index' : only allowed when using GLSL for Vulkan
|
||||||
ERROR: 8 compilation errors. No code generated.
|
ERROR: 0:28: '' : syntax error, unexpected IDENTIFIER, expecting LEFT_BRACE or COMMA or SEMICOLON
|
||||||
|
ERROR: 10 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
SPIR-V is not generated for failed compile or link
|
SPIR-V is not generated for failed compile or link
|
||||||
|
@ -20,12 +20,12 @@ gl_FragCoord origin is upper left
|
|||||||
0:7 Sequence
|
0:7 Sequence
|
||||||
0:7 Branch: Return with expression
|
0:7 Branch: Return with expression
|
||||||
0:7 texture ( global highp 4-component vector of float)
|
0:7 texture ( global highp 4-component vector of float)
|
||||||
0:7 's2D' ( uniform highp sampler2D)
|
0:7 's2D' (layout( binding=1) uniform highp sampler2D)
|
||||||
0:7 Constant:
|
0:7 Constant:
|
||||||
0:7 0.500000
|
0:7 0.500000
|
||||||
0:7 0.500000
|
0:7 0.500000
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 's2D' ( uniform highp sampler2D)
|
0:? 's2D' (layout( binding=1) uniform highp sampler2D)
|
||||||
|
|
||||||
|
|
||||||
Linked fragment stage:
|
Linked fragment stage:
|
||||||
@ -45,12 +45,12 @@ gl_FragCoord origin is upper left
|
|||||||
0:7 Sequence
|
0:7 Sequence
|
||||||
0:7 Branch: Return with expression
|
0:7 Branch: Return with expression
|
||||||
0:7 texture ( global highp 4-component vector of float)
|
0:7 texture ( global highp 4-component vector of float)
|
||||||
0:7 's2D' ( uniform highp sampler2D)
|
0:7 's2D' (layout( binding=1) uniform highp sampler2D)
|
||||||
0:7 Constant:
|
0:7 Constant:
|
||||||
0:7 0.500000
|
0:7 0.500000
|
||||||
0:7 0.500000
|
0:7 0.500000
|
||||||
0:? Linker Objects
|
0:? Linker Objects
|
||||||
0:? 'color' ( out highp 4-component vector of float)
|
0:? 'color' ( out highp 4-component vector of float)
|
||||||
0:? 's2D' ( uniform highp sampler2D)
|
0:? 's2D' (layout( binding=1) uniform highp sampler2D)
|
||||||
|
|
||||||
SPIR-V is not generated for failed compile or link
|
SPIR-V is not generated for failed compile or link
|
||||||
|
@ -19,7 +19,6 @@ ERROR: 0:85: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCount
|
|||||||
ERROR: 0:87: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
ERROR: 0:87: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
||||||
ERROR: 0:89: 'binding' : atomic_uint binding is too large
|
ERROR: 0:89: 'binding' : atomic_uint binding is too large
|
||||||
ERROR: 0:91: 'bar' : redefinition
|
ERROR: 0:91: 'bar' : redefinition
|
||||||
ERROR: 0:92: 'atomic_uint' : layout(binding=X) is required
|
|
||||||
ERROR: 0:94: 'a2' : redefinition
|
ERROR: 0:94: 'a2' : redefinition
|
||||||
ERROR: 0:95: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
ERROR: 0:95: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
||||||
ERROR: 0:96: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
ERROR: 0:96: 'binding' : atomic_uint binding is too large; see gl_MaxAtomicCounterBindings
|
||||||
@ -32,7 +31,7 @@ ERROR: 0:134: '' : function does not return a value: funcA
|
|||||||
ERROR: 0:136: '' : function does not return a value: funcB
|
ERROR: 0:136: '' : function does not return a value: funcB
|
||||||
ERROR: 0:153: '' : function does not return a value: func3
|
ERROR: 0:153: '' : function does not return a value: func3
|
||||||
ERROR: 0:170: 'coherent' : argument cannot drop memory qualifier when passed to formal parameter
|
ERROR: 0:170: 'coherent' : argument cannot drop memory qualifier when passed to formal parameter
|
||||||
ERROR: 33 compilation errors. No code generated.
|
ERROR: 32 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
Shader version: 430
|
Shader version: 430
|
||||||
|
@ -11,6 +11,7 @@ spv.debugInfo.frag
|
|||||||
1: String "spv.debugInfo.frag"
|
1: String "spv.debugInfo.frag"
|
||||||
Source GLSL 450 1 "// OpModuleProcessed no-storage-format
|
Source GLSL 450 1 "// OpModuleProcessed no-storage-format
|
||||||
// OpModuleProcessed resource-set-binding 3
|
// OpModuleProcessed resource-set-binding 3
|
||||||
|
// OpModuleProcessed auto-map-bindings
|
||||||
// OpModuleProcessed auto-map-locations
|
// OpModuleProcessed auto-map-locations
|
||||||
// OpModuleProcessed client opengl100
|
// OpModuleProcessed client opengl100
|
||||||
// OpModuleProcessed target-env opengl
|
// OpModuleProcessed target-env opengl
|
||||||
@ -95,7 +96,9 @@ void main()
|
|||||||
MemberDecorate 54(ubuf) 0 Offset 0
|
MemberDecorate 54(ubuf) 0 Offset 0
|
||||||
Decorate 54(ubuf) Block
|
Decorate 54(ubuf) Block
|
||||||
Decorate 56 DescriptorSet 3
|
Decorate 56 DescriptorSet 3
|
||||||
|
Decorate 56 Binding 0
|
||||||
Decorate 69(s2d) DescriptorSet 3
|
Decorate 69(s2d) DescriptorSet 3
|
||||||
|
Decorate 69(s2d) Binding 1
|
||||||
3: TypeVoid
|
3: TypeVoid
|
||||||
4: TypeFunction 3
|
4: TypeFunction 3
|
||||||
7: TypeInt 32 1
|
7: TypeInt 32 1
|
||||||
|
@ -41,19 +41,25 @@ spv.glsl.register.noautoassign.frag
|
|||||||
Name 137 "FragColor"
|
Name 137 "FragColor"
|
||||||
Name 141 "g_tTex_unused3"
|
Name 141 "g_tTex_unused3"
|
||||||
Decorate 17(g_tTex1) DescriptorSet 0
|
Decorate 17(g_tTex1) DescriptorSet 0
|
||||||
Decorate 17(g_tTex1) Binding 11
|
Decorate 17(g_tTex1) Binding 17
|
||||||
Decorate 21(g_sSamp1) DescriptorSet 0
|
Decorate 21(g_sSamp1) DescriptorSet 0
|
||||||
Decorate 21(g_sSamp1) Binding 5
|
Decorate 21(g_sSamp1) Binding 5
|
||||||
Decorate 27(g_tTex2) DescriptorSet 0
|
Decorate 27(g_tTex2) DescriptorSet 0
|
||||||
|
Decorate 27(g_tTex2) Binding 18
|
||||||
Decorate 29(g_sSamp2) DescriptorSet 0
|
Decorate 29(g_sSamp2) DescriptorSet 0
|
||||||
|
Decorate 29(g_sSamp2) Binding 6
|
||||||
Decorate 39(g_tTex3) DescriptorSet 0
|
Decorate 39(g_tTex3) DescriptorSet 0
|
||||||
Decorate 39(g_tTex3) Binding 13
|
Decorate 39(g_tTex3) Binding 19
|
||||||
Decorate 46(g_sSamp3) DescriptorSet 0
|
Decorate 46(g_sSamp3) DescriptorSet 0
|
||||||
Decorate 46(g_sSamp3) Binding 7
|
Decorate 46(g_sSamp3) Binding 7
|
||||||
Decorate 64(g_tTex4) DescriptorSet 0
|
Decorate 64(g_tTex4) DescriptorSet 0
|
||||||
|
Decorate 64(g_tTex4) Binding 20
|
||||||
Decorate 69(g_sSamp4) DescriptorSet 0
|
Decorate 69(g_sSamp4) DescriptorSet 0
|
||||||
|
Decorate 69(g_sSamp4) Binding 8
|
||||||
Decorate 84(g_tTex5) DescriptorSet 0
|
Decorate 84(g_tTex5) DescriptorSet 0
|
||||||
|
Decorate 84(g_tTex5) Binding 21
|
||||||
Decorate 86(g_sSamp5) DescriptorSet 0
|
Decorate 86(g_sSamp5) DescriptorSet 0
|
||||||
|
Decorate 86(g_sSamp5) Binding 9
|
||||||
MemberDecorate 93(MyStruct_t) 0 Offset 0
|
MemberDecorate 93(MyStruct_t) 0 Offset 0
|
||||||
MemberDecorate 93(MyStruct_t) 1 Offset 4
|
MemberDecorate 93(MyStruct_t) 1 Offset 4
|
||||||
MemberDecorate 93(MyStruct_t) 2 Offset 16
|
MemberDecorate 93(MyStruct_t) 2 Offset 16
|
||||||
@ -65,13 +71,16 @@ spv.glsl.register.noautoassign.frag
|
|||||||
Decorate 97 DescriptorSet 0
|
Decorate 97 DescriptorSet 0
|
||||||
Decorate 97 Binding 19
|
Decorate 97 Binding 19
|
||||||
Decorate 119(g_tTex_unused1) DescriptorSet 0
|
Decorate 119(g_tTex_unused1) DescriptorSet 0
|
||||||
Decorate 119(g_tTex_unused1) Binding 10
|
Decorate 119(g_tTex_unused1) Binding 22
|
||||||
Decorate 121(g_sSamp_unused1) DescriptorSet 0
|
Decorate 121(g_sSamp_unused1) DescriptorSet 0
|
||||||
|
Decorate 121(g_sSamp_unused1) Binding 10
|
||||||
Decorate 126(g_tTex_unused2) DescriptorSet 0
|
Decorate 126(g_tTex_unused2) DescriptorSet 0
|
||||||
Decorate 126(g_tTex_unused2) Binding 12
|
Decorate 126(g_tTex_unused2) Binding 23
|
||||||
Decorate 128(g_sSamp_unused2) DescriptorSet 0
|
Decorate 128(g_sSamp_unused2) DescriptorSet 0
|
||||||
|
Decorate 128(g_sSamp_unused2) Binding 11
|
||||||
Decorate 137(FragColor) Location 0
|
Decorate 137(FragColor) Location 0
|
||||||
Decorate 141(g_tTex_unused3) DescriptorSet 0
|
Decorate 141(g_tTex_unused3) DescriptorSet 0
|
||||||
|
Decorate 141(g_tTex_unused3) Binding 24
|
||||||
2: TypeVoid
|
2: TypeVoid
|
||||||
3: TypeFunction 2
|
3: TypeFunction 2
|
||||||
6: TypeFloat 32
|
6: TypeFloat 32
|
||||||
|
@ -1,4 +1,11 @@
|
|||||||
vulkan.frag
|
vulkan.frag
|
||||||
|
ERROR: 0:3: 'binding' : sampler/texture/image requires layout(binding=X)
|
||||||
|
ERROR: 0:4: 'binding' : sampler/texture/image requires layout(binding=X)
|
||||||
|
ERROR: 0:5: 'binding' : sampler/texture/image requires layout(binding=X)
|
||||||
|
ERROR: 0:6: 'binding' : sampler/texture/image requires layout(binding=X)
|
||||||
|
ERROR: 0:8: 'binding' : sampler/texture/image requires layout(binding=X)
|
||||||
|
ERROR: 0:9: 'binding' : sampler/texture/image requires layout(binding=X)
|
||||||
|
ERROR: 0:10: 'binding' : sampler/texture/image requires layout(binding=X)
|
||||||
ERROR: 0:14: 'sampler2D' : sampler-constructor requires two arguments
|
ERROR: 0:14: 'sampler2D' : sampler-constructor requires two arguments
|
||||||
ERROR: 0:15: 'sampler2D' : sampler-constructor first argument must be a scalar textureXXX type
|
ERROR: 0:15: 'sampler2D' : sampler-constructor first argument must be a scalar textureXXX type
|
||||||
ERROR: 0:16: 'sampler2D' : sampler-constructor first argument must be a scalar textureXXX type
|
ERROR: 0:16: 'sampler2D' : sampler-constructor first argument must be a scalar textureXXX type
|
||||||
@ -14,13 +21,19 @@ ERROR: 0:28: 'sampler2D' : sampler/image types can only be used in uniform varia
|
|||||||
ERROR: 0:29: 'sampler3D' : sampler-constructor cannot make an array of samplers
|
ERROR: 0:29: 'sampler3D' : sampler-constructor cannot make an array of samplers
|
||||||
ERROR: 0:29: 'sampler3D' : sampler/image types can only be used in uniform variables or function parameters: s3d
|
ERROR: 0:29: 'sampler3D' : sampler/image types can only be used in uniform variables or function parameters: s3d
|
||||||
ERROR: 0:29: '=' : cannot convert from ' const float' to ' global 4-element array of highp sampler3D'
|
ERROR: 0:29: '=' : cannot convert from ' const float' to ' global 4-element array of highp sampler3D'
|
||||||
|
ERROR: 0:31: 'location' : SPIR-V requires location for user input/output
|
||||||
ERROR: 0:39: 'push_constant' : can only be used with a uniform
|
ERROR: 0:39: 'push_constant' : can only be used with a uniform
|
||||||
ERROR: 0:43: 'non-opaque uniforms outside a block' : not allowed when using GLSL for Vulkan
|
ERROR: 0:43: 'non-opaque uniforms outside a block' : not allowed when using GLSL for Vulkan
|
||||||
ERROR: 0:43: 'push_constant' : can only be used with a block
|
ERROR: 0:43: 'push_constant' : can only be used with a block
|
||||||
ERROR: 0:45: 'push_constant' : cannot declare a default, can only be used on a block
|
ERROR: 0:45: 'push_constant' : cannot declare a default, can only be used on a block
|
||||||
|
ERROR: 0:51: 'binding' : sampler/texture/image requires layout(binding=X)
|
||||||
|
ERROR: 0:52: 'binding' : sampler/texture/image requires layout(binding=X)
|
||||||
ERROR: 0:52: 'input_attachment_index' : can only be used with a subpass
|
ERROR: 0:52: 'input_attachment_index' : can only be used with a subpass
|
||||||
|
ERROR: 0:53: 'binding' : sampler/texture/image requires layout(binding=X)
|
||||||
ERROR: 0:53: 'input_attachment_index' : can only be used with a subpass
|
ERROR: 0:53: 'input_attachment_index' : can only be used with a subpass
|
||||||
|
ERROR: 0:54: 'binding' : sampler/texture/image requires layout(binding=X)
|
||||||
ERROR: 0:54: 'subpass' : requires an input_attachment_index layout qualifier
|
ERROR: 0:54: 'subpass' : requires an input_attachment_index layout qualifier
|
||||||
|
ERROR: 0:55: 'binding' : sampler/texture/image requires layout(binding=X)
|
||||||
ERROR: 0:60: 'subpassLoadMS' : no matching overloaded function found
|
ERROR: 0:60: 'subpassLoadMS' : no matching overloaded function found
|
||||||
ERROR: 0:61: 'subpassLoad' : no matching overloaded function found
|
ERROR: 0:61: 'subpassLoad' : no matching overloaded function found
|
||||||
ERROR: 0:63: 'subpassLoadMS' : no matching overloaded function found
|
ERROR: 0:63: 'subpassLoadMS' : no matching overloaded function found
|
||||||
@ -43,7 +56,7 @@ ERROR: 0:101: 'noise1' : no matching overloaded function found
|
|||||||
ERROR: 0:102: 'noise2' : no matching overloaded function found
|
ERROR: 0:102: 'noise2' : no matching overloaded function found
|
||||||
ERROR: 0:103: 'noise3' : no matching overloaded function found
|
ERROR: 0:103: 'noise3' : no matching overloaded function found
|
||||||
ERROR: 0:104: 'noise4' : no matching overloaded function found
|
ERROR: 0:104: 'noise4' : no matching overloaded function found
|
||||||
ERROR: 42 compilation errors. No code generated.
|
ERROR: 55 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
ERROR: Linking fragment stage: Only one push_constant block is allowed per stage
|
ERROR: Linking fragment stage: Only one push_constant block is allowed per stage
|
||||||
|
@ -1,12 +1,20 @@
|
|||||||
vulkan.vert
|
vulkan.vert
|
||||||
ERROR: 0:3: 'subpass input' : not supported in this stage: vertex
|
ERROR: 0:3: 'subpass input' : not supported in this stage: vertex
|
||||||
|
ERROR: 0:3: 'binding' : sampler/texture/image requires layout(binding=X)
|
||||||
ERROR: 0:4: 'subpass input' : not supported in this stage: vertex
|
ERROR: 0:4: 'subpass input' : not supported in this stage: vertex
|
||||||
|
ERROR: 0:4: 'binding' : sampler/texture/image requires layout(binding=X)
|
||||||
ERROR: 0:5: 'subpass input' : not supported in this stage: vertex
|
ERROR: 0:5: 'subpass input' : not supported in this stage: vertex
|
||||||
|
ERROR: 0:5: 'binding' : sampler/texture/image requires layout(binding=X)
|
||||||
ERROR: 0:6: 'subpass input' : not supported in this stage: vertex
|
ERROR: 0:6: 'subpass input' : not supported in this stage: vertex
|
||||||
|
ERROR: 0:6: 'binding' : sampler/texture/image requires layout(binding=X)
|
||||||
ERROR: 0:7: 'subpass input' : not supported in this stage: vertex
|
ERROR: 0:7: 'subpass input' : not supported in this stage: vertex
|
||||||
|
ERROR: 0:7: 'binding' : sampler/texture/image requires layout(binding=X)
|
||||||
ERROR: 0:8: 'subpass input' : not supported in this stage: vertex
|
ERROR: 0:8: 'subpass input' : not supported in this stage: vertex
|
||||||
|
ERROR: 0:8: 'binding' : sampler/texture/image requires layout(binding=X)
|
||||||
|
ERROR: 0:10: 'location' : SPIR-V requires location for user input/output
|
||||||
ERROR: 0:12: 'constant_id' : can only be applied to a scalar
|
ERROR: 0:12: 'constant_id' : can only be applied to a scalar
|
||||||
ERROR: 0:13: 'constant_id' : specialization-constant id already used
|
ERROR: 0:13: 'constant_id' : specialization-constant id already used
|
||||||
|
ERROR: 0:13: 'binding' : sampler/texture/image requires layout(binding=X)
|
||||||
ERROR: 0:13: 'constant_id' : can only be applied to 'const'-qualified scalar
|
ERROR: 0:13: 'constant_id' : can only be applied to 'const'-qualified scalar
|
||||||
ERROR: 0:13: 'constant_id' : cannot be applied to this type
|
ERROR: 0:13: 'constant_id' : cannot be applied to this type
|
||||||
ERROR: 0:14: 'constant_id' : specialization-constant id is too large
|
ERROR: 0:14: 'constant_id' : specialization-constant id is too large
|
||||||
@ -26,7 +34,9 @@ ERROR: 0:49: '[]' : only outermost dimension of an array of arrays can be a spec
|
|||||||
ERROR: 0:50: '[]' : only outermost dimension of an array of arrays can be a specialization constant
|
ERROR: 0:50: '[]' : only outermost dimension of an array of arrays can be a specialization constant
|
||||||
ERROR: 0:51: '[]' : only outermost dimension of an array of arrays can be a specialization constant
|
ERROR: 0:51: '[]' : only outermost dimension of an array of arrays can be a specialization constant
|
||||||
ERROR: 0:54: '[]' : only outermost dimension of an array of arrays can be a specialization constant
|
ERROR: 0:54: '[]' : only outermost dimension of an array of arrays can be a specialization constant
|
||||||
ERROR: 27 compilation errors. No code generated.
|
ERROR: 0:54: 'location' : SPIR-V requires location for user input/output
|
||||||
|
ERROR: 0:58: 'location' : SPIR-V requires location for user input/output
|
||||||
|
ERROR: 37 compilation errors. No code generated.
|
||||||
|
|
||||||
|
|
||||||
SPIR-V is not generated for failed compile or link
|
SPIR-V is not generated for failed compile or link
|
||||||
|
@ -13,8 +13,8 @@ void main()
|
|||||||
|
|
||||||
uniform float f; // ERROR, no location
|
uniform float f; // ERROR, no location
|
||||||
layout(location = 2) uniform float g;
|
layout(location = 2) uniform float g;
|
||||||
uniform sampler2D s1;
|
uniform sampler2D s1; // ERROR, no binding
|
||||||
layout(location = 3) uniform sampler2D s2;
|
layout(location = 3) uniform sampler2D s2; // ERROR, no binding
|
||||||
|
|
||||||
void noise()
|
void noise()
|
||||||
{
|
{
|
||||||
@ -24,4 +24,5 @@ void noise()
|
|||||||
noise4(1);
|
noise4(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uniform atomic_uint atomic; // ERROR, no binding
|
||||||
layout(input_attachment_index = 1) uniform subpassInput sub; // ERROR, no inputs
|
layout(input_attachment_index = 1) uniform subpassInput sub; // ERROR, no inputs
|
||||||
|
@ -5,8 +5,8 @@ layout(push_constant) uniform Material { int a; } mat; // ERROR, can'
|
|||||||
layout(set = 0, binding = 0, std140) uniform Bt1 { int a; } bt1;
|
layout(set = 0, binding = 0, std140) uniform Bt1 { int a; } bt1;
|
||||||
layout(set = 1, binding = 0, std140) uniform Bt2 { int a; } bt2; // ERROR, set has to be 0
|
layout(set = 1, binding = 0, std140) uniform Bt2 { int a; } bt2; // ERROR, set has to be 0
|
||||||
|
|
||||||
layout(shared) uniform Bt3 { int a; } bt3; // ERROR, no shared
|
layout(shared) uniform Bt3 { int a; } bt3; // ERROR, no shared, no binding
|
||||||
layout(packed) uniform Bt4 { int a; } bt4; // ERROR, no shared
|
layout(packed) uniform Bt4 { int a; } bt4; // ERROR, no shared, no binding
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#version 450
|
#version 450
|
||||||
|
|
||||||
uniform sampler2D s2D;
|
layout(binding=1) uniform sampler2D s2D;
|
||||||
|
|
||||||
vec4 getColor()
|
vec4 getColor()
|
||||||
{
|
{
|
||||||
|
@ -126,7 +126,7 @@ diff -b $BASEDIR/spv.looseUniformNoLoc.vert.out $TARGETDIR/spv.looseUniformNoLoc
|
|||||||
# Testing debug information
|
# Testing debug information
|
||||||
#
|
#
|
||||||
echo Testing SPV Debug Information
|
echo Testing SPV Debug Information
|
||||||
$EXE -g --relaxed-errors --suppress-warnings --aml --hlsl-offsets --nsf \
|
$EXE -g --relaxed-errors --suppress-warnings --aml --amb --hlsl-offsets --nsf \
|
||||||
-G -H spv.debugInfo.frag --rsb frag 3 > $TARGETDIR/spv.debugInfo.frag.out
|
-G -H spv.debugInfo.frag --rsb frag 3 > $TARGETDIR/spv.debugInfo.frag.out
|
||||||
diff -b $BASEDIR/spv.debugInfo.frag.out $TARGETDIR/spv.debugInfo.frag.out || HASERROR=1
|
diff -b $BASEDIR/spv.debugInfo.frag.out $TARGETDIR/spv.debugInfo.frag.out || HASERROR=1
|
||||||
$EXE -g -D -Od -e newMain -g --amb --aml --fua --hlsl-iomap --nsf --sib 1 --ssb 2 --sbb 3 --stb 4 --suavb 5 --sub 6 \
|
$EXE -g -D -Od -e newMain -g --amb --aml --fua --hlsl-iomap --nsf --sib 1 --ssb 2 --sbb 3 --stb 4 --suavb 5 --sub 6 \
|
||||||
|
@ -1,23 +1,23 @@
|
|||||||
#version 450
|
#version 450
|
||||||
|
|
||||||
uniform layout(binding=0) sampler g_sSamp1;
|
uniform layout(binding=0) sampler g_sSamp1;
|
||||||
uniform sampler g_sSamp2;
|
uniform layout(binding=1) sampler g_sSamp2;
|
||||||
uniform layout(binding=2) sampler g_sSamp3[2];
|
uniform layout(binding=2) sampler g_sSamp3[2];
|
||||||
uniform sampler g_sSamp4[3];
|
uniform layout(binding=3) sampler g_sSamp4[3];
|
||||||
uniform sampler g_sSamp5;
|
uniform layout(binding=4) sampler g_sSamp5;
|
||||||
|
|
||||||
uniform sampler g_sSamp_unused1;
|
uniform layout(binding=5) sampler g_sSamp_unused1;
|
||||||
uniform sampler g_sSamp_unused2;
|
uniform layout(binding=6) sampler g_sSamp_unused2;
|
||||||
|
|
||||||
uniform layout(binding=1) texture1D g_tTex1;
|
uniform layout(binding=7) texture1D g_tTex1;
|
||||||
uniform texture1D g_tTex2;
|
uniform layout(binding=8) texture1D g_tTex2;
|
||||||
uniform layout(binding=3) texture1D g_tTex3[2];
|
uniform layout(binding=9) texture1D g_tTex3[2];
|
||||||
uniform texture1D g_tTex4[3];
|
uniform layout(binding=10) texture1D g_tTex4[3];
|
||||||
uniform texture1D g_tTex5;
|
uniform layout(binding=11) texture1D g_tTex5;
|
||||||
|
|
||||||
uniform layout(binding=0) texture1D g_tTex_unused1;
|
uniform layout(binding=12) texture1D g_tTex_unused1;
|
||||||
uniform layout(binding=2) texture1D g_tTex_unused2;
|
uniform layout(binding=13) texture1D g_tTex_unused2;
|
||||||
uniform texture1D g_tTex_unused3;
|
uniform layout(binding=14) texture1D g_tTex_unused3;
|
||||||
|
|
||||||
struct MyStruct_t {
|
struct MyStruct_t {
|
||||||
int a;
|
int a;
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
layout(constant_id = 3) const int a = 2;
|
layout(constant_id = 3) const int a = 2;
|
||||||
layout(location = 2) uniform float f;
|
layout(location = 2) uniform float f;
|
||||||
layout(location = 4) uniform sampler2D s1;
|
layout(location = 4, binding = 1) uniform sampler2D s1;
|
||||||
uniform sampler2D s2;
|
layout(binding = 2) uniform sampler2D s2;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#version 450
|
#version 450
|
||||||
|
|
||||||
uniform sampler s;
|
uniform sampler s; // ERROR, no binding
|
||||||
uniform sampler sA[4];
|
uniform sampler sA[4]; // ERROR, no binding
|
||||||
uniform texture2D t2d;
|
uniform texture2D t2d; // ERROR, no binding
|
||||||
uniform texture3D t3d[4];
|
uniform texture3D t3d[4]; // ERROR, no binding
|
||||||
int i;
|
int i;
|
||||||
uniform samplerShadow sShadow;
|
uniform samplerShadow sShadow;
|
||||||
uniform texture3D t3d5[5];
|
uniform texture3D t3d5[5];
|
||||||
@ -28,7 +28,7 @@ void badConst()
|
|||||||
sampler2D s2D = sampler2D(t2d, s); // ERROR, no sampler constructor
|
sampler2D s2D = sampler2D(t2d, s); // ERROR, no sampler constructor
|
||||||
sampler3D s3d[4] = sampler3D[4](t3d, sA[2]); // ERROR, no sampler constructor
|
sampler3D s3d[4] = sampler3D[4](t3d, sA[2]); // ERROR, no sampler constructor
|
||||||
|
|
||||||
out vec4 color;
|
out vec4 color; // ERROR, no location
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
|
@ -4663,12 +4663,23 @@ void TParseContext::layoutTypeCheck(const TSourceLoc& loc, const TType& type)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else if (!intermediate.getAutoMapBindings()) {
|
||||||
|
// some types require bindings
|
||||||
|
|
||||||
// atomic_uint
|
// atomic_uint
|
||||||
if (type.getBasicType() == EbtAtomicUint) {
|
if (type.getBasicType() == EbtAtomicUint)
|
||||||
if (! type.getQualifier().hasBinding())
|
|
||||||
error(loc, "layout(binding=X) is required", "atomic_uint", "");
|
error(loc, "layout(binding=X) is required", "atomic_uint", "");
|
||||||
|
|
||||||
|
// SPIR-V
|
||||||
|
if (spvVersion.spv > 0) {
|
||||||
|
if (qualifier.isUniformOrBuffer()) {
|
||||||
|
if (type.getBasicType() == EbtBlock && !qualifier.layoutPushConstant &&
|
||||||
|
!qualifier.layoutAttachment)
|
||||||
|
error(loc, "uniform/buffer blocks require layout(binding=X)", "binding", "");
|
||||||
|
else if (spvVersion.vulkan > 0 && type.getBasicType() == EbtSampler)
|
||||||
|
error(loc, "sampler/texture/image requires layout(binding=X)", "binding", "");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// "The offset qualifier can only be used on block members of blocks..."
|
// "The offset qualifier can only be used on block members of blocks..."
|
||||||
|
@ -67,7 +67,7 @@ TEST_P(HlslCompileTest, FromFile)
|
|||||||
{
|
{
|
||||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName,
|
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName,
|
||||||
Source::HLSL, Semantics::Vulkan,
|
Source::HLSL, Semantics::Vulkan,
|
||||||
Target::BothASTAndSpv, GetParam().entryPoint);
|
Target::BothASTAndSpv, true, GetParam().entryPoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_P(HlslCompileAndFlattenTest, FromFile)
|
TEST_P(HlslCompileAndFlattenTest, FromFile)
|
||||||
@ -83,7 +83,7 @@ TEST_P(HlslLegalizeTest, FromFile)
|
|||||||
{
|
{
|
||||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName,
|
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName,
|
||||||
Source::HLSL, Semantics::Vulkan,
|
Source::HLSL, Semantics::Vulkan,
|
||||||
Target::Spv, GetParam().entryPoint,
|
Target::Spv, true, GetParam().entryPoint,
|
||||||
"/baseLegalResults/", false);
|
"/baseLegalResults/", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ TEST_P(VulkanSemantics, FromFile)
|
|||||||
{
|
{
|
||||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
||||||
Source::GLSL, Semantics::Vulkan,
|
Source::GLSL, Semantics::Vulkan,
|
||||||
Target::Spv);
|
Target::Spv, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// GLSL-level Vulkan semantics test. Expected to error out before generating
|
// GLSL-level Vulkan semantics test. Expected to error out before generating
|
||||||
@ -110,7 +110,7 @@ TEST_P(OpenGLSemantics, FromFile)
|
|||||||
{
|
{
|
||||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
||||||
Source::GLSL, Semantics::OpenGL,
|
Source::GLSL, Semantics::OpenGL,
|
||||||
Target::Spv);
|
Target::Spv, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// GLSL-level Vulkan semantics test that need to see the AST for validation.
|
// GLSL-level Vulkan semantics test that need to see the AST for validation.
|
||||||
|
@ -199,12 +199,16 @@ public:
|
|||||||
const std::string& entryPointName, EShMessages controls,
|
const std::string& entryPointName, EShMessages controls,
|
||||||
bool flattenUniformArrays = false,
|
bool flattenUniformArrays = false,
|
||||||
EShTextureSamplerTransformMode texSampTransMode = EShTexSampTransKeep,
|
EShTextureSamplerTransformMode texSampTransMode = EShTexSampTransKeep,
|
||||||
bool disableOptimizer = true)
|
bool disableOptimizer = true,
|
||||||
|
bool automap = true)
|
||||||
{
|
{
|
||||||
const EShLanguage kind = GetShaderStage(GetSuffix(shaderName));
|
const EShLanguage kind = GetShaderStage(GetSuffix(shaderName));
|
||||||
|
|
||||||
glslang::TShader shader(kind);
|
glslang::TShader shader(kind);
|
||||||
|
if (automap) {
|
||||||
shader.setAutoMapLocations(true);
|
shader.setAutoMapLocations(true);
|
||||||
|
shader.setAutoMapBindings(true);
|
||||||
|
}
|
||||||
shader.setTextureSamplerTransformMode(texSampTransMode);
|
shader.setTextureSamplerTransformMode(texSampTransMode);
|
||||||
shader.setFlattenUniformArrays(flattenUniformArrays);
|
shader.setFlattenUniformArrays(flattenUniformArrays);
|
||||||
|
|
||||||
@ -302,6 +306,7 @@ public:
|
|||||||
const EShLanguage kind = GetShaderStage(GetSuffix(shaderName));
|
const EShLanguage kind = GetShaderStage(GetSuffix(shaderName));
|
||||||
|
|
||||||
glslang::TShader shader(kind);
|
glslang::TShader shader(kind);
|
||||||
|
shader.setAutoMapBindings(true);
|
||||||
shader.setAutoMapLocations(true);
|
shader.setAutoMapLocations(true);
|
||||||
|
|
||||||
bool success = compile(&shader, code, entryPointName, controls);
|
bool success = compile(&shader, code, entryPointName, controls);
|
||||||
@ -384,6 +389,7 @@ public:
|
|||||||
Source source,
|
Source source,
|
||||||
Semantics semantics,
|
Semantics semantics,
|
||||||
Target target,
|
Target target,
|
||||||
|
bool automap = true,
|
||||||
const std::string& entryPointName="",
|
const std::string& entryPointName="",
|
||||||
const std::string& baseDir="/baseResults/",
|
const std::string& baseDir="/baseResults/",
|
||||||
const bool disableOptimizer = true)
|
const bool disableOptimizer = true)
|
||||||
@ -397,7 +403,8 @@ public:
|
|||||||
tryLoadFile(expectedOutputFname, "expected output", &expectedOutput);
|
tryLoadFile(expectedOutputFname, "expected output", &expectedOutput);
|
||||||
|
|
||||||
const EShMessages controls = DeriveOptions(source, semantics, target);
|
const EShMessages controls = DeriveOptions(source, semantics, target);
|
||||||
GlslangResult result = compileAndLink(testName, input, entryPointName, controls, false, EShTexSampTransKeep, disableOptimizer);
|
GlslangResult result = compileAndLink(testName, input, entryPointName, controls, false, EShTexSampTransKeep,
|
||||||
|
disableOptimizer, automap);
|
||||||
|
|
||||||
// Generate the hybrid output in the way of glslangValidator.
|
// Generate the hybrid output in the way of glslangValidator.
|
||||||
std::ostringstream stream;
|
std::ostringstream stream;
|
||||||
@ -592,7 +599,8 @@ public:
|
|||||||
tryLoadFile(expectedOutputFname, "expected output", &expectedOutput);
|
tryLoadFile(expectedOutputFname, "expected output", &expectedOutput);
|
||||||
|
|
||||||
const EShMessages controls = DeriveOptions(source, semantics, target);
|
const EShMessages controls = DeriveOptions(source, semantics, target);
|
||||||
GlslangResult result = compileAndLink(testName, input, entryPointName, controls, false, EShTexSampTransUpgradeTextureRemoveSampler);
|
GlslangResult result = compileAndLink(testName, input, entryPointName, controls, false,
|
||||||
|
EShTexSampTransUpgradeTextureRemoveSampler);
|
||||||
|
|
||||||
// Generate the hybrid output in the way of glslangValidator.
|
// Generate the hybrid output in the way of glslangValidator.
|
||||||
std::ostringstream stream;
|
std::ostringstream stream;
|
||||||
|
Loading…
Reference in New Issue
Block a user