2022-01-25 19:20:04 +00:00
|
|
|
SKIP: FAILED
|
|
|
|
|
2021-11-16 15:15:36 +00:00
|
|
|
#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(rg32ui) uniform highp writeonly uimage3D arg_0;
|
2022-10-26 18:36:44 +00:00
|
|
|
void textureDimensions_35ee69() {
|
|
|
|
uvec3 res = uvec3(imageSize(arg_0));
|
2021-11-16 15:15:36 +00:00
|
|
|
}
|
|
|
|
|
2022-01-28 22:36:58 +00:00
|
|
|
vec4 vertex_main() {
|
2022-10-26 18:36:44 +00:00
|
|
|
textureDimensions_35ee69();
|
2022-06-01 19:49:50 +00:00
|
|
|
return vec4(0.0f);
|
2021-11-16 15:15:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void main() {
|
2022-04-22 21:25:02 +00:00
|
|
|
gl_PointSize = 1.0;
|
2022-01-28 22:36:58 +00:00
|
|
|
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;
|
2021-11-16 15:15:36 +00:00
|
|
|
}
|
2022-01-25 19:20:04 +00:00
|
|
|
Error parsing GLSL shader:
|
2022-02-07 18:49:46 +00:00
|
|
|
ERROR: 0:3: 'image load-store format' : not supported with this profile: es
|
|
|
|
ERROR: 0:3: '' : compilation terminated
|
2022-01-25 19:20:04 +00:00
|
|
|
ERROR: 2 compilation errors. No code generated.
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-16 15:15:36 +00:00
|
|
|
#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(rg32ui) uniform highp writeonly uimage3D arg_0;
|
2022-10-26 18:36:44 +00:00
|
|
|
void textureDimensions_35ee69() {
|
|
|
|
uvec3 res = uvec3(imageSize(arg_0));
|
2021-11-16 15:15:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void fragment_main() {
|
2022-10-26 18:36:44 +00:00
|
|
|
textureDimensions_35ee69();
|
2021-11-16 15:15:36 +00:00
|
|
|
}
|
2022-01-26 16:48:55 +00:00
|
|
|
|
2021-11-16 15:15:36 +00:00
|
|
|
void main() {
|
|
|
|
fragment_main();
|
2022-01-28 22:36:58 +00:00
|
|
|
return;
|
2021-11-16 15:15:36 +00:00
|
|
|
}
|
2022-01-25 19:20:04 +00:00
|
|
|
Error parsing GLSL shader:
|
|
|
|
ERROR: 0:4: 'image load-store format' : not supported with this profile: es
|
|
|
|
ERROR: 0:4: '' : compilation terminated
|
|
|
|
ERROR: 2 compilation errors. No code generated.
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-16 15:15:36 +00:00
|
|
|
#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(rg32ui) uniform highp writeonly uimage3D arg_0;
|
2022-10-26 18:36:44 +00:00
|
|
|
void textureDimensions_35ee69() {
|
|
|
|
uvec3 res = uvec3(imageSize(arg_0));
|
2021-11-16 15:15:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void compute_main() {
|
2022-10-26 18:36:44 +00:00
|
|
|
textureDimensions_35ee69();
|
2021-11-16 15:15:36 +00:00
|
|
|
}
|
2022-01-26 16:48:55 +00:00
|
|
|
|
2022-01-28 22:36:58 +00:00
|
|
|
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
2021-11-16 15:15:36 +00:00
|
|
|
void main() {
|
|
|
|
compute_main();
|
2022-01-28 22:36:58 +00:00
|
|
|
return;
|
2021-11-16 15:15:36 +00:00
|
|
|
}
|
2022-01-25 19:20:04 +00:00
|
|
|
Error parsing GLSL shader:
|
2022-02-07 18:49:46 +00:00
|
|
|
ERROR: 0:3: 'image load-store format' : not supported with this profile: es
|
|
|
|
ERROR: 0:3: '' : compilation terminated
|
2022-01-25 19:20:04 +00:00
|
|
|
ERROR: 2 compilation errors. No code generated.
|
|
|
|
|
|
|
|
|
|
|
|
|