SWDEV-432180 - Support hipArraySurfaceLoadStore

Make hipExternalMemoryGetMappedMipmappedArray() accept
hipArraySurfaceLoadStore.
Make hipCreateSurfaceObject() check hipArraySurfaceLoadStore
flag. If flag is hipArrayDefault, hipCreateSurfaceObject() will
also pass to prevent failure of catch2/swissknife tests.

Change-Id: Ifb7db2db14e0c2208a9661cfa33887ec61ab26a5
This commit is contained in:
Tao Sang
2023-11-13 14:42:59 -05:00
committed by Tao Sang
parent c4f773db0b
commit 1c442658ca
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -60,6 +60,11 @@ hipError_t ihipCreateSurfaceObject(hipSurfaceObject_t* pSurfObject,
return hipErrorInvalidValue;
}
if (pResDesc->res.array.array->flags != hipArrayDefault &&
(pResDesc->res.array.array->flags & hipArraySurfaceLoadStore) == 0) {
return hipErrorInvalidValue;
}
amd::Image* image = nullptr;
cl_mem memObj = reinterpret_cast<cl_mem>(pResDesc->res.array.array->data);
if (!is_valid(memObj)) {