mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
Verify GL sharing based on primary display's luid
Resolves: NEO-5016 Change-Id: I244536fdd8acacfeb423ae09e13191df66c4f74a Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
48e7ca6102
commit
442b6cfc47
@@ -31,6 +31,10 @@ DWORD getModuleFileName(HMODULE hModule, LPWSTR lpFilename, DWORD nSize) {
|
||||
char *getenv(const char *variableName) {
|
||||
return ::getenv(variableName);
|
||||
}
|
||||
|
||||
BOOL enumDisplayDevices(LPCWSTR lpDevice, DWORD iDevNum, PDISPLAY_DEVICEW lpDisplayDevice, DWORD dwFlags) {
|
||||
return EnumDisplayDevicesW(lpDevice, iDevNum, lpDisplayDevice, dwFlags);
|
||||
}
|
||||
} // namespace SysCalls
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -18,7 +18,7 @@ BOOL getSystemPowerStatus(LPSYSTEM_POWER_STATUS systemPowerStatusPtr);
|
||||
BOOL getModuleHandle(DWORD dwFlags, LPCWSTR lpModuleName, HMODULE *phModule);
|
||||
DWORD getModuleFileName(HMODULE hModule, LPWSTR lpFilename, DWORD nSize);
|
||||
char *getenv(const char *variableName);
|
||||
|
||||
BOOL enumDisplayDevices(LPCWSTR lpDevice, DWORD iDevNum, PDISPLAY_DEVICEW lpDisplayDevice, DWORD dwFlags);
|
||||
} // namespace SysCalls
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1063,23 +1063,4 @@ void Wddm::createPagingFenceLogger() {
|
||||
residencyLogger = std::make_unique<WddmResidencyLogger>(device, pagingFenceAddress);
|
||||
}
|
||||
}
|
||||
|
||||
bool Wddm::verifyHdcHandle(size_t hdcHandle) const {
|
||||
D3DKMT_OPENADAPTERFROMHDC openAdapterFromHdcStruct{};
|
||||
openAdapterFromHdcStruct.hDc = reinterpret_cast<HDC>(hdcHandle);
|
||||
auto status = getGdi()->openAdapterFromHdc(&openAdapterFromHdcStruct);
|
||||
if (STATUS_SUCCESS != status) {
|
||||
DEBUG_BREAK_IF(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
auto adapterLuid = openAdapterFromHdcStruct.AdapterLuid;
|
||||
D3DKMT_CLOSEADAPTER closeAdapterStruct{};
|
||||
|
||||
closeAdapterStruct.hAdapter = openAdapterFromHdcStruct.hAdapter;
|
||||
getGdi()->closeAdapter(&closeAdapterStruct);
|
||||
|
||||
return verifyAdapterLuid(adapterLuid);
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -92,8 +92,6 @@ class Wddm {
|
||||
|
||||
bool configureDeviceAddressSpace();
|
||||
|
||||
MOCKABLE_VIRTUAL bool verifyHdcHandle(size_t hdcHandle) const;
|
||||
|
||||
GT_SYSTEM_INFO *getGtSysInfo() const {
|
||||
DEBUG_BREAK_IF(!gtSystemInfo);
|
||||
return gtSystemInfo.get();
|
||||
|
||||
Reference in New Issue
Block a user