skia2/tests/sksl/shared/Texture.sksl
Brian Osman 034f78a466 Detect non-2D textures in MetalCodeGenerator and fail cleanly
We were letting this get further, then asserting.

Bug: skia:10797
Change-Id: Iff6fe43aa32450b5a517c94773031d593f1f62a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/321794
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: Brian Osman <brianosman@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
2020-10-02 20:36:04 +00:00

11 lines
317 B
Plaintext

layout(binding=0) uniform sampler1D one;
layout(binding=1) uniform sampler2D two;
void main() {
float4 a = sample(one, 0);
float4 b = sample(two, float2(0));
float4 c = sample(one, float2(0));
float4 d = sample(two, float3(0));
sk_FragColor = half4(half(a.x), half(b.x), half(c.x), half(d.x));
}