dawn-cmake/test/bug/tint/757.wgsl.expected.glsl
James Price 1461b032aa glsl: Don't emit structs with runtime-sized arrays
The GLSL emitted for these was invalid, and we don't need these
structs since they're only used as the store types of buffers, which
are handled elsewhere.

Change-Id: I17c15e408b5c36e9b895e5950528a6d02d1802a6
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/72381
Reviewed-by: Stephen White <senorblanco@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2021-12-09 18:54:35 +00:00

41 lines
928 B
GLSL

#version 310 es
precision mediump float;
struct Constants {
int level;
};
uniform highp sampler2DArray myTexture;
layout (binding = 3) buffer Result_1 {
float values[];
} result;
struct tint_symbol_2 {
uvec3 GlobalInvocationID;
};
void tint_symbol_inner(uvec3 GlobalInvocationID) {
uint flatIndex = ((((2u * 2u) * GlobalInvocationID.z) + (2u * GlobalInvocationID.y)) + GlobalInvocationID.x);
flatIndex = (flatIndex * 1u);
vec4 texel = texelFetch(myTexture, ivec3(ivec2(GlobalInvocationID.xy), 0), 0);
{
for(uint i = 0u; (i < 1u); i = (i + 1u)) {
result.values[(flatIndex + i)] = texel.r;
}
}
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void tint_symbol(tint_symbol_2 tint_symbol_1) {
tint_symbol_inner(tint_symbol_1.GlobalInvocationID);
return;
}
void main() {
tint_symbol_2 inputs;
inputs.GlobalInvocationID = gl_GlobalInvocationID;
tint_symbol(inputs);
}