On Fri, Feb 6, 2015 at 4:47 AM, Ian Romanick <i...@freedesktop.org> wrote: > On 02/06/2015 02:32 PM, Kenneth Graunke wrote: >> This should have no effect, but will make it easier to implement other >> bug fixes. >> >> Signed-off-by: Kenneth Graunke <kenn...@whitecape.org> >> Cc: Chris Forbes <chr...@ijw.co.nz> >> Cc: mesa-sta...@lists.freedesktop.org >> --- >> src/mesa/drivers/dri/i965/brw_sampler_state.c | 107 >> +++++++++++++------------- >> 1 file changed, 54 insertions(+), 53 deletions(-) >> >> diff --git a/src/mesa/drivers/dri/i965/brw_sampler_state.c >> b/src/mesa/drivers/dri/i965/brw_sampler_state.c >> index 0fe0853..c6a8ab1 100644 >> --- a/src/mesa/drivers/dri/i965/brw_sampler_state.c >> +++ b/src/mesa/drivers/dri/i965/brw_sampler_state.c >> @@ -208,7 +208,9 @@ upload_default_color(struct brw_context *brw, >> struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; >> struct gl_texture_object *texObj = texUnit->_Current; >> struct gl_texture_image *firstImage = >> texObj->Image[0][texObj->BaseLevel]; >> - float color[4]; >> + union gl_color_union color; >> + >> + unsigned one = float_as_int(1.0); > > const?
Since it's only used in two places, I'd opt to not make a variable at all. float_as_int() is an inline function and it's pretty clear what it does. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev