radv: re-emit the guardband state when restoring meta operations
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 4 Nov 2022 09:19:48 +0000 (10:19 +0100)
committerMarge Bot <emma+marge@anholt.net>
Mon, 7 Nov 2022 13:42:51 +0000 (13:42 +0000)
Meta operations change dynamic states like viewports and previously,
the guardband state was also always re-emitted because it relied on
dynamic viewport/scissor changes.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7577
Fixes: 40d8df72808 ("radv: emit the guardband state separately from the scissor state")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19521>

src/amd/vulkan/radv_meta.c

index ca4c30f..b442c20 100644 (file)
@@ -163,6 +163,9 @@ radv_meta_restore(const struct radv_meta_saved_state *state, struct radv_cmd_buf
       /* Restore all dynamic states. */
       cmd_buffer->state.dynamic = state->dynamic;
       cmd_buffer->state.dirty |= RADV_DYNAMIC_ALL;
+
+      /* Re-emit the guardband state because meta operations changed dynamic states. */
+      cmd_buffer->state.dirty |= RADV_CMD_DIRTY_GUARDBAND;
    }
 
    if (state->flags & RADV_META_SAVE_COMPUTE_PIPELINE) {