dawn-cmake/test/tint
James Price b9b6e69631 Add ExpandCompoundAssignment transform
This transform converts compound assignment statements into regular
assignments, hoisting LHS expressions and converting for-loops and
else-if statements if necessary.

The vector-component case needs particular care, as we cannot take the
address of a vector component. We need to capture a pointer to the
whole vector and also the component index expression:

// Before
vector_array[foo()][bar()] *= 2.0;

// After:
let _vec = &vector_array[foo()];
let _idx = bar();
(*_vec)[_idx] = (*_vec)[_idx] * 2.0;

Bug: tint:1325
Change-Id: I8b9b31fc9ac4b3697f954100ceb4be24d063bca6
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/85282
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-03-31 22:30:10 +00:00
..
access tint->dawn: Shuffle source tree in preperation of merging repos 2022-02-21 15:19:07 +00:00
array wgsl: Separate struct members with commas 2022-03-28 14:31:22 +00:00
benchmark Normalize DEPS to ease merging with Dawn 2022-03-28 18:01:02 +00:00
buffer wgsl: Separate struct members with commas 2022-03-28 14:31:22 +00:00
bug Implement discard semantics 2022-03-28 20:51:32 +00:00
builtins builtins: Add smoothstep, deprecate smoothStep 2022-03-30 17:57:39 +00:00
expressions Implement mixed vector-scalar float % operator 2022-03-28 14:36:31 +00:00
identifiers/underscore wgsl: Separate struct members with commas 2022-03-28 14:31:22 +00:00
layout/storage/mat2x2 wgsl: Separate struct members with commas 2022-03-28 14:31:22 +00:00
let wgsl: Separate struct members with commas 2022-03-28 14:31:22 +00:00
loops HLSL: workaround FXC error "continue cannot be used in a switch" 2022-03-31 15:02:25 +00:00
out_of_order_decls wgsl: Separate struct members with commas 2022-03-28 14:31:22 +00:00
ptr_ref wgsl: Separate struct members with commas 2022-03-28 14:31:22 +00:00
samples wgsl: Separate struct members with commas 2022-03-28 14:31:22 +00:00
shader_io wgsl: Separate struct members with commas 2022-03-28 14:31:22 +00:00
shadowing wgsl: Separate struct members with commas 2022-03-28 14:31:22 +00:00
statements wgsl: Add support for compound assignment 2022-03-31 22:30:10 +00:00
struct wgsl: Separate struct members with commas 2022-03-28 14:31:22 +00:00
types wgsl: Separate struct members with commas 2022-03-28 14:31:22 +00:00
unicode test: Move unicode e2e test to tint dir 2022-02-21 16:51:06 +00:00
unittest/reader/spirv Implement discard semantics 2022-03-28 20:51:32 +00:00
var wgsl: Separate struct members with commas 2022-03-28 14:31:22 +00:00
vk-gl-cts HLSL: workaround FXC error "continue cannot be used in a switch" 2022-03-31 15:02:25 +00:00
BUILD.gn Add ExpandCompoundAssignment transform 2022-03-31 22:30:10 +00:00
extract-spvasm.py tint->dawn: Shuffle source tree in preperation of merging repos 2022-02-21 15:19:07 +00:00
test-all.sh tint->dawn: Shuffle source tree in preperation of merging repos 2022-02-21 15:19:07 +00:00