dawn-cmake/test/intrinsics/gen
James Price a5d73ce965 transform/shader_io: Generate a wrapper function
This is a major reworking of this transform. The old transform code
was getting unwieldy, with part of the complication coming from the
handling of multiple return statements. By generating a wrapper
function instead, we can avoid a lot of this complexity.

The original entry point function is stripped of all shader IO
attributes (as well as `stage` and `workgroup_size`), but the body is
left unmodified. A new entry point wrapper function is introduced
which calls the original function, packing/unpacking the shader inputs
as necessary, and propagates the result to the corresponding shader
outputs.

The new code has been refactored to use a state object with the
different parts of the transform split into separate functions, which
makes it much more manageable.

Fixed: tint:1076
Bug: tint:920
Change-Id: I3490a0ea7a3509a4e198ce730e476516649d8d96
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60521
Auto-Submit: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-08-04 22:15:28 +00:00
..
abs transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
acos transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
all transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
any transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
arrayLength transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
asin transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
atan transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
atan2 transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
atomicAdd transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
atomicAnd transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
atomicCompareExchangeWeak transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
atomicExchange transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
atomicLoad transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
atomicMax transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
atomicMin transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
atomicOr transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
atomicStore transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
atomicXor transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
ceil transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
clamp transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
cos transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
cosh transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
countOneBits transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
cross transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
determinant transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
distance transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
dot transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
dpdx writer/msl: Rework string printing 2021-06-28 15:30:57 +00:00
dpdxCoarse writer/msl: Rework string printing 2021-06-28 15:30:57 +00:00
dpdxFine writer/msl: Rework string printing 2021-06-28 15:30:57 +00:00
dpdy writer/msl: Rework string printing 2021-06-28 15:30:57 +00:00
dpdyCoarse writer/msl: Rework string printing 2021-06-28 15:30:57 +00:00
dpdyFine writer/msl: Rework string printing 2021-06-28 15:30:57 +00:00
exp transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
exp2 transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
faceForward transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
floor transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
fma transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
fract transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
frexp transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
fwidth writer/msl: Rework string printing 2021-06-28 15:30:57 +00:00
fwidthCoarse writer/msl: Rework string printing 2021-06-28 15:30:57 +00:00
fwidthFine writer/msl: Rework string printing 2021-06-28 15:30:57 +00:00
ignore transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
inverseSqrt transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
isFinite transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
isInf transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
isNan transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
isNormal transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
ldexp transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
length transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
log transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
log2 transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
max transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
min transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
mix transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
modf transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
normalize transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
pack2x16float transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
pack2x16snorm transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
pack2x16unorm transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
pack4x8snorm transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
pack4x8unorm transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
pow transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
reflect transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
refract transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
reverseBits transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
round transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
select transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
sign transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
sin transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
sinh transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
smoothStep transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
sqrt transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
step transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
storageBarrier validation: compute shader must include 'workgroup_size' in its attributes 2021-06-29 18:39:44 +00:00
tan transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
tanh transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
textureDimensions transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
textureLoad transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
textureNumLayers transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
textureNumLevels transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
textureNumSamples transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
textureSample Remove texture_external overload for textureSample 2021-07-08 20:58:18 +00:00
textureSampleBias test/intrinsics: Include overload signature in test case 2021-06-17 20:04:45 +00:00
textureSampleCompare test/intrinsics: Include overload signature in test case 2021-06-17 20:04:45 +00:00
textureSampleCompareLevel transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
textureSampleGrad transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
textureSampleLevel transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
textureStore transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
transpose transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
trunc transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
unpack2x16float transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
unpack2x16snorm transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
unpack2x16unorm transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
unpack4x8snorm transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
unpack4x8unorm transform/shader_io: Generate a wrapper function 2021-08-04 22:15:28 +00:00
workgroupBarrier validation: compute shader must include 'workgroup_size' in its attributes 2021-06-29 18:39:44 +00:00