Add flag to determine if csr can allocate in internal heaps

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2021-03-31 20:21:59 +00:00
committed by Compute-Runtime-Automation
parent 0c8080ac26
commit 298df1582b
8 changed files with 21 additions and 12 deletions

View File

@@ -390,7 +390,7 @@ void CommandStreamReceiver::allocateHeapMemory(IndirectHeap::Type heapType,
if (IndirectHeap::SURFACE_STATE == heapType) {
finalHeapSize = defaultSshSize;
}
bool requireInternalHeap = IndirectHeap::INDIRECT_OBJECT == heapType ? true : false;
bool requireInternalHeap = IndirectHeap::INDIRECT_OBJECT == heapType ? canUse4GbHeaps : false;
if (DebugManager.flags.AddPatchInfoCommentsForAUBDump.get()) {
requireInternalHeap = false;

View File

@@ -184,6 +184,7 @@ class CommandStreamReceiver {
bool peekTimestampPacketWriteEnabled() const { return timestampPacketWriteEnabled; }
size_t defaultSshSize;
bool canUse4GbHeaps = true;
AllocationsList &getTemporaryAllocations();
AllocationsList &getAllocationsForReuse();

View File

@@ -145,6 +145,7 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
void addPipeControlCmd(LinearStream &commandStream, PipeControlArgs &args);
void addPipeControlBeforeStateBaseAddress(LinearStream &commandStream);
size_t getSshHeapSize();
bool are4GbHeapsAvailable() const;
uint64_t getScratchPatchAddress();
void createScratchSpaceController();

View File

@@ -52,6 +52,7 @@ CommandStreamReceiverHw<GfxFamily>::CommandStreamReceiverHw(ExecutionEnvironment
resetKmdNotifyHelper(new KmdNotifyHelper(&peekHwInfo().capabilityTable.kmdNotifyProperties));
flatBatchBufferHelper.reset(new FlatBatchBufferHelperHw<GfxFamily>(executionEnvironment));
defaultSshSize = getSshHeapSize();
canUse4GbHeaps = are4GbHeapsAvailable();
timestampPacketWriteEnabled = hwHelper.timestampPacketWriteSupported();
if (DebugManager.flags.EnableTimestampPacket.get() != -1) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2019-2020 Intel Corporation
* Copyright (C) 2019-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -14,6 +14,9 @@ size_t CommandStreamReceiverHw<GfxFamily>::getSshHeapSize() {
return defaultHeapSize;
}
template <typename GfxFamily>
bool CommandStreamReceiverHw<GfxFamily>::are4GbHeapsAvailable() const { return true; }
template <typename GfxFamily>
inline void CommandStreamReceiverHw<GfxFamily>::programL3(LinearStream &csr, DispatchFlags &dispatchFlags, uint32_t &newL3Config) {
typedef typename GfxFamily::PIPE_CONTROL PIPE_CONTROL;