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:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user