skia2/tests/sksl/shared/InterfaceBlockAnonymous.sksl
John Stiles bc3c41b874 Enforce that layout(binding=...) is set on interface blocks in Metal.
Previously, we would emit an invalid [[buffer(-1)]] annotation on the
block, causing the Metal compilation to fail.

Change-Id: I68b2439c05db3163686e84c5dcc9a5c43870ff67
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/340761
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
2020-12-04 19:30:35 +00:00

11 lines
177 B
Plaintext

layout(binding=789) uniform testBlock {
half x;
half y[2];
layout(binding=12) half3x2 z;
bool w;
};
void main() {
sk_FragColor = half4(x, y[0], y[1], 0);
}