SWDEV-367145 - adding support for timeline semaphore

Change-Id: I654359b48abe8bbaac2def5118d3ad0bb05d9492
Tento commit je obsažen v:
pghafari
2023-04-11 13:37:45 -04:00
odevzdal Payam Ghafari
rodič 261ce9837c
revize afa15ddb89
5 změnil soubory, kde provedl 45 přidání a 9 odebrání
+6 -4
Zobrazit soubor
@@ -181,14 +181,16 @@ hipError_t hipImportExternalSemaphore(hipExternalSemaphore_t* extSem_out,
(semHandleDesc->type > hipExternalSemaphoreHandleTypeD3D12Fence)) {
HIP_RETURN(hipErrorInvalidValue);
}
amd::Device* device = hip::getCurrentDevice()->devices()[0];
#ifdef _WIN32
if (device->importExtSemaphore(extSem_out, semHandleDesc->handle.win32.handle)) {
if (device->importExtSemaphore(extSem_out, semHandleDesc->handle.win32.handle,
static_cast <amd::ExternalSemaphoreHandleType>
(semHandleDesc->type))) {
#else
if (device->importExtSemaphore(
extSem_out, semHandleDesc->handle.fd)) {
if (device->importExtSemaphore(extSem_out, semHandleDesc->handle.fd,
static_cast <amd::ExternalSemaphoreHandleType>
(semHandleDesc->type))) {
#endif
HIP_RETURN(hipSuccess);
}