diff options
author | Ilia Mirkin <[email protected]> | 2019-07-26 01:01:45 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2019-07-27 18:24:11 -0400 |
commit | 3e468ff2feb3fce4909ea35e7212bb99601ea816 (patch) | |
tree | ef31bc0ee0639834bfe601ce10c99b6ca284009e /src/gallium/drivers/nouveau/codegen | |
parent | 23dfff0669ef351372379b517b455cee2f9bb9c7 (diff) |
nv50/ir: handle insn not being there for definition of CVT arg
This can happen if it's e.g. a uniform or a function argument.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=111217
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Karol Herbst <[email protected]>
Cc: [email protected]
Diffstat (limited to 'src/gallium/drivers/nouveau/codegen')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp index 0b3220903b9..bfdb923379b 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp @@ -2080,14 +2080,15 @@ void AlgebraicOpt::handleCVT_CVT(Instruction *cvt) { Instruction *insn = cvt->getSrc(0)->getInsn(); - RoundMode rnd = insn->rnd; - if (insn->saturate || + if (!insn || + insn->saturate || insn->subOp || insn->dType != insn->sType || insn->dType != cvt->sType) return; + RoundMode rnd = insn->rnd; switch (insn->op) { case OP_CEIL: rnd = ROUND_PI; |