dawn-cmake/test/tint/builtins/gen/textureStore/2eb2a4.wgsl.expected.glsl

78 lines
1.7 KiB
Plaintext
Raw Normal View History

SKIP: FAILED
#version 310 es
GLSL: fix textureLoad() and textureStore(), depth textures, and more. The CombineSamplers transform was incorrectly flagging StorageTexture (which in GLSL ends up as image2D) as needing to be combined with a sampler, or at least renamed. This is incorrect: StorageTexture never has an associated sampler, so don't try to pair it up and just output it as image* in GLSL. In GLSL, textureLoad (aka texelFetch) of depth textures is not allowed. The fix is to bind the depth texture as the corresponding f32 texture instead (e.g., texture_depth_2d -> texture_2d<f32>, texture_depth_cube -> texture_cube<f32>, etc). This requires changing both the uniform globals and function parameter types. We're now going to receive a vec4 instead of a float from texelFetch, so add a ".x" member accessor to retrieve the first component. (Note that we don't do this inside a CallStatement since this gives the CloneContext indigestion, and CallStatement is going to ignore the result of the call anyway.) We were failing to find the dummy samplers that Dawn creates for the calls that actually do require a dummy sampler, since the old Inspector implementation of GetSamplerTextureUses() does not find them. The fix is to implement a new Inspector call to return the texture/sampler pairs the Resolver found during resolution. This will include the dummy sampler as a null variable pointer. In order to identify the placeholder sampler, we pass in a BindingPair to represent it. When we discover a null sampler in the variable pair, we return the passed-in placeholder binding point to the caller (Dawn). (Dawn will use a group of kMaxBindGroups, to ensure that it never collides with an existing sampler.) Bug: tint:1298 Change-Id: I82e142c2b4318608c27a9fa9521c27f15a6214cd Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/78820 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
2022-02-03 22:39:13 +00:00
layout(rgba16ui) uniform highp writeonly uimage1D arg_0;
void textureStore_2eb2a4() {
GLSL: fix textureLoad() and textureStore(), depth textures, and more. The CombineSamplers transform was incorrectly flagging StorageTexture (which in GLSL ends up as image2D) as needing to be combined with a sampler, or at least renamed. This is incorrect: StorageTexture never has an associated sampler, so don't try to pair it up and just output it as image* in GLSL. In GLSL, textureLoad (aka texelFetch) of depth textures is not allowed. The fix is to bind the depth texture as the corresponding f32 texture instead (e.g., texture_depth_2d -> texture_2d<f32>, texture_depth_cube -> texture_cube<f32>, etc). This requires changing both the uniform globals and function parameter types. We're now going to receive a vec4 instead of a float from texelFetch, so add a ".x" member accessor to retrieve the first component. (Note that we don't do this inside a CallStatement since this gives the CloneContext indigestion, and CallStatement is going to ignore the result of the call anyway.) We were failing to find the dummy samplers that Dawn creates for the calls that actually do require a dummy sampler, since the old Inspector implementation of GetSamplerTextureUses() does not find them. The fix is to implement a new Inspector call to return the texture/sampler pairs the Resolver found during resolution. This will include the dummy sampler as a null variable pointer. In order to identify the placeholder sampler, we pass in a BindingPair to represent it. When we discover a null sampler in the variable pair, we return the passed-in placeholder binding point to the caller (Dawn). (Dawn will use a group of kMaxBindGroups, to ensure that it never collides with an existing sampler.) Bug: tint:1298 Change-Id: I82e142c2b4318608c27a9fa9521c27f15a6214cd Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/78820 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
2022-02-03 22:39:13 +00:00
imageStore(arg_0, 1, uvec4(0u, 0u, 0u, 0u));
}
vec4 vertex_main() {
textureStore_2eb2a4();
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;
}
Error parsing GLSL shader:
ERROR: 0:3: 'uimage1D' : Reserved word.
WARNING: 0:3: 'layout' : useless application of layout qualifier
ERROR: 0:3: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
#version 310 es
precision mediump float;
GLSL: fix textureLoad() and textureStore(), depth textures, and more. The CombineSamplers transform was incorrectly flagging StorageTexture (which in GLSL ends up as image2D) as needing to be combined with a sampler, or at least renamed. This is incorrect: StorageTexture never has an associated sampler, so don't try to pair it up and just output it as image* in GLSL. In GLSL, textureLoad (aka texelFetch) of depth textures is not allowed. The fix is to bind the depth texture as the corresponding f32 texture instead (e.g., texture_depth_2d -> texture_2d<f32>, texture_depth_cube -> texture_cube<f32>, etc). This requires changing both the uniform globals and function parameter types. We're now going to receive a vec4 instead of a float from texelFetch, so add a ".x" member accessor to retrieve the first component. (Note that we don't do this inside a CallStatement since this gives the CloneContext indigestion, and CallStatement is going to ignore the result of the call anyway.) We were failing to find the dummy samplers that Dawn creates for the calls that actually do require a dummy sampler, since the old Inspector implementation of GetSamplerTextureUses() does not find them. The fix is to implement a new Inspector call to return the texture/sampler pairs the Resolver found during resolution. This will include the dummy sampler as a null variable pointer. In order to identify the placeholder sampler, we pass in a BindingPair to represent it. When we discover a null sampler in the variable pair, we return the passed-in placeholder binding point to the caller (Dawn). (Dawn will use a group of kMaxBindGroups, to ensure that it never collides with an existing sampler.) Bug: tint:1298 Change-Id: I82e142c2b4318608c27a9fa9521c27f15a6214cd Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/78820 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
2022-02-03 22:39:13 +00:00
layout(rgba16ui) uniform highp writeonly uimage1D arg_0;
void textureStore_2eb2a4() {
GLSL: fix textureLoad() and textureStore(), depth textures, and more. The CombineSamplers transform was incorrectly flagging StorageTexture (which in GLSL ends up as image2D) as needing to be combined with a sampler, or at least renamed. This is incorrect: StorageTexture never has an associated sampler, so don't try to pair it up and just output it as image* in GLSL. In GLSL, textureLoad (aka texelFetch) of depth textures is not allowed. The fix is to bind the depth texture as the corresponding f32 texture instead (e.g., texture_depth_2d -> texture_2d<f32>, texture_depth_cube -> texture_cube<f32>, etc). This requires changing both the uniform globals and function parameter types. We're now going to receive a vec4 instead of a float from texelFetch, so add a ".x" member accessor to retrieve the first component. (Note that we don't do this inside a CallStatement since this gives the CloneContext indigestion, and CallStatement is going to ignore the result of the call anyway.) We were failing to find the dummy samplers that Dawn creates for the calls that actually do require a dummy sampler, since the old Inspector implementation of GetSamplerTextureUses() does not find them. The fix is to implement a new Inspector call to return the texture/sampler pairs the Resolver found during resolution. This will include the dummy sampler as a null variable pointer. In order to identify the placeholder sampler, we pass in a BindingPair to represent it. When we discover a null sampler in the variable pair, we return the passed-in placeholder binding point to the caller (Dawn). (Dawn will use a group of kMaxBindGroups, to ensure that it never collides with an existing sampler.) Bug: tint:1298 Change-Id: I82e142c2b4318608c27a9fa9521c27f15a6214cd Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/78820 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
2022-02-03 22:39:13 +00:00
imageStore(arg_0, 1, uvec4(0u, 0u, 0u, 0u));
}
void fragment_main() {
textureStore_2eb2a4();
}
void main() {
fragment_main();
return;
}
Error parsing GLSL shader:
ERROR: 0:4: 'uimage1D' : Reserved word.
WARNING: 0:4: 'layout' : useless application of layout qualifier
ERROR: 0:4: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
#version 310 es
GLSL: fix textureLoad() and textureStore(), depth textures, and more. The CombineSamplers transform was incorrectly flagging StorageTexture (which in GLSL ends up as image2D) as needing to be combined with a sampler, or at least renamed. This is incorrect: StorageTexture never has an associated sampler, so don't try to pair it up and just output it as image* in GLSL. In GLSL, textureLoad (aka texelFetch) of depth textures is not allowed. The fix is to bind the depth texture as the corresponding f32 texture instead (e.g., texture_depth_2d -> texture_2d<f32>, texture_depth_cube -> texture_cube<f32>, etc). This requires changing both the uniform globals and function parameter types. We're now going to receive a vec4 instead of a float from texelFetch, so add a ".x" member accessor to retrieve the first component. (Note that we don't do this inside a CallStatement since this gives the CloneContext indigestion, and CallStatement is going to ignore the result of the call anyway.) We were failing to find the dummy samplers that Dawn creates for the calls that actually do require a dummy sampler, since the old Inspector implementation of GetSamplerTextureUses() does not find them. The fix is to implement a new Inspector call to return the texture/sampler pairs the Resolver found during resolution. This will include the dummy sampler as a null variable pointer. In order to identify the placeholder sampler, we pass in a BindingPair to represent it. When we discover a null sampler in the variable pair, we return the passed-in placeholder binding point to the caller (Dawn). (Dawn will use a group of kMaxBindGroups, to ensure that it never collides with an existing sampler.) Bug: tint:1298 Change-Id: I82e142c2b4318608c27a9fa9521c27f15a6214cd Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/78820 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
2022-02-03 22:39:13 +00:00
layout(rgba16ui) uniform highp writeonly uimage1D arg_0;
void textureStore_2eb2a4() {
GLSL: fix textureLoad() and textureStore(), depth textures, and more. The CombineSamplers transform was incorrectly flagging StorageTexture (which in GLSL ends up as image2D) as needing to be combined with a sampler, or at least renamed. This is incorrect: StorageTexture never has an associated sampler, so don't try to pair it up and just output it as image* in GLSL. In GLSL, textureLoad (aka texelFetch) of depth textures is not allowed. The fix is to bind the depth texture as the corresponding f32 texture instead (e.g., texture_depth_2d -> texture_2d<f32>, texture_depth_cube -> texture_cube<f32>, etc). This requires changing both the uniform globals and function parameter types. We're now going to receive a vec4 instead of a float from texelFetch, so add a ".x" member accessor to retrieve the first component. (Note that we don't do this inside a CallStatement since this gives the CloneContext indigestion, and CallStatement is going to ignore the result of the call anyway.) We were failing to find the dummy samplers that Dawn creates for the calls that actually do require a dummy sampler, since the old Inspector implementation of GetSamplerTextureUses() does not find them. The fix is to implement a new Inspector call to return the texture/sampler pairs the Resolver found during resolution. This will include the dummy sampler as a null variable pointer. In order to identify the placeholder sampler, we pass in a BindingPair to represent it. When we discover a null sampler in the variable pair, we return the passed-in placeholder binding point to the caller (Dawn). (Dawn will use a group of kMaxBindGroups, to ensure that it never collides with an existing sampler.) Bug: tint:1298 Change-Id: I82e142c2b4318608c27a9fa9521c27f15a6214cd Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/78820 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
2022-02-03 22:39:13 +00:00
imageStore(arg_0, 1, uvec4(0u, 0u, 0u, 0u));
}
void compute_main() {
textureStore_2eb2a4();
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
compute_main();
return;
}
Error parsing GLSL shader:
ERROR: 0:3: 'uimage1D' : Reserved word.
WARNING: 0:3: 'layout' : useless application of layout qualifier
ERROR: 0:3: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.