mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-10 03:28:18 +02:00
tu: Fix memory leak of patchpoints_ctx in dynamic rendering
tu_CmdBeginRendering was unconditionally allocating a new
patchpoints_ctx. When resuming a render pass chain, this overwrote the
existing context from the suspended pass, leaking it and all associated
FDM patchpoints.
Fixes: 0dd06c74d6 ("tu: Fix FDM patchpoint memory leak")
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39639>
This commit is contained in:
parent
ce4d338b0d
commit
d4ad50752f
1 changed files with 1 additions and 2 deletions
|
|
@ -7300,8 +7300,6 @@ tu_CmdBeginRendering(VkCommandBuffer commandBuffer,
|
|||
};
|
||||
vk_cmd_set_rendering_attachment_locations(&cmd->vk, &ral_info);
|
||||
|
||||
cmd->patchpoints_ctx = ralloc_context(NULL);
|
||||
|
||||
a = cmd->dynamic_subpasses[0].fsr_attachment;
|
||||
if (a != VK_ATTACHMENT_UNUSED) {
|
||||
const VkRenderingFragmentShadingRateAttachmentInfoKHR *fsr_info =
|
||||
|
|
@ -7362,6 +7360,7 @@ tu_CmdBeginRendering(VkCommandBuffer commandBuffer,
|
|||
tu_fill_render_pass_state(&cmd->state.vk_rp, cmd->state.pass, cmd->state.subpass);
|
||||
|
||||
if (!resuming) {
|
||||
cmd->patchpoints_ctx = ralloc_context(NULL);
|
||||
tu_emit_renderpass_begin(cmd);
|
||||
tu_emit_subpass_begin<CHIP>(cmd);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue