diff options
-rw-r--r-- | src/mesa/drivers/dri/i965/intel_batchbuffer.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c index 66dfe1fa3d..55889be732 100644 --- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c +++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c @@ -1159,8 +1159,6 @@ brw_state_batch_size(struct brw_context *brw, uint32_t offset) return entry ? (uintptr_t) entry->data : 0; } -#define VS_GS_HS_DS_EXTRA (27 * ((9 * 4) + (10 * 4) + (9 * 4) + (11 * 4))) - /** * Reserve some space in the statebuffer, or flush. * @@ -1170,7 +1168,7 @@ brw_state_batch_size(struct brw_context *brw, uint32_t offset) void brw_require_statebuffer_space(struct brw_context *brw, int size) { - if (brw->batch.state_used + size + VS_GS_HS_DS_EXTRA >= STATE_SZ) + if (brw->batch.state_used + size >= STATE_SZ) intel_batchbuffer_flush(brw); } @@ -1189,10 +1187,10 @@ brw_state_batch(struct brw_context *brw, uint32_t offset = ALIGN(batch->state_used, alignment); - if (offset + size + VS_GS_HS_DS_EXTRA >= STATE_SZ && !batch->no_wrap) { + if (offset + size >= STATE_SZ && !batch->no_wrap) { intel_batchbuffer_flush(brw); offset = ALIGN(batch->state_used, alignment); - } else if (offset + size + VS_GS_HS_DS_EXTRA >= batch->state.bo->size) { + } else if (offset + size >= batch->state.bo->size) { const unsigned new_size = MIN2(batch->state.bo->size + batch->state.bo->size / 2, MAX_STATE_SIZE); |