2 #include "util/u_upload_mgr.h"
4 #include "brw_context.h"
5 #include "brw_batchbuffer.h"
9 /* All batchbuffer flushes must go through this function.
11 void brw_context_flush( struct brw_context
*brw
)
16 brw_emit_query_end(brw
);
18 /* Move to the end of the current upload buffer so that we'll force choosing
19 * a new buffer next time.
21 u_upload_flush( brw
->vb
.upload_vertex
);
22 u_upload_flush( brw
->vb
.upload_index
);
24 _brw_batchbuffer_flush( brw
->batch
, __FILE__
, __LINE__
);
26 /* Mark all context state as needing to be re-emitted.
27 * This is probably not as severe as on 915, since almost all of our state
28 * is just in referenced buffers.
30 brw
->state
.dirty
.brw
|= BRW_NEW_CONTEXT
;
31 brw
->state
.dirty
.mesa
|= ~0;
32 brw
->state
.dirty
.brw
|= ~0;
33 brw
->state
.dirty
.cache
|= ~0;
35 brw
->curbe
.need_new_bo
= GL_TRUE
;
39 brw_flush( struct pipe_context
*pipe
,
41 struct pipe_fence_handle
**fence
)
43 brw_context_flush( brw_context( pipe
) );
48 void brw_pipe_flush_init( struct brw_context
*brw
)
50 brw
->base
.flush
= brw_flush
;
54 void brw_pipe_flush_cleanup( struct brw_context
*brw
)