From f24b428cf710926c6151ad9a3f6b9b40523d8dfe Mon Sep 17 00:00:00 2001 From: "Dunajski, Bartosz" Date: Tue, 5 Mar 2019 18:50:10 +0100 Subject: [PATCH] Improve HardwareContextController creation Change-Id: Iba929a2b4fcd993b38dd674be578aad0a481e8de Signed-off-by: Dunajski, Bartosz --- ...nd_stream_receiver_simulated_common_hw.inl | 7 +--- runtime/device/device.cpp | 2 +- .../helpers/hardware_context_controller.cpp | 20 +++++----- runtime/helpers/hardware_context_controller.h | 1 - runtime/memory_manager/memory_manager.cpp | 4 +- runtime/memory_manager/memory_manager.h | 2 +- .../os_interface/linux/os_context_linux.cpp | 10 ++--- runtime/os_interface/linux/os_context_linux.h | 2 +- runtime/os_interface/os_context.h | 21 ++++++++--- .../os_interface/windows/os_context_win.cpp | 10 ++--- runtime/os_interface/windows/os_context_win.h | 2 +- .../aub_command_stream_receiver_1_tests.cpp | 37 ++++++++----------- unit_tests/device/device_tests.cpp | 2 + .../memory_manager/memory_manager_tests.cpp | 17 ++++----- 14 files changed, 66 insertions(+), 71 deletions(-) diff --git a/runtime/command_stream/command_stream_receiver_simulated_common_hw.inl b/runtime/command_stream/command_stream_receiver_simulated_common_hw.inl index 0da4739ed2..f35a92dec9 100644 --- a/runtime/command_stream/command_stream_receiver_simulated_common_hw.inl +++ b/runtime/command_stream/command_stream_receiver_simulated_common_hw.inl @@ -96,12 +96,7 @@ void CommandStreamReceiverSimulatedCommonHw::setupContext(OsContext & auto &engineType = osContext.getEngineType(); if (aubManager && !(engineType.type == lowPriorityGpgpuEngine.type && engineType.id == lowPriorityGpgpuEngine.id)) { - if (osContext.getNumDevicesSupported() == 1) { - hardwareContextController = std::make_unique(*aubManager, osContext, - deviceIndex, engineIndex, flags); - } else { - hardwareContextController = std::make_unique(*aubManager, osContext, engineIndex, flags); - } + hardwareContextController = std::make_unique(*aubManager, osContext, engineIndex, flags); } } diff --git a/runtime/device/device.cpp b/runtime/device/device.cpp index 5e469c9ace..ec24573f68 100644 --- a/runtime/device/device.cpp +++ b/runtime/device/device.cpp @@ -179,7 +179,7 @@ bool Device::createEngines(const HardwareInfo *pHwInfo) { auto commandStreamReceiver = executionEnvironment->commandStreamReceivers[getDeviceIndex()][deviceCsrIndex].get(); auto osContext = executionEnvironment->memoryManager->createAndRegisterOsContext(commandStreamReceiver, gpgpuEngines[deviceCsrIndex], - 1, preemptionMode); + (1 << getDeviceIndex()), preemptionMode); commandStreamReceiver->setupContext(*osContext); if (!commandStreamReceiver->initializeTagAllocation()) { diff --git a/runtime/helpers/hardware_context_controller.cpp b/runtime/helpers/hardware_context_controller.cpp index 769add5c84..c840c7085b 100644 --- a/runtime/helpers/hardware_context_controller.cpp +++ b/runtime/helpers/hardware_context_controller.cpp @@ -7,22 +7,20 @@ #include "runtime/helpers/hardware_context_controller.h" +#include "common/helpers/bit_helpers.h" #include "runtime/memory_manager/memory_constants.h" #include "runtime/os_interface/os_context.h" +#include + using namespace OCLRT; -HardwareContextController::HardwareContextController(aub_stream::AubManager &aubManager, OsContext &osContext, - uint32_t deviceIndex, uint32_t engineIndex, uint32_t flags) { - UNRECOVERABLE_IF(osContext.getNumDevicesSupported() > 1); - hardwareContexts.emplace_back(aubManager.createHardwareContext(deviceIndex, engineIndex, flags)); -} - -HardwareContextController::HardwareContextController(aub_stream::AubManager &aubManager, OsContext &osContext, - uint32_t engineIndex, uint32_t flags) { - DEBUG_BREAK_IF(osContext.getNumDevicesSupported() < 2); - for (uint32_t deviceIndex = 0; deviceIndex < osContext.getNumDevicesSupported(); deviceIndex++) { - hardwareContexts.emplace_back(aubManager.createHardwareContext(deviceIndex, engineIndex, flags)); +HardwareContextController::HardwareContextController(aub_stream::AubManager &aubManager, OsContext &osContext, uint32_t engineIndex, uint32_t flags) { + constexpr uint32_t maxIndex = std::numeric_limits::digits; + for (uint32_t deviceIndex = 0; deviceIndex < maxIndex; deviceIndex++) { + if (isBitSet(osContext.getDeviceBitfiled(), deviceIndex)) { + hardwareContexts.emplace_back(aubManager.createHardwareContext(deviceIndex, engineIndex, flags)); + } } } diff --git a/runtime/helpers/hardware_context_controller.h b/runtime/helpers/hardware_context_controller.h index e25440178e..fa564dde1c 100644 --- a/runtime/helpers/hardware_context_controller.h +++ b/runtime/helpers/hardware_context_controller.h @@ -18,7 +18,6 @@ class OsContext; class HardwareContextController { public: HardwareContextController() = delete; - HardwareContextController(aub_stream::AubManager &aubManager, OsContext &osContext, uint32_t deviceIndex, uint32_t engineIndex, uint32_t flags); HardwareContextController(aub_stream::AubManager &aubManager, OsContext &osContext, uint32_t engineIndex, uint32_t flags); void initialize(); diff --git a/runtime/memory_manager/memory_manager.cpp b/runtime/memory_manager/memory_manager.cpp index 6d18672a40..2d29dc4732 100644 --- a/runtime/memory_manager/memory_manager.cpp +++ b/runtime/memory_manager/memory_manager.cpp @@ -180,9 +180,9 @@ bool MemoryManager::isMemoryBudgetExhausted() const { } OsContext *MemoryManager::createAndRegisterOsContext(CommandStreamReceiver *commandStreamReceiver, EngineInstanceT engineType, - uint32_t numSupportedDevices, PreemptionMode preemptionMode) { + uint32_t deviceBitfiled, PreemptionMode preemptionMode) { auto contextId = ++latestContextId; - auto osContext = OsContext::create(executionEnvironment.osInterface.get(), contextId, numSupportedDevices, engineType, preemptionMode); + auto osContext = OsContext::create(executionEnvironment.osInterface.get(), contextId, deviceBitfiled, engineType, preemptionMode); osContext->incRefInternal(); registeredEngines.emplace_back(commandStreamReceiver, osContext); diff --git a/runtime/memory_manager/memory_manager.h b/runtime/memory_manager/memory_manager.h index 35862a9d0b..17984832f4 100644 --- a/runtime/memory_manager/memory_manager.h +++ b/runtime/memory_manager/memory_manager.h @@ -184,7 +184,7 @@ class MemoryManager { } OsContext *createAndRegisterOsContext(CommandStreamReceiver *commandStreamReceiver, EngineInstanceT engineType, - uint32_t numSupportedDevices, PreemptionMode preemptionMode); + uint32_t deviceBitfiled, PreemptionMode preemptionMode); uint32_t getRegisteredEnginesCount() const { return static_cast(registeredEngines.size()); } CommandStreamReceiver *getDefaultCommandStreamReceiver(uint32_t deviceId) const; EngineControlContainer &getRegisteredEngines(); diff --git a/runtime/os_interface/linux/os_context_linux.cpp b/runtime/os_interface/linux/os_context_linux.cpp index 5bc42847a8..24fb5b8525 100644 --- a/runtime/os_interface/linux/os_context_linux.cpp +++ b/runtime/os_interface/linux/os_context_linux.cpp @@ -14,17 +14,17 @@ namespace OCLRT { -OsContext *OsContext::create(OSInterface *osInterface, uint32_t contextId, uint32_t numDevicesSupported, +OsContext *OsContext::create(OSInterface *osInterface, uint32_t contextId, uint32_t deviceBitfiled, EngineInstanceT engineType, PreemptionMode preemptionMode) { if (osInterface) { - return new OsContextLinux(*osInterface->get()->getDrm(), contextId, numDevicesSupported, engineType, preemptionMode); + return new OsContextLinux(*osInterface->get()->getDrm(), contextId, deviceBitfiled, engineType, preemptionMode); } - return new OsContext(contextId, numDevicesSupported, engineType, preemptionMode); + return new OsContext(contextId, deviceBitfiled, engineType, preemptionMode); } -OsContextLinux::OsContextLinux(Drm &drm, uint32_t contextId, uint32_t numDevicesSupported, +OsContextLinux::OsContextLinux(Drm &drm, uint32_t contextId, uint32_t deviceBitfiled, EngineInstanceT engineType, PreemptionMode preemptionMode) - : OsContext(contextId, numDevicesSupported, engineType, preemptionMode), drm(drm) { + : OsContext(contextId, deviceBitfiled, engineType, preemptionMode), drm(drm) { engineFlag = DrmEngineMapper::engineNodeMap(engineType.type); this->drmContextId = drm.createDrmContext(); diff --git a/runtime/os_interface/linux/os_context_linux.h b/runtime/os_interface/linux/os_context_linux.h index d5039a8bff..7ac4847a93 100644 --- a/runtime/os_interface/linux/os_context_linux.h +++ b/runtime/os_interface/linux/os_context_linux.h @@ -14,7 +14,7 @@ class OsContextLinux : public OsContext { public: OsContextLinux() = delete; ~OsContextLinux() override; - OsContextLinux(Drm &drm, uint32_t contextId, uint32_t numDevicesSupported, + OsContextLinux(Drm &drm, uint32_t contextId, uint32_t deviceBitfiled, EngineInstanceT engineType, PreemptionMode preemptionMode); unsigned int getEngineFlag() const { return engineFlag; } diff --git a/runtime/os_interface/os_context.h b/runtime/os_interface/os_context.h index 25e453e8ae..edca2b336d 100644 --- a/runtime/os_interface/os_context.h +++ b/runtime/os_interface/os_context.h @@ -6,11 +6,13 @@ */ #pragma once +#include "common/helpers/bit_helpers.h" #include "runtime/command_stream/preemption_mode.h" #include "runtime/utilities/reference_tracked_object.h" #include "engine_node.h" +#include #include namespace OCLRT { @@ -20,19 +22,28 @@ class OsContext : public ReferenceTrackedObject { public: OsContext() = delete; - static OsContext *create(OSInterface *osInterface, uint32_t contextId, uint32_t numDevicesSupported, EngineInstanceT engineType, PreemptionMode preemptionMode); + static OsContext *create(OSInterface *osInterface, uint32_t contextId, uint32_t deviceBitfiled, EngineInstanceT engineType, PreemptionMode preemptionMode); uint32_t getContextId() const { return contextId; } - uint32_t getNumDevicesSupported() const { return numDevicesSupported; } + uint32_t getNumSupportedDevices() const { return numSupportedDevices; } + uint8_t getDeviceBitfiled() const { return deviceBitfiled; } PreemptionMode getPreemptionMode() const { return preemptionMode; } EngineInstanceT &getEngineType() { return engineType; } protected: - OsContext(uint32_t contextId, uint32_t numDevicesSupported, EngineInstanceT engineType, PreemptionMode preemptionMode) - : contextId(contextId), numDevicesSupported(numDevicesSupported), preemptionMode(preemptionMode), engineType(engineType){}; + OsContext(uint32_t contextId, uint32_t deviceBitfiled, EngineInstanceT engineType, PreemptionMode preemptionMode) + : contextId(contextId), deviceBitfiled(deviceBitfiled), preemptionMode(preemptionMode), engineType(engineType) { + constexpr uint32_t maxIndex = std::numeric_limits::digits; + for (uint32_t deviceIndex = 0; deviceIndex < maxIndex; deviceIndex++) { + if (isBitSet(deviceBitfiled, deviceIndex)) { + numSupportedDevices++; + } + } + }; const uint32_t contextId; - const uint32_t numDevicesSupported; + const uint32_t deviceBitfiled; const PreemptionMode preemptionMode; + uint32_t numSupportedDevices = 0; EngineInstanceT engineType = {EngineType::ENGINE_RCS, 0}; }; } // namespace OCLRT diff --git a/runtime/os_interface/windows/os_context_win.cpp b/runtime/os_interface/windows/os_context_win.cpp index ec9c56c799..8efc8b8667 100644 --- a/runtime/os_interface/windows/os_context_win.cpp +++ b/runtime/os_interface/windows/os_context_win.cpp @@ -13,17 +13,17 @@ namespace OCLRT { -OsContext *OsContext::create(OSInterface *osInterface, uint32_t contextId, uint32_t numDevicesSupported, +OsContext *OsContext::create(OSInterface *osInterface, uint32_t contextId, uint32_t deviceBitfiled, EngineInstanceT engineType, PreemptionMode preemptionMode) { if (osInterface) { - return new OsContextWin(*osInterface->get()->getWddm(), contextId, numDevicesSupported, engineType, preemptionMode); + return new OsContextWin(*osInterface->get()->getWddm(), contextId, deviceBitfiled, engineType, preemptionMode); } - return new OsContext(contextId, numDevicesSupported, engineType, preemptionMode); + return new OsContext(contextId, deviceBitfiled, engineType, preemptionMode); } -OsContextWin::OsContextWin(Wddm &wddm, uint32_t contextId, uint32_t numDevicesSupported, +OsContextWin::OsContextWin(Wddm &wddm, uint32_t contextId, uint32_t deviceBitfiled, EngineInstanceT engineType, PreemptionMode preemptionMode) - : OsContext(contextId, numDevicesSupported, engineType, preemptionMode), wddm(wddm), residencyController(wddm, contextId) { + : OsContext(contextId, deviceBitfiled, engineType, preemptionMode), wddm(wddm), residencyController(wddm, contextId) { UNRECOVERABLE_IF(!wddm.isInitialized()); diff --git a/runtime/os_interface/windows/os_context_win.h b/runtime/os_interface/windows/os_context_win.h index 507216c91d..4ec239edb9 100644 --- a/runtime/os_interface/windows/os_context_win.h +++ b/runtime/os_interface/windows/os_context_win.h @@ -17,7 +17,7 @@ class OsContextWin : public OsContext { OsContextWin() = delete; ~OsContextWin() override; - OsContextWin(Wddm &wddm, uint32_t contextId, uint32_t numDevicesSupported, + OsContextWin(Wddm &wddm, uint32_t contextId, uint32_t deviceBitfiled, EngineInstanceT engineType, PreemptionMode preemptionMode); D3DKMT_HANDLE getWddmContextHandle() const { return wddmContextHandle; } diff --git a/unit_tests/command_stream/aub_command_stream_receiver_1_tests.cpp b/unit_tests/command_stream/aub_command_stream_receiver_1_tests.cpp index c6ca25a08b..15b4f4fbde 100644 --- a/unit_tests/command_stream/aub_command_stream_receiver_1_tests.cpp +++ b/unit_tests/command_stream/aub_command_stream_receiver_1_tests.cpp @@ -203,7 +203,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCsrWhenOsContextIsSetThenCreateH uint32_t engineIndex = 2; uint32_t deviceIndex = 3; - MockOsContext osContext(nullptr, 0, 1, allEngineInstances[engineIndex], PreemptionMode::Disabled); + MockOsContext osContext(nullptr, 0, 8, allEngineInstances[engineIndex], PreemptionMode::Disabled); std::string fileName = "file_name.aub"; MockAubManager *mockManager = new MockAubManager(); MockAubCenter *mockAubCenter = new MockAubCenter(platformDevices[0], false, fileName, CommandStreamReceiverType::CSR_AUB); @@ -802,12 +802,12 @@ HWTEST_F(AubCommandStreamReceiverTests, givenOsContextWithMultipleDevicesSupport mockAubCenter->aubManager = std::make_unique(); pDevice->executionEnvironment->aubCenter.reset(mockAubCenter); - uint32_t numSupportedDevices = 3; - MockOsContext osContext(nullptr, 1, numSupportedDevices, {EngineType::ENGINE_RCS, 0}, PreemptionMode::Disabled); + uint32_t deviceBitfield = 3; + MockOsContext osContext(nullptr, 1, deviceBitfield, {EngineType::ENGINE_RCS, 0}, PreemptionMode::Disabled); auto aubCsr = std::make_unique>(*platformDevices[0], "", true, *pDevice->executionEnvironment); aubCsr->setupContext(osContext); - EXPECT_EQ(numSupportedDevices, aubCsr->hardwareContextController->hardwareContexts.size()); + EXPECT_EQ(2u, aubCsr->hardwareContextController->hardwareContexts.size()); } HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverWhenGraphicsAllocationTypeIsntNonAubWritableThenWriteMemoryIsAllowed) { @@ -1111,21 +1111,14 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInStandalon using HardwareContextContainerTests = ::testing::Test; -TEST_F(HardwareContextContainerTests, givenDeviceIndexWhenOsContextWithMultipleDevicesSupportedThenAbort) { - MockAubManager aubManager; - uint32_t numSupportedDevices = 2; - uint32_t deviceIndex = 1; - MockOsContext osContext(nullptr, 1, numSupportedDevices, {EngineType::ENGINE_RCS, 0}, PreemptionMode::Disabled); - - EXPECT_THROW(HardwareContextController(aubManager, osContext, deviceIndex, 0, 0), std::exception); -} - TEST_F(HardwareContextContainerTests, givenOsContextWithMultipleDevicesSupportedThenInitialzeHwContextsWithValidIndexes) { MockAubManager aubManager; - uint32_t numSupportedDevices = 2; - MockOsContext osContext(nullptr, 1, numSupportedDevices, {EngineType::ENGINE_RCS, 0}, PreemptionMode::Disabled); + uint32_t deviceBitfield = 3; + MockOsContext osContext(nullptr, 1, deviceBitfield, {EngineType::ENGINE_RCS, 0}, PreemptionMode::Disabled); HardwareContextController hwContextControler(aubManager, osContext, 0, 0); + EXPECT_EQ(2u, hwContextControler.hardwareContexts.size()); + EXPECT_EQ(2u, osContext.getNumSupportedDevices()); auto mockHwContext0 = static_cast(hwContextControler.hardwareContexts[0].get()); auto mockHwContext1 = static_cast(hwContextControler.hardwareContexts[1].get()); EXPECT_EQ(0u, mockHwContext0->deviceIndex); @@ -1134,10 +1127,10 @@ TEST_F(HardwareContextContainerTests, givenOsContextWithMultipleDevicesSupported TEST_F(HardwareContextContainerTests, givenMultipleHwContextWhenSingleMethodIsCalledThenUseAllContexts) { MockAubManager aubManager; - uint32_t numSupportedDevices = 2; - MockOsContext osContext(nullptr, 1, numSupportedDevices, {EngineType::ENGINE_RCS, 0}, PreemptionMode::Disabled); - HardwareContextController hwContextContainer(aubManager, osContext, numSupportedDevices, 0); - EXPECT_EQ(numSupportedDevices, hwContextContainer.hardwareContexts.size()); + uint32_t deviceBitfield = 3; + MockOsContext osContext(nullptr, 1, deviceBitfield, {EngineType::ENGINE_RCS, 0}, PreemptionMode::Disabled); + HardwareContextController hwContextContainer(aubManager, osContext, deviceBitfield, 0); + EXPECT_EQ(2u, hwContextContainer.hardwareContexts.size()); auto mockHwContext0 = static_cast(hwContextContainer.hardwareContexts[0].get()); auto mockHwContext1 = static_cast(hwContextContainer.hardwareContexts[1].get()); @@ -1173,10 +1166,10 @@ TEST_F(HardwareContextContainerTests, givenMultipleHwContextWhenSingleMethodIsCa TEST_F(HardwareContextContainerTests, givenMultipleHwContextWhenSingleMethodIsCalledThenUseFirstContext) { MockAubManager aubManager; - uint32_t numSupportedDevices = 2; - MockOsContext osContext(nullptr, 1, numSupportedDevices, {EngineType::ENGINE_RCS, 0}, PreemptionMode::Disabled); + uint32_t deviceBitfield = 3; + MockOsContext osContext(nullptr, 1, deviceBitfield, {EngineType::ENGINE_RCS, 0}, PreemptionMode::Disabled); HardwareContextController hwContextContainer(aubManager, osContext, 2, 0); - EXPECT_EQ(numSupportedDevices, hwContextContainer.hardwareContexts.size()); + EXPECT_EQ(2u, hwContextContainer.hardwareContexts.size()); auto mockHwContext0 = static_cast(hwContextContainer.hardwareContexts[0].get()); auto mockHwContext1 = static_cast(hwContextContainer.hardwareContexts[1].get()); diff --git a/unit_tests/device/device_tests.cpp b/unit_tests/device/device_tests.cpp index 933d80eba9..dace5eaccb 100644 --- a/unit_tests/device/device_tests.cpp +++ b/unit_tests/device/device_tests.cpp @@ -170,7 +170,9 @@ TEST(DeviceCreation, givenMultiDeviceWhenTheyAreCreatedThenEachOsContextHasUniqu for (uint32_t i = 0; i < numGpgpuEngines; i++) { EXPECT_EQ(i, device1->getEngine(i).osContext->getContextId()); + EXPECT_EQ(1u, device1->getEngine(i).osContext->getDeviceBitfiled()); EXPECT_EQ(i + numGpgpuEngines, device2->getEngine(i).osContext->getContextId()); + EXPECT_EQ(2u, device2->getEngine(i).osContext->getDeviceBitfiled()); EXPECT_EQ(registeredEngines[i].commandStreamReceiver, device1->getEngine(i).commandStreamReceiver); diff --git a/unit_tests/memory_manager/memory_manager_tests.cpp b/unit_tests/memory_manager/memory_manager_tests.cpp index d05f45238e..17e9f54a62 100644 --- a/unit_tests/memory_manager/memory_manager_tests.cpp +++ b/unit_tests/memory_manager/memory_manager_tests.cpp @@ -1528,13 +1528,16 @@ TEST(ResidencyDataTest, givenOsContextWhenItIsRegisteredToMemoryManagerThenRefCo EXPECT_EQ(1, memoryManager.registeredEngines[0].osContext->getRefInternalCount()); } -TEST(ResidencyDataTest, givenNumberOfSupportedDevicesWhenCreatingOsContextThenSetValidValue) { +TEST(ResidencyDataTest, givenDeviceBitfieldWhenCreatingOsContextThenSetValidValue) { ExecutionEnvironment executionEnvironment; MockMemoryManager memoryManager(false, false, executionEnvironment); - uint32_t numSupportedDevices = 3; + uint32_t deviceBitfield = 3; + PreemptionMode preemptionMode = PreemptionMode::MidThread; memoryManager.createAndRegisterOsContext(nullptr, HwHelper::get(platformDevices[0]->pPlatform->eRenderCoreFamily).getGpgpuEngineInstances()[0], - numSupportedDevices, PreemptionHelper::getDefaultPreemptionMode(*platformDevices[0])); - EXPECT_EQ(numSupportedDevices, memoryManager.registeredEngines[0].osContext->getNumDevicesSupported()); + deviceBitfield, preemptionMode); + EXPECT_EQ(2u, memoryManager.registeredEngines[0].osContext->getNumSupportedDevices()); + EXPECT_EQ(deviceBitfield, memoryManager.registeredEngines[0].osContext->getDeviceBitfiled()); + EXPECT_EQ(preemptionMode, memoryManager.registeredEngines[0].osContext->getPreemptionMode()); } TEST(ResidencyDataTest, givenTwoOsContextsWhenTheyAreRegistredFromHigherToLowerThenProperSizeIsReturned) { @@ -1614,12 +1617,6 @@ TEST(MemoryManagerTest, givenMemoryManagerWhenAllocationWasNotUnlockedThenItIsUn EXPECT_EQ(1u, memoryManager.unlockResourceCalled); } -TEST(OsContextTest, givenOsContextWithNumberOfSupportedDevicesAndPreemptiomModeWhenConstructingThenUsePassedValue) { - MockOsContext osContext(nullptr, 5, 7, {EngineType::ENGINE_RCS, 0}, PreemptionMode::MidThread); - EXPECT_EQ(7u, osContext.getNumDevicesSupported()); - EXPECT_EQ(PreemptionMode::MidThread, osContext.getPreemptionMode()); -} - TEST(HeapSelectorTest, given32bitInternalAllocationWhenSelectingHeapThenInternalHeapIsUsed) { GraphicsAllocation allocation{GraphicsAllocation::AllocationType::UNKNOWN, nullptr, 0, 0, 0, MemoryPool::MemoryNull, false}; allocation.set32BitAllocation(true);