aco: don't use 32-bit fp inline constants for fp16 vop3p literals
If we're applying the literal 0x3f800000 to a fp16 vop3p instruction, we shouldn't use the 1.0 inline constant, because the hardware will use the 16-bit 1.0: 0x00003c00. Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Daniel Schürmann <daniel@schuermann.dev> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16296>
This commit is contained in:
@@ -4595,7 +4595,7 @@ apply_literals(opt_ctx& ctx, aco_ptr<Instruction>& instr)
|
||||
Operand op = instr->operands[i];
|
||||
unsigned bits = get_operand_size(instr, i);
|
||||
if (op.isTemp() && ctx.info[op.tempId()].is_literal(bits) && ctx.uses[op.tempId()] == 0) {
|
||||
Operand literal = Operand::c32(ctx.info[op.tempId()].val);
|
||||
Operand literal = Operand::literal32(ctx.info[op.tempId()].val);
|
||||
instr->format = withoutDPP(instr->format);
|
||||
if (instr->isVALU() && i > 0 && instr->format != Format::VOP3P)
|
||||
to_VOP3(ctx, instr);
|
||||
|
||||
Reference in New Issue
Block a user