mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:12:58 +00:00
[SDK][WIN32SS] Prepare d3dkmt functions up to Windows Vista (#5612)
Prepare the d3dkmt APIs up to Vista RTM Build the skeleton needed for having userspace components talk to a WDDM KMD driver Co-authored-by: Mark Jansen <mark.jansen@reactos.org> Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
This commit is contained in:
parent
818842de06
commit
e7a9e7ca3d
17 changed files with 1987 additions and 16 deletions
241
sdk/include/ddk/d3dkmddi.h
Normal file
241
sdk/include/ddk/d3dkmddi.h
Normal file
|
@ -0,0 +1,241 @@
|
|||
/*
|
||||
* PROJECT: ReactOS Display Driver Model
|
||||
* LICENSE: MIT (https://spdx.org/licenses/MIT)
|
||||
* PURPOSE: Header file for WDDM style DDIs
|
||||
* COPYRIGHT: Copyright 2024 Justin Miller <justin.miller@reactos.org>
|
||||
*/
|
||||
|
||||
#ifndef _D3DKMDDI_H_
|
||||
#define _D3DKMDDI_H_
|
||||
|
||||
#include <d3dkmdt.h>
|
||||
|
||||
typedef struct _DXGK_ALLOCATIONINFOFLAGS_WDDM2_0
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
UINT CpuVisible : 1;
|
||||
UINT PermanentSysMem : 1;
|
||||
UINT Cached : 1;
|
||||
UINT Protected : 1;
|
||||
UINT ExistingSysMem : 1;
|
||||
UINT ExistingKernelSysMem : 1;
|
||||
UINT FromEndOfSegment : 1;
|
||||
UINT DisableLargePageMapping : 1;
|
||||
UINT Overlay : 1;
|
||||
UINT Capture : 1;
|
||||
#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_1)
|
||||
UINT CreateInVpr : 1;
|
||||
#else
|
||||
UINT Reserved00 : 1;
|
||||
#endif
|
||||
UINT DXGK_ALLOC_RESERVED17 : 1;
|
||||
UINT Reserved02 : 1;
|
||||
#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_9)
|
||||
UINT MapApertureCpuVisible : 1;
|
||||
#else
|
||||
UINT Reserved03 : 1;
|
||||
#endif
|
||||
UINT HistoryBuffer : 1;
|
||||
UINT AccessedPhysically : 1;
|
||||
UINT ExplicitResidencyNotification : 1;
|
||||
UINT HardwareProtected : 1;
|
||||
UINT CpuVisibleOnDemand : 1;
|
||||
UINT DXGK_ALLOC_RESERVED16 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED15 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED14 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED13 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED12 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED11 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED10 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED9 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED4 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED3 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED2 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED1 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED0 : 1;
|
||||
};
|
||||
UINT Value;
|
||||
};
|
||||
} DXGK_ALLOCATIONINFOFLAGS_WDDM2_0;
|
||||
C_ASSERT(sizeof(DXGK_ALLOCATIONINFOFLAGS_WDDM2_0) == 0x4);
|
||||
|
||||
typedef struct _DXGK_SEGMENTPREFERENCE
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
UINT SegmentId0 : 5;
|
||||
UINT Direction0 : 1;
|
||||
UINT SegmentId1 : 5;
|
||||
UINT Direction1 : 1;
|
||||
UINT SegmentId2 : 5;
|
||||
UINT Direction2 : 1;
|
||||
UINT SegmentId3 : 5;
|
||||
UINT Direction3 : 1;
|
||||
UINT SegmentId4 : 5;
|
||||
UINT Direction4 : 1;
|
||||
UINT Reserved : 2;
|
||||
};
|
||||
UINT Value;
|
||||
};
|
||||
} DXGK_SEGMENTPREFERENCE, *PDXGK_SEGMENTPREFERENCE;
|
||||
C_ASSERT(sizeof(DXGK_SEGMENTPREFERENCE) == 0x4);
|
||||
|
||||
typedef struct _DXGK_SEGMENTBANKPREFERENCE
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
UINT Bank0 : 7;
|
||||
UINT Direction0 : 1;
|
||||
UINT Bank1 : 7;
|
||||
UINT Direction1 : 1;
|
||||
UINT Bank2 : 7;
|
||||
UINT Direction2 : 1;
|
||||
UINT Bank3 : 7;
|
||||
UINT Direction3 : 1;
|
||||
};
|
||||
UINT Value;
|
||||
};
|
||||
} DXGK_SEGMENTBANKPREFERENCE;
|
||||
C_ASSERT(sizeof(DXGK_SEGMENTBANKPREFERENCE) == 0x4);
|
||||
|
||||
typedef struct _DXGK_ALLOCATIONINFOFLAGS
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
UINT CpuVisible : 1;
|
||||
UINT PermanentSysMem : 1;
|
||||
UINT Cached : 1;
|
||||
UINT Protected : 1;
|
||||
UINT ExistingSysMem : 1;
|
||||
UINT ExistingKernelSysMem : 1;
|
||||
UINT FromEndOfSegment : 1;
|
||||
UINT Swizzled : 1;
|
||||
UINT Overlay : 1;
|
||||
UINT Capture : 1;
|
||||
UINT UseAlternateVA : 1;
|
||||
UINT SynchronousPaging : 1;
|
||||
UINT LinkMirrored : 1;
|
||||
UINT LinkInstanced : 1;
|
||||
UINT HistoryBuffer : 1;
|
||||
#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0)
|
||||
UINT AccessedPhysically : 1;
|
||||
UINT ExplicitResidencyNotification : 1;
|
||||
UINT HardwareProtected : 1;
|
||||
UINT CpuVisibleOnDemand : 1;
|
||||
#else
|
||||
UINT Reserved : 4;
|
||||
#endif
|
||||
UINT DXGK_ALLOC_RESERVED16 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED15 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED14 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED13 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED12 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED11 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED10 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED9 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED4 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED3 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED2 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED1 : 1;
|
||||
UINT DXGK_ALLOC_RESERVED0 : 1;
|
||||
};
|
||||
UINT Value;
|
||||
};
|
||||
} DXGK_ALLOCATIONINFOFLAGS;
|
||||
C_ASSERT(sizeof(DXGK_ALLOCATIONINFOFLAGS) == 0x4);
|
||||
|
||||
typedef struct _DXGK_ALLOCATIONUSAGEINFO1
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
UINT PrivateFormat : 1;
|
||||
UINT Swizzled : 1;
|
||||
UINT MipMap : 1;
|
||||
UINT Cube : 1;
|
||||
UINT Volume : 1;
|
||||
UINT Vertex : 1;
|
||||
UINT Index : 1;
|
||||
UINT Reserved : 25;
|
||||
};
|
||||
UINT Value;
|
||||
} Flags;
|
||||
union
|
||||
{
|
||||
D3DDDIFORMAT Format;
|
||||
UINT PrivateFormat;
|
||||
};
|
||||
UINT SwizzledFormat;
|
||||
UINT ByteOffset;
|
||||
UINT Width;
|
||||
UINT Height;
|
||||
UINT Pitch;
|
||||
UINT Depth;
|
||||
UINT SlicePitch;
|
||||
} DXGK_ALLOCATIONUSAGEINFO1;
|
||||
C_ASSERT(sizeof(DXGK_ALLOCATIONUSAGEINFO1) == 0x24);
|
||||
|
||||
typedef struct _DXGK_ALLOCATIONUSAGEHINT
|
||||
{
|
||||
UINT Version;
|
||||
DXGK_ALLOCATIONUSAGEINFO1 v1;
|
||||
} DXGK_ALLOCATIONUSAGEHINT;
|
||||
C_ASSERT(sizeof(DXGK_ALLOCATIONUSAGEHINT) == 0x28);
|
||||
|
||||
typedef struct _DXGK_ALLOCATIONINFO
|
||||
{
|
||||
VOID* pPrivateDriverData;
|
||||
UINT PrivateDriverDataSize;
|
||||
UINT Alignment;
|
||||
SIZE_T Size;
|
||||
SIZE_T PitchAlignedSize;
|
||||
DXGK_SEGMENTBANKPREFERENCE HintedBank;
|
||||
DXGK_SEGMENTPREFERENCE PreferredSegment;
|
||||
UINT SupportedReadSegmentSet;
|
||||
UINT SupportedWriteSegmentSet;
|
||||
UINT EvictionSegmentSet;
|
||||
union
|
||||
{
|
||||
UINT MaximumRenamingListLength;
|
||||
UINT PhysicalAdapterIndex;
|
||||
};
|
||||
HANDLE hAllocation;
|
||||
union
|
||||
{
|
||||
DXGK_ALLOCATIONINFOFLAGS Flags;
|
||||
#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0)
|
||||
DXGK_ALLOCATIONINFOFLAGS_WDDM2_0 FlagsWddm2;
|
||||
#endif
|
||||
};
|
||||
DXGK_ALLOCATIONUSAGEHINT* pAllocationUsageHint;
|
||||
UINT AllocationPriority;
|
||||
#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM3_0)
|
||||
DXGK_ALLOCATIONINFOFLAGS2 Flags2;
|
||||
#endif
|
||||
} DXGK_ALLOCATIONINFO;
|
||||
|
||||
#ifdef _WIN64
|
||||
#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM3_0)
|
||||
C_ASSERT(sizeof(DXGK_ALLOCATIONINFO) == 0x5C);
|
||||
#else
|
||||
C_ASSERT(sizeof(DXGK_ALLOCATIONINFO) == 0x58);
|
||||
#endif
|
||||
#else
|
||||
#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM3_0)
|
||||
C_ASSERT(sizeof(DXGK_ALLOCATIONINFO) == 0x40);
|
||||
#else
|
||||
C_ASSERT(sizeof(DXGK_ALLOCATIONINFO) == 0x3C);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif // _D3DKMDDI_H_
|
Loading…
Add table
Add a link
Reference in a new issue