mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
r600: fix refcnt imbalance related to evergreen_set_shader_images()
Indeed, the reference was overwritten. For instance, this issue is triggered with: "piglit/bin/shader_runner tests/spec/arb_shader_image_load_store/execution/write-to-rendered-image.shader_test -auto -fbo" while setting GALLIUM_REFCNT_LOG=refcnt.log. Fixes:a6b3792843("r600: add core pieces of image support.") Signed-off-by: Patrick Lerda <patrick9876@free.fr> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22394> (cherry picked from commit4f42d3b843)
This commit is contained in:
parent
de36799f15
commit
eb3df9b189
2 changed files with 3 additions and 2 deletions
|
|
@ -580,7 +580,7 @@
|
|||
"description": "r600: fix refcnt imbalance related to evergreen_set_shader_images()",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "a6b379284365e8adee780b691596d3a66de1ba93"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -4283,8 +4283,9 @@ static void evergreen_set_shader_images(struct pipe_context *ctx,
|
|||
|
||||
r600_context_add_resource_size(ctx, image);
|
||||
|
||||
struct pipe_resource *const pipe_saved = rview->base.resource;
|
||||
rview->base = *iview;
|
||||
rview->base.resource = NULL;
|
||||
rview->base.resource = pipe_saved;
|
||||
pipe_resource_reference((struct pipe_resource **)&rview->base.resource, image);
|
||||
|
||||
evergreen_setup_immed_buffer(rctx, rview, iview->format);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue