[Mesa-dev] [PATCH 01/11] anv: Add support for INTEL_DEBUG=sync, state

Jason Ekstrand jason at jlekstrand.net
Fri Jun 17 20:53:18 UTC 2016


Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
Cc: "12.0" <mesa-stable at lists.freedesktop.org>
---
 src/intel/vulkan/gen8_cmd_buffer.c | 9 +++++++++
 src/intel/vulkan/genX_cmd_buffer.c | 9 +++++++++
 2 files changed, 18 insertions(+)

diff --git a/src/intel/vulkan/gen8_cmd_buffer.c b/src/intel/vulkan/gen8_cmd_buffer.c
index df4036a..2600615 100644
--- a/src/intel/vulkan/gen8_cmd_buffer.c
+++ b/src/intel/vulkan/gen8_cmd_buffer.c
@@ -365,6 +365,15 @@ genX(cmd_buffer_flush_compute_state)(struct anv_cmd_buffer *cmd_buffer)
 
    assert(pipeline->active_stages == VK_SHADER_STAGE_COMPUTE_BIT);
 
+   if (unlikely(INTEL_DEBUG & DEBUG_SYNC)) {
+      cmd_buffer->state.pending_pipe_bits =
+         ANV_PIPE_FLUSH_BITS | ANV_PIPE_INVALIDATE_BITS | ANV_PIPE_CS_STALL_BIT;
+   }
+
+   if (unlikely(INTEL_DEBUG & DEBUG_STATE)) {
+      cmd_buffer->state.dirty = ~0;
+   }
+
    genX(cmd_buffer_config_l3)(cmd_buffer, pipeline);
 
    genX(flush_pipeline_select_gpgpu)(cmd_buffer);
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index d9acf58..10ed73a 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -417,6 +417,15 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer)
 
    assert((pipeline->active_stages & VK_SHADER_STAGE_COMPUTE_BIT) == 0);
 
+   if (unlikely(INTEL_DEBUG & DEBUG_SYNC)) {
+      cmd_buffer->state.pending_pipe_bits =
+         ANV_PIPE_FLUSH_BITS | ANV_PIPE_INVALIDATE_BITS | ANV_PIPE_CS_STALL_BIT;
+   }
+
+   if (unlikely(INTEL_DEBUG & DEBUG_STATE)) {
+      cmd_buffer->state.dirty = ~0;
+   }
+
    genX(cmd_buffer_config_l3)(cmd_buffer, pipeline);
 
    genX(flush_pipeline_select_3d)(cmd_buffer);
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list