mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 21:10:16 +01:00
svga: A few more tweaks to blend color state emission.
This commit is contained in:
parent
3a4068474c
commit
a1025ec041
2 changed files with 7 additions and 9 deletions
|
|
@ -223,7 +223,7 @@ static void svga_set_blend_color( struct pipe_context *pipe,
|
|||
|
||||
svga->curr.blend_color = *blend_color;
|
||||
|
||||
svga->dirty |= SVGA_NEW_BLEND;
|
||||
svga->dirty |= SVGA_NEW_BLEND_COLOR;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@
|
|||
#include "pipe/p_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"
|
||||
|
|
@ -103,14 +102,13 @@ static int emit_rss( struct svga_context *svga,
|
|||
|
||||
|
||||
if (dirty & SVGA_NEW_BLEND_COLOR) {
|
||||
unsigned color = 0;
|
||||
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, &color);
|
||||
color = (a << 24) | (r << 16) | (g << 8) | b;
|
||||
|
||||
EMIT_RS( svga, color, BLENDCOLOR, fail );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue