Module: Mesa
Branch: master
Commit: 9141d132143b48f2343cc1835d16663464bb90f7
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=9141d132143b48f2343cc1835d16663464bb90f7

Author: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Date:   Wed Aug 23 10:59:06 2017 +0200

radeonsi: minor cleanups in si_make_{texture,image}_handle_resident()

Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Reviewed-by: Marek Olšák <marek.ol...@amd.com>

---

 src/gallium/drivers/radeonsi/si_descriptors.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c 
b/src/gallium/drivers/radeonsi/si_descriptors.c
index 446c52e747..4a7e0dc53a 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -2278,7 +2278,6 @@ static void si_invalidate_bindless_buf_desc(struct 
si_context *sctx,
                si_set_buf_desc_address(buf, offset, &desc_list[0]);
 
                *desc_dirty = true;
-               sctx->bindless_descriptors_dirty = true;
        }
 }
 
@@ -2390,12 +2389,7 @@ static void si_make_texture_handle_resident(struct 
pipe_context *ctx,
                            p_atomic_read(&rtex->framebuffers_bound))
                                sctx->need_check_render_feedback = true;
 
-                       /* Re-upload the descriptor if it has been updated
-                        * while it wasn't resident.
-                        */
                        si_update_resident_texture_descriptor(sctx, tex_handle);
-                       if (tex_handle->desc_dirty)
-                               sctx->bindless_descriptors_dirty = true;
                } else {
                        si_invalidate_bindless_buf_desc(sctx,
                                                        tex_handle->desc_slot,
@@ -2404,6 +2398,12 @@ static void si_make_texture_handle_resident(struct 
pipe_context *ctx,
                                                        
&tex_handle->desc_dirty);
                }
 
+               /* Re-upload the descriptor if it has been updated while it
+                * wasn't resident.
+                */
+               if (tex_handle->desc_dirty)
+                       sctx->bindless_descriptors_dirty = true;
+
                /* Add the texture handle to the per-context list. */
                util_dynarray_append(&sctx->resident_tex_handles,
                                     struct si_texture_handle *, tex_handle);
@@ -2525,13 +2525,7 @@ static void si_make_image_handle_resident(struct 
pipe_context *ctx,
                            p_atomic_read(&rtex->framebuffers_bound))
                                sctx->need_check_render_feedback = true;
 
-                       /* Re-upload the descriptor if it has been updated
-                        * while it wasn't resident.
-                        */
                        si_update_resident_image_descriptor(sctx, img_handle);
-                       if (img_handle->desc_dirty)
-                               sctx->bindless_descriptors_dirty = true;
-
                } else {
                        si_invalidate_bindless_buf_desc(sctx,
                                                        img_handle->desc_slot,
@@ -2540,6 +2534,12 @@ static void si_make_image_handle_resident(struct 
pipe_context *ctx,
                                                        
&img_handle->desc_dirty);
                }
 
+               /* Re-upload the descriptor if it has been updated while it
+                * wasn't resident.
+                */
+               if (img_handle->desc_dirty)
+                       sctx->bindless_descriptors_dirty = true;
+
                /* Add the image handle to the per-context list. */
                util_dynarray_append(&sctx->resident_img_handles,
                                     struct si_image_handle *, img_handle);

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

Reply via email to