From 4aaa19c3e714e44e6da587dd5289ec28aad7a6ec Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 4 Feb 2026 14:54:56 -0800 Subject: [PATCH] iris: Use the first FS input's value for all undefined FS inputs iris (and i965 before it) tried to to politely return <0, 0, 0, 1.0> as the value of undefined FS inputs. anv, however, just returns the value of the first FS input attribute. This makes iris match anv's behavior, eliminating some overrides and simplifying the code. Reviewed-by: Alyssa Rosenzweig Part-of: --- src/gallium/drivers/iris/iris_state.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 097fc6fd801..020b77dd2e8 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -4855,20 +4855,13 @@ iris_emit_sbe_swiz(struct iris_batch *batch, if (slot == -1 && fs_attr == VARYING_SLOT_COL1) slot = vue_map->varying_to_slot[VARYING_SLOT_BFC1]; - /* Not written by the previous stage - undefined. */ - if (slot == -1) { - attr->ComponentOverrideX = true; - attr->ComponentOverrideY = true; - attr->ComponentOverrideZ = true; - attr->ComponentOverrideW = true; - attr->ConstantSource = CONST_0001_FLOAT; + if (slot == -1) continue; - } /* Compute the location of the attribute relative to the read offset, * which is counted in 256-bit increments (two 128-bit VUE slots). */ - const int source_attr = slot - 2 * urb_read_offset; + const int source_attr = slot - 2 * (int) urb_read_offset; assert(source_attr >= 0 && source_attr <= 32); attr->SourceAttribute = source_attr;