From: Vinson Lee Date: Sun, 21 Feb 2010 08:24:05 +0000 (-0800) Subject: i965g: Fix use of out-of-scope variable. X-Git-Tag: mesa-7.8~603 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f56c9c2b198dc740fd1559157a160b8a9d0de7a5;p=platform%2Fupstream%2Fmesa.git i965g: Fix use of out-of-scope variable. --- diff --git a/src/gallium/drivers/i965/brw_wm_sampler_state.c b/src/gallium/drivers/i965/brw_wm_sampler_state.c index a8bc31c..6a6086f 100644 --- a/src/gallium/drivers/i965/brw_wm_sampler_state.c +++ b/src/gallium/drivers/i965/brw_wm_sampler_state.c @@ -130,15 +130,14 @@ brw_wm_sampler_update_default_colors(struct brw_context *brw) const struct brw_texture *tex = brw_texture(brw->curr.texture[i]); const struct brw_sampler *sampler = brw->curr.sampler[i]; const float *bc; - + float bordercolor[4] = { + sampler->border_color[0], + sampler->border_color[0], + sampler->border_color[0], + sampler->border_color[0] + }; + if (util_format_is_depth_or_stencil(tex->base.format)) { - float bordercolor[4] = { - sampler->border_color[0], - sampler->border_color[0], - sampler->border_color[0], - sampler->border_color[0] - }; - bc = bordercolor; } else {