glslang
glslang copied to clipboard
Loading shadow texture causes spirv-val error
#version 450
layout (set = 0, binding = 0) uniform texture2D kTextures2DShadow[];
layout (set = 0, binding = 1) uniform samplerShadow kSamplersShadow[];
void main() {
float x = texture(sampler2DShadow(kTextures2DShadow[0], kSamplersShadow[0]), vec3(0));
}
The following will produce a spirv-val error
error: line 48: Expected Image to have the same type as Result Type Image
%29 = OpSampledImage %28 %19 %26
where the SPIR-V looks like
// Image
%9 = OpTypeImage %float 2D 0 0 0 1 Unknown
%19 = OpLoad %9 %18
// Result Type
%27 = OpTypeImage %float 2D 1 0 0 1 Unknown
%28 = OpTypeSampledImage %27