st/mesa: fix nir_load_per_vertex_input parameter

num_components should be 1 as we're loading an offset value.

Fixes: ec68f0492b ("st/mesa: switch GL_SELECT shader to IO intrinsics")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12774
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33982>
(cherry picked from commit 770b5bc757)
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2025-03-10 15:07:33 +01:00 committed by Eric Engestrom
parent 9557d9b93b
commit 6f0eb911f7
2 changed files with 2 additions and 2 deletions

View file

@ -2284,7 +2284,7 @@
"description": "st/mesa: fix nir_load_per_vertex_input parameter",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "ec68f0492b7540b374837dab6f4968cdbbfee7ef",
"notes": null

View file

@ -391,7 +391,7 @@ update_result_buffer(nir_builder *b, nir_def *dmin, nir_def *dmax,
{
nir_def *offset;
if (offset_from_attribute) {
offset = nir_load_per_vertex_input(b, 4, 32, nir_imm_int(b, 0),
offset = nir_load_per_vertex_input(b, 1, 32, nir_imm_int(b, 0),
nir_imm_int(b, 0),
.io_semantics.location = VARYING_SLOT_VAR0);
} else {