mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 05:57:51 +00:00
glsl: Always emit structures
Skipping those that are block-decorated is not correct, as block-decorated structures can also have non-buffer usages. This is even clearer now that WGSL has removed the block attribute. Bug: tint:1324 Change-Id: I6484766a5c541d39e2dc08beb3ae7b889759a3fb Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/72083 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
@@ -7,6 +7,18 @@ struct Inner {
|
||||
struct tint_padded_array_element {
|
||||
Inner el;
|
||||
};
|
||||
struct S {
|
||||
ivec3 a;
|
||||
int b;
|
||||
uvec3 c;
|
||||
uint d;
|
||||
vec3 e;
|
||||
float f;
|
||||
mat2x3 g;
|
||||
mat3x2 h;
|
||||
Inner i;
|
||||
tint_padded_array_element j[4];
|
||||
};
|
||||
|
||||
layout (binding = 0) buffer S_1 {
|
||||
ivec3 a;
|
||||
|
||||
@@ -7,6 +7,18 @@ struct Inner {
|
||||
struct tint_padded_array_element {
|
||||
Inner el;
|
||||
};
|
||||
struct S {
|
||||
ivec3 a;
|
||||
int b;
|
||||
uvec3 c;
|
||||
uint d;
|
||||
vec3 e;
|
||||
float f;
|
||||
mat2x3 g;
|
||||
mat3x2 h;
|
||||
Inner i;
|
||||
tint_padded_array_element j[4];
|
||||
};
|
||||
|
||||
layout (binding = 0) buffer S_1 {
|
||||
ivec3 a;
|
||||
|
||||
@@ -14,6 +14,9 @@ struct Inner {
|
||||
mat3x2 j;
|
||||
ivec4 k[4];
|
||||
};
|
||||
struct S {
|
||||
Inner arr[8];
|
||||
};
|
||||
|
||||
layout (binding = 0) uniform S_1 {
|
||||
Inner arr[8];
|
||||
|
||||
@@ -7,6 +7,20 @@ struct Inner {
|
||||
struct tint_padded_array_element {
|
||||
Inner el;
|
||||
};
|
||||
struct S {
|
||||
ivec3 a;
|
||||
int b;
|
||||
uvec3 c;
|
||||
uint d;
|
||||
vec3 e;
|
||||
float f;
|
||||
ivec2 g;
|
||||
ivec2 h;
|
||||
mat2x3 i;
|
||||
mat3x2 j;
|
||||
Inner k;
|
||||
tint_padded_array_element l[4];
|
||||
};
|
||||
|
||||
layout (binding = 0) uniform S_1 {
|
||||
ivec3 a;
|
||||
|
||||
Reference in New Issue
Block a user