mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 22:49:13 +02:00
pan/bi: Allow CSE of preloaded registers
Needed to CSE `LEA_VARY` in varying shaders on Valhall. No shader-db changes on Bifrost. Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15204>
This commit is contained in:
parent
3154df232b
commit
600f689a98
1 changed files with 5 additions and 2 deletions
|
|
@ -139,9 +139,12 @@ instr_can_cse(const bi_instr *I)
|
|||
return false;
|
||||
}
|
||||
|
||||
/* Similar refuse to CSE non-SSA sources */
|
||||
/* Similar refuse to CSE non-SSA sources. We allow machine registers,
|
||||
* since CSE runs before register allocation which means any registers
|
||||
* encountered are preloaded and hence assumed constant.
|
||||
*/
|
||||
bi_foreach_src(I, s) {
|
||||
if (I->src[s].reg || I->src[s].type == BI_INDEX_REGISTER)
|
||||
if (I->src[s].reg)
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue