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:
James Price 2021-12-09 15:45:03 +00:00
parent 3a4443a681
commit c7c80c053d
76 changed files with 515 additions and 4 deletions

View File

@ -123,10 +123,8 @@ bool GeneratorImpl::Generate() {
return false;
}
} else if (auto* str = decl->As<ast::Struct>()) {
if (!str->IsBlockDecorated()) {
if (!EmitStructType(current_buffer_, builder_.Sem().Get(str))) {
return false;
}
if (!EmitStructType(current_buffer_, builder_.Sem().Get(str))) {
return false;
}
} else if (auto* func = decl->As<ast::Function>()) {
if (func->IsEntryPoint()) {

View File

@ -434,6 +434,9 @@ TEST_F(GlslGeneratorImplTest_Function,
EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
struct UBO {
vec4 coord;
};
layout (binding = 0) uniform UBO_1 {
vec4 coord;
@ -484,6 +487,9 @@ TEST_F(GlslGeneratorImplTest_Function,
EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
struct Uniforms {
vec4 coord;
};
layout (binding = 0) uniform Uniforms_1 {
vec4 coord;
@ -535,6 +541,10 @@ TEST_F(GlslGeneratorImplTest_Function,
EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
struct Data {
int a;
float b;
};
layout (binding = 0) buffer Data_1 {
int a;
@ -587,6 +597,10 @@ TEST_F(GlslGeneratorImplTest_Function,
R"(#version 310 es
precision mediump float;
struct Data {
int a;
float b;
};
layout (binding = 0) buffer Data_1 {
int a;
@ -635,6 +649,10 @@ TEST_F(GlslGeneratorImplTest_Function,
EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
struct Data {
int a;
float b;
};
layout (binding = 0) buffer Data_1 {
int a;
@ -684,6 +702,10 @@ TEST_F(GlslGeneratorImplTest_Function,
EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
struct Data {
int a;
float b;
};
layout (binding = 0) buffer Data_1 {
int a;
@ -735,6 +757,9 @@ TEST_F(GlslGeneratorImplTest_Function,
EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
struct S {
float x;
};
layout (binding = 0) uniform S_1 {
float x;
@ -791,6 +816,9 @@ TEST_F(GlslGeneratorImplTest_Function,
R"(#version 310 es
precision mediump float;
struct S {
float x;
};
layout (binding = 0) buffer S_1 {
float x;
@ -1057,6 +1085,9 @@ TEST_F(GlslGeneratorImplTest_Function,
EXPECT_EQ(gen.result(), R"(#version 310 es
precision mediump float;
struct Data {
float d;
};
layout (binding = 0) buffer Data_1 {
float d;

View File

@ -296,6 +296,10 @@ TEST_F(GlslGeneratorImplTest_MemberAccessor, StorageBuffer_Store_Matrix_Empty) {
R"(#version 310 es
precision mediump float;
struct Data {
int a;
mat2x3 b;
};
layout (binding = 0) buffer Data_1 {
int a;
@ -342,6 +346,10 @@ TEST_F(GlslGeneratorImplTest_MemberAccessor,
R"(#version 310 es
precision mediump float;
struct Data {
float z;
mat4x3 a;
};
layout (binding = 0) buffer Data_1 {
float z;
@ -386,6 +394,10 @@ TEST_F(GlslGeneratorImplTest_MemberAccessor,
R"(#version 310 es
precision mediump float;
struct Data {
float z;
int a[5];
};
layout (binding = 0) buffer Data_1 {
float z;
@ -431,6 +443,10 @@ TEST_F(GlslGeneratorImplTest_MemberAccessor,
R"(#version 310 es
precision mediump float;
struct Data {
float z;
int a[5];
};
layout (binding = 0) buffer Data_1 {
float z;
@ -473,6 +489,10 @@ TEST_F(GlslGeneratorImplTest_MemberAccessor, StorageBuffer_Store_ToArray) {
R"(#version 310 es
precision mediump float;
struct Data {
float z;
int a[5];
};
layout (binding = 0) buffer Data_1 {
float z;
@ -530,6 +550,9 @@ struct Inner {
vec3 a;
vec3 b;
};
struct Data {
Inner c[4];
};
layout (binding = 0) buffer Data_1 {
Inner c[4];
@ -589,6 +612,9 @@ struct Inner {
vec3 a;
vec3 b;
};
struct Data {
Inner c[4];
};
layout (binding = 0) buffer Data_1 {
Inner c[4];
@ -648,6 +674,9 @@ struct Inner {
vec3 a;
vec3 b;
};
struct Data {
Inner c[4];
};
layout (binding = 0) buffer Data_1 {
Inner c[4];
@ -707,6 +736,9 @@ struct Inner {
vec3 a;
vec3 b;
};
struct Data {
Inner c[4];
};
layout (binding = 0) buffer Data_1 {
Inner c[4];
@ -762,6 +794,9 @@ struct Inner {
vec3 a;
vec3 b;
};
struct Data {
Inner c[4];
};
layout (binding = 0) buffer Data_1 {
Inner c[4];
@ -821,6 +856,9 @@ struct Inner {
ivec3 a;
vec3 b;
};
struct Data {
Inner c[4];
};
layout (binding = 0) buffer Data_1 {
Inner c[4];

View File

@ -51,6 +51,9 @@ TEST_F(GlslSanitizerTest, Call_ArrayLength) {
auto* expect = R"(#version 310 es
precision mediump float;
struct my_struct {
float a[];
};
layout (binding = 1) buffer my_struct_1 {
float a[];
@ -102,6 +105,10 @@ TEST_F(GlslSanitizerTest, Call_ArrayLength_OtherMembersInStruct) {
auto* expect = R"(#version 310 es
precision mediump float;
struct my_struct {
float z;
float a[];
};
layout (binding = 1) buffer my_struct_1 {
float z;
@ -156,6 +163,9 @@ TEST_F(GlslSanitizerTest, Call_ArrayLength_ViaLets) {
auto* expect = R"(#version 310 es
precision mediump float;
struct my_struct {
float a[];
};
layout (binding = 1) buffer my_struct_1 {
float a[];

View File

@ -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;

View File

@ -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;

View File

@ -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];

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 {

View File

@ -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;

View File

@ -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;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct S {
int a;
};
layout (binding = 0) buffer S_1 {
int a;

View File

@ -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);

View File

@ -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;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct DrawIndirectArgs {
uint vertexCount;
};
layout (binding = 5) buffer DrawIndirectArgs_1 {
uint vertexCount;

View File

@ -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;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct S {
float a;
};
layout (binding = 0) buffer S_1 {
float a;

View File

@ -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;

View File

@ -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;

View File

@ -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];
};

View File

@ -1,6 +1,10 @@
#version 310 es
precision mediump float;
struct S {
mat3x2 matrix;
vec3 vector;
};
layout (binding = 0) uniform S_1 {
mat3x2 matrix;

View File

@ -1,6 +1,10 @@
#version 310 es
precision mediump float;
struct S {
mat3 matrix;
vec3 vector;
};
layout (binding = 0) uniform S_1 {
mat3 matrix;

View File

@ -1,6 +1,10 @@
#version 310 es
precision mediump float;
struct S {
mat3 matrix;
vec3 vector;
};
layout (binding = 0) uniform S_1 {
mat3 matrix;

View File

@ -1,6 +1,10 @@
#version 310 es
precision mediump float;
struct S {
mat4x3 matrix;
vec3 vector;
};
layout (binding = 0) uniform S_1 {
mat4x3 matrix;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct SB_RW {
uint arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
uint arg_0;
@ -22,6 +25,9 @@ void main() {
#version 310 es
precision mediump float;
struct SB_RW {
uint arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
uint arg_0;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct SB_RW {
int arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
int arg_0;
@ -22,6 +25,9 @@ void main() {
#version 310 es
precision mediump float;
struct SB_RW {
int arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
int arg_0;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct SB_RW {
int arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
int arg_0;
@ -22,6 +25,9 @@ void main() {
#version 310 es
precision mediump float;
struct SB_RW {
int arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
int arg_0;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct SB_RW {
uint arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
uint arg_0;
@ -22,6 +25,9 @@ void main() {
#version 310 es
precision mediump float;
struct SB_RW {
uint arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
uint arg_0;

View File

@ -9,6 +9,9 @@ ivec2 tint_atomicCompareExchangeWeak(inout int param_0, int param_1, int param_2
}
struct SB_RW {
int arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
int arg_0;
@ -38,6 +41,9 @@ ivec2 tint_atomicCompareExchangeWeak(inout int param_0, int param_1, int param_2
}
struct SB_RW {
int arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
int arg_0;

View File

@ -9,6 +9,9 @@ uvec2 tint_atomicCompareExchangeWeak(inout uint param_0, uint param_1, uint para
}
struct SB_RW {
uint arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
uint arg_0;
@ -38,6 +41,9 @@ uvec2 tint_atomicCompareExchangeWeak(inout uint param_0, uint param_1, uint para
}
struct SB_RW {
uint arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
uint arg_0;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct SB_RW {
uint arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
uint arg_0;
@ -22,6 +25,9 @@ void main() {
#version 310 es
precision mediump float;
struct SB_RW {
uint arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
uint arg_0;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct SB_RW {
int arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
int arg_0;
@ -22,6 +25,9 @@ void main() {
#version 310 es
precision mediump float;
struct SB_RW {
int arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
int arg_0;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct SB_RW {
int arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
int arg_0;
@ -22,6 +25,9 @@ void main() {
#version 310 es
precision mediump float;
struct SB_RW {
int arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
int arg_0;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct SB_RW {
uint arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
uint arg_0;
@ -22,6 +25,9 @@ void main() {
#version 310 es
precision mediump float;
struct SB_RW {
uint arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
uint arg_0;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct SB_RW {
uint arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
uint arg_0;
@ -22,6 +25,9 @@ void main() {
#version 310 es
precision mediump float;
struct SB_RW {
uint arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
uint arg_0;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct SB_RW {
int arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
int arg_0;
@ -22,6 +25,9 @@ void main() {
#version 310 es
precision mediump float;
struct SB_RW {
int arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
int arg_0;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct SB_RW {
int arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
int arg_0;
@ -22,6 +25,9 @@ void main() {
#version 310 es
precision mediump float;
struct SB_RW {
int arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
int arg_0;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct SB_RW {
uint arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
uint arg_0;
@ -22,6 +25,9 @@ void main() {
#version 310 es
precision mediump float;
struct SB_RW {
uint arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
uint arg_0;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct SB_RW {
uint arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
uint arg_0;
@ -22,6 +25,9 @@ void main() {
#version 310 es
precision mediump float;
struct SB_RW {
uint arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
uint arg_0;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct SB_RW {
int arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
int arg_0;
@ -22,6 +25,9 @@ void main() {
#version 310 es
precision mediump float;
struct SB_RW {
int arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
int arg_0;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct SB_RW {
uint arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
uint arg_0;
@ -22,6 +25,9 @@ void main() {
#version 310 es
precision mediump float;
struct SB_RW {
uint arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
uint arg_0;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct SB_RW {
int arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
int arg_0;
@ -22,6 +25,9 @@ void main() {
#version 310 es
precision mediump float;
struct SB_RW {
int arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
int arg_0;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct SB_RW {
int arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
int arg_0;
@ -22,6 +25,9 @@ void main() {
#version 310 es
precision mediump float;
struct SB_RW {
int arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
int arg_0;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct SB_RW {
uint arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
uint arg_0;
@ -22,6 +25,9 @@ void main() {
#version 310 es
precision mediump float;
struct SB_RW {
uint arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
uint arg_0;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct SB_RW {
uint arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
uint arg_0;
@ -22,6 +25,9 @@ void main() {
#version 310 es
precision mediump float;
struct SB_RW {
uint arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
uint arg_0;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct SB_RW {
int arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
int arg_0;
@ -22,6 +25,9 @@ void main() {
#version 310 es
precision mediump float;
struct SB_RW {
int arg_0;
};
layout (binding = 0) buffer SB_RW_1 {
int arg_0;

View File

@ -1,3 +1,7 @@
intrinsics/gen/isInf/666f2a.wgsl:28:25 warning: use of deprecated intrinsic
var res: vec3<bool> = isInf(vec3<f32>());
^^^^^
#version 310 es
precision mediump float;

View File

@ -1,3 +1,7 @@
intrinsics/gen/isInf/7bd98f.wgsl:28:19 warning: use of deprecated intrinsic
var res: bool = isInf(1.0);
^^^^^
#version 310 es
precision mediump float;

View File

@ -1,3 +1,7 @@
intrinsics/gen/isInf/7e81b5.wgsl:28:25 warning: use of deprecated intrinsic
var res: vec4<bool> = isInf(vec4<f32>());
^^^^^
#version 310 es
precision mediump float;

View File

@ -1,3 +1,7 @@
intrinsics/gen/isInf/a46d6f.wgsl:28:25 warning: use of deprecated intrinsic
var res: vec2<bool> = isInf(vec2<f32>());
^^^^^
#version 310 es
precision mediump float;

View File

@ -1,3 +1,7 @@
intrinsics/gen/isNan/1280ab.wgsl:28:25 warning: use of deprecated intrinsic
var res: vec3<bool> = isNan(vec3<f32>());
^^^^^
#version 310 es
precision mediump float;

View File

@ -1,3 +1,7 @@
intrinsics/gen/isNan/4d280d.wgsl:28:25 warning: use of deprecated intrinsic
var res: vec4<bool> = isNan(vec4<f32>());
^^^^^
#version 310 es
precision mediump float;

View File

@ -1,3 +1,7 @@
intrinsics/gen/isNan/67ecd3.wgsl:28:25 warning: use of deprecated intrinsic
var res: vec2<bool> = isNan(vec2<f32>());
^^^^^
#version 310 es
precision mediump float;

View File

@ -1,3 +1,7 @@
intrinsics/gen/isNan/e4978e.wgsl:28:19 warning: use of deprecated intrinsic
var res: bool = isNan(1.0);
^^^^^
#version 310 es
precision mediump float;

View File

@ -9,6 +9,9 @@ intrinsics/ignore/storage_buffer.wgsl:11:5 warning: use of deprecated intrinsic
#version 310 es
precision mediump float;
struct S {
int i;
};
layout (binding = 0) buffer S_1 {
int i;

View File

@ -9,6 +9,9 @@ intrinsics/ignore/uniform_buffer.wgsl:11:5 warning: use of deprecated intrinsic
#version 310 es
precision mediump float;
struct S {
int i;
};
layout (binding = 0) uniform S_1 {
int i;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct SSBO {
mat2 m;
};
layout (binding = 0) buffer SSBO_1 {
mat2 m;

View File

@ -4,6 +4,9 @@ precision mediump float;
struct tint_padded_array_element {
vec2 el;
};
struct SSBO {
tint_padded_array_element m[2];
};
layout (binding = 0) buffer SSBO_1 {
tint_padded_array_element m[2];

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct S {
int a;
};
layout (binding = 0) buffer S_1 {
int a;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct S {
int a;
};
layout (binding = 0) uniform S_1 {
int a;

View File

@ -23,6 +23,18 @@ struct Particle {
vec2 pos;
vec2 vel;
};
struct SimParams {
float deltaT;
float rule1Distance;
float rule2Distance;
float rule3Distance;
float rule1Scale;
float rule2Scale;
float rule3Scale;
};
struct Particles {
Particle particles[5];
};
struct tint_symbol_6 {
uvec3 tint_symbol;
};
@ -71,6 +83,18 @@ struct Particle {
vec2 pos;
vec2 vel;
};
struct SimParams {
float deltaT;
float rule1Distance;
float rule2Distance;
float rule3Distance;
float rule1Scale;
float rule2Scale;
float rule3Scale;
};
struct Particles {
Particle particles[5];
};
struct tint_symbol_6 {
uvec3 tint_symbol;
};
@ -107,6 +131,18 @@ struct Particle {
vec2 pos;
vec2 vel;
};
struct SimParams {
float deltaT;
float rule1Distance;
float rule2Distance;
float rule3Distance;
float rule1Scale;
float rule2Scale;
float rule3Scale;
};
struct Particles {
Particle particles[5];
};
layout (binding = 0) uniform SimParams_1 {
float deltaT;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct Uniforms {
mat4 modelViewProjectionMatrix;
};
layout (binding = 0) uniform Uniforms_1 {
mat4 modelViewProjectionMatrix;
@ -63,6 +66,9 @@ void main() {
#version 310 es
precision mediump float;
struct Uniforms {
mat4 modelViewProjectionMatrix;
};
struct VertexInput {
vec4 cur_position;
vec4 color;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct S {
int i;
};
layout (binding = 0) buffer S_1 {
int i;

View File

@ -1,6 +1,9 @@
#version 310 es
precision mediump float;
struct S {
int i;
};
layout (binding = 0) uniform S_1 {
int i;