dawn-cmake/test/intrinsics
Stephen White f9b8b6104d GLSL: implement CombineSamplers transform (string version).
This transform converts all separate texture/sampler references
in a program into combined texture/samplers. This is required for GLSL,
which does not support separate texture/samplers.

As input, the transform requires a map from the unique sampler/texture
pairs previously gathered by the Resolver to strings, which will be
used as the names of the newly-generated combined samplers. Note that
binding points are unused by GLSL, and so are set to (0, 0) with
collision detection disabled.

All function signatures containing textures or samplers are rewritten,
as well as function calls and texture intrinsic calls. For texture
intrinsic calls, a placeholder sampler is used to satisfy the subsequent
Resolver pass (GLSL texture intrinsics do not require a separate sampler,
but WGSL intrinsics do). The placeholder is also used if the shader
contains only texture references (e.g., textureLoad).

Bug: tint:1366

Change-Id: Iff8407d28fdc2a8adac5cb655707a08c8553c389
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/77080
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2022-01-24 17:17:22 +00:00
..
arrayLength wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
gen GLSL: implement CombineSamplers transform (string version). 2022-01-24 17:17:22 +00:00
ignore wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
textureDimensions GLSL: implement CombineSamplers transform (string version). 2022-01-24 17:17:22 +00:00
textureGather GLSL: implement CombineSamplers transform (string version). 2022-01-24 17:17:22 +00:00
textureLoad GLSL: implement CombineSamplers transform (string version). 2022-01-24 17:17:22 +00:00
textureNumSamples GLSL: implement CombineSamplers transform (string version). 2022-01-24 17:17:22 +00:00
degrees.spvasm spirv-reader: Polyfill GLSLStd450 Degrees and Radians 2021-07-26 09:12:57 +00:00
degrees.spvasm.expected.glsl intrinsics: Add degrees() and radians() 2022-01-05 20:11:00 +00:00
degrees.spvasm.expected.hlsl intrinsics: Add degrees() and radians() 2022-01-05 20:11:00 +00:00
degrees.spvasm.expected.msl intrinsics: Add degrees() and radians() 2022-01-05 20:11:00 +00:00
degrees.spvasm.expected.spvasm intrinsics: Add degrees() and radians() 2022-01-05 20:11:00 +00:00
degrees.spvasm.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
frexp.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
frexp.wgsl.expected.glsl GLSL: add .expected.glsl files for all tests. 2021-11-16 15:15:36 +00:00
frexp.wgsl.expected.hlsl intrinsics: Add new struct form of modf(), frexp() 2021-07-23 16:43:01 +00:00
frexp.wgsl.expected.msl intrinsics: Add new struct form of modf(), frexp() 2021-07-23 16:43:01 +00:00
frexp.wgsl.expected.spvasm reader/wgsl: Allow identifiers to start with an underscore 2021-11-19 21:52:13 +00:00
frexp.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
intrinsics.wgsl.tmpl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
modf.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
modf.wgsl.expected.glsl GLSL: add .expected.glsl files for all tests. 2021-11-16 15:15:36 +00:00
modf.wgsl.expected.hlsl intrinsics: Add new struct form of modf(), frexp() 2021-07-23 16:43:01 +00:00
modf.wgsl.expected.msl intrinsics: Add new struct form of modf(), frexp() 2021-07-23 16:43:01 +00:00
modf.wgsl.expected.spvasm reader/wgsl: Allow identifiers to start with an underscore 2021-11-19 21:52:13 +00:00
modf.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
radians.spvasm spirv-reader: Polyfill GLSLStd450 Degrees and Radians 2021-07-26 09:12:57 +00:00
radians.spvasm.expected.glsl intrinsics: Add degrees() and radians() 2022-01-05 20:11:00 +00:00
radians.spvasm.expected.hlsl intrinsics: Add degrees() and radians() 2022-01-05 20:11:00 +00:00
radians.spvasm.expected.msl intrinsics: Add degrees() and radians() 2022-01-05 20:11:00 +00:00
radians.spvasm.expected.spvasm intrinsics: Add degrees() and radians() 2022-01-05 20:11:00 +00:00
radians.spvasm.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
repeated_use.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00
repeated_use.wgsl.expected.glsl Update GLSL expected results. 2021-12-21 01:48:13 +00:00
repeated_use.wgsl.expected.hlsl intrinsics: Deprecate isNan, isInf, isFinite, isNormal 2021-11-23 18:57:57 +00:00
repeated_use.wgsl.expected.msl intrinsics: Deprecate isNan, isInf, isFinite, isNormal 2021-11-23 18:57:57 +00:00
repeated_use.wgsl.expected.spvasm intrinsics: Deprecate isNan, isInf, isFinite, isNormal 2021-11-23 18:57:57 +00:00
repeated_use.wgsl.expected.wgsl wgsl: Replace [[decoration]] with @decoration 2022-01-19 22:46:57 +00:00