skia2/resources/sksl/shared/Structs.sksl
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
207 B
Plaintext

struct A {
int x;
int y;
} a1, a2;
A a3;
struct B {
float x;
float y[2];
A z;
};
B b1, b2, b3;
void main() {
a1.x = 0;
b1.x = 0;
sk_FragColor.r = half(a1.x) + half(b1.x);
}