[Mesa-dev] [PATCH 10/10] i965: Don't add barrier deps for FB write messages.

Matt Turner mattst88 at gmail.com
Sat Mar 5 04:04:39 UTC 2016


Ken did this earlier, and this is just me reimplementing his patch a
little differently.
---
 src/mesa/drivers/dri/i965/brw_fs.cpp     | 6 ++++++
 src/mesa/drivers/dri/i965/brw_ir_fs.h    | 1 +
 src/mesa/drivers/dri/i965/brw_shader.cpp | 3 ++-
 3 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 261dff6..2ebd490 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -409,6 +409,12 @@ fs_inst::can_change_types() const
 }
 
 bool
+fs_inst::is_scheduling_barrier() const
+{
+   return this->eot || backend_instruction::is_scheduling_barrier();
+}
+
+bool
 fs_inst::has_side_effects() const
 {
    return this->eot || backend_instruction::has_side_effects();
diff --git a/src/mesa/drivers/dri/i965/brw_ir_fs.h b/src/mesa/drivers/dri/i965/brw_ir_fs.h
index c3eec2e..827c991 100644
--- a/src/mesa/drivers/dri/i965/brw_ir_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_ir_fs.h
@@ -204,6 +204,7 @@ public:
    int regs_read(int arg) const;
    bool can_do_source_mods(const struct brw_device_info *devinfo);
    bool can_change_types() const;
+   bool is_scheduling_barrier() const;
    bool has_side_effects() const;
    bool has_source_and_destination_hazard() const;
 
diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp
index 80673e5..8a0e0a0 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.cpp
+++ b/src/mesa/drivers/dri/i965/brw_shader.cpp
@@ -897,7 +897,6 @@ backend_instruction::is_scheduling_barrier() const
    case SHADER_OPCODE_URB_WRITE_SIMD8_MASKED:
    case SHADER_OPCODE_URB_WRITE_SIMD8_MASKED_PER_SLOT:
    case FS_OPCODE_PLACEHOLDER_HALT:
-   case FS_OPCODE_FB_WRITE:
    case SHADER_OPCODE_BARRIER:
    case TCS_OPCODE_URB_WRITE:
    case TCS_OPCODE_RELEASE_INPUT:
@@ -911,6 +910,8 @@ bool
 backend_instruction::has_side_effects() const
 {
    switch (opcode) {
+   case FS_OPCODE_FB_WRITE:
+      return true;
    default:
       return is_scheduling_barrier();
    }
-- 
2.4.10



More information about the mesa-dev mailing list