diff --git a/.pick_status.json b/.pick_status.json index d0fdb8ed81d..0d713e4472a 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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" }, diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c index b01886f2413..75acc62dbc7 100644 --- a/src/gallium/drivers/r600/evergreen_state.c +++ b/src/gallium/drivers/r600/evergreen_state.c @@ -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);