summaryrefslogtreecommitdiffstats
path: root/renderscript/1.0/default/Context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'renderscript/1.0/default/Context.cpp')
-rw-r--r--renderscript/1.0/default/Context.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/renderscript/1.0/default/Context.cpp b/renderscript/1.0/default/Context.cpp
index 389b6e7bc..c2d7507f6 100644
--- a/renderscript/1.0/default/Context.cpp
+++ b/renderscript/1.0/default/Context.cpp
@@ -16,7 +16,19 @@ Context::Context(uint32_t sdkVersion, ContextType ct, int32_t flags) {
uint32_t _sdkVersion = sdkVersion;
RsContextType _ct = static_cast<RsContextType>(ct);
int32_t _flags = flags;
- mContext = Device::getHal().ContextCreate(_dev, _version, _sdkVersion, _ct, _flags);
+ const char* driverName = nullptr;
+
+#ifdef OVERRIDE_RS_DRIVER
+#define XSTR(S) #S
+#define STR(S) XSTR(S)
+#define OVERRIDE_RS_DRIVER_STRING STR(OVERRIDE_RS_DRIVER)
+ static std::string driverString(OVERRIDE_RS_DRIVER_STRING);
+ driverName = driverString.c_str();
+#undef XSTR
+#undef STR
+#endif // OVERRIDE_RS_DRIVER
+ mContext =
+ Device::getHal().ContextCreateVendor(_dev, _version, _sdkVersion, _ct, _flags, driverName);
}