mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 06:49:52 +08:00
refactor: use common indirectDataAlignment static constexpr value
Signed-off-by: Kamil Kopryk <kamil.kopryk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
cc1732c930
commit
0c5cba8ebd
@@ -61,11 +61,7 @@ size_t HardwareCommandsHelper<GfxFamily>::sendCrossThreadData(
|
||||
uint32_t &sizeCrossThreadData,
|
||||
[[maybe_unused]] uint64_t scratchAddress) {
|
||||
|
||||
constexpr bool heaplessModeEnabled = GfxFamily::template isHeaplessMode<WalkerType>();
|
||||
|
||||
if constexpr (heaplessModeEnabled == false) {
|
||||
indirectHeap.align(WalkerType::INDIRECTDATASTARTADDRESS_ALIGN_SIZE);
|
||||
}
|
||||
indirectHeap.align(GfxFamily::indirectDataAlignment);
|
||||
|
||||
auto offsetCrossThreadData = indirectHeap.getUsed();
|
||||
char *dest = nullptr;
|
||||
@@ -120,6 +116,8 @@ size_t HardwareCommandsHelper<GfxFamily>::sendCrossThreadData(
|
||||
memcpy_s(dest, sizeCrossThreadData, src, sizeCrossThreadData);
|
||||
}
|
||||
|
||||
constexpr bool heaplessModeEnabled = GfxFamily::template isHeaplessMode<WalkerType>();
|
||||
|
||||
if constexpr (heaplessModeEnabled) {
|
||||
auto device = kernel.getContext().getDevice(0);
|
||||
uint64_t indirectDataAddress = device->getMemoryManager()->getInternalHeapBaseAddress(device->getRootDeviceIndex(), indirectHeap.getGraphicsAllocation()->isAllocatedInLocalMemoryPool());
|
||||
|
||||
Reference in New Issue
Block a user