skia2/tests/sksl/intrinsics/DFdyNoRTFlip.glsl
Brian Osman 9fe0e3d4e7 SkSL: Add unit tests for new ForceNoRTFlip code-gen option
This removes the assert from the SPIR-V generator so the
tests compile. The generated SPIR-V is incorrect. The next
CL fixes the generator, and restores the assert.

Change-Id: I77b507cf7fb5eac481322887000bd1c73cd5c899
Bug: skia:13219
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/530336
Reviewed-by: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2022-04-15 12:59:07 +00:00

10 lines
473 B
GLSL

out vec4 sk_FragColor;
uniform vec4 testInputs;
uniform vec4 colorGreen;
uniform vec4 colorRed;
vec4 main() {
vec4 expected = vec4(0.0);
return ((((((dFdy(testInputs.x)) == expected.x && (dFdy(testInputs.xy)) == expected.xy) && (dFdy(testInputs.xyz)) == expected.xyz) && (dFdy(testInputs)) == expected) && sign((dFdy(coords.xx))) == vec2(0.0, 0.0)) && sign((dFdy(coords.yy))) == vec2(1.0, 1.0)) && sign((dFdy(coords))) == vec2(0.0, 1.0) ? colorGreen : colorRed;
}