From 3743f74d3061e2dd95306aa36c35b99367c3c059 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 2 Jun 2022 12:39:13 -0600 Subject: [PATCH] llvmpipe: add missing tex_info->texture_unit assignment The texture_unit field needs to be set like the sampler_unit field. Also, add a swizzle initialization and some comments. Signed-off-by: Brian Paul Reviewed-by: Roland Scheidegger cc: mesa-stable Part-of: --- src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c b/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c index 69f9af84a72..93660b016ee 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c @@ -249,10 +249,12 @@ llvmpipe_nir_fn_is_linear_compat(const struct nir_shader *shader, } tex_info->sampler_unit = tex->sampler_index; + tex_info->texture_unit = tex->texture_index; /* this is enforced in the scanner previously. */ - tex_info->coord[0].file = TGSI_FILE_INPUT; - tex_info->coord[1].file = TGSI_FILE_INPUT; + tex_info->coord[0].file = TGSI_FILE_INPUT; // S + tex_info->coord[0].swizzle = 0; + tex_info->coord[1].file = TGSI_FILE_INPUT; // T tex_info->coord[1].swizzle = 1; info->num_texs++; break;