tint/writer/hlsl: Inline constant expressions

This is required to handle materialized values, and for constant
expressions.

Bug: tint:1504
Change-Id: I79ad567954de2d1cfea09dda255894e4e2aa678e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92081
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
This commit is contained in:
Ben Clayton
2022-06-01 13:14:39 +00:00
committed by Dawn LUCI CQ
parent 8d98efaaa7
commit e9f8b09063
951 changed files with 1976 additions and 1865 deletions

View File

@@ -51,7 +51,7 @@ tint_symbol_4_ret tint_symbol_4(RWByteAddressBuffer buffer, uint offset) {
void foo(int4 src_param[4]) {
int4 src_function[4] = (int4[4])0;
int4 tint_symbol[4] = (int4[4])0;
const int4 tint_symbol_8[4] = {int4((1).xxxx), int4((2).xxxx), int4((3).xxxx), int4((3).xxxx)};
const int4 tint_symbol_8[4] = {(1).xxxx, (2).xxxx, (3).xxxx, (3).xxxx};
tint_symbol = tint_symbol_8;
tint_symbol = src_param;
tint_symbol = ret_arr();