diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-02-12 23:17:04 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-02-12 23:48:22 +0000 |
commit | cd5d7608897a435623b26e3d5d6391734b9197e8 (patch) | |
tree | 6c8c586e6d9a0c8dff9b47b6b68a61a4046d2e7a /src/gallium/drivers/svga/svga_state_rss.c | |
parent | 6af833add2a695922400d3f641e3c7fa09c00a46 (diff) | |
download | external_mesa3d-cd5d7608897a435623b26e3d5d6391734b9197e8.zip external_mesa3d-cd5d7608897a435623b26e3d5d6391734b9197e8.tar.gz external_mesa3d-cd5d7608897a435623b26e3d5d6391734b9197e8.tar.bz2 |
svga: A few more tweaks to blend color state emission.
Diffstat (limited to 'src/gallium/drivers/svga/svga_state_rss.c')
-rw-r--r-- | src/gallium/drivers/svga/svga_state_rss.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/gallium/drivers/svga/svga_state_rss.c b/src/gallium/drivers/svga/svga_state_rss.c index 15ead98..107cc40 100644 --- a/src/gallium/drivers/svga/svga_state_rss.c +++ b/src/gallium/drivers/svga/svga_state_rss.c @@ -26,7 +26,6 @@ #include "util/u_inlines.h" #include "pipe/p_defines.h" #include "util/u_math.h" -#include "util/u_pack_color.h" #include "svga_context.h" #include "svga_state.h" @@ -102,16 +101,15 @@ static int emit_rss( struct svga_context *svga, } if (dirty & SVGA_NEW_BLEND_COLOR) { - union util_color uc; - ubyte r = float_to_ubyte(svga->curr.blend_color.color[0]); - ubyte g = float_to_ubyte(svga->curr.blend_color.color[1]); - ubyte b = float_to_ubyte(svga->curr.blend_color.color[2]); - ubyte a = float_to_ubyte(svga->curr.blend_color.color[3]); + uint32 color; + uint32 r = float_to_ubyte(svga->curr.blend_color.color[0]); + uint32 g = float_to_ubyte(svga->curr.blend_color.color[1]); + uint32 b = float_to_ubyte(svga->curr.blend_color.color[2]); + uint32 a = float_to_ubyte(svga->curr.blend_color.color[3]); - util_pack_color_ub( r, g, b, a, - PIPE_FORMAT_B8G8R8A8_UNORM, &uc); + color = (a << 24) | (r << 16) | (g << 8) | b; - EMIT_RS( svga, uc.ui, BLENDCOLOR, fail ); + EMIT_RS( svga, color, BLENDCOLOR, fail ); } if (dirty & (SVGA_NEW_DEPTH_STENCIL | SVGA_NEW_RAST)) { |