Module: Mesa Branch: master Commit: db039d67aaae0c3af46cdefe78ea79c5ba860cfe URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=db039d67aaae0c3af46cdefe78ea79c5ba860cfe
Author: Marek Olšák <[email protected]> Date: Thu Aug 17 16:59:31 2017 +0200 radeonsi: don't prefetch VBO descriptors if vertex elements == NULL Reviewed-by: Nicolai Hähnle <[email protected]> --- src/gallium/drivers/radeonsi/si_cp_dma.c | 3 +++ src/gallium/drivers/radeonsi/si_hw_context.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_cp_dma.c b/src/gallium/drivers/radeonsi/si_cp_dma.c index 91a6aff4c1..1aa1ef28c9 100644 --- a/src/gallium/drivers/radeonsi/si_cp_dma.c +++ b/src/gallium/drivers/radeonsi/si_cp_dma.c @@ -450,6 +450,9 @@ static void cik_prefetch_shader_async(struct si_context *sctx, static void cik_prefetch_VBO_descriptors(struct si_context *sctx) { + if (!sctx->vertex_elements) + return; + cik_prefetch_TC_L2_async(sctx, &sctx->vertex_buffers.buffer->b.b, sctx->vertex_buffers.buffer_offset, sctx->vertex_elements->desc_list_byte_size); diff --git a/src/gallium/drivers/radeonsi/si_hw_context.c b/src/gallium/drivers/radeonsi/si_hw_context.c index 46e6073938..d9170c3095 100644 --- a/src/gallium/drivers/radeonsi/si_hw_context.c +++ b/src/gallium/drivers/radeonsi/si_hw_context.c @@ -228,7 +228,7 @@ void si_begin_new_cs(struct si_context *ctx) ctx->prefetch_L2_mask |= SI_PREFETCH_VS; if (ctx->queued.named.ps) ctx->prefetch_L2_mask |= SI_PREFETCH_PS; - if (ctx->vertex_buffers.buffer) + if (ctx->vertex_buffers.buffer && ctx->vertex_elements) ctx->prefetch_L2_mask |= SI_PREFETCH_VBO_DESCRIPTORS; /* CLEAR_STATE disables all colorbuffers, so only enable bound ones. */ _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
