From 537bb1da98c34eafbed714d468c56fc0af543e49 Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Wed, 14 Feb 2018 11:53:49 -0800 Subject: glsl: Specify framebuffer fetch coherency mode in lower_blend_equation_advanced(). This requires passing an extra argument to the lowering pass because the KHR_blend_equation_advanced specification doesn't seem to define any mechanism for the implementation to determine at compile-time whether coherent blending can ever be used (not even an "#extension KHR_blend_equation_advanced_coherent" directive seems to be required in the shader source AFAICT). In the long run we'll probably want to do state-dependent recompiles based on the value of ctx->Color.BlendCoherent, but right now there would be no benefit from that because the only driver that supports coherent framebuffer fetch is i965 on SKL+ hardware, which are unable to support the non-coherent path for the moment because of texture layout issues, so framebuffer fetch coherency is always enabled for them. Reviewed-by: Plamena Manolova --- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mesa/state_tracker') diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 7fef93949e8..ccf4dabcc9f 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -7056,7 +7056,8 @@ st_link_shader(struct gl_context *ctx, struct gl_shader_program *prog) do_mat_op_to_vec(ir); if (stage == MESA_SHADER_FRAGMENT) - lower_blend_equation_advanced(shader); + lower_blend_equation_advanced( + shader, ctx->Extensions.KHR_blend_equation_advanced_coherent); lower_instructions(ir, MOD_TO_FLOOR | -- cgit v1.2.3