Skip to content

Commit a73e6a7

Browse files
committed
Correct size calculation in ImageInitialize()
1 parent 28e64bb commit a73e6a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hexl/hexl_hsaruntime/HsailRuntime.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ void HsaQueueErrorCallback(hsa_status_t status, hsa_queue_t *source, void *data)
484484
cbuff += initValue.Size();
485485
}
486486
hsa_status_t status = Runtime()->Hsa()->hsa_ext_image_import(Runtime()->Agent(), buff,
487-
imageParams->width, imageParams->width * imageParams->height, image->Image(), &hsaRegion);
487+
imageParams->width * initValue.Size(), imageParams->width * imageParams->height * initValue.Size(), image->Image(), &hsaRegion);
488488
delete[] buff;
489489
if (status != HSA_STATUS_SUCCESS) { Runtime()->HsaError("hsa_ext_image_import failed", status); return false; }
490490
return true;

0 commit comments

Comments
 (0)