mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +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> (cherry picked from commitbac9d17ead) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38803>
This commit is contained in:
parent
72c77df965
commit
3134ebd354
2 changed files with 3 additions and 2 deletions
|
|
@ -524,7 +524,7 @@
|
|||
"description": "radeonsi/sqtt: clear out sqtt bo on resize",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "5794a86f1918919435a85be07c58010fb8578a6d",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -265,6 +265,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;
|
||||
|
||||
/* Double the size of the thread trace buffer per SE. */
|
||||
sctx->sqtt->buffer_size *= 2;
|
||||
|
|
@ -490,7 +491,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