diff --git a/sdk/include/ddk/d3dkmddi.h b/sdk/include/ddk/d3dkmddi.h new file mode 100644 index 0000000000000..d1ddaf46f51c9 --- /dev/null +++ b/sdk/include/ddk/d3dkmddi.h @@ -0,0 +1,218 @@ +/* + * PROJECT: ReactOS Display Driver Model + * LICENSE: MIT (https://spdx.org/licenses/MIT) + * PURPOSE: Header file for WDDM style DDIs + * COPYRIGHT: Copyright 2024 Justin Miller + */ + +#ifndef _D3DKMDDI_H_ +#define _D3DKMDDI_H_ + +#include + +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; + +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; + + +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; +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; +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; +typedef struct _DXGK_ALLOCATIONUSAGEHINT +{ + UINT Version; + DXGK_ALLOCATIONUSAGEINFO1 v1; +} DXGK_ALLOCATIONUSAGEHINT; +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; + +#endif // _D3DKMDDI_H_ \ No newline at end of file diff --git a/sdk/include/psdk/ntgdi.h b/sdk/include/psdk/ntgdi.h index 1087e8cc42e41..5181515d50da9 100644 --- a/sdk/include/psdk/ntgdi.h +++ b/sdk/include/psdk/ntgdi.h @@ -3923,4 +3923,285 @@ NtGdiGetCurrentDpiInfo( #endif /* PRIVATE_DWM_INTERFACE */ + +/* ReactOS Display Driver Model */ +__kernel_entry +W32KAPI +BOOLEAN +APIENTRY +NtGdiDdDDICheckExclusiveOwnership(VOID); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDICreateAllocation(_Inout_ D3DKMT_CREATEALLOCATION* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDICheckMonitorPowerState(_In_ const D3DKMT_CHECKMONITORPOWERSTATE* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDICheckOcclusion(_In_ const D3DKMT_CHECKOCCLUSION* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDICloseAdapter(_In_ const D3DKMT_CLOSEADAPTER* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +WINAPI +NtGdiDdDDICreateContext(_Inout_ D3DKMT_CREATECONTEXT* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDICreateDevice(_Inout_ D3DKMT_CREATEDEVICE* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDICreateOverlay(_Inout_ D3DKMT_CREATEOVERLAY* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDICreateSynchronizationObject(_Inout_ D3DKMT_CREATESYNCHRONIZATIONOBJECT* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIWaitForVerticalBlankEvent(_In_ const D3DKMT_WAITFORVERTICALBLANKEVENT* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIWaitForIdle(_In_ const D3DKMT_WAITFORIDLE* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIUpdateOverlay(_In_ const D3DKMT_UPDATEOVERLAY* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +WINAPI +NtGdiDdDDIUnlock(_In_ const D3DKMT_UNLOCK* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIDestroyAllocation(_In_ const D3DKMT_DESTROYALLOCATION* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIDestroyContext(_In_ const D3DKMT_DESTROYCONTEXT* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIDestroyDevice(_In_ const D3DKMT_DESTROYDEVICE* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIDestroyOverlay(_In_ const D3DKMT_DESTROYOVERLAY* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIDestroySynchronizationObject(_In_ const D3DKMT_DESTROYSYNCHRONIZATIONOBJECT* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIEscape(_In_ const D3DKMT_ESCAPE* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIFlipOverlay(_In_ const D3DKMT_FLIPOVERLAY* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIGetContextSchedulingPriority(_Inout_ D3DKMT_GETCONTEXTSCHEDULINGPRIORITY* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIGetDeviceState(_Inout_ D3DKMT_GETDEVICESTATE* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIGetDisplayModeList(_Inout_ D3DKMT_GETDISPLAYMODELIST* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIGetMultisampleMethodList(_Inout_ D3DKMT_GETMULTISAMPLEMETHODLIST* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIGetPresentHistory(_Inout_ D3DKMT_GETPRESENTHISTORY* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIGetProcessSchedulingPriorityClass(_In_ HANDLE unnamedParam1, + _Out_ D3DKMT_SCHEDULINGPRIORITYCLASS *unnamedParam2); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIGetRuntimeData(_In_ const D3DKMT_GETRUNTIMEDATA* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIGetScanLine(_In_ D3DKMT_GETSCANLINE* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIGetSharedPrimaryHandle(_Inout_ D3DKMT_GETSHAREDPRIMARYHANDLE* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIInvalidateActiveVidPn(_In_ const D3DKMT_INVALIDATEACTIVEVIDPN* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDILock(_Inout_ D3DKMT_LOCK* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIOpenAdapterFromDeviceName(_Inout_ D3DKMT_OPENADAPTERFROMDEVICENAME* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIOpenAdapterFromGdiDisplayName(_Inout_ D3DKMT_OPENADAPTERFROMGDIDISPLAYNAME* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIOpenAdapterFromHdc(_Inout_ D3DKMT_OPENADAPTERFROMHDC* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIOpenResource(_Inout_ D3DKMT_OPENRESOURCE* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIPollDisplayChildren(_In_ const D3DKMT_POLLDISPLAYCHILDREN* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIPresent(_In_ D3DKMT_PRESENT* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIQueryAdapterInfo(_Inout_ const D3DKMT_QUERYADAPTERINFO* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIQueryAllocationResidency(_In_ const D3DKMT_QUERYALLOCATIONRESIDENCY* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIQueryResourceInfo(_Inout_ D3DKMT_QUERYRESOURCEINFO* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIQueryStatistics(_Inout_ const D3DKMT_QUERYSTATISTICS* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIReleaseProcessVidPnSourceOwners(_In_ HANDLE unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIRender(_In_ D3DKMT_RENDER* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDISetAllocationPriority(_In_ const D3DKMT_SETALLOCATIONPRIORITY* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDISetContextSchedulingPriority(_In_ const D3DKMT_SETCONTEXTSCHEDULINGPRIORITY* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDISetDisplayMode(_In_ const D3DKMT_SETDISPLAYMODE* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDISetDisplayPrivateDriverFormat(_In_ const D3DKMT_SETDISPLAYPRIVATEDRIVERFORMAT* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDISetGammaRamp(_In_ const D3DKMT_SETGAMMARAMP* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDISetProcessSchedulingPriorityClass( + _In_ HANDLE unnamedParam1, + _In_ D3DKMT_SCHEDULINGPRIORITYCLASS unnamedParam2); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDISetQueuedLimit(_Inout_ const D3DKMT_SETQUEUEDLIMIT* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDISetVidPnSourceOwner(_In_ const D3DKMT_SETVIDPNSOURCEOWNER* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDISharedPrimaryLockNotification(_In_ const D3DKMT_SHAREDPRIMARYLOCKNOTIFICATION* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDISharedPrimaryUnLockNotification(_In_ const D3DKMT_SHAREDPRIMARYUNLOCKNOTIFICATION* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDISignalSynchronizationObject(_In_ const D3DKMT_SIGNALSYNCHRONIZATIONOBJECT* unnamedParam1); +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIWaitForSynchronizationObject(_In_ const D3DKMT_WAITFORSYNCHRONIZATIONOBJECT* unnamedParam1); + #endif /* _NTGDI_ */ diff --git a/sdk/include/reactos/rddm/rxgkinterface.h b/sdk/include/reactos/rddm/rxgkinterface.h new file mode 100644 index 0000000000000..05e61d92a8d07 --- /dev/null +++ b/sdk/include/reactos/rddm/rxgkinterface.h @@ -0,0 +1,404 @@ +#pragma once + +#include + +/* + * Every structure in here is shared across two or modules and doesn't currently match + * a single windows version/update. + * + * These structures DO have varients in windows, I just would like to track what + * we don't match 1:1 yet. Or haven't bother attempting to do so. + */ + +/* REACTOS_WIN32K_DXGKRNL_INTERFACE function Pointers: */ + +typedef +NTSTATUS +DXGADAPTER_CREATEALLOCATION(_Inout_ D3DKMT_CREATEALLOCATION* unnamedParam1); + +typedef DXGADAPTER_CREATEALLOCATION *PDXGADAPTER_CREATEALLOCATION; + +typedef +NTSTATUS +DXGADAPTER_CHECKMONITORPOWERSTATE(_In_ const D3DKMT_CHECKMONITORPOWERSTATE* unnamedParam1); + +typedef DXGADAPTER_CHECKMONITORPOWERSTATE *PDXGADAPTER_CHECKMONITORPOWERSTATE; + +typedef +NTSTATUS +DXGADAPTER_CHECKOCCLUSION(_In_ const D3DKMT_CHECKOCCLUSION* unnamedParam1); + +typedef DXGADAPTER_CHECKOCCLUSION *PDXGADAPTER_CHECKOCCLUSION; + +typedef +NTSTATUS +DXGADAPTER_CLOSEADAPTER(_In_ const D3DKMT_CLOSEADAPTER* unnamedParam1); + +typedef DXGADAPTER_CLOSEADAPTER *PDXGADAPTER_CLOSEADAPTER; + +typedef +NTSTATUS +DXGADAPTER_CREATECONTEXT(_Inout_ const D3DKMT_CREATECONTEXT* unnamedParam1); + +typedef DXGADAPTER_CREATECONTEXT *PDXGADAPTER_CREATECONTEXT; + +typedef +NTSTATUS +DXGADAPTER_CREATEDEVICE(_Inout_ const D3DKMT_CREATEDEVICE* unnamedParam1); + +typedef DXGADAPTER_CREATEDEVICE *PDXGADAPTER_CREATEDEVICE; + +typedef +NTSTATUS +DXGADAPTER_CREATEOVERLAY(_Inout_ const D3DKMT_CREATEOVERLAY* unnamedParam1); + +typedef DXGADAPTER_CREATEOVERLAY *PDXGADAPTER_CREATEOVERLAY; + +typedef +NTSTATUS +DXGADAPTER_CREATESYNCHRONIZATIONOBJECT(_Inout_ const D3DKMT_CREATESYNCHRONIZATIONOBJECT* unnamedParam1); + +typedef DXGADAPTER_CREATESYNCHRONIZATIONOBJECT *PDXGADAPTER_CREATESYNCHRONIZATIONOBJECT; + +typedef +NTSTATUS +DXGADAPTER_DESTROYALLOCATION(_In_ const D3DKMT_DESTROYALLOCATION* unnamedParam1); + +typedef DXGADAPTER_DESTROYALLOCATION *PDXGADAPTER_DESTROYALLOCATION; + +typedef +NTSTATUS +DXGADAPTER_DESTROYCONTEXT(_In_ const D3DKMT_DESTROYCONTEXT* unnamedParam1); + +typedef DXGADAPTER_DESTROYCONTEXT *PDXGADAPTER_DESTROYCONTEXT; + +typedef +NTSTATUS +DXGADAPTER_DESTROYDEVICE(_In_ const D3DKMT_DESTROYDEVICE* unnamedParam1); + +typedef DXGADAPTER_DESTROYDEVICE *PDXGADAPTER_DESTROYDEVICE; + +typedef +NTSTATUS +DXGADAPTER_DESTROYOVERLAY(_In_ const D3DKMT_DESTROYOVERLAY* unnamedParam1); + +typedef DXGADAPTER_DESTROYOVERLAY *PDXGADAPTER_DESTROYOVERLAY; + +typedef +NTSTATUS +DXGADAPTER_DESTROYSYNCHRONIZATIONOBJECT(_In_ const D3DKMT_DESTROYSYNCHRONIZATIONOBJECT* unnamedParam1); + +typedef DXGADAPTER_DESTROYSYNCHRONIZATIONOBJECT *PDXGADAPTER_DESTROYSYNCHRONIZATIONOBJECT; + +typedef +NTSTATUS +DXGADAPTER_ESCAPE(_In_ const D3DKMT_ESCAPE* unnamedParam1); + +typedef DXGADAPTER_ESCAPE *PDXGADAPTER_ESCAPE; + +typedef +NTSTATUS +DXGADAPTER_FLIPOVERLAY(_In_ const D3DKMT_FLIPOVERLAY* unnamedParam1); + +typedef DXGADAPTER_FLIPOVERLAY *PDXGADAPTER_FLIPOVERLAY; + +typedef +NTSTATUS +DXGADAPTER_GETCONTEXTSCHEDULINGPRIORITY(_Inout_ const D3DKMT_GETCONTEXTSCHEDULINGPRIORITY* unnamedParam1); + +typedef DXGADAPTER_GETCONTEXTSCHEDULINGPRIORITY *PDXGADAPTER_GETCONTEXTSCHEDULINGPRIORITY; + +typedef +NTSTATUS +DXGADAPTER_GETDEVICESTATE(_Inout_ D3DKMT_GETDEVICESTATE* unnamedParam1); + +typedef DXGADAPTER_GETDEVICESTATE *PDXGADAPTER_GETDEVICESTATE; + +typedef +NTSTATUS +DXGADAPTER_GETDISPLAYMODELIST(_Inout_ D3DKMT_GETDISPLAYMODELIST* unnamedParam1); + +typedef DXGADAPTER_GETDISPLAYMODELIST *PDXGADAPTER_GETDISPLAYMODELIST; + +typedef +NTSTATUS +DXGADAPTER_GETMULTISAMPLEMETHODLIST(_Inout_ D3DKMT_GETMULTISAMPLEMETHODLIST* unnamedParam1); + +typedef DXGADAPTER_GETMULTISAMPLEMETHODLIST *PDXGADAPTER_GETMULTISAMPLEMETHODLIST; + +typedef +NTSTATUS +DXGADAPTER_GETRUNTIMEDATA(_Inout_ const D3DKMT_GETRUNTIMEDATA* unnamedParam1); + +typedef DXGADAPTER_GETRUNTIMEDATA *PDXGADAPTER_GETRUNTIMEDATA; + +typedef +NTSTATUS +DXGADAPTER_GETSCANLINE(_Inout_ D3DKMT_GETSCANLINE* unnamedParam1); + +typedef DXGADAPTER_GETSCANLINE *PDXGADAPTER_GETSCANLINE; + +typedef +NTSTATUS +DXGADAPTER_SIGNALSYNCHRONIZATIONOBJECT(_In_ const D3DKMT_SIGNALSYNCHRONIZATIONOBJECT* unnamedParam1); + +typedef DXGADAPTER_SIGNALSYNCHRONIZATIONOBJECT *PDXGADAPTER_SIGNALSYNCHRONIZATIONOBJECT; + +typedef +NTSTATUS +DXGADAPTER_WAITFORVERTICALBLANKEVENT(_In_ const D3DKMT_WAITFORVERTICALBLANKEVENT* unnamedParam1); + +typedef DXGADAPTER_WAITFORVERTICALBLANKEVENT *PDXGADAPTER_WAITFORVERTICALBLANKEVENT; + +typedef +NTSTATUS +DXGADAPTER_WAITFORSYNCHRONIZATIONOBJECT(_In_ const D3DKMT_WAITFORSYNCHRONIZATIONOBJECT* unnamedParam1); + +typedef DXGADAPTER_WAITFORSYNCHRONIZATIONOBJECT *PDXGADAPTER_WAITFORSYNCHRONIZATIONOBJECT; + +typedef +NTSTATUS +DXGADAPTER_SETVIDPNSOURCEOWNER(_In_ const D3DKMT_SETVIDPNSOURCEOWNER* unnamedParam1); + +typedef DXGADAPTER_SETVIDPNSOURCEOWNER *PDXGADAPTER_SETVIDPNSOURCEOWNER; + +typedef +NTSTATUS +DXGADAPTER_WAITFORIDLE(_In_ const D3DKMT_WAITFORIDLE* unnamedParam1); + +typedef DXGADAPTER_WAITFORIDLE *PDXGADAPTER_WAITFORIDLE; + +typedef +NTSTATUS +DXGADAPTER_UPDATEOVERLAY(_In_ const D3DKMT_UPDATEOVERLAY* unnamedParam1); + +typedef DXGADAPTER_UPDATEOVERLAY *PDXGADAPTER_UPDATEOVERLAY; + +typedef +NTSTATUS +DXGADAPTER_SETQUEUEDLIMIT(_In_ const D3DKMT_SETQUEUEDLIMIT* unnamedParam1); + +typedef DXGADAPTER_SETQUEUEDLIMIT *PDXGADAPTER_SETQUEUEDLIMIT; + +typedef +NTSTATUS +DXGADAPTER_SETGAMMARAMP(_In_ const D3DKMT_SETGAMMARAMP* unnamedParam1); + +typedef DXGADAPTER_SETGAMMARAMP *PDXGADAPTER_SETGAMMARAMP; + +typedef +NTSTATUS +DXGADAPTER_SETDISPLAYMODE(_In_ const D3DKMT_SETDISPLAYMODE* unnamedParam1); + +typedef DXGADAPTER_SETDISPLAYMODE *PDXGADAPTER_SETDISPLAYMODE; + +typedef +NTSTATUS +DXGADAPTER_SETDISPLAYPRIVATEDRIVERFORMAT(_In_ const D3DKMT_SETDISPLAYPRIVATEDRIVERFORMAT* unnamedParam1); + +typedef DXGADAPTER_SETDISPLAYPRIVATEDRIVERFORMAT *PDXGADAPTER_SETDISPLAYPRIVATEDRIVERFORMAT; + + +typedef +NTSTATUS +DXGADAPTER_SETGAMMARAMP(_In_ const D3DKMT_SETGAMMARAMP* unnamedParam1); + +typedef DXGADAPTER_SETGAMMARAMP *PDXGADAPTER_SETGAMMARAMP; + +typedef +NTSTATUS +DXGADAPTER_SETQUEUEDLIMIT(_In_ const D3DKMT_SETQUEUEDLIMIT* unnamedParam1); + +typedef DXGADAPTER_SETQUEUEDLIMIT *PDXGADAPTER_SETQUEUEDLIMIT; + +typedef +NTSTATUS +DXGADAPTER_SETVIDPNSOURCEOWNER(_In_ const D3DKMT_SETVIDPNSOURCEOWNER* unnamedParam1); + +typedef DXGADAPTER_SETVIDPNSOURCEOWNER *PDXGADAPTER_SETVIDPNSOURCEOWNER; + +typedef +NTSTATUS +DXGADAPTER_UNLOCK(_In_ const D3DKMT_UNLOCK* unnamedParam1); + +typedef DXGADAPTER_UNLOCK *PDXGADAPTER_UNLOCK; + +typedef +NTSTATUS +DXGADAPTER_UPDATEOVERLAY(_In_ const D3DKMT_UPDATEOVERLAY* unnamedParam1); + +typedef DXGADAPTER_UPDATEOVERLAY *PDXGADAPTER_UPDATEOVERLAY; + +typedef +NTSTATUS +DXGADAPTER_WAITFORIDLE(_In_ const D3DKMT_WAITFORIDLE* unnamedParam1); + +typedef DXGADAPTER_WAITFORIDLE *PDXGADAPTER_WAITFORIDLE; + +typedef +NTSTATUS +DXGADAPTER_WAITFORSYNCHRONIZATIONOBJECT(_In_ const D3DKMT_WAITFORSYNCHRONIZATIONOBJECT* unnamedParam1); + +typedef DXGADAPTER_WAITFORSYNCHRONIZATIONOBJECT *PDXGADAPTER_WAITFORSYNCHRONIZATIONOBJECT; + +typedef +NTSTATUS +DXGADAPTER_WAITFORVERTICALBLANKEVENT(_In_ const D3DKMT_WAITFORVERTICALBLANKEVENT* unnamedParam1); + +typedef DXGADAPTER_WAITFORVERTICALBLANKEVENT *PDXGADAPTER_WAITFORVERTICALBLANKEVENT; + +typedef +NTSTATUS +DXGADAPTER_SIGNALSYNCHRONIZATIONOBJECT(_In_ const D3DKMT_SIGNALSYNCHRONIZATIONOBJECT* unnamedParam1); + +typedef DXGADAPTER_SIGNALSYNCHRONIZATIONOBJECT *PDXGADAPTER_SIGNALSYNCHRONIZATIONOBJECT; + +typedef +NTSTATUS +DXGADAPTER_QUERYRESOURCEINFO(_Inout_ D3DKMT_QUERYRESOURCEINFO* unnamedParam1); + +typedef DXGADAPTER_QUERYRESOURCEINFO *PDXGADAPTER_QUERYRESOURCEINFO; + +typedef +NTSTATUS +DXGADAPTER_GETPRESENTHISTORY(_Inout_ D3DKMT_GETPRESENTHISTORY* unnamedParam1); + +typedef DXGADAPTER_GETPRESENTHISTORY *PDXGADAPTER_GETPRESENTHISTORY; + +typedef +NTSTATUS +DXGADAPTER_SETALLOCATIONPRIORITY(_In_ const D3DKMT_SETALLOCATIONPRIORITY* unnamedParam1); + +typedef DXGADAPTER_SETALLOCATIONPRIORITY *PDXGADAPTER_SETALLOCATIONPRIORITY; + +typedef +NTSTATUS +DXGADAPTER_INVALIDATEACTIVEVIDPN(_In_ const D3DKMT_INVALIDATEACTIVEVIDPN* unnamedParam1); + +typedef DXGADAPTER_INVALIDATEACTIVEVIDPN *PDXGADAPTER_INVALIDATEACTIVEVIDPN; + +typedef +NTSTATUS +DXGADAPTER_GETSHAREDPRIMARYHANDLE(_In_ D3DKMT_GETSHAREDPRIMARYHANDLE* unnamedParam1); + +typedef DXGADAPTER_GETSHAREDPRIMARYHANDLE *PDXGADAPTER_GETSHAREDPRIMARYHANDLE; + +typedef +NTSTATUS +DXGADAPTER_LOCK(_In_ D3DKMT_LOCK* unnamedParam1); + +typedef DXGADAPTER_LOCK *PDXGADAPTER_LOCK; + +typedef +NTSTATUS +DXGADAPTER_POLLDISPLAYCHILDREN(_In_ const D3DKMT_POLLDISPLAYCHILDREN* unnamedParam1); + +typedef DXGADAPTER_POLLDISPLAYCHILDREN *PDXGADAPTER_POLLDISPLAYCHILDREN; + +typedef +NTSTATUS +DXGADAPTER_OPENRESOURCE(_Inout_ D3DKMT_OPENRESOURCE* unnamedParam1); + +typedef DXGADAPTER_OPENRESOURCE *PDXGADAPTER_OPENRESOURCE; + +typedef +NTSTATUS +DXGADAPTER_PRESENT(_In_ D3DKMT_PRESENT* unnamedParam1); + +typedef DXGADAPTER_PRESENT *PDXGADAPTER_PRESENT; + +typedef +NTSTATUS +DXGADAPTER_QUERYADAPTERINFO(_Inout_ const D3DKMT_QUERYADAPTERINFO* unnamedParam1); + +typedef DXGADAPTER_QUERYADAPTERINFO *PDXGADAPTER_QUERYADAPTERINFO; + +typedef +NTSTATUS +DXGADAPTER_QUERYALLOCATIONRESIDENCY(_In_ const D3DKMT_QUERYALLOCATIONRESIDENCY* unnamedParam1); + +typedef DXGADAPTER_QUERYALLOCATIONRESIDENCY *PDXGADAPTER_QUERYALLOCATIONRESIDENCY; + +typedef +NTSTATUS +DXGADAPTER_QUERYSTATISTICS(_Inout_ const D3DKMT_QUERYSTATISTICS* unnamedParam1); + +typedef DXGADAPTER_QUERYSTATISTICS *PDXGADAPTER_QUERYSTATISTICS; + +typedef +NTSTATUS +DXGADAPTER_RELEASEPROCESSVIDPNSOURCEOWNERS(_In_ HANDLE unnamedParam1); + +typedef DXGADAPTER_RELEASEPROCESSVIDPNSOURCEOWNERS *PDXGADAPTER_RELEASEPROCESSVIDPNSOURCEOWNERS; + +typedef +NTSTATUS +DXGADAPTER_RENDER(_In_ D3DKMT_RENDER* unnamedParam1); + +typedef DXGADAPTER_RENDER *PDXGADAPTER_RENDER; + +typedef +NTSTATUS +DXGADAPTER_SETCONTEXTSCHEDULINGPRIORITY(_In_ const D3DKMT_SETCONTEXTSCHEDULINGPRIORITY* unnamedParam1); + +typedef DXGADAPTER_SETCONTEXTSCHEDULINGPRIORITY *PDXGADAPTER_SETCONTEXTSCHEDULINGPRIORITY; + +/* + * The goal of this structure to be the list of callback that exist between DXGKNRL + * and Win32k. This private interface is undocumented and changes with every windows update that + * remotely touches WDDM. + * + * Reversing this isn't possible until we can throw our DxgKrnl into vista or above at runtime + * But this cannot happen without us first supporting watchdog. + * + */ +typedef struct _REACTOS_WIN32K_DXGKRNL_INTERFACE +{ + PDXGADAPTER_PRESENT RxgkIntPfnPresent; + PDXGADAPTER_QUERYADAPTERINFO RxgkIntPfnQueryAdapterInfo; + PDXGADAPTER_QUERYALLOCATIONRESIDENCY RxgkIntPfnQueryAllocationResidency; + PDXGADAPTER_QUERYSTATISTICS RxgkIntPfnQueryStatistics; + PDXGADAPTER_RELEASEPROCESSVIDPNSOURCEOWNERS RxgkIntPfnReleaseProcessVidPnSourceOwners; + PDXGADAPTER_RENDER RxgkIntPfnRender; + PDXGADAPTER_SETCONTEXTSCHEDULINGPRIORITY RxgkIntPfnSetContextSchedulingPriority; + PDXGADAPTER_OPENRESOURCE RxgkIntPfnOpenResource; + PDXGADAPTER_POLLDISPLAYCHILDREN RxgkIntPfnPollDisplayChildren; + PDXGADAPTER_LOCK RxgkIntPfnLock; + PDXGADAPTER_GETSHAREDPRIMARYHANDLE RxgkIntPfnGetSharedPrimaryHandle; + PDXGADAPTER_INVALIDATEACTIVEVIDPN RxgkIntPfnInvalidateActiveVidPn; + PDXGADAPTER_SETALLOCATIONPRIORITY RxgkIntPfnSetAllocationPriority; + PDXGADAPTER_GETPRESENTHISTORY RxgkIntPfnGetPresentHistory; + PDXGADAPTER_QUERYRESOURCEINFO RxgkIntPfnQueryResourceInfo; + PDXGADAPTER_CREATEALLOCATION RxgkIntPfnCreateAllocation; + PDXGADAPTER_CHECKMONITORPOWERSTATE RxgkIntPfnCheckMonitorPowerState; + PDXGADAPTER_CHECKOCCLUSION RxgkIntPfnCheckOcclusion; + PDXGADAPTER_CLOSEADAPTER RxgkIntPfnCloseAdapter; + PDXGADAPTER_CREATECONTEXT RxgkIntPfnCreateContext; + PDXGADAPTER_CREATEDEVICE RxgkIntPfnCreateDevice; + PDXGADAPTER_CREATEOVERLAY RxgkIntPfnCreateOverlay; + PDXGADAPTER_CREATESYNCHRONIZATIONOBJECT RxgkIntPfnCreateSynchronizationObject; + PDXGADAPTER_DESTROYCONTEXT RxgkIntPfnDestroyContext; + PDXGADAPTER_DESTROYDEVICE RxgkIntPfnDestroyDevice; + PDXGADAPTER_DESTROYOVERLAY RxgkIntPfnDestroyOverlay; + PDXGADAPTER_DESTROYSYNCHRONIZATIONOBJECT RxgkIntPfnDestroySynchronizationObject; + PDXGADAPTER_ESCAPE RxgkIntPfnEscape; + PDXGADAPTER_DESTROYALLOCATION RxgkIntPfnDestroyAllocation; + PDXGADAPTER_FLIPOVERLAY RxgkIntPfnFlipOverlay; + PDXGADAPTER_GETCONTEXTSCHEDULINGPRIORITY RxgkIntPfnGetContextSchedulingPriority; + PDXGADAPTER_GETDEVICESTATE RxgkIntPfnGetDeviceState; + PDXGADAPTER_GETDISPLAYMODELIST RxgkIntPfnGetDisplayModeList; + PDXGADAPTER_GETMULTISAMPLEMETHODLIST RxgkIntPfnGetMultisampleMethodList; + PDXGADAPTER_GETRUNTIMEDATA RxgkIntPfnGetRuntimeData; + PDXGADAPTER_GETSCANLINE RxgkIntPfnGetScanLine; + PDXGADAPTER_SIGNALSYNCHRONIZATIONOBJECT RxgkIntPfnSignalSynchronizationObject; + PDXGADAPTER_WAITFORVERTICALBLANKEVENT RxgkIntPfnWaitForVerticalBlankEvent; + PDXGADAPTER_WAITFORSYNCHRONIZATIONOBJECT RxgkIntPfnWaitForSynchronizationObject; + PDXGADAPTER_SETVIDPNSOURCEOWNER RxgkIntPfnSetVidPnSourceOwner; + PDXGADAPTER_WAITFORIDLE RxgkIntPfnWaitForIdle; + PDXGADAPTER_UPDATEOVERLAY RxgkIntPfnUpdateOverlay; + PDXGADAPTER_SETQUEUEDLIMIT RxgkIntPfnSetQueuedLimit; + PDXGADAPTER_SETGAMMARAMP RxgkIntPfnSetGammaRamp; + PDXGADAPTER_SETDISPLAYMODE RxgkIntPfnSetDisplayMode; + PDXGADAPTER_SETDISPLAYPRIVATEDRIVERFORMAT RxgkIntPfnSetDisplayPrivateDriverFormat; + PDXGADAPTER_UNLOCK RxgkIntPfnUnlock; +} REACTOS_WIN32K_DXGKRNL_INTERFACE, *PREACTOS_WIN32K_DXGKRNL_INTERFACE; diff --git a/win32ss/CMakeLists.txt b/win32ss/CMakeLists.txt index 6555fb19eca80..4691fc6f96c96 100644 --- a/win32ss/CMakeLists.txt +++ b/win32ss/CMakeLists.txt @@ -173,6 +173,7 @@ list(APPEND SOURCE gdi/ntgdi/bitmaps.c gdi/ntgdi/cliprgn.c gdi/ntgdi/coord.c + gdi/ntgdi/d3dkmt.c gdi/ntgdi/dcattr.c gdi/ntgdi/dclife.c gdi/ntgdi/dcobjs.c diff --git a/win32ss/gdi/gdi32/CMakeLists.txt b/win32ss/gdi/gdi32/CMakeLists.txt index 37f66f8a7ea94..233a46a4a0520 100644 --- a/win32ss/gdi/gdi32/CMakeLists.txt +++ b/win32ss/gdi/gdi32/CMakeLists.txt @@ -53,6 +53,7 @@ add_library(gdi32 MODULE set_module_type(gdi32 win32dll UNICODE ENTRYPOINT DllMain 12) target_link_libraries(gdi32 + gdi32_vista_static winegdi wine win32ksys diff --git a/win32ss/gdi/gdi32/gdi32.spec b/win32ss/gdi/gdi32/gdi32.spec index 0db97d36c0d47..c3e5b07653f78 100644 --- a/win32ss/gdi/gdi32/gdi32.spec +++ b/win32ss/gdi/gdi32/gdi32.spec @@ -608,3 +608,62 @@ 608 stdcall bMakePathNameW(wstr wstr wstr long) 609 stdcall cGetTTFFromFOT(long long long long long long long) 610 stdcall gdiPlaySpoolStream(long long long long long long) + +; ReactOS Display Driver Model +@ stdcall -version=0x600+ D3DKMTCheckExclusiveOwnership() +@ stdcall -version=0x600+ D3DKMTCheckMonitorPowerState(ptr) +@ stdcall -version=0x600+ D3DKMTCheckOcclusion(ptr) +@ stdcall -version=0x600+ D3DKMTCloseAdapter(ptr) +@ stdcall -version=0x600+ D3DKMTCreateAllocation(ptr) +@ stdcall -version=0x600+ D3DKMTCreateContext(ptr) +@ stdcall -version=0x600+ D3DKMTCreateDCFromMemory(ptr) +@ stdcall -version=0x600+ D3DKMTCreateDevice(ptr) +@ stdcall -version=0x600+ D3DKMTCreateOverlay(ptr) +@ stdcall -version=0x600+ D3DKMTCreateSynchronizationObject(ptr) +@ stdcall -version=0x600+ D3DKMTDestroyAllocation(ptr) +@ stdcall -version=0x600+ D3DKMTDestroyContext(ptr) +@ stdcall -version=0x600+ D3DKMTDestroyDCFromMemory(ptr) +@ stdcall -version=0x600+ D3DKMTDestroyDevice(ptr) +@ stdcall -version=0x600+ D3DKMTDestroyOverlay(ptr) +@ stdcall -version=0x600+ D3DKMTDestroySynchronizationObject(ptr) +@ stdcall -version=0x600+ D3DKMTEscape(ptr) +@ stdcall -version=0x600+ D3DKMTFlipOverlay (ptr) +@ stdcall -version=0x600+ D3DKMTGetContextSchedulingPriority(ptr) +@ stdcall -version=0x600+ D3DKMTGetDeviceState(ptr) +@ stdcall -version=0x600+ D3DKMTGetDisplayModeList(ptr) +@ stdcall -version=0x600+ D3DKMTGetMultisampleMethodList(ptr) +@ stdcall -version=0x600+ D3DKMTGetPresentHistory(ptr) +@ stdcall -version=0x600+ D3DKMTGetProcessSchedulingPriorityClass(ptr ptr) +@ stdcall -version=0x600+ D3DKMTGetRuntimeData (ptr) +@ stdcall -version=0x600+ D3DKMTGetScanLine(ptr) +@ stdcall -version=0x600+ D3DKMTGetSharedPrimaryHandle(ptr) +@ stdcall -version=0x600+ D3DKMTInvalidateActiveVidPn(ptr) +@ stdcall -version=0x600+ D3DKMTLock(ptr) +@ stdcall -version=0x600+ D3DKMTOpenAdapterFromDeviceName(ptr) +@ stdcall -version=0x600+ D3DKMTOpenAdapterFromGdiDisplayName(ptr) +@ stdcall -version=0x600+ D3DKMTOpenAdapterFromHdc(ptr) +@ stdcall -version=0x600+ D3DKMTOpenResource(ptr) +@ stdcall -version=0x600+ D3DKMTPollDisplayChildren(ptr) +@ stdcall -version=0x600+ D3DKMTPresent(ptr) +@ stdcall -version=0x600+ D3DKMTQueryAdapterInfo(ptr) +@ stdcall -version=0x600+ D3DKMTQueryAllocationResidency(ptr) +@ stdcall -version=0x600+ D3DKMTQueryResourceInfo(ptr) +@ stdcall -version=0x600+ D3DKMTQueryStatistics(ptr) +@ stdcall -version=0x600+ D3DKMTReleaseProcessVidPnSourceOwners(ptr) +@ stdcall -version=0x600+ D3DKMTRender(ptr) +@ stdcall -version=0x600+ D3DKMTSetAllocationPriority(ptr) +@ stdcall -version=0x600+ D3DKMTSetContextSchedulingPriority(ptr) +@ stdcall -version=0x600+ D3DKMTSetDisplayMode(ptr) +@ stdcall -version=0x600+ D3DKMTSetDisplayPrivateDriverFormat(ptr) +@ stdcall -version=0x600+ D3DKMTSetGammaRamp(ptr) +@ stdcall -version=0x600+ D3DKMTSetProcessSchedulingPriorityClass(ptr ptr) +@ stdcall -version=0x600+ D3DKMTSetQueuedLimit(ptr) +@ stdcall -version=0x600+ D3DKMTSetVidPnSourceOwner(ptr) +@ stdcall -version=0x600+ D3DKMTSharedPrimaryLockNotification(ptr) +@ stdcall -version=0x600+ D3DKMTSharedPrimaryUnLockNotification(ptr) +@ stdcall -version=0x600+ D3DKMTSignalSynchronizationObject(ptr) +@ stdcall -version=0x600+ D3DKMTUnlock(ptr) +@ stdcall -version=0x600+ D3DKMTUpdateOverlay(ptr) +@ stdcall -version=0x600+ D3DKMTWaitForIdle(ptr) +@ stdcall -version=0x600+ D3DKMTWaitForSynchronizationObject(ptr) +@ stdcall -version=0x600+ D3DKMTWaitForVerticalBlankEvent(ptr) diff --git a/win32ss/gdi/gdi32_vista/CMakeLists.txt b/win32ss/gdi/gdi32_vista/CMakeLists.txt index 3ae8d6d0b4af1..31c2b73e4ef6e 100644 --- a/win32ss/gdi/gdi32_vista/CMakeLists.txt +++ b/win32ss/gdi/gdi32_vista/CMakeLists.txt @@ -6,7 +6,8 @@ include_directories( spec2def(gdi32_vista.dll gdi32_vista.spec ADD_IMPORTLIB) list(APPEND SOURCE - dc.c) + dc.c + d3dkmt.c) add_library(gdi32_vista MODULE ${SOURCE} @@ -15,6 +16,11 @@ add_library(gdi32_vista MODULE set_module_type(gdi32_vista win32dll UNICODE ENTRYPOINT 0) +add_library(gdi32_vista_static + ${SOURCE}) +target_link_libraries(gdi32_vista_static win32ksys) +add_dependencies(gdi32_vista_static psdk) + target_link_libraries(gdi32_vista win32ksys) #add_importlibs(gdi32_vista user32 advapi32 kernel32 ntdll) diff --git a/win32ss/gdi/gdi32_vista/d3dkmt.c b/win32ss/gdi/gdi32_vista/d3dkmt.c new file mode 100644 index 0000000000000..569a01f59bdf2 --- /dev/null +++ b/win32ss/gdi/gdi32_vista/d3dkmt.c @@ -0,0 +1,398 @@ +/* + * PROJECT: ReactOS Display Driver Model + * LICENSE: MIT (https://spdx.org/licenses/MIT) + * PURPOSE: D3DKMT dxgkrnl syscalls + * COPYRIGHT: Copyright 2023 Justin Miller + */ + +#include +#include + +NTSTATUS +WINAPI +D3DKMTCreateAllocation(_Inout_ D3DKMT_CREATEALLOCATION* unnamedParam1) +{ + return NtGdiDdDDICreateAllocation(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTCheckMonitorPowerState(_In_ CONST D3DKMT_CHECKMONITORPOWERSTATE* unnamedParam1) +{ + return NtGdiDdDDICheckMonitorPowerState(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTCheckOcclusion(_In_ CONST D3DKMT_CHECKOCCLUSION* unnamedParam1) +{ + return NtGdiDdDDICheckOcclusion(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTCloseAdapter(_In_ CONST D3DKMT_CLOSEADAPTER* unnamedParam1) +{ + return NtGdiDdDDICloseAdapter(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTCreateContext(_Inout_ D3DKMT_CREATECONTEXT* unnamedParam1) +{ + return NtGdiDdDDICreateContext(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTCreateDevice(_Inout_ D3DKMT_CREATEDEVICE* unnamedParam1) +{ + return NtGdiDdDDICreateDevice(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTCreateOverlay(_Inout_ D3DKMT_CREATEOVERLAY* unnamedParam1) +{ + return NtGdiDdDDICreateOverlay(unnamedParam1); +} + +BOOLEAN +WINAPI +D3DKMTCheckExclusiveOwnership(VOID) +{ + return NtGdiDdDDICheckExclusiveOwnership(); +} + +NTSTATUS +WINAPI +D3DKMTCreateSynchronizationObject(_Inout_ D3DKMT_CREATESYNCHRONIZATIONOBJECT* unnamedParam1) +{ + return NtGdiDdDDICreateSynchronizationObject(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTDestroyAllocation(_In_ CONST D3DKMT_DESTROYALLOCATION* unnamedParam1) +{ + return NtGdiDdDDIDestroyAllocation(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTDestroyContext(_In_ CONST D3DKMT_DESTROYCONTEXT* unnamedParam1) +{ + return NtGdiDdDDIDestroyContext(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTDestroyDevice(_In_ CONST D3DKMT_DESTROYDEVICE* unnamedParam1) +{ + return NtGdiDdDDIDestroyDevice(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTDestroyOverlay(_In_ CONST D3DKMT_DESTROYOVERLAY* unnamedParam1) +{ + return NtGdiDdDDIDestroyOverlay(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTDestroySynchronizationObject(_In_ CONST D3DKMT_DESTROYSYNCHRONIZATIONOBJECT* unnamedParam1) +{ + return NtGdiDdDDIDestroySynchronizationObject(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTEscape(_In_ CONST D3DKMT_ESCAPE* unnamedParam1) +{ + return NtGdiDdDDIEscape(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTFlipOverlay(_In_ CONST D3DKMT_FLIPOVERLAY* unnamedParam1) +{ + return NtGdiDdDDIFlipOverlay(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTGetContextSchedulingPriority(_Inout_ D3DKMT_GETCONTEXTSCHEDULINGPRIORITY* unnamedParam1) +{ + return NtGdiDdDDIGetContextSchedulingPriority(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTGetDeviceState(_Inout_ D3DKMT_GETDEVICESTATE* unnamedParam1) +{ + return NtGdiDdDDIGetDeviceState(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTGetDisplayModeList(_Inout_ D3DKMT_GETDISPLAYMODELIST* unnamedParam1) +{ + return NtGdiDdDDIGetDisplayModeList(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTGetMultisampleMethodList(_Inout_ D3DKMT_GETMULTISAMPLEMETHODLIST* unnamedParam1) +{ + return NtGdiDdDDIGetMultisampleMethodList(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTGetPresentHistory(_Inout_ D3DKMT_GETPRESENTHISTORY* unnamedParam1) +{ + return NtGdiDdDDIGetPresentHistory(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTGetProcessSchedulingPriorityClass( + _In_ HANDLE unnamedParam1, + _Out_ D3DKMT_SCHEDULINGPRIORITYCLASS *unnamedParam2) +{ + return NtGdiDdDDIGetProcessSchedulingPriorityClass(unnamedParam1, unnamedParam2); +} + +NTSTATUS +WINAPI +D3DKMTGetRuntimeData(_In_ CONST D3DKMT_GETRUNTIMEDATA* unnamedParam1) +{ + return NtGdiDdDDIGetRuntimeData(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTGetScanLine(_In_ D3DKMT_GETSCANLINE* unnamedParam1) +{ + return NtGdiDdDDIGetScanLine(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTGetSharedPrimaryHandle(_Inout_ D3DKMT_GETSHAREDPRIMARYHANDLE* unnamedParam1) +{ + return NtGdiDdDDIGetSharedPrimaryHandle(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTInvalidateActiveVidPn(_In_ CONST D3DKMT_INVALIDATEACTIVEVIDPN* unnamedParam1) +{ + return NtGdiDdDDIInvalidateActiveVidPn(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTLock(_Inout_ D3DKMT_LOCK* unnamedParam1) +{ + return NtGdiDdDDILock(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTOpenAdapterFromDeviceName(_Inout_ D3DKMT_OPENADAPTERFROMDEVICENAME* unnamedParam1) +{ + return NtGdiDdDDIOpenAdapterFromDeviceName(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTOpenAdapterFromGdiDisplayName(_Inout_ D3DKMT_OPENADAPTERFROMGDIDISPLAYNAME* unnamedParam1) +{ + return NtGdiDdDDIOpenAdapterFromGdiDisplayName(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTOpenAdapterFromHdc(_Inout_ D3DKMT_OPENADAPTERFROMHDC* unnamedParam1) +{ + return NtGdiDdDDIOpenAdapterFromHdc(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTOpenResource(_Inout_ D3DKMT_OPENRESOURCE* unnamedParam1) +{ + return NtGdiDdDDIOpenResource(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTPollDisplayChildren(_In_ CONST D3DKMT_POLLDISPLAYCHILDREN* unnamedParam1) +{ + return NtGdiDdDDIPollDisplayChildren(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTPresent(_In_ D3DKMT_PRESENT* unnamedParam1) +{ + return NtGdiDdDDIPresent(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTQueryAdapterInfo(_Inout_ CONST D3DKMT_QUERYADAPTERINFO* unnamedParam1) +{ + return NtGdiDdDDIQueryAdapterInfo(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTQueryAllocationResidency(_In_ CONST D3DKMT_QUERYALLOCATIONRESIDENCY* unnamedParam1) +{ + return NtGdiDdDDIQueryAllocationResidency(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTQueryResourceInfo(_Inout_ D3DKMT_QUERYRESOURCEINFO* unnamedParam1) +{ + return NtGdiDdDDIQueryResourceInfo(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTQueryStatistics(_Inout_ CONST D3DKMT_QUERYSTATISTICS* unnamedParam1) +{ + return NtGdiDdDDIQueryStatistics(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTReleaseProcessVidPnSourceOwners(_In_ HANDLE unnamedParam1) +{ + return NtGdiDdDDIReleaseProcessVidPnSourceOwners(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTRender(_In_ D3DKMT_RENDER* unnamedParam1) +{ + return NtGdiDdDDIRender(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTSetAllocationPriority(_In_ CONST D3DKMT_SETALLOCATIONPRIORITY* unnamedParam1) +{ + return NtGdiDdDDISetAllocationPriority(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTSetContextSchedulingPriority(_In_ CONST D3DKMT_SETCONTEXTSCHEDULINGPRIORITY* unnamedParam1) +{ + return NtGdiDdDDISetContextSchedulingPriority(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTSetDisplayMode(_In_ CONST D3DKMT_SETDISPLAYMODE* unnamedParam1) +{ + return NtGdiDdDDISetDisplayMode(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTSetDisplayPrivateDriverFormat(_In_ CONST D3DKMT_SETDISPLAYPRIVATEDRIVERFORMAT* unnamedParam1) +{ + return NtGdiDdDDISetDisplayPrivateDriverFormat(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTSetGammaRamp(_In_ CONST D3DKMT_SETGAMMARAMP* unnamedParam1) +{ + return NtGdiDdDDISetGammaRamp(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTSetProcessSchedulingPriorityClass( + _In_ HANDLE unnamedParam1, + _In_ D3DKMT_SCHEDULINGPRIORITYCLASS unnamedParam2) +{ + return NtGdiDdDDISetProcessSchedulingPriorityClass(unnamedParam1,unnamedParam2); +} + +NTSTATUS +WINAPI +D3DKMTSetQueuedLimit(_Inout_ CONST D3DKMT_SETQUEUEDLIMIT* unnamedParam1) +{ + return NtGdiDdDDISetQueuedLimit(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTSetVidPnSourceOwner(_In_ CONST D3DKMT_SETVIDPNSOURCEOWNER* unnamedParam1) +{ + return NtGdiDdDDISetVidPnSourceOwner(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTSharedPrimaryLockNotification(_In_ CONST D3DKMT_SHAREDPRIMARYLOCKNOTIFICATION* unnamedParam1) +{ + return NtGdiDdDDISharedPrimaryLockNotification(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTSharedPrimaryUnLockNotification(_In_ CONST D3DKMT_SHAREDPRIMARYUNLOCKNOTIFICATION* unnamedParam1) +{ + return NtGdiDdDDISharedPrimaryUnLockNotification(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTSignalSynchronizationObject(_In_ CONST D3DKMT_SIGNALSYNCHRONIZATIONOBJECT* unnamedParam1) +{ + return NtGdiDdDDISignalSynchronizationObject(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTUnlock(_In_ CONST D3DKMT_UNLOCK* unnamedParam1) +{ + return NtGdiDdDDIUnlock(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTUpdateOverlay(_In_ CONST D3DKMT_UPDATEOVERLAY* unnamedParam1) +{ + return NtGdiDdDDIUpdateOverlay(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTWaitForIdle(_In_ CONST D3DKMT_WAITFORIDLE* unnamedParam1) +{ + return NtGdiDdDDIWaitForIdle(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTWaitForSynchronizationObject(_In_ CONST D3DKMT_WAITFORSYNCHRONIZATIONOBJECT* unnamedParam1) +{ + return NtGdiDdDDIWaitForSynchronizationObject(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTWaitForVerticalBlankEvent(_In_ CONST D3DKMT_WAITFORVERTICALBLANKEVENT* unnamedParam1) +{ + return NtGdiDdDDIWaitForVerticalBlankEvent(unnamedParam1); +} diff --git a/win32ss/gdi/gdi32_vista/dc.c b/win32ss/gdi/gdi32_vista/dc.c index 7068f8bf1e8a8..1d9da4e03fcb1 100644 --- a/win32ss/gdi/gdi32_vista/dc.c +++ b/win32ss/gdi/gdi32_vista/dc.c @@ -1,16 +1,4 @@ -#define WIN32_NO_STATUS -#define _INC_WINDOWS -#define COM_NO_WINDOWS_H -#define NTOS_MODE_USER -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include /*********************************************************************** * D3DKMTCreateDCFromMemory (GDI32.@) diff --git a/win32ss/gdi/gdi32_vista/gdi32_vista.h b/win32ss/gdi/gdi32_vista/gdi32_vista.h new file mode 100644 index 0000000000000..3afb3a70308a4 --- /dev/null +++ b/win32ss/gdi/gdi32_vista/gdi32_vista.h @@ -0,0 +1,16 @@ +#pragma once + +#define WIN32_NO_STATUS +#define _INC_WINDOWS +#define COM_NO_WINDOWS_H +#define NTOS_MODE_USER +#include +#include +#include +#include +#include +#include +#include +#include +#include + diff --git a/win32ss/gdi/ntgdi/d3dkmt.c b/win32ss/gdi/ntgdi/d3dkmt.c new file mode 100644 index 0000000000000..393ceb492361e --- /dev/null +++ b/win32ss/gdi/ntgdi/d3dkmt.c @@ -0,0 +1,706 @@ +#include +#include +#include + +/* + * It looks like windows saves all the funciton pointers globally inside win32k, + * Instead, we're going to keep it static to this file and keep it organized in struct + * we obtained with the IOCTRL. + */ +static REACTOS_WIN32K_DXGKRNL_INTERFACE DxgAdapterCallbacks = {0}; + +/* + * This looks like it's done inside DxDdStartupDxGraphics, but i'd rather keep this organized. + * Dxg gets start inveitibly anyway it seems atleast on vista. + */ +VOID +DxStartupDxgkInt() +{ + DPRINT("DxStartupDxgkInt: Entry\n"); + //TODO: Let DxgKrnl know it's time to start all adapters, and obtain the win32k<->dxgkrnl interface via an IOCTRL. +} + +BOOLEAN +APIENTRY +NtGdiDdDDICheckExclusiveOwnership(VOID) +{ + // We don't support DWM at this time, excusive ownership is always false. + return FALSE; +} + +NTSTATUS +APIENTRY +NtGdiDdDDIGetProcessSchedulingPriorityClass(_In_ HANDLE unnamedParam1, + _Out_ D3DKMT_SCHEDULINGPRIORITYCLASS *unnamedParam2) +{ + return 1; +} + +NTSTATUS +APIENTRY +NtGdiDdDDISetProcessSchedulingPriorityClass( + _In_ HANDLE unnamedParam1, + _In_ D3DKMT_SCHEDULINGPRIORITYCLASS unnamedParam2) +{ + return 1; +} + +NTSTATUS +APIENTRY +NtGdiDdDDISharedPrimaryLockNotification(_In_ const D3DKMT_SHAREDPRIMARYLOCKNOTIFICATION* unnamedParam1) +{ + return 1; +} + +NTSTATUS +APIENTRY +NtGdiDdDDISharedPrimaryUnLockNotification(_In_ const D3DKMT_SHAREDPRIMARYUNLOCKNOTIFICATION* unnamedParam1) +{ + return 1; +} + +NTSTATUS +APIENTRY +NtGdiDdDDIOpenAdapterFromGdiDisplayName(_Inout_ D3DKMT_OPENADAPTERFROMGDIDISPLAYNAME* unnamedParam1) +{ + return 0; +} + +NTSTATUS +APIENTRY +NtGdiDdDDIOpenAdapterFromHdc(_Inout_ D3DKMT_OPENADAPTERFROMHDC* unnamedParam1) +{ + return 0; +} + + +NTSTATUS +APIENTRY +NtGdiDdDDIOpenAdapterFromDeviceName(_Inout_ D3DKMT_OPENADAPTERFROMDEVICENAME* unnamedParam1) +{ + return 0; +} + + +/* + * The following APIs all have the same idea, + * Most of the parameters are stuffed in custom typedefs with a bunch of types inside them. + * The idea here is this: + * if we're dealing with a d3dkmt API that directly calls into a miniport if the function pointer doesn't + * exist we're returning STATUS_PROCEDURE_NOT_FOUND. + * + * This essentially means the Dxgkrnl interface was never made as Win32k doesn't do any handling for these routines. + */ + +NTSTATUS +APIENTRY +NtGdiDdDDICreateAllocation(_Inout_ D3DKMT_CREATEALLOCATION* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnCreateAllocation) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnCreateAllocation(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDICheckMonitorPowerState(_In_ const D3DKMT_CHECKMONITORPOWERSTATE* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnCheckMonitorPowerState) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnCheckMonitorPowerState(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDICheckOcclusion(_In_ const D3DKMT_CHECKOCCLUSION* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnCheckOcclusion) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnCheckOcclusion(unnamedParam1); +} + + +NTSTATUS +APIENTRY +NtGdiDdDDICloseAdapter(_In_ const D3DKMT_CLOSEADAPTER* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnCloseAdapter) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnCloseAdapter(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDICreateContext(_Inout_ D3DKMT_CREATECONTEXT* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnCreateContext) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnCreateContext(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDICreateDevice(_Inout_ D3DKMT_CREATEDEVICE* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnCreateDevice) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnCreateDevice(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDICreateOverlay(_Inout_ D3DKMT_CREATEOVERLAY* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnCreateOverlay) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnCreateOverlay(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDICreateSynchronizationObject(_Inout_ D3DKMT_CREATESYNCHRONIZATIONOBJECT* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnCreateSynchronizationObject) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnCreateSynchronizationObject(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIDestroyAllocation(_In_ const D3DKMT_DESTROYALLOCATION* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnDestroyAllocation) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnDestroyAllocation(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIDestroyContext(_In_ const D3DKMT_DESTROYCONTEXT* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnDestroyContext) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnDestroyContext(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIDestroyDevice(_In_ const D3DKMT_DESTROYDEVICE* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnDestroyDevice) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnDestroyDevice(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIDestroyOverlay(_In_ const D3DKMT_DESTROYOVERLAY* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnDestroyOverlay) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnDestroyOverlay(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIDestroySynchronizationObject(_In_ const D3DKMT_DESTROYSYNCHRONIZATIONOBJECT* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnDestroySynchronizationObject) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnDestroySynchronizationObject(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIEscape(_In_ const D3DKMT_ESCAPE* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnEscape) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnEscape(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIFlipOverlay(_In_ const D3DKMT_FLIPOVERLAY* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnFlipOverlay) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnFlipOverlay(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIGetContextSchedulingPriority(_Inout_ D3DKMT_GETCONTEXTSCHEDULINGPRIORITY* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnGetContextSchedulingPriority) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnGetContextSchedulingPriority(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIGetDeviceState(_Inout_ D3DKMT_GETDEVICESTATE* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnGetDeviceState) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnGetDeviceState(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIGetDisplayModeList(_Inout_ D3DKMT_GETDISPLAYMODELIST* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnGetDisplayModeList) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnGetDisplayModeList(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIGetMultisampleMethodList(_Inout_ D3DKMT_GETMULTISAMPLEMETHODLIST* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnGetMultisampleMethodList) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnGetMultisampleMethodList(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIGetPresentHistory(_Inout_ D3DKMT_GETPRESENTHISTORY* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnGetPresentHistory) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnGetPresentHistory(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIGetRuntimeData(_In_ const D3DKMT_GETRUNTIMEDATA* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnGetRuntimeData) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnGetRuntimeData(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIGetScanLine(_In_ D3DKMT_GETSCANLINE* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnGetScanLine) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnGetScanLine(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIGetSharedPrimaryHandle(_Inout_ D3DKMT_GETSHAREDPRIMARYHANDLE* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnGetSharedPrimaryHandle) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnGetSharedPrimaryHandle(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIInvalidateActiveVidPn(_In_ const D3DKMT_INVALIDATEACTIVEVIDPN* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnInvalidateActiveVidPn) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnInvalidateActiveVidPn(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDILock(_Inout_ D3DKMT_LOCK* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnLock) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnLock(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIOpenResource(_Inout_ D3DKMT_OPENRESOURCE* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnOpenResource) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnOpenResource(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIPollDisplayChildren(_In_ const D3DKMT_POLLDISPLAYCHILDREN* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnPollDisplayChildren) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnPollDisplayChildren(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIPresent(_In_ D3DKMT_PRESENT* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnPresent) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnPresent(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIQueryAdapterInfo(_Inout_ const D3DKMT_QUERYADAPTERINFO* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnQueryAdapterInfo) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnQueryAdapterInfo(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIQueryAllocationResidency(_In_ const D3DKMT_QUERYALLOCATIONRESIDENCY* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnQueryAllocationResidency) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnQueryAllocationResidency(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIQueryResourceInfo(_Inout_ D3DKMT_QUERYRESOURCEINFO* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnQueryResourceInfo) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnQueryResourceInfo(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIQueryStatistics(_Inout_ const D3DKMT_QUERYSTATISTICS* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnQueryStatistics) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnQueryStatistics(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIReleaseProcessVidPnSourceOwners(_In_ HANDLE unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnReleaseProcessVidPnSourceOwners) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnReleaseProcessVidPnSourceOwners(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIRender(_In_ D3DKMT_RENDER* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnRender) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnRender(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDISetAllocationPriority(_In_ const D3DKMT_SETALLOCATIONPRIORITY* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnSetAllocationPriority) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnSetAllocationPriority(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDISetContextSchedulingPriority(_In_ const D3DKMT_SETCONTEXTSCHEDULINGPRIORITY* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnSetContextSchedulingPriority) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnSetContextSchedulingPriority(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDISetDisplayMode(_In_ const D3DKMT_SETDISPLAYMODE* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnSetDisplayMode) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnSetDisplayMode(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDISetDisplayPrivateDriverFormat(_In_ const D3DKMT_SETDISPLAYPRIVATEDRIVERFORMAT* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnSetDisplayPrivateDriverFormat) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnSetDisplayPrivateDriverFormat(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDISetGammaRamp(_In_ const D3DKMT_SETGAMMARAMP* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnSetGammaRamp) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnSetGammaRamp(unnamedParam1); +} + + +NTSTATUS +APIENTRY +NtGdiDdDDISetQueuedLimit(_Inout_ const D3DKMT_SETQUEUEDLIMIT* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnSetQueuedLimit) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnSetQueuedLimit(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDISetVidPnSourceOwner(_In_ const D3DKMT_SETVIDPNSOURCEOWNER* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnSetVidPnSourceOwner) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnSetVidPnSourceOwner(unnamedParam1); +} + +NTSTATUS +WINAPI +NtGdiDdDDIUnlock(_In_ const D3DKMT_UNLOCK* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnUnlock) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnUnlock(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIUpdateOverlay(_In_ const D3DKMT_UPDATEOVERLAY* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnUpdateOverlay) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnUpdateOverlay(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIWaitForIdle(_In_ const D3DKMT_WAITFORIDLE* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnWaitForIdle) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnWaitForIdle(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIWaitForSynchronizationObject(_In_ const D3DKMT_WAITFORSYNCHRONIZATIONOBJECT* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnWaitForSynchronizationObject) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnWaitForSynchronizationObject(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIWaitForVerticalBlankEvent(_In_ const D3DKMT_WAITFORVERTICALBLANKEVENT* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnWaitForVerticalBlankEvent) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnWaitForVerticalBlankEvent(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDISignalSynchronizationObject(_In_ const D3DKMT_SIGNALSYNCHRONIZATIONOBJECT* unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnSignalSynchronizationObject) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnSignalSynchronizationObject(unnamedParam1); +} diff --git a/win32ss/gdi/ntgdi/init.c b/win32ss/gdi/ntgdi/init.c index 44afa1219dfc4..99f935c93dd99 100644 --- a/win32ss/gdi/ntgdi/init.c +++ b/win32ss/gdi/ntgdi/init.c @@ -75,11 +75,15 @@ GdiThreadDestroy(PETHREAD Thread) return STATUS_SUCCESS; } +VOID +DxStartupDxgkInt(); BOOL InitializeGreCSRSS(VOID) { - /* Initialize DirectX graphics driver */ + /* Initialize Dxgkrnl interfaces and run final startup routine */ + DxStartupDxgkInt(); + /* Initialize Legacy DirectX graphics driver */ if (DxDdStartupDxGraphics(0, NULL, 0, NULL, NULL, gpepCSRSS) != STATUS_SUCCESS) { ERR("Unable to initialize DirectX graphics\n"); diff --git a/win32ss/pch.h b/win32ss/pch.h index dd49055606bb2..203f485358288 100644 --- a/win32ss/pch.h +++ b/win32ss/pch.h @@ -53,6 +53,7 @@ typedef struct _SECURITY_ATTRIBUTES SECURITY_ATTRIBUTES, *LPSECURITY_ATTRIBUTES; #define LPPOINT PPOINTL #define PPOINT PPOINTL +#include #include #include #define _ENGINE_EXPORT_ diff --git a/win32ss/w32ksvc32.h b/win32ss/w32ksvc32.h index b10dde4b71e94..3e3aa603a0e22 100644 --- a/win32ss/w32ksvc32.h +++ b/win32ss/w32ksvc32.h @@ -694,3 +694,59 @@ // For Wine DX SVC_(GdiDdDDICreateDCFromMemory, 1) SVC_(GdiDdDDIDestroyDCFromMemory, 1) +// ReactOS Display Driver Model + SVC_(GdiDdDDICheckExclusiveOwnership, 0) + SVC_(GdiDdDDICreateAllocation, 1) + SVC_(GdiDdDDICheckMonitorPowerState, 1) + SVC_(GdiDdDDICheckOcclusion, 1) + SVC_(GdiDdDDICloseAdapter, 1) + SVC_(GdiDdDDICreateContext, 1) + SVC_(GdiDdDDICreateDevice, 1) + SVC_(GdiDdDDICreateOverlay, 1) + SVC_(GdiDdDDICreateSynchronizationObject, 1) + SVC_(GdiDdDDIWaitForVerticalBlankEvent, 1) + SVC_(GdiDdDDIWaitForIdle, 1) + SVC_(GdiDdDDIUpdateOverlay, 1) + SVC_(GdiDdDDIUnlock, 1) + SVC_(GdiDdDDIDestroyAllocation, 1) + SVC_(GdiDdDDIDestroyContext, 1) + SVC_(GdiDdDDIDestroyDevice, 1) + SVC_(GdiDdDDIDestroyOverlay, 1) + SVC_(GdiDdDDIDestroySynchronizationObject, 1) + SVC_(GdiDdDDIEscape, 1) + SVC_(GdiDdDDIFlipOverlay, 1) + SVC_(GdiDdDDIGetContextSchedulingPriority, 1) + SVC_(GdiDdDDIGetDeviceState, 1) + SVC_(GdiDdDDIGetDisplayModeList, 1) + SVC_(GdiDdDDIGetMultisampleMethodList, 1) + SVC_(GdiDdDDIGetPresentHistory, 1) + SVC_(GdiDdDDIGetProcessSchedulingPriorityClass, 2) + SVC_(GdiDdDDIGetRuntimeData, 1) + SVC_(GdiDdDDIGetScanLine, 1) + SVC_(GdiDdDDIGetSharedPrimaryHandle, 1) + SVC_(GdiDdDDIInvalidateActiveVidPn, 1) + SVC_(GdiDdDDILock, 1) + SVC_(GdiDdDDIOpenAdapterFromDeviceName, 1) + SVC_(GdiDdDDIOpenAdapterFromGdiDisplayName, 1) + SVC_(GdiDdDDIOpenAdapterFromHdc, 1) + SVC_(GdiDdDDIOpenResource, 1) + SVC_(GdiDdDDIPollDisplayChildren, 1) + SVC_(GdiDdDDIPresent, 1) + SVC_(GdiDdDDIQueryAdapterInfo, 1) + SVC_(GdiDdDDIQueryAllocationResidency, 1) + SVC_(GdiDdDDIQueryResourceInfo, 1) + SVC_(GdiDdDDIQueryStatistics, 1) + SVC_(GdiDdDDIReleaseProcessVidPnSourceOwners, 1) + SVC_(GdiDdDDIRender, 1) + SVC_(GdiDdDDISetAllocationPriority, 1) + SVC_(GdiDdDDISetContextSchedulingPriority, 1) + SVC_(GdiDdDDISetDisplayMode, 1) + SVC_(GdiDdDDISetDisplayPrivateDriverFormat, 1) + SVC_(GdiDdDDISetGammaRamp, 1) + SVC_(GdiDdDDISetProcessSchedulingPriorityClass, 2) + SVC_(GdiDdDDISetQueuedLimit, 1) + SVC_(GdiDdDDISetVidPnSourceOwner, 1) + SVC_(GdiDdDDISharedPrimaryLockNotification, 1) + SVC_(GdiDdDDISharedPrimaryUnLockNotification, 1) + SVC_(GdiDdDDISignalSynchronizationObject, 1) + SVC_(GdiDdDDIWaitForSynchronizationObject, 1) diff --git a/win32ss/w32ksvc64.h b/win32ss/w32ksvc64.h index e50c0f00cb1b0..b78ad12f059d6 100644 --- a/win32ss/w32ksvc64.h +++ b/win32ss/w32ksvc64.h @@ -688,3 +688,59 @@ SVC_(UserSetDbgTagCount, 1) // SVC_(UserSetRipFlags, 1) // SVC_(UserSetScrollBarInfo, 3) // +// ReactOS Display Driver Model + SVC_(GdiDdDDICheckExclusiveOwnership, 0) + SVC_(GdiDdDDICreateAllocation, 1) + SVC_(GdiDdDDICheckMonitorPowerState, 1) + SVC_(GdiDdDDICheckOcclusion, 1) + SVC_(GdiDdDDICloseAdapter, 1) + SVC_(GdiDdDDICreateContext, 1) + SVC_(GdiDdDDICreateDevice, 1) + SVC_(GdiDdDDICreateOverlay, 1) + SVC_(GdiDdDDICreateSynchronizationObject, 1) + SVC_(GdiDdDDIWaitForVerticalBlankEvent, 1) + SVC_(GdiDdDDIWaitForIdle, 1) + SVC_(GdiDdDDIUpdateOverlay, 1) + SVC_(GdiDdDDIUnlock, 1) + SVC_(GdiDdDDIDestroyAllocation, 1) + SVC_(GdiDdDDIDestroyContext, 1) + SVC_(GdiDdDDIDestroyDevice, 1) + SVC_(GdiDdDDIDestroyOverlay, 1) + SVC_(GdiDdDDIDestroySynchronizationObject, 1) + SVC_(GdiDdDDIEscape, 1) + SVC_(GdiDdDDIFlipOverlay, 1) + SVC_(GdiDdDDIGetContextSchedulingPriority, 1) + SVC_(GdiDdDDIGetDeviceState, 1) + SVC_(GdiDdDDIGetDisplayModeList, 1) + SVC_(GdiDdDDIGetMultisampleMethodList, 1) + SVC_(GdiDdDDIGetPresentHistory, 1) + SVC_(GdiDdDDIGetProcessSchedulingPriorityClass, 2) + SVC_(GdiDdDDIGetRuntimeData, 1) + SVC_(GdiDdDDIGetScanLine, 1) + SVC_(GdiDdDDIGetSharedPrimaryHandle, 1) + SVC_(GdiDdDDIInvalidateActiveVidPn, 1) + SVC_(GdiDdDDILock, 1) + SVC_(GdiDdDDIOpenAdapterFromDeviceName, 1) + SVC_(GdiDdDDIOpenAdapterFromGdiDisplayName, 1) + SVC_(GdiDdDDIOpenAdapterFromHdc, 1) + SVC_(GdiDdDDIOpenResource, 1) + SVC_(GdiDdDDIPollDisplayChildren, 1) + SVC_(GdiDdDDIPresent, 1) + SVC_(GdiDdDDIQueryAdapterInfo, 1) + SVC_(GdiDdDDIQueryAllocationResidency, 1) + SVC_(GdiDdDDIQueryResourceInfo, 1) + SVC_(GdiDdDDIQueryStatistics, 1) + SVC_(GdiDdDDIReleaseProcessVidPnSourceOwners, 1) + SVC_(GdiDdDDIRender, 1) + SVC_(GdiDdDDISetAllocationPriority, 1) + SVC_(GdiDdDDISetContextSchedulingPriority, 1) + SVC_(GdiDdDDISetDisplayMode, 1) + SVC_(GdiDdDDISetDisplayPrivateDriverFormat, 1) + SVC_(GdiDdDDISetGammaRamp, 1) + SVC_(GdiDdDDISetProcessSchedulingPriorityClass, 2) + SVC_(GdiDdDDISetQueuedLimit, 1) + SVC_(GdiDdDDISetVidPnSourceOwner, 1) + SVC_(GdiDdDDISharedPrimaryLockNotification, 1) + SVC_(GdiDdDDISharedPrimaryUnLockNotification, 1) + SVC_(GdiDdDDISignalSynchronizationObject, 1) + SVC_(GdiDdDDIWaitForSynchronizationObject, 1)