[Mesa-stable] [Mesa-dev] [PATCH] nv50/ir: handle insn not being there for definition of CVT arg

Karol Herbst kherbst at redhat.com
Fri Jul 26 09:54:39 UTC 2019


Reviewed-by: Karol Herbst <kherbst at redhat.com>

On Fri, Jul 26, 2019 at 7:03 AM Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>
> 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 <imirkin at alum.mit.edu>
> Cc: mesa-stable at lists.freedesktop.org
> ---
>  src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp | 5 +++--
>  1 file 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;
> --
> 2.21.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-stable mailing list