Refactor GraphicsAllocation::AllocationType and allocationType enums

- change GraphicsAllocatoin::AllocationType to scoped enumeration
so that ALLOCATION_TYPE_ prefix in every enum value can be removed
- all accesses are typed (example AllocationType::IMAGE)
- Rename allocationType to AllocationUsage to eliminate confusion
with multiple AllocationType enums / types

Change-Id: I16003297ecfcb0aaa5779ad00706c5d983914bbe
This commit is contained in:
Hoppe, Mateusz
2018-07-05 16:31:57 +02:00
committed by sys_ocldev
parent 1c88165f6f
commit 684b1d75ba
23 changed files with 70 additions and 70 deletions

View File

@@ -234,7 +234,7 @@ LinearStream &CommandQueue::getCS(size_t minRequiredSize) {
allocation = memoryManager->allocateGraphicsMemory(requiredSize, MemoryConstants::pageSize);
}
allocation->setAllocationType(GraphicsAllocation::ALLOCATION_TYPE_LINEAR_STREAM);
allocation->setAllocationType(GraphicsAllocation::AllocationType::LINEAR_STREAM);
// Deallocate the old block, if not null
auto oldAllocation = commandStream->getGraphicsAllocation();

View File

@@ -47,7 +47,7 @@ cl_int CommandQueueHw<GfxFamily>::enqueueFillBuffer(
DEBUG_BREAK_IF(nullptr == memoryManager);
auto patternAllocation = memoryManager->allocateGraphicsMemory(alignUp(patternSize, MemoryConstants::cacheLineSize), MemoryConstants::preferredAlignment);
patternAllocation->setAllocationType(GraphicsAllocation::ALLOCATION_TYPE_FILL_PATTERN);
patternAllocation->setAllocationType(GraphicsAllocation::AllocationType::FILL_PATTERN);
if (patternSize == 1) {
int patternInt = (uint32_t)((*(uint8_t *)pattern << 24) | (*(uint8_t *)pattern << 16) | (*(uint8_t *)pattern << 8) | *(uint8_t *)pattern);

View File

@@ -247,7 +247,7 @@ cl_int CommandQueueHw<GfxFamily>::enqueueSVMMemFill(void *svmPtr,
patternAllocation = memoryManager->allocateGraphicsMemory(patternSize, MemoryConstants::preferredAlignment);
}
patternAllocation->setAllocationType(GraphicsAllocation::ALLOCATION_TYPE_FILL_PATTERN);
patternAllocation->setAllocationType(GraphicsAllocation::AllocationType::FILL_PATTERN);
if (patternSize == 1) {
int patternInt = (uint32_t)((*(uint8_t *)pattern << 24) | (*(uint8_t *)pattern << 16) | (*(uint8_t *)pattern << 8) | *(uint8_t *)pattern);