mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 12:50:10 +01:00
pco: pygen: propagate selected source for ops with multiple source selections
Signed-off-by: Simon Perretta <simon.perretta@imgtec.com> Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412>
This commit is contained in:
parent
61602bb08d
commit
329d219ef2
2 changed files with 31 additions and 1 deletions
|
|
@ -2499,6 +2499,36 @@ ref_src_map_valid(pco_ref ref, enum pco_io mapped_src, bool *needs_s124)
|
|||
return false;
|
||||
}
|
||||
|
||||
static inline enum pco_srcsel pco_ref_srcsel(pco_ref ref)
|
||||
{
|
||||
enum pco_io io = pco_ref_get_io(ref);
|
||||
|
||||
switch (io) {
|
||||
case PCO_IO_S0:
|
||||
return PCO_SRCSEL_S0;
|
||||
|
||||
case PCO_IO_S1:
|
||||
return PCO_SRCSEL_S1;
|
||||
|
||||
case PCO_IO_S2:
|
||||
return PCO_SRCSEL_S2;
|
||||
|
||||
case PCO_IO_S3:
|
||||
return PCO_SRCSEL_S3;
|
||||
|
||||
case PCO_IO_S4:
|
||||
return PCO_SRCSEL_S4;
|
||||
|
||||
case PCO_IO_S5:
|
||||
return PCO_SRCSEL_S5;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
UNREACHABLE("");
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Returns whether none of the lower/upper sources in an instruction
|
||||
* group are set.
|
||||
|
|
|
|||
|
|
@ -1135,7 +1135,7 @@ encode_map(O_LD,
|
|||
('drc', ('pco_ref_get_drc', SRC(0))),
|
||||
('burstlen', ('pco_ref_get_imm', SRC(1))),
|
||||
|
||||
('srcseladd', 's0'),
|
||||
('srcseladd', ('pco_ref_srcsel', SRC(2))),
|
||||
('cachemode_ld', OM_MCU_CACHE_MODE_LD)
|
||||
])
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue