mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 12:40:09 +01: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> (cherry picked from commitbac9d17ead)
This commit is contained in:
parent
e2cb355e57
commit
0a416fb949
2 changed files with 3 additions and 2 deletions
|
|
@ -4614,7 +4614,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
|
||||
|
|
|
|||
|
|
@ -264,6 +264,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) {
|
||||
mesa_loge("Failed to read the trace");
|
||||
if (!sctx->sqtt->trigger_file) {
|
||||
sctx->sqtt->start_frame = num_frames + 10;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue