summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2014-07-21 21:59:37 -0400
committerMarek Olšák <[email protected]>2015-07-23 00:59:28 +0200
commit567f1b2ee89bf05f0600e9e79847140555f0a035 (patch)
treea98dcb1c40df75bd078f40788b196ba71edc7a82 /src/mesa
parent61846f222fffeba846f9f7277aba9cc7d48323ed (diff)
glsl: pass shader stage to lower_output_reads and handle tess control
Tessellation control outputs can be read in directly without first having been written. Accessing these will require some special logic anyways, so just let them through. V2: Never lower tess control output reads, whether patch or not -- both can be read back by other threads. Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Chris Forbes <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_shader.cpp2
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index 379ff4a3a1a..9d60543c167 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -316,7 +316,7 @@ process_glsl_ir(gl_shader_stage stage,
} while (progress);
if (options->NirOptions != NULL)
- lower_output_reads(shader->ir);
+ lower_output_reads(stage, shader->ir);
validate_ir_tree(shader->ir);
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index b727c5e9c93..0ed16aeab87 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -5674,7 +5674,7 @@ get_mesa_program(struct gl_context *ctx,
prog->Parameters);
/* Remove reads from output registers. */
- lower_output_reads(shader->ir);
+ lower_output_reads(shader->Stage, shader->ir);
/* Emit intermediate IR for main(). */
visit_exec_list(shader->ir, v);