diff options
author | Pauli Nieminen <[email protected]> | 2009-08-29 18:38:30 +0300 |
---|---|---|
committer | Pauli Nieminen <[email protected]> | 2009-08-29 18:40:44 +0300 |
commit | 32df8922a9eebf64f6bace532a21b305eacc4938 (patch) | |
tree | 327ea4c222ec4cb19f986b06ddac84f5fcc7a14d | |
parent | 8313801911426a9a7b0bdbf2d6a4b2232428cc5b (diff) |
r300: Add missing pre_emit_count to swtcl state size prediction.
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_swtcl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_swtcl.c b/src/mesa/drivers/dri/r300/r300_swtcl.c index e4a56cadc64..45dfbf26e6a 100644 --- a/src/mesa/drivers/dri/r300/r300_swtcl.c +++ b/src/mesa/drivers/dri/r300/r300_swtcl.c @@ -248,18 +248,19 @@ static void r300_predict_emit_size( r300ContextPtr rmesa ) const int vertex_size = 7; const int prim_size = 3; const int cache_flush_size = 4; + const int pre_emit_state = 4; const int state_size = radeonCountStateEmitSize(&rmesa->radeon); if (rcommonEnsureCmdBufSpace(&rmesa->radeon, - state_size + - + vertex_size + prim_size, + state_size + pre_emit_state + + vertex_size + prim_size + cache_flush_size * 2, __FUNCTION__)) rmesa->radeon.swtcl.emit_prediction = radeonCountStateEmitSize(&rmesa->radeon); else rmesa->radeon.swtcl.emit_prediction = state_size; rmesa->radeon.swtcl.emit_prediction += rmesa->radeon.cmdbuf.cs->cdw - + vertex_size + prim_size + cache_flush_size * 2; + + vertex_size + prim_size + cache_flush_size * 2 + pre_emit_state; } } |