mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-12 17:33:00 +08:00
Enable new DriverProtection interface for MapGpuVa
Related-To: NEO-6096 Signed-off-by: Dominik Dabek <dominik.dabek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
63a578f5a4
commit
65e00abea6
@@ -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{};
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
||||
@@ -319,3 +319,4 @@ OverrideKernelSizeLimitForSmallDispatch = -1
|
||||
SkipFlushingEventsOnGetStatusCalls = 0
|
||||
AllowUnrestrictedSize = 0
|
||||
DoNotFreeResources = 0
|
||||
OverrideGmmResourceUsageField = -1
|
||||
|
||||
Reference in New Issue
Block a user