2 #include "util/u_upload_mgr.h"
4 #include "brw_context.h"
8 * called from brw_batchbuffer_flush and children before sending a
11 static void brw_finish_batch(struct brw_context
*brw
)
13 brw_emit_query_end(brw
);
18 * called from intelFlushBatchLocked
20 static void brw_new_batch( struct brw_context
*brw
)
22 brw
->curbe
.need_new_bo
= GL_TRUE
;
24 /* Mark all context state as needing to be re-emitted.
25 * This is probably not as severe as on 915, since almost all of our state
26 * is just in referenced buffers.
28 brw
->state
.dirty
.brw
|= BRW_NEW_CONTEXT
;
30 brw
->state
.dirty
.mesa
|= ~0;
31 brw
->state
.dirty
.brw
|= ~0;
32 brw
->state
.dirty
.cache
|= ~0;
34 /* Move to the end of the current upload buffer so that we'll force choosing
35 * a new buffer next time.
37 u_upload_flush( brw
->vb
.upload_vertex
);
38 u_upload_flush( brw
->vb
.upload_index
);
42 /* called from intelWaitForIdle() and intelFlush()
44 * For now, just flush everything. Could be smarter later.
46 static GLuint
brw_flush_cmd( void )
48 return ((MI_FLUSH
<< 16) | BRW_FLUSH_STATE_CACHE
);