[Mesa-dev] [PATCH 07/10] i965/fs: Do not mark used surfaces in SHADER_OPCODE_SHADER_TIME_ADD

Iago Toral Quiroga itoral at igalia.com
Fri Oct 30 04:11:59 PDT 2015


Do it in the visitor, like we do for other opcodes.
---
 src/mesa/drivers/dri/i965/brw_fs.cpp           | 3 +++
 src/mesa/drivers/dri/i965/brw_fs_generator.cpp | 3 ---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 88a8612..1cfae5c 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -613,6 +613,9 @@ fs_visitor::SHADER_TIME_ADD(const fs_builder &bld,
       payload = vgrf(glsl_type::uint_type);
 
    bld.emit(SHADER_OPCODE_SHADER_TIME_ADD, fs_reg(), payload, offset, value);
+
+   brw_mark_surface_used(prog_data,
+                         prog_data->binding_table.shader_time_start);
 }
 
 void
diff --git a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
index 96d34b7..fbc2ea4 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_generator.cpp
@@ -1596,9 +1596,6 @@ fs_generator::generate_shader_time_add(fs_inst *inst,
    brw_shader_time_add(p, payload,
                        prog_data->binding_table.shader_time_start);
    brw_pop_insn_state(p);
-
-   brw_mark_surface_used(prog_data,
-                         prog_data->binding_table.shader_time_start);
 }
 
 void
-- 
1.9.1



More information about the mesa-dev mailing list