Move AllocationType enum out of GraphicsAllocation class

Signed-off-by: Bartosz Dunajski <bartosz.dunajski@intel.com>
This commit is contained in:
Bartosz Dunajski
2022-02-04 13:59:01 +00:00
committed by Compute-Runtime-Automation
parent fd27098194
commit 4b0d986876
262 changed files with 2075 additions and 2063 deletions

View File

@@ -144,7 +144,7 @@ struct Device : _ze_device_handle_t {
virtual SysmanDevice *getSysmanHandle() = 0;
virtual ze_result_t getCsrForOrdinalAndIndex(NEO::CommandStreamReceiver **csr, uint32_t ordinal, uint32_t index) = 0;
virtual ze_result_t getCsrForLowPriority(NEO::CommandStreamReceiver **csr) = 0;
virtual NEO::GraphicsAllocation *obtainReusableAllocation(size_t requiredSize, NEO::GraphicsAllocation::AllocationType type) = 0;
virtual NEO::GraphicsAllocation *obtainReusableAllocation(size_t requiredSize, NEO::AllocationType type) = 0;
virtual void storeReusableAllocation(NEO::GraphicsAllocation &alloc) = 0;
protected:

View File

@@ -845,7 +845,7 @@ Device *Device::create(DriverHandle *driverHandle, NEO::Device *neoDevice, bool
debugSurface = neoDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties(
{device->getRootDeviceIndex(), true,
debugSurfaceSize,
NEO::GraphicsAllocation::AllocationType::DEBUG_CONTEXT_SAVE_AREA,
NEO::AllocationType::DEBUG_CONTEXT_SAVE_AREA,
false,
false,
device->getNEODevice()->getDeviceBitfield()});
@@ -1009,7 +1009,7 @@ NEO::GraphicsAllocation *DeviceImp::allocateManagedMemoryFromHostPtr(void *buffe
}
allocation = neoDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties(
{getRootDeviceIndex(), false, size, NEO::GraphicsAllocation::AllocationType::BUFFER_HOST_MEMORY, false, neoDevice->getDeviceBitfield()},
{getRootDeviceIndex(), false, size, NEO::AllocationType::BUFFER_HOST_MEMORY, false, neoDevice->getDeviceBitfield()},
buffer);
if (allocation == nullptr) {
@@ -1029,7 +1029,7 @@ NEO::GraphicsAllocation *DeviceImp::allocateManagedMemoryFromHostPtr(void *buffe
NEO::GraphicsAllocation *DeviceImp::allocateMemoryFromHostPtr(const void *buffer, size_t size, bool hostCopyAllowed) {
NEO::AllocationProperties properties = {getRootDeviceIndex(), false, size,
NEO::GraphicsAllocation::AllocationType::EXTERNAL_HOST_PTR,
NEO::AllocationType::EXTERNAL_HOST_PTR,
false, neoDevice->getDeviceBitfield()};
properties.flags.flushL3RequiredForRead = properties.flags.flushL3RequiredForWrite = true;
auto allocation = neoDevice->getMemoryManager()->allocateGraphicsMemoryWithProperties(properties,
@@ -1044,7 +1044,7 @@ NEO::GraphicsAllocation *DeviceImp::allocateMemoryFromHostPtr(const void *buffer
return allocation;
}
NEO::GraphicsAllocation *DeviceImp::obtainReusableAllocation(size_t requiredSize, NEO::GraphicsAllocation::AllocationType type) {
NEO::GraphicsAllocation *DeviceImp::obtainReusableAllocation(size_t requiredSize, NEO::AllocationType type) {
auto alloc = allocationsForReuse->detachAllocation(requiredSize, nullptr, nullptr, type);
if (alloc == nullptr)
return nullptr;

View File

@@ -94,7 +94,7 @@ struct DeviceImp : public Device {
SysmanDevice *getSysmanHandle() override;
ze_result_t getCsrForOrdinalAndIndex(NEO::CommandStreamReceiver **csr, uint32_t ordinal, uint32_t index) override;
ze_result_t getCsrForLowPriority(NEO::CommandStreamReceiver **csr) override;
NEO::GraphicsAllocation *obtainReusableAllocation(size_t requiredSize, NEO::GraphicsAllocation::AllocationType type) override;
NEO::GraphicsAllocation *obtainReusableAllocation(size_t requiredSize, NEO::AllocationType type) override;
void storeReusableAllocation(NEO::GraphicsAllocation &alloc) override;
NEO::Device *getActiveDevice() const;