r300g: Move declaration before code.
authorVinson Lee <vlee@vmware.com>
Mon, 12 Apr 2010 19:50:41 +0000 (12:50 -0700)
committerVinson Lee <vlee@vmware.com>
Mon, 12 Apr 2010 19:50:41 +0000 (12:50 -0700)
Fixes SCons build.

src/gallium/drivers/r300/r300_emit.c

index d0f227f9424f4603026b4d254a12c0760255011d..637b0adbff62cf7cc6a3585952fbb687d0df7f9e 100644 (file)
@@ -334,8 +334,9 @@ void r300_emit_fs_constants(struct r300_context* r300, unsigned size, void *stat
     BEGIN_CS(size);
     OUT_CS_REG_SEQ(R300_PFS_PARAM_0_X, count * 4);
     for(i = 0; i < count; ++i) {
+        const float *data;
         assert(constants->Constants[i].Type == RC_CONSTANT_EXTERNAL);
-        const float *data = buf->constants[i];
+        data = buf->constants[i];
         OUT_CS(pack_float24(data[0]));
         OUT_CS(pack_float24(data[1]));
         OUT_CS(pack_float24(data[2]));
@@ -454,8 +455,9 @@ void r500_emit_fs_constants(struct r300_context* r300, unsigned size, void *stat
     OUT_CS_REG(R500_GA_US_VECTOR_INDEX, R500_GA_US_VECTOR_INDEX_TYPE_CONST);
     OUT_CS_ONE_REG(R500_GA_US_VECTOR_DATA, count * 4);
     for(i = 0; i < count; ++i) {
+        const float *data;
         assert(constants->Constants[i].Type == RC_CONSTANT_EXTERNAL);
-        const float *data = buf->constants[i];
+        data = buf->constants[i];
 
         OUT_CS_32F(data[0]);
         OUT_CS_32F(data[1]);