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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user