glsl: Specify framebuffer fetch coherency mode in lower_blend_equation_advanced().
authorFrancisco Jerez <currojerez@riseup.net>
Wed, 14 Feb 2018 19:53:49 +0000 (11:53 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Sat, 24 Feb 2018 23:28:36 +0000 (15:28 -0800)
commit537bb1da98c34eafbed714d468c56fc0af543e49
treee2b9eb2585c75d156f7c27da116b21143fc5e71d
parentef9e3f63ca369e3549b4f17b39934dc4b3cbbb05
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 <plamena.manolova@intel.com>
src/compiler/glsl/ir_optimization.h
src/compiler/glsl/lower_blend_equation_advanced.cpp
src/mesa/drivers/dri/i965/brw_link.cpp
src/mesa/state_tracker/st_glsl_to_tgsi.cpp