mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 13:38:00 +00:00
writer/hlsl: Don't wrap arrays in structures
FXC has trouble dealing with these. This was originally added to handle returning arrays as structures. HLSL supports typedefs, which is a much simpiler solution, and doesn't upset FXC. Bug: tint:848 Bug: tint:904 Change-Id: Ie841c9c454461a885a35c41476fd4d05d3f34cbf Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/56774 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
106ac290e6
commit
4135ea55eb
@@ -3,10 +3,6 @@ void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
struct tint_array_wrapper {
|
||||
bool arr[4];
|
||||
};
|
||||
|
||||
void f() {
|
||||
tint_array_wrapper v = {(bool[4])0};
|
||||
bool v[4] = (bool[4])0;
|
||||
}
|
||||
|
||||
@@ -3,10 +3,6 @@ void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
struct tint_array_wrapper {
|
||||
float arr[4];
|
||||
};
|
||||
|
||||
void f() {
|
||||
tint_array_wrapper v = {(float[4])0};
|
||||
float v[4] = (float[4])0;
|
||||
}
|
||||
|
||||
@@ -3,10 +3,6 @@ void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
struct tint_array_wrapper {
|
||||
int arr[4];
|
||||
};
|
||||
|
||||
void f() {
|
||||
tint_array_wrapper v = {(int[4])0};
|
||||
int v[4] = (int[4])0;
|
||||
}
|
||||
|
||||
@@ -9,10 +9,7 @@ struct S {
|
||||
float f;
|
||||
bool b;
|
||||
};
|
||||
struct tint_array_wrapper {
|
||||
S arr[4];
|
||||
};
|
||||
|
||||
void f() {
|
||||
tint_array_wrapper v = {(S[4])0};
|
||||
S v[4] = (S[4])0;
|
||||
}
|
||||
|
||||
@@ -3,10 +3,6 @@ void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
struct tint_array_wrapper {
|
||||
uint arr[4];
|
||||
};
|
||||
|
||||
void f() {
|
||||
tint_array_wrapper v = {(uint[4])0};
|
||||
uint v[4] = (uint[4])0;
|
||||
}
|
||||
|
||||
@@ -3,11 +3,8 @@ void unused_entry_point() {
|
||||
return;
|
||||
}
|
||||
|
||||
struct tint_array_wrapper {
|
||||
float arr[4];
|
||||
};
|
||||
struct S {
|
||||
tint_array_wrapper a;
|
||||
float a[4];
|
||||
};
|
||||
|
||||
void f() {
|
||||
|
||||
Reference in New Issue
Block a user