mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-11 03:40:22 +01:00
svga: emit blend color
This commit is contained in:
parent
df0c8d029d
commit
b685927156
1 changed files with 17 additions and 4 deletions
|
|
@ -26,6 +26,7 @@
|
|||
#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"
|
||||
|
|
@ -101,6 +102,20 @@ 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]);
|
||||
|
||||
util_pack_color_ub( r, g, b, a,
|
||||
PIPE_FORMAT_B8G8R8A8_UNORM, &color);
|
||||
|
||||
EMIT_RS( svga, color, BLENDCOLOR, fail );
|
||||
}
|
||||
|
||||
|
||||
if (dirty & (SVGA_NEW_DEPTH_STENCIL | SVGA_NEW_RAST)) {
|
||||
const struct svga_depth_stencil_state *curr = svga->curr.depth;
|
||||
const struct svga_rasterizer_state *rast = svga->curr.rast;
|
||||
|
|
@ -230,13 +245,10 @@ static int emit_rss( struct svga_context *svga,
|
|||
memcpy( rs,
|
||||
queue.rs,
|
||||
queue.rs_count * sizeof queue.rs[0]);
|
||||
|
||||
|
||||
SVGA_FIFOCommitAll( svga->swc );
|
||||
}
|
||||
|
||||
/* Also blend color:
|
||||
*/
|
||||
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
|
|
@ -256,6 +268,7 @@ struct svga_tracked_state svga_hw_rss =
|
|||
"hw rss state",
|
||||
|
||||
(SVGA_NEW_BLEND |
|
||||
SVGA_NEW_BLEND_COLOR |
|
||||
SVGA_NEW_DEPTH_STENCIL |
|
||||
SVGA_NEW_RAST |
|
||||
SVGA_NEW_FRAME_BUFFER |
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue