skia2/tests/sksl/shared/Structs.glsl
Brian Osman f72c919a9a Roll SPIRV-Headers and SPIRV-Tools
This adds new validation rules that we were breaking.
Binding and DescriptorSet can't be applied to push constants, nor to
struct members.

Bug: skia:12670
Bug: chromium:1270328
Change-Id: I332f77717b08d9945c8e5b79c5bf649a8f5f2043
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474056
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-11-19 19:22:54 +00:00

19 lines
211 B
GLSL

out vec4 sk_FragColor;
struct A {
int x;
int y;
};
A a1;
struct B {
float x;
float y[2];
A z;
};
B b1;
void main() {
a1.x = 0;
b1.x = 0.0;
sk_FragColor.x = float(a1.x) + b1.x;
}