mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +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:
@@ -1,6 +1,10 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
struct Uniforms {
|
||||
vec2 u_scale;
|
||||
vec2 u_offset;
|
||||
};
|
||||
|
||||
layout (binding = 0) uniform Uniforms_1 {
|
||||
vec2 u_scale;
|
||||
@@ -61,6 +65,10 @@ void main() {
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
struct Uniforms {
|
||||
vec2 u_scale;
|
||||
vec2 u_offset;
|
||||
};
|
||||
struct VertexOutputs {
|
||||
vec2 texcoords;
|
||||
vec4 position;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
struct UBO {
|
||||
int dynamic_idx;
|
||||
};
|
||||
|
||||
layout (binding = 0) uniform UBO_1 {
|
||||
int dynamic_idx;
|
||||
@@ -9,6 +12,9 @@ layout (binding = 0) uniform UBO_1 {
|
||||
struct S {
|
||||
int data[64];
|
||||
};
|
||||
struct Result {
|
||||
int tint_symbol;
|
||||
};
|
||||
|
||||
layout (binding = 1) buffer Result_1 {
|
||||
int tint_symbol;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
struct UBO {
|
||||
int dynamic_idx;
|
||||
};
|
||||
|
||||
layout (binding = 0) uniform UBO_1 {
|
||||
int dynamic_idx;
|
||||
@@ -9,6 +12,9 @@ layout (binding = 0) uniform UBO_1 {
|
||||
struct S {
|
||||
int data[64];
|
||||
};
|
||||
struct Result {
|
||||
int tint_symbol;
|
||||
};
|
||||
|
||||
layout (binding = 1) buffer Result_1 {
|
||||
int tint_symbol;
|
||||
|
||||
@@ -1,15 +1,26 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
struct UBO {
|
||||
int dynamic_idx;
|
||||
};
|
||||
|
||||
layout (binding = 0) uniform UBO_1 {
|
||||
int dynamic_idx;
|
||||
} ubo;
|
||||
|
||||
struct Result {
|
||||
int tint_symbol;
|
||||
};
|
||||
|
||||
layout (binding = 2) buffer Result_1 {
|
||||
int tint_symbol;
|
||||
} result;
|
||||
|
||||
struct SSBO {
|
||||
int data[4];
|
||||
};
|
||||
|
||||
layout (binding = 1) buffer SSBO_1 {
|
||||
int data[4];
|
||||
} ssbo;
|
||||
|
||||
@@ -4,12 +4,20 @@ precision mediump float;
|
||||
struct tint_padded_array_element {
|
||||
int el;
|
||||
};
|
||||
struct UBO {
|
||||
tint_padded_array_element data[4];
|
||||
int dynamic_idx;
|
||||
};
|
||||
|
||||
layout (binding = 0) uniform UBO_1 {
|
||||
tint_padded_array_element data[4];
|
||||
int dynamic_idx;
|
||||
} ubo;
|
||||
|
||||
struct Result {
|
||||
int tint_symbol;
|
||||
};
|
||||
|
||||
layout (binding = 2) buffer Result_1 {
|
||||
int tint_symbol;
|
||||
} result;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
struct UBO {
|
||||
int dynamic_idx;
|
||||
};
|
||||
|
||||
layout (binding = 0) uniform UBO_1 {
|
||||
int dynamic_idx;
|
||||
@@ -9,6 +12,9 @@ layout (binding = 0) uniform UBO_1 {
|
||||
struct S {
|
||||
int data[64];
|
||||
};
|
||||
struct Result {
|
||||
int tint_symbol;
|
||||
};
|
||||
|
||||
layout (binding = 1) buffer Result_1 {
|
||||
int tint_symbol;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
struct UBO {
|
||||
int dynamic_idx;
|
||||
};
|
||||
|
||||
layout (binding = 0) uniform UBO_1 {
|
||||
int dynamic_idx;
|
||||
@@ -9,6 +12,9 @@ layout (binding = 0) uniform UBO_1 {
|
||||
struct S {
|
||||
int data[64];
|
||||
};
|
||||
struct Result {
|
||||
int tint_symbol;
|
||||
};
|
||||
|
||||
layout (binding = 1) buffer Result_1 {
|
||||
int tint_symbol;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
struct UBO {
|
||||
int dynamic_idx;
|
||||
};
|
||||
|
||||
layout (binding = 0) uniform UBO_1 {
|
||||
int dynamic_idx;
|
||||
@@ -9,6 +12,9 @@ layout (binding = 0) uniform UBO_1 {
|
||||
struct S {
|
||||
int data[64];
|
||||
};
|
||||
struct Result {
|
||||
int tint_symbol;
|
||||
};
|
||||
|
||||
layout (binding = 1) buffer Result_1 {
|
||||
int tint_symbol;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
struct UBO {
|
||||
int dynamic_idx;
|
||||
};
|
||||
|
||||
layout (binding = 0) uniform UBO_1 {
|
||||
int dynamic_idx;
|
||||
@@ -9,6 +12,9 @@ layout (binding = 0) uniform UBO_1 {
|
||||
struct S {
|
||||
int data[64];
|
||||
};
|
||||
struct Result {
|
||||
int tint_symbol;
|
||||
};
|
||||
|
||||
layout (binding = 1) buffer Result_1 {
|
||||
int tint_symbol;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
struct UBO {
|
||||
int dynamic_idx;
|
||||
};
|
||||
|
||||
layout (binding = 0) uniform UBO_1 {
|
||||
int dynamic_idx;
|
||||
@@ -9,6 +12,9 @@ layout (binding = 0) uniform UBO_1 {
|
||||
struct S {
|
||||
int data[64];
|
||||
};
|
||||
struct Result {
|
||||
int tint_symbol;
|
||||
};
|
||||
|
||||
layout (binding = 1) buffer Result_1 {
|
||||
int tint_symbol;
|
||||
|
||||
@@ -1,15 +1,26 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
struct UBO {
|
||||
int dynamic_idx;
|
||||
};
|
||||
|
||||
layout (binding = 0) uniform UBO_1 {
|
||||
int dynamic_idx;
|
||||
} ubo;
|
||||
|
||||
struct Result {
|
||||
int tint_symbol;
|
||||
};
|
||||
|
||||
layout (binding = 2) buffer Result_1 {
|
||||
int tint_symbol;
|
||||
} result;
|
||||
|
||||
struct SSBO {
|
||||
int data[4];
|
||||
};
|
||||
|
||||
layout (binding = 1) buffer SSBO_1 {
|
||||
int data[4];
|
||||
} ssbo;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
struct UBO {
|
||||
int dynamic_idx;
|
||||
};
|
||||
|
||||
layout (binding = 0) uniform UBO_1 {
|
||||
int dynamic_idx;
|
||||
@@ -9,6 +12,9 @@ layout (binding = 0) uniform UBO_1 {
|
||||
struct S {
|
||||
int data[64];
|
||||
};
|
||||
struct Result {
|
||||
int tint_symbol;
|
||||
};
|
||||
|
||||
layout (binding = 1) buffer Result_1 {
|
||||
int tint_symbol;
|
||||
|
||||
@@ -4,6 +4,12 @@ precision mediump float;
|
||||
struct tint_padded_array_element {
|
||||
float el;
|
||||
};
|
||||
struct LeftOver {
|
||||
mat4 worldViewProjection;
|
||||
float time;
|
||||
mat4 test2[2];
|
||||
tint_padded_array_element test[4];
|
||||
};
|
||||
|
||||
vec3 position = vec3(0.0f, 0.0f, 0.0f);
|
||||
layout (binding = 2) uniform LeftOver_1 {
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
struct Buf {
|
||||
uint count;
|
||||
uint data[50];
|
||||
};
|
||||
|
||||
layout (binding = 0) buffer Buf_1 {
|
||||
uint count;
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
struct vertexUniformBuffer1 {
|
||||
mat2 transform1;
|
||||
};
|
||||
struct vertexUniformBuffer2 {
|
||||
mat2 transform2;
|
||||
};
|
||||
|
||||
layout (binding = 0) uniform vertexUniformBuffer1_1 {
|
||||
mat2 transform1;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
struct S {
|
||||
int a;
|
||||
};
|
||||
|
||||
layout (binding = 0) buffer S_1 {
|
||||
int a;
|
||||
|
||||
@@ -4,6 +4,9 @@ precision mediump float;
|
||||
struct QuicksortObject {
|
||||
int numbers[10];
|
||||
};
|
||||
struct buf0 {
|
||||
vec2 resolution;
|
||||
};
|
||||
|
||||
QuicksortObject obj = QuicksortObject(int[10](0, 0, 0, 0, 0, 0, 0, 0, 0, 0));
|
||||
vec4 tint_symbol = vec4(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
|
||||
@@ -7,6 +7,9 @@ struct sspp962805860buildInformationS {
|
||||
int essence;
|
||||
int orientation[6];
|
||||
};
|
||||
struct x_B4_BuildInformation {
|
||||
sspp962805860buildInformationS passthru;
|
||||
};
|
||||
|
||||
layout (binding = 2) buffer x_B4_BuildInformation_1 {
|
||||
sspp962805860buildInformationS passthru;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
struct DrawIndirectArgs {
|
||||
uint vertexCount;
|
||||
};
|
||||
|
||||
layout (binding = 5) buffer DrawIndirectArgs_1 {
|
||||
uint vertexCount;
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
struct Params {
|
||||
uint filterDim;
|
||||
uint blockDim;
|
||||
};
|
||||
|
||||
|
||||
layout (binding = 1) uniform Params_1 {
|
||||
@@ -10,6 +14,10 @@ layout (binding = 1) uniform Params_1 {
|
||||
uniform highp sampler2D inputTex;
|
||||
uniform highp writeonly image2D outputTex;
|
||||
|
||||
struct Flip {
|
||||
uint value;
|
||||
};
|
||||
|
||||
layout (binding = 3) uniform Flip_1 {
|
||||
uint value;
|
||||
} flip;
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
struct S {
|
||||
float a;
|
||||
};
|
||||
|
||||
layout (binding = 0) buffer S_1 {
|
||||
float a;
|
||||
|
||||
@@ -7,6 +7,11 @@ vec3 Bad(uint index, vec3 rd) {
|
||||
return normalize(normal);
|
||||
}
|
||||
|
||||
struct S {
|
||||
vec3 v;
|
||||
uint i;
|
||||
};
|
||||
|
||||
layout (binding = 0) buffer S_1 {
|
||||
vec3 v;
|
||||
uint i;
|
||||
|
||||
@@ -1,15 +1,26 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
struct Constants {
|
||||
uint zero;
|
||||
};
|
||||
|
||||
layout (binding = 0) uniform Constants_1 {
|
||||
uint zero;
|
||||
} constants;
|
||||
|
||||
struct Result {
|
||||
uint value;
|
||||
};
|
||||
|
||||
layout (binding = 1) buffer Result_1 {
|
||||
uint value;
|
||||
} result;
|
||||
|
||||
struct TestData {
|
||||
int data[3];
|
||||
};
|
||||
|
||||
layout (binding = 0) buffer TestData_1 {
|
||||
int data[3];
|
||||
} s;
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
#version 310 es
|
||||
precision mediump float;
|
||||
|
||||
struct Constants {
|
||||
uint zero;
|
||||
};
|
||||
|
||||
layout (binding = 0) uniform Constants_1 {
|
||||
uint zero;
|
||||
} constants;
|
||||
|
||||
struct Result {
|
||||
uint value;
|
||||
};
|
||||
struct S {
|
||||
uint data[3];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user