r600: fix a constant buffer memory leak for u_blitter

Fixes: 3d6e44fd - r300,r600,svga: save the FS constant buffer for u_blitter to fix a regression
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12131

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
(cherry picked from commit c7366985e5)

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32730>
This commit is contained in:
Marek Olšák 2024-12-11 11:34:49 -05:00 committed by Dylan Baker
parent bbd060b35c
commit ee4c664d4d
2 changed files with 6 additions and 2 deletions

View file

@ -414,7 +414,7 @@
"description": "r600: fix a constant buffer memory leak for u_blitter",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "3d6e44fd2a1a2790263fcd6d24a1cc606fed0de9",
"notes": null

View file

@ -16,8 +16,9 @@ enum r600_blitter_op /* bitmask */
R600_SAVE_TEXTURES = 2,
R600_SAVE_FRAMEBUFFER = 4,
R600_DISABLE_RENDER_COND = 8,
R600_SAVE_CONST_BUF0 = 16,
R600_CLEAR = R600_SAVE_FRAGMENT_STATE,
R600_CLEAR = R600_SAVE_FRAGMENT_STATE | R600_SAVE_CONST_BUF0,
R600_CLEAR_SURFACE = R600_SAVE_FRAGMENT_STATE | R600_SAVE_FRAMEBUFFER,
@ -61,6 +62,9 @@ static void r600_blitter_begin(struct pipe_context *ctx, enum r600_blitter_op op
util_blitter_save_depth_stencil_alpha(rctx->blitter, rctx->dsa_state.cso);
util_blitter_save_stencil_ref(rctx->blitter, &rctx->stencil_ref.pipe_state);
util_blitter_save_sample_mask(rctx->blitter, rctx->sample_mask.sample_mask, rctx->ps_iter_samples);
}
if (op & R600_SAVE_CONST_BUF0) {
util_blitter_save_fragment_constant_buffer_slot(rctx->blitter,
&rctx->constbuf_state[PIPE_SHADER_FRAGMENT].cb[0]);
}