mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-09 22:43:00 +08:00
Zebin - Improving binding table generation
Allowing N:1 kernel_arg:bti mappings Signed-off-by: Jaroslaw Chodor <jaroslaw.chodor@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
6a54bde164
commit
4c50a9e147
@@ -878,10 +878,14 @@ NEO::DecodeError populateKernelDescriptor(NEO::ProgramInfo &dst, NEO::Elf::Elf<N
|
||||
|
||||
auto generatedBindingTablePos = kernelDescriptor.generatedHeaps.size();
|
||||
kernelDescriptor.generatedHeaps.resize(generatedBindingTablePos + numEntries * btiSize, 0U);
|
||||
|
||||
auto bindingTableIt = reinterpret_cast<int *>(kernelDescriptor.generatedHeaps.data() + generatedBindingTablePos);
|
||||
for (auto &bti : bindingTableIndices) {
|
||||
*bindingTableIt = bti.btiValue * 64U;
|
||||
for (int i = 0; i < numEntries; ++i) {
|
||||
*bindingTableIt = i * maxSurfaceStateSize;
|
||||
++bindingTableIt;
|
||||
}
|
||||
|
||||
for (auto &bti : bindingTableIndices) {
|
||||
auto &explicitArg = kernelDescriptor.payloadMappings.explicitArgs[bti.argIndex];
|
||||
switch (explicitArg.type) {
|
||||
default:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Intel Corporation
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -282,7 +282,7 @@ inline bool patchPointer(ArrayRef<uint8_t> buffer, const ArgDescPointer &arg, ui
|
||||
if (arg.pointerSize == 8) {
|
||||
return patchNonPointer(buffer, arg.stateless, static_cast<uint64_t>(value));
|
||||
} else {
|
||||
UNRECOVERABLE_IF(arg.pointerSize != 4);
|
||||
UNRECOVERABLE_IF((arg.pointerSize != 4) && isValidOffset(arg.stateless));
|
||||
return patchNonPointer(buffer, arg.stateless, static_cast<uint32_t>(value));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user