summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/compiler/glsl/ir_optimization.h2
-rw-r--r--src/compiler/glsl/lower_blend_equation_advanced.cpp3
-rw-r--r--src/mesa/drivers/dri/i965/brw_link.cpp3
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp3
4 files changed, 7 insertions, 4 deletions
diff --git a/src/compiler/glsl/ir_optimization.h b/src/compiler/glsl/ir_optimization.h
index 2b8c195151a..81049a479e8 100644
--- a/src/compiler/glsl/ir_optimization.h
+++ b/src/compiler/glsl/ir_optimization.h
@@ -166,7 +166,7 @@ bool lower_tess_level(gl_linked_shader *shader);
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);
diff --git a/src/compiler/glsl/lower_blend_equation_advanced.cpp b/src/compiler/glsl/lower_blend_equation_advanced.cpp
index c6db58142cd..b05a2e0f0bb 100644
--- a/src/compiler/glsl/lower_blend_equation_advanced.cpp
+++ b/src/compiler/glsl/lower_blend_equation_advanced.cpp
@@ -462,7 +462,7 @@ get_main(gl_linked_shader *sh)
}
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;
@@ -480,6 +480,7 @@ lower_blend_equation_advanced(struct gl_linked_shader *sh)
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,
diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp b/src/mesa/drivers/dri/i965/brw_link.cpp
index f0598f591ab..b08b56a9353 100644
--- a/src/mesa/drivers/dri/i965/brw_link.cpp
+++ b/src/mesa/drivers/dri/i965/brw_link.cpp
@@ -99,7 +99,8 @@ process_glsl_ir(struct brw_context *brw,
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().
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 |