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@anholt.net>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16435>
This commit is contained in:
Jason Ekstrand 2022-05-10 08:57:50 -05:00 committed by Marge Bot
parent 515ed4f4f9
commit 50050f571e
1 changed files with 2 additions and 7 deletions

View File

@ -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: