radeonsi: don't prefetch VBO descriptors if vertex elements == NULL
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
This commit is contained in:
parent
ea1b97714d
commit
db039d67aa
2 changed files with 4 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue