}
/* The number of dwords all the dirty states would take. */
- num_dw += ctx->pm4_dirty_cdwords;
+ num_dw += si_pm4_dirty_dw(ctx);
/* The upper-bound of how much a draw command would take. */
num_dw += SI_MAX_DRAW_CS_DWORDS;
void si_begin_new_cs(struct si_context *ctx)
{
- ctx->pm4_dirty_cdwords = 0;
-
/* Flush read caches at the beginning of CS. */
ctx->b.flags |= R600_CONTEXT_INV_TEX_CACHE |
R600_CONTEXT_INV_CONST_CACHE |
unsigned default_ps_gprs, default_vs_gprs;
- /* Below are variables from the old r600_context.
- */
- unsigned pm4_dirty_cdwords;
-
/* Vertex and index buffers. */
bool vertex_buffers_dirty;
struct pipe_index_buffer index_buffer;
if (!si_update_draw_info_state(sctx, info, &ib))
return;
- sctx->pm4_dirty_cdwords += si_pm4_dirty_dw(sctx);
-
/* Check flush flags. */
if (sctx->b.flags)
sctx->atoms.s.cache_flush->dirty = true;
}
si_pm4_emit_dirty(sctx);
- sctx->pm4_dirty_cdwords = 0;
-
si_emit_draw_packets(sctx, info, &ib);
#if SI_TRACE_CS