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

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
float2x2 v = float2x2();
float2x2 v = float2x2(float2(0.0f), float2(0.0f));
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
float2x3 v = float2x3();
float2x3 v = float2x3(float3(0.0f), float3(0.0f));
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
float2x4 v = float2x4();
float2x4 v = float2x4(float4(0.0f), float4(0.0f));
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
float3x2 v = float3x2();
float3x2 v = float3x2(float2(0.0f), float2(0.0f), float2(0.0f));
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
float3x3 v = float3x3();
float3x3 v = float3x3(float3(0.0f), float3(0.0f), float3(0.0f));
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
float3x4 v = float3x4();
float3x4 v = float3x4(float4(0.0f), float4(0.0f), float4(0.0f));
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
float4x2 v = float4x2();
float4x2 v = float4x2(float2(0.0f), float2(0.0f), float2(0.0f), float2(0.0f));
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
float4x3 v = float4x3();
float4x3 v = float4x3(float3(0.0f), float3(0.0f), float3(0.0f), float3(0.0f));
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
float4x4 v = float4x4();
float4x4 v = float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f));
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
bool v = bool();
bool v = false;
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
float v = float();
float v = 0.0f;
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
int v = int();
int v = 0;
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
uint v = uint();
uint v = 0u;
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
bool2 v = bool2();
bool2 v = bool2(false);
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
float2 v = float2();
float2 v = float2(0.0f);
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
int2 v = int2();
int2 v = int2(0);
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
uint2 v = uint2();
uint2 v = uint2(0u);
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
bool3 v = bool3();
bool3 v = bool3(false);
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
float3 v = float3();
float3 v = float3(0.0f);
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
int3 v = int3();
int3 v = int3(0);
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
uint3 v = uint3();
uint3 v = uint3(0u);
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
bool4 v = bool4();
bool4 v = bool4(false);
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
float4 v = float4();
float4 v = float4(0.0f);
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
int4 v = int4();
int4 v = int4(0);
}

View File

@@ -2,6 +2,6 @@
using namespace metal;
void f() {
uint4 v = uint4();
uint4 v = uint4(0u);
}