error: line 67: All OpSampledImage instructions must be in the same block in which their Result <id> are consumed. OpSampledImage Result Type <id> '28[%28]' has a consumer in a different basic block. The consumer instruction <id> is '61[%61]'.
%28 = OpSampledImage %27 %22 %26
If you set #define GENERATE_BROKEN_SPIRV 0, then the generated SPIRV will be valid and it will pass spirv-val.
Hope this is enough for you guys to go on.
When above is compiled with glslangValidator from the latest SDK (1.3.280.0), using this command:
glslangValidator -V broken.comp
Broken SPIRV is generated by glslang:
spirv-val output:
If you set
#define GENERATE_BROKEN_SPIRV 0
, then the generated SPIRV will be valid and it will pass spirv-val. Hope this is enough for you guys to go on.Thanks :)