mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-06 10:26:29 +08:00
Revert "fix: use alignment when allocate by kmd"
This reverts commit 72492a9a18.
Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
0bca2057b2
commit
a585cb45b7
@@ -165,7 +165,7 @@ GraphicsAllocation *WddmMemoryManager::allocateMemoryByKMD(const AllocationData
|
||||
GmmRequirements gmmRequirements{};
|
||||
gmmRequirements.allowLargePages = true;
|
||||
gmmRequirements.preferCompressed = allocationData.flags.preferCompressed;
|
||||
auto gmm = std::make_unique<Gmm>(executionEnvironment.rootDeviceEnvironments[allocationData.rootDeviceIndex]->getGmmHelper(), allocationData.hostPtr, allocationData.size, allocationData.alignment,
|
||||
auto gmm = std::make_unique<Gmm>(executionEnvironment.rootDeviceEnvironments[allocationData.rootDeviceIndex]->getGmmHelper(), allocationData.hostPtr, allocationData.size, 0u,
|
||||
CacheSettingsHelper::getGmmUsageType(allocationData.type, !!allocationData.flags.uncacheable, productHelper, hwInfo), systemMemoryStorageInfo, gmmRequirements);
|
||||
auto allocation = std::make_unique<WddmAllocation>(allocationData.rootDeviceIndex,
|
||||
1u, // numGmms
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
|
||||
#include "shared/source/execution_environment/execution_environment.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/gmm_helper/gmm.h"
|
||||
#include "shared/source/helpers/aligned_memory.h"
|
||||
#include "shared/source/os_interface/windows/gdi_interface.h"
|
||||
#include "shared/source/os_interface/windows/os_environment_win.h"
|
||||
@@ -104,7 +103,6 @@ bool WddmMock::mapGpuVirtualAddress(Gmm *gmm, D3DKMT_HANDLE handle, D3DGPU_VIRTU
|
||||
mapGpuVirtualAddressResult.called++;
|
||||
mapGpuVirtualAddressResult.cpuPtrPassed = reinterpret_cast<void *>(preferredAddress);
|
||||
mapGpuVirtualAddressResult.uint64ParamPassed = preferredAddress;
|
||||
mapGpuVirtualAddressResult.alignment = gmm->resourceParams.BaseAlignment;
|
||||
if (callBaseMapGpuVa) {
|
||||
return mapGpuVirtualAddressResult.success = Wddm::mapGpuVirtualAddress(gmm, handle, minimumAddress, maximumAddress, preferredAddress, gpuPtr, type);
|
||||
} else {
|
||||
|
||||
@@ -18,7 +18,6 @@ namespace WddmMockHelpers {
|
||||
struct CallResult {
|
||||
uint32_t called = 0;
|
||||
uint64_t uint64ParamPassed = -1;
|
||||
size_t alignment = 0;
|
||||
bool success = false;
|
||||
void *cpuPtrPassed = nullptr;
|
||||
};
|
||||
|
||||
@@ -1173,18 +1173,6 @@ TEST_F(WddmMemoryManagerSimpleTest, GivenShareableEnabledAndHugeSizeWhenAskedToC
|
||||
memoryManager->freeGraphicsMemory(allocation);
|
||||
}
|
||||
|
||||
TEST_F(WddmMemoryManagerSimpleTest, GivenMemoryManagerWhenAllocateByKmdThenAlignmentIsCorrect) {
|
||||
memoryManager.reset(new MockWddmMemoryManager(false, false, executionEnvironment));
|
||||
AllocationData allocationData;
|
||||
allocationData.size = 2ULL * MemoryConstants::pageSize64k;
|
||||
allocationData.flags.shareable = true;
|
||||
allocationData.alignment = 8388608;
|
||||
auto allocation = memoryManager->allocateMemoryByKMD(allocationData);
|
||||
EXPECT_NE(nullptr, allocation);
|
||||
EXPECT_EQ(static_cast<WddmMock *>(&memoryManager->getWddm(0u))->mapGpuVirtualAddressResult.alignment, allocationData.alignment);
|
||||
memoryManager->freeGraphicsMemory(allocation);
|
||||
}
|
||||
|
||||
TEST_F(WddmMemoryManagerSimpleTest, GivenShareableEnabledAndSmallSizeWhenAskedToCreatePhysicalGraphicsAllocationThenValidAllocationIsReturned) {
|
||||
memoryManager.reset(new MockWddmMemoryManager(false, false, executionEnvironment));
|
||||
memoryManager->hugeGfxMemoryChunkSize = MemoryConstants::pageSize64k;
|
||||
|
||||
Reference in New Issue
Block a user