bool lower_vertex_id(gl_linked_shader *shader);
bool lower_cs_derived(gl_linked_shader *shader);
-bool lower_blend_equation_advanced(gl_linked_shader *shader);
+bool lower_blend_equation_advanced(gl_linked_shader *shader, bool coherent);
bool lower_subroutine(exec_list *instructions, struct _mesa_glsl_parse_state *state);
void propagate_invariance(exec_list *instructions);
}
bool
-lower_blend_equation_advanced(struct gl_linked_shader *sh)
+lower_blend_equation_advanced(struct gl_linked_shader *sh, bool coherent)
{
if (sh->Program->sh.fs.BlendSupport == 0)
return false;
fb->data.location = FRAG_RESULT_DATA0;
fb->data.read_only = 1;
fb->data.fb_fetch_output = 1;
+ fb->data.memory_coherent = coherent;
fb->data.how_declared = ir_var_hidden;
ir_variable *mode = new(mem_ctx) ir_variable(glsl_type::uint_type,
ralloc_adopt(mem_ctx, shader->ir);
- lower_blend_equation_advanced(shader);
+ lower_blend_equation_advanced(
+ shader, ctx->Extensions.KHR_blend_equation_advanced_coherent);
/* lower_packing_builtins() inserts arithmetic instructions, so it
* must precede lower_instructions().
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 |