Initial driver for RSoV (RenderScript over Vulkan/SPIR-V)
Bug: 30964317
Supports the following:
* Allocations of 32-bit integers and floating point numbers and vectors
* Single-input single-output kernels
* Co-existence of RSoV scripts and CPU intrinsics
Added default .clang-format for driver code using Google C++ code style.
The RSoV driver is loaded, if and only if the property debug.rs.rsov is
set to non-zero.
Test: RSTest and CTS with debug.rs.rsov set to 0; and RSoVTest with
debug.rs.rsov set to 1.
Change-Id: If63370a502d499e8fc5f4bbd2e90ce84b167c331
diff --git a/rsDriverLoader.cpp b/rsDriverLoader.cpp
index 16efa0d..9e3c39d 100644
--- a/rsDriverLoader.cpp
+++ b/rsDriverLoader.cpp
@@ -232,16 +232,27 @@
-bool Context::loadDriver(bool forceDefault) {
+bool Context::loadDriver(bool forceDefault, bool forceRSoV) {
bool loadDefault = true;
// Provide a mechanism for dropping in a different RS driver.
#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 (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
#define XSTR(S) #S
#define STR(S) XSTR(S)
#define OVERRIDE_RS_DRIVER_STRING STR(OVERRIDE_RS_DRIVER)
-
if (!forceDefault) {
if (loadRuntime(OVERRIDE_RS_DRIVER_STRING)) {
ALOGV("Successfully loaded runtime: %s", OVERRIDE_RS_DRIVER_STRING);