Mesa (master): radeonsi: call si_upload_graphics_shader_descriptors before the big conditional

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Sep 24 13:19:04 UTC 2020


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sat Sep 19 04:05:22 2020 -0400

radeonsi: call si_upload_graphics_shader_descriptors before the big conditional

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6786>

---

 src/gallium/drivers/radeonsi/si_state_draw.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c
index 20abe1dc6bb..f6a9c95be43 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.c
+++ b/src/gallium/drivers/radeonsi/si_state_draw.c
@@ -1939,7 +1939,8 @@ static void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *i
     * this must be called after si_need_cs_space, because we must let
     * need_cs_space flush before we add buffers to the buffer list.
     */
-   if (!si_upload_vertex_buffer_descriptors(sctx))
+   if (!si_upload_vertex_buffer_descriptors(sctx) ||
+       !si_upload_graphics_shader_descriptors(sctx))
       goto return_cleanup;
 
    /* Vega10/Raven scissor bug workaround. When any context register is
@@ -1968,9 +1969,6 @@ static void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *i
       if (unlikely(sctx->flags & SI_CONTEXT_FLUSH_FOR_RENDER_COND))
          masked_atoms |= si_get_atom_bit(sctx, &sctx->atoms.s.render_cond);
 
-      if (!si_upload_graphics_shader_descriptors(sctx))
-         goto return_cleanup;
-
       /* Emit all states except possibly render condition. */
       si_emit_all_states(sctx, info, prim, instance_count, primitive_restart, masked_atoms);
       sctx->emit_cache_flush(sctx);
@@ -2005,9 +2003,6 @@ static void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *i
       if (sctx->chip_class >= GFX7 && sctx->prefetch_L2_mask)
          cik_emit_prefetch_L2(sctx, true);
 
-      if (!si_upload_graphics_shader_descriptors(sctx))
-         goto return_cleanup;
-
       si_emit_all_states(sctx, info, prim, instance_count, primitive_restart, masked_atoms);
 
       if (sctx->screen->info.has_gfx9_scissor_bug &&



More information about the mesa-commit mailing list