summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-05-18 22:37:25 +0200
committerSamuel Pitoiset <[email protected]>2017-06-14 10:04:36 +0200
commita45e198e2dd4b64bddddcf2dfa3ce09a964ce897 (patch)
tree7c385f220985ee97bc6b26e2d35a86bb2687212a /src/gallium/drivers
parent333c8f65cfd6f1153a614cef482b529778d3a6a6 (diff)
radeonsi: only add descriptors in presence of resident handles
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 <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeonsi/si_descriptors.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index b5722b76420..12b82a139dd 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -2374,6 +2374,12 @@ void si_all_resident_buffers_begin_new_cs(struct si_context *sctx)
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 *);