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

@@ -12,6 +12,6 @@ cbuffer cbuffer_uniforms : register(b4, space1) {
[numthreads(1, 1, 1)]
void main() {
float2x4 m1 = float2x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
set_vector_float2x4(m1, uniforms[0].x, float4((1.0f).xxxx));
set_vector_float2x4(m1, uniforms[0].x, (1.0f).xxxx);
return;
}

View File

@@ -12,6 +12,6 @@ static float2x4 m1 = float2x4(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f);
[numthreads(1, 1, 1)]
void main() {
set_vector_float2x4(m1, uniforms[0].x, float4((1.0f).xxxx));
set_vector_float2x4(m1, uniforms[0].x, (1.0f).xxxx);
return;
}