mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
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:
committed by
Compute-Runtime-Automation
parent
0c8080ac26
commit
298df1582b
@@ -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;
|
||||
|
||||
@@ -184,6 +184,7 @@ class CommandStreamReceiver {
|
||||
bool peekTimestampPacketWriteEnabled() const { return timestampPacketWriteEnabled; }
|
||||
|
||||
size_t defaultSshSize;
|
||||
bool canUse4GbHeaps = true;
|
||||
|
||||
AllocationsList &getTemporaryAllocations();
|
||||
AllocationsList &getAllocationsForReuse();
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user