freedreno/a3xx: fix border color order
authorRob Clark <robclark@freedesktop.org>
Sat, 27 Sep 2014 22:19:54 +0000 (18:19 -0400)
committerRob Clark <robclark@freedesktop.org>
Mon, 29 Sep 2014 22:30:42 +0000 (18:30 -0400)
Signed-off-by: Rob Clark <robclark@freedesktop.org>
src/gallium/drivers/freedreno/a3xx/fd3_emit.c

index c48381c95077081341a6c6c3c41ca755e2b09c20..430339ae47ddf6e2c2011a35431647703d1ac8ed 100644 (file)
@@ -194,11 +194,10 @@ emit_textures(struct fd_context *ctx, struct fd_ringbuffer *ring,
                                        (BORDERCOLOR_SIZE * tex_off[sb]) +
                                        (BORDERCOLOR_SIZE * i));
 
-                       /* TODO not quite sure if bcolor is pre or post swizzle: */
-                       for (j = 0; j < 4; j++) {
-                               bcolor[j] =
-                                       util_float_to_half(sampler->base.border_color.f[j]);
-                       }
+                       bcolor[0] = util_float_to_half(sampler->base.border_color.f[2]);
+                       bcolor[1] = util_float_to_half(sampler->base.border_color.f[1]);
+                       bcolor[2] = util_float_to_half(sampler->base.border_color.f[0]);
+                       bcolor[3] = util_float_to_half(sampler->base.border_color.f[3]);
 
                        OUT_RING(ring, sampler->texsamp0);
                        OUT_RING(ring, sampler->texsamp1);