lima/ppir: fix lod bias src
authorErico Nunes <nunes.erico@gmail.com>
Fri, 20 Dec 2019 18:20:58 +0000 (19:20 +0100)
committerMarge Bot <eric+marge@anholt.net>
Fri, 20 Dec 2019 19:39:55 +0000 (19:39 +0000)
commitd56710ab82a0803b5a66c6c489a356de28779ffa
tree6282047bef9af118e4ca3506add736f3a231efe9
parent1b0743dbb6f925921e52bc9ecdde6a8bf755d162
lima/ppir: fix lod bias src

ppir has some code that operates on all ppir_src variables, and for that
uses ppir_node_get_src.
lod bias support introduced a separate ppir_src that is inaccessible by
that function, causing it to be missed by the compiler in some routines.
Ultimately this caused, in some cases, a bug in const lowering:

  .../pp/lower.c:42: ppir_lower_const: Assertion `src != NULL' failed.

This fix moves the ppir_srcs in ppir_load_texture_node together so they
don't get missed.

Fixes: 721d82cf061 lima/ppir: add lod-bias support
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul@gmail.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3185>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3185>
src/gallium/drivers/lima/ir/pp/codegen.c
src/gallium/drivers/lima/ir/pp/lower.c
src/gallium/drivers/lima/ir/pp/nir.c
src/gallium/drivers/lima/ir/pp/node.c
src/gallium/drivers/lima/ir/pp/ppir.h