Commit a3d93eec authored by Bas Nieuwenhuizen's avatar Bas Nieuwenhuizen

radv: Use less conservative approximation for context rolls.

Drops the number of time we set the scissor by 4x for F1 2017,
which results in a consistent performance improvement of about 4%.
Reviewed-by: Samuel Pitoiset's avatarSamuel Pitoiset <>
parent 4d08c1e7
......@@ -3299,10 +3299,13 @@ static bool radv_need_late_scissor_emission(struct radv_cmd_buffer *cmd_buffer,
if (!cmd_buffer->device->physical_device->has_scissor_bug)
return false;
uint32_t used_states = cmd_buffer->state.pipeline->graphics.needed_dynamic_state | ~RADV_CMD_DIRTY_DYNAMIC_ALL;
/* Index & Vertex buffer don't change context regs, and pipeline is handled later. */
/* Assume all state changes except these two can imply context rolls. */
if (cmd_buffer->state.dirty & ~(RADV_CMD_DIRTY_INDEX_BUFFER |
if (cmd_buffer->state.dirty & used_states)
return true;
if (cmd_buffer->state.emitted_pipeline != cmd_buffer->state.pipeline)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment