lavapipe: fix sampler + sampler view leaks.

The compute sampler views are using a different method
of generation so have to be deleted explicitly.

Fixes: e94fd4cc65 ("lavapipe: rename vallium to lavapipe")

Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14939>
This commit is contained in:
Dave Airlie 2022-02-08 18:24:12 +10:00
parent 1f5330de3a
commit 2f9089f6de
1 changed files with 12 additions and 0 deletions

View File

@ -4116,6 +4116,18 @@ VkResult lvp_execute_cmds(struct lvp_device *device,
}
}
for (enum pipe_shader_type s = PIPE_SHADER_VERTEX; s < PIPE_SHADER_TYPES; s++) {
for (unsigned i = 0; i < PIPE_MAX_SAMPLERS; i++) {
if (state.sv[s][i])
pipe_sampler_view_reference(&state.sv[s][i], NULL);
}
}
for (unsigned i = 0; i < PIPE_MAX_SAMPLERS; i++) {
if (state.cso_ss_ptr[PIPE_SHADER_COMPUTE][i])
state.pctx->delete_sampler_state(state.pctx, state.ss_cso[PIPE_SHADER_COMPUTE][i]);
}
free(state.imageless_views);
free(state.pending_clear_aspects);
free(state.cleared_views);