radv: re-emit the guardband state when related PSO are bound

If one of the related states is static, the guardband state needs to be
re-emitted when a graphics pipeline is bound.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8828
Fixes: 40d8df7280 ("radv: emit the guardband state separately from the scissor state")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22472>
(cherry picked from commit ba71b142f8)
This commit is contained in:
Samuel Pitoiset 2023-04-13 17:40:50 +02:00 committed by Eric Engestrom
parent 7809a85f14
commit d43aff3a21
2 changed files with 7 additions and 1 deletions

View file

@ -472,7 +472,7 @@
"description": "radv: re-emit the guardband state when related PSO are bound",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "40d8df728081e050b83ff0677ce4bf947e234a03"
},

View file

@ -245,6 +245,12 @@ radv_bind_dynamic_state(struct radv_cmd_buffer *cmd_buffer, const struct radv_dy
#undef RADV_CMP_COPY
cmd_buffer->state.dirty |= dest_mask;
/* Handle driver specific states that need to be re-emitted when PSO are bound. */
if (dest_mask & (RADV_DYNAMIC_VIEWPORT | RADV_DYNAMIC_POLYGON_MODE | RADV_DYNAMIC_LINE_WIDTH |
RADV_DYNAMIC_PRIMITIVE_TOPOLOGY)) {
cmd_buffer->state.dirty |= RADV_CMD_DIRTY_GUARDBAND;
}
}
bool