mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-05 03:35:56 +00:00
This change does not attempt to fix this issue. Bug: tint:1665 Bug: tint:1666 Change-Id: I9b40a25279b939977c826f38592518b6b086c06b Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101161 Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com>
40 lines
601 B
GLSL
40 lines
601 B
GLSL
#version 310 es
|
|
|
|
void vector() {
|
|
int idx = 3;
|
|
int x = ivec2(1, 2)[idx];
|
|
}
|
|
|
|
void matrix() {
|
|
int idx = 4;
|
|
vec2 x = mat2(vec2(1.0f, 2.0f), vec2(3.0f, 4.0f))[idx];
|
|
}
|
|
|
|
void fixed_size_array() {
|
|
int arr[2] = int[2](1, 2);
|
|
int idx = 3;
|
|
int x = arr[idx];
|
|
}
|
|
|
|
layout(binding = 0, std430) buffer rarr_block_ssbo {
|
|
float inner[];
|
|
} rarr;
|
|
|
|
void runtime_size_array() {
|
|
int idx = -1;
|
|
float x = rarr.inner[idx];
|
|
}
|
|
|
|
void f() {
|
|
vector();
|
|
matrix();
|
|
fixed_size_array();
|
|
runtime_size_array();
|
|
}
|
|
|
|
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
void main() {
|
|
f();
|
|
return;
|
|
}
|