mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-18 12:58:22 +02:00
nv50/ir: use round toward 0 when converting doubles to integers
Like floats, we should use the round toward 0 mode instead of the
nearest one (which is the default) for doubles to integers.
This fixes all arb_gpu_shader_fp64 piglits which convert doubles to
integers (16 tests).
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "11.2 12.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 08ddfe7b2f)
This commit is contained in:
parent
b9920d2bba
commit
4306e01ece
1 changed files with 3 additions and 1 deletions
|
|
@ -3597,7 +3597,9 @@ Converter::handleInstruction(const struct tgsi_full_instruction *insn)
|
|||
src0 = fetchSrc(0, pos);
|
||||
src1 = fetchSrc(0, pos + 1);
|
||||
mkOp2(OP_MERGE, TYPE_U64, dreg, src0, src1);
|
||||
mkCvt(OP_CVT, dstTy, dst0[c], srcTy, dreg);
|
||||
Instruction *cvt = mkCvt(OP_CVT, dstTy, dst0[c], srcTy, dreg);
|
||||
if (!isFloatType(dstTy))
|
||||
cvt->rnd = ROUND_Z;
|
||||
pos += 2;
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue