VirtualBox-5.0.0/src/VBox/Devices/Graphics/DevVGA-SVGA3d-win.cpp
/**
 * Convert SVGA blend op value to its D3D equivalent
 */
Convert SVGA blend op value to its D3D equivalent
Convert SVGA blend op value to its D3D equivalent
static DWORD vmsvga3dBlendOp2D3D(uint32_t blendOp, DWORD defaultBlendOp)
{
    switch (blendOp)
    {
    case SVGA3D_BLENDOP_ZERO:
        return D3DBLEND_ZERO;
    case SVGA3D_BLENDOP_ONE:
        return D3DBLEND_ONE;
    case SVGA3D_BLENDOP_SRCCOLOR:
        return D3DBLEND_SRCCOLOR;
    case SVGA3D_BLENDOP_INVSRCCOLOR:
        return D3DBLEND_INVSRCCOLOR;
    case SVGA3D_BLENDOP_SRCALPHA:
        return D3DBLEND_SRCALPHA;
    case SVGA3D_BLENDOP_INVSRCALPHA:
        return D3DBLEND_INVSRCALPHA;
    case SVGA3D_BLENDOP_DESTALPHA:
        return D3DBLEND_DESTALPHA;
    case SVGA3D_BLENDOP_INVDESTALPHA:
        return D3DBLEND_INVDESTALPHA;
    case SVGA3D_BLENDOP_DESTCOLOR:
        return D3DBLEND_DESTCOLOR;
    case SVGA3D_BLENDOP_INVDESTCOLOR:
        return D3DBLEND_INVDESTCOLOR;
    case SVGA3D_BLENDOP_SRCALPHASAT:
        return D3DBLEND_SRCALPHASAT;
    case SVGA3D_BLENDOP_BLENDFACTOR:
        return D3DBLEND_BLENDFACTOR;
    case SVGA3D_BLENDOP_INVBLENDFACTOR:
        return D3DBLEND_INVBLENDFACTOR;
    default:
        AssertFailed();
        return defaultBlendOp;
    }
}
static DWORD vmsvga3dBlendOp2D3D ( uint32_t blendOp , DWORD defaultBlendOp ) { switch ( blendOp ) { case SVGA3D_BLENDOP_ZERO : return D3DBLEND_ZERO ; case SVGA3D_BLENDOP_ONE : return D3DBLEND_ONE ; case SVGA3D_BLENDOP_SRCCOLOR : return D3DBLEND_SRCCOLOR ; case SVGA3D_BLENDOP_INVSRCCOLOR : return D3DBLEND_INVSRCCOLOR ; case SVGA3D_BLENDOP_SRCALPHA : return D3DBLEND_SRCALPHA ; case SVGA3D_BLENDOP_INVSRCALPHA : return D3DBLEND_INVSRCALPHA ; case SVGA3D_BLENDOP_DESTALPHA : return D3DBLEND_DESTALPHA ; case SVGA3D_BLENDOP_INVDESTALPHA : return D3DBLEND_INVDESTALPHA ; case SVGA3D_BLENDOP_DESTCOLOR : return D3DBLEND_DESTCOLOR ; case SVGA3D_BLENDOP_INVDESTCOLOR : return D3DBLEND_INVDESTCOLOR ; case SVGA3D_BLENDOP_SRCALPHASAT : return D3DBLEND_SRCALPHASAT ; case SVGA3D_BLENDOP_BLENDFACTOR : return D3DBLEND_BLENDFACTOR ; case SVGA3D_BLENDOP_INVBLENDFACTOR : return D3DBLEND_INVBLENDFACTOR ; default : AssertFailed ( ) ; return defaultBlendOp ; } }
Convert SVGA blend op value to its D3D equivalent
Convert SVGA blend op value to its D3D equivalent