Skip to content
This repository was archived by the owner on Jan 26, 2024. It is now read-only.

Commit 613cf58

Browse files
anusha GodavarthySuryaanusha GodavarthySurya
authored andcommitted
SWDEV-297215 - Set image descriptor as per the HSA specification for hsa_ext_image_descriptor_t
Change-Id: I0af0f09120f15a42349ec4de491df8aee7bfd46d
1 parent 152a816 commit 613cf58

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

device/rocm/rocmemory.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,28 +1005,28 @@ void Image::populateImageDescriptor() {
10051005
switch (image->getType()) {
10061006
case CL_MEM_OBJECT_IMAGE1D:
10071007
imageDescriptor_.geometry = HSA_EXT_IMAGE_GEOMETRY_1D;
1008-
imageDescriptor_.height = 1;
1009-
imageDescriptor_.depth = 1;
1008+
imageDescriptor_.height = 0;
1009+
imageDescriptor_.depth = 0;
10101010
break;
10111011
case CL_MEM_OBJECT_IMAGE1D_BUFFER:
10121012
imageDescriptor_.geometry = HSA_EXT_IMAGE_GEOMETRY_1DB;
1013-
imageDescriptor_.height = 1;
1014-
imageDescriptor_.depth = 1;
1013+
imageDescriptor_.height = 0;
1014+
imageDescriptor_.depth = 0;
10151015
break;
10161016
case CL_MEM_OBJECT_IMAGE1D_ARRAY:
10171017
//@todo - arraySize = height ?!
10181018
imageDescriptor_.geometry = HSA_EXT_IMAGE_GEOMETRY_1DA;
1019-
imageDescriptor_.height = 1;
1019+
imageDescriptor_.height = 0;
10201020
imageDescriptor_.array_size = image->getHeight();
10211021
break;
10221022
case CL_MEM_OBJECT_IMAGE2D:
10231023
imageDescriptor_.geometry = HSA_EXT_IMAGE_GEOMETRY_2D;
1024-
imageDescriptor_.depth = 1;
1024+
imageDescriptor_.depth = 0;
10251025
break;
10261026
case CL_MEM_OBJECT_IMAGE2D_ARRAY:
10271027
//@todo - arraySize = depth ?!
10281028
imageDescriptor_.geometry = HSA_EXT_IMAGE_GEOMETRY_2DA;
1029-
imageDescriptor_.depth = 1;
1029+
imageDescriptor_.depth = 0;
10301030
imageDescriptor_.array_size = image->getDepth();
10311031
break;
10321032
case CL_MEM_OBJECT_IMAGE3D:

0 commit comments

Comments
 (0)