From: Vinson Lee Date: Mon, 12 Apr 2010 19:50:41 +0000 (-0700) Subject: r300g: Move declaration before code. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=202760b4372fbe8488b0c6b93578697ae81fd430;p=mesa.git r300g: Move declaration before code. Fixes SCons build. --- diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c index d0f227f9424..637b0adbff6 100644 --- a/src/gallium/drivers/r300/r300_emit.c +++ b/src/gallium/drivers/r300/r300_emit.c @@ -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]);