dawn-cmake/test/tint/builtins/gen/textureGatherCompare/a5f587.wgsl.expected.glsl
Stephen White 93f686617e GLSL: fix textureGather() and textureGatherOffset() with depth textures.
Unlike other texture functions in GLSL, textureGather() and
textureGatherOffset() do not expect the refZ value to be appended to
the texture coordinates. It is passed as a regular argument. So append
refZ to coordinates by default, and pass as a regular parameter only
for the gather functions.

Bug: tint:1459
Change-Id: Iad1255be3de5915aeff4adb9054479b9e92c45cb
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/82340
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-03-02 14:07:02 +00:00

55 lines
1.1 KiB
GLSL

#version 310 es
uniform highp sampler2DShadow arg_0_arg_1;
void textureGatherCompare_a5f587() {
vec4 res = textureGatherOffset(arg_0_arg_1, vec2(0.0f, 0.0f), 1.0f, ivec2(0, 0));
}
vec4 vertex_main() {
textureGatherCompare_a5f587();
return vec4(0.0f, 0.0f, 0.0f, 0.0f);
}
void main() {
vec4 inner_result = vertex_main();
gl_Position = inner_result;
gl_Position.y = -(gl_Position.y);
gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
return;
}
#version 310 es
precision mediump float;
uniform highp sampler2DShadow arg_0_arg_1;
void textureGatherCompare_a5f587() {
vec4 res = textureGatherOffset(arg_0_arg_1, vec2(0.0f, 0.0f), 1.0f, ivec2(0, 0));
}
void fragment_main() {
textureGatherCompare_a5f587();
}
void main() {
fragment_main();
return;
}
#version 310 es
uniform highp sampler2DShadow arg_0_arg_1;
void textureGatherCompare_a5f587() {
vec4 res = textureGatherOffset(arg_0_arg_1, vec2(0.0f, 0.0f), 1.0f, ivec2(0, 0));
}
void compute_main() {
textureGatherCompare_a5f587();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}