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