skia2/tests/sksl/shared/Texture2D.sksl
John Stiles 47ee0caa10 Split Texture test into separate 1D and 2D tests.
This improves the test output for Metal. Previously, the Metal output
was just an error message, since 1D textures were unsupported. Now we
have a valid golden output for the 2D case in Metal. (1D is still
unsupported and is likely to remain unsupported; Skia currently has no
use case for 1D textures.)

Change-Id: I91977712030f08e371cc6bfb2afa578940ca00b7
Bug: skia:10797
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330940
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2020-11-02 14:39:31 +00:00

8 lines
190 B
Plaintext

layout(binding=0) uniform sampler2D tex;
void main() {
float4 a = sample(tex, float2(0));
float4 b = sample(tex, float3(0));
sk_FragColor = half4(float2(a.xy), float2(b.zw));
}