mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 14:55:24 +08:00
fix(ocl): use correct surface state index for bindless offset in setArgImage
Related-To: NEO-11156 Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
ad0d6f5435
commit
90bc6c10ea
@@ -1701,9 +1701,12 @@ cl_int Kernel::setArgImageWithMipLevel(uint32_t argIndex,
|
||||
|
||||
void *surfaceState = nullptr;
|
||||
if (isValidOffset(argAsImg.bindless)) {
|
||||
auto &gfxCoreHelper = this->getGfxCoreHelper();
|
||||
auto surfaceStateSize = gfxCoreHelper.getRenderSurfaceStateSize();
|
||||
surfaceState = ptrOffset(getSurfaceStateHeap(), surfaceStateSize * argIndex);
|
||||
auto ssIndex = getSurfaceStateIndexForBindlessOffset(argAsImg.bindless);
|
||||
if (ssIndex < std::numeric_limits<uint32_t>::max()) {
|
||||
auto &gfxCoreHelper = this->getGfxCoreHelper();
|
||||
auto surfaceStateSize = gfxCoreHelper.getRenderSurfaceStateSize();
|
||||
surfaceState = ptrOffset(getSurfaceStateHeap(), ssIndex * surfaceStateSize);
|
||||
}
|
||||
} else {
|
||||
DEBUG_BREAK_IF(isUndefinedOffset(argAsImg.bindful));
|
||||
surfaceState = ptrOffset(getSurfaceStateHeap(), argAsImg.bindful);
|
||||
|
||||
Reference in New Issue
Block a user