summaryrefslogtreecommitdiff
path: root/rsContext.cpp
diff options
context:
space:
mode:
authorYang Ni <yangni@google.com>2016-11-11 12:30:09 -0800
committerYang Ni <yangni@google.com>2016-12-06 09:24:52 -0800
commit75f0d3110b04346b901771f96ce15cdbe907278f (patch)
treea13ce3211bfb37b0d3088c5f5ff83e247c4167b2 /rsContext.cpp
parent6babd9ca03e1379380af0c1cfde6f6d3e92ccd29 (diff)
downloadrs-75f0d3110b04346b901771f96ce15cdbe907278f.tar.gz
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
Diffstat (limited to 'rsContext.cpp')
-rw-r--r--rsContext.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/rsContext.cpp b/rsContext.cpp
index a706a8bc..0c25d04d 100644
--- a/rsContext.cpp
+++ b/rsContext.cpp
@@ -270,6 +270,12 @@ void * Context::threadProc(void *vrsc) {
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 @@ void * Context::threadProc(void *vrsc) {
}
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