Mesa (master): r300g: Move declaration before code.

Vinson Lee vlee at kemper.freedesktop.org
Mon Feb 14 08:08:12 UTC 2011


Module: Mesa
Branch: master
Commit: 3b01b52bd78e3d2fc857feacebd815a5fae00c94
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3b01b52bd78e3d2fc857feacebd815a5fae00c94

Author: Vinson Lee <vlee at vmware.com>
Date:   Mon Feb 14 00:07:07 2011 -0800

r300g: Move declaration before code.

Fixes SCons build.

---

 src/gallium/drivers/r300/r300_emit.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index 027cd5b..9c3a5e8 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -814,15 +814,16 @@ void r300_emit_vertex_arrays(struct r300_context* r300, int offset, boolean inde
     int i;
     unsigned vertex_array_count = r300->velems->count;
     unsigned packet_size = (vertex_array_count * 3 + 1) / 2;
+    struct pipe_vertex_buffer *vb1, *vb2;
+    unsigned *hw_format_size = r300->velems->format_size;
+    unsigned size1, size2;
     CS_LOCALS(r300);
 
     BEGIN_CS(2 + packet_size + vertex_array_count * 2);
     OUT_CS_PKT3(R300_PACKET3_3D_LOAD_VBPNTR, packet_size);
     OUT_CS(vertex_array_count | (!indexed ? R300_VC_FORCE_PREFETCH : 0));
 
-    struct pipe_vertex_buffer *vb1, *vb2;
-    unsigned *hw_format_size = r300->velems->format_size;
-    unsigned size1, size2;
+    hw_format_size = r300->velems->format_size;
 
     for (i = 0; i < vertex_array_count - 1; i += 2) {
         vb1 = &vbuf[velem[i].vertex_buffer_index];




More information about the mesa-commit mailing list