Update GLSL test results.
Change-Id: I3e2d0f4e00e10ea221c1a760775550f4a0374b3b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/114420
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
diff --git a/test/tint/benchmark/particles.wgsl.expected.glsl b/test/tint/benchmark/particles.wgsl.expected.glsl
index 1e8d94b..1f06dce 100644
--- a/test/tint/benchmark/particles.wgsl.expected.glsl
+++ b/test/tint/benchmark/particles.wgsl.expected.glsl
@@ -7,12 +7,16 @@
layout(location = 2) in vec2 quad_pos_1;
layout(location = 0) out vec4 color_2;
layout(location = 1) out vec2 quad_pos_2;
-layout(binding = 0, std140) uniform RenderParams_ubo {
+struct RenderParams {
mat4 modelViewProjectionMatrix;
vec3 right;
uint pad;
vec3 up;
uint pad_1;
+};
+
+layout(binding = 0, std140) uniform render_params_block_ubo {
+ RenderParams inner;
} render_params;
struct VertexInput {
@@ -44,10 +48,10 @@
};
VertexOutput vs_main(VertexInput tint_symbol) {
- vec3 quad_pos = (mat2x3(render_params.right, render_params.up) * tint_symbol.quad_pos);
+ vec3 quad_pos = (mat2x3(render_params.inner.right, render_params.inner.up) * tint_symbol.quad_pos);
vec3 position = (tint_symbol.position + (quad_pos * 0.01f));
VertexOutput tint_symbol_1 = VertexOutput(vec4(0.0f, 0.0f, 0.0f, 0.0f), vec4(0.0f, 0.0f, 0.0f, 0.0f), vec2(0.0f, 0.0f));
- tint_symbol_1.position = (render_params.modelViewProjectionMatrix * vec4(position, 1.0f));
+ tint_symbol_1.position = (render_params.inner.modelViewProjectionMatrix * vec4(position, 1.0f));
tint_symbol_1.color = tint_symbol.color;
tint_symbol_1.quad_pos = tint_symbol.quad_pos;
return tint_symbol_1;
@@ -143,6 +147,14 @@
vec2 quad_pos;
};
+struct SimulationParams {
+ float deltaTime;
+ uint pad;
+ uint pad_1;
+ uint pad_2;
+ vec4 seed;
+};
+
struct Particle {
vec3 position;
float lifetime;
@@ -151,12 +163,8 @@
uint pad_3;
};
-layout(binding = 0, std140) uniform SimulationParams_ubo {
- float deltaTime;
- uint pad;
- uint pad_1;
- uint pad_2;
- vec4 seed;
+layout(binding = 0, std140) uniform sim_params_block_ubo {
+ SimulationParams inner;
} sim_params;
layout(binding = 1, std430) buffer Particles_ssbo {
@@ -167,20 +175,27 @@
uint width;
};
-uniform highp sampler2D tint_symbol_6;
+void assign_and_preserve_padding_data_particles_X(uint dest[1], Particle value) {
+ data.particles[dest[0]].position = value.position;
+ data.particles[dest[0]].lifetime = value.lifetime;
+ data.particles[dest[0]].color = value.color;
+ data.particles[dest[0]].velocity = value.velocity;
+}
+
+uniform highp sampler2D tint_symbol_2_1;
void simulate(uvec3 GlobalInvocationID) {
- rand_seed = ((sim_params.seed.xy + vec2(GlobalInvocationID.xy)) * sim_params.seed.zw);
+ rand_seed = ((sim_params.inner.seed.xy + vec2(GlobalInvocationID.xy)) * sim_params.inner.seed.zw);
uint idx = GlobalInvocationID.x;
Particle particle = data.particles[idx];
- particle.velocity.z = (particle.velocity.z - (sim_params.deltaTime * 0.5f));
- particle.position = (particle.position + (sim_params.deltaTime * particle.velocity));
- particle.lifetime = (particle.lifetime - sim_params.deltaTime);
+ particle.velocity.z = (particle.velocity.z - (sim_params.inner.deltaTime * 0.5f));
+ particle.position = (particle.position + (sim_params.inner.deltaTime * particle.velocity));
+ particle.lifetime = (particle.lifetime - sim_params.inner.deltaTime);
particle.color.a = smoothstep(0.0f, 0.5f, particle.lifetime);
if ((particle.lifetime < 0.0f)) {
uvec2 coord = uvec2(0u);
{
- for(uint level = (uint(textureQueryLevels(tint_symbol_6)) - 1u); (level > 0u); level = (level - 1u)) {
- vec4 probabilites = texelFetch(tint_symbol_6, ivec2(coord), int(level));
+ for(uint level = (uint(textureQueryLevels(tint_symbol_2_1)) - 1u); (level > 0u); level = (level - 1u)) {
+ vec4 probabilites = texelFetch(tint_symbol_2_1, ivec2(coord), int(level));
float tint_symbol_5 = rand();
vec4 value = vec4(tint_symbol_5);
bvec4 mask = bvec4(uvec4(greaterThanEqual(value, vec4(0.0f, probabilites.xyz))) & uvec4(lessThan(value, probabilites)));
@@ -189,19 +204,20 @@
coord.y = (coord.y + (any(mask.zw) ? 1u : 0u));
}
}
- vec2 uv = (vec2(coord) / vec2(uvec2(textureSize(tint_symbol_6, 0))));
+ vec2 uv = (vec2(coord) / vec2(uvec2(textureSize(tint_symbol_2_1, 0))));
particle.position = vec3((((uv - 0.5f) * 3.0f) * vec2(1.0f, -1.0f)), 0.0f);
- particle.color = texelFetch(tint_symbol_6, ivec2(coord), 0);
+ particle.color = texelFetch(tint_symbol_2_1, ivec2(coord), 0);
+ float tint_symbol = rand();
+ particle.velocity.x = ((tint_symbol - 0.5f) * 0.100000001f);
float tint_symbol_1 = rand();
- particle.velocity.x = ((tint_symbol_1 - 0.5f) * 0.100000001f);
- float tint_symbol_2 = rand();
- particle.velocity.y = ((tint_symbol_2 - 0.5f) * 0.100000001f);
+ particle.velocity.y = ((tint_symbol_1 - 0.5f) * 0.100000001f);
float tint_symbol_3 = rand();
particle.velocity.z = (tint_symbol_3 * 0.300000012f);
float tint_symbol_4 = rand();
particle.lifetime = (0.5f + (tint_symbol_4 * 2.0f));
}
- data.particles[idx] = particle;
+ uint tint_symbol_6[1] = uint[1](idx);
+ assign_and_preserve_padding_data_particles_X(tint_symbol_6, particle);
}
layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in;
@@ -210,8 +226,8 @@
return;
}
Error parsing GLSL shader:
-ERROR: 0:64: 'textureQueryLevels' : no matching overloaded function found
-ERROR: 0:64: '' : compilation terminated
+ERROR: 0:75: 'textureQueryLevels' : no matching overloaded function found
+ERROR: 0:75: '' : compilation terminated
ERROR: 2 compilation errors. No code generated.
@@ -248,11 +264,15 @@
vec3 velocity;
};
-layout(binding = 3, std140) uniform UBO_ubo {
+struct UBO {
uint width;
uint pad;
uint pad_1;
uint pad_2;
+};
+
+layout(binding = 3, std140) uniform ubo_block_ubo {
+ UBO inner;
} ubo;
layout(binding = 4, std430) buffer Buffer_ssbo {
@@ -265,7 +285,7 @@
uniform highp sampler2D tex_in_1;
void import_level(uvec3 coord) {
- uint offset = (coord.x + (coord.y * ubo.width));
+ uint offset = (coord.x + (coord.y * ubo.inner.width));
buf_out.weights[offset] = texelFetch(tex_in_1, ivec2(coord.xy), 0).w;
}
@@ -306,11 +326,15 @@
vec3 velocity;
};
-layout(binding = 3, std140) uniform UBO_ubo {
+struct UBO {
uint width;
uint pad;
uint pad_1;
uint pad_2;
+};
+
+layout(binding = 3, std140) uniform ubo_block_ubo {
+ UBO inner;
} ubo;
layout(binding = 4, std430) buffer Buffer_ssbo {
@@ -324,15 +348,15 @@
layout(rgba8) uniform highp writeonly image2D tex_out;
void export_level(uvec3 coord) {
if (all(lessThan(coord.xy, uvec2(uvec2(imageSize(tex_out)))))) {
- uint dst_offset = (coord.x + (coord.y * ubo.width));
- uint src_offset = ((coord.x * 2u) + ((coord.y * 2u) * ubo.width));
- float a = buf_in.weights[(src_offset + 0u)];
+ uint dst_offset = (coord.x + (coord.y * ubo.inner.width));
+ uint src_offset = ((coord.x * 2u) + ((coord.y * 2u) * ubo.inner.width));
+ float a_1 = buf_in.weights[(src_offset + 0u)];
float b = buf_in.weights[(src_offset + 1u)];
- float c = buf_in.weights[((src_offset + 0u) + ubo.width)];
- float d = buf_in.weights[((src_offset + 1u) + ubo.width)];
- float sum = dot(vec4(a, b, c, d), vec4(1.0f));
+ float c = buf_in.weights[((src_offset + 0u) + ubo.inner.width)];
+ float d = buf_in.weights[((src_offset + 1u) + ubo.inner.width)];
+ float sum = dot(vec4(a_1, b, c, d), vec4(1.0f));
buf_out.weights[dst_offset] = (sum / 4.0f);
- vec4 probabilities = (vec4(a, (a + b), ((a + b) + c), sum) / max(sum, 0.0001f));
+ vec4 probabilities = (vec4(a_1, (a_1 + b), ((a_1 + b) + c), sum) / max(sum, 0.0001f));
imageStore(tex_out, ivec2(coord.xy), probabilities);
}
}