Verify HDC handle when returning devices for GL sharing

Resolves: NEO-4952
Change-Id: I298bb26aacd2cc5ad7206f7fff2b2235098fb8bf
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2020-08-07 08:03:07 +02:00
committed by sys_ocldev
parent c2a4835943
commit 418db08517
11 changed files with 194 additions and 13 deletions

View File

@ -46,6 +46,7 @@ class WddmMock : public Wddm {
using Wddm::temporaryResources;
using Wddm::wddmInterface;
WddmMock(std::unique_ptr<HwDeviceId> hwDeviceId, RootDeviceEnvironment &rootDeviceEnvironment) : Wddm(std::move(hwDeviceId), rootDeviceEnvironment) {}
WddmMock(RootDeviceEnvironment &rootDeviceEnvironment);
~WddmMock();
@ -108,6 +109,9 @@ class WddmMock : public Wddm {
++counterVerifySharedHandle;
return Wddm::verifySharedHandle(osHandle);
}
bool verifyHdcHandle(size_t hdcHandle) const override {
return verifyHdcReturnValue;
}
void resetGdi(Gdi *gdi);
@ -147,6 +151,7 @@ class WddmMock : public Wddm {
bool makeResidentStatus = true;
bool callBaseMakeResident = true;
bool callBaseCreatePagingLogger = true;
bool verifyHdcReturnValue = true;
};
struct GmockWddm : WddmMock {