mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-30 09:58:55 +08:00
Add debug variable to force default heap allocation size
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
abd90308f3
commit
b60d963ff5
@@ -188,7 +188,13 @@ void CommandStreamReceiver::ensureCommandBufferAllocation(LinearStream &commandS
|
||||
return;
|
||||
}
|
||||
|
||||
const auto allocationSize = alignUp(minimumRequiredSize + additionalAllocationSize, MemoryConstants::pageSize64k);
|
||||
auto alignment = MemoryConstants::pageSize64k;
|
||||
|
||||
if (DebugManager.flags.ForceCommandBufferAlignment.get() != -1) {
|
||||
alignment = DebugManager.flags.ForceCommandBufferAlignment.get() * MemoryConstants::kiloByte;
|
||||
}
|
||||
|
||||
const auto allocationSize = alignUp(minimumRequiredSize + additionalAllocationSize, alignment);
|
||||
constexpr static auto allocationType = AllocationType::COMMAND_BUFFER;
|
||||
auto allocation = this->getInternalAllocationStorage()->obtainReusableAllocation(allocationSize, allocationType).release();
|
||||
if (allocation == nullptr) {
|
||||
@@ -474,7 +480,7 @@ IndirectHeap &CommandStreamReceiver::getIndirectHeap(IndirectHeap::Type heapType
|
||||
void CommandStreamReceiver::allocateHeapMemory(IndirectHeap::Type heapType,
|
||||
size_t minRequiredSize, IndirectHeap *&indirectHeap) {
|
||||
size_t reservedSize = 0;
|
||||
auto finalHeapSize = defaultHeapSize;
|
||||
auto finalHeapSize = getDefaultHeapSize();
|
||||
if (IndirectHeap::Type::SURFACE_STATE == heapType) {
|
||||
finalHeapSize = defaultSshSize;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2021 Intel Corporation
|
||||
* Copyright (C) 2019-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -14,7 +14,7 @@ namespace NEO {
|
||||
|
||||
template <typename GfxFamily>
|
||||
size_t CommandStreamReceiverHw<GfxFamily>::getSshHeapSize() {
|
||||
return defaultHeapSize;
|
||||
return getDefaultHeapSize();
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
|
||||
Reference in New Issue
Block a user