From 741aa3439d7d38c26d0baf20be506cf79c30978d Mon Sep 17 00:00:00 2001 From: Erico Nunes Date: Mon, 13 Apr 2020 15:22:53 +0200 Subject: [PATCH] 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 Reviewed-by: Vasily Khoruzhick Part-of: --- 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: -- 2.30.2