wgpu/tests/in
João Capucho d64d78ff0b wgsl-in: Implement lexical scopes
Previously the wgsl frontend wasn't aware of lexical scopes causing all
variables and named expressions to share a single function scope, this
meant that if a variable was defined in a block with the same name as a
variable in the function body, the variable in the function body would
be lost and exiting the block all references to the variable in the
function body would be replaced with the variable of the block.

This commit fixes that by using the previously introduced `SymbolTable`
to track the lexical and perform the variable lookups, scopes are pushed
and popped as defined in the wgsl specification.
2022-09-01 17:31:50 -07:00
..
glsl [glsl-in] add support for .length() (#2017) 2022-08-08 18:09:22 +01:00
spv [hlsl-out] avoid error X3694: race condition writing to shared resource detected 2022-05-30 13:14:00 -07:00
access.param.ron [hlsl-out] More matCx2 fixes (#1989) 2022-06-27 15:56:10 -07:00
access.wgsl [hlsl-out] More matCx2 fixes (#1989) 2022-06-27 15:56:10 -07:00
binding-arrays.param.ron Binding arrays play nice with bounds checks (#1855) 2022-04-25 04:17:51 +00:00
binding-arrays.wgsl Implement Binding Arrays (#1845) 2022-04-19 14:23:07 -04:00
bitcast.params.ron [glsl-out] Handle vector bitcasts (#1966) 2022-06-20 22:25:13 -07:00
bitcast.wgsl [glsl-out] Handle vector bitcasts (#1966) 2022-06-20 22:25:13 -07:00
bits.param.ron Refactor snapshot test arguments to avoid checking for deserialize feature too often. 2021-11-26 11:36:46 -05:00
bits.wgsl Implement reverseBits and countOneBits for SPIR-V (#1897) 2022-05-09 23:24:28 +02:00
boids.param.ron Refactor snapshot test arguments to avoid checking for deserialize feature too often. 2021-11-26 11:36:46 -05:00
boids.wgsl [wgsl-in] Update entry point stage attributes 2022-04-15 18:02:48 +01:00
bounds-check-image-restrict.param.ron glsl-out: Implement bounds checks for ImageLoad (#1889) 2022-05-30 12:13:58 -07:00
bounds-check-image-restrict.wgsl glsl-out: Implement bounds checks for ImageLoad (#1889) 2022-05-30 12:13:58 -07:00
bounds-check-image-rzsw.param.ron glsl-out: Implement bounds checks for ImageLoad (#1889) 2022-05-30 12:13:58 -07:00
bounds-check-image-rzsw.wgsl glsl-out: Implement bounds checks for ImageLoad (#1889) 2022-05-30 12:13:58 -07:00
bounds-check-restrict.param.ron [msl-out] Implement index bounds check policies for non-texture accesses. 2021-12-06 15:53:41 -05:00
bounds-check-restrict.wgsl wgsl-in: Make semicolon after struct decl optional 2022-03-27 00:22:58 -07:00
bounds-check-zero-atomic.param.ron Mitigation for MSL atomic bounds check. (#1703) 2022-02-01 16:37:09 -08:00
bounds-check-zero-atomic.wgsl wgsl-in: Make semicolon after struct decl optional 2022-03-27 00:22:58 -07:00
bounds-check-zero.param.ron Refactor snapshot test arguments to avoid checking for deserialize feature too often. 2021-11-26 11:36:46 -05:00
bounds-check-zero.wgsl wgsl-in: Make semicolon after struct decl optional 2022-03-27 00:22:58 -07:00
break-if.wgsl Add support for 'break if' to IR, wgsl-in, and all backends. 2022-06-24 17:47:07 -07:00
collatz.param.ron spv-out: option to emit PointSize 2021-09-15 18:48:18 -04:00
collatz.wgsl [wgsl-in] Update entry point stage attributes 2022-04-15 18:02:48 +01:00
control-flow.param.ron spv-out: option to emit PointSize 2021-09-15 18:48:18 -04:00
control-flow.wgsl [hlsl-out] fix fallthrough in switch statements 2022-05-30 13:11:56 -07:00
cubeArrayShadow.wgsl [wgsl-in] Update entry point stage attributes 2022-04-15 18:02:48 +01:00
empty.param.ron spv-out: option to emit PointSize 2021-09-15 18:48:18 -04:00
empty.wgsl [wgsl-in] Update entry point stage attributes 2022-04-15 18:02:48 +01:00
extra.param.ron Actually test push constants to be used (#1767) 2022-03-08 23:02:20 -05:00
extra.wgsl [wgsl] Remove buffer, texture, in, out, input, output from reserved keywords 2022-04-29 20:06:09 +02:00
functions-webgl.param.ron Support for the OVR_multiview2 WebGL extension (#1933) 2022-06-30 17:58:47 +01:00
functions-webgl.wgsl [wgsl-in] Update entry point stage attributes 2022-04-15 18:02:48 +01:00
functions.param.ron Fixes for fma function (#1580) 2021-12-22 09:41:07 -05:00
functions.wgsl [wgsl-in] Update entry point stage attributes 2022-04-15 18:02:48 +01:00
globals.param.ron spv-out: option to emit PointSize 2021-09-15 18:48:18 -04:00
globals.wgsl [hlsl-out] More matCx2 fixes (#1989) 2022-06-27 15:56:10 -07:00
image.param.ron Gather operations 2021-12-18 11:46:49 -05:00
image.wgsl [wgsl-in] Update reserved keywords (#1847) 2022-04-17 15:56:54 +02:00
interface.param.ron implement invariant attribute 2022-04-10 21:49:23 -07:00
interface.wgsl [wgsl] Remove buffer, texture, in, out, input, output from reserved keywords 2022-04-29 20:06:09 +02:00
interpolate.param.ron glsl-out: push constants use anonymous uniforms 2022-01-21 21:13:12 -05:00
interpolate.wgsl [wgsl] Remove buffer, texture, in, out, input, output from reserved keywords 2022-04-29 20:06:09 +02:00
lexical-scopes.wgsl wgsl-in: Implement lexical scopes 2022-09-01 17:31:50 -07:00
math-functions.param.ron [wgsl-in] Support radians/degrees builtin functions (#1627) 2021-12-27 00:29:33 +00:00
math-functions.wgsl Add support for the saturate function (#2025) 2022-08-16 10:43:41 +00:00
multiview_webgl.param.ron Support for the OVR_multiview2 WebGL extension (#1933) 2022-06-30 17:58:47 +01:00
multiview_webgl.wgsl Support for the OVR_multiview2 WebGL extension (#1933) 2022-06-30 17:58:47 +01:00
multiview.param.ron Support for the OVR_multiview2 WebGL extension (#1933) 2022-06-30 17:58:47 +01:00
multiview.wgsl Support for the OVR_multiview2 WebGL extension (#1933) 2022-06-30 17:58:47 +01:00
operators.param.ron spv-out: option to emit PointSize 2021-09-15 18:48:18 -04:00
operators.wgsl [wgsl-in] support partial vector & matrix identity constructors 2022-05-12 22:15:45 -07:00
padding.param.ron [hlsl-out] Add more padding when necessary (#1814) 2022-04-11 20:34:06 -07:00
padding.wgsl [wgsl-in] Update reserved keywords (#1847) 2022-04-17 15:56:54 +02:00
pointers.param.ron Refactor snapshot test arguments to avoid checking for deserialize feature too often. 2021-11-26 11:36:46 -05:00
pointers.wgsl wgsl-in: Make semicolon after struct decl optional 2022-03-27 00:22:58 -07:00
policy-mix.param.ron Refactor snapshot test arguments to avoid checking for deserialize feature too often. 2021-11-26 11:36:46 -05:00
policy-mix.wgsl wgsl-in: Make semicolon after struct decl optional 2022-03-27 00:22:58 -07:00
push-constants.param.ron hlsl-out: Add support for push constants (#2005) 2022-08-29 11:58:02 +01:00
push-constants.wgsl hlsl-out: Add support for push constants (#2005) 2022-08-29 11:58:02 +01:00
quad.param.ron Support for the OVR_multiview2 WebGL extension (#1933) 2022-06-30 17:58:47 +01:00
quad.wgsl [wgsl-in] Update entry point stage attributes 2022-04-15 18:02:48 +01:00
shadow.param.ron spv-out: option to emit PointSize 2021-09-15 18:48:18 -04:00
shadow.wgsl [wgsl] Remove buffer, texture, in, out, input, output from reserved keywords 2022-04-29 20:06:09 +02:00
skybox.param.ron Support for the OVR_multiview2 WebGL extension (#1933) 2022-06-30 17:58:47 +01:00
skybox.wgsl [wgsl] Remove buffer, texture, in, out, input, output from reserved keywords 2022-04-29 20:06:09 +02:00
standard.param.ron spv-out: option to emit PointSize 2021-09-15 18:48:18 -04:00
standard.wgsl [wgsl-in] Update entry point stage attributes 2022-04-15 18:02:48 +01:00
texture-arg.param.ron spv-out: option to emit PointSize 2021-09-15 18:48:18 -04:00
texture-arg.wgsl [wgsl-in] Update entry point stage attributes 2022-04-15 18:02:48 +01:00
variations.glsl glsl-in: Add test for conditional builtin inject 2022-02-19 10:42:44 -05:00