KhronosGroup / SPIRV-Cross

SPIRV-Cross is a practical tool and library for performing reflection on SPIR-V and disassembling SPIR-V back to high level languages.
Apache License 2.0
2.02k stars 557 forks source link

spirv-cross yields invalid GLSL (undeclared identifier) #1126

Closed afd closed 5 years ago

afd commented 5 years ago

Files to repro the problem

Doing:

spirv-cross generated_0.opt.spv --output temp.frag && glslangValidator temp.frag

gives:

temp.frag
ERROR: 0:316: '_6675' : undeclared identifier 
ERROR: 0:316: 'assign' :  cannot convert from ' temp float' to ' temp highp 2-component vector of float'
ERROR: 0:316: '' : compilation terminated 
ERROR: 3 compilation errors.  No code generated.

Found via GraphicsFuzz on spirv-cross git commit 4ce04480.

HansKristian-Work commented 5 years ago

Same issue, works on master, not reported commit.