mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-29 00:58:39 +08:00
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:
committed by
Compute-Runtime-Automation
parent
6539b3e01a
commit
a2f60af5c6
@@ -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()};
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user