third_party/virtualbox/src/VBox/Devices/Graphics/DevVGA-SVGA3d-win.cpp
/* Convert VMWare vertex declaration to its D3D equivalent. */
Convert VMWare vertex declaration to its D3D equivalent.
Convert VMWare vertex declaration to its D3D equivalent .
static int vmsvga3dVertexDecl2D3D(const SVGA3dVertexArrayIdentity &identity, D3DVERTEXELEMENT9 *pVertexElement)
{
    AssertCompile(SVGA3D_DECLTYPE_FLOAT1 == D3DDECLTYPE_FLOAT1);
    AssertCompile(SVGA3D_DECLTYPE_FLOAT16_4 == D3DDECLTYPE_FLOAT16_4);
    AssertCompile(SVGA3D_DECLMETHOD_DEFAULT == D3DDECLMETHOD_DEFAULT);
    AssertCompile(SVGA3D_DECLMETHOD_LOOKUPPRESAMPLED == D3DDECLMETHOD_LOOKUPPRESAMPLED);
    AssertCompile(D3DDECLUSAGE_POSITION == SVGA3D_DECLUSAGE_POSITION);
    AssertCompile(D3DDECLUSAGE_SAMPLE == SVGA3D_DECLUSAGE_SAMPLE);
    pVertexElement->Stream      = 0;
    pVertexElement->Offset      = 0;
    pVertexElement->Type        = identity.type;
    pVertexElement->Method      = identity.method;
    pVertexElement->Usage       = identity.usage;
    pVertexElement->UsageIndex  = identity.usageIndex;
    return VINF_SUCCESS;
}
static int vmsvga3dVertexDecl2D3D ( const SVGA3dVertexArrayIdentity & identity , D3DVERTEXELEMENT9 * pVertexElement ) { AssertCompile ( SVGA3D_DECLTYPE_FLOAT1 == D3DDECLTYPE_FLOAT1 ) ; AssertCompile ( SVGA3D_DECLTYPE_FLOAT16_4 == D3DDECLTYPE_FLOAT16_4 ) ; AssertCompile ( SVGA3D_DECLMETHOD_DEFAULT == D3DDECLMETHOD_DEFAULT ) ; AssertCompile ( SVGA3D_DECLMETHOD_LOOKUPPRESAMPLED == D3DDECLMETHOD_LOOKUPPRESAMPLED ) ; AssertCompile ( D3DDECLUSAGE_POSITION == SVGA3D_DECLUSAGE_POSITION ) ; AssertCompile ( D3DDECLUSAGE_SAMPLE == SVGA3D_DECLUSAGE_SAMPLE ) ; pVertexElement -> Stream = 0 ; pVertexElement -> Offset = 0 ; pVertexElement -> Type = identity . type ; pVertexElement -> Method = identity . method ; pVertexElement -> Usage = identity . usage ; pVertexElement -> UsageIndex = identity . usageIndex ; return VINF_SUCCESS ; }
Convert VMWare vertex declaration to its D3D equivalent.
Convert VMWare vertex declaration to its D3D equivalent .
/* usage, method and type are identical; make sure. */