[Mesa-dev] [PATCH 06/10] i965/vec4: Do not mark used surfaces in SHADER_OPCODE_SHADER_TIME_ADD
Iago Toral Quiroga
itoral at igalia.com
Fri Oct 30 04:11:58 PDT 2015
Do it in the visitor, like we do for other opcodes.
---
src/mesa/drivers/dri/i965/brw_vec4.cpp | 3 +++
src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 2 --
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 3353e1e..05a7580 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -1793,6 +1793,9 @@ vec4_visitor::emit_shader_time_write(int shader_time_subindex, src_reg value)
vec4_instruction *inst =
emit(SHADER_OPCODE_SHADER_TIME_ADD, dst_reg(), src_reg(dst));
inst->mlen = 2;
+
+ brw_mark_surface_used(&prog_data->base,
+ prog_data->base.binding_table.shader_time_start);
}
void
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
index 297b7c2..8150c9a 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
@@ -1395,8 +1395,6 @@ generate_code(struct brw_codegen *p,
case SHADER_OPCODE_SHADER_TIME_ADD:
brw_shader_time_add(p, src[0],
prog_data->base.binding_table.shader_time_start);
- brw_mark_surface_used(&prog_data->base,
- prog_data->base.binding_table.shader_time_start);
break;
case SHADER_OPCODE_UNTYPED_ATOMIC:
--
1.9.1
More information about the mesa-dev
mailing list