Add a define NO_TTM to disable ttm usage altogether for comparison.

Reinstate MI_FLUSH at end of batchbuffers.
This commit is contained in:
Thomas Hellström 2006-03-02 11:41:28 +00:00
parent f4211722f1
commit 4291f24abd
2 changed files with 13 additions and 2 deletions

View file

@ -28,6 +28,8 @@ static int ttmcount = 0;
* Backdoor mapping will very probably fix this. (texdown-pool)
*/
#define NO_TTM
#undef CACHED_TTMS
/*
@ -42,6 +44,11 @@ static int ttmcount = 0;
#define BATCH_LOCATION 1
#ifdef NO_TTM
#undef BATCH_LOCATION
#define BATCH_LOCATION 0
#endif
#if (BATCH_LOCATION == 2)
#warning Batch buffers using dynamic TTMS. Making TTMS uncached.
#undef CACHED_TTMS
@ -166,6 +173,10 @@ static struct block *alloc_block( struct bufmgr *bm,
int ret;
struct block *block;
unsigned alignment = ( 1 << align );
#ifdef NO_TTM
flags |= BM_NO_TTM;
#endif
if (!(flags & BM_NO_TTM)
#if (BATCH_LOCATION != 2)

View file

@ -194,13 +194,13 @@ GLuint intel_batchbuffer_flush( struct intel_batchbuffer *batch )
* performance drain that we would like to avoid.
*/
if (used & 4) {
((int *)batch->ptr)[0] = 0; /*intel->vtbl.flush_cmd();*/
((int *)batch->ptr)[0] = intel->vtbl.flush_cmd();
((int *)batch->ptr)[1] = 0;
((int *)batch->ptr)[2] = MI_BATCH_BUFFER_END;
used += 12;
}
else {
((int *)batch->ptr)[0] = /* intel->vtbl.flush_cmd(); */
((int *)batch->ptr)[0] = intel->vtbl.flush_cmd() ;
((int *)batch->ptr)[1] = MI_BATCH_BUFFER_END;
used += 8;
}