summaryrefslogtreecommitdiff
path: root/rsContext.cpp
diff options
context:
space:
mode:
authorStephen Hines <srhines@google.com>2012-10-01 17:48:22 -0700
committerStephen Hines <srhines@google.com>2012-10-01 17:48:22 -0700
commitc83dd0b9f81aaeb15e2d03849b04f20b581bfe49 (patch)
tree69e2a2a25690833d1699736578d4b4601e70fe10 /rsContext.cpp
parentfa17cda2d7e0948677035890e40498ad0b639c92 (diff)
downloadrs-c83dd0b9f81aaeb15e2d03849b04f20b581bfe49.tar.gz
Add "debug.rs.default-CPU-driver" property for RS driver.
To switch back to the CPU driver (libRSDriver.so): adb shell setprop debug.rs.default-CPU-driver 1 To turn this behavior off: adb shell setprop debug.rs.default-CPU-driver 0 Bug: 7256001 Change-Id: I37477ca06e58aed1c0d4f94355e3ae568083dc71
Diffstat (limited to 'rsContext.cpp')
-rw-r--r--rsContext.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/rsContext.cpp b/rsContext.cpp
index ea9c4065..68305703 100644
--- a/rsContext.cpp
+++ b/rsContext.cpp
@@ -228,11 +228,17 @@ void * Context::threadProc(void *vrsc) {
#define XSTR(S) #S
#define STR(S) XSTR(S)
#define OVERRIDE_RS_DRIVER_STRING STR(OVERRIDE_RS_DRIVER)
- driverSO = dlopen(OVERRIDE_RS_DRIVER_STRING, RTLD_LAZY);
- if (driverSO == NULL) {
- ALOGE("Failed loading %s: %s", OVERRIDE_RS_DRIVER_STRING, dlerror());
- // Continue to attempt loading fallback driver
+ if (getProp("debug.rs.default-CPU-driver") != 0) {
+ ALOGE("Skipping override driver and loading default CPU driver");
+ } else {
+ driverSO = dlopen(OVERRIDE_RS_DRIVER_STRING, RTLD_LAZY);
+ if (driverSO == NULL) {
+ ALOGE("Failed loading %s: %s", OVERRIDE_RS_DRIVER_STRING,
+ dlerror());
+ // Continue to attempt loading fallback driver
+ }
}
+
#undef XSTR
#undef STR
#endif // OVERRIDE_RS_DRIVER