mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 20:00:11 +01:00
freedreno/ir3/group: fix for half-regs
If we're inserting a mov to resolve a conflict between meta:collect's (ie. for .zyx type swizzles, etc), we should use the correct precision. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5048>
This commit is contained in:
parent
fcfe5eff63
commit
b24b6a8365
2 changed files with 6 additions and 2 deletions
|
|
@ -1345,7 +1345,9 @@ static inline struct ir3_instruction *
|
|||
ir3_MOV(struct ir3_block *block, struct ir3_instruction *src, type_t type)
|
||||
{
|
||||
struct ir3_instruction *instr = ir3_instr_create(block, OPC_MOV);
|
||||
__ssa_dst(instr);
|
||||
unsigned flags = (type_size(type) < 32) ? IR3_REG_HALF : 0;
|
||||
|
||||
__ssa_dst(instr)->flags |= flags;
|
||||
if (src->regs[0]->flags & IR3_REG_ARRAY) {
|
||||
struct ir3_register *src_reg = __ssa_src(instr, src, IR3_REG_ARRAY);
|
||||
src_reg->array = src->regs[0]->array;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,9 @@ static void
|
|||
insert_mov(struct ir3_instruction *collect, int idx)
|
||||
{
|
||||
struct ir3_instruction *src = ssa(collect->regs[idx+1]);
|
||||
struct ir3_instruction *mov = ir3_MOV(src->block, src, TYPE_F32);
|
||||
struct ir3_instruction *mov = ir3_MOV(src->block, src,
|
||||
(collect->regs[idx+1]->flags & IR3_REG_HALF) ? TYPE_U16 : TYPE_U32);
|
||||
|
||||
collect->regs[idx+1]->instr = mov;
|
||||
|
||||
/* if collect and src are in the same block, move the inserted mov
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue