KM DAF AubCapture to recapture fill pattern allocations

The commit introduces a recapture of fill pattern allocations on every submit.

Change-Id: I634af075348dbc59c7809f58b8495326cab804e1
This commit is contained in:
Milczarek, Slawomir
2018-03-27 16:19:11 +02:00
parent 0d1e9de4ec
commit a02c3cb781
7 changed files with 86 additions and 2 deletions

View File

@@ -53,6 +53,8 @@ cl_int CommandQueueHw<GfxFamily>::enqueueFillBuffer(
patternAllocation = memoryManager->allocateGraphicsMemory(alignUp(patternSize, MemoryConstants::cacheLineSize), MemoryConstants::preferredAlignment);
}
patternAllocation->setAllocationType(GraphicsAllocation::ALLOCATION_TYPE_FILL_PATTERN);
if (patternSize == 1) {
int patternInt = (uint32_t)((*(uint8_t *)pattern << 24) | (*(uint8_t *)pattern << 16) | (*(uint8_t *)pattern << 8) | *(uint8_t *)pattern);
memcpy_s(patternAllocation->getUnderlyingBuffer(), sizeof(int), &patternInt, sizeof(int));

View File

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