Fix #1759: Check for specialization constants when literals required.
This commit is contained in:
@@ -17,6 +17,7 @@ ERROR: 0:47: 'gl_ClipDistance array size' : must be less than or equal to gl_Max
|
||||
ERROR: 0:51: 'start' : undeclared identifier
|
||||
ERROR: 0:51: '' : constant expression required
|
||||
ERROR: 0:51: 'layout-id value' : scalar integer expression required
|
||||
ERROR: 0:51: 'location' : needs a literal integer
|
||||
ERROR: 0:53: 'input block' : not supported in this stage: vertex
|
||||
ERROR: 0:54: 'location on block member' : not supported for this version or the enabled extensions
|
||||
ERROR: 0:57: 'input block' : not supported in this stage: vertex
|
||||
@@ -63,7 +64,7 @@ ERROR: 0:221: 'textureQueryLevels' : no matching overloaded function found
|
||||
ERROR: 0:221: 'assign' : cannot convert from ' const float' to ' temp int'
|
||||
ERROR: 0:222: 'textureQueryLevels' : no matching overloaded function found
|
||||
ERROR: 0:222: 'assign' : cannot convert from ' const float' to ' temp int'
|
||||
ERROR: 64 compilation errors. No code generated.
|
||||
ERROR: 65 compilation errors. No code generated.
|
||||
|
||||
|
||||
Shader version: 430
|
||||
|
||||
@@ -34,7 +34,26 @@ ERROR: 0:54: '[]' : only outermost dimension of an array of arrays can be a spec
|
||||
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: 0:65: 'location' : overlapping use of location 10
|
||||
ERROR: 35 compilation errors. No code generated.
|
||||
ERROR: 0:68: 'location' : needs a literal integer
|
||||
ERROR: 0:68: 'component' : needs a literal integer
|
||||
ERROR: 0:69: 'binding' : needs a literal integer
|
||||
ERROR: 0:69: 'set' : needs a literal integer
|
||||
ERROR: 0:70: 'offset' : needs a literal integer
|
||||
ERROR: 0:71: 'align' : must be a power of 2
|
||||
ERROR: 0:71: 'align' : needs a literal integer
|
||||
ERROR: 0:72: 'xfb_offset' : needs a literal integer
|
||||
ERROR: 0:73: 'xfb_buffer' : needs a literal integer
|
||||
ERROR: 0:74: 'xfb_stride' : needs a literal integer
|
||||
ERROR: 0:73: 'xfb_buffer' : member cannot contradict block (or what block inherited from global)
|
||||
ERROR: 0:72: 'xfb layout qualifier' : can only be used on an output
|
||||
ERROR: 0:73: 'xfb layout qualifier' : can only be used on an output
|
||||
ERROR: 0:74: 'xfb layout qualifier' : can only be used on an output
|
||||
ERROR: 0:76: 'input_attachment_index' : needs a literal integer
|
||||
ERROR: 0:76: 'input_attachment_index' : can only be used with a subpass
|
||||
ERROR: 0:77: 'constant_id' : needs a literal integer
|
||||
ERROR: 0:77: 'constant_id' : can only be applied to 'const'-qualified scalar
|
||||
ERROR: 0:77: 'constant_id' : can only be applied to a scalar
|
||||
ERROR: 54 compilation errors. No code generated.
|
||||
|
||||
|
||||
SPIR-V is not generated for failed compile or link
|
||||
|
||||
@@ -63,3 +63,15 @@ layout(binding = 3000) uniform sampler2D s3000;
|
||||
layout(binding = 3001) uniform b3001 { int a; };
|
||||
layout(location = 10) in vec4 in1;
|
||||
layout(location = 10) in vec4 in2; // ERROR, no location aliasing
|
||||
|
||||
layout(constant_id = 400) const int nonLit = 1;
|
||||
layout(location = nonLit, component = nonLit) in vec4 nonLit1; // ERROR, non literal
|
||||
layout(binding = nonLit, set = nonLit) uniform nonLitBN { // ERROR, non literal
|
||||
layout(offset = nonLit) vec4 nonLit1; // ERROR, non literal
|
||||
layout(align = nonLit) vec4 nonLit3; // ERROR, non literal
|
||||
layout(xfb_offset = nonLit) vec4 nonLit4; // ERROR, non literal
|
||||
layout(xfb_buffer = nonLit) vec4 nonLit5; // ERROR, non literal
|
||||
layout(xfb_stride = nonLit) vec4 nonLit6; // ERROR, non literal
|
||||
} nonLitBI;
|
||||
layout(input_attachment_index = nonLit) vec4 nonLit3; // ERROR, non literal
|
||||
layout(constant_id = nonLit) vec4 nonLit4; // ERROR, non literal
|
||||
|
||||
Reference in New Issue
Block a user