fix: return allocation size for zeImageGetMemoryPropertiesExp

Returned the memory allocation size instead of pixel size
for zeImageGetMemoryPropertiesExp

Related-To: NEO-16033
Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
This commit is contained in:
Young Jin Yoon
2025-09-18 22:10:35 +00:00
committed by Compute-Runtime-Automation
parent f17ac35108
commit 929ebc7976
2 changed files with 2 additions and 2 deletions

View File

@@ -37,7 +37,7 @@ struct ImageImp : public Image, NEO::NonCopyableAndNonMovableClass {
ze_result_t getMemoryProperties(ze_image_memory_properties_exp_t *pMemoryProperties) override {
pMemoryProperties->rowPitch = imgInfo.rowPitch;
pMemoryProperties->slicePitch = imgInfo.slicePitch;
pMemoryProperties->size = imgInfo.surfaceFormat->imageElementSizeInBytes;
pMemoryProperties->size = imgInfo.size;
return ZE_RESULT_SUCCESS;
}

View File

@@ -1239,7 +1239,7 @@ HWTEST_F(ImageGetMemoryProperties, givenImageMemoryPropertiesExpStructureWhenGet
auto imageInfo = image->getImageInfo();
EXPECT_EQ(imageInfo.surfaceFormat->imageElementSizeInBytes, imageMemoryPropertiesExp.size);
EXPECT_EQ(imageInfo.size, imageMemoryPropertiesExp.size);
EXPECT_EQ(imageInfo.slicePitch, imageMemoryPropertiesExp.slicePitch);
EXPECT_EQ(imageInfo.rowPitch, imageMemoryPropertiesExp.rowPitch);
}