[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:
Zbigniew Zdanowicz
2023-04-05 13:21:45 +00:00
committed by Compute-Runtime-Automation
parent 88fe17e50a
commit 4c7bc2ca98
7 changed files with 170 additions and 10 deletions

View File

@@ -162,6 +162,8 @@ class GfxCoreHelper {
virtual bool platformSupportsImplicitScaling(const NEO::RootDeviceEnvironment &rootDeviceEnvironment) const = 0;
virtual size_t getBatchBufferEndSize() const = 0;
virtual const void *getBatchBufferEndReference() const = 0;
virtual size_t getBatchBufferStartSize() const = 0;
virtual void encodeBatchBufferStart(void *cmdBuffer, uint64_t address, bool secondLevel, bool indirect, bool predicate) const = 0;
virtual bool isPlatformFlushTaskEnabled(const NEO::ProductHelper &productHelper) const = 0;
virtual uint32_t getMinimalScratchSpaceSize() const = 0;
virtual bool copyThroughLockedPtrEnabled(const HardwareInfo &hwInfo, const ProductHelper &productHelper) const = 0;
@@ -378,6 +380,8 @@ class GfxCoreHelperHw : public GfxCoreHelper {
bool platformSupportsImplicitScaling(const NEO::RootDeviceEnvironment &rootDeviceEnvironment) const override;
size_t getBatchBufferEndSize() const override;
const void *getBatchBufferEndReference() const override;
size_t getBatchBufferStartSize() const override;
void encodeBatchBufferStart(void *cmdBuffer, uint64_t address, bool secondLevel, bool indirect, bool predicate) const override;
bool isPlatformFlushTaskEnabled(const NEO::ProductHelper &productHelper) const override;
uint32_t getMinimalScratchSpaceSize() const override;
bool copyThroughLockedPtrEnabled(const HardwareInfo &hwInfo, const ProductHelper &productHelper) const override;