From 6b4cde8eade2ebed6a31b76b3fc9ebf5adc7a856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corentin=20No=C3=ABl?= Date: Mon, 11 Sep 2023 16:53:03 +0200 Subject: [PATCH] llvmpipe: make sure to initialize the lp_setup_context slots with the default values MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As 0 is an actual valid value, this can lead to issues when we actually want to use them. This fixes `spec@arb_cull_distance@basic-cull-3` crashes for instance. Cc: mesa-stable Signed-off-by: Corentin Noël Reviewed-by: Mike Blumenkrantz Part-of: (cherry picked from commit 010147cd642cf8a5213b5a368b16a8299b04e590) --- .pick_status.json | 2 +- src/gallium/drivers/llvmpipe/lp_setup.c | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index 4887b933ebc..4c36dcbe881 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2596,7 +2596,7 @@ "description": "llvmpipe: make sure to initialize the lp_setup_context slots with the default values", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/llvmpipe/lp_setup.c b/src/gallium/drivers/llvmpipe/lp_setup.c index 086f019bc52..8bb10cf186e 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup.c +++ b/src/gallium/drivers/llvmpipe/lp_setup.c @@ -1546,6 +1546,11 @@ lp_setup_create(struct pipe_context *pipe, lp_setup_init_vbuf(setup); + setup->psize_slot = -1; + setup->viewport_index_slot = -1; + setup->layer_slot = -1; + setup->face_slot = -1; + /* Used only in update_state(): */ setup->pipe = pipe;