[Mesa-dev] [PATCH 11/15] radeonsi: don't call VBO prefetch with size=0

Marek Olšák maraeo at gmail.com
Wed Aug 29 20:13:07 UTC 2018


From: Marek Olšák <marek.olsak at amd.com>

for the next commit.
---
 src/gallium/drivers/radeonsi/si_cp_dma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/radeonsi/si_cp_dma.c b/src/gallium/drivers/radeonsi/si_cp_dma.c
index 598d5ecf0dc..ad53682b1b2 100644
--- a/src/gallium/drivers/radeonsi/si_cp_dma.c
+++ b/src/gallium/drivers/radeonsi/si_cp_dma.c
@@ -548,21 +548,21 @@ static void cik_prefetch_shader_async(struct si_context *sctx,
 				      struct si_pm4_state *state)
 {
 	struct pipe_resource *bo = &state->bo[0]->b.b;
 	assert(state->nbo == 1);
 
 	cik_prefetch_TC_L2_async(sctx, bo, 0, bo->width0);
 }
 
 static void cik_prefetch_VBO_descriptors(struct si_context *sctx)
 {
-	if (!sctx->vertex_elements)
+	if (!sctx->vertex_elements || !sctx->vertex_elements->desc_list_byte_size)
 		return;
 
 	cik_prefetch_TC_L2_async(sctx, &sctx->vb_descriptors_buffer->b.b,
 				 sctx->vb_descriptors_offset,
 				 sctx->vertex_elements->desc_list_byte_size);
 }
 
 /**
  * Prefetch shaders and VBO descriptors.
  *
-- 
2.17.1



More information about the mesa-dev mailing list