mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-18 12:20:35 +01:00
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:79ca456b48r600/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:
parent
c9d05409ae
commit
c559159b71
2 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue