i965: Move need_workaround_flush = true to intel_batchbuffer_init.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 27 Sep 2013 22:29:00 +0000 (15:29 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sun, 13 Oct 2013 07:10:44 +0000 (00:10 -0700)
intel_batchbuffer_init() sets up initial batchbuffer state; it seems
like a reasonable place to initialize this flag.

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/intel_batchbuffer.c

index 177bda009f9f668d4fd49c3cffdd08b778bfeaac..ec3a750e87f6831ec14b17eae2061bdb53c54d99 100644 (file)
@@ -647,8 +647,6 @@ brwCreateContext(gl_api api,
       brw->curbe.next_buf = calloc(1, 4096);
    }
 
-   brw->batch.need_workaround_flush = true;
-
    ctx->VertexProgram._MaintainTnlProgram = true;
    ctx->FragmentProgram._MaintainTexEnvProgram = true;
 
index 0aa2551c95cd10bc35c018bcff11ec2bc3d08328..77f3ada0f6820968a67a21b2a878a39b9559d4a1 100644 (file)
@@ -70,6 +70,8 @@ intel_batchbuffer_init(struct brw_context *brw)
                                                      4096, 4096);
    }
 
+   brw->batch.need_workaround_flush = true;
+
    if (!brw->has_llc) {
       brw->batch.cpu_map = malloc(BATCH_SZ);
       brw->batch.map = brw->batch.cpu_map;