i965: Move state setup from brwCreateContext to brw_init_state().

This seems like a better place for it, and helps clean up
brwCreateContext (which is full of a lot of random stuff).

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Kenneth Graunke 2013-09-26 12:06:32 -07:00
parent d31b928b93
commit 220c1e5610
2 changed files with 8 additions and 8 deletions

View file

@ -467,14 +467,6 @@ brwCreateContext(gl_api api,
brw->curbe.next_buf = calloc(1, 4096);
}
brw->state.dirty.mesa = ~0;
brw->state.dirty.brw = ~0;
/* Make sure that brw->state.dirty.brw has enough bits to hold all possible
* dirty flags.
*/
STATIC_ASSERT(BRW_NUM_STATE_BITS <= 8 * sizeof(brw->state.dirty.brw));
brw->batch.need_workaround_flush = true;
ctx->VertexProgram._MaintainTnlProgram = true;

View file

@ -291,6 +291,14 @@ void brw_init_state( struct brw_context *brw )
}
brw_upload_initial_gpu_state(brw);
brw->state.dirty.mesa = ~0;
brw->state.dirty.brw = ~0;
/* Make sure that brw->state.dirty.brw has enough bits to hold all possible
* dirty flags.
*/
STATIC_ASSERT(BRW_NUM_STATE_BITS <= 8 * sizeof(brw->state.dirty.brw));
}