From: Nanley Chery Date: Mon, 27 Feb 2017 22:09:03 +0000 (-0800) Subject: anv/cmd_buffer: Enable render pass awareness X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c78a959bcfab1ad20c3d5063886fb943c00db49e;p=mesa.git anv/cmd_buffer: Enable render pass awareness v2: Update cmd_state_reset (Jason Ekstrand) Signed-off-by: Nanley Chery Reviewed-by: Jason Ekstrand --- diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c index ef369c10f5b..cab1dd7305a 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 7f1f4a75587..85d6267277e 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; }