mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 15:58:05 +02:00
Add a define NO_TTM to disable ttm usage altogether for comparison.
Reinstate MI_FLUSH at end of batchbuffers.
This commit is contained in:
parent
f4211722f1
commit
4291f24abd
2 changed files with 13 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue