mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-08 14:02:58 +08:00
Move AllocationProperties::noDeviceSpecified to SubDevice
Change-Id: Idfc1efa4e39168ca32b613201aac8ccd0aa3219a Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
sys_ocldev
parent
61b6d5248d
commit
026d1324a4
@@ -51,7 +51,7 @@ bool CommandContainer::initialize(Device *device) {
|
||||
GraphicsAllocation::AllocationType::INTERNAL_HOST_MEMORY,
|
||||
(device->getNumAvailableDevices() > 1u) /* multiOsContextCapable */,
|
||||
false,
|
||||
NEO::AllocationProperties::noDeviceSpecified};
|
||||
NEO::SubDevice::unspecifiedSubDeviceIndex};
|
||||
|
||||
cmdBufferAllocation = device->getMemoryManager()->allocateGraphicsMemoryWithProperties(properties);
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ GraphicsAllocation *HeapHelper::getHeapAllocation(size_t heapSize, size_t alignm
|
||||
GraphicsAllocation::AllocationType::INTERNAL_HEAP,
|
||||
isMultiOsContextCapable /* multiOsContextCapable */,
|
||||
false,
|
||||
NEO::AllocationProperties::noDeviceSpecified};
|
||||
NEO::SubDevice::unspecifiedSubDeviceIndex};
|
||||
|
||||
return this->memManager->allocateGraphicsMemoryWithProperties(properties);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,8 @@ namespace NEO {
|
||||
class RootDevice;
|
||||
class SubDevice : public Device {
|
||||
public:
|
||||
constexpr static uint32_t unspecifiedSubDeviceIndex = std::numeric_limits<uint32_t>::max();
|
||||
|
||||
SubDevice(ExecutionEnvironment *executionEnvironment, uint32_t subDeviceIndex, RootDevice &rootDevice);
|
||||
void retain() override;
|
||||
unique_ptr_if_unused<Device> release() override;
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
|
||||
#pragma once
|
||||
#include "core/memory_manager/graphics_allocation.h"
|
||||
#include "runtime/device/sub_device.h"
|
||||
|
||||
namespace NEO {
|
||||
struct ImageInfo;
|
||||
struct AllocationProperties {
|
||||
constexpr static uint32_t noDeviceSpecified = std::numeric_limits<uint32_t>::max();
|
||||
union {
|
||||
struct {
|
||||
uint32_t allocateMemory : 1;
|
||||
@@ -32,7 +32,7 @@ struct AllocationProperties {
|
||||
GraphicsAllocation::AllocationType allocationType = GraphicsAllocation::AllocationType::UNKNOWN;
|
||||
ImageInfo *imgInfo = nullptr;
|
||||
bool multiStorageResource = false;
|
||||
uint32_t subDeviceIndex = AllocationProperties::noDeviceSpecified;
|
||||
uint32_t subDeviceIndex = SubDevice::unspecifiedSubDeviceIndex;
|
||||
|
||||
AllocationProperties(uint32_t rootDeviceIndex, size_t size,
|
||||
GraphicsAllocation::AllocationType allocationType)
|
||||
@@ -50,7 +50,7 @@ struct AllocationProperties {
|
||||
size_t size,
|
||||
GraphicsAllocation::AllocationType allocationType,
|
||||
bool isMultiStorageAllocation)
|
||||
: AllocationProperties(rootDeviceIndex, allocateMemory, size, allocationType, false, isMultiStorageAllocation, AllocationProperties::noDeviceSpecified) {}
|
||||
: AllocationProperties(rootDeviceIndex, allocateMemory, size, allocationType, false, isMultiStorageAllocation, SubDevice::unspecifiedSubDeviceIndex) {}
|
||||
|
||||
AllocationProperties(uint32_t rootDeviceIndexParam,
|
||||
bool allocateMemoryParam,
|
||||
|
||||
Reference in New Issue
Block a user