Module: Mesa
Branch: master
Commit: f5c103ce1d74ad95435dce21a38d4f30adab202d
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f5c103ce1d74ad95435dce21a38d4f30adab202d

Author: Marek Olšák <[email protected]>
Date:   Wed Sep 18 15:19:29 2019 -0400

nir: don't add bindless variables to num_textures and num_images

It confuses radeonsi.

Reviewed-by: Connor Abbott <[email protected]>

---

 src/compiler/nir/nir_gather_info.c | 4 ++++
 1 file changed, 4 insertions(+)

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);
    }

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to