[Mesa-dev] [PATCH] nv50/ir: fix crash in isUniform for undefined values

Ilia Mirkin imirkin at alum.mit.edu
Sun Nov 3 00:00:22 UTC 2019


Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

On Sat, Nov 2, 2019 at 7:57 PM Karol Herbst <kherbst at redhat.com> wrote:
>
> Signed-off-by: Karol Herbst <kherbst at redhat.com>
> ---
>  src/gallium/drivers/nouveau/codegen/nv50_ir.cpp | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
> index a181a13a3b1..ae07d967221 100644
> --- a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
> +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
> @@ -274,6 +274,8 @@ LValue::isUniform() const
>     if (defs.size() > 1)
>        return false;
>     Instruction *insn = getInsn();
> +   if (!insn)
> +      return false;
>     // let's not try too hard here for now ...
>     return !insn->srcExists(1) && insn->getSrc(0)->isUniform();
>  }
> --
> 2.23.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list