radeon: ensure cmdbuf space for state + AOS is available
The problem is if we find out later we don't have any cmdbuf space but we've already written the arrays to the DMA buffer object, we end up emitting the current cmdbuf which has references to the current DMA object we then send that to the hw and we can't reference the arrays we just emitted to the old DMA buffer. things go bad, crash boom. This can probably be tuned further + swtcl probably needs some fixes
This commit is contained in:
@@ -417,6 +417,12 @@ static GLboolean r300TryDrawPrims(GLcontext *ctx,
|
||||
|
||||
r300FixupIndexBuffer(ctx, ib, bo, &nr_bo);
|
||||
|
||||
/* ensure we have the cmd buf space in advance to cover
|
||||
* the state + DMA AOS pointers */
|
||||
rcommonEnsureCmdBufSpace(&r300->radeon,
|
||||
r300->radeon.hw.max_state_size + (50*sizeof(int)),
|
||||
__FUNCTION__);
|
||||
|
||||
r300SetVertexFormat(ctx, arrays, max_index + 1, bo, &nr_bo);
|
||||
|
||||
if (r300->fallback)
|
||||
|
||||
Reference in New Issue
Block a user