mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-03 13:11:34 +00:00
This CL make transform AddBlockAttribute always try to wrap types used by buffer variables into a struct, in order to generate valid GLSL code for assigning one buffer struct variable to another buffer struct variable. Fixed: tint:1735 Change-Id: I009d8a9ca7ecea1dc0ad6164275c964a18acb33f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108023 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
38 lines
587 B
GLSL
38 lines
587 B
GLSL
#version 310 es
|
|
precision mediump float;
|
|
|
|
struct S {
|
|
mat3x2 matrix;
|
|
uint pad;
|
|
uint pad_1;
|
|
vec3 vector;
|
|
uint pad_2;
|
|
};
|
|
|
|
struct S_std140 {
|
|
vec2 matrix_0;
|
|
vec2 matrix_1;
|
|
vec2 matrix_2;
|
|
uint pad;
|
|
uint pad_1;
|
|
vec3 vector;
|
|
uint pad_2;
|
|
};
|
|
|
|
layout(binding = 0, std140) uniform data_block_std140_ubo {
|
|
S_std140 inner;
|
|
} data;
|
|
|
|
mat3x2 load_data_inner_matrix() {
|
|
return mat3x2(data.inner.matrix_0, data.inner.matrix_1, data.inner.matrix_2);
|
|
}
|
|
|
|
void tint_symbol() {
|
|
vec2 x = (load_data_inner_matrix() * data.inner.vector);
|
|
}
|
|
|
|
void main() {
|
|
tint_symbol();
|
|
return;
|
|
}
|