mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 10:17:01 +08:00
Change DevicesBitfield type to struct
Change-Id: I7a005b07737cdd21efc174a2ee2be0f6b7f9068d Signed-off-by: Jablonski, Mateusz <mateusz.jablonski@intel.com>
This commit is contained in:
@@ -611,6 +611,7 @@ include_directories(${IGDRCL_SOURCE_DIR}/runtime/gmm_helper/${BRANCH_DIR_SUFFIX}
|
||||
include_directories(${IGDRCL_SOURCE_DIR}/runtime/gmm_helper/client_context${BRANCH_DIR_SUFFIX})
|
||||
include_directories(${IGDRCL_SOURCE_DIR}/runtime/gmm_helper/gmm_memory${BRANCH_DIR_SUFFIX})
|
||||
include_directories(${IGDRCL_SOURCE_DIR}/runtime/mem_obj/definitions${BRANCH_DIR_SUFFIX})
|
||||
include_directories(${IGDRCL_SOURCE_DIR}/runtime/memory_manager/definitions${BRANCH_DIR_SUFFIX})
|
||||
|
||||
set(HW_SRC_INCLUDE_PATH ${IGDRCL_SOURCE_DIR}/runtime/gen_common)
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ class AUBCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw<GfxFa
|
||||
return static_cast<AubMemDump::AubFileStream *>(this->stream);
|
||||
}
|
||||
|
||||
void writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits, DevicesBitfield devicesBitfield) override;
|
||||
void writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits) override;
|
||||
bool writeMemory(GraphicsAllocation &gfxAllocation) override;
|
||||
MOCKABLE_VIRTUAL bool writeMemory(AllocationView &allocationView);
|
||||
void expectMMIO(uint32_t mmioRegister, uint32_t expectedValue);
|
||||
|
||||
@@ -614,10 +614,10 @@ void AUBCommandStreamReceiverHw<GfxFamily>::makeNonResidentExternal(uint64_t gpu
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void AUBCommandStreamReceiverHw<GfxFamily>::writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits, DevicesBitfield devicesBitfield) {
|
||||
void AUBCommandStreamReceiverHw<GfxFamily>::writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits) {
|
||||
{
|
||||
std::ostringstream str;
|
||||
str << "ppgtt: " << std::hex << std::showbase << gpuAddress << " end address: " << gpuAddress + size << " cpu address: " << cpuAddress << " device mask: " << devicesBitfield << " size: " << std::dec << size;
|
||||
str << "ppgtt: " << std::hex << std::showbase << gpuAddress << " end address: " << gpuAddress + size << " cpu address: " << cpuAddress << " size: " << std::dec << size;
|
||||
getAubStream()->addComment(str.str().c_str());
|
||||
}
|
||||
|
||||
@@ -643,7 +643,7 @@ bool AUBCommandStreamReceiverHw<GfxFamily>::writeMemory(GraphicsAllocation &gfxA
|
||||
if (aubManager) {
|
||||
this->writeMemoryWithAubManager(gfxAllocation);
|
||||
} else {
|
||||
writeMemory(gpuAddress, cpuAddress, size, this->getMemoryBank(&gfxAllocation), this->getPPGTTAdditionalBits(&gfxAllocation), gfxAllocation.devicesBitfield);
|
||||
writeMemory(gpuAddress, cpuAddress, size, this->getMemoryBank(&gfxAllocation), this->getPPGTTAdditionalBits(&gfxAllocation));
|
||||
}
|
||||
|
||||
if (gfxAllocation.isLocked()) {
|
||||
|
||||
@@ -51,7 +51,7 @@ class CommandStreamReceiverSimulatedCommonHw : public CommandStreamReceiverHw<Gf
|
||||
virtual void pollForCompletion() = 0;
|
||||
virtual void pollForCompletionImpl(){};
|
||||
virtual bool writeMemory(GraphicsAllocation &gfxAllocation) = 0;
|
||||
virtual void writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits, DevicesBitfield devicesBitfield) = 0;
|
||||
virtual void writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits) = 0;
|
||||
virtual void writeMemoryWithAubManager(GraphicsAllocation &graphicsAllocation) = 0;
|
||||
|
||||
aub_stream::AubManager *aubManager = nullptr;
|
||||
|
||||
@@ -49,7 +49,7 @@ class TbxCommandStreamReceiverHw : public CommandStreamReceiverSimulatedHw<GfxFa
|
||||
|
||||
void processResidency(ResidencyContainer &allocationsForResidency) override;
|
||||
void waitBeforeMakingNonResidentWhenRequired() override;
|
||||
void writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits, DevicesBitfield devicesBitfield) override;
|
||||
void writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits) override;
|
||||
bool writeMemory(GraphicsAllocation &gfxAllocation) override;
|
||||
|
||||
// Family specific version
|
||||
|
||||
@@ -367,7 +367,7 @@ void TbxCommandStreamReceiverHw<GfxFamily>::pollForCompletion() {
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
void TbxCommandStreamReceiverHw<GfxFamily>::writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits, DevicesBitfield devicesBitfield) {
|
||||
void TbxCommandStreamReceiverHw<GfxFamily>::writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits) {
|
||||
|
||||
AubHelperHw<GfxFamily> aubHelperHw(this->localMemoryEnabled);
|
||||
|
||||
@@ -391,7 +391,7 @@ bool TbxCommandStreamReceiverHw<GfxFamily>::writeMemory(GraphicsAllocation &gfxA
|
||||
if (aubManager) {
|
||||
this->writeMemoryWithAubManager(gfxAllocation);
|
||||
} else {
|
||||
writeMemory(gpuAddress, cpuAddress, size, this->getMemoryBank(&gfxAllocation), this->getPPGTTAdditionalBits(&gfxAllocation), gfxAllocation.devicesBitfield);
|
||||
writeMemory(gpuAddress, cpuAddress, size, this->getMemoryBank(&gfxAllocation), this->getPPGTTAdditionalBits(&gfxAllocation));
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -16,9 +16,9 @@
|
||||
#include "runtime/helpers/surface_formats.h"
|
||||
|
||||
namespace OCLRT {
|
||||
Gmm::Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable) : Gmm(alignedPtr, alignedSize, uncacheable, false, true, 0) {}
|
||||
Gmm::Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable) : Gmm(alignedPtr, alignedSize, uncacheable, false, true, {}) {}
|
||||
|
||||
Gmm::Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable, bool preferRenderCompressed, bool systemMemoryPool, uint32_t devicesBitfield) {
|
||||
Gmm::Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable, bool preferRenderCompressed, bool systemMemoryPool, DevicesBitfield devicesBitfield) {
|
||||
resourceParams.Type = RESOURCE_BUFFER;
|
||||
resourceParams.Format = GMM_FORMAT_GENERIC_8BIT;
|
||||
resourceParams.BaseWidth64 = static_cast<uint64_t>(alignedSize);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "devices_bitfield.h"
|
||||
#include "runtime/api/cl_types.h"
|
||||
#include "runtime/gmm_helper/gmm_lib.h"
|
||||
#include <cstdint>
|
||||
@@ -24,7 +25,7 @@ class Gmm {
|
||||
Gmm() = delete;
|
||||
Gmm(ImageInfo &inputOutputImgInfo);
|
||||
Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable);
|
||||
Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable, bool preferRenderCompressed, bool systemMemoryPool, uint32_t devicesBitfield);
|
||||
Gmm(const void *alignedPtr, size_t alignedSize, bool uncacheable, bool preferRenderCompressed, bool systemMemoryPool, DevicesBitfield devicesBitfield);
|
||||
Gmm(GMM_RESOURCE_INFO *inputGmm);
|
||||
|
||||
void queryImageParams(ImageInfo &inputOutputImgInfo);
|
||||
|
||||
@@ -42,7 +42,7 @@ AllocationProperties MemObjHelper::getAllocationProperties(ImageInfo *imgInfo, b
|
||||
}
|
||||
|
||||
DevicesBitfield MemObjHelper::getDevicesBitfield(const MemoryProperties &properties) {
|
||||
return DevicesBitfield(0);
|
||||
return {};
|
||||
}
|
||||
|
||||
bool MemObjHelper::isSuitableForRenderCompression(bool renderCompressedBuffers, const MemoryProperties &properties, ContextType contextType) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2018 Intel Corporation
|
||||
# Copyright (C) 2018-2019 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
@@ -14,6 +14,7 @@ set(RUNTIME_SRCS_MEMORY_MANAGER
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/deferrable_deletion.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/deferred_deleter.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/deferred_deleter.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/definitions${BRANCH_DIR_SUFFIX}/devices_bitfield.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/graphics_allocation.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/graphics_allocation.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/host_ptr_defines.h
|
||||
|
||||
12
runtime/memory_manager/definitions/devices_bitfield.h
Normal file
12
runtime/memory_manager/definitions/devices_bitfield.h
Normal file
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
namespace OCLRT {
|
||||
struct DevicesBitfield {
|
||||
};
|
||||
} // namespace OCLRT
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "devices_bitfield.h"
|
||||
#include "runtime/helpers/debug_helpers.h"
|
||||
#include "runtime/helpers/ptr_math.h"
|
||||
#include "runtime/memory_manager/host_ptr_defines.h"
|
||||
@@ -24,7 +25,6 @@
|
||||
namespace OCLRT {
|
||||
|
||||
using osHandle = unsigned int;
|
||||
using DevicesBitfield = uint32_t;
|
||||
|
||||
enum class AllocationOrigin {
|
||||
EXTERNAL_ALLOCATION,
|
||||
@@ -58,7 +58,7 @@ class GraphicsAllocation : public IDNode<GraphicsAllocation> {
|
||||
Gmm *gmm = nullptr;
|
||||
uint64_t allocationOffset = 0u;
|
||||
void *driverAllocatedCpuPointer = nullptr;
|
||||
DevicesBitfield devicesBitfield = 0;
|
||||
DevicesBitfield devicesBitfield = {};
|
||||
bool flushL3Required = false;
|
||||
AllocationOrigin origin = AllocationOrigin::EXTERNAL_ALLOCATION;
|
||||
|
||||
|
||||
@@ -92,11 +92,11 @@ class MemoryManager {
|
||||
virtual void removeAllocationFromHostPtrManager(GraphicsAllocation *memory) = 0;
|
||||
|
||||
MOCKABLE_VIRTUAL GraphicsAllocation *allocateGraphicsMemoryWithProperties(const AllocationProperties &properties) {
|
||||
return allocateGraphicsMemoryInPreferredPool(properties, 0u, nullptr);
|
||||
return allocateGraphicsMemoryInPreferredPool(properties, {}, nullptr);
|
||||
}
|
||||
|
||||
virtual GraphicsAllocation *allocateGraphicsMemory(const AllocationProperties &properties, const void *ptr) {
|
||||
return allocateGraphicsMemoryInPreferredPool(properties, 0u, ptr);
|
||||
return allocateGraphicsMemoryInPreferredPool(properties, {}, ptr);
|
||||
}
|
||||
|
||||
GraphicsAllocation *allocateGraphicsMemoryForHostPtr(size_t size, void *ptr, bool fullRangeSvm, bool requiresL3Flush) {
|
||||
@@ -209,7 +209,7 @@ class MemoryManager {
|
||||
const void *hostPtr = nullptr;
|
||||
size_t size = 0;
|
||||
size_t alignment = 0;
|
||||
DevicesBitfield devicesBitfield = 0;
|
||||
DevicesBitfield devicesBitfield = {};
|
||||
ImageInfo *imgInfo = nullptr;
|
||||
};
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ GraphicsAllocation *WddmMemoryManager::allocateGraphicsMemory64kb(AllocationData
|
||||
|
||||
auto wddmAllocation = std::make_unique<WddmAllocation>(nullptr, sizeAligned, nullptr, MemoryPool::System64KBPages, !!allocationData.flags.multiOsContextCapable);
|
||||
|
||||
gmm = new Gmm(nullptr, sizeAligned, false, allocationData.flags.preferRenderCompressed, true, 0);
|
||||
gmm = new Gmm(nullptr, sizeAligned, false, allocationData.flags.preferRenderCompressed, true, {});
|
||||
wddmAllocation->gmm = gmm;
|
||||
|
||||
if (!wddm->createAllocation64k(wddmAllocation.get())) {
|
||||
|
||||
@@ -92,9 +92,9 @@ Image *D3DSurface::create(Context *context, cl_dx9_surface_info_khr *surfaceInfo
|
||||
|
||||
AllocationProperties allocProperties = MemObjHelper::getAllocationProperties(&imgInfo, true);
|
||||
allocProperties.allocationType = GraphicsAllocation::AllocationType::SHARED_RESOURCE_COPY;
|
||||
DevicesBitfield devices = 0;
|
||||
DevicesBitfield devicesBitfield = {};
|
||||
|
||||
alloc = context->getMemoryManager()->allocateGraphicsMemoryInPreferredPool(allocProperties, devices, nullptr);
|
||||
alloc = context->getMemoryManager()->allocateGraphicsMemoryInPreferredPool(allocProperties, devicesBitfield, nullptr);
|
||||
|
||||
imgDesc.image_row_pitch = imgInfo.rowPitch;
|
||||
imgDesc.image_slice_pitch = imgInfo.slicePitch;
|
||||
|
||||
@@ -487,9 +487,9 @@ HWTEST_F(AubCommandStreamReceiverNoHostPtrTests, givenAubCommandStreamReceiverWh
|
||||
auto imgInfo = MockGmm::initImgInfo(imgDesc, 0, nullptr);
|
||||
|
||||
AllocationProperties allocProperties = MemObjHelper::getAllocationProperties(&imgInfo, true);
|
||||
DevicesBitfield devices = 0;
|
||||
DevicesBitfield devicesBitfield = {};
|
||||
|
||||
auto imageAllocation = memoryManager->allocateGraphicsMemoryInPreferredPool(allocProperties, devices, nullptr);
|
||||
auto imageAllocation = memoryManager->allocateGraphicsMemoryInPreferredPool(allocProperties, devicesBitfield, nullptr);
|
||||
ASSERT_NE(nullptr, imageAllocation);
|
||||
|
||||
EXPECT_TRUE(aubCsr->writeMemory(*imageAllocation));
|
||||
|
||||
@@ -1460,9 +1460,9 @@ HWTEST_F(HwImageTest, givenImageHwWhenSettingCCSParamsThenSetClearColorParamsIsC
|
||||
|
||||
auto imgInfo = MockGmm::initImgInfo(imgDesc, 0, nullptr);
|
||||
AllocationProperties allocProperties = MemObjHelper::getAllocationProperties(&imgInfo, true);
|
||||
DevicesBitfield devices = 0;
|
||||
DevicesBitfield devicesBitfield = {};
|
||||
|
||||
auto graphicsAllocation = memoryManager.allocateGraphicsMemoryInPreferredPool(allocProperties, devices, nullptr);
|
||||
auto graphicsAllocation = memoryManager.allocateGraphicsMemoryInPreferredPool(allocProperties, devicesBitfield, nullptr);
|
||||
|
||||
SurfaceFormatInfo formatInfo = {};
|
||||
std::unique_ptr<MockImageHw<FamilyType>> mockImage(new MockImageHw<FamilyType>(&context, format, imgDesc, formatInfo, graphicsAllocation));
|
||||
@@ -1488,9 +1488,9 @@ HWTEST_F(HwImageTest, givenImageHwWithUnifiedSurfaceAndMcsWhenSettingParamsForMu
|
||||
|
||||
auto imgInfo = MockGmm::initImgInfo(imgDesc, 0, nullptr);
|
||||
AllocationProperties allocProperties = MemObjHelper::getAllocationProperties(&imgInfo, true);
|
||||
DevicesBitfield devices = 0;
|
||||
DevicesBitfield devicesBitfield = {};
|
||||
|
||||
auto graphicsAllocation = memoryManager.allocateGraphicsMemoryInPreferredPool(allocProperties, devices, nullptr);
|
||||
auto graphicsAllocation = memoryManager.allocateGraphicsMemoryInPreferredPool(allocProperties, devicesBitfield, nullptr);
|
||||
|
||||
SurfaceFormatInfo formatInfo = {};
|
||||
std::unique_ptr<MockImageHw<FamilyType>> mockImage(new MockImageHw<FamilyType>(&context, format, imgDesc, formatInfo, graphicsAllocation));
|
||||
|
||||
@@ -23,7 +23,7 @@ class MemoryManagerGetAlloctionDataTest : public testing::TestWithParam<Graphics
|
||||
TEST(MemoryManagerGetAlloctionDataTest, givenHostMemoryAllocationTypeAndAllocateMemoryFlagAndNullptrWhenAllocationDataIsQueriedThenCorrectFlagsAndSizeAreSet) {
|
||||
AllocationData allocData;
|
||||
AllocationProperties properties(true, 10, GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, {}, nullptr);
|
||||
|
||||
EXPECT_TRUE(allocData.flags.mustBeZeroCopy);
|
||||
EXPECT_TRUE(allocData.flags.useSystemMemory);
|
||||
@@ -35,7 +35,7 @@ TEST(MemoryManagerGetAlloctionDataTest, givenNonHostMemoryAllocatoinTypeWhenAllo
|
||||
AllocationData allocData;
|
||||
AllocationProperties properties(true, 10, GraphicsAllocation::AllocationType::BUFFER);
|
||||
|
||||
MockMemoryManager::getAllocationData(allocData, properties, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, {}, nullptr);
|
||||
|
||||
EXPECT_FALSE(allocData.flags.mustBeZeroCopy);
|
||||
EXPECT_FALSE(allocData.flags.useSystemMemory);
|
||||
@@ -48,7 +48,7 @@ TEST(MemoryManagerGetAlloctionDataTest, givenAllocateMemoryFlagTrueWhenHostPtrIs
|
||||
char memory = 0;
|
||||
AllocationProperties properties(true, sizeof(memory), GraphicsAllocation::AllocationType::BUFFER);
|
||||
|
||||
MockMemoryManager::getAllocationData(allocData, properties, 0, &memory);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, {}, &memory);
|
||||
|
||||
EXPECT_EQ(sizeof(memory), allocData.size);
|
||||
EXPECT_EQ(nullptr, allocData.hostPtr);
|
||||
@@ -58,7 +58,7 @@ TEST(MemoryManagerGetAlloctionDataTest, givenBufferTypeWhenAllocationDataIsQueri
|
||||
AllocationData allocData;
|
||||
AllocationProperties properties(true, 10, GraphicsAllocation::AllocationType::BUFFER);
|
||||
|
||||
MockMemoryManager::getAllocationData(allocData, properties, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, {}, nullptr);
|
||||
|
||||
EXPECT_TRUE(allocData.flags.forcePin);
|
||||
}
|
||||
@@ -67,7 +67,7 @@ TEST(MemoryManagerGetAlloctionDataTest, givenBufferHostMemoryTypeWhenAllocationD
|
||||
AllocationData allocData;
|
||||
AllocationProperties properties(true, 10, GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY);
|
||||
|
||||
MockMemoryManager::getAllocationData(allocData, properties, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, {}, nullptr);
|
||||
|
||||
EXPECT_TRUE(allocData.flags.forcePin);
|
||||
}
|
||||
@@ -76,7 +76,7 @@ TEST(MemoryManagerGetAlloctionDataTest, givenBufferCompressedTypeWhenAllocationD
|
||||
AllocationData allocData;
|
||||
AllocationProperties properties(true, 10, GraphicsAllocation::AllocationType::BUFFER_COMPRESSED);
|
||||
|
||||
MockMemoryManager::getAllocationData(allocData, properties, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, {}, nullptr);
|
||||
|
||||
EXPECT_TRUE(allocData.flags.forcePin);
|
||||
}
|
||||
@@ -85,19 +85,11 @@ TEST(MemoryManagerGetAlloctionDataTest, givenDefaultAllocationFlagsWhenAllocatio
|
||||
AllocationData allocData;
|
||||
AllocationProperties properties(false, 0, GraphicsAllocation::AllocationType::BUFFER_COMPRESSED);
|
||||
char memory;
|
||||
MockMemoryManager::getAllocationData(allocData, properties, 0, &memory);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, {}, &memory);
|
||||
|
||||
EXPECT_FALSE(allocData.flags.allocateMemory);
|
||||
}
|
||||
|
||||
TEST(MemoryManagerGetAlloctionDataTest, givenSpecificDeviceWhenAllocationDataIsQueriedThenDeviceIsPropagatedToAllocationData) {
|
||||
AllocationData allocData;
|
||||
AllocationProperties properties(true, 0, GraphicsAllocation::AllocationType::BUFFER_COMPRESSED);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, 3u, nullptr);
|
||||
|
||||
EXPECT_EQ(3u, allocData.devicesBitfield);
|
||||
}
|
||||
|
||||
typedef MemoryManagerGetAlloctionDataTest MemoryManagerGetAlloctionData32BitAnd64kbPagesAllowedTest;
|
||||
|
||||
TEST_P(MemoryManagerGetAlloctionData32BitAnd64kbPagesAllowedTest, givenAllocationTypesWith32BitAnd64kbPagesAllowedWhenAllocationDataIsQueriedThenProperFlagsAreSet) {
|
||||
@@ -105,7 +97,7 @@ TEST_P(MemoryManagerGetAlloctionData32BitAnd64kbPagesAllowedTest, givenAllocatio
|
||||
auto allocType = GetParam();
|
||||
AllocationProperties properties(true, 0, allocType);
|
||||
|
||||
MockMemoryManager::getAllocationData(allocData, properties, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, {}, nullptr);
|
||||
|
||||
EXPECT_TRUE(allocData.flags.allow32Bit);
|
||||
EXPECT_TRUE(allocData.flags.allow64kbPages);
|
||||
@@ -117,7 +109,7 @@ TEST_P(MemoryManagerGetAlloctionData32BitAnd64kbPagesAllowedTest, given64kbAllow
|
||||
AllocationData allocData;
|
||||
AllocationProperties properties(true, 10, allocType);
|
||||
|
||||
MockMemoryManager::getAllocationData(allocData, properties, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, {}, nullptr);
|
||||
bool bufferCompressedType = (allocType == GraphicsAllocation::AllocationType::BUFFER_COMPRESSED);
|
||||
EXPECT_TRUE(allocData.flags.allow64kbPages);
|
||||
MockMemoryManager mockMemoryManager(true, false);
|
||||
@@ -136,7 +128,7 @@ TEST_P(MemoryManagerGetAlloctionData32BitAnd64kbPagesNotAllowedTest, givenAlloca
|
||||
auto allocType = GetParam();
|
||||
AllocationProperties properties(true, 0, allocType);
|
||||
|
||||
MockMemoryManager::getAllocationData(allocData, properties, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, {}, nullptr);
|
||||
|
||||
EXPECT_FALSE(allocData.flags.allow32Bit);
|
||||
EXPECT_FALSE(allocData.flags.allow64kbPages);
|
||||
@@ -177,7 +169,7 @@ TEST(MemoryManagerTest, givenForced32BitSetWhenGraphicsMemoryFor32BitAllowedType
|
||||
AllocationData allocData;
|
||||
AllocationProperties properties(true, 10, GraphicsAllocation::AllocationType::BUFFER);
|
||||
|
||||
MockMemoryManager::getAllocationData(allocData, properties, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, {}, nullptr);
|
||||
|
||||
auto allocation = memoryManager.allocateGraphicsMemory(allocData);
|
||||
ASSERT_NE(nullptr, allocation);
|
||||
@@ -200,7 +192,7 @@ TEST(MemoryManagerTest, givenForced32BitEnabledWhenGraphicsMemoryWihtoutAllow32B
|
||||
AllocationData allocData;
|
||||
AllocationProperties properties(true, 10, GraphicsAllocation::AllocationType::BUFFER);
|
||||
|
||||
MockMemoryManager::getAllocationData(allocData, properties, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, {}, nullptr);
|
||||
allocData.flags.allow32Bit = false;
|
||||
|
||||
auto allocation = memoryManager.allocateGraphicsMemory(allocData);
|
||||
@@ -218,7 +210,7 @@ TEST(MemoryManagerTest, givenForced32BitDisabledWhenGraphicsMemoryWith32BitFlagF
|
||||
AllocationData allocData;
|
||||
AllocationProperties properties(true, 10, GraphicsAllocation::AllocationType::BUFFER);
|
||||
|
||||
MockMemoryManager::getAllocationData(allocData, properties, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, {}, nullptr);
|
||||
|
||||
auto allocation = memoryManager.allocateGraphicsMemory(allocData);
|
||||
ASSERT_NE(nullptr, allocation);
|
||||
@@ -233,7 +225,7 @@ TEST(MemoryManagerTest, givenEnabled64kbPagesWhenGraphicsMemoryMustBeHostMemoryA
|
||||
AllocationData allocData;
|
||||
AllocationProperties properties(true, 10, GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY);
|
||||
|
||||
MockMemoryManager::getAllocationData(allocData, properties, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, {}, nullptr);
|
||||
|
||||
auto allocation = memoryManager.allocateGraphicsMemory(allocData);
|
||||
ASSERT_NE(nullptr, allocation);
|
||||
@@ -250,7 +242,7 @@ TEST(MemoryManagerTest, givenEnabled64kbPagesWhenGraphicsMemoryWithoutAllow64kbP
|
||||
AllocationData allocData;
|
||||
AllocationProperties properties(true, 10, GraphicsAllocation::AllocationType::BUFFER);
|
||||
|
||||
MockMemoryManager::getAllocationData(allocData, properties, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, {}, nullptr);
|
||||
allocData.flags.allow64kbPages = false;
|
||||
|
||||
auto allocation = memoryManager.allocateGraphicsMemory(allocData);
|
||||
@@ -266,7 +258,7 @@ TEST(MemoryManagerTest, givenDisabled64kbPagesWhenGraphicsMemoryMustBeHostMemory
|
||||
AllocationData allocData;
|
||||
AllocationProperties properties(true, 10, GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY);
|
||||
|
||||
MockMemoryManager::getAllocationData(allocData, properties, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, {}, nullptr);
|
||||
|
||||
auto allocation = memoryManager.allocateGraphicsMemory(allocData);
|
||||
ASSERT_NE(nullptr, allocation);
|
||||
@@ -285,7 +277,7 @@ TEST(MemoryManagerTest, givenForced32BitAndEnabled64kbPagesWhenGraphicsMemoryMus
|
||||
AllocationData allocData;
|
||||
AllocationProperties properties(true, 10, GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY);
|
||||
|
||||
MockMemoryManager::getAllocationData(allocData, properties, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, {}, nullptr);
|
||||
|
||||
auto allocation = memoryManager.allocateGraphicsMemory(allocData);
|
||||
ASSERT_NE(nullptr, allocation);
|
||||
@@ -305,7 +297,7 @@ TEST(MemoryManagerTest, givenEnabled64kbPagesWhenGraphicsMemoryIsAllocatedWithHo
|
||||
AllocationProperties properties(false, 1, GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY);
|
||||
|
||||
char memory[1];
|
||||
MockMemoryManager::getAllocationData(allocData, properties, 0, &memory);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, {}, &memory);
|
||||
|
||||
auto allocation = memoryManager.allocateGraphicsMemory(allocData);
|
||||
ASSERT_NE(nullptr, allocation);
|
||||
@@ -350,47 +342,47 @@ TEST(MemoryManagerTest, givenMemoryManagerWhenBufferTypeIsPassedAndAllocateInDev
|
||||
|
||||
TEST(MemoryManagerTest, givenSvmAllocationTypeWhenGetAllocationDataIsCalledThenZeroCopyIsRequested) {
|
||||
AllocationData allocData;
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::SVM}, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::SVM}, {}, nullptr);
|
||||
EXPECT_TRUE(allocData.flags.mustBeZeroCopy);
|
||||
EXPECT_TRUE(allocData.flags.allocateMemory);
|
||||
}
|
||||
|
||||
TEST(MemoryManagerTest, givenSvmAllocationTypeWhenGetAllocationDataIsCalledThen64kbPagesAreAllowedAnd32BitAllocationIsDisallowed) {
|
||||
AllocationData allocData;
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::SVM}, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::SVM}, {}, nullptr);
|
||||
EXPECT_TRUE(allocData.flags.allow64kbPages);
|
||||
EXPECT_FALSE(allocData.flags.allow32Bit);
|
||||
}
|
||||
|
||||
TEST(MemoryManagerTest, givenUndecidedTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested) {
|
||||
AllocationData allocData;
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::UNDECIDED}, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::UNDECIDED}, {}, nullptr);
|
||||
EXPECT_TRUE(allocData.flags.useSystemMemory);
|
||||
}
|
||||
|
||||
TEST(MemoryManagerTest, givenFillPatternTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested) {
|
||||
AllocationData allocData;
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::FILL_PATTERN}, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::FILL_PATTERN}, {}, nullptr);
|
||||
EXPECT_TRUE(allocData.flags.useSystemMemory);
|
||||
}
|
||||
|
||||
TEST(MemoryManagerTest, givenLinearStreamTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsNotRequested) {
|
||||
AllocationData allocData;
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::LINEAR_STREAM}, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::LINEAR_STREAM}, {}, nullptr);
|
||||
EXPECT_FALSE(allocData.flags.useSystemMemory);
|
||||
EXPECT_TRUE(allocData.flags.requiresCpuAccess);
|
||||
}
|
||||
|
||||
TEST(MemoryManagerTest, givenTimestampPacketTagBufferTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsNotRequestedAndRequireCpuAccess) {
|
||||
AllocationData allocData;
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::TIMESTAMP_PACKET_TAG_BUFFER}, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::TIMESTAMP_PACKET_TAG_BUFFER}, {}, nullptr);
|
||||
EXPECT_FALSE(allocData.flags.useSystemMemory);
|
||||
EXPECT_TRUE(allocData.flags.requiresCpuAccess);
|
||||
}
|
||||
|
||||
TEST(MemoryManagerTest, givenProfilingTagBufferTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsRequested) {
|
||||
AllocationData allocData;
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::PROFILING_TAG_BUFFER}, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::PROFILING_TAG_BUFFER}, {}, nullptr);
|
||||
EXPECT_TRUE(allocData.flags.useSystemMemory);
|
||||
EXPECT_FALSE(allocData.flags.requiresCpuAccess);
|
||||
}
|
||||
@@ -401,7 +393,7 @@ TEST(MemoryManagerTest, givenAllocationPropertiesWithMultiOsContextCapableFlagEn
|
||||
properties.flags.multiOsContextCapable = true;
|
||||
|
||||
AllocationData allocData;
|
||||
MockMemoryManager::getAllocationData(allocData, properties, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, {}, nullptr);
|
||||
EXPECT_TRUE(allocData.flags.multiOsContextCapable);
|
||||
|
||||
auto allocation = memoryManager.allocateGraphicsMemoryWithProperties(properties);
|
||||
@@ -415,7 +407,7 @@ TEST(MemoryManagerTest, givenAllocationPropertiesWithMultiOsContextCapableFlagDi
|
||||
properties.flags.multiOsContextCapable = false;
|
||||
|
||||
AllocationData allocData;
|
||||
MockMemoryManager::getAllocationData(allocData, properties, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, properties, {}, nullptr);
|
||||
EXPECT_FALSE(allocData.flags.multiOsContextCapable);
|
||||
|
||||
auto allocation = memoryManager.allocateGraphicsMemoryWithProperties(properties);
|
||||
@@ -425,31 +417,31 @@ TEST(MemoryManagerTest, givenAllocationPropertiesWithMultiOsContextCapableFlagDi
|
||||
|
||||
TEST(MemoryManagerTest, givenInternalHeapTypeWhenGetAllocationDataIsCalledThenInternalAllocationIsRequested) {
|
||||
AllocationData allocData;
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::INTERNAL_HEAP}, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::INTERNAL_HEAP}, {}, nullptr);
|
||||
EXPECT_EQ(AllocationOrigin::INTERNAL_ALLOCATION, allocData.allocationOrigin);
|
||||
}
|
||||
TEST(MemoryManagerTest, givenInternalHeapTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsNotRequested) {
|
||||
AllocationData allocData;
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::INTERNAL_HEAP}, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::INTERNAL_HEAP}, {}, nullptr);
|
||||
EXPECT_FALSE(allocData.flags.useSystemMemory);
|
||||
EXPECT_TRUE(allocData.flags.requiresCpuAccess);
|
||||
}
|
||||
TEST(MemoryManagerTest, givenKernelIsaTypeWhenGetAllocationDataIsCalledThenSystemMemoryIsNotRequested) {
|
||||
AllocationData allocData;
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::KERNEL_ISA}, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::KERNEL_ISA}, {}, nullptr);
|
||||
EXPECT_FALSE(allocData.flags.useSystemMemory);
|
||||
EXPECT_TRUE(allocData.flags.requiresCpuAccess);
|
||||
}
|
||||
|
||||
TEST(MemoryManagerTest, givenLinearStreamWhenGetAllocationDataIsCalledThenSystemMemoryIsNotRequested) {
|
||||
AllocationData allocData;
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::LINEAR_STREAM}, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::LINEAR_STREAM}, {}, nullptr);
|
||||
EXPECT_FALSE(allocData.flags.useSystemMemory);
|
||||
EXPECT_TRUE(allocData.flags.requiresCpuAccess);
|
||||
}
|
||||
|
||||
TEST(MemoryManagerTest, givenKernelIsaTypeWhenGetAllocationDataIsCalledThenInternalAllocationIsRequested) {
|
||||
AllocationData allocData;
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::KERNEL_ISA}, 0, nullptr);
|
||||
MockMemoryManager::getAllocationData(allocData, {1, GraphicsAllocation::AllocationType::KERNEL_ISA}, {}, nullptr);
|
||||
EXPECT_EQ(AllocationOrigin::INTERNAL_ALLOCATION, allocData.allocationOrigin);
|
||||
}
|
||||
|
||||
@@ -92,9 +92,9 @@ class TestedDrmMemoryManager : public DrmMemoryManager {
|
||||
bool allocateMemory = ptr == nullptr;
|
||||
AllocationData allocationData;
|
||||
if (allocationOrigin == AllocationOrigin::EXTERNAL_ALLOCATION) {
|
||||
getAllocationData(allocationData, MockAllocationProperties::getPropertiesFor32BitExternalAllocation(size, allocateMemory), 0u, ptr);
|
||||
getAllocationData(allocationData, MockAllocationProperties::getPropertiesFor32BitExternalAllocation(size, allocateMemory), {}, ptr);
|
||||
} else {
|
||||
getAllocationData(allocationData, MockAllocationProperties::getPropertiesFor32BitInternalAllocation(size, allocateMemory), 0u, ptr);
|
||||
getAllocationData(allocationData, MockAllocationProperties::getPropertiesFor32BitInternalAllocation(size, allocateMemory), {}, ptr);
|
||||
}
|
||||
return allocate32BitGraphicsMemoryImpl(allocationData);
|
||||
}
|
||||
|
||||
@@ -81,8 +81,8 @@ struct MockAubCsr : public AUBCommandStreamReceiverHw<GfxFamily> {
|
||||
AUBCommandStreamReceiverHw<GfxFamily>::initializeEngine();
|
||||
initializeEngineCalled = true;
|
||||
}
|
||||
void writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits, DevicesBitfield devicesBitfield) override {
|
||||
AUBCommandStreamReceiverHw<GfxFamily>::writeMemory(gpuAddress, cpuAddress, size, memoryBank, entryBits, devicesBitfield);
|
||||
void writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits) override {
|
||||
AUBCommandStreamReceiverHw<GfxFamily>::writeMemory(gpuAddress, cpuAddress, size, memoryBank, entryBits);
|
||||
writeMemoryCalled = true;
|
||||
}
|
||||
void submitBatchBuffer(uint64_t batchBufferGpuAddress, const void *batchBuffer, size_t batchBufferSize, uint32_t memoryBank, uint64_t entryBits) override {
|
||||
|
||||
@@ -51,7 +51,7 @@ GraphicsAllocation *MockMemoryManager::allocateGraphicsMemory64kb(AllocationData
|
||||
|
||||
auto allocation = OsAgnosticMemoryManager::allocateGraphicsMemory64kb(allocationData);
|
||||
if (allocation) {
|
||||
allocation->gmm = new Gmm(allocation->getUnderlyingBuffer(), allocationData.size, false, preferRenderCompressedFlagPassed, true, 0);
|
||||
allocation->gmm = new Gmm(allocation->getUnderlyingBuffer(), allocationData.size, false, preferRenderCompressedFlagPassed, true, {});
|
||||
allocation->gmm->isRenderCompressed = preferRenderCompressedFlagPassed;
|
||||
}
|
||||
return allocation;
|
||||
@@ -85,9 +85,9 @@ GraphicsAllocation *MockMemoryManager::allocate32BitGraphicsMemory(size_t size,
|
||||
bool allocateMemory = ptr == nullptr;
|
||||
AllocationData allocationData;
|
||||
if (allocationOrigin == AllocationOrigin::EXTERNAL_ALLOCATION) {
|
||||
getAllocationData(allocationData, MockAllocationProperties::getPropertiesFor32BitExternalAllocation(size, allocateMemory), 0u, ptr);
|
||||
getAllocationData(allocationData, MockAllocationProperties::getPropertiesFor32BitExternalAllocation(size, allocateMemory), {}, ptr);
|
||||
} else {
|
||||
getAllocationData(allocationData, MockAllocationProperties::getPropertiesFor32BitInternalAllocation(size, allocateMemory), 0u, ptr);
|
||||
getAllocationData(allocationData, MockAllocationProperties::getPropertiesFor32BitInternalAllocation(size, allocateMemory), {}, ptr);
|
||||
}
|
||||
return allocate32BitGraphicsMemoryImpl(allocationData);
|
||||
}
|
||||
|
||||
@@ -49,8 +49,8 @@ class MockTbxCsr : public TbxCommandStreamReceiverHw<GfxFamily> {
|
||||
writeMemoryWithAubManagerCalled = true;
|
||||
}
|
||||
|
||||
void writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits, DevicesBitfield devicesBitfield) override {
|
||||
TbxCommandStreamReceiverHw<GfxFamily>::writeMemory(gpuAddress, cpuAddress, size, memoryBank, entryBits, devicesBitfield);
|
||||
void writeMemory(uint64_t gpuAddress, void *cpuAddress, size_t size, uint32_t memoryBank, uint64_t entryBits) override {
|
||||
TbxCommandStreamReceiverHw<GfxFamily>::writeMemory(gpuAddress, cpuAddress, size, memoryBank, entryBits);
|
||||
writeMemoryCalled = true;
|
||||
}
|
||||
void submitBatchBuffer(uint64_t batchBufferGpuAddress, const void *batchBuffer, size_t batchBufferSize, uint32_t memoryBank, uint64_t entryBits) override {
|
||||
|
||||
@@ -37,9 +37,9 @@ class MockWddmMemoryManager : public WddmMemoryManager {
|
||||
bool allocateMemory = ptr == nullptr;
|
||||
AllocationData allocationData;
|
||||
if (allocationOrigin == AllocationOrigin::EXTERNAL_ALLOCATION) {
|
||||
getAllocationData(allocationData, MockAllocationProperties::getPropertiesFor32BitExternalAllocation(size, allocateMemory), 0u, ptr);
|
||||
getAllocationData(allocationData, MockAllocationProperties::getPropertiesFor32BitExternalAllocation(size, allocateMemory), {}, ptr);
|
||||
} else {
|
||||
getAllocationData(allocationData, MockAllocationProperties::getPropertiesFor32BitInternalAllocation(size, allocateMemory), 0u, ptr);
|
||||
getAllocationData(allocationData, MockAllocationProperties::getPropertiesFor32BitInternalAllocation(size, allocateMemory), {}, ptr);
|
||||
}
|
||||
return allocate32BitGraphicsMemoryImpl(allocationData);
|
||||
}
|
||||
|
||||
@@ -1094,9 +1094,9 @@ TEST_F(WddmMemoryManagerWithAsyncDeleterTest, givenMemoryManagerWithAsyncDeleter
|
||||
deleter->expectDrainBlockingValue(true);
|
||||
|
||||
AllocationProperties allocProperties = MemObjHelper::getAllocationProperties(&imgInfo, true);
|
||||
DevicesBitfield devices = 0;
|
||||
DevicesBitfield devicesBitfield = {};
|
||||
|
||||
memoryManager->allocateGraphicsMemoryInPreferredPool(allocProperties, devices, nullptr);
|
||||
memoryManager->allocateGraphicsMemoryInPreferredPool(allocProperties, devicesBitfield, nullptr);
|
||||
EXPECT_EQ(1, deleter->drainCalled);
|
||||
EXPECT_EQ(2u, wddm->createAllocationResult.called);
|
||||
}
|
||||
@@ -1114,9 +1114,9 @@ TEST_F(WddmMemoryManagerWithAsyncDeleterTest, givenMemoryManagerWithAsyncDeleter
|
||||
EXPECT_EQ(0u, wddm->mapGpuVirtualAddressResult.called);
|
||||
|
||||
AllocationProperties allocProperties = MemObjHelper::getAllocationProperties(&imgInfo, true);
|
||||
DevicesBitfield devices = 0;
|
||||
DevicesBitfield devicesBitfield = {};
|
||||
|
||||
auto allocation = memoryManager->allocateGraphicsMemoryInPreferredPool(allocProperties, devices, nullptr);
|
||||
auto allocation = memoryManager->allocateGraphicsMemoryInPreferredPool(allocProperties, devicesBitfield, nullptr);
|
||||
EXPECT_EQ(0, deleter->drainCalled);
|
||||
EXPECT_EQ(1u, wddm->createAllocationResult.called);
|
||||
EXPECT_EQ(1u, wddm->mapGpuVirtualAddressResult.called);
|
||||
@@ -1133,9 +1133,9 @@ TEST_F(WddmMemoryManagerWithAsyncDeleterTest, givenMemoryManagerWithoutAsyncDele
|
||||
EXPECT_EQ(0u, wddm->createAllocationResult.called);
|
||||
|
||||
AllocationProperties allocProperties = MemObjHelper::getAllocationProperties(&imgInfo, true);
|
||||
DevicesBitfield devices = 0;
|
||||
DevicesBitfield devicesBitfield = {};
|
||||
|
||||
memoryManager->allocateGraphicsMemoryInPreferredPool(allocProperties, devices, nullptr);
|
||||
memoryManager->allocateGraphicsMemoryInPreferredPool(allocProperties, devicesBitfield, nullptr);
|
||||
EXPECT_EQ(1u, wddm->createAllocationResult.called);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user