diff options
author | Jason Ekstrand <[email protected]> | 2016-10-06 15:50:21 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-10-06 16:52:31 -0700 |
commit | fe4e276b02615b5db8acbf4c65fcfa68982e2e0f (patch) | |
tree | ad10ba47dd5372a2bc6f853afdec56405c86ca16 | |
parent | a1db0e87ffe8cbb567d0f7eb3a9036288eb1036c (diff) |
anv/cmd_buffer: Rework descriptor dirtying in set_subpass
We have a DIRTY_RENDER_TARGETS flag and that makes a lot more sense than
just dirtying fragment descriptors. We're checking for it in some of the
gen7 code but unfortunately, nothing was setting it and it didn't do what
it was supposed to do in cmd_buffer_flush_state.
Signed-off-by: Jason Ekstrand <[email protected]>
-rw-r--r-- | src/intel/vulkan/genX_cmd_buffer.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 6a84383c9ad..5fbf3a2d920 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -711,6 +711,10 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer) } #endif + /* Render targets live in the same binding table as fragment descriptors */ + if (cmd_buffer->state.dirty & ANV_CMD_DIRTY_RENDER_TARGETS) + cmd_buffer->state.descriptors_dirty |= VK_SHADER_STAGE_FRAGMENT_BIT; + /* We emit the binding tables and sampler tables first, then emit push * constants and then finally emit binding table and sampler table * pointers. It has to happen in this order, since emitting the binding @@ -1301,7 +1305,7 @@ genX(cmd_buffer_set_subpass)(struct anv_cmd_buffer *cmd_buffer, { cmd_buffer->state.subpass = subpass; - cmd_buffer->state.descriptors_dirty |= VK_SHADER_STAGE_FRAGMENT_BIT; + cmd_buffer->state.dirty |= ANV_CMD_DIRTY_RENDER_TARGETS; cmd_buffer_emit_depth_stencil(cmd_buffer); } |