mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-10 08:33:32 +00:00
In GLSL, runtime-sized arrays are only valid in interface blocks, not in structs. The existing code was attempting to avoid emitting structs containing runtime-sized arrays but was confused by type aliases in the AST resulting in arrays being missed. The fix is to do the work on the semantic types instead, where type aliases have been resolved. Bug: tint:1339 Change-Id: I8c305ee9bddd75f975dd13f1d19d623d71410693 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/82360 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Stephen White <senorblanco@chromium.org>
21 lines
271 B
GLSL
21 lines
271 B
GLSL
#version 310 es
|
|
precision mediump float;
|
|
|
|
layout(binding = 0, std430) buffer S_1 {
|
|
uint first;
|
|
uint rtarr[];
|
|
} myvar;
|
|
void main_1() {
|
|
uint x_1 = uint(myvar.rtarr.length());
|
|
return;
|
|
}
|
|
|
|
void tint_symbol() {
|
|
main_1();
|
|
}
|
|
|
|
void main() {
|
|
tint_symbol();
|
|
return;
|
|
}
|