VirtualBox-5.0.0/src/VBox/Devices/Graphics/DevVGA-SVGA3d-win.cpp
/**
 * Convert SVGA texture combiner value to its D3D equivalent
 */
Convert SVGA texture combiner value to its D3D equivalent
Convert SVGA texture combiner value to its D3D equivalent
static DWORD vmsvga3dTextureCombiner2D3D(uint32_t value)
{
    switch (value)
    {
    case SVGA3D_TC_DISABLE:
        return D3DTOP_DISABLE;
    case SVGA3D_TC_SELECTARG1:
        return D3DTOP_SELECTARG1;
    case SVGA3D_TC_SELECTARG2:
        return D3DTOP_SELECTARG2;
    case SVGA3D_TC_MODULATE:
        return D3DTOP_MODULATE;
    case SVGA3D_TC_ADD:
        return D3DTOP_ADD;
    case SVGA3D_TC_ADDSIGNED:
        return D3DTOP_ADDSIGNED;
    case SVGA3D_TC_SUBTRACT:
        return D3DTOP_SUBTRACT;
    case SVGA3D_TC_BLENDTEXTUREALPHA:
        return D3DTOP_BLENDTEXTUREALPHA;
    case SVGA3D_TC_BLENDDIFFUSEALPHA:
        return D3DTOP_BLENDDIFFUSEALPHA;
    case SVGA3D_TC_BLENDCURRENTALPHA:
        return D3DTOP_BLENDCURRENTALPHA;
    case SVGA3D_TC_BLENDFACTORALPHA:
        return D3DTOP_BLENDFACTORALPHA;
    case SVGA3D_TC_MODULATE2X:
        return D3DTOP_MODULATE2X;
    case SVGA3D_TC_MODULATE4X:
        return D3DTOP_MODULATE4X;
    case SVGA3D_TC_DSDT:
        AssertFailed(); 
        return D3DTOP_DISABLE;
    case SVGA3D_TC_DOTPRODUCT3:
        return D3DTOP_DOTPRODUCT3;
    case SVGA3D_TC_BLENDTEXTUREALPHAPM:
        return D3DTOP_BLENDTEXTUREALPHAPM;
    case SVGA3D_TC_ADDSIGNED2X:
        return D3DTOP_ADDSIGNED2X;
    case SVGA3D_TC_ADDSMOOTH:
        return D3DTOP_ADDSMOOTH;
    case SVGA3D_TC_PREMODULATE:
        return D3DTOP_PREMODULATE;
    case SVGA3D_TC_MODULATEALPHA_ADDCOLOR:
        return D3DTOP_MODULATEALPHA_ADDCOLOR;
    case SVGA3D_TC_MODULATECOLOR_ADDALPHA:
        return D3DTOP_MODULATECOLOR_ADDALPHA;
    case SVGA3D_TC_MODULATEINVALPHA_ADDCOLOR:
        return D3DTOP_MODULATEINVALPHA_ADDCOLOR;
    case SVGA3D_TC_MODULATEINVCOLOR_ADDALPHA:
        return D3DTOP_MODULATEINVCOLOR_ADDALPHA;
    case SVGA3D_TC_BUMPENVMAPLUMINANCE:
        return D3DTOP_BUMPENVMAPLUMINANCE;
    case SVGA3D_TC_MULTIPLYADD:
        return D3DTOP_MULTIPLYADD;
    case SVGA3D_TC_LERP:
        return D3DTOP_LERP;
    default:
        AssertFailed();
        return D3DTOP_DISABLE;
    }
}
static DWORD vmsvga3dTextureCombiner2D3D ( uint32_t value ) { switch ( value ) { case SVGA3D_TC_DISABLE : return D3DTOP_DISABLE ; case SVGA3D_TC_SELECTARG1 : return D3DTOP_SELECTARG1 ; case SVGA3D_TC_SELECTARG2 : return D3DTOP_SELECTARG2 ; case SVGA3D_TC_MODULATE : return D3DTOP_MODULATE ; case SVGA3D_TC_ADD : return D3DTOP_ADD ; case SVGA3D_TC_ADDSIGNED : return D3DTOP_ADDSIGNED ; case SVGA3D_TC_SUBTRACT : return D3DTOP_SUBTRACT ; case SVGA3D_TC_BLENDTEXTUREALPHA : return D3DTOP_BLENDTEXTUREALPHA ; case SVGA3D_TC_BLENDDIFFUSEALPHA : return D3DTOP_BLENDDIFFUSEALPHA ; case SVGA3D_TC_BLENDCURRENTALPHA : return D3DTOP_BLENDCURRENTALPHA ; case SVGA3D_TC_BLENDFACTORALPHA : return D3DTOP_BLENDFACTORALPHA ; case SVGA3D_TC_MODULATE2X : return D3DTOP_MODULATE2X ; case SVGA3D_TC_MODULATE4X : return D3DTOP_MODULATE4X ; case SVGA3D_TC_DSDT : AssertFailed ( ) ; return D3DTOP_DISABLE ; case SVGA3D_TC_DOTPRODUCT3 : return D3DTOP_DOTPRODUCT3 ; case SVGA3D_TC_BLENDTEXTUREALPHAPM : return D3DTOP_BLENDTEXTUREALPHAPM ; case SVGA3D_TC_ADDSIGNED2X : return D3DTOP_ADDSIGNED2X ; case SVGA3D_TC_ADDSMOOTH : return D3DTOP_ADDSMOOTH ; case SVGA3D_TC_PREMODULATE : return D3DTOP_PREMODULATE ; case SVGA3D_TC_MODULATEALPHA_ADDCOLOR : return D3DTOP_MODULATEALPHA_ADDCOLOR ; case SVGA3D_TC_MODULATECOLOR_ADDALPHA : return D3DTOP_MODULATECOLOR_ADDALPHA ; case SVGA3D_TC_MODULATEINVALPHA_ADDCOLOR : return D3DTOP_MODULATEINVALPHA_ADDCOLOR ; case SVGA3D_TC_MODULATEINVCOLOR_ADDALPHA : return D3DTOP_MODULATEINVCOLOR_ADDALPHA ; case SVGA3D_TC_BUMPENVMAPLUMINANCE : return D3DTOP_BUMPENVMAPLUMINANCE ; case SVGA3D_TC_MULTIPLYADD : return D3DTOP_MULTIPLYADD ; case SVGA3D_TC_LERP : return D3DTOP_LERP ; default : AssertFailed ( ) ; return D3DTOP_DISABLE ; } }
Convert SVGA texture combiner value to its D3D equivalent
Convert SVGA texture combiner value to its D3D equivalent
/* @todo ??? */