Mesa (main): ntt: Don't gather samplers_declared twice
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu May 12 02:03:44 UTC 2022
Module: Mesa
Branch: main
Commit: 50050f571e408d85933e3980ab1ecf0765c87867
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=50050f571e408d85933e3980ab1ecf0765c87867
Author: Jason Ekstrand <jason.ekstrand at collabora.com>
Date: Tue May 10 08:57:50 2022 -0500
ntt: Don't gather samplers_declared twice
Prior to scanning instrucitons, we initialize it based on variables. If
this is adding anything, we have a bug somewhere.
Reviewed-by: Emma Anholt <emma at anholt.net>
Reviewed-by: Karol Herbst <kherbst at redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16435>
---
src/gallium/auxiliary/nir/nir_to_tgsi_info.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/gallium/auxiliary/nir/nir_to_tgsi_info.c b/src/gallium/auxiliary/nir/nir_to_tgsi_info.c
index b82f58bf835..07c256daac3 100644
--- a/src/gallium/auxiliary/nir/nir_to_tgsi_info.c
+++ b/src/gallium/auxiliary/nir/nir_to_tgsi_info.c
@@ -191,13 +191,8 @@ static void scan_instruction(const struct nir_shader *nir,
nir_tex_instr *tex = nir_instr_as_tex(instr);
nir_variable *texture = tex_get_texture_var(tex);
- if (!texture) {
- info->samplers_declared |=
- u_bit_consecutive(tex->sampler_index, 1);
- } else {
- if (texture->data.bindless)
- info->uses_bindless_samplers = true;
- }
+ if (texture && texture->data.bindless)
+ info->uses_bindless_samplers = true;
switch (tex->op) {
case nir_texop_tex:
More information about the mesa-commit
mailing list