Command container appends BB_END on cmd buffer allocation end

When linear stream created for command container has not enough space
for command and BB_END it will program BB_END and allocate new command
buffer allocation. Pointer returned from getSpace in this case will
return storage from new command buffer allocation.

Related-To: NEO-5707

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2022-01-12 16:57:42 +00:00
committed by Compute-Runtime-Automation
parent 92316c48f2
commit 9d8ce7aace
31 changed files with 262 additions and 306 deletions

View File

@@ -36,10 +36,9 @@ enum class ErrorCode {
class CommandContainer : public NonCopyableOrMovableClass {
public:
static constexpr size_t defaultListCmdBufferSize = MemoryConstants::kiloByte * 256;
static constexpr size_t totalCmdBufferSize =
defaultListCmdBufferSize +
MemoryConstants::cacheLineSize +
CSRequirements::csOverfetchSize;
static constexpr size_t cmdBufferReservedSize = MemoryConstants::cacheLineSize +
CSRequirements::csOverfetchSize;
static constexpr size_t totalCmdBufferSize = defaultListCmdBufferSize + cmdBufferReservedSize;
CommandContainer();
@@ -86,6 +85,7 @@ class CommandContainer : public NonCopyableOrMovableClass {
IndirectHeap *getHeapWithRequiredSizeAndAlignment(HeapType heapType, size_t sizeRequired, size_t alignment);
void allocateNextCommandBuffer();
void closeAndAllocateNextCommandBuffer();
void handleCmdBufferAllocations(size_t startIndex);
GraphicsAllocation *obtainNextCommandBufferAllocation();