From: Marek Olšák Date: Wed, 18 Sep 2019 19:19:29 +0000 (-0400) Subject: nir: don't add bindless variables to num_textures and num_images X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f5c103ce1d74ad95435dce21a38d4f30adab202d;p=mesa.git nir: don't add bindless variables to num_textures and num_images It confuses radeonsi. Reviewed-by: Connor Abbott --- diff --git a/src/compiler/nir/nir_gather_info.c b/src/compiler/nir/nir_gather_info.c index b6e6b0afd1f..1e251149872 100644 --- a/src/compiler/nir/nir_gather_info.c +++ b/src/compiler/nir/nir_gather_info.c @@ -361,6 +361,10 @@ nir_shader_gather_info(nir_shader *shader, nir_function_impl *entrypoint) shader->info.num_textures = 0; shader->info.num_images = 0; nir_foreach_variable(var, &shader->uniforms) { + /* Bindless textures and images don't use non-bindless slots. */ + if (var->data.bindless) + continue; + shader->info.num_textures += glsl_type_get_sampler_count(var->type); shader->info.num_images += glsl_type_get_image_count(var->type); }