mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 04:20:08 +01:00
pco: treat all load_consts as 32-bit
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/37512>
This commit is contained in:
parent
c0df962fa0
commit
339ba75014
1 changed files with 6 additions and 2 deletions
|
|
@ -3386,8 +3386,8 @@ static pco_instr *trans_const(trans_ctx *tctx, nir_load_const_instr *nconst)
|
|||
return pco_mov(&tctx->b, dest, imm_reg);
|
||||
}
|
||||
|
||||
/* TODO: support more bit sizes/components. */
|
||||
assert(num_bits == 32);
|
||||
/* No 64-bit support yet. */
|
||||
assert(num_bits <= 32);
|
||||
|
||||
if (pco_ref_is_scalar(dest)) {
|
||||
assert(chans == 1);
|
||||
|
|
@ -3396,6 +3396,10 @@ static pco_instr *trans_const(trans_ctx *tctx, nir_load_const_instr *nconst)
|
|||
pco_ref imm =
|
||||
pco_ref_imm(val, pco_bits(num_bits), pco_ref_get_dtype(dest));
|
||||
|
||||
/* Override to 32-bit. */
|
||||
dest = pco_ref_bits(dest, 32);
|
||||
imm = pco_ref_bits(imm, 32);
|
||||
|
||||
return pco_movi32(&tctx->b, dest, imm);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue