Fail gracefully than assert on RSoV context
Bug: 30964317
Fail RSoV context creation without assertion if Vulkan initialization
fails, e.g., if the GPU does not support Vulkan or if a GPU does not
exist at all.
Also avoided memory leak in Hal initialization code on failures to
create CPU referenence or RSoV context.
Test: RSoV on Volantis
Change-Id: I49320607bb211e568008193fee1cca299fd4a80e
diff --git a/rsDriverLoader.cpp b/rsDriverLoader.cpp
index 4f55cf3..299b6a3 100644
--- a/rsDriverLoader.cpp
+++ b/rsDriverLoader.cpp
@@ -237,14 +237,13 @@
#ifndef RS_COMPATIBILITY_LIB
if (forceRSoV) {
- // If the debug property is set to use the RSoV driver, load it and fail
- // if it does not load.
+ // If the property is set to use the RSoV driver, load it and fall back
+ // to the vendor driver or the CPU reference driver if it does not load.
if (loadRuntime("libRSDriver_RSoV.so")) {
ALOGV("Successfully loaded the RSoV driver!");
return true;
}
ALOGE("Failed to load the RSoV driver!");
- return false;
}
#ifdef OVERRIDE_RS_DRIVER