dawn-cmake/test/intrinsics/gen/textureNumLayers
Stephen White d4d7153bad GLSL: fix shadow samplers, and textures generally.
1) Append "Shadow" to samplers representing depth textures.
2) Sampling a depth texture returns f32, not vec4<f32>
3) Sampling a depth texture requires a Dref parameter, so we must
   generate one if none is provided.
4) GLSL requires Dref to be appended to the texture coordinates vector,
   *unless* it's a samplerCubeArrayShadow, since this would require vec5.
   In that case, it's passed as a separate parameter.
5) GLSL's textureGather() with a depth sampler always requires a refZ
   parameter, so provide zero to emulate WGSL's compare-less textureGather().
6) texelFetch() does not support depth textures, so this will have to be
   validated out.
7) textureOffset() does not support sampler2DArrayShadow in GLES, so this will
   have to be validated out.

Bug: tint:1298
Change-Id: Idaebe89cac6c1ec97c50a361b1d3aa3b84fb6c12
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/78760
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2022-02-02 15:25:42 +00:00
..
5d59cd.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
5d59cd.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
5d59cd.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
5d59cd.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
5d59cd.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
5d59cd.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
7f1937.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
7f1937.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
7f1937.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
7f1937.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
7f1937.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
7f1937.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
09d05d.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
09d05d.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
09d05d.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
09d05d.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
09d05d.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
09d05d.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
13b4ce.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
13b4ce.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
13b4ce.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
13b4ce.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
13b4ce.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
13b4ce.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
22e53b.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
22e53b.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
22e53b.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
22e53b.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
22e53b.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
22e53b.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
053df7.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
053df7.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
053df7.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
053df7.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
053df7.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
053df7.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
058cc3.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
058cc3.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
058cc3.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
058cc3.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
058cc3.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
058cc3.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
68a65b.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
68a65b.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
68a65b.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
68a65b.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
68a65b.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
68a65b.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
85f980.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
85f980.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
85f980.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
85f980.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
85f980.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
85f980.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
778bd1.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
778bd1.wgsl.expected.glsl GLSL: fix shadow samplers, and textures generally. 2022-02-02 15:25:42 +00:00
778bd1.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
778bd1.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
778bd1.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
778bd1.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
893e7c.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
893e7c.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
893e7c.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
893e7c.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
893e7c.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
893e7c.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
9700fb.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
9700fb.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
9700fb.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
9700fb.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
9700fb.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
9700fb.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
024820.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
024820.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
024820.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
024820.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
024820.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
024820.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
87953e.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
87953e.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
87953e.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
87953e.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
87953e.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
87953e.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
562013.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
562013.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
562013.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
562013.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
562013.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
562013.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
a216d2.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
a216d2.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
a216d2.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
a216d2.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
a216d2.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
a216d2.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
cd5dc8.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
cd5dc8.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
cd5dc8.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
cd5dc8.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
cd5dc8.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
cd5dc8.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
d5b228.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
d5b228.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
d5b228.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
d5b228.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
d5b228.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
d5b228.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
e31be1.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
e31be1.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
e31be1.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
e31be1.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
e31be1.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
e31be1.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
e653c0.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
e653c0.wgsl.expected.glsl GLSL: fix shadow samplers, and textures generally. 2022-02-02 15:25:42 +00:00
e653c0.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
e653c0.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
e653c0.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
e653c0.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
ee942f.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
ee942f.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
ee942f.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
ee942f.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
ee942f.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
ee942f.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
f33005.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
f33005.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
f33005.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
f33005.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
f33005.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
f33005.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
fcec98.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
fcec98.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
fcec98.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
fcec98.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
fcec98.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
fcec98.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
ff5e89.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
ff5e89.wgsl.expected.glsl GLSL: move entry point handling to CanonicalizeEntryPointIO transform. 2022-01-28 22:36:58 +00:00
ff5e89.wgsl.expected.hlsl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
ff5e89.wgsl.expected.msl transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
ff5e89.wgsl.expected.spvasm spirv: Use generic transform to process shader IO 2021-08-05 17:34:19 +00:00
ff5e89.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00