mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
radeonsi/sqtt: clear out sqtt bo on resize
If the resizing fails, we shouldn't use the destroyed bo anymore.
Fixes: 5794a86f19 ("radeonsi/sqtt: support sqtt buffer auto-resizing")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38529>
This commit is contained in:
parent
9e76f5f2a2
commit
bac9d17ead
1 changed files with 2 additions and 1 deletions
|
|
@ -253,6 +253,7 @@ si_sqtt_resize_bo(struct si_context *sctx)
|
|||
/* Destroy the previous thread trace BO. */
|
||||
struct pb_buffer_lean *bo = sctx->sqtt->bo;
|
||||
radeon_bo_reference(sctx->screen->ws, &bo, NULL);
|
||||
sctx->sqtt->bo = NULL;
|
||||
|
||||
if (sctx->sqtt->buffer_size < UINT32_MAX / 2) {
|
||||
/* Double the size of the thread trace buffer per SE. */
|
||||
|
|
@ -488,7 +489,7 @@ void si_handle_sqtt(struct si_context *sctx, struct radeon_cmdbuf *rcs)
|
|||
|
||||
if (sctx->spm.ptr)
|
||||
sctx->ws->buffer_unmap(sctx->ws, sctx->spm.bo);
|
||||
} else {
|
||||
} else if (sctx->sqtt->bo) {
|
||||
if (!sctx->sqtt->trigger_file) {
|
||||
sctx->sqtt->start_frame = num_frames + 10;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue