i915: move declarations before code
authorBrian Paul <brianp@vmware.com>
Thu, 12 Mar 2009 23:13:00 +0000 (17:13 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 13 Mar 2009 00:25:09 +0000 (18:25 -0600)
src/mesa/drivers/dri/i915/i830_vtbl.c
src/mesa/drivers/dri/i915/intel_tris.c

index 8fc8aa5f9003646324ac44706de8ea9e860645e2..1a94921078980028f4c1f96b1ebd2fcc458cd9b4 100644 (file)
@@ -422,10 +422,10 @@ i830_emit_state(struct intel_context *intel)
    struct i830_hw_state *state = i830->current;
    int i, count;
    GLuint dirty;
-   GET_CURRENT_CONTEXT(ctx);
-   BATCH_LOCALS;
    dri_bo *aper_array[3 + I830_TEX_UNITS];
    int aper_count;
+   GET_CURRENT_CONTEXT(ctx);
+   BATCH_LOCALS;
 
    /* We don't hold the lock at this point, so want to make sure that
     * there won't be a buffer wrap between the state emits and the primitive
index a857803b2ee41344f24e134c10be7582f9db96b8..1d39278cbf085050b1cce02da7c3723956231a04 100644 (file)
@@ -89,8 +89,8 @@ intel_flush_inline_primitive(struct intel_context *intel)
 
 static void intel_start_inline(struct intel_context *intel, uint32_t prim)
 {
-   BATCH_LOCALS;
    uint32_t batch_flags = LOOP_CLIPRECTS;
+   BATCH_LOCALS;
 
    intel->vtbl.emit_state(intel);
 
@@ -201,10 +201,10 @@ uint32_t *intel_get_prim_space(struct intel_context *intel, unsigned int count)
 /** Dispatches the accumulated primitive to the batchbuffer. */
 void intel_flush_prim(struct intel_context *intel)
 {
-   BATCH_LOCALS;
    dri_bo *aper_array[2];
    dri_bo *vb_bo;
    unsigned int offset, count;
+   BATCH_LOCALS;
 
    /* Must be called after an intel_start_prim. */
    assert(intel->prim.primitive != ~0);