Refactor GraphicsAllocation class

move most of members to protected section
merge related members into structs

Change-Id: Ief2e092aa5e61ca6f13308f9d9b1937ea6c913b4
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2019-02-27 14:59:46 +01:00
committed by sys_ocldev
parent e75e5808cc
commit 6fb28dd828
44 changed files with 289 additions and 242 deletions

View File

@@ -19,23 +19,25 @@ void GraphicsAllocation::setAllocationType(AllocationType allocationType) {
GraphicsAllocation::GraphicsAllocation(AllocationType allocationType, void *cpuPtrIn, uint64_t gpuAddress, uint64_t baseAddress,
size_t sizeIn, MemoryPool::Type pool, bool multiOsContextCapable)
: gpuBaseAddress(baseAddress),
size(sizeIn),
: size(sizeIn),
cpuPtr(cpuPtrIn),
gpuBaseAddress(baseAddress),
gpuAddress(gpuAddress),
memoryPool(pool),
allocationType(allocationType),
multiOsContextCapable(multiOsContextCapable) {}
allocationType(allocationType) {
allocationInfo.flags.multiOsContextCapable = multiOsContextCapable;
}
GraphicsAllocation::GraphicsAllocation(AllocationType allocationType, void *cpuPtrIn, size_t sizeIn, osHandle sharedHandleIn,
MemoryPool::Type pool, bool multiOsContextCapable)
: size(sizeIn),
cpuPtr(cpuPtrIn),
gpuAddress(castToUint64(cpuPtrIn)),
sharedHandle(sharedHandleIn),
memoryPool(pool),
allocationType(allocationType),
multiOsContextCapable(multiOsContextCapable) {}
allocationType(allocationType) {
sharingInfo.sharedHandle = sharedHandleIn;
allocationInfo.flags.multiOsContextCapable = multiOsContextCapable;
}
GraphicsAllocation::~GraphicsAllocation() = default;