static inline unsigned
svga_translate_blend_factor(const struct svga_context *svga, unsigned factor)
{
+ /* Note: there is no SVGA3D_BLENDOP_[INV]BLENDFACTORALPHA so
+ * we can't translate PIPE_BLENDFACTOR_[INV_]CONST_ALPHA properly.
+ */
switch (factor) {
case PIPE_BLENDFACTOR_ZERO: return SVGA3D_BLENDOP_ZERO;
case PIPE_BLENDFACTOR_SRC_ALPHA: return SVGA3D_BLENDOP_SRCALPHA;
struct svga_blend_state *blend = CALLOC_STRUCT( svga_blend_state );
unsigned i;
+ if (!blend)
+ return NULL;
+
/* Fill in the per-rendertarget blend state. We currently only
* support independent blend enable and colormask per render target.
*/
blend->rt[i].srcblend_alpha = blend->rt[i].srcblend;
blend->rt[i].dstblend_alpha = blend->rt[i].dstblend;
blend->rt[i].blendeq_alpha = blend->rt[i].blendeq;
+
+ if (templ->logicop_func == PIPE_LOGICOP_XOR) {
+ pipe_debug_message(&svga->debug.callback, CONFORMANCE,
+ "XOR logicop mode has limited support");
+ }
+ else if (templ->logicop_func != PIPE_LOGICOP_COPY) {
+ pipe_debug_message(&svga->debug.callback, CONFORMANCE,
+ "general logicops are not supported");
+ }
}
else {
/* Note: the vgpu10 device does not yet support independent
define_blend_state_object(svga, blend);
}
+ svga->hud.num_blend_objects++;
+ SVGA_STATS_COUNT_INC(svga_screen(svga->pipe.screen)->sws,
+ SVGA_STATS_COUNT_BLENDSTATE);
+
return blend;
}
}
FREE(blend);
+ svga->hud.num_blend_objects--;
}
static void svga_set_blend_color( struct pipe_context *pipe,