From b5a424519304efdab21ebb4950eb72e28ed98cc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 5 Oct 2025 22:58:39 -0400 Subject: [PATCH] gallium/noop: don't unref buffers passed to set_vertex_buffers to fix crashes this code is invalid after the refcounting rework Fixes: b3133e250e1 - gallium: add pipe_context::resource_release to eliminate buffer refcounting Reviewed-by: Pierre-Eric Pelloux-Prayer (cherry picked from commit 7d22e4c7ba81d12b5184786e3c0f5a5a2ad6c150) Part-of: --- .pick_status.json | 2 +- src/gallium/auxiliary/driver_noop/noop_state.c | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 470cd38f175..f33ea815212 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -714,7 +714,7 @@ "description": "gallium/noop: don't unref buffers passed to set_vertex_buffers to fix crashes", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "b3133e250e1c40496d98c4ba52386b7ae423d194", "notes": null diff --git a/src/gallium/auxiliary/driver_noop/noop_state.c b/src/gallium/auxiliary/driver_noop/noop_state.c index 350f1807226..1334931b8b3 100644 --- a/src/gallium/auxiliary/driver_noop/noop_state.c +++ b/src/gallium/auxiliary/driver_noop/noop_state.c @@ -185,12 +185,6 @@ static void noop_set_vertex_buffers(struct pipe_context *ctx, unsigned count, const struct pipe_vertex_buffer *buffers) { - for (unsigned i = 0; i < count; i++) { - if (!buffers[i].is_user_buffer) { - struct pipe_resource *buf = buffers[i].buffer.resource; - pipe_resource_reference(&buf, NULL); - } - } } static void *noop_create_vertex_elements(struct pipe_context *ctx,