dwords = 2*CACHE_FLUSH_BUFSZ;
dwords += PRE_EMIT_STATE_BUFSZ;
dwords += (AOS_BUFSZ(vbuf->num_attribs)
- + SCISSORS_BUFSZ
- + FIREAOS_BUFSZ )*nr_prims;
+ + SCISSORS_BUFSZ
+ + FIREAOS_BUFSZ )*nr_prims;
- state_size= radeonCountEmitSize(&r300->radeon);
+ state_size = radeonCountStateEmitSize(&r300->radeon);
flushed = rcommonEnsureCmdBufSpace(&r300->radeon,
dwords + state_size,
__FUNCTION__);
if (flushed)
- dwords += radeonCountEmitSize(&r300->radeon);
+ dwords += radeonCountStateEmitSize(&r300->radeon);
else
dwords += state_size;
r300SwitchFallback(ctx, R300_FALLBACK_INVALID_BUFFERS, !r300ValidateBuffers(ctx));
- rcommonEnsureCmdBufSpace(&r300->radeon,
- r300->radeon.hw.max_state_size + (60*sizeof(int)),
- __FUNCTION__);
-
r300SetVertexFormat(ctx, arrays, max_index + 1);
if (r300->fallback)
r300FreeData(ctx);
+ if (RADEON_DEBUG & DEBUG_PRIMS)
+ fprintf(stderr, "%s: %u (%d-%d) cs begin at %d\n",
+ __FUNCTION__, nr_prims, min_index, max_index, r300->radeon.cmdbuf.cs->cdw );
+
return GL_TRUE;
}