From: Pauli Nieminen Date: Mon, 24 Aug 2009 23:36:13 +0000 (+0300) Subject: Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa into r600_state_predict X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ce7ed63f0c2f5cb1c030f73a5d8f6544eaac0f81;p=mesa.git Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa into r600_state_predict --- ce7ed63f0c2f5cb1c030f73a5d8f6544eaac0f81 diff --cc src/mesa/drivers/dri/r600/r700_render.c index 9b0b5443d6a,cdf3220a7f3..d64e921bdad --- a/src/mesa/drivers/dri/r600/r700_render.c +++ b/src/mesa/drivers/dri/r600/r700_render.c @@@ -343,10 -308,20 +343,17 @@@ static GLboolean r700RunRender(GLcontex struct vertex_buffer *vb = &tnl->vb; struct radeon_renderbuffer *rrb; - 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__); + if (RADEON_DEBUG & DEBUG_PRIMS) + fprintf(stderr, "%s: cs begin at %d\n", + __func__, context->radeon.cmdbuf.cs->cdw); + /* always emit CB base to prevent + * lock ups on some chips. + */ + R600_STATECHANGE(context, cb_target); + /* mark vtx as dirty since it changes per-draw */ + R600_STATECHANGE(context, vtx); + r700UpdateShaders(ctx); r700SetScissor(context); r700SetupVertexProgram(ctx);