[Mesa-dev] [PATCH v2 14/18] anv/cmd_buffer: Enable render pass awareness
Nanley Chery
nanleychery at gmail.com
Wed Mar 1 22:30:35 UTC 2017
v2: Update cmd_state_reset (Jason Ekstrand)
Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
---
src/intel/vulkan/anv_cmd_buffer.c | 3 +++
src/intel/vulkan/genX_cmd_buffer.c | 7 +++++++
2 files changed, 10 insertions(+)
diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c
index 08e9c50646..72aa2683d0 100644
--- a/src/intel/vulkan/anv_cmd_buffer.c
+++ b/src/intel/vulkan/anv_cmd_buffer.c
@@ -131,6 +131,9 @@ anv_cmd_state_reset(struct anv_cmd_buffer *cmd_buffer)
state->descriptors_dirty = 0;
state->push_constants_dirty = 0;
state->pipeline = NULL;
+ state->framebuffer = NULL;
+ state->pass = NULL;
+ state->subpass = NULL;
state->push_constant_stages = 0;
state->restart_index = UINT32_MAX;
state->dynamic = default_dynamic_state;
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index 1667b5d44b..a9c77cf10e 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -2452,4 +2452,11 @@ void genX(CmdEndRenderPass)(
#ifndef NDEBUG
anv_dump_add_framebuffer(cmd_buffer, cmd_buffer->state.framebuffer);
#endif
+
+ /* Remove references to render pass specific state. This enables us to
+ * detect whether or not we're in a renderpass.
+ */
+ cmd_buffer->state.framebuffer = NULL;
+ cmd_buffer->state.pass = NULL;
+ cmd_buffer->state.subpass = NULL;
}
--
2.12.0
More information about the mesa-dev
mailing list