nir/gather_info: take texture vars into account when counting textures

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19381>
This commit is contained in:
Karol Herbst
2022-11-03 17:30:50 +01:00
committed by Marge Bot
parent 829d6487c0
commit 915403ea6c

View File

@@ -1001,7 +1001,8 @@ nir_shader_gather_info(nir_shader *shader, nir_function_impl *entrypoint)
if (var->data.bindless || var->interface_type) if (var->data.bindless || var->interface_type)
continue; continue;
shader->info.num_textures += glsl_type_get_sampler_count(var->type); shader->info.num_textures += glsl_type_get_sampler_count(var->type) +
glsl_type_get_texture_count(var->type);
shader->info.num_images += glsl_type_get_image_count(var->type); shader->info.num_images += glsl_type_get_image_count(var->type);
} }