diff options
author | Alex Deucher <[email protected]> | 2009-08-20 12:10:42 -0400 |
---|---|---|
committer | Alex Deucher <[email protected]> | 2009-08-20 12:12:23 -0400 |
commit | 0f0a9e3ee752f1746d6dba748522fb3e15e4af1a (patch) | |
tree | 7944a307c1d043150ab32792c134eb61f2c7d9c7 /src/mesa/drivers/dri | |
parent | 1b1d59137301b9f8bccba8e61fb2d93f824616bd (diff) |
r600: try and get everything in the draw in one IB
fixes corruption issues with apps like teapot and
geartrain.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/r600/r700_render.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r600/r700_render.c b/src/mesa/drivers/dri/r600/r700_render.c index 58b4491d00d..80df78f1233 100644 --- a/src/mesa/drivers/dri/r600/r700_render.c +++ b/src/mesa/drivers/dri/r600/r700_render.c @@ -341,10 +341,9 @@ void r700EmitState(GLcontext * ctx) return; rcommonEnsureCmdBufSpace(&context->radeon, - context->radeon.hw.max_state_size, __FUNCTION__); + 652, __FUNCTION__); r700SendSQConfig(context); - r700SendUCPState(context); r700SendContextStates(context); r700SendViewportState(context, 0); @@ -357,10 +356,18 @@ static GLboolean r700RunRender(GLcontext * ctx, struct tnl_pipeline_stage *stage) { context_t *context = R700_CONTEXT(ctx); - unsigned int i; + radeonContextPtr radeon = &context->radeon; + unsigned int i, ind_count = 0; TNLcontext *tnl = TNL_CONTEXT(ctx); struct vertex_buffer *vb = &tnl->vb; + for (i = 0; i < vb->PrimitiveCount; i++) + ind_count += vb->Primitive[i].count + 10; + + /* just an estimate, need to properly calculate this */ + rcommonEnsureCmdBufSpace(&context->radeon, + radeon->hw.max_state_size + ind_count, __FUNCTION__); + r700Start3D(context); r700UpdateShaders(ctx); |