8e756f379c
Uses the pipeline-stage callback mechanism. It mangles the type name (with a test to verify that this works), and then calls defineStruct with the entire SkSL struct definition string. Bug: skia:10939 Change-Id: If14cf1b11faaa80ad8d4086cdacf68532bac43fc Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368809 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: John Stiles <johnstiles@google.com>
19 lines
232 B
GLSL
19 lines
232 B
GLSL
|
|
out vec4 sk_FragColor;
|
|
struct A {
|
|
int x;
|
|
int y;
|
|
};
|
|
A a1;
|
|
struct B {
|
|
float x;
|
|
float y[2];
|
|
layout (binding = 1) A z;
|
|
};
|
|
B b1;
|
|
void main() {
|
|
a1.x = 0;
|
|
b1.x = 0.0;
|
|
sk_FragColor.x = float(a1.x) + b1.x;
|
|
}
|