Open chyyran opened 10 months ago
https://shader-playground.timjones.io/2d02a87f59ed403ffef77b83d45a9b51
Putting the OpAccessLoad
within the outer function also does not work
#version 450
layout(location = 0) out vec4 color;
layout(set = 0, binding = 1) uniform texture2D[2] tex;
layout(set = 0, binding = 2) uniform sampler _sampler;
void access(texture2D tex1, sampler arg_sampler) {
color = texture(sampler2D(tex1, arg_sampler), vec2(0.0));
}
void main() {
access(tex[0], _sampler);
}
Description SPIR-V with an
OpFunctionCall
with an image array fails to compile.Repro steps Shader Playground link: https://shader-playground.timjones.io/d87861b3fcc78063347366c88651b276
glslang
layout(location = 0) out vec4 color; layout(set = 0, binding = 1) uniform texture2D[2] tex; layout(set = 0, binding = 2) uniform sampler _sampler;
void access(texture2D[2] tex1, sampler arg_sampler) { color = texture(sampler2D(tex1[0], arg_sampler), vec2(0.0)); }
void main() { access(tex, _sampler); }