mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 17:13:29 +08:00
refactor: get ioh alignment from static function
Signed-off-by: Maciej Plewka <maciej.plewka@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
1d3d3e9a79
commit
afee8814ef
@@ -200,6 +200,7 @@ struct EncodeDispatchKernel {
|
||||
return BINDING_TABLE_STATE::SURFACESTATEPOINTER_ALIGN_SIZE;
|
||||
}
|
||||
|
||||
static size_t getDefaultIOHAlignment();
|
||||
template <bool isHeapless>
|
||||
static void setScratchAddress(uint64_t &scratchAddress, uint32_t requiredScratchSlot0Size, uint32_t requiredScratchSlot1Size, IndirectHeap *ssh, CommandStreamReceiver &csr);
|
||||
template <bool isHeapless>
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
namespace NEO {
|
||||
template <typename Family>
|
||||
size_t EncodeDispatchKernel<Family>::getDefaultIOHAlignment() {
|
||||
return 1;
|
||||
}
|
||||
} // namespace NEO
|
||||
@@ -6,7 +6,13 @@
|
||||
*/
|
||||
|
||||
namespace NEO {
|
||||
template <>
|
||||
void EncodeSurfaceState<Family>::setCoherencyType(Family::RENDER_SURFACE_STATE *surfaceState, Family::RENDER_SURFACE_STATE::COHERENCY_TYPE coherencyType) {
|
||||
template <typename Family>
|
||||
size_t EncodeDispatchKernel<Family>::getDefaultIOHAlignment() {
|
||||
size_t alignment = Family::cacheLineSize;
|
||||
if (NEO::debugManager.flags.ForceIOHAlignment.get() != -1) {
|
||||
alignment = static_cast<size_t>(debugManager.flags.ForceIOHAlignment.get());
|
||||
}
|
||||
return alignment;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
@@ -329,7 +329,7 @@ void EncodeDispatchKernel<Family>::encode(CommandContainer &container, EncodeDis
|
||||
walkerCmd.setIndirectDataStartAddress(static_cast<uint32_t>(offsetThreadData));
|
||||
walkerCmd.setIndirectDataLength(sizeThreadData);
|
||||
|
||||
container.getIndirectHeap(HeapType::indirectObject)->align(rootDeviceEnvironment.getHelper<GfxCoreHelper>().getIOHAlignment());
|
||||
container.getIndirectHeap(HeapType::indirectObject)->align(NEO::EncodeDispatchKernel<Family>::getDefaultIOHAlignment());
|
||||
}
|
||||
|
||||
EncodeDispatchKernel<Family>::encodeThreadData(walkerCmd,
|
||||
|
||||
Reference in New Issue
Block a user