skia2/resources/sksl/spirv/InterfaceBlockPushConstant.sksl
Brian Osman e051cd35e4 Disallow 'binding' and 'set' on push constants
These aren't allowed on push constants (it's a validation error now), so
we at least catch it in the SPIRV generator and emit an error. Fixed two
places where we were breaking this rule when automatically adjusting
layouts for interface blocks.

Bug: skia:12670
Change-Id: I08b88f4c2844da77239207817f49510118be4e60
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/474976
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
2021-11-24 19:27:14 +00:00

9 lines
196 B
Plaintext

layout(push_constant) uniform testBlock {
layout(offset=16) half2x2 m1;
layout(offset=32) half2x2 m2;
};
void main() {
sk_FragColor = half4(m1[0][0], m1[1][1], m2[0][0], m2[1][1]);
}