From: Erico Nunes Date: Mon, 13 Apr 2020 13:22:53 +0000 (+0200) Subject: lima/ppir: fix lod bias register codegen X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=741aa3439d7d38c26d0baf20be506cf79c30978d;p=mesa.git 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: --- 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: