anv: Early-exit from cmd_buffer_flush_state
If we don't have any dynamic state, pipeline, or descriptor changes, we can do a very quick early-exit instead of checking for a bunch of stuff bit-by-bit. Tested-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8594>
This commit is contained in:

committed by
Marge Bot

parent
18fc1dfea3
commit
0e1447eb1b
@@ -3518,6 +3518,12 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer)
|
||||
|
||||
cmd_buffer->state.gfx.vb_dirty &= ~vb_emit;
|
||||
|
||||
uint32_t descriptors_dirty = cmd_buffer->state.descriptors_dirty &
|
||||
pipeline->active_stages;
|
||||
if (!cmd_buffer->state.gfx.dirty && !descriptors_dirty &&
|
||||
!cmd_buffer->state.push_constants_dirty)
|
||||
return;
|
||||
|
||||
if ((cmd_buffer->state.gfx.dirty & ANV_CMD_DIRTY_XFB_ENABLE) ||
|
||||
(GEN_GEN == 7 && (cmd_buffer->state.gfx.dirty &
|
||||
ANV_CMD_DIRTY_PIPELINE))) {
|
||||
@@ -3594,9 +3600,6 @@ genX(cmd_buffer_flush_state)(struct anv_cmd_buffer *cmd_buffer)
|
||||
}
|
||||
#endif
|
||||
|
||||
uint32_t descriptors_dirty = cmd_buffer->state.descriptors_dirty &
|
||||
pipeline->active_stages;
|
||||
|
||||
/* Render targets live in the same binding table as fragment descriptors */
|
||||
if (cmd_buffer->state.gfx.dirty & ANV_CMD_DIRTY_RENDER_TARGETS)
|
||||
descriptors_dirty |= VK_SHADER_STAGE_FRAGMENT_BIT;
|
||||
|
Reference in New Issue
Block a user