Module: Mesa
Branch: mesa_7_7_branch
Commit: c1a5c9bb4c3c68bea483a0a5bd77b26b150434d2
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=c1a5c9bb4c3c68bea483a0a5bd77b26b150434d2

Author: José Fonseca <jfons...@vmware.com>
Date:   Sat Feb 13 09:16:57 2010 +0000

svga: Fix texture border color.

Also opposite ordering.

---

 src/gallium/drivers/svga/svga_pipe_sampler.c |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_pipe_sampler.c 
b/src/gallium/drivers/svga/svga_pipe_sampler.c
index 9cc69c8..c1e0166 100644
--- a/src/gallium/drivers/svga/svga_pipe_sampler.c
+++ b/src/gallium/drivers/svga/svga_pipe_sampler.c
@@ -27,7 +27,6 @@
 #include "pipe/p_defines.h"
 #include "util/u_math.h"
 #include "util/u_memory.h"
-#include "util/u_pack_color.h"
 #include "tgsi/tgsi_parse.h"
 
 #include "svga_context.h"
@@ -112,14 +111,12 @@ svga_create_sampler_state(struct pipe_context *pipe,
    cso->compare_func = sampler->compare_func;
 
    {
-      ubyte r = float_to_ubyte(sampler->border_color[0]);
-      ubyte g = float_to_ubyte(sampler->border_color[1]);
-      ubyte b = float_to_ubyte(sampler->border_color[2]);
-      ubyte a = float_to_ubyte(sampler->border_color[3]);
-
-      util_pack_color_ub( r, g, b, a,
-                          PIPE_FORMAT_B8G8R8A8_UNORM,
-                          &cso->bordercolor );
+      uint32 r = float_to_ubyte(sampler->border_color[0]);
+      uint32 g = float_to_ubyte(sampler->border_color[1]);
+      uint32 b = float_to_ubyte(sampler->border_color[2]);
+      uint32 a = float_to_ubyte(sampler->border_color[3]);
+
+      cso->bordercolor = (a << 24) | (r << 16) | (g << 8) | b;
    }
 
    /* No SVGA3D support for:

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to