tint/writer/msl: Inline constant expressions

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

Bug: tint:1504
Change-Id: Ic3ac62317241fa6f7009360128f222aeb56f62e4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92083
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton
2022-06-01 10:08:29 +00:00
committed by Dawn LUCI CQ
parent 2e22d9285c
commit cb6ddd2aa6
1012 changed files with 1950 additions and 1852 deletions

View File

@@ -6,6 +6,6 @@ struct S {
};
void foo(device S* const tint_symbol) {
(*(tint_symbol)).a = ((*(tint_symbol)).a - float4x4());
(*(tint_symbol)).a = ((*(tint_symbol)).a - float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f)));
}

View File

@@ -6,6 +6,6 @@ struct S {
};
void foo(device S* const tint_symbol) {
(*(tint_symbol)).a = ((*(tint_symbol)).a + float4x4());
(*(tint_symbol)).a = ((*(tint_symbol)).a + float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f)));
}

View File

@@ -6,6 +6,6 @@ struct S {
};
void foo(device S* const tint_symbol) {
(*(tint_symbol)).a = ((*(tint_symbol)).a * float4x4());
(*(tint_symbol)).a = ((*(tint_symbol)).a * float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f)));
}