If not opaque, then the color buffer will have to be read any way,
therefore the specialization is pointless.
lp_debug_fs_variant(variant);
}
- generate_fragment(lp, shader, variant, RAST_WHOLE);
generate_fragment(lp, shader, variant, RAST_EDGE_TEST);
+ if (variant->opaque) {
+ /* Specialized shader, which doesn't need to read the color buffer. */
+ generate_fragment(lp, shader, variant, RAST_WHOLE);
+ } else {
+ variant->jit_function[RAST_WHOLE] = variant->jit_function[RAST_EDGE_TEST];
+ }
+
return variant;
}