From 7de75bafc6be016b70664ebb65715bb0bc03705c Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Thu, 21 Aug 2025 14:38:25 +0200 Subject: [PATCH] r600/sfn/tests: Update source pinning when loading from string Results of TEX and FETCH are pinned to group automatically when creating instructions from string. With the new scheduling code the channel pinning might be added and this needs to be handled when reading the expectation shaders. Signed-off-by: Gert Wollny Part-of: --- src/gallium/drivers/r600/sfn/sfn_valuefactory.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/gallium/drivers/r600/sfn/sfn_valuefactory.cpp b/src/gallium/drivers/r600/sfn/sfn_valuefactory.cpp index 1273e036d07..6d194a8ceb1 100644 --- a/src/gallium/drivers/r600/sfn/sfn_valuefactory.cpp +++ b/src/gallium/drivers/r600/sfn/sfn_valuefactory.cpp @@ -778,6 +778,13 @@ ValueFactory::src_from_string(const std::string& s) } return array->element(offset, addr, chan - array->frac()); } else { + auto old_pin = ireg->second->pin(); + if (old_pin != p) { + if ((old_pin == pin_group && p == pin_chgr) || + ((old_pin == pin_free || old_pin == pin_none) && + (p == pin_chan || p == pin_group))) + ireg->second->set_pin(p); + } return ireg->second; } } else {