diff --git a/sdk/include/ddk/d3dkmthk.h b/sdk/include/ddk/d3dkmthk.h index 86ba3a1871b30..5d52ed72a6372 100644 --- a/sdk/include/ddk/d3dkmthk.h +++ b/sdk/include/ddk/d3dkmthk.h @@ -21,6 +21,410 @@ #include +typedef enum _D3DKMT_CLIENTHINT +{ + D3DKMT_CLIENTHINT_UNKNOWN = 0, + D3DKMT_CLIENTHINT_OPENGL = 1, + D3DKMT_CLIENTHINT_CDD = 2, + D3DKMT_CLIENTHINT_OPENCL = 3, + D3DKMT_CLIENTHINT_VULKAN = 4, + D3DKMT_CLIENTHINT_CUDA = 5, + D3DKMT_CLIENTHINT_RESERVED = 6, + D3DKMT_CLIENTHINT_DX7 = 7, + D3DKMT_CLIENTHINT_DX8 = 8, + D3DKMT_CLIENTHINT_DX9 = 9, + D3DKMT_CLIENTHINT_DX10 = 10, + D3DKMT_CLIENTHINT_DX11 = 11, + D3DKMT_CLIENTHINT_DX12 = 12, + D3DKMT_CLIENTHINT_9ON12 = 13, + D3DKMT_CLIENTHINT_11ON12 = 14, + D3DKMT_CLIENTHINT_MFT_ENCODE = 15, + D3DKMT_CLIENTHINT_GLON12 = 16, + D3DKMT_CLIENTHINT_CLON12 = 17, + D3DKMT_CLIENTHINT_DML_TENSORFLOW = 18, + D3DKMT_CLIENTHINT_ONEAPI_LEVEL0 = 19, + D3DKMT_CLIENTHINT_DML_PYTORCH = 20, + D3DKMT_CLIENTHINT_MAX +} D3DKMT_CLIENTHINT; + +typedef enum _D3DKMT_QUEUEDLIMIT_TYPE { + D3DKMT_SET_QUEUEDLIMIT_PRESENT, + D3DKMT_GET_QUEUEDLIMIT_PRESENT +} D3DKMT_QUEUEDLIMIT_TYPE; + +typedef enum _D3DKMT_SCHEDULINGPRIORITYCLASS { + D3DKMT_SCHEDULINGPRIORITYCLASS_IDLE, + D3DKMT_SCHEDULINGPRIORITYCLASS_BELOW_NORMAL, + D3DKMT_SCHEDULINGPRIORITYCLASS_NORMAL, + D3DKMT_SCHEDULINGPRIORITYCLASS_ABOVE_NORMAL, + D3DKMT_SCHEDULINGPRIORITYCLASS_HIGH, + D3DKMT_SCHEDULINGPRIORITYCLASS_REALTIME +} D3DKMT_SCHEDULINGPRIORITYCLASS; + +typedef struct _D3DKMT_RENDERFLAGS { + UINT ResizeCommandBuffer : 1; + UINT ResizeAllocationList : 1; + UINT ResizePatchLocationList : 1; + UINT NullRendering : 1; + UINT PresentRedirected : 1; + UINT RenderKm : 1; + UINT RenderKmReadback : 1; + UINT Reserved : 25; +} D3DKMT_RENDERFLAGS; + +typedef enum _D3DKMT_QUERYSTATISTICS_TYPE +{ + D3DKMT_QUERYSTATISTICS_ADAPTER = 0, + D3DKMT_QUERYSTATISTICS_PROCESS = 1, + D3DKMT_QUERYSTATISTICS_PROCESS_ADAPTER = 2, + D3DKMT_QUERYSTATISTICS_SEGMENT = 3, + D3DKMT_QUERYSTATISTICS_PROCESS_SEGMENT = 4, + D3DKMT_QUERYSTATISTICS_NODE = 5, + D3DKMT_QUERYSTATISTICS_PROCESS_NODE = 6, + D3DKMT_QUERYSTATISTICS_VIDPNSOURCE = 7, + D3DKMT_QUERYSTATISTICS_PROCESS_VIDPNSOURCE = 8, + D3DKMT_QUERYSTATISTICS_PROCESS_SEGMENT_GROUP = 9, + D3DKMT_QUERYSTATISTICS_PHYSICAL_ADAPTER = 10, + D3DKMT_QUERYSTATISTICS_ADAPTER2 = 11, + D3DKMT_QUERYSTATISTICS_SEGMENT2 = 12, + D3DKMT_QUERYSTATISTICS_PROCESS_ADAPTER2 = 13, + D3DKMT_QUERYSTATISTICS_PROCESS_SEGMENT2 = 14, + D3DKMT_QUERYSTATISTICS_PROCESS_SEGMENT_GROUP2 = 15, + D3DKMT_QUERYSTATISTICS_SEGMENT_USAGE = 16, + D3DKMT_QUERYSTATISTICS_SEGMENT_GROUP_USAGE = 17, + D3DKMT_QUERYSTATISTICS_NODE2 = 18, + D3DKMT_QUERYSTATISTICS_PROCESS_NODE2 = 19 +} D3DKMT_QUERYSTATISTICS_TYPE; + +typedef enum _KMTQUERYADAPTERINFOTYPE { + KMTQAITYPE_UMDRIVERPRIVATE, + KMTQAITYPE_UMDRIVERNAME, + KMTQAITYPE_UMOPENGLINFO, + KMTQAITYPE_GETSEGMENTSIZE, + KMTQAITYPE_ADAPTERGUID, + KMTQAITYPE_FLIPQUEUEINFO, + KMTQAITYPE_ADAPTERADDRESS, + KMTQAITYPE_SETWORKINGSETINFO, + KMTQAITYPE_ADAPTERREGISTRYINFO, + KMTQAITYPE_CURRENTDISPLAYMODE, + KMTQAITYPE_MODELIST, + KMTQAITYPE_CHECKDRIVERUPDATESTATUS, + KMTQAITYPE_VIRTUALADDRESSINFO, + KMTQAITYPE_DRIVERVERSION, + KMTQAITYPE_ADAPTERTYPE, + KMTQAITYPE_OUTPUTDUPLCONTEXTSCOUNT, + KMTQAITYPE_WDDM_1_2_CAPS, + KMTQAITYPE_UMD_DRIVER_VERSION, + KMTQAITYPE_DIRECTFLIP_SUPPORT, + KMTQAITYPE_MULTIPLANEOVERLAY_SUPPORT, + KMTQAITYPE_DLIST_DRIVER_NAME, + KMTQAITYPE_WDDM_1_3_CAPS, + KMTQAITYPE_MULTIPLANEOVERLAY_HUD_SUPPORT, + KMTQAITYPE_WDDM_2_0_CAPS, + KMTQAITYPE_NODEMETADATA, + KMTQAITYPE_CPDRIVERNAME, + KMTQAITYPE_XBOX, + KMTQAITYPE_INDEPENDENTFLIP_SUPPORT, + KMTQAITYPE_MIRACASTCOMPANIONDRIVERNAME, + KMTQAITYPE_PHYSICALADAPTERCOUNT, + KMTQAITYPE_PHYSICALADAPTERDEVICEIDS, + KMTQAITYPE_DRIVERCAPS_EXT, + KMTQAITYPE_QUERY_MIRACAST_DRIVER_TYPE, + KMTQAITYPE_QUERY_GPUMMU_CAPS, + KMTQAITYPE_QUERY_MULTIPLANEOVERLAY_DECODE_SUPPORT, + KMTQAITYPE_QUERY_HW_PROTECTION_TEARDOWN_COUNT, + KMTQAITYPE_QUERY_ISBADDRIVERFORHWPROTECTIONDISABLED, + KMTQAITYPE_MULTIPLANEOVERLAY_SECONDARY_SUPPORT, + KMTQAITYPE_INDEPENDENTFLIP_SECONDARY_SUPPORT, + KMTQAITYPE_PANELFITTER_SUPPORT, + KMTQAITYPE_PHYSICALADAPTERPNPKEY, + KMTQAITYPE_GETSEGMENTGROUPSIZE, + KMTQAITYPE_MPO3DDI_SUPPORT, + KMTQAITYPE_HWDRM_SUPPORT, + KMTQAITYPE_MPOKERNELCAPS_SUPPORT, + KMTQAITYPE_MULTIPLANEOVERLAY_STRETCH_SUPPORT, + KMTQAITYPE_GET_DEVICE_VIDPN_OWNERSHIP_INFO, + KMTQAITYPE_QUERYREGISTRY, + KMTQAITYPE_KMD_DRIVER_VERSION, + KMTQAITYPE_BLOCKLIST_KERNEL, + KMTQAITYPE_BLOCKLIST_RUNTIME, + KMTQAITYPE_ADAPTERGUID_RENDER, + KMTQAITYPE_ADAPTERADDRESS_RENDER, + KMTQAITYPE_ADAPTERREGISTRYINFO_RENDER, + KMTQAITYPE_CHECKDRIVERUPDATESTATUS_RENDER, + KMTQAITYPE_DRIVERVERSION_RENDER, + KMTQAITYPE_ADAPTERTYPE_RENDER, + KMTQAITYPE_WDDM_1_2_CAPS_RENDER, + KMTQAITYPE_WDDM_1_3_CAPS_RENDER, + KMTQAITYPE_QUERY_ADAPTER_UNIQUE_GUID, + KMTQAITYPE_NODEPERFDATA, + KMTQAITYPE_ADAPTERPERFDATA, + KMTQAITYPE_ADAPTERPERFDATA_CAPS, + KMTQUITYPE_GPUVERSION, + KMTQAITYPE_DRIVER_DESCRIPTION, + KMTQAITYPE_DRIVER_DESCRIPTION_RENDER, + KMTQAITYPE_SCANOUT_CAPS, + KMTQAITYPE_DISPLAY_UMDRIVERNAME, + KMTQAITYPE_PARAVIRTUALIZATION_RENDER, + KMTQAITYPE_SERVICENAME, + KMTQAITYPE_WDDM_2_7_CAPS, + KMTQAITYPE_TRACKEDWORKLOAD_SUPPORT, + KMTQAITYPE_HYBRID_DLIST_DLL_SUPPORT, + KMTQAITYPE_DISPLAY_CAPS, + KMTQAITYPE_WDDM_2_9_CAPS, + KMTQAITYPE_CROSSADAPTERRESOURCE_SUPPORT, + KMTQAITYPE_WDDM_3_0_CAPS, + KMTQAITYPE_WSAUMDIMAGENAME, + KMTQAITYPE_VGPUINTERFACEID, + KMTQAITYPE_WDDM_3_1_CAPS, + KMTQAITYPE_HYBRID_DLIST_DLL_MUX_SUPPORT +} KMTQUERYADAPTERINFOTYPE; + + +typedef enum _D3DKMT_ESCAPETYPE +{ + D3DKMT_ESCAPE_DRIVERPRIVATE = 0, + D3DKMT_ESCAPE_VIDMM = 1, + D3DKMT_ESCAPE_TDRDBGCTRL = 2, + D3DKMT_ESCAPE_VIDSCH = 3, + D3DKMT_ESCAPE_DEVICE = 4, + D3DKMT_ESCAPE_DMM = 5, + D3DKMT_ESCAPE_DEBUG_SNAPSHOT = 6, + D3DKMT_ESCAPE_DRT_TEST = 8, +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN8) + D3DKMT_ESCAPE_DIAGNOSTICS = 9, + D3DKMT_ESCAPE_OUTPUTDUPL_SNAPSHOT = 10, + D3DKMT_ESCAPE_OUTPUTDUPL_DIAGNOSTICS = 11, + D3DKMT_ESCAPE_BDD_PNP = 12, + D3DKMT_ESCAPE_BDD_FALLBACK = 13, + D3DKMT_ESCAPE_ACTIVATE_SPECIFIC_DIAG = 14, + D3DKMT_ESCAPE_MODES_PRUNED_OUT = 15, + D3DKMT_ESCAPE_WHQL_INFO = 16, + D3DKMT_ESCAPE_BRIGHTNESS = 17, + D3DKMT_ESCAPE_EDID_CACHE = 18, +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM1_3) + D3DKMT_ESCAPE_MIRACAST_DISPLAY_REQUEST = 20, + D3DKMT_ESCAPE_HISTORY_BUFFER_STATUS = 21, + D3DKMT_ESCAPE_MIRACAST_ADAPTER_DIAG_INFO = 23, +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0) + D3DKMT_ESCAPE_FORCE_BDDFALLBACK_HEADLESS = 24, + D3DKMT_ESCAPE_REQUEST_MACHINE_CRASH = 25, + + D3DKMT_ESCAPE_SOFTGPU_ENABLE_DISABLE_HMD = 27, + D3DKMT_ESCAPE_PROCESS_VERIFIER_OPTION = 28, + D3DKMT_ESCAPE_ADAPTER_VERIFIER_OPTION = 29, +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_1) + D3DKMT_ESCAPE_IDD_REQUEST = 30, + D3DKMT_ESCAPE_DOD_SET_DIRTYRECT_MODE = 31, + D3DKMT_ESCAPE_LOG_CODEPOINT_PACKET = 32, +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_2) + D3DKMT_ESCAPE_LOG_USERMODE_DAIG_PACKET = 33, + D3DKMT_ESCAPE_GET_EXTERNAL_DIAGNOSTICS = 34, + // unused (35 previously was D3DKMT_ESCAPE_GET_PREFERRED_MODE) +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_3) + D3DKMT_ESCAPE_GET_DISPLAY_CONFIGURATIONS = 36, +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_4) + D3DKMT_ESCAPE_QUERY_IOMMU_STATUS = 37, +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_6) + D3DKMT_ESCAPE_CCD_DATABASE = 38, +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM3_0) + D3DKMT_ESCAPE_QUERY_DMA_REMAPPING_STATUS = 39, +#endif +#endif +#endif +#endif +#endif +#endif +#endif +#endif + D3DKMT_ESCAPE_WIN32K_START = 1024, + D3DKMT_ESCAPE_WIN32K_HIP_DEVICE_INFO = 1024, + D3DKMT_ESCAPE_WIN32K_QUERY_CD_ROTATION_BLOCK = 1025, +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM1_3) + D3DKMT_ESCAPE_WIN32K_DPI_INFO = 1026, + D3DKMT_ESCAPE_WIN32K_PRESENTER_VIEW_INFO = 1027, + D3DKMT_ESCAPE_WIN32K_SYSTEM_DPI = 1028, +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0) + D3DKMT_ESCAPE_WIN32K_BDD_FALLBACK = 1029, + D3DKMT_ESCAPE_WIN32K_DDA_TEST_CTL = 1030, + D3DKMT_ESCAPE_WIN32K_USER_DETECTED_BLACK_SCREEN = 1031, + D3DKMT_ESCAPE_WIN32K_HMD_ENUM = 1032, + D3DKMT_ESCAPE_WIN32K_HMD_CONTROL = 1033, + D3DKMT_ESCAPE_WIN32K_LPMDISPLAY_CONTROL = 1034, +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_5) + D3DKMT_ESCAPE_WIN32K_DISPBROKER_TEST = 1035, +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_6) + D3DKMT_ESCAPE_WIN32K_COLOR_PROFILE_INFO = 1036, +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_7) + D3DKMT_ESCAPE_WIN32K_SET_DIMMED_STATE = 1037, + D3DKMT_ESCAPE_WIN32K_SPECIALIZED_DISPLAY_TEST = 1038, +#endif +#endif +#endif +#endif +#endif +#endif +} D3DKMT_ESCAPETYPE; +typedef enum _D3DKMDT_MODE_PRUNING_REASON +{ + D3DKMDT_MPR_UNINITIALIZED = 0, + D3DKMDT_MPR_ALLCAPS = 1, + D3DKMDT_MPR_DESCRIPTOR_MONITOR_SOURCE_MODE = 2, + D3DKMDT_MPR_DESCRIPTOR_MONITOR_FREQUENCY_RANGE = 3, + D3DKMDT_MPR_DESCRIPTOR_OVERRIDE_MONITOR_SOURCE_MODE = 4, + D3DKMDT_MPR_DESCRIPTOR_OVERRIDE_MONITOR_FREQUENCY_RANGE = 5, + D3DKMDT_MPR_DEFAULT_PROFILE_MONITOR_SOURCE_MODE = 6, + D3DKMDT_MPR_DRIVER_RECOMMENDED_MONITOR_SOURCE_MODE = 7, + D3DKMDT_MPR_MONITOR_FREQUENCY_RANGE_OVERRIDE = 8, + D3DKMDT_MPR_CLONE_PATH_PRUNED = 9, + D3DKMDT_MPR_MAXVALID = 10 +} +D3DKMDT_MODE_PRUNING_REASON; +typedef enum _D3DKMT_ALLOCATIONRESIDENCYSTATUS +{ + D3DKMT_ALLOCATIONRESIDENCYSTATUS_RESIDENTINGPUMEMORY=1, + D3DKMT_ALLOCATIONRESIDENCYSTATUS_RESIDENTINSHAREDMEMORY=2, + D3DKMT_ALLOCATIONRESIDENCYSTATUS_NOTRESIDENT=3, +} D3DKMT_ALLOCATIONRESIDENCYSTATUS; + +typedef enum _D3DKMT_VIDPNSOURCEOWNER_TYPE +{ + D3DKMT_VIDPNSOURCEOWNER_UNOWNED = 0, + D3DKMT_VIDPNSOURCEOWNER_SHARED = 1, + D3DKMT_VIDPNSOURCEOWNER_EXCLUSIVE = 2, + D3DKMT_VIDPNSOURCEOWNER_EXCLUSIVEGDI = 3, + D3DKMT_VIDPNSOURCEOWNER_EMULATED = 4, +} D3DKMT_VIDPNSOURCEOWNER_TYPE; + +typedef struct _D3DKMDT_DISPLAYMODE_FLAGS +{ +#if (DXGKDDI_INTERFACE_VERSION < DXGKDDI_INTERFACE_VERSION_WIN8) + BOOLEAN ValidatedAgainstMonitorCaps : 1; + BOOLEAN RoundedFakeMode : 1; + D3DKMDT_MODE_PRUNING_REASON ModePruningReason : 4; + UINT Reserved : 28; +#else + UINT ValidatedAgainstMonitorCaps : 1; + UINT RoundedFakeMode : 1; + UINT : 0; + D3DKMDT_MODE_PRUNING_REASON ModePruningReason : 4; + UINT Stereo : 1; + UINT AdvancedScanCapable : 1; +#if (DXGKDDI_INTERFACE_VERSION < DXGKDDI_INTERFACE_VERSION_WDDM2_0) + UINT Reserved : 26; +#else + UINT PreferredTiming : 1; + UINT PhysicalModeSupported : 1; +#if (DXGKDDI_INTERFACE_VERSION < DXGKDDI_INTERFACE_VERSION_WDDM2_9) + UINT Reserved : 24; +#else + UINT VirtualRefreshRate : 1; + UINT Reserved : 23; +#endif +#endif +#endif +} +D3DKMDT_DISPLAYMODE_FLAGS; + +typedef enum _D3DKMT_DEVICESTATE_TYPE +{ + D3DKMT_DEVICESTATE_EXECUTION = 1, + D3DKMT_DEVICESTATE_PRESENT = 2, + D3DKMT_DEVICESTATE_RESET = 3, + D3DKMT_DEVICESTATE_PRESENT_DWM = 4, + +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0) + D3DKMT_DEVICESTATE_PAGE_FAULT = 5, +#endif +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_1) + D3DKMT_DEVICESTATE_PRESENT_QUEUE = 6, +#endif +} D3DKMT_DEVICESTATE_TYPE; + +typedef enum _D3DKMT_DEVICEEXECUTION_STATE +{ + D3DKMT_DEVICEEXECUTION_ACTIVE = 1, + D3DKMT_DEVICEEXECUTION_RESET = 2, + D3DKMT_DEVICEEXECUTION_HUNG = 3, + D3DKMT_DEVICEEXECUTION_STOPPED = 4, + D3DKMT_DEVICEEXECUTION_ERROR_OUTOFMEMORY = 5, + D3DKMT_DEVICEEXECUTION_ERROR_DMAFAULT = 6, +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0) + D3DKMT_DEVICEEXECUTION_ERROR_DMAPAGEFAULT = 7, +#endif +} D3DKMT_DEVICEEXECUTION_STATE; + +typedef struct _D3DKMT_DEVICEPRESENT_QUEUE_STATE +{ + D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; // in: present source id + BOOLEAN bQueuedPresentLimitReached; // out: whether the queued present limit has been reached +} D3DKMT_DEVICEPRESENT_QUEUE_STATE; + +typedef struct _D3DKMT_DEVICERESET_STATE +{ + union + { + struct + { + UINT DesktopSwitched : 1; + UINT Reserved :31; + }; + UINT Value; + }; +} D3DKMT_DEVICERESET_STATE; + +typedef struct _D3DKMT_PRESENT_STATS +{ + UINT PresentCount; + UINT PresentRefreshCount; + UINT SyncRefreshCount; + LARGE_INTEGER SyncQPCTime; + LARGE_INTEGER SyncGPUTime; +} D3DKMT_PRESENT_STATS; + +typedef struct _D3DKMT_DEVICEPRESENT_STATE +{ + D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; + D3DKMT_PRESENT_STATS PresentStats; +} D3DKMT_DEVICEPRESENT_STATE; + +typedef struct _D3DKMT_PRESENT_STATS_DWM +{ + UINT PresentCount; + UINT PresentRefreshCount; + LARGE_INTEGER PresentQPCTime; + UINT SyncRefreshCount; + LARGE_INTEGER SyncQPCTime; + UINT CustomPresentDuration; +} D3DKMT_PRESENT_STATS_DWM; + +typedef struct _D3DKMT_DEVICEPRESENT_STATE_DWM +{ + D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; + D3DKMT_PRESENT_STATS_DWM PresentStatsDWM; +} D3DKMT_DEVICEPRESENT_STATE_DWM; + +typedef struct _D3DKMT_MULTISAMPLEMETHOD +{ + UINT NumSamples; + UINT NumQualityLevels; + UINT Reserved; +} D3DKMT_MULTISAMPLEMETHOD; + + +typedef struct _D3DKMT_DISPLAYMODE +{ + UINT Width; + UINT Height; + D3DDDIFORMAT Format; + UINT IntegerRefreshRate; + D3DDDI_RATIONAL RefreshRate; + D3DDDI_VIDEO_SIGNAL_SCANLINE_ORDERING ScanLineOrdering; + D3DDDI_ROTATION DisplayOrientation; + UINT DisplayFixedOutput; + D3DKMDT_DISPLAYMODE_FLAGS Flags; +} D3DKMT_DISPLAYMODE; + typedef struct _D3DKMT_CREATEDCFROMMEMORY { void *pMemory; @@ -40,6 +444,688 @@ typedef struct _D3DKMT_DESTROYDCFROMMEMORY HANDLE hBitmap; } D3DKMT_DESTROYDCFROMMEMORY; +typedef struct _D3DKMT_CHECKMONITORPOWERSTATE +{ + D3DKMT_HANDLE hAdapter; + D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; +} D3DKMT_CHECKMONITORPOWERSTATE, *PD3DKMT_CHECKMONITORPOWERSTATE; + +typedef struct _D3DKMT_CHECKOCCLUSION +{ + D3DKMT_PTR(HWND, hWindow); +} D3DKMT_CHECKOCCLUSION, *PD3DKMT_CHECKOCCLUSION; + +typedef struct _D3DKMT_CLOSEADAPTER +{ + D3DKMT_HANDLE hAdapter; +} D3DKMT_CLOSEADAPTER, *PD3DKMT_CLOSEADAPTER; + +typedef struct _D3DKMT_CREATECONTEXT +{ + D3DKMT_HANDLE hDevice; + UINT NodeOrdinal; + UINT EngineAffinity; + D3DDDI_CREATECONTEXTFLAGS Flags; + D3DKMT_PTR(VOID*, pPrivateDriverData); + UINT PrivateDriverDataSize; + D3DKMT_CLIENTHINT ClientHint; + D3DKMT_HANDLE hContext; + D3DKMT_PTR(VOID*, pCommandBuffer); + UINT CommandBufferSize; + D3DKMT_PTR(D3DDDI_ALLOCATIONLIST*, pAllocationList); + UINT AllocationListSize; + D3DKMT_PTR(D3DDDI_PATCHLOCATIONLIST*, pPatchLocationList); + UINT PatchLocationListSize; + D3DGPU_VIRTUAL_ADDRESS CommandBuffer; +} D3DKMT_CREATECONTEXT, *PD3DKMT_CREATECONTEXT; + +typedef struct _D3DKMT_CREATEDEVICEFLAGS +{ + UINT LegacyMode : 1; + UINT RequestVSync : 1; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN8) + UINT DisableGpuTimeout : 1; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM3_1) + UINT TestDevice : 1; + UINT Reserved : 28; +#else + UINT Reserved : 29; +#endif +#else + UINT Reserved : 30; +#endif +} D3DKMT_CREATEDEVICEFLAGS; + +typedef struct _D3DKMT_CREATEDEVICE +{ + union + { + D3DKMT_HANDLE hAdapter; + VOID* pAdapter; + D3DKMT_PTR_HELPER(pAdapter_Align) + }; + + D3DKMT_CREATEDEVICEFLAGS Flags; + + D3DKMT_HANDLE hDevice; + D3DKMT_PTR(VOID*, pCommandBuffer); + UINT CommandBufferSize; + D3DKMT_PTR(D3DDDI_ALLOCATIONLIST*, pAllocationList); + UINT AllocationListSize; + D3DKMT_PTR(D3DDDI_PATCHLOCATIONLIST*, pPatchLocationList); + UINT PatchLocationListSize; +} D3DKMT_CREATEDEVICE, *PD3DKMT_CREATEDEVICE; + +typedef struct _D3DKMT_CREATEOVERLAY +{ + D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; + D3DKMT_HANDLE hDevice; + D3DDDI_KERNELOVERLAYINFO OverlayInfo; + D3DKMT_HANDLE hOverlay; +} D3DKMT_CREATEOVERLAY, *PD3DKMT_CREATEOVERLAY; + +typedef struct _D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP { + D3DKMT_HANDLE hAdapter; + D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; +} D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP, *PD3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP; + +typedef struct _D3DKMT_CREATESYNCHRONIZATIONOBJECT { + D3DKMT_HANDLE hDevice; + D3DDDI_SYNCHRONIZATIONOBJECTINFO Info; + D3DKMT_HANDLE hSyncObject; +} D3DKMT_CREATESYNCHRONIZATIONOBJECT, *PD3DKMT_CREATESYNCHRONIZATIONOBJECT; + +typedef struct _D3DDDI_ALLOCATIONINFO +{ + D3DKMT_HANDLE hAllocation; + D3DKMT_PTR(CONST VOID*, pSystemMem); + D3DKMT_PTR(VOID*, pPrivateDriverData); + UINT PrivateDriverDataSize; + D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; + union + { + struct + { + UINT Primary : 1; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN8) + UINT Stereo : 1; + UINT Reserved :30; +#else + UINT Reserved :31; +#endif + }; + UINT Value; + } Flags; +} D3DDDI_ALLOCATIONINFO; + +typedef struct _D3DDDI_ALLOCATIONINFO2 +{ + D3DKMT_HANDLE hAllocation; + union D3DKMT_ALIGN64 + { + D3DKMT_PTR_HELPER(pSystemMem_hSection_Align) + HANDLE hSection; + CONST VOID* pSystemMem; + }; + D3DKMT_PTR(VOID*, pPrivateDriverData); + UINT PrivateDriverDataSize; + D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; + union + { + struct + { + UINT Primary : 1; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN8) + UINT Stereo : 1; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_2) + UINT OverridePriority : 1; + UINT Reserved : 29; +#else + UINT Reserved : 30; +#endif +#else + UINT Reserved :31; +#endif + }; + UINT Value; + } Flags; + D3DKMT_ALIGN64 D3DGPU_VIRTUAL_ADDRESS GpuVirtualAddress; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_2) + union + { + UINT Priority; + D3DKMT_ALIGN64 ULONG_PTR Unused; + }; + D3DKMT_ALIGN64 ULONG_PTR Reserved[5]; +#else + D3DKMT_ALIGN64 ULONG_PTR Reserved[6]; +#endif +} D3DDDI_ALLOCATIONINFO2; +typedef enum _D3DKMT_STANDARDALLOCATIONTYPE +{ + D3DKMT_STANDARDALLOCATIONTYPE_EXISTINGHEAP = 1, + D3DKMT_STANDARDALLOCATIONTYPE_INTERNALBACKINGSTORE = 2, + D3DKMT_STANDARDALLOCATIONTYPE_MAX, +} D3DKMT_STANDARDALLOCATIONTYPE; + +typedef struct _D3DKMT_STANDARDALLOCATION_EXISTINGHEAP +{ + D3DKMT_ALIGN64 D3DKMT_SIZE_T Size; +} D3DKMT_STANDARDALLOCATION_EXISTINGHEAP; + +typedef struct _D3DKMT_CREATESTANDARDALLOCATIONFLAGS +{ + union + { + struct + { + UINT Reserved : 32; + }; + UINT Value; + }; +} D3DKMT_CREATESTANDARDALLOCATIONFLAGS; + +typedef struct _D3DKMT_CREATESTANDARDALLOCATION +{ + D3DKMT_STANDARDALLOCATIONTYPE Type; + union + { + D3DKMT_STANDARDALLOCATION_EXISTINGHEAP ExistingHeapData; + }; + D3DKMT_CREATESTANDARDALLOCATIONFLAGS Flags; +} D3DKMT_CREATESTANDARDALLOCATION; + +typedef struct _D3DKMT_CREATEALLOCATIONFLAGS +{ + UINT CreateResource : 1; + UINT CreateShared : 1; + UINT NonSecure : 1; + UINT CreateProtected : 1; + UINT RestrictSharedAccess : 1; + UINT ExistingSysMem : 1; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN8) + UINT NtSecuritySharing : 1; + UINT ReadOnly : 1; + UINT CreateWriteCombined : 1; + UINT CreateCached : 1; + UINT SwapChainBackBuffer : 1; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM1_3) + UINT CrossAdapter : 1; + UINT OpenCrossAdapter : 1; + UINT PartialSharedCreation : 1; + UINT Zeroed : 1; + UINT WriteWatch : 1; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_3) + UINT StandardAllocation : 1; + UINT ExistingSection : 1; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_6) + UINT AllowNotZeroed : 1; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_7) + UINT PhysicallyContiguous : 1; + UINT NoKmdAccess : 1; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM3_0) + UINT SharedDisplayable : 1; + UINT Reserved : 10; +#else + UINT Reserved : 11; +#endif +#else + UINT Reserved : 13; +#endif +#else + UINT Reserved : 14; +#endif +#else + UINT Reserved : 16; +#endif +#else + UINT Reserved : 21; +#endif +#else + UINT Reserved : 26; +#endif +} D3DKMT_CREATEALLOCATIONFLAGS; + +typedef struct _D3DKMT_CREATEALLOCATION +{ + D3DKMT_HANDLE hDevice; + D3DKMT_HANDLE hResource; + D3DKMT_HANDLE hGlobalShare; + D3DKMT_PTR(_Field_size_bytes_(PrivateRuntimeDataSize) + CONST VOID*, pPrivateRuntimeData); + UINT PrivateRuntimeDataSize; + union + { + D3DKMT_CREATESTANDARDALLOCATION* pStandardAllocation; + _Field_size_bytes_(PrivateDriverDataSize) + CONST VOID* pPrivateDriverData; + D3DKMT_PTR_HELPER( AlignUnionTo64_1) + }; + UINT PrivateDriverDataSize; + UINT NumAllocations; + union + { + _Field_size_(NumAllocations) D3DDDI_ALLOCATIONINFO* pAllocationInfo; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN7) + _Field_size_(NumAllocations) D3DDDI_ALLOCATIONINFO2* pAllocationInfo2; +#endif + D3DKMT_PTR_HELPER( AlignUnionTo64_2) + }; + D3DKMT_CREATEALLOCATIONFLAGS Flags; + D3DKMT_PTR(HANDLE, hPrivateRuntimeResourceHandle); +} D3DKMT_CREATEALLOCATION, *PD3DKMT_CREATEALLOCATION; + +typedef struct _D3DKMT_WAITFORVERTICALBLANKEVENT { + D3DKMT_HANDLE hAdapter; + D3DKMT_HANDLE hDevice; + D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; +} D3DKMT_WAITFORVERTICALBLANKEVENT, *PD3DKMT_WAITFORVERTICALBLANKEVENT; + +typedef struct _D3DKMT_WAITFORSYNCHRONIZATIONOBJECT +{ + D3DKMT_HANDLE hContext; // in: Identifies the context that needs to wait. + UINT ObjectCount; // in: Specifies the number of object to wait on. + D3DKMT_HANDLE ObjectHandleArray[D3DDDI_MAX_OBJECT_WAITED_ON]; // in: Specifies the object to wait on. +} D3DKMT_WAITFORSYNCHRONIZATIONOBJECT, *PD3DKMT_WAITFORSYNCHRONIZATIONOBJECT; + +typedef struct _D3DKMT_WAITFORIDLE { + D3DKMT_HANDLE hDevice; +} D3DKMT_WAITFORIDLE, *PD3DKMT_WAITFORIDLE; + +typedef struct _D3DKMT_UPDATEOVERLAY { + D3DKMT_HANDLE hDevice; + D3DKMT_HANDLE hOverlay; + D3DDDI_KERNELOVERLAYINFO OverlayInfo; +} D3DKMT_UPDATEOVERLAY, *PD3DKMT_UPDATEOVERLAY; + +typedef struct _D3DKMT_UNLOCK { + D3DKMT_HANDLE hDevice; + UINT NumAllocations; + D3DKMT_PTR(CONST D3DKMT_HANDLE*, phAllocations); +} D3DKMT_UNLOCK, *PD3DKMT_UNLOCK; + +typedef struct _D3DKMT_SIGNALSYNCHRONIZATIONOBJECT { + D3DKMT_HANDLE hContext; + UINT ObjectCount; + D3DKMT_HANDLE ObjectHandleArray[D3DDDI_MAX_OBJECT_SIGNALED]; + D3DDDICB_SIGNALFLAGS Flags; +} D3DKMT_SIGNALSYNCHRONIZATIONOBJECT, *PD3DKMT_SIGNALSYNCHRONIZATIONOBJECT; + +typedef struct _D3DKMT_SHAREDPRIMARYUNLOCKNOTIFICATION { + LUID AdapterLuid; + D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; +} D3DKMT_SHAREDPRIMARYUNLOCKNOTIFICATION, *PD3DKMT_SHAREDPRIMARYUNLOCKNOTIFICATION; + +typedef struct _D3DKMT_SHAREDPRIMARYLOCKNOTIFICATION { + LUID AdapterLuid; + D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; + RECTL LockRect; +} D3DKMT_SHAREDPRIMARYLOCKNOTIFICATION, *PD3DKMT_SHAREDPRIMARYLOCKNOTIFICATION; + +typedef struct _D3DKMT_SETVIDPNSOURCEOWNER { + D3DKMT_HANDLE hDevice; + D3DKMT_PTR(CONST D3DKMT_VIDPNSOURCEOWNER_TYPE*, pType); + D3DKMT_PTR(CONST D3DDDI_VIDEO_PRESENT_SOURCE_ID*, pVidPnSourceId); + UINT VidPnSourceCount; +} D3DKMT_SETVIDPNSOURCEOWNER, *PD3DKMT_SETVIDPNSOURCEOWNER; + +typedef struct _D3DKMT_SETQUEUEDLIMIT { + D3DKMT_HANDLE hDevice; + D3DKMT_QUEUEDLIMIT_TYPE Type; + union { + UINT QueuedPresentLimit; + struct { + D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; + UINT QueuedPendingFlipLimit; + }; + }; +} D3DKMT_SETQUEUEDLIMIT, *PD3DKMT_SETQUEUEDLIMIT; + +typedef struct _D3DKMT_SETGAMMARAMP { + D3DKMT_HANDLE hDevice; + D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; + D3DDDI_GAMMARAMP_TYPE Type; + union { + D3DDDI_GAMMA_RAMP_RGB256x3x16 *pGammaRampRgb256x3x16; + D3DDDI_GAMMA_RAMP_DXGI_1 *pGammaRampDXGI1; + }; + UINT Size; +} D3DKMT_SETGAMMARAMP, *PD3DKMT_SETGAMMARAMP; + +typedef struct _D3DKMT_SETDISPLAYPRIVATEDRIVERFORMAT { + D3DKMT_HANDLE hDevice; + D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; + UINT PrivateDriverFormatAttribute; +} D3DKMT_SETDISPLAYPRIVATEDRIVERFORMAT, *PD3DKMT_SETDISPLAYPRIVATEDRIVERFORMAT; + +typedef struct _D3DKMT_SETDISPLAYMODE { + D3DKMT_HANDLE hDevice; + D3DKMT_HANDLE hPrimaryAllocation; + D3DDDI_VIDEO_SIGNAL_SCANLINE_ORDERING ScanLineOrdering; + D3DDDI_ROTATION DisplayOrientation; + UINT PrivateDriverFormatAttribute; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN7) + D3DKMT_SETDISPLAYMODE_FLAGS Flags; +#endif +} D3DKMT_SETDISPLAYMODE, *PD3DKMT_SETDISPLAYMODE; + +typedef struct _D3DKMT_SETCONTEXTSCHEDULINGPRIORITY { + D3DKMT_HANDLE hContext; + INT Priority; +} D3DKMT_SETCONTEXTSCHEDULINGPRIORITY, *PD3DKMT_SETCONTEXTSCHEDULINGPRIORITY; + +typedef struct _D3DKMT_SETALLOCATIONPRIORITY { + D3DKMT_HANDLE hDevice; + D3DKMT_HANDLE hResource; + D3DKMT_PTR(CONST D3DKMT_HANDLE*, phAllocationList); + UINT AllocationCount; + D3DKMT_PTR(CONST UINT*, pPriorities); +} D3DKMT_SETALLOCATIONPRIORITY, *PD3DKMT_SETALLOCATIONPRIORITY; + +typedef struct _D3DKMT_RENDER { + union + { + D3DKMT_HANDLE hDevice; + D3DKMT_HANDLE hContext; + }; + UINT CommandOffset; + UINT CommandLength; + UINT AllocationCount; + UINT PatchLocationCount; + D3DKMT_PTR(VOID*, pNewCommandBuffer); + + UINT NewCommandBufferSize; + + D3DKMT_PTR(D3DDDI_ALLOCATIONLIST*, pNewAllocationList); + + UINT NewAllocationListSize; + + D3DKMT_PTR(D3DDDI_PATCHLOCATIONLIST*, pNewPatchLocationList); + UINT NewPatchLocationListSize; + + D3DKMT_RENDERFLAGS Flags; + ULONGLONG PresentHistoryToken; + ULONG BroadcastContextCount; + + D3DKMT_HANDLE BroadcastContext[D3DDDI_MAX_BROADCAST_CONTEXT]; + + ULONG QueuedBufferCount; + D3DGPU_VIRTUAL_ADDRESS NewCommandBuffer; + D3DKMT_PTR(VOID*, pPrivateDriverData); + UINT PrivateDriverDataSize; +} D3DKMT_RENDER, *PD3DKMT_RENDER; + +typedef struct _D3DKMT_QUERYSTATISTICS { + D3DKMT_QUERYSTATISTICS_TYPE Type; + LUID AdapterLuid; + D3DKMT_PTR(HANDLE, hProcess); +//TODO: incomplete, will come up with more for this later. +} D3DKMT_QUERYSTATISTICS, *PD3DKMT_QUERYSTATISTICS; + +typedef struct _D3DKMT_QUERYRESOURCEINFO { + D3DKMT_HANDLE hDevice; + D3DKMT_PTR(HANDLE, hNtHandle); + D3DKMT_PTR(VOID*, pPrivateRuntimeData); + UINT PrivateRuntimeDataSize; + UINT TotalPrivateDriverDataSize; + UINT ResourcePrivateDriverDataSize; + UINT NumAllocations; +} D3DKMT_QUERYRESOURCEINFO, *PD3DKMT_QUERYRESOURCEINFO; + +typedef struct _D3DKMT_QUERYALLOCATIONRESIDENCY { + D3DKMT_HANDLE hDevice; + D3DKMT_HANDLE hResource; + D3DKMT_PTR(CONST D3DKMT_HANDLE*, phAllocationList); + UINT AllocationCount; + D3DKMT_PTR(D3DKMT_ALLOCATIONRESIDENCYSTATUS*, pResidencyStatus); +} D3DKMT_QUERYALLOCATIONRESIDENCY, *PD3DKMT_QUERYALLOCATIONRESIDENCY; + +typedef struct _D3DKMT_QUERYADAPTERINFO +{ + D3DKMT_HANDLE hAdapter; + KMTQUERYADAPTERINFOTYPE Type; + D3DKMT_PTR(VOID*, pPrivateDriverData); + UINT PrivateDriverDataSize; +} D3DKMT_QUERYADAPTERINFO, *PD3DKMT_QUERYADAPTERINFO; + +typedef struct _D3DKMT_PRESENT +{ + union + { + D3DKMT_HANDLE hDevice; + D3DKMT_HANDLE hContext; + }; + D3DKMT_PTR(HWND, hWindow); + D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; + D3DKMT_HANDLE hSource; + D3DKMT_HANDLE hDestination; + UINT Color; + RECT DstRect; + RECT SrcRect; + UINT SubRectCnt; + D3DKMT_PTR(CONST RECT*, pSrcSubRects); + UINT PresentCount; + D3DDDI_FLIPINTERVAL_TYPE FlipInterval; + D3DKMT_PRESENTFLAGS Flags; + ULONG BroadcastContextCount; + + D3DKMT_HANDLE BroadcastContext[D3DDDI_MAX_BROADCAST_CONTEXT]; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN7) + HANDLE PresentLimitSemaphore; + D3DKMT_PRESENTHISTORYTOKEN PresentHistoryToken; +#endif +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN8) + D3DKMT_PRESENT_RGNS* pPresentRegions; +#endif +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM1_3) + union + { + D3DKMT_HANDLE hAdapter; + D3DKMT_HANDLE hIndirectContext; + + }; + UINT Duration; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0) + D3DKMT_PTR(_Field_size_(BroadcastContextCount) + D3DKMT_HANDLE*, BroadcastSrcAllocation); + D3DKMT_PTR(_Field_size_opt_(BroadcastContextCount) + D3DKMT_HANDLE*, BroadcastDstAllocation); + UINT PrivateDriverDataSize; + D3DKMT_PTR(_Field_size_bytes_(PrivateDriverDataSize) + PVOID, pPrivateDriverData); + BOOLEAN bOptimizeForComposition; +#endif +#endif +} D3DKMT_PRESENT, *PD3DKMT_PRESENT; + +typedef struct _D3DKMT_POLLDISPLAYCHILDREN { + D3DKMT_HANDLE hAdapter; + UINT NonDestructiveOnly : 1; + UINT SynchronousPolling : 1; + UINT DisableModeReset : 1; + UINT PollAllAdapters : 1; + UINT PollInterruptible : 1; + UINT Reserved : 27; +} D3DKMT_POLLDISPLAYCHILDREN, *PD3DKMT_POLLDISPLAYCHILDREN; + + +typedef struct _D3DKMT_OPENRESOURCE +{ + D3DKMT_HANDLE hDevice; // in : Indentifies the device + D3DKMT_HANDLE hGlobalShare; // in : Shared resource handle + UINT NumAllocations; // in : Number of allocations associated with the resource + union { + D3DDDI_OPENALLOCATIONINFO* pOpenAllocationInfo; +#if (DXGKDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN7) + D3DDDI_OPENALLOCATIONINFO2* pOpenAllocationInfo2; +#endif + }; + D3DKMT_PTR(VOID*, pPrivateRuntimeData); + UINT PrivateRuntimeDataSize; + D3DKMT_PTR(VOID*, pResourcePrivateDriverData); + UINT ResourcePrivateDriverDataSize; + D3DKMT_PTR(VOID*, pTotalPrivateDriverDataBuffer); + UINT TotalPrivateDriverDataBufferSize; + D3DKMT_HANDLE hResource; +} D3DKMT_OPENRESOURCE, *PD3DKMT_OPENRESOURCE; + +typedef struct _D3DKMT_OPENADAPTERFROMHDC { + D3DKMT_PTR(HDC, hdc); + D3DKMT_HANDLE hAdapter; + LUID AdapterLuid; + D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; +} D3DKMT_OPENADAPTERFROMHDC, *PD3DKMT_OPENADAPTERFROMHDC; + +typedef struct _D3DKMT_OPENADAPTERFROMDEVICENAME { + D3DKMT_PTR(PCWSTR, pDeviceName); + D3DKMT_HANDLE hAdapter; + LUID AdapterLuid; +} D3DKMT_OPENADAPTERFROMDEVICENAME, *PD3DKMT_OPENADAPTERFROMDEVICENAME; + +typedef struct _D3DKMT_LOCK { + D3DKMT_HANDLE hDevice; + D3DKMT_HANDLE hAllocation; + UINT PrivateDriverData; + UINT NumPages; + D3DKMT_PTR(CONST UINT*, pPages); + D3DKMT_PTR(VOID*, pData); + D3DDDICB_LOCKFLAGS Flags; + D3DGPU_VIRTUAL_ADDRESS GpuVirtualAddress; +} D3DKMT_LOCK, *PD3DKMT_LOCK; + +typedef struct _D3DKMT_INVALIDATEACTIVEVIDPN { + D3DKMT_HANDLE hAdapter; + D3DKMT_PTR(VOID*, pPrivateDriverData); + UINT PrivateDriverDataSize; +} D3DKMT_INVALIDATEACTIVEVIDPN, *PD3DKMT_INVALIDATEACTIVEVIDPN; + +typedef struct _D3DKMT_GETSHAREDPRIMARYHANDLE { + D3DKMT_HANDLE hAdapter; + D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; + D3DKMT_HANDLE hSharedPrimary; +} D3DKMT_GETSHAREDPRIMARYHANDLE, *PD3DKMT_GETSHAREDPRIMARYHANDLE; + +typedef struct _D3DKMT_OPENADAPTERFROMGDIDISPLAYNAME { + WCHAR DeviceName[32]; + D3DKMT_HANDLE hAdapter; + LUID AdapterLuid; + D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; +} D3DKMT_OPENADAPTERFROMGDIDISPLAYNAME, *PD3DKMT_OPENADAPTERFROMGDIDISPLAYNAME; + +typedef struct _D3DKMT_GETSCANLINE { + D3DKMT_HANDLE hAdapter; + D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; + BOOLEAN InVerticalBlank; + UINT ScanLine; +} D3DKMT_GETSCANLINE, *PD3DKMT_GETSCANLINE; + +typedef struct _D3DKMT_GETRUNTIMEDATA { + D3DKMT_HANDLE hAdapter; + D3DKMT_HANDLE hGlobalShare; + D3DKMT_PTR(VOID*, pRuntimeData); + UINT RuntimeDataSize; +} D3DKMT_GETRUNTIMEDATA, *PD3DKMT_GETRUNTIMEDATA; + +typedef struct _D3DKMT_GETPRESENTHISTORY { + D3DKMT_HANDLE hAdapter; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN7) + UINT ProvidedSize; + UINT WrittenSize; + D3DKMT_PTR(D3DKMT_PRESENTHISTORYTOKEN*, pTokens); + UINT NumTokens; +#endif +} D3DKMT_GETPRESENTHISTORY, *PD3DKMT_GETPRESENTHISTORY; + +typedef struct _D3DKMT_GETMULTISAMPLEMETHODLIST +{ + D3DKMT_HANDLE hAdapter; + D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; + UINT Width; + UINT Height; + D3DDDIFORMAT Format; + D3DKMT_PTR(D3DKMT_MULTISAMPLEMETHOD*, pMethodList); + UINT MethodCount; +} D3DKMT_GETMULTISAMPLEMETHODLIST, *PD3DKMT_GETMULTISAMPLEMETHODLIST; + +typedef struct _D3DKMT_GETDISPLAYMODELIST +{ + D3DKMT_HANDLE hAdapter; + D3DDDI_VIDEO_PRESENT_SOURCE_ID VidPnSourceId; + D3DKMT_PTR(D3DKMT_DISPLAYMODE*, pModeList); + UINT ModeCount; +} D3DKMT_GETDISPLAYMODELIST, *PD3DKMT_GETDISPLAYMODELIST; + +typedef struct _D3DKMT_GETDEVICESTATE +{ + D3DKMT_HANDLE hDevice; + D3DKMT_DEVICESTATE_TYPE StateType; + union + { + D3DKMT_DEVICEEXECUTION_STATE ExecutionState; + D3DKMT_DEVICEPRESENT_STATE PresentState; + D3DKMT_DEVICERESET_STATE ResetState; + D3DKMT_DEVICEPRESENT_STATE_DWM PresentStateDWM; + +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0) + D3DKMT_DEVICEPAGEFAULT_STATE PageFaultState; +#endif +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_1) + D3DKMT_DEVICEPRESENT_QUEUE_STATE PresentQueueState; +#endif + }; +} D3DKMT_GETDEVICESTATE, *PD3DKMT_GETDEVICESTATE; + +typedef struct _D3DKMT_GETCONTEXTSCHEDULINGPRIORITY { + D3DKMT_HANDLE hContext; + INT Priority; +} D3DKMT_GETCONTEXTSCHEDULINGPRIORITY, *PD3DKMT_GETCONTEXTSCHEDULINGPRIORITY; + +typedef struct _D3DKMT_FLIPOVERLAY +{ + D3DKMT_HANDLE hDevice; + D3DKMT_HANDLE hOverlay; + D3DKMT_HANDLE hSource; + D3DKMT_PTR(VOID*, pPrivateDriverData); + UINT PrivateDriverDataSize; +} D3DKMT_FLIPOVERLAY, *PD3DKMT_FLIPOVERLAY; + +typedef struct _D3DKMT_ESCAPE +{ + D3DKMT_HANDLE hAdapter; + D3DKMT_HANDLE hDevice; + D3DKMT_ESCAPETYPE Type; + D3DDDI_ESCAPEFLAGS Flags; + D3DKMT_PTR(VOID*, pPrivateDriverData); + UINT PrivateDriverDataSize; + D3DKMT_HANDLE hContext; +} D3DKMT_ESCAPE, *PD3DKMT_ESCAPE; + +typedef struct _D3DKMT_DESTROYSYNCHRONIZATIONOBJECT +{ + D3DKMT_HANDLE hSyncObject; +} D3DKMT_DESTROYSYNCHRONIZATIONOBJECT, *PD3DKMT_DESTROYSYNCHRONIZATIONOBJECT; + +typedef struct _D3DKMT_DESTROYOVERLAY { + D3DKMT_HANDLE hDevice; + D3DKMT_HANDLE hOverlay; +} D3DKMT_DESTROYOVERLAY, *PD3DKMT_DESTROYOVERLAY; + +typedef struct _D3DKMT_DESTROYDEVICE { + D3DKMT_HANDLE hDevice; +} D3DKMT_DESTROYDEVICE, *PD3DKMT_DESTROYDEVICE; + +typedef struct _D3DKMT_DESTROYCONTEXT { + D3DKMT_HANDLE hContext; +} D3DKMT_DESTROYCONTEXT, *PD3DKMT_DESTROYCONTEXT; + +typedef struct _D3DKMT_DESTROYALLOCATION +{ + D3DKMT_HANDLE hDevice; + D3DKMT_HANDLE hResource; + D3DKMT_PTR(CONST D3DKMT_HANDLE*, phAllocationList); + UINT AllocationCount; +} D3DKMT_DESTROYALLOCATION, *PD3DKMT_DESTROYALLOCATION; + #ifdef __cplusplus extern "C" { diff --git a/sdk/include/psdk/d3dkmddi.h b/sdk/include/psdk/d3dkmddi.h new file mode 100644 index 0000000000000..b0f261ed3a051 --- /dev/null +++ b/sdk/include/psdk/d3dkmddi.h @@ -0,0 +1,140 @@ +#pragma once + +#include + +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; \ No newline at end of file diff --git a/sdk/include/psdk/d3dukmdt.h b/sdk/include/psdk/d3dukmdt.h index a7be710ef108a..d06f061a3384c 100644 --- a/sdk/include/psdk/d3dukmdt.h +++ b/sdk/include/psdk/d3dukmdt.h @@ -19,12 +19,82 @@ #ifndef __WINE_D3DUKMDT_H #define __WINE_D3DUKMDT_H +/* DXGKRNL targetting information */ +#define DXGKDDI_INTERFACE_VERSION_VISTA_SP1 0x1053 +#define DXGKDDI_INTERFACE_VERSION_WIN7 0x2005 +#define DXGKDDI_INTERFACE_VERSION_WIN8 0x300E +#define DXGKDDI_INTERFACE_VERSION_WDDM1_3 0x4002 +#define DXGKDDI_INTERFACE_VERSION_WDDM2_0 0x5023 +#define DXGKDDI_INTERFACE_VERSION_WDDM2_2 0x700A +#define DXGKDDI_INTERFACE_VERSION_WDDM2_3 0x8001 +#define DXGKDDI_INTERFACE_VERSION_WDDM2_4 0x9006 +#define DXGKDDI_INTERFACE_VERSION_WDDM2_5 0xA00B +#define DXGKDDI_INTERFACE_VERSION_WDDM2_6 0xB004 +#define DXGKDDI_INTERFACE_VERSION_WDDM2_7 0xC004 +#define DXGKDDI_INTERFACE_VERSION_WDDM2_8 0xD001 +#define DXGKDDI_INTERFACE_VERSION_WDDM2_9 0xE003 +#define DXGKDDI_INTERFACE_VERSION_WDDM3_0 0xF003 + +/* Isn't used in ReactOS much yet */ +#define D3D_UMD_INTERFACE_VERSION_VISTA 0x000C +#define D3D_UMD_INTERFACE_VERSION_WIN7 0x2003 +#define D3D_UMD_INTERFACE_VERSION_WDDM2_0 0x5002 + +#if !defined(DXGKDDI_INTERFACE_VERSION) +#define DXGKDDI_INTERFACE_VERSION DXGKDDI_INTERFACE_VERSION_VISTA_SP1 +#endif + +#if !defined(D3D_UMD_INTERFACE_VERSION) +#define D3D_UMD_INTERFACE_VERSION D3D_UMD_INTERFACE_VERSION_VISTA +#endif + +typedef UINT D3DKMT_HANDLE; +typedef UINT D3DDDI_VIDEO_PRESENT_SOURCE_ID; +typedef ULONGLONG D3DGPU_VIRTUAL_ADDRESS; +typedef ULONGLONG D3DGPU_SIZE_T; + +#ifdef _WIN32 +#define D3DKMT_ALIGN64 +#define D3DKMT_PTR_HELPER(Name) +#define D3DKMT_PTR(Type, Name) Type Name +#define D3DKMT_PTR_INIT(x) (x) +typedef SIZE_T D3DKMT_SIZE_T; +typedef UINT_PTR D3DKMT_UINT_PTR; +typedef ULONG_PTR D3DKMT_ULONG_PTR; +typedef HANDLE D3DKMT_PTR_TYPE; +#else +#define D3DKMT_ALIGN64 alignas(8) +#define D3DKMT_PTR_HELPER(Name) D3DKMT_ALIGN64 UINT64 Name; + +#define D3DKMT_PTR(Type, Name) \ +union D3DKMT_ALIGN64 \ +{ \ + D3DKMT_PTR_HELPER(Name##_Align) \ + Type Name; \ +} + +#define D3DKMT_PTR_INIT(x) { + (UINT64)(SIZE_T)(x) +} + +typedef UINT64 D3DKMT_SIZE_T, D3DKMT_UINT_PTR, D3DKMT_ULONG_PTR; +typedef union _D3DKMT_PTR_TYPE +{ + D3DKMT_PTR_HELPER(Ptr_Align); + HANDLE Ptr; +} D3DKMT_PTR_TYPE; +#endif + #ifndef MAKEFOURCC #define MAKEFOURCC(ch0, ch1, ch2, ch3) \ ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \ ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24)) #endif /* MAKEFOURCC */ +#define D3DDDI_MAX_OBJECT_WAITED_ON 32 +#define D3DDDI_MAX_OBJECT_SIGNALED 32 +#define D3DDDI_MAX_BROADCAST_CONTEXT 64 + typedef enum _D3DDDIFORMAT { D3DDDIFMT_UNKNOWN = 0, @@ -136,4 +206,350 @@ typedef enum _D3DDDIFORMAT D3DDDIFMT_FORCE_UINT = 0x7fffffff, } D3DDDIFORMAT; +typedef struct _D3DDDI_ESCAPEFLAGS +{ + union + { + struct + { + UINT HardwareAccess : 1; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM1_3) + UINT DeviceStatusQuery : 1; + UINT ChangeFrameLatency : 1; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0) + UINT NoAdapterSynchronization : 1; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_2) + UINT Reserved : 1; + UINT VirtualMachineData : 1; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_5) + UINT DriverKnownEscape : 1; cture + UINT DriverCommonEscape : 1; + UINT Reserved2 :24; +#else + UINT Reserved2 :26; +#endif +#else + UINT Reserved :28; +#endif +#else + UINT Reserved :29; +#endif +#else + UINT Reserved :31; +#endif + }; + UINT Value; + }; +} D3DDDI_ESCAPEFLAGS; + + +typedef struct _D3DDDICB_LOCKFLAGS { + union { + struct { + UINT ReadOnly : 1; + UINT WriteOnly : 1; + UINT DonotWait : 1; + UINT IgnoreSync : 1; + UINT LockEntire : 1; + UINT DonotEvict : 1; + UINT AcquireAperture : 1; + UINT Discard : 1; + UINT NoExistingReference : 1; + UINT UseAlternateVA : 1; + UINT IgnoreReadSync : 1; + UINT Reserved : 21; + }; + UINT Value; + }; +} D3DDDICB_LOCKFLAGS; + +typedef enum _D3DDDI_GAMMARAMP_TYPE +{ + D3DDDI_GAMMARAMP_UNINITIALIZED = 0, + D3DDDI_GAMMARAMP_DEFAULT = 1, + D3DDDI_GAMMARAMP_RGB256x3x16 = 2, + D3DDDI_GAMMARAMP_DXGI_1 = 3, +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_3) + D3DDDI_GAMMARAMP_MATRIX_3x4 = 4, +#endif +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_6) + D3DDDI_GAMMARAMP_MATRIX_V2 = 5, +#endif +} D3DDDI_GAMMARAMP_TYPE; + + +typedef enum D3DDDI_FLIPINTERVAL_TYPE +{ + D3DDDI_FLIPINTERVAL_IMMEDIATE = 0, + D3DDDI_FLIPINTERVAL_ONE = 1, + D3DDDI_FLIPINTERVAL_TWO = 2, + D3DDDI_FLIPINTERVAL_THREE = 3, + D3DDDI_FLIPINTERVAL_FOUR = 4, + + // This value is only valid for the D3D9 runtime PresentCb SyncIntervalOverride field. + // For this field, IMMEDIATE means the API semantic of sync interval 0, where + // IMMEDIATE_ALLOW_TEARING is equivalent to the addition of the DXGI ALLOW_TEARING API flags. + D3DDDI_FLIPINTERVAL_IMMEDIATE_ALLOW_TEARING = 5, +} D3DDDI_FLIPINTERVAL_TYPE; + +typedef struct _D3DKMT_PRESENTFLAGS +{ + union + { + struct + { + UINT Blt : 1; + UINT ColorFill : 1; + UINT Flip : 1; + UINT FlipDoNotFlip : 1; + UINT FlipDoNotWait : 1; + UINT FlipRestart : 1; + UINT DstRectValid : 1; + UINT SrcRectValid : 1; + UINT RestrictVidPnSource : 1; + UINT SrcColorKey : 1; + UINT DstColorKey : 1; + UINT LinearToSrgb : 1; + UINT PresentCountValid : 1; + UINT Rotate : 1; + UINT PresentToBitmap : 1; + UINT RedirectedFlip : 1; + UINT RedirectedBlt : 1; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN8) + UINT FlipStereo : 1; + UINT FlipStereoTemporaryMono : 1; + UINT FlipStereoPreferRight : 1; + UINT BltStereoUseRight : 1; + UINT PresentHistoryTokenOnly : 1; + UINT PresentRegionsValid : 1; + UINT PresentDDA : 1; + UINT ProtectedContentBlankedOut : 1; + UINT RemoteSession : 1; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM1_3) + UINT CrossAdapter : 1; + UINT DurationValid : 1; + UINT PresentIndirect : 1; + UINT PresentHMD : 1; + UINT Reserved : 2; +#else + UINT Reserved : 6; +#endif +#else + UINT Reserved : 15; +#endif + }; + UINT Value; + }; +} D3DKMT_PRESENTFLAGS; + +typedef enum _D3DDDI_SYNCHRONIZATIONOBJECT_TYPE { + D3DDDI_SYNCHRONIZATION_MUTEX, + D3DDDI_SEMAPHORE, + D3DDDI_FENCE, + D3DDDI_CPU_NOTIFICATION, + D3DDDI_MONITORED_FENCE, + D3DDDI_PERIODIC_MONITORED_FENCE, + D3DDDI_NATIVE_FENCE, + D3DDDI_SYNCHRONIZATION_TYPE_LIMIT +} D3DDDI_SYNCHRONIZATIONOBJECT_TYPE; + +typedef enum _D3DDDI_VIDEO_SIGNAL_SCANLINE_ORDERING { + D3DDDI_VSSLO_UNINITIALIZED, + D3DDDI_VSSLO_PROGRESSIVE, + D3DDDI_VSSLO_INTERLACED_UPPERFIELDFIRST, + D3DDDI_VSSLO_INTERLACED_LOWERFIELDFIRST, + D3DDDI_VSSLO_OTHER +} D3DDDI_VIDEO_SIGNAL_SCANLINE_ORDERING; + +typedef struct _D3DKMT_SETDISPLAYMODE_FLAGS { + BOOLEAN PreserveVidPn : 1; + UINT Reserved : 31; +} D3DKMT_SETDISPLAYMODE_FLAGS; + +typedef struct _D3DDDI_GAMMA_RAMP_RGB256x3x16 +{ + USHORT Red[256]; + USHORT Green[256]; + USHORT Blue[256]; +} D3DDDI_GAMMA_RAMP_RGB256x3x16; + +typedef struct D3DDDI_DXGI_RGB +{ + float Red; + float Green; + float Blue; +} D3DDDI_DXGI_RGB; + +typedef struct _D3DDDI_GAMMA_RAMP_DXGI_1 +{ + D3DDDI_DXGI_RGB Scale; + D3DDDI_DXGI_RGB Offset; + D3DDDI_DXGI_RGB GammaCurve[1025]; +} D3DDDI_GAMMA_RAMP_DXGI_1; + +typedef struct _D3DDDI_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; + }; +} D3DDDI_SEGMENTPREFERENCE, DXGK_SEGMENTPREFERENCE, *PD3DDDI_SEGMENTPREFERENCE; + +typedef struct _D3DDDIRECT +{ + LONG left; + LONG top; + LONG right; + LONG bottom; +} D3DDDIRECT; + +typedef struct _D3DDDI_KERNELOVERLAYINFO +{ + D3DKMT_HANDLE hAllocation; // in: Allocation to be displayed + D3DDDIRECT DstRect; // in: Dest rect + D3DDDIRECT SrcRect; // in: Source rect + D3DKMT_PTR(VOID*, pPrivateDriverData); // in: Private driver data + UINT PrivateDriverDataSize; // in: Size of private driver data +} D3DDDI_KERNELOVERLAYINFO; + +typedef struct _D3DDDICB_SIGNALFLAGS +{ + union + { + struct + { + UINT SignalAtSubmission : 1; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN8) + UINT EnqueueCpuEvent : 1; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0) + UINT AllowFenceRewind : 1; + UINT Reserved : 28; + UINT DXGK_SIGNAL_FLAG_INTERNAL0 : 1; +#else + UINT Reserved : 30; +#endif +#else + UINT Reserved : 31; +#endif + }; + UINT Value; + }; +} D3DDDICB_SIGNALFLAGS; + +typedef struct _D3DDDI_OPENALLOCATIONINFO +{ + D3DKMT_HANDLE hAllocation; + D3DKMT_PTR(CONST VOID*, pPrivateDriverData); + UINT PrivateDriverDataSize; + +} D3DDDI_OPENALLOCATIONINFO; + +typedef struct _D3DDDI_RATIONAL +{ + UINT Numerator; + UINT Denominator; +} D3DDDI_RATIONAL; +typedef enum _D3DDDI_ROTATION +{ + D3DDDI_ROTATION_IDENTITY = 1, + D3DDDI_ROTATION_90 = 2, + D3DDDI_ROTATION_180 = 3, + D3DDDI_ROTATION_270 = 4 +} D3DDDI_ROTATION; + +typedef struct _D3DDDI_CREATECONTEXTFLAGS +{ + union + { + struct + { + UINT NullRendering : 1; + UINT InitialData : 1; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_0) + UINT DisableGpuTimeout : 1; + UINT SynchronizationOnly : 1; +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_3) + UINT HwQueueSupported : 1; + UINT NoKmdAccess : 1; + UINT Reserved :26; +#else + UINT Reserved :28; +#endif + +#else + UINT Reserved :30; +#endif + }; + UINT Value; + }; +} D3DDDI_CREATECONTEXTFLAGS; + +typedef struct _D3DDDI_ALLOCATIONLIST +{ + D3DKMT_HANDLE hAllocation; + union + { + struct + { + UINT WriteOperation : 1; + UINT DoNotRetireInstance : 1; + +#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WIN8) + UINT OfferPriority : 3; + UINT Reserved :27; +#else + UINT Reserved :30; +#endif + }; + UINT Value; + }; +} D3DDDI_ALLOCATIONLIST; + +typedef struct _D3DDDI_PATCHLOCATIONLIST +{ + UINT AllocationIndex; + union + { + struct + { + UINT SlotId : 24; + UINT Reserved : 8; + }; + UINT Value; + }; + UINT DriverId; + UINT AllocationOffset; + UINT PatchOffset; + UINT SplitOffset; +} D3DDDI_PATCHLOCATIONLIST; + +typedef struct _D3DDDI_SYNCHRONIZATIONOBJECTINFO { + D3DDDI_SYNCHRONIZATIONOBJECT_TYPE Type; + union { + struct { + BOOL InitialState; + } SynchronizationMutex; + struct { + UINT MaxCount; + UINT InitialCount; + } Semaphore; + struct { + UINT Reserved[16]; + } Reserved; + }; +} D3DDDI_SYNCHRONIZATIONOBJECTINFO; #endif /* __WINE_D3DUKMDT_H */ diff --git a/sdk/include/psdk/ntgdi.h b/sdk/include/psdk/ntgdi.h index 1087e8cc42e41..9c699be362880 100644 --- a/sdk/include/psdk/ntgdi.h +++ b/sdk/include/psdk/ntgdi.h @@ -3923,4 +3923,339 @@ NtGdiGetCurrentDpiInfo( #endif /* PRIVATE_DWM_INTERFACE */ +/* ReactOS Display Driver Model */ + +__kernel_entry +W32KAPI +BOOLEAN +APIENTRY +NtGdiDdDDICheckExclusiveOwnership(VOID); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDICreateAllocation(_Inout_ PD3DKMT_CREATEALLOCATION unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDICheckMonitorPowerState(_In_ PD3DKMT_CHECKMONITORPOWERSTATE unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDICheckOcclusion(_In_ PD3DKMT_CHECKOCCLUSION unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDICloseAdapter(_In_ PD3DKMT_CLOSEADAPTER unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +WINAPI +NtGdiDdDDICreateContext(_Inout_ PD3DKMT_CREATECONTEXT unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDICreateDevice(_Inout_ PD3DKMT_CREATEDEVICE unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDICreateOverlay(_Inout_ PD3DKMT_CREATEOVERLAY unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDICreateSynchronizationObject(_Inout_ PD3DKMT_CREATESYNCHRONIZATIONOBJECT unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIWaitForVerticalBlankEvent(_In_ PD3DKMT_WAITFORVERTICALBLANKEVENT unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIWaitForIdle(_In_ PD3DKMT_WAITFORIDLE unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIUpdateOverlay(_In_ PD3DKMT_UPDATEOVERLAY unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +WINAPI +NtGdiDdDDIUnlock(_In_ PD3DKMT_UNLOCK unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIDestroyAllocation(_In_ PD3DKMT_DESTROYALLOCATION unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIDestroyContext(_In_ PD3DKMT_DESTROYCONTEXT unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIDestroyDevice(_In_ PD3DKMT_DESTROYDEVICE unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIDestroyOverlay(_In_ PD3DKMT_DESTROYOVERLAY unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIDestroySynchronizationObject(_In_ PD3DKMT_DESTROYSYNCHRONIZATIONOBJECT unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIEscape(_In_ PD3DKMT_ESCAPE unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIFlipOverlay(_In_ PD3DKMT_FLIPOVERLAY unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIGetContextSchedulingPriority(_Inout_ PD3DKMT_GETCONTEXTSCHEDULINGPRIORITY unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIGetDeviceState(_Inout_ PD3DKMT_GETDEVICESTATE unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIGetDisplayModeList(_Inout_ PD3DKMT_GETDISPLAYMODELIST unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIGetMultisampleMethodList(_Inout_ PD3DKMT_GETMULTISAMPLEMETHODLIST unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIGetPresentHistory(_Inout_ PD3DKMT_GETPRESENTHISTORY unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIGetProcessSchedulingPriorityClass(_In_ HANDLE unnamedParam1, + _Out_ D3DKMT_SCHEDULINGPRIORITYCLASS *unnamedParam2); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIGetRuntimeData(_In_ PD3DKMT_GETRUNTIMEDATA unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIGetScanLine(_In_ PD3DKMT_GETSCANLINE unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIGetSharedPrimaryHandle(_Inout_ PD3DKMT_GETSHAREDPRIMARYHANDLE unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIInvalidateActiveVidPn(_In_ PD3DKMT_INVALIDATEACTIVEVIDPN unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDILock(_Inout_ PD3DKMT_LOCK unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIOpenAdapterFromDeviceName(_Inout_ PD3DKMT_OPENADAPTERFROMDEVICENAME unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIOpenAdapterFromGdiDisplayName(_Inout_ PD3DKMT_OPENADAPTERFROMGDIDISPLAYNAME unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIOpenAdapterFromHdc(_Inout_ PD3DKMT_OPENADAPTERFROMHDC unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIOpenResource(_Inout_ PD3DKMT_OPENRESOURCE unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIPollDisplayChildren(_In_ PD3DKMT_POLLDISPLAYCHILDREN unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIPresent(_In_ PD3DKMT_PRESENT unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIQueryAdapterInfo(_Inout_ PD3DKMT_QUERYADAPTERINFO unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIQueryAllocationResidency(_In_ PD3DKMT_QUERYALLOCATIONRESIDENCY unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIQueryResourceInfo(_Inout_ PD3DKMT_QUERYRESOURCEINFO unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIQueryStatistics(_Inout_ PD3DKMT_QUERYSTATISTICS unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIReleaseProcessVidPnSourceOwners(_In_ HANDLE unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIRender(_In_ PD3DKMT_RENDER unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDISetAllocationPriority(_In_ PD3DKMT_SETALLOCATIONPRIORITY unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDISetContextSchedulingPriority(_In_ PD3DKMT_SETCONTEXTSCHEDULINGPRIORITY unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDISetDisplayMode(_In_ PD3DKMT_SETDISPLAYMODE unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDISetDisplayPrivateDriverFormat(_In_ PD3DKMT_SETDISPLAYPRIVATEDRIVERFORMAT unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDISetGammaRamp(_In_ PD3DKMT_SETGAMMARAMP unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDISetProcessSchedulingPriorityClass( + _In_ HANDLE unnamedParam1, + _In_ D3DKMT_SCHEDULINGPRIORITYCLASS *unnamedParam2); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDISetQueuedLimit(_Inout_ PD3DKMT_SETQUEUEDLIMIT unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDISetVidPnSourceOwner(_In_ PD3DKMT_SETVIDPNSOURCEOWNER unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDISharedPrimaryLockNotification(_In_ PD3DKMT_SHAREDPRIMARYLOCKNOTIFICATION unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDISharedPrimaryUnLockNotification(_In_ PD3DKMT_SHAREDPRIMARYUNLOCKNOTIFICATION unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDISignalSynchronizationObject(_In_ PD3DKMT_SIGNALSYNCHRONIZATIONOBJECT unnamedParam1); + +__kernel_entry +W32KAPI +NTSTATUS +APIENTRY +NtGdiDdDDIWaitForSynchronizationObject(_In_ PD3DKMT_WAITFORSYNCHRONIZATIONOBJECT unnamedParam1); + #endif /* _NTGDI_ */ diff --git a/sdk/include/reactos/drivers/wddm/dxgkinterface.h b/sdk/include/reactos/drivers/wddm/dxgkinterface.h new file mode 100644 index 0000000000000..2167e59ff9fb2 --- /dev/null +++ b/sdk/include/reactos/drivers/wddm/dxgkinterface.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_ PD3DKMT_CREATEALLOCATION unnamedParam1); + +typedef DXGADAPTER_CREATEALLOCATION *PDXGADAPTER_CREATEALLOCATION; + +typedef +NTSTATUS +DXGADAPTER_CHECKMONITORPOWERSTATE(_In_ PD3DKMT_CHECKMONITORPOWERSTATE unnamedParam1); + +typedef DXGADAPTER_CHECKMONITORPOWERSTATE *PDXGADAPTER_CHECKMONITORPOWERSTATE; + +typedef +NTSTATUS +DXGADAPTER_CHECKOCCLUSION(_In_ PD3DKMT_CHECKOCCLUSION unnamedParam1); + +typedef DXGADAPTER_CHECKOCCLUSION *PDXGADAPTER_CHECKOCCLUSION; + +typedef +NTSTATUS +DXGADAPTER_CLOSEADAPTER(_In_ PD3DKMT_CLOSEADAPTER unnamedParam1); + +typedef DXGADAPTER_CLOSEADAPTER *PDXGADAPTER_CLOSEADAPTER; + +typedef +NTSTATUS +DXGADAPTER_CREATECONTEXT(_Inout_ PD3DKMT_CREATECONTEXT unnamedParam1); + +typedef DXGADAPTER_CREATECONTEXT *PDXGADAPTER_CREATECONTEXT; + +typedef +NTSTATUS +DXGADAPTER_CREATEDEVICE(_Inout_ PD3DKMT_CREATEDEVICE unnamedParam1); + +typedef DXGADAPTER_CREATEDEVICE *PDXGADAPTER_CREATEDEVICE; + +typedef +NTSTATUS +DXGADAPTER_CREATEOVERLAY(_Inout_ PD3DKMT_CREATEOVERLAY unnamedParam1); + +typedef DXGADAPTER_CREATEOVERLAY *PDXGADAPTER_CREATEOVERLAY; + +typedef +NTSTATUS +DXGADAPTER_CREATESYNCHRONIZATIONOBJECT(_Inout_ PD3DKMT_CREATESYNCHRONIZATIONOBJECT unnamedParam1); + +typedef DXGADAPTER_CREATESYNCHRONIZATIONOBJECT *PDXGADAPTER_CREATESYNCHRONIZATIONOBJECT; + +typedef +NTSTATUS +DXGADAPTER_DESTROYALLOCATION(_In_ PD3DKMT_DESTROYALLOCATION unnamedParam1); + +typedef DXGADAPTER_DESTROYALLOCATION *PDXGADAPTER_DESTROYALLOCATION; + +typedef +NTSTATUS +DXGADAPTER_DESTROYCONTEXT(_In_ PD3DKMT_DESTROYCONTEXT unnamedParam1); + +typedef DXGADAPTER_DESTROYCONTEXT *PDXGADAPTER_DESTROYCONTEXT; + +typedef +NTSTATUS +DXGADAPTER_DESTROYDEVICE(_In_ PD3DKMT_DESTROYDEVICE unnamedParam1); + +typedef DXGADAPTER_DESTROYDEVICE *PDXGADAPTER_DESTROYDEVICE; + +typedef +NTSTATUS +DXGADAPTER_DESTROYOVERLAY(_In_ PD3DKMT_DESTROYOVERLAY unnamedParam1); + +typedef DXGADAPTER_DESTROYOVERLAY *PDXGADAPTER_DESTROYOVERLAY; + +typedef +NTSTATUS +DXGADAPTER_DESTROYSYNCHRONIZATIONOBJECT(_In_ PD3DKMT_DESTROYSYNCHRONIZATIONOBJECT unnamedParam1); + +typedef DXGADAPTER_DESTROYSYNCHRONIZATIONOBJECT *PDXGADAPTER_DESTROYSYNCHRONIZATIONOBJECT; + +typedef +NTSTATUS +DXGADAPTER_ESCAPE(_In_ PD3DKMT_ESCAPE unnamedParam1); + +typedef DXGADAPTER_ESCAPE *PDXGADAPTER_ESCAPE; + +typedef +NTSTATUS +DXGADAPTER_FLIPOVERLAY(_In_ PD3DKMT_FLIPOVERLAY unnamedParam1); + +typedef DXGADAPTER_FLIPOVERLAY *PDXGADAPTER_FLIPOVERLAY; + +typedef +NTSTATUS +DXGADAPTER_GETCONTEXTSCHEDULINGPRIORITY(_Inout_ PD3DKMT_GETCONTEXTSCHEDULINGPRIORITY unnamedParam1); + +typedef DXGADAPTER_GETCONTEXTSCHEDULINGPRIORITY *PDXGADAPTER_GETCONTEXTSCHEDULINGPRIORITY; + +typedef +NTSTATUS +DXGADAPTER_GETDEVICESTATE(_Inout_ PD3DKMT_GETDEVICESTATE unnamedParam1); + +typedef DXGADAPTER_GETDEVICESTATE *PDXGADAPTER_GETDEVICESTATE; + +typedef +NTSTATUS +DXGADAPTER_GETDISPLAYMODELIST(_Inout_ PD3DKMT_GETDISPLAYMODELIST unnamedParam1); + +typedef DXGADAPTER_GETDISPLAYMODELIST *PDXGADAPTER_GETDISPLAYMODELIST; + +typedef +NTSTATUS +DXGADAPTER_GETMULTISAMPLEMETHODLIST(_Inout_ PD3DKMT_GETMULTISAMPLEMETHODLIST unnamedParam1); + +typedef DXGADAPTER_GETMULTISAMPLEMETHODLIST *PDXGADAPTER_GETMULTISAMPLEMETHODLIST; + +typedef +NTSTATUS +DXGADAPTER_GETRUNTIMEDATA(_Inout_ PD3DKMT_GETRUNTIMEDATA unnamedParam1); + +typedef DXGADAPTER_GETRUNTIMEDATA *PDXGADAPTER_GETRUNTIMEDATA; + +typedef +NTSTATUS +DXGADAPTER_GETSCANLINE(_Inout_ PD3DKMT_GETSCANLINE unnamedParam1); + +typedef DXGADAPTER_GETSCANLINE *PDXGADAPTER_GETSCANLINE; + +typedef +NTSTATUS +DXGADAPTER_SIGNALSYNCHRONIZATIONOBJECT(_In_ PD3DKMT_SIGNALSYNCHRONIZATIONOBJECT unnamedParam1); + +typedef DXGADAPTER_SIGNALSYNCHRONIZATIONOBJECT *PDXGADAPTER_SIGNALSYNCHRONIZATIONOBJECT; + +typedef +NTSTATUS +DXGADAPTER_WAITFORVERTICALBLANKEVENT(_In_ PD3DKMT_WAITFORVERTICALBLANKEVENT unnamedParam1); + +typedef DXGADAPTER_WAITFORVERTICALBLANKEVENT *PDXGADAPTER_WAITFORVERTICALBLANKEVENT; + +typedef +NTSTATUS +DXGADAPTER_WAITFORSYNCHRONIZATIONOBJECT(_In_ PD3DKMT_WAITFORSYNCHRONIZATIONOBJECT unnamedParam1); + +typedef DXGADAPTER_WAITFORSYNCHRONIZATIONOBJECT *PDXGADAPTER_WAITFORSYNCHRONIZATIONOBJECT; + +typedef +NTSTATUS +DXGADAPTER_SETVIDPNSOURCEOWNER(_In_ PD3DKMT_SETVIDPNSOURCEOWNER unnamedParam1); + +typedef DXGADAPTER_SETVIDPNSOURCEOWNER *PDXGADAPTER_SETVIDPNSOURCEOWNER; + +typedef +NTSTATUS +DXGADAPTER_WAITFORIDLE(_In_ PD3DKMT_WAITFORIDLE unnamedParam1); + +typedef DXGADAPTER_WAITFORIDLE *PDXGADAPTER_WAITFORIDLE; + +typedef +NTSTATUS +DXGADAPTER_UPDATEOVERLAY(_In_ PD3DKMT_UPDATEOVERLAY unnamedParam1); + +typedef DXGADAPTER_UPDATEOVERLAY *PDXGADAPTER_UPDATEOVERLAY; + +typedef +NTSTATUS +DXGADAPTER_SETQUEUEDLIMIT(_In_ PD3DKMT_SETQUEUEDLIMIT unnamedParam1); + +typedef DXGADAPTER_SETQUEUEDLIMIT *PDXGADAPTER_SETQUEUEDLIMIT; + +typedef +NTSTATUS +DXGADAPTER_SETGAMMARAMP(_In_ PD3DKMT_SETGAMMARAMP unnamedParam1); + +typedef DXGADAPTER_SETGAMMARAMP *PDXGADAPTER_SETGAMMARAMP; + +typedef +NTSTATUS +DXGADAPTER_SETDISPLAYMODE(_In_ PD3DKMT_SETDISPLAYMODE unnamedParam1); + +typedef DXGADAPTER_SETDISPLAYMODE *PDXGADAPTER_SETDISPLAYMODE; + +typedef +NTSTATUS +DXGADAPTER_SETDISPLAYPRIVATEDRIVERFORMAT(_In_ PD3DKMT_SETDISPLAYPRIVATEDRIVERFORMAT unnamedParam1); + +typedef DXGADAPTER_SETDISPLAYPRIVATEDRIVERFORMAT *PDXGADAPTER_SETDISPLAYPRIVATEDRIVERFORMAT; + + +typedef +NTSTATUS +DXGADAPTER_SETGAMMARAMP(_In_ PD3DKMT_SETGAMMARAMP unnamedParam1); + +typedef DXGADAPTER_SETGAMMARAMP *PDXGADAPTER_SETGAMMARAMP; + +typedef +NTSTATUS +DXGADAPTER_SETQUEUEDLIMIT(_In_ PD3DKMT_SETQUEUEDLIMIT unnamedParam1); + +typedef DXGADAPTER_SETQUEUEDLIMIT *PDXGADAPTER_SETQUEUEDLIMIT; + +typedef +NTSTATUS +DXGADAPTER_SETVIDPNSOURCEOWNER(_In_ PD3DKMT_SETVIDPNSOURCEOWNER unnamedParam1); + +typedef DXGADAPTER_SETVIDPNSOURCEOWNER *PDXGADAPTER_SETVIDPNSOURCEOWNER; + +typedef +NTSTATUS +DXGADAPTER_UNLOCK(_In_ PD3DKMT_UNLOCK unnamedParam1); + +typedef DXGADAPTER_UNLOCK *PDXGADAPTER_UNLOCK; + +typedef +NTSTATUS +DXGADAPTER_UPDATEOVERLAY(_In_ PD3DKMT_UPDATEOVERLAY unnamedParam1); + +typedef DXGADAPTER_UPDATEOVERLAY *PDXGADAPTER_UPDATEOVERLAY; + +typedef +NTSTATUS +DXGADAPTER_WAITFORIDLE(_In_ PD3DKMT_WAITFORIDLE unnamedParam1); + +typedef DXGADAPTER_WAITFORIDLE *PDXGADAPTER_WAITFORIDLE; + +typedef +NTSTATUS +DXGADAPTER_WAITFORSYNCHRONIZATIONOBJECT(_In_ PD3DKMT_WAITFORSYNCHRONIZATIONOBJECT unnamedParam1); + +typedef DXGADAPTER_WAITFORSYNCHRONIZATIONOBJECT *PDXGADAPTER_WAITFORSYNCHRONIZATIONOBJECT; + +typedef +NTSTATUS +DXGADAPTER_WAITFORVERTICALBLANKEVENT(_In_ PD3DKMT_WAITFORVERTICALBLANKEVENT unnamedParam1); + +typedef DXGADAPTER_WAITFORVERTICALBLANKEVENT *PDXGADAPTER_WAITFORVERTICALBLANKEVENT; + +typedef +NTSTATUS +DXGADAPTER_SIGNALSYNCHRONIZATIONOBJECT(_In_ PD3DKMT_SIGNALSYNCHRONIZATIONOBJECT unnamedParam1); + +typedef DXGADAPTER_SIGNALSYNCHRONIZATIONOBJECT *PDXGADAPTER_SIGNALSYNCHRONIZATIONOBJECT; + +typedef +NTSTATUS +DXGADAPTER_QUERYRESOURCEINFO(_Inout_ PD3DKMT_QUERYRESOURCEINFO unnamedParam1); + +typedef DXGADAPTER_QUERYRESOURCEINFO *PDXGADAPTER_QUERYRESOURCEINFO; + +typedef +NTSTATUS +DXGADAPTER_GETPRESENTHISTORY(_Inout_ PD3DKMT_GETPRESENTHISTORY unnamedParam1); + +typedef DXGADAPTER_GETPRESENTHISTORY *PDXGADAPTER_GETPRESENTHISTORY; + +typedef +NTSTATUS +DXGADAPTER_SETALLOCATIONPRIORITY(_In_ PD3DKMT_SETALLOCATIONPRIORITY unnamedParam1); + +typedef DXGADAPTER_SETALLOCATIONPRIORITY *PDXGADAPTER_SETALLOCATIONPRIORITY; + +typedef +NTSTATUS +DXGADAPTER_INVALIDATEACTIVEVIDPN(_In_ PD3DKMT_INVALIDATEACTIVEVIDPN unnamedParam1); + +typedef DXGADAPTER_INVALIDATEACTIVEVIDPN *PDXGADAPTER_INVALIDATEACTIVEVIDPN; + +typedef +NTSTATUS +DXGADAPTER_GETSHAREDPRIMARYHANDLE(_In_ PD3DKMT_GETSHAREDPRIMARYHANDLE unnamedParam1); + +typedef DXGADAPTER_GETSHAREDPRIMARYHANDLE *PDXGADAPTER_GETSHAREDPRIMARYHANDLE; + +typedef +NTSTATUS +DXGADAPTER_LOCK(_In_ PD3DKMT_LOCK unnamedParam1); + +typedef DXGADAPTER_LOCK *PDXGADAPTER_LOCK; + +typedef +NTSTATUS +DXGADAPTER_POLLDISPLAYCHILDREN(_In_ PD3DKMT_POLLDISPLAYCHILDREN unnamedParam1); + +typedef DXGADAPTER_POLLDISPLAYCHILDREN *PDXGADAPTER_POLLDISPLAYCHILDREN; + +typedef +NTSTATUS +DXGADAPTER_OPENRESOURCE(_Inout_ PD3DKMT_OPENRESOURCE unnamedParam1); + +typedef DXGADAPTER_OPENRESOURCE *PDXGADAPTER_OPENRESOURCE; + +typedef +NTSTATUS +DXGADAPTER_PRESENT(_In_ PD3DKMT_PRESENT unnamedParam1); + +typedef DXGADAPTER_PRESENT *PDXGADAPTER_PRESENT; + +typedef +NTSTATUS +DXGADAPTER_QUERYADAPTERINFO(_Inout_ PD3DKMT_QUERYADAPTERINFO unnamedParam1); + +typedef DXGADAPTER_QUERYADAPTERINFO *PDXGADAPTER_QUERYADAPTERINFO; + +typedef +NTSTATUS +DXGADAPTER_QUERYALLOCATIONRESIDENCY(_In_ PD3DKMT_QUERYALLOCATIONRESIDENCY unnamedParam1); + +typedef DXGADAPTER_QUERYALLOCATIONRESIDENCY *PDXGADAPTER_QUERYALLOCATIONRESIDENCY; + +typedef +NTSTATUS +DXGADAPTER_QUERYSTATISTICS(_Inout_ PD3DKMT_QUERYSTATISTICS unnamedParam1); + +typedef DXGADAPTER_QUERYSTATISTICS *PDXGADAPTER_QUERYSTATISTICS; + +typedef +NTSTATUS +DXGADAPTER_RELEASEPROCESSVIDPNSOURCEOWNERS(_In_ HANDLE unnamedParam1); + +typedef DXGADAPTER_RELEASEPROCESSVIDPNSOURCEOWNERS *PDXGADAPTER_RELEASEPROCESSVIDPNSOURCEOWNERS; + +typedef +NTSTATUS +DXGADAPTER_RENDER(_In_ PD3DKMT_RENDER unnamedParam1); + +typedef DXGADAPTER_RENDER *PDXGADAPTER_RENDER; + +typedef +NTSTATUS +DXGADAPTER_SETCONTEXTSCHEDULINGPRIORITY(_In_ PD3DKMT_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..266c6bdc94ca0 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) + +@ 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..da1bbaff799fc 100644 --- a/win32ss/gdi/gdi32_vista/CMakeLists.txt +++ b/win32ss/gdi/gdi32_vista/CMakeLists.txt @@ -6,13 +6,19 @@ 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} gdi32_vista.rc ${CMAKE_CURRENT_BINARY_DIR}/gdi32_vista.def) +add_library(gdi32_vista_static + ${SOURCE}) +target_link_libraries(gdi32_vista_static win32ksys) +add_dependencies(gdi32_vista_static psdk) + set_module_type(gdi32_vista win32dll UNICODE ENTRYPOINT 0) target_link_libraries(gdi32_vista win32ksys) diff --git a/win32ss/gdi/gdi32_vista/d3dkmt.c b/win32ss/gdi/gdi32_vista/d3dkmt.c new file mode 100644 index 0000000000000..85afd20bcb1d0 --- /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_ PD3DKMT_CREATEALLOCATION unnamedParam1) +{ + return NtGdiDdDDICreateAllocation(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTCheckMonitorPowerState(_In_ PD3DKMT_CHECKMONITORPOWERSTATE unnamedParam1) +{ + return NtGdiDdDDICheckMonitorPowerState(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTCheckOcclusion(_In_ PD3DKMT_CHECKOCCLUSION unnamedParam1) +{ + return NtGdiDdDDICheckOcclusion(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTCloseAdapter(_In_ PD3DKMT_CLOSEADAPTER unnamedParam1) +{ + return NtGdiDdDDICloseAdapter(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTCreateContext(_Inout_ PD3DKMT_CREATECONTEXT unnamedParam1) +{ + return NtGdiDdDDICreateContext(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTCreateDevice(_Inout_ PD3DKMT_CREATEDEVICE unnamedParam1) +{ + return NtGdiDdDDICreateDevice(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTCreateOverlay(_Inout_ PD3DKMT_CREATEOVERLAY unnamedParam1) +{ + return NtGdiDdDDICreateOverlay(unnamedParam1); +} + +BOOLEAN +WINAPI +D3DKMTCheckExclusiveOwnership(VOID) +{ + return NtGdiDdDDICheckExclusiveOwnership(); +} + +NTSTATUS +WINAPI +D3DKMTCreateSynchronizationObject(_Inout_ PD3DKMT_CREATESYNCHRONIZATIONOBJECT unnamedParam1) +{ + return NtGdiDdDDICreateSynchronizationObject(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTDestroyAllocation(_In_ PD3DKMT_DESTROYALLOCATION unnamedParam1) +{ + return NtGdiDdDDIDestroyAllocation(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTDestroyContext(_In_ PD3DKMT_DESTROYCONTEXT unnamedParam1) +{ + return NtGdiDdDDIDestroyContext(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTDestroyDevice(_In_ PD3DKMT_DESTROYDEVICE unnamedParam1) +{ + return NtGdiDdDDIDestroyDevice(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTDestroyOverlay(_In_ PD3DKMT_DESTROYOVERLAY unnamedParam1) +{ + return NtGdiDdDDIDestroyOverlay(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTDestroySynchronizationObject(_In_ PD3DKMT_DESTROYSYNCHRONIZATIONOBJECT unnamedParam1) +{ + return NtGdiDdDDIDestroySynchronizationObject(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTEscape(_In_ PD3DKMT_ESCAPE unnamedParam1) +{ + return NtGdiDdDDIEscape(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTFlipOverlay(_In_ PD3DKMT_FLIPOVERLAY unnamedParam1) +{ + return NtGdiDdDDIFlipOverlay(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTGetContextSchedulingPriority(_Inout_ PD3DKMT_GETCONTEXTSCHEDULINGPRIORITY unnamedParam1) +{ + return NtGdiDdDDIGetContextSchedulingPriority(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTGetDeviceState(_Inout_ PD3DKMT_GETDEVICESTATE unnamedParam1) +{ + return NtGdiDdDDIGetDeviceState(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTGetDisplayModeList(_Inout_ PD3DKMT_GETDISPLAYMODELIST unnamedParam1) +{ + return NtGdiDdDDIGetDisplayModeList(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTGetMultisampleMethodList(_Inout_ PD3DKMT_GETMULTISAMPLEMETHODLIST unnamedParam1) +{ + return NtGdiDdDDIGetMultisampleMethodList(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTGetPresentHistory(_Inout_ PD3DKMT_GETPRESENTHISTORY unnamedParam1) +{ + return NtGdiDdDDIGetPresentHistory(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTGetProcessSchedulingPriorityClass( + _In_ HANDLE unnamedParam1, + _Out_ D3DKMT_SCHEDULINGPRIORITYCLASS *unnamedParam2) +{ + return NtGdiDdDDIGetProcessSchedulingPriorityClass(unnamedParam1, unnamedParam2); +} + +NTSTATUS +WINAPI +D3DKMTGetRuntimeData(_In_ PD3DKMT_GETRUNTIMEDATA unnamedParam1) +{ + return NtGdiDdDDIGetRuntimeData(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTGetScanLine(_In_ PD3DKMT_GETSCANLINE unnamedParam1) +{ + return NtGdiDdDDIGetScanLine(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTGetSharedPrimaryHandle(_Inout_ PD3DKMT_GETSHAREDPRIMARYHANDLE unnamedParam1) +{ + return NtGdiDdDDIGetSharedPrimaryHandle(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTInvalidateActiveVidPn(_In_ PD3DKMT_INVALIDATEACTIVEVIDPN unnamedParam1) +{ + return NtGdiDdDDIInvalidateActiveVidPn(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTLock(_Inout_ PD3DKMT_LOCK unnamedParam1) +{ + return NtGdiDdDDILock(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTOpenAdapterFromDeviceName(_Inout_ PD3DKMT_OPENADAPTERFROMDEVICENAME unnamedParam1) +{ + return NtGdiDdDDIOpenAdapterFromDeviceName(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTOpenAdapterFromGdiDisplayName(_Inout_ PD3DKMT_OPENADAPTERFROMGDIDISPLAYNAME unnamedParam1) +{ + return NtGdiDdDDIOpenAdapterFromGdiDisplayName(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTOpenAdapterFromHdc(_Inout_ PD3DKMT_OPENADAPTERFROMHDC unnamedParam1) +{ + return NtGdiDdDDIOpenAdapterFromHdc(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTOpenResource(_Inout_ PD3DKMT_OPENRESOURCE unnamedParam1) +{ + return NtGdiDdDDIOpenResource(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTPollDisplayChildren(_In_ PD3DKMT_POLLDISPLAYCHILDREN unnamedParam1) +{ + return NtGdiDdDDIPollDisplayChildren(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTPresent(_In_ PD3DKMT_PRESENT unnamedParam1) +{ + return NtGdiDdDDIPresent(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTQueryAdapterInfo(_Inout_ PD3DKMT_QUERYADAPTERINFO unnamedParam1) +{ + return NtGdiDdDDIQueryAdapterInfo(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTQueryAllocationResidency(_In_ PD3DKMT_QUERYALLOCATIONRESIDENCY unnamedParam1) +{ + return NtGdiDdDDIQueryAllocationResidency(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTQueryResourceInfo(_Inout_ PD3DKMT_QUERYRESOURCEINFO unnamedParam1) +{ + return NtGdiDdDDIQueryResourceInfo(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTQueryStatistics(_Inout_ PD3DKMT_QUERYSTATISTICS unnamedParam1) +{ + return NtGdiDdDDIQueryStatistics(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTReleaseProcessVidPnSourceOwners(_In_ HANDLE unnamedParam1) +{ + return NtGdiDdDDIReleaseProcessVidPnSourceOwners(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTRender(_In_ PD3DKMT_RENDER unnamedParam1) +{ + return NtGdiDdDDIRender(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTSetAllocationPriority(_In_ PD3DKMT_SETALLOCATIONPRIORITY unnamedParam1) +{ + return NtGdiDdDDISetAllocationPriority(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTSetContextSchedulingPriority(_In_ PD3DKMT_SETCONTEXTSCHEDULINGPRIORITY unnamedParam1) +{ + return NtGdiDdDDISetContextSchedulingPriority(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTSetDisplayMode(_In_ PD3DKMT_SETDISPLAYMODE unnamedParam1) +{ + return NtGdiDdDDISetDisplayMode(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTSetDisplayPrivateDriverFormat(_In_ PD3DKMT_SETDISPLAYPRIVATEDRIVERFORMAT unnamedParam1) +{ + return NtGdiDdDDISetDisplayPrivateDriverFormat(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTSetGammaRamp(_In_ PD3DKMT_SETGAMMARAMP unnamedParam1) +{ + return NtGdiDdDDISetGammaRamp(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTSetProcessSchedulingPriorityClass( + _In_ HANDLE unnamedParam1, + _In_ D3DKMT_SCHEDULINGPRIORITYCLASS *unnamedParam2) +{ + return NtGdiDdDDISetProcessSchedulingPriorityClass(unnamedParam1,unnamedParam2); +} + +NTSTATUS +WINAPI +D3DKMTSetQueuedLimit(_Inout_ PD3DKMT_SETQUEUEDLIMIT unnamedParam1) +{ + return NtGdiDdDDISetQueuedLimit(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTSetVidPnSourceOwner(_In_ PD3DKMT_SETVIDPNSOURCEOWNER unnamedParam1) +{ + return NtGdiDdDDISetVidPnSourceOwner(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTSharedPrimaryLockNotification(_In_ PD3DKMT_SHAREDPRIMARYLOCKNOTIFICATION unnamedParam1) +{ + return NtGdiDdDDISharedPrimaryLockNotification(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTSharedPrimaryUnLockNotification(_In_ PD3DKMT_SHAREDPRIMARYUNLOCKNOTIFICATION unnamedParam1) +{ + return NtGdiDdDDISharedPrimaryUnLockNotification(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTSignalSynchronizationObject(_In_ PD3DKMT_SIGNALSYNCHRONIZATIONOBJECT unnamedParam1) +{ + return NtGdiDdDDISignalSynchronizationObject(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTUnlock(_In_ PD3DKMT_UNLOCK unnamedParam1) +{ + return NtGdiDdDDIUnlock(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTUpdateOverlay(_In_ PD3DKMT_UPDATEOVERLAY unnamedParam1) +{ + return NtGdiDdDDIUpdateOverlay(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTWaitForIdle(_In_ PD3DKMT_WAITFORIDLE unnamedParam1) +{ + return NtGdiDdDDIWaitForIdle(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTWaitForSynchronizationObject(_In_ PD3DKMT_WAITFORSYNCHRONIZATIONOBJECT unnamedParam1) +{ + return NtGdiDdDDIWaitForSynchronizationObject(unnamedParam1); +} + +NTSTATUS +WINAPI +D3DKMTWaitForVerticalBlankEvent(_In_ PD3DKMT_WAITFORVERTICALBLANKEVENT unnamedParam1) +{ + return NtGdiDdDDIWaitForVerticalBlankEvent(unnamedParam1); +} diff --git a/win32ss/gdi/gdi32_vista/dc.c b/win32ss/gdi/gdi32_vista/dc.c index c985aa22255b4..baac0f4420cc0 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/gdi32_vista/gdi32_vista.spec b/win32ss/gdi/gdi32_vista/gdi32_vista.spec index 13ddbd8c7e544..7ef2b5810945b 100644 --- a/win32ss/gdi/gdi32_vista/gdi32_vista.spec +++ b/win32ss/gdi/gdi32_vista/gdi32_vista.spec @@ -1,2 +1,3 @@ +@ stdcall D3DKMTCreateAllocation(ptr) @ stdcall D3DKMTCreateDCFromMemory(ptr) @ stdcall D3DKMTDestroyDCFromMemory(ptr) diff --git a/win32ss/gdi/ntgdi/d3dkmt.c b/win32ss/gdi/ntgdi/d3dkmt.c new file mode 100644 index 0000000000000..0f9cf46c5edb1 --- /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_ PD3DKMT_SHAREDPRIMARYLOCKNOTIFICATION unnamedParam1) +{ + return 1; +} + +NTSTATUS +APIENTRY +NtGdiDdDDISharedPrimaryUnLockNotification(_In_ PD3DKMT_SHAREDPRIMARYUNLOCKNOTIFICATION unnamedParam1) +{ + return 1; +} + +NTSTATUS +APIENTRY +NtGdiDdDDIOpenAdapterFromGdiDisplayName(_Inout_ PD3DKMT_OPENADAPTERFROMGDIDISPLAYNAME unnamedParam1) +{ + return 0; +} + +NTSTATUS +APIENTRY +NtGdiDdDDIOpenAdapterFromHdc(_Inout_ PD3DKMT_OPENADAPTERFROMHDC unnamedParam1) +{ + return 0; +} + + +NTSTATUS +APIENTRY +NtGdiDdDDIOpenAdapterFromDeviceName(_Inout_ PD3DKMT_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_ PD3DKMT_CREATEALLOCATION unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnCreateAllocation) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnCreateAllocation(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDICheckMonitorPowerState(_In_ PD3DKMT_CHECKMONITORPOWERSTATE unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnCheckMonitorPowerState) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnCheckMonitorPowerState(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDICheckOcclusion(_In_ PD3DKMT_CHECKOCCLUSION unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnCheckOcclusion) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnCheckOcclusion(unnamedParam1); +} + + +NTSTATUS +APIENTRY +NtGdiDdDDICloseAdapter(_In_ PD3DKMT_CLOSEADAPTER unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnCloseAdapter) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnCloseAdapter(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDICreateContext(_Inout_ PD3DKMT_CREATECONTEXT unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnCreateContext) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnCreateContext(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDICreateDevice(_Inout_ PD3DKMT_CREATEDEVICE unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnCreateDevice) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnCreateDevice(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDICreateOverlay(_Inout_ PD3DKMT_CREATEOVERLAY unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnCreateOverlay) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnCreateOverlay(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDICreateSynchronizationObject(_Inout_ PD3DKMT_CREATESYNCHRONIZATIONOBJECT unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnCreateSynchronizationObject) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnCreateSynchronizationObject(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIDestroyAllocation(_In_ PD3DKMT_DESTROYALLOCATION unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnDestroyAllocation) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnDestroyAllocation(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIDestroyContext(_In_ PD3DKMT_DESTROYCONTEXT unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnDestroyContext) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnDestroyContext(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIDestroyDevice(_In_ PD3DKMT_DESTROYDEVICE unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnDestroyDevice) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnDestroyDevice(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIDestroyOverlay(_In_ PD3DKMT_DESTROYOVERLAY unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnDestroyOverlay) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnDestroyOverlay(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIDestroySynchronizationObject(_In_ PD3DKMT_DESTROYSYNCHRONIZATIONOBJECT unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnDestroySynchronizationObject) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnDestroySynchronizationObject(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIEscape(_In_ PD3DKMT_ESCAPE unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnEscape) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnEscape(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIFlipOverlay(_In_ PD3DKMT_FLIPOVERLAY unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnFlipOverlay) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnFlipOverlay(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIGetContextSchedulingPriority(_Inout_ PD3DKMT_GETCONTEXTSCHEDULINGPRIORITY unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnGetContextSchedulingPriority) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnGetContextSchedulingPriority(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIGetDeviceState(_Inout_ PD3DKMT_GETDEVICESTATE unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnGetDeviceState) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnGetDeviceState(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIGetDisplayModeList(_Inout_ PD3DKMT_GETDISPLAYMODELIST unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnGetDisplayModeList) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnGetDisplayModeList(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIGetMultisampleMethodList(_Inout_ PD3DKMT_GETMULTISAMPLEMETHODLIST unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnGetMultisampleMethodList) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnGetMultisampleMethodList(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIGetPresentHistory(_Inout_ PD3DKMT_GETPRESENTHISTORY unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnGetPresentHistory) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnGetPresentHistory(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIGetRuntimeData(_In_ PD3DKMT_GETRUNTIMEDATA unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnGetRuntimeData) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnGetRuntimeData(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIGetScanLine(_In_ PD3DKMT_GETSCANLINE unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnGetScanLine) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnGetScanLine(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIGetSharedPrimaryHandle(_Inout_ PD3DKMT_GETSHAREDPRIMARYHANDLE unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnGetSharedPrimaryHandle) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnGetSharedPrimaryHandle(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIInvalidateActiveVidPn(_In_ PD3DKMT_INVALIDATEACTIVEVIDPN unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnInvalidateActiveVidPn) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnInvalidateActiveVidPn(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDILock(_Inout_ PD3DKMT_LOCK unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnLock) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnLock(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIOpenResource(_Inout_ PD3DKMT_OPENRESOURCE unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnOpenResource) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnOpenResource(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIPollDisplayChildren(_In_ PD3DKMT_POLLDISPLAYCHILDREN unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnPollDisplayChildren) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnPollDisplayChildren(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIPresent(_In_ PD3DKMT_PRESENT unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnPresent) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnPresent(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIQueryAdapterInfo(_Inout_ PD3DKMT_QUERYADAPTERINFO unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnQueryAdapterInfo) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnQueryAdapterInfo(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIQueryAllocationResidency(_In_ PD3DKMT_QUERYALLOCATIONRESIDENCY unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnQueryAllocationResidency) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnQueryAllocationResidency(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIQueryResourceInfo(_Inout_ PD3DKMT_QUERYRESOURCEINFO unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnQueryResourceInfo) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnQueryResourceInfo(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIQueryStatistics(_Inout_ PD3DKMT_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_ PD3DKMT_RENDER unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnRender) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnRender(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDISetAllocationPriority(_In_ PD3DKMT_SETALLOCATIONPRIORITY unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnSetAllocationPriority) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnSetAllocationPriority(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDISetContextSchedulingPriority(_In_ PD3DKMT_SETCONTEXTSCHEDULINGPRIORITY unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnSetContextSchedulingPriority) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnSetContextSchedulingPriority(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDISetDisplayMode(_In_ PD3DKMT_SETDISPLAYMODE unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnSetDisplayMode) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnSetDisplayMode(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDISetDisplayPrivateDriverFormat(_In_ PD3DKMT_SETDISPLAYPRIVATEDRIVERFORMAT unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnSetDisplayPrivateDriverFormat) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnSetDisplayPrivateDriverFormat(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDISetGammaRamp(_In_ PD3DKMT_SETGAMMARAMP unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnSetGammaRamp) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnSetGammaRamp(unnamedParam1); +} + + +NTSTATUS +APIENTRY +NtGdiDdDDISetQueuedLimit(_Inout_ PD3DKMT_SETQUEUEDLIMIT unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnSetQueuedLimit) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnSetQueuedLimit(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDISetVidPnSourceOwner(_In_ PD3DKMT_SETVIDPNSOURCEOWNER unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnSetVidPnSourceOwner) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnSetVidPnSourceOwner(unnamedParam1); +} + +NTSTATUS +WINAPI +NtGdiDdDDIUnlock(_In_ PD3DKMT_UNLOCK unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnUnlock) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnUnlock(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIUpdateOverlay(_In_ PD3DKMT_UPDATEOVERLAY unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnUpdateOverlay) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnUpdateOverlay(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIWaitForIdle(_In_ PD3DKMT_WAITFORIDLE unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnWaitForIdle) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnWaitForIdle(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIWaitForSynchronizationObject(_In_ PD3DKMT_WAITFORSYNCHRONIZATIONOBJECT unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnWaitForSynchronizationObject) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnWaitForSynchronizationObject(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDIWaitForVerticalBlankEvent(_In_ PD3DKMT_WAITFORVERTICALBLANKEVENT unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnWaitForVerticalBlankEvent) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnWaitForVerticalBlankEvent(unnamedParam1); +} + +NTSTATUS +APIENTRY +NtGdiDdDDISignalSynchronizationObject(_In_ PD3DKMT_SIGNALSYNCHRONIZATIONOBJECT unnamedParam1) +{ + if (!unnamedParam1) + STATUS_INVALID_PARAMETER; + + if (!DxgAdapterCallbacks.RxgkIntPfnSignalSynchronizationObject) + return STATUS_PROCEDURE_NOT_FOUND; + + return DxgAdapterCallbacks.RxgkIntPfnSignalSynchronizationObject(unnamedParam1); +} \ No newline at end of file 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..28106275b9959 100644 --- a/win32ss/w32ksvc32.h +++ b/win32ss/w32ksvc32.h @@ -694,3 +694,59 @@ // For Wine DX SVC_(GdiDdDDICreateDCFromMemory, 1) SVC_(GdiDdDDIDestroyDCFromMemory, 1) +// ReactOS WDDM + 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) \ No newline at end of file diff --git a/win32ss/w32ksvc64.h b/win32ss/w32ksvc64.h index e50c0f00cb1b0..3d239357c91df 100644 --- a/win32ss/w32ksvc64.h +++ b/win32ss/w32ksvc64.h @@ -688,3 +688,59 @@ SVC_(UserSetDbgTagCount, 1) // SVC_(UserSetRipFlags, 1) // SVC_(UserSetScrollBarInfo, 3) // + // ReactOS RDDM + 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) \ No newline at end of file