fix: change global Var/Const Buffer type to SharedPoolAllocation

This is prep work for the future implementation of pooling these allocations.

Related-To: NEO-12287
Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
This commit is contained in:
Fabian Zwoliński
2025-08-18 15:15:55 +00:00
committed by Compute-Runtime-Automation
parent 6539b3e01a
commit a2f60af5c6
39 changed files with 815 additions and 439 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2024 Intel Corporation
* Copyright (C) 2021-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -12,18 +12,19 @@
#include "shared/source/device_binary_format/zebin/zebin_elf.h"
#include "shared/source/helpers/aligned_memory.h"
#include "shared/source/memory_manager/graphics_allocation.h"
#include "shared/source/utilities/shared_pool_allocation.h"
namespace NEO::Zebin::Debug {
using namespace NEO::Zebin::Elf;
Segments::Segments() {}
Segments::Segments(const GraphicsAllocation *globalVarAlloc, const GraphicsAllocation *globalConstAlloc, ArrayRef<const uint8_t> &globalStrings, std::vector<KernelNameIsaTupleT> &kernels) {
Segments::Segments(const SharedPoolAllocation *globalVarAlloc, const SharedPoolAllocation *globalConstAlloc, ArrayRef<const uint8_t> &globalStrings, std::vector<KernelNameIsaTupleT> &kernels) {
if (globalVarAlloc) {
varData = {static_cast<uintptr_t>(globalVarAlloc->getGpuAddress()), globalVarAlloc->getUnderlyingBufferSize()};
varData = {static_cast<uintptr_t>(globalVarAlloc->getGpuAddress()), globalVarAlloc->getSize()};
}
if (globalConstAlloc) {
constData = {static_cast<uintptr_t>(globalConstAlloc->getGpuAddress()), globalConstAlloc->getUnderlyingBufferSize()};
constData = {static_cast<uintptr_t>(globalConstAlloc->getGpuAddress()), globalConstAlloc->getSize()};
}
if (false == globalStrings.empty()) {
stringData = {reinterpret_cast<uintptr_t>(globalStrings.begin()), globalStrings.size()};

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2021-2024 Intel Corporation
* Copyright (C) 2021-2025 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@@ -18,6 +18,8 @@
namespace NEO {
class GraphicsAllocation;
class SharedPoolAllocation;
namespace Zebin::Debug {
struct Segments {
struct Segment {
@@ -34,7 +36,7 @@ struct Segments {
CPUSegment stringData;
KernelNameToSegmentMap nameToSegMap;
Segments();
Segments(const GraphicsAllocation *globalVarAlloc, const GraphicsAllocation *globalConstAlloc, ArrayRef<const uint8_t> &globalStrings, std::vector<KernelNameIsaTupleT> &kernels);
Segments(const SharedPoolAllocation *globalVarAlloc, const SharedPoolAllocation *globalConstAlloc, ArrayRef<const uint8_t> &globalStrings, std::vector<KernelNameIsaTupleT> &kernels);
};
class DebugZebinCreator {