mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 09:03:14 +08:00
[feature, perf] add alogrithm to chain command buffers in container
This feature is part of performance improvement to dispatch and start command buffers as primary batch buffers. When exhausted command buffer is closed, then reserve exact space for chained batch buffer start and bind it to the next command buffer. When closing command buffer, then save ending pointer and reserve aligned space. Related-To: NEO-7807 Signed-off-by: Zbigniew Zdanowicz <zbigniew.zdanowicz@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
88fe17e50a
commit
4c7bc2ca98
@@ -933,7 +933,7 @@ void EncodeBatchBufferStartOrEnd<Family>::programConditionalBatchBufferStartBase
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
void EncodeBatchBufferStartOrEnd<Family>::programBatchBufferStart(LinearStream *commandStream, uint64_t address, bool secondLevel, bool indirect, bool predicate) {
|
||||
void EncodeBatchBufferStartOrEnd<Family>::programBatchBufferStart(MI_BATCH_BUFFER_START *cmdBuffer, uint64_t address, bool secondLevel, bool indirect, bool predicate) {
|
||||
MI_BATCH_BUFFER_START cmd = Family::cmdInitBatchBufferStart;
|
||||
if (secondLevel) {
|
||||
cmd.setSecondLevelBatchBuffer(MI_BATCH_BUFFER_START::SECOND_LEVEL_BATCH_BUFFER_SECOND_LEVEL_BATCH);
|
||||
@@ -943,8 +943,12 @@ void EncodeBatchBufferStartOrEnd<Family>::programBatchBufferStart(LinearStream *
|
||||
|
||||
appendBatchBufferStart(cmd, indirect, predicate);
|
||||
|
||||
auto buffer = commandStream->getSpaceForCmd<MI_BATCH_BUFFER_START>();
|
||||
*buffer = cmd;
|
||||
*cmdBuffer = cmd;
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
void EncodeBatchBufferStartOrEnd<Family>::programBatchBufferStart(LinearStream *commandStream, uint64_t address, bool secondLevel, bool indirect, bool predicate) {
|
||||
programBatchBufferStart(commandStream->getSpaceForCmd<MI_BATCH_BUFFER_START>(), address, secondLevel, indirect, predicate);
|
||||
}
|
||||
|
||||
template <typename Family>
|
||||
|
||||
Reference in New Issue
Block a user