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.pitoi...@gmail.com>
---
 src/gallium/drivers/radeonsi/si_descriptors.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c 
b/src/gallium/drivers/radeonsi/si_descriptors.c
index 12f7ead619..44a4b16712 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -2531,6 +2531,11 @@ void si_all_resident_buffers_begin_new_cs(struct 
si_context *sctx)
 {
        unsigned i;
 
+       /* Skip adding the resident descriptors when no handles are resident.
+        */
+       if (!sctx->num_resident_tex_handles && !sctx->num_resident_img_handles)
+               return;
+
        /* Add all resident descriptors. */
        for (i = 0; i < sctx->num_resident_descriptors; i++) {
                struct r600_resource *desc = sctx->resident_descriptors[i];
-- 
2.13.0

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to