Scratch using bindless heaps

Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
Maciej Plewka
2020-12-07 15:38:12 +00:00
committed by Compute-Runtime-Automation
parent 714d4c61f9
commit 830bcd6987
9 changed files with 138 additions and 2 deletions

View File

@@ -6,6 +6,7 @@
*/
#pragma once
#include "shared/source/helpers/bindless_heaps_helper.h"
#include "shared/source/indirect_heap/indirect_heap.h"
#include <cstddef>
@@ -43,6 +44,7 @@ class ScratchSpaceController {
OsContext &osContext,
bool &stateBaseAddressDirty,
bool &vfeStateDirty) = 0;
virtual uint64_t calculateNewGSH() = 0;
virtual uint64_t getScratchPatchAddress() = 0;
@@ -55,6 +57,13 @@ class ScratchSpaceController {
OsContext &osContext,
bool &stateBaseAddressDirty,
bool &vfeStateDirty) = 0;
virtual void programBindlessSurfaceStateForScratch(BindlessHeapsHelper *heapsHelper,
uint32_t requiredPerThreadScratchSize,
uint32_t requiredPerThreadPrivateScratchSize,
uint32_t currentTaskCount,
OsContext &osContext,
bool &stateBaseAddressDirty,
bool &vfeStateDirty) = 0;
protected:
MemoryManager *getMemoryManager() const;

View File

@@ -90,4 +90,13 @@ void ScratchSpaceControllerBase::programHeaps(HeapContainer &heapContainer,
bool &stateBaseAddressDirty,
bool &vfeStateDirty) {
}
void ScratchSpaceControllerBase::programBindlessSurfaceStateForScratch(BindlessHeapsHelper *heapsHelper,
uint32_t requiredPerThreadScratchSize,
uint32_t requiredPerThreadPrivateScratchSize,
uint32_t currentTaskCount,
OsContext &osContext,
bool &stateBaseAddressDirty,
bool &vfeStateDirty) {
}
} // namespace NEO

View File

@@ -22,6 +22,7 @@ class ScratchSpaceControllerBase : public ScratchSpaceController {
OsContext &osContext,
bool &stateBaseAddressDirty,
bool &vfeStateDirty) override;
uint64_t calculateNewGSH() override;
uint64_t getScratchPatchAddress() override;
@@ -34,6 +35,13 @@ class ScratchSpaceControllerBase : public ScratchSpaceController {
OsContext &osContext,
bool &stateBaseAddressDirty,
bool &vfeStateDirty) override;
void programBindlessSurfaceStateForScratch(BindlessHeapsHelper *heapsHelper,
uint32_t requiredPerThreadScratchSize,
uint32_t requiredPerThreadPrivateScratchSize,
uint32_t currentTaskCount,
OsContext &osContext,
bool &stateBaseAddressDirty,
bool &vfeStateDirty) override;
protected:
void createScratchSpaceAllocation();