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 <alyssa.rosenzweig@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38121>
This commit is contained in:
Kenneth Graunke 2026-02-04 14:54:56 -08:00
parent b5c23b4785
commit 4aaa19c3e7

View file

@ -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;