Mesa (master): lima/ppir: fix lod bias register codegen

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat May 9 11:46:08 UTC 2020


Module: Mesa
Branch: master
Commit: 741aa3439d7d38c26d0baf20be506cf79c30978d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=741aa3439d7d38c26d0baf20be506cf79c30978d

Author: Erico Nunes <nunes.erico at gmail.com>
Date:   Mon Apr 13 15:22:53 2020 +0200

lima/ppir: fix lod bias register codegen

The lod bias register is correctly run through the entire compilation
process, but in the end its allocated register value was never being
added to the instruction.
It seems that most programs were lucky enough that lod bias was assigned
register 0.x so that things worked anyway.

Signed-off-by: Erico Nunes <nunes.erico at gmail.com>
Reviewed-by: Vasily Khoruzhick <anarsoul at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4535>

---

 src/gallium/drivers/lima/ir/pp/codegen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/lima/ir/pp/codegen.c b/src/gallium/drivers/lima/ir/pp/codegen.c
index 892b124322b..ce2c10732ce 100644
--- a/src/gallium/drivers/lima/ir/pp/codegen.c
+++ b/src/gallium/drivers/lima/ir/pp/codegen.c
@@ -130,7 +130,7 @@ static void ppir_codegen_encode_texld(ppir_node *node, void *code)
    f->lod_bias_en = ldtex->lod_bias_en;
    f->explicit_lod = ldtex->explicit_lod;
    if (ldtex->lod_bias_en)
-      ppir_target_get_src_reg_index(&ldtex->src[1]);
+      f->lod_bias = ppir_target_get_src_reg_index(&ldtex->src[1]);
 
    switch (ldtex->sampler_dim) {
    case GLSL_SAMPLER_DIM_2D:



More information about the mesa-commit mailing list