Software Archive
Read-only legacy content
17061 Discussions

How to handle GUID_ZPixelFormats in graphics card driver with Direct3D DirectDraw and DXVA under XDDM

Letian_Yi
Beginner
386 Views

Hi all:

I'm developing a virtual graphics card driver under XDDM.

I have finished the DirectDraw part of the driver, and i can see the DirectDraw is enabled in dxdiag.

Now i'm developing the D3D part, but when i handle GUID_ZPixelFormats in DdGetDriverInfo,  DirectDraw is disabled !

Does anyone know how to handle GUID_ZPixelFormats in DdGetDriverInfo ?

My code:

void DdInitZPixelFormats(PDD_GETDRIVERINFODATA lpGetDriverInfo)
{
    static const DDPIXELFORMAT g_zfmts[] =
    {
        {
            sizeof(DDPIXELFORMAT), DDPF_ZBUFFER, 0,
            { 16 }, { 0 }, { 0x0000ffff }, { 0x00000000 }, { 0x00000000 }
        },
        {
            sizeof(DDPIXELFORMAT), DDPF_ZBUFFER, 0,
            { 32 }, { 0 }, { 0x00ffffff }, { 0x00000000 }, { 0x00000000 }
        },
    };
    DWORD num = sizeof(g_zfmts) / sizeof(DDPIXELFORMAT);
    DWORD size = sizeof(g_zfmts);
    UINT8 *buf = (UINT8 *)lpGetDriverInfo->lpvData;
    memcpy(buf, g_zfmts, min(lpGetDriverInfo->dwExpectedSize, sizeof(g_zfmts)));
    lpGetDriverInfo->dwActualSize = size;
    lpGetDriverInfo->ddRVal = DD_OK;
}

0 Kudos
2 Replies
Quoc-Thai_L_Intel
386 Views

Checking with some internal team for any input on this topic.  Will let you know as soon as I have some update.  Regards, Thai

0 Kudos
Quoc-Thai_L_Intel
386 Views

Some questions came back from my internal contacts....Were you able to get this working in native Windows environment?   Also, can you provide some background information about _why_ and in what context you are developing an XDDM virtual graphics driver?

 "AFAIK… the VMM ISVs _themselves_ have already developed XDDM (and WDDM) drivers for the most relevant Client VMMs (i.e. vmware, parallels, virtualbox… Microsoft RemoteFX though that’s datacenter) so what is it that they’re producing?  An API remoting based, VSGA, solution for … ? Xen? KVM? Docker?"

 

-Thai

0 Kudos
Reply