This won't help much except for applications that use a ton
of resident handles. Though, this will reduce the winsys
overhead a little bit.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
sizeof(struct si_texture_handle *);
num_resident_img_handles = sctx->resident_img_handles.size /
sizeof(struct si_image_handle *);
+
+ /* Skip adding the bindless descriptors when no handles are resident.
+ */
+ if (!num_resident_tex_handles && !num_resident_img_handles)
+ return;
+
num_bindless_descriptors = sctx->bindless_descriptors.size /
sizeof(struct r600_resource *);