[host] d12: perform full re-initialization if the heapTest fails
Some checks are pending
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Waiting to run
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Waiting to run
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Waiting to run
build / module (push) Waiting to run
build / host-linux (push) Waiting to run
build / host-windows-cross (push) Waiting to run
build / host-windows-native (push) Waiting to run
build / obs (clang) (push) Waiting to run
build / obs (gcc) (push) Waiting to run
build / docs (push) Waiting to run

This commit is contained in:
Geoffrey McRae 2025-03-05 16:44:29 +11:00
parent f6b7ea11c8
commit 9174b1ae0f

View File

@ -247,6 +247,7 @@ static bool d12_create(
static bool d12_init(void * ivshmemBase, unsigned * alignSize)
{
bool reInit = false;
bool result = false;
comRef_initGlobalScope(100, d12_comScope);
comRef_scopePush(10);
@ -393,6 +394,10 @@ static bool d12_init(void * ivshmemBase, unsigned * alignSize)
this->indirectCopy = true;
DEBUG_WARN("Unable to create resources in the IVSHMEM heap, "
"falling back to indirect copy");
// we need to retry from scratch this failure acts like the GPU crashed
reInit = true;
goto exit;
}
}
@ -446,6 +451,12 @@ exit:
d12_effectFree(&effect);
vector_destroy(&this->effects);
comRef_freeScope(&d12_comScope);
if (reInit)
{
DEBUG_INFO("Attempting to reinitialize with indirectCopy=1");
return d12_init(ivshmemBase, alignSize);
}
}
return result;