Open
Description
Description
Using naga to convert a GLSL file using forbidden texture
builtin in compute stage leads to a generic:
error: Entry point main at Compute is invalid
= Uses operations forbidden at this stage
Repro steps
Convert this glsl input with naga:
#version 440 core
layout(set = 0, binding = 0) uniform texture2D tex;
layout(set = 0, binding = 1) uniform sampler samp;
layout(local_size_x = 8, local_size_y = 8) in;
void
main()
{
vec4 data = texture(sampler2D(tex, samp), vec2(0.0, 1.0));
}
Expected behavior
An error message stating that textureSample
are forbidden in Compute stages, as written in the WGSL spec: https://www.w3.org/TR/WGSL/#texturesample
Current behavior
error: Entry point main at Compute is invalid
= Uses operations forbidden at this stage
Platform
MacOS, wgpu 23
Metadata
Metadata
Assignees
Type
Projects
Status
Todo
Activity