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 <brianp@vmare.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17062>
This commit is contained in:
Brian Paul
2022-06-02 12:39:13 -06:00
parent 53cd3f331f
commit 3743f74d30
@@ -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;