mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-16 12:21:35 +00:00
If an abstract-vector or abstract-matrix is indexed with a non-constant index expression, then the resulting value is non-constant, and so cannot be abstract. In this situation the materialization cannot be done post-index, so materialization must happen on the object before indexing. Bug: chromium:1345468 Change-Id: I9f29dc40301779a7ff8f173724374bd845a3a5b9 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/96684 Reviewed-by: Antonio Maiorano <amaiorano@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@chromium.org>
13 lines
251 B
GLSL
13 lines
251 B
GLSL
#version 310 es
|
|
|
|
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
|
|
void unused_entry_point() {
|
|
return;
|
|
}
|
|
void f() {
|
|
int i = 1;
|
|
vec2 a = mat4x2(vec2(0.0f), vec2(0.0f), vec2(4.0f, 0.0f), vec2(0.0f))[i];
|
|
int b = ivec2(0, 1)[i];
|
|
}
|
|
|