refactor: cleanup getBindlessMode() usage

- getGlobalBindlessHeapConfiguration() should be used to choose global
alloctor for SSH
- remove not needed and incorrect unit tests
- remove not needed branches
- bindless mode controls bindless compilation only

Related-To: NEO-7063

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2023-06-05 16:53:29 +00:00
committed by Compute-Runtime-Automation
parent dadd19e17b
commit 0844ca0ac8
25 changed files with 187 additions and 532 deletions

View File

@@ -1537,7 +1537,11 @@ cl_int Kernel::setArgBuffer(uint32_t argIndex,
disableL3, isAuxTranslationKernel, arg.isReadOnly(), pClDevice->getDevice(),
kernelInfo.kernelDescriptor.kernelAttributes.flags.useGlobalAtomics, areMultipleSubDevicesInContext());
} else if (isValidOffset(argAsPtr.bindless)) {
buffer->setArgStateful(patchBindlessSurfaceState(graphicsAllocation, argAsPtr.bindless), forceNonAuxMode,
auto &gfxCoreHelper = getDevice().getGfxCoreHelper();
auto surfaceStateSize = gfxCoreHelper.getRenderSurfaceStateSize();
auto surfaceState = ptrOffset(getSurfaceStateHeap(), surfaceStateSize * argIndex);
buffer->setArgStateful(surfaceState, forceNonAuxMode,
disableL3, isAuxTranslationKernel, arg.isReadOnly(), pClDevice->getDevice(),
kernelInfo.kernelDescriptor.kernelAttributes.flags.useGlobalAtomics, areMultipleSubDevicesInContext());
}
@@ -1651,7 +1655,9 @@ cl_int Kernel::setArgImageWithMipLevel(uint32_t argIndex,
void *surfaceState = nullptr;
if (isValidOffset(argAsImg.bindless)) {
surfaceState = patchBindlessSurfaceState(pImage->getGraphicsAllocation(rootDeviceIndex), argAsImg.bindless);
auto &gfxCoreHelper = getDevice().getGfxCoreHelper();
auto surfaceStateSize = gfxCoreHelper.getRenderSurfaceStateSize();
surfaceState = ptrOffset(getSurfaceStateHeap(), surfaceStateSize * argIndex);
} else {
DEBUG_BREAK_IF(isUndefinedOffset(argAsImg.bindful));
surfaceState = ptrOffset(getSurfaceStateHeap(), argAsImg.bindful);