Enable new DriverProtection interface for MapGpuVa

Related-To: NEO-6096

Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
Dominik Dabek
2021-08-06 10:46:00 +00:00
committed by Compute-Runtime-Automation
parent 63a578f5a4
commit 65e00abea6
16 changed files with 88 additions and 6 deletions

View File

@@ -35,6 +35,8 @@ class MockGmmResourceInfo : public GmmResourceInfo {
size_t getRenderPitch() override { return rowPitch; }
uint64_t getDriverProtectionBits() override { return driverProtectionBits; }
uint32_t getNumSamples() override { return mockResourceCreateParams.MSAA.NumSamples; }
uint32_t getQPitch() override { return qPitch; }
@@ -97,6 +99,7 @@ class MockGmmResourceInfo : public GmmResourceInfo {
using GmmResourceInfo::clientContext;
using GmmResourceInfo::createResourceInfo;
uint64_t driverProtectionBits = 0;
uint32_t getOffsetCalled = 0u;
uint32_t arrayIndexPassedToGetOffset = 0;
SurfaceFormatInfo tempSurface{};

View File

@@ -387,9 +387,9 @@ TEST_F(Wddm20Tests, givenNullAllocationWhenCreateThenAllocateAndMap) {
OsAgnosticMemoryManager mm(*executionEnvironment);
WddmAllocation allocation(0, GraphicsAllocation::AllocationType::UNKNOWN, nullptr, 100, nullptr, MemoryPool::MemoryNull, 0u, 1u);
Gmm *gmm = GmmHelperFunctions::getGmm(allocation.getUnderlyingBuffer(), allocation.getUnderlyingBufferSize(), getGmmClientContext());
auto gmm = std::unique_ptr<Gmm>(GmmHelperFunctions::getGmm(allocation.getUnderlyingBuffer(), allocation.getUnderlyingBufferSize(), getGmmClientContext()));
allocation.setDefaultGmm(gmm);
allocation.setDefaultGmm(gmm.get());
auto status = wddm->createAllocation(&allocation);
EXPECT_EQ(STATUS_SUCCESS, status);
@@ -399,7 +399,6 @@ TEST_F(Wddm20Tests, givenNullAllocationWhenCreateThenAllocateAndMap) {
EXPECT_NE(0u, allocation.getGpuAddress());
EXPECT_EQ(allocation.getGpuAddress(), GmmHelper::canonize(allocation.getGpuAddress()));
delete gmm;
mm.freeSystemMemory(allocation.getUnderlyingBuffer());
}

View File

@@ -319,3 +319,4 @@ OverrideKernelSizeLimitForSmallDispatch = -1
SkipFlushingEventsOnGetStatusCalls = 0
AllowUnrestrictedSize = 0
DoNotFreeResources = 0
OverrideGmmResourceUsageField = -1