u_upload_flush() is called each time r600_flush() is used.
There is a comment specifically saying : /* XXX This shouldn't be really necessary, but removing it breaks some tests. * Needless buffer reallocations may significantly increase memory consumption, * so getting rid of this call is important. */ u_upload_flush(rctx->vbuf_mgr->uploader);
I think the call to u_upload_flush() should be removed, unless someone knows a test case showing an issue ?
I've done some regressions testing (piglit quick.tests, Unigine Heaven, Openarena, Lightsmark) and found almost no problem. The regressions reported by piglit concerned 3 tests : - fbo-sys-sub-blit - fp-fragment-position - kil-swizzle Which are all tests that fails sporadically (with or without patch applied) ; so this does not count as a regression.
(All testing was done with HD4850)
The simple attached patch removed function call + comment.
Pierre-Eric
dri-devel@lists.freedesktop.org