[RenderScript] Use OVERRIDE_RS_DRIVER string in the default
implementation.

Bug: 37035983
Test: mm
Test: manually push to sailfish & angler, verify GPU driver successfully
load, and tests are passing.

Change-Id: Ic55c74228e7eae599702365c513009aa3454656b
Merged-In: Ic55c74228e7eae599702365c513009aa3454656b
diff --git a/renderscript/1.0/default/Context.cpp b/renderscript/1.0/default/Context.cpp
index 389b6e7..fbfc652 100644
--- a/renderscript/1.0/default/Context.cpp
+++ b/renderscript/1.0/default/Context.cpp
@@ -16,7 +16,19 @@
     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);
 }