refactor: remove redundant allocateBindlessSlot from Image getDeviceOffset

This is a NFC change.
Bindless slot is already allocated in image initialize function.

Related-To: NEO-10352
Signed-off-by: Wenju He <wenju.he@intel.com>
This commit is contained in:
Wenju He 2024-03-22 02:02:53 +00:00 committed by Compute-Runtime-Automation
parent 021f4c6299
commit c0f30bece4
1 changed files with 4 additions and 6 deletions

View File

@ -182,13 +182,11 @@ ze_result_t ImageImp::getDeviceOffset(uint64_t *deviceOffset) {
if (!this->bindlessImage) {
return ZE_RESULT_ERROR_NOT_AVAILABLE;
}
auto result = allocateBindlessSlot();
if (result == ZE_RESULT_SUCCESS) {
DEBUG_BREAK_IF(this->getBindlessSlot() == nullptr);
*deviceOffset = this->getBindlessSlot()->surfaceStateOffset;
}
return result;
DEBUG_BREAK_IF(this->getBindlessSlot() == nullptr);
*deviceOffset = this->getBindlessSlot()->surfaceStateOffset;
return ZE_RESULT_SUCCESS;
}
size_t ImageImp::getRowPitchFor2dImage(Device *device, const NEO::ImageInfo &imgInfo) {