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/rsContext.cpp b/rsContext.cpp
index a706a8b..0c25d04 100644
--- a/rsContext.cpp
+++ b/rsContext.cpp
@@ -270,6 +270,12 @@
rsc->mForceCpu = true;
}
+ bool forceRSoV = getProp("debug.rs.rsov") != 0;
+ if (forceRSoV) {
+ ALOGD("Force the use of RSoV driver");
+ rsc->mForceRSoV = true;
+ }
+
bool forceCpu = getProp("debug.rs.default-CPU-driver") != 0;
if (forceCpu) {
ALOGD("Skipping hardware driver and loading default CPU driver");
@@ -277,7 +283,7 @@
}
rsc->mForceCpu |= rsc->mIsGraphicsContext;
- rsc->loadDriver(rsc->mForceCpu);
+ rsc->loadDriver(rsc->mForceCpu, rsc->mForceRSoV);
if (!rsc->isSynchronous()) {
// Due to legacy we default to normal_graphics