r600/sfn: override register ID when it doesn't matter
When a vec4 register only uses constant value of ignore swizzles then emit zero as register ID. Optimizing the register use in instructions that support this type of swizzle may lead to the situation that the RA doesn't see the register ID, because it is actually irreleant, in this case return zero as register ID to avoid that the assembler uselessly reports a high requirement for registers based on a stale register ID. Fixes:79ca456b48
r600/sfn: rewrite NIR backend Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18343> (cherry picked from commited294e0863
)
This commit is contained in:
@@ -7060,7 +7060,7 @@
|
||||
"description": "r600/sfn: override register ID when it doesn't matter",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "79ca456b4837b3bc21cf9ef3c03c505c4b4909f6"
|
||||
},
|
||||
|
@@ -433,7 +433,7 @@ int RegisterVec4::sel() const
|
||||
int comp = 0;
|
||||
while (comp < 4 && m_values[comp]->value()->chan() > 3)
|
||||
++comp;
|
||||
return m_values[comp < 4 ? comp : 0]->value()->sel();
|
||||
return comp < 4 ? m_values[comp]->value()->sel() : 0;
|
||||
}
|
||||
|
||||
bool RegisterVec4::ready(int block_id, int index) const
|
||||
|
Reference in New Issue
Block a user