Module: Mesa Branch: staging/22.1 Commit: efd1e177d903c033db55c253746083b77c7fffd8 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=efd1e177d903c033db55c253746083b77c7fffd8
Author: Brian Paul <[email protected]> Date: Thu Jun 2 12:39:13 2022 -0600 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 <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]> cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17062> (cherry picked from commit 3743f74d3061e2dd95306aa36c35b99367c3c059) --- .pick_status.json | 2 +- src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index dbcc61662d0..b1dd9d5a7ea 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -5233,7 +5233,7 @@ "description": "llvmpipe: add missing tex_info->texture_unit assignment", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c b/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c index 6383219c36e..fafe3888260 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs_analysis.c @@ -245,10 +245,12 @@ llvmpipe_nir_fn_is_linear_compat(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;
