i965g: Fix use of out-of-scope variable.
authorVinson Lee <vlee@vmware.com>
Sun, 21 Feb 2010 08:24:05 +0000 (00:24 -0800)
committerVinson Lee <vlee@vmware.com>
Sun, 21 Feb 2010 08:24:05 +0000 (00:24 -0800)
src/gallium/drivers/i965/brw_wm_sampler_state.c

index a8bc31c9ceffca33d422f5adf5d57af9fb89bd99..6a6086fc51b3a172f3be2a6eee948e1716d0bcba 100644 (file)
@@ -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 {