glsl_to_ir: do lower_blend_equation if PIPE_CAP_FBFETCH
authorElie Tournier <tournier.elie@gmail.com>
Tue, 2 Jun 2020 13:03:14 +0000 (14:03 +0100)
committerMarge Bot <eric+marge@anholt.net>
Fri, 17 Jul 2020 06:19:16 +0000 (06:19 +0000)
Signed-off-by: Elie Tournier <elie.tournier@collabora.com>
Reviewed-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5516>

src/mesa/state_tracker/st_glsl_to_ir.cpp

index e450fec6d99275e09de225fa5cd74ceb515d2562..5025eaa7a7bb95e8e2d3e2e3418aa379ecc41a8a 100644 (file)
@@ -122,7 +122,7 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog)
          lower_offset_arrays(ir);
       do_mat_op_to_vec(ir);
 
-      if (stage == MESA_SHADER_FRAGMENT)
+      if (stage == MESA_SHADER_FRAGMENT && pscreen->get_param(pscreen, PIPE_CAP_FBFETCH))
          lower_blend_equation_advanced(
             shader, ctx->Extensions.KHR_blend_equation_advanced_coherent);