mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 11:48:06 +02:00
zink: fix leak when rebinding same image surface
simple way to reproduce this is to run these 4 together: KHR-GL46.gpu_shader5.images_array_indexing KHR-GL46.shader_image_load_store.advanced-allMips KHR-GL46.shader_image_load_store.advanced-sso-simple KHR-GL46.shader_image_load_store.incomplete_textures cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21134>
This commit is contained in:
parent
4c647c9e25
commit
104040b5c7
1 changed files with 4 additions and 1 deletions
|
|
@ -1814,8 +1814,11 @@ zink_set_shader_images(struct pipe_context *pctx,
|
|||
res->image_bind_count[p_stage == MESA_SHADER_COMPUTE]++;
|
||||
update_res_bind_count(ctx, res, p_stage == MESA_SHADER_COMPUTE, false);
|
||||
unbind_shader_image(ctx, p_stage, start_slot + i);
|
||||
image_view->surface = surface;
|
||||
} else {
|
||||
/* create_image_surface will always increment ref */
|
||||
zink_surface_reference(zink_screen(ctx->base.screen), &surface, NULL);
|
||||
}
|
||||
image_view->surface = surface;
|
||||
finalize_image_bind(ctx, res, p_stage == MESA_SHADER_COMPUTE);
|
||||
zink_batch_resource_usage_set(&ctx->batch, res,
|
||||
zink_resource_access_is_write(access), false);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue