mirror of https://gitlab.freedesktop.org/mesa/mesa
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
6cb9f60cb0
commit
f18be07792
|
@ -2074,7 +2074,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",
|
||||
"notes": null
|
||||
|
|
|
@ -4269,8 +4269,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…
Reference in New Issue