Developing Games on Intel Graphics
If you are gaming on graphics integrated in your Intel Processor, this is the place for you! Find answers to your questions or post your issues with PC games
485 Discussions

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

Letian_Yi
Beginner
344 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
0 Replies
Reply