i965: Move DriverFlag initialization to brw_init_state().
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 27 Sep 2013 22:00:22 +0000 (15:00 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sun, 13 Oct 2013 07:10:44 +0000 (00:10 -0700)
Configuring which dirty flags we want sounds like a job for
brw_init_state().

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/i965/brw_state_upload.c

index a283f5be66bc9f7fd0e60255ec044835d95b69bd..177bda009f9f668d4fd49c3cffdd08b778bfeaac 100644 (file)
@@ -603,10 +603,6 @@ brwCreateContext(gl_api api,
 
    brw_init_surface_formats(brw);
 
-   ctx->DriverFlags.NewTransformFeedback = BRW_NEW_TRANSFORM_FEEDBACK;
-   ctx->DriverFlags.NewRasterizerDiscard = BRW_NEW_RASTERIZER_DISCARD;
-   ctx->DriverFlags.NewUniformBuffer = BRW_NEW_UNIFORM_BUFFER;
-
    if (brw->is_g4x || brw->gen >= 5) {
       brw->CMD_VF_STATISTICS = GM45_3DSTATE_VF_STATISTICS;
       brw->CMD_PIPELINE_SELECT = CMD_PIPELINE_SELECT_GM45;
index 0aca7ddbbba5e3c5bf3d674f88cdbc4e07e32bc7..ec9bfb06175ecdf707e6fa78279a946cd691877b 100644 (file)
@@ -263,6 +263,7 @@ brw_upload_initial_gpu_state(struct brw_context *brw)
 
 void brw_init_state( struct brw_context *brw )
 {
+   struct gl_context *ctx = &brw->ctx;
    const struct brw_tracked_state **atoms;
    int num_atoms;
 
@@ -299,6 +300,10 @@ void brw_init_state( struct brw_context *brw )
     * dirty flags.
     */
    STATIC_ASSERT(BRW_NUM_STATE_BITS <= 8 * sizeof(brw->state.dirty.brw));
+
+   ctx->DriverFlags.NewTransformFeedback = BRW_NEW_TRANSFORM_FEEDBACK;
+   ctx->DriverFlags.NewRasterizerDiscard = BRW_NEW_RASTERIZER_DISCARD;
+   ctx->DriverFlags.NewUniformBuffer = BRW_NEW_UNIFORM_BUFFER;
 }