mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-25 05:24:02 +08:00
WDDM_LINUX config improvements
Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
b24b4cbffb
commit
05ce38e94f
@@ -13,3 +13,9 @@
|
||||
|
||||
struct _D3DDDICB_LOCKFLAGS;
|
||||
typedef _D3DDDICB_LOCKFLAGS D3DDDICB_LOCKFLAGS;
|
||||
|
||||
struct _D3DKMT_TRIMNOTIFICATION;
|
||||
typedef struct _D3DKMT_TRIMNOTIFICATION D3DKMT_TRIMNOTIFICATION;
|
||||
typedef VOID(APIENTRY *PFND3DKMT_TRIMNOTIFICATIONCALLBACK)(_Inout_ D3DKMT_TRIMNOTIFICATION *);
|
||||
|
||||
typedef NTSTATUS(APIENTRY *PFND3DKMT_ESCAPE)(_In_ CONST D3DKMT_ESCAPE *);
|
||||
|
||||
@@ -7,6 +7,20 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef _WIN32
|
||||
#define COM_NO_WINDOWS_H
|
||||
#include "shared/source/os_interface/windows/windows_wrapper.h"
|
||||
#endif
|
||||
|
||||
#include <dxcore.h>
|
||||
|
||||
static const char *const dXCoreCreateAdapterFactoryFuncName = "DXCoreCreateAdapterFactory";
|
||||
static const char *const dXCoreCreateAdapterFactoryFuncName = "DXCoreCreateAdapterFactory";
|
||||
|
||||
#ifndef _WIN32
|
||||
template <>
|
||||
inline GUID uuidof<IDXCoreAdapterFactory>() { return IID_IDXCoreAdapterFactory; }
|
||||
template <>
|
||||
inline GUID uuidof<IDXCoreAdapterList>() { return IID_IDXCoreAdapterList; }
|
||||
template <>
|
||||
inline GUID uuidof<IDXCoreAdapter>() { return IID_IDXCoreAdapter; }
|
||||
#endif
|
||||
|
||||
@@ -505,8 +505,8 @@ NTSTATUS Wddm::createAllocation(const void *alignedCpuPtr, const Gmm *gmm, D3DKM
|
||||
CreateAllocation.PrivateDriverDataSize = 0;
|
||||
CreateAllocation.Flags.Reserved = 0;
|
||||
CreateAllocation.NumAllocations = 1;
|
||||
CreateAllocation.pPrivateRuntimeData = NULL;
|
||||
CreateAllocation.pPrivateDriverData = NULL;
|
||||
CreateAllocation.pPrivateRuntimeData = nullptr;
|
||||
CreateAllocation.pPrivateDriverData = nullptr;
|
||||
CreateAllocation.Flags.NonSecure = FALSE;
|
||||
CreateAllocation.Flags.CreateShared = outSharedHandle ? TRUE : FALSE;
|
||||
CreateAllocation.Flags.RestrictSharedAccess = FALSE;
|
||||
@@ -542,7 +542,7 @@ bool Wddm::setAllocationPriority(const D3DKMT_HANDLE *handles, uint32_t allocati
|
||||
|
||||
setAllocationPriority.hDevice = device;
|
||||
setAllocationPriority.AllocationCount = allocationCount;
|
||||
setAllocationPriority.hResource = NULL;
|
||||
setAllocationPriority.hResource = NULL_HANDLE;
|
||||
setAllocationPriority.phAllocationList = handles;
|
||||
setAllocationPriority.pPriorities = priorities.data();
|
||||
|
||||
@@ -564,8 +564,8 @@ bool Wddm::createAllocation64k(const Gmm *gmm, D3DKMT_HANDLE &outHandle) {
|
||||
AllocationInfo.Flags.Primary = 0;
|
||||
|
||||
CreateAllocation.NumAllocations = 1;
|
||||
CreateAllocation.pPrivateRuntimeData = NULL;
|
||||
CreateAllocation.pPrivateDriverData = NULL;
|
||||
CreateAllocation.pPrivateRuntimeData = nullptr;
|
||||
CreateAllocation.pPrivateDriverData = nullptr;
|
||||
CreateAllocation.Flags.CreateResource = FALSE;
|
||||
CreateAllocation.pAllocationInfo2 = &AllocationInfo;
|
||||
CreateAllocation.hDevice = device;
|
||||
@@ -614,8 +614,8 @@ NTSTATUS Wddm::createAllocationsAndMapGpuVa(OsHandleStorage &osHandles) {
|
||||
CreateAllocation.PrivateDriverDataSize = 0;
|
||||
CreateAllocation.Flags.Reserved = 0;
|
||||
CreateAllocation.NumAllocations = allocationCount;
|
||||
CreateAllocation.pPrivateRuntimeData = NULL;
|
||||
CreateAllocation.pPrivateDriverData = NULL;
|
||||
CreateAllocation.pPrivateRuntimeData = nullptr;
|
||||
CreateAllocation.pPrivateDriverData = nullptr;
|
||||
CreateAllocation.Flags.NonSecure = FALSE;
|
||||
CreateAllocation.Flags.CreateShared = FALSE;
|
||||
CreateAllocation.Flags.RestrictSharedAccess = FALSE;
|
||||
@@ -927,7 +927,7 @@ bool Wddm::waitFromCpu(uint64_t lastFenceValue, const MonitoredFence &monitoredF
|
||||
waitFromCpu.ObjectHandleArray = &monitoredFence.fenceHandle;
|
||||
waitFromCpu.FenceValueArray = &lastFenceValue;
|
||||
waitFromCpu.hDevice = device;
|
||||
waitFromCpu.hAsyncEvent = NULL;
|
||||
waitFromCpu.hAsyncEvent = NULL_HANDLE;
|
||||
|
||||
status = getGdi()->waitForSynchronizationObjectFromCpu(&waitFromCpu);
|
||||
DEBUG_BREAK_IF(status != STATUS_SUCCESS);
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "shared/source/os_interface/os_context.h"
|
||||
#include "shared/source/os_interface/os_interface.h"
|
||||
#include "shared/source/os_interface/os_library.h"
|
||||
#include "shared/source/os_interface/windows/d3dkmthk_wrapper.h"
|
||||
#include "shared/source/os_interface/windows/hw_device_id.h"
|
||||
#include "shared/source/os_interface/windows/wddm/wddm_defs.h"
|
||||
#include "shared/source/os_interface/windows/wddm/wddm_residency_logger.h"
|
||||
@@ -25,10 +26,6 @@
|
||||
#include <memory>
|
||||
#include <mutex>
|
||||
|
||||
struct _D3DKMT_TRIMNOTIFICATION;
|
||||
typedef struct _D3DKMT_TRIMNOTIFICATION D3DKMT_TRIMNOTIFICATION;
|
||||
typedef VOID(APIENTRY *PFND3DKMT_TRIMNOTIFICATIONCALLBACK)(_Inout_ D3DKMT_TRIMNOTIFICATION *);
|
||||
|
||||
struct _SYSTEM_INFO;
|
||||
typedef struct _SYSTEM_INFO SYSTEM_INFO;
|
||||
|
||||
|
||||
@@ -33,6 +33,8 @@ LSTATUS APIENTRY RegQueryValueExA(
|
||||
LPDWORD lpcbData);
|
||||
#else
|
||||
#include <cstdint>
|
||||
#include <winadapter.h>
|
||||
#include <x86intrin.h>
|
||||
#define C_ASSERT(e) static_assert(e, #e)
|
||||
#endif
|
||||
|
||||
#define NULL_HANDLE 0U
|
||||
|
||||
Reference in New Issue
Block a user