fix: program binding table for bindless kernels

- if binding table entries are used in bindless kernel, program Binding
table

Related-To: NEO-7063

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2023-11-30 15:30:14 +00:00
committed by Compute-Runtime-Automation
parent f06c2f04d0
commit 8056476d8d
5 changed files with 124 additions and 18 deletions

View File

@@ -98,7 +98,13 @@ ze_result_t KernelImmutableData::initialize(NEO::KernelInfo *kernelInfo, Device
kernelDescriptor->payloadMappings.implicitArgs.simdSize, kernelDescriptor->kernelAttributes.simdSize);
}
if (NEO::KernelDescriptor::isBindlessAddressingKernel(kernelInfo->kernelDescriptor)) {
if (kernelInfo->heapInfo.surfaceStateHeapSize != 0) {
this->surfaceStateHeapSize = kernelInfo->heapInfo.surfaceStateHeapSize;
surfaceStateHeapTemplate.reset(new uint8_t[surfaceStateHeapSize]);
memcpy_s(surfaceStateHeapTemplate.get(), surfaceStateHeapSize,
kernelInfo->heapInfo.pSsh, surfaceStateHeapSize);
} else if (NEO::KernelDescriptor::isBindlessAddressingKernel(kernelInfo->kernelDescriptor)) {
auto &gfxCoreHelper = deviceImp->getNEODevice()->getGfxCoreHelper();
auto surfaceStateSize = static_cast<uint32_t>(gfxCoreHelper.getRenderSurfaceStateSize());
@@ -106,12 +112,6 @@ ze_result_t KernelImmutableData::initialize(NEO::KernelInfo *kernelInfo, Device
DEBUG_BREAK_IF(kernelInfo->kernelDescriptor.kernelAttributes.numArgsStateful != kernelInfo->kernelDescriptor.getBindlessOffsetToSurfaceState().size());
surfaceStateHeapTemplate.reset(new uint8_t[surfaceStateHeapSize]);
} else if (kernelInfo->heapInfo.surfaceStateHeapSize != 0) {
this->surfaceStateHeapSize = kernelInfo->heapInfo.surfaceStateHeapSize;
surfaceStateHeapTemplate.reset(new uint8_t[surfaceStateHeapSize]);
memcpy_s(surfaceStateHeapTemplate.get(), surfaceStateHeapSize,
kernelInfo->heapInfo.pSsh, surfaceStateHeapSize);
}
if (kernelInfo->heapInfo.dynamicStateHeapSize != 0) {