blob: e3854e143bf03119f8c1049bb4db3326f94835c5 [file] [log] [blame]
Zonr Chang1e2adce2012-04-12 13:29:43 +08001/*
2 * Copyright 2012, The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17//#define LOG_NDEBUG 0
Stephen Hinese198abe2012-07-27 18:05:41 -070018#include "bcc/Renderscript/RSInfo.h"
Zonr Chang1e2adce2012-04-12 13:29:43 +080019
Zonr Changf2907932012-04-13 11:56:21 +080020#include <dlfcn.h>
21
Zonr Chang1e2adce2012-04-12 13:29:43 +080022#include <cstring>
23#include <new>
Stephen Hines688e4c02012-12-12 18:04:18 -080024#include <string>
Zonr Chang1e2adce2012-04-12 13:29:43 +080025
Zonr Changc72c4dd2012-04-12 15:38:53 +080026#include "bcc/Support/FileBase.h"
Zonr Changef73a242012-04-12 16:44:01 +080027#include "bcc/Support/Log.h"
Zonr Chang1e2adce2012-04-12 13:29:43 +080028
Shih-wei Liaoed7fffb2012-06-30 11:27:59 -070029#include <cutils/properties.h>
30
Zonr Chang1e2adce2012-04-12 13:29:43 +080031using namespace bcc;
32
33const char RSInfo::LibBCCPath[] = "/system/lib/libbcc.so";
Shih-wei Liaof7401ab2013-01-25 16:29:44 -080034const char RSInfo::LibCompilerRTPath[] = "/system/lib/libcompiler_rt.so";
Zonr Chang1e2adce2012-04-12 13:29:43 +080035const char RSInfo::LibRSPath[] = "/system/lib/libRS.so";
Shih-wei Liao2665c2f2012-04-25 04:06:52 -070036const char RSInfo::LibCLCorePath[] = "/system/lib/libclcore.bc";
Michael Liaocdcce322012-09-25 21:59:39 -070037#if defined(ARCH_X86_HAVE_SSE2)
38const char RSInfo::LibCLCoreX86Path[] = "/system/lib/libclcore_x86.bc";
39#endif
Shih-wei Liaob1cc74f2012-06-30 11:27:01 -070040#if defined(ARCH_ARM_HAVE_NEON)
41const char RSInfo::LibCLCoreNEONPath[] = "/system/lib/libclcore_neon.bc";
42#endif
Shih-wei Liao2665c2f2012-04-25 04:06:52 -070043
Zonr Changf2907932012-04-13 11:56:21 +080044const uint8_t *RSInfo::LibBCCSHA1 = NULL;
Shih-wei Liaof7401ab2013-01-25 16:29:44 -080045const uint8_t *RSInfo::LibCompilerRTSHA1 = NULL;
Zonr Changf2907932012-04-13 11:56:21 +080046const uint8_t *RSInfo::LibRSSHA1 = NULL;
Shih-wei Liao2665c2f2012-04-25 04:06:52 -070047const uint8_t *RSInfo::LibCLCoreSHA1 = NULL;
Shih-wei Liaob1cc74f2012-06-30 11:27:01 -070048#if defined(ARCH_ARM_HAVE_NEON)
49const uint8_t *RSInfo::LibCLCoreNEONSHA1 = NULL;
50#endif
Zonr Chang1e2adce2012-04-12 13:29:43 +080051
Stephen Hines331310e2012-10-26 19:27:55 -070052bool RSInfo::LoadBuiltInSHA1Information() {
53#ifdef TARGET_BUILD
Zonr Changf2907932012-04-13 11:56:21 +080054 if (LibBCCSHA1 != NULL) {
55 // Loaded before.
Stephen Hines331310e2012-10-26 19:27:55 -070056 return true;
Zonr Chang1e2adce2012-04-12 13:29:43 +080057 }
58
Zonr Changf2907932012-04-13 11:56:21 +080059 void *h = ::dlopen("/system/lib/libbcc.sha1.so", RTLD_LAZY | RTLD_NOW);
60 if (h == NULL) {
61 ALOGE("Failed to load SHA-1 information from shared library '"
62 "/system/lib/libbcc.sha1.so'! (%s)", ::dlerror());
Stephen Hines331310e2012-10-26 19:27:55 -070063 return false;
Zonr Changf2907932012-04-13 11:56:21 +080064 }
Zonr Chang1e2adce2012-04-12 13:29:43 +080065
Zonr Changf2907932012-04-13 11:56:21 +080066 LibBCCSHA1 = reinterpret_cast<const uint8_t *>(::dlsym(h, "libbcc_so_SHA1"));
Shih-wei Liaof7401ab2013-01-25 16:29:44 -080067 LibCompilerRTSHA1 =
68 reinterpret_cast<const uint8_t *>(::dlsym(h, "libcompiler_rt_so_SHA1"));
Zonr Changf2907932012-04-13 11:56:21 +080069 LibRSSHA1 = reinterpret_cast<const uint8_t *>(::dlsym(h, "libRS_so_SHA1"));
Shih-wei Liao2665c2f2012-04-25 04:06:52 -070070 LibCLCoreSHA1 =
71 reinterpret_cast<const uint8_t *>(::dlsym(h, "libclcore_bc_SHA1"));
Shih-wei Liaob1cc74f2012-06-30 11:27:01 -070072#if defined(ARCH_ARM_HAVE_NEON)
73 LibCLCoreNEONSHA1 =
74 reinterpret_cast<const uint8_t *>(::dlsym(h, "libclcore_neon_bc_SHA1"));
75#endif
Zonr Chang1e2adce2012-04-12 13:29:43 +080076
Stephen Hines331310e2012-10-26 19:27:55 -070077 return true;
78#else // TARGET_BUILD
79 return false;
80#endif // TARGET_BUILD
Zonr Chang1e2adce2012-04-12 13:29:43 +080081}
82
83android::String8 RSInfo::GetPath(const FileBase &pFile) {
84 android::String8 result(pFile.getName().c_str());
85 result.append(".info");
86 return result;
87}
88
89#define PRINT_DEPENDENCY(PREFIX, N, X) \
90 ALOGV("\t" PREFIX "Source name: %s, " \
91 "SHA-1: %02x%02x%02x%02x%02x%02x%02x%02x%02x%02x" \
92 "%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x", \
93 (N), (X)[ 0], (X)[ 1], (X)[ 2], (X)[ 3], (X)[ 4], (X)[ 5], \
94 (X)[ 6], (X)[ 7], (X)[ 8], (X)[ 9], (X)[10], (X)[11], \
95 (X)[12], (X)[13], (X)[14], (X)[15], (X)[16], (X)[17], \
96 (X)[18], (X)[19]);
97
98bool RSInfo::CheckDependency(const RSInfo &pInfo,
99 const char *pInputFilename,
Shih-wei Liao7bcec852012-04-25 04:07:09 -0700100 const DependencyTableTy &pDeps) {
Shih-wei Liaob1cc74f2012-06-30 11:27:01 -0700101 // Built-in dependencies are libbcc.so, libRS.so and libclcore.bc plus
102 // libclcore_neon.bc if NEON is available on the target device.
103#if !defined(ARCH_ARM_HAVE_NEON)
Shih-wei Liaob1cc74f2012-06-30 11:27:01 -0700104 static const unsigned NumBuiltInDependencies = 4;
Shih-wei Liaof7401ab2013-01-25 16:29:44 -0800105#else
106 static const unsigned NumBuiltInDependencies = 5;
Shih-wei Liaob1cc74f2012-06-30 11:27:01 -0700107#endif
Zonr Chang1e2adce2012-04-12 13:29:43 +0800108
109 LoadBuiltInSHA1Information();
110
111 if (pInfo.mDependencyTable.size() != (pDeps.size() + NumBuiltInDependencies)) {
112 ALOGD("Number of dependencies recorded mismatch (%lu v.s. %lu) in %s!",
113 static_cast<unsigned long>(pInfo.mDependencyTable.size()),
114 static_cast<unsigned long>(pDeps.size()), pInputFilename);
115 return false;
116 } else {
117 // Built-in dependencies always go first.
118 const std::pair<const char *, const uint8_t *> &cache_libbcc_dep =
119 pInfo.mDependencyTable[0];
Shih-wei Liaof7401ab2013-01-25 16:29:44 -0800120 const std::pair<const char *, const uint8_t *> &cache_libcompiler_rt_dep =
Zonr Chang1e2adce2012-04-12 13:29:43 +0800121 pInfo.mDependencyTable[1];
Shih-wei Liaof7401ab2013-01-25 16:29:44 -0800122 const std::pair<const char *, const uint8_t *> &cache_libRS_dep =
Shih-wei Liao2665c2f2012-04-25 04:06:52 -0700123 pInfo.mDependencyTable[2];
Shih-wei Liaof7401ab2013-01-25 16:29:44 -0800124 const std::pair<const char *, const uint8_t *> &cache_libclcore_dep =
125 pInfo.mDependencyTable[3];
Shih-wei Liaob1cc74f2012-06-30 11:27:01 -0700126#if defined(ARCH_ARM_HAVE_NEON)
127 const std::pair<const char *, const uint8_t *> &cache_libclcore_neon_dep =
Shih-wei Liaof7401ab2013-01-25 16:29:44 -0800128 pInfo.mDependencyTable[4];
Shih-wei Liaob1cc74f2012-06-30 11:27:01 -0700129#endif
Zonr Chang1e2adce2012-04-12 13:29:43 +0800130
131 // Check libbcc.so.
Zonr Changf2907932012-04-13 11:56:21 +0800132 if (::memcmp(cache_libbcc_dep.second, LibBCCSHA1, SHA1_DIGEST_LENGTH) != 0) {
Zonr Chang1e2adce2012-04-12 13:29:43 +0800133 ALOGD("Cache %s is dirty due to %s has been updated.", pInputFilename,
134 LibBCCPath);
135 PRINT_DEPENDENCY("current - ", LibBCCPath, LibBCCSHA1);
136 PRINT_DEPENDENCY("cache - ", cache_libbcc_dep.first,
137 cache_libbcc_dep.second);
138 return false;
139 }
140
Shih-wei Liaof7401ab2013-01-25 16:29:44 -0800141 // Check libcompiler_rt.so.
142 if (::memcmp(cache_libcompiler_rt_dep.second, LibCompilerRTSHA1,
143 SHA1_DIGEST_LENGTH) != 0) {
144 ALOGD("Cache %s is dirty due to %s has been updated.", pInputFilename,
145 LibCompilerRTPath);
146 PRINT_DEPENDENCY("current - ", LibCompilerRTPath, LibCompilerRTSHA1);
147 PRINT_DEPENDENCY("cache - ", cache_libcompiler_rt_dep.first,
148 cache_libcompiler_rt_dep.second);
149 return false;
150 }
151
Zonr Chang1e2adce2012-04-12 13:29:43 +0800152 // Check libRS.so.
Zonr Changf2907932012-04-13 11:56:21 +0800153 if (::memcmp(cache_libRS_dep.second, LibRSSHA1, SHA1_DIGEST_LENGTH) != 0) {
Zonr Chang1e2adce2012-04-12 13:29:43 +0800154 ALOGD("Cache %s is dirty due to %s has been updated.", pInputFilename,
155 LibRSPath);
156 PRINT_DEPENDENCY("current - ", LibRSPath, LibRSSHA1);
157 PRINT_DEPENDENCY("cache - ", cache_libRS_dep.first,
158 cache_libRS_dep.second);
159 return false;
160 }
161
Shih-wei Liao2665c2f2012-04-25 04:06:52 -0700162 // Check libclcore.bc.
163 if (::memcmp(cache_libclcore_dep.second, LibCLCoreSHA1,
164 SHA1_DIGEST_LENGTH) != 0) {
165 ALOGD("Cache %s is dirty due to %s has been updated.", pInputFilename,
166 LibRSPath);
167 PRINT_DEPENDENCY("current - ", LibCLCorePath, LibCLCoreSHA1);
168 PRINT_DEPENDENCY("cache - ", cache_libclcore_dep.first,
169 cache_libclcore_dep.second);
170 return false;
171 }
172
Shih-wei Liaob1cc74f2012-06-30 11:27:01 -0700173#if defined(ARCH_ARM_HAVE_NEON)
174 // Check libclcore_neon.bc if NEON is available.
175 if (::memcmp(cache_libclcore_neon_dep.second, LibCLCoreNEONSHA1,
176 SHA1_DIGEST_LENGTH) != 0) {
177 ALOGD("Cache %s is dirty due to %s has been updated.", pInputFilename,
178 LibRSPath);
179 PRINT_DEPENDENCY("current - ", LibCLCoreNEONPath, LibCLCoreNEONSHA1);
180 PRINT_DEPENDENCY("cache - ", cache_libclcore_neon_dep.first,
181 cache_libclcore_neon_dep.second);
182 return false;
183 }
184#endif
185
Zonr Chang1e2adce2012-04-12 13:29:43 +0800186 for (unsigned i = 0; i < pDeps.size(); i++) {
Zonr Chang1e2adce2012-04-12 13:29:43 +0800187 const std::pair<const char *, const uint8_t *> &cache_dep =
188 pInfo.mDependencyTable[i + NumBuiltInDependencies];
189
Shih-wei Liao7bcec852012-04-25 04:07:09 -0700190 if ((::strcmp(pDeps[i].first, cache_dep.first) != 0) ||
191 (::memcmp(pDeps[i].second, cache_dep.second,
Zonr Changf2907932012-04-13 11:56:21 +0800192 SHA1_DIGEST_LENGTH) != 0)) {
Zonr Chang1e2adce2012-04-12 13:29:43 +0800193 ALOGD("Cache %s is dirty due to the source it dependends on has been "
194 "changed:", pInputFilename);
Shih-wei Liao7bcec852012-04-25 04:07:09 -0700195 PRINT_DEPENDENCY("given - ", pDeps[i].first, pDeps[i].second);
Zonr Chang1e2adce2012-04-12 13:29:43 +0800196 PRINT_DEPENDENCY("cache - ", cache_dep.first, cache_dep.second);
197 return false;
198 }
199 }
200 }
201
202 return true;
203}
204
205RSInfo::RSInfo(size_t pStringPoolSize) : mStringPool(NULL) {
206 ::memset(&mHeader, 0, sizeof(mHeader));
207
208 ::memcpy(mHeader.magic, RSINFO_MAGIC, sizeof(mHeader.magic));
209 ::memcpy(mHeader.version, RSINFO_VERSION, sizeof(mHeader.version));
210
211 mHeader.headerSize = sizeof(mHeader);
212
213 mHeader.dependencyTable.itemSize = sizeof(rsinfo::DependencyTableItem);
214 mHeader.pragmaList.itemSize = sizeof(rsinfo::PragmaItem);
215 mHeader.objectSlotList.itemSize = sizeof(rsinfo::ObjectSlotItem);
216 mHeader.exportVarNameList.itemSize = sizeof(rsinfo::ExportVarNameItem);
217 mHeader.exportFuncNameList.itemSize = sizeof(rsinfo::ExportFuncNameItem);
218 mHeader.exportForeachFuncList.itemSize = sizeof(rsinfo::ExportForeachFuncItem);
219
220 if (pStringPoolSize > 0) {
221 mHeader.strPoolSize = pStringPoolSize;
222 mStringPool = new (std::nothrow) char [ mHeader.strPoolSize ];
223 if (mStringPool == NULL) {
224 ALOGE("Out of memory when allocate memory for string pool in RSInfo "
225 "constructor (size: %u)!", mHeader.strPoolSize);
226 }
227 }
228}
229
230RSInfo::~RSInfo() {
231 delete [] mStringPool;
232}
233
234bool RSInfo::layout(off_t initial_offset) {
235 mHeader.dependencyTable.offset = initial_offset +
236 mHeader.headerSize +
237 mHeader.strPoolSize;
238 mHeader.dependencyTable.count = mDependencyTable.size();
239
240#define AFTER(_list) ((_list).offset + (_list).itemSize * (_list).count)
241 mHeader.pragmaList.offset = AFTER(mHeader.dependencyTable);
242 mHeader.pragmaList.count = mPragmas.size();
243
244 mHeader.objectSlotList.offset = AFTER(mHeader.pragmaList);
245 mHeader.objectSlotList.count = mObjectSlots.size();
246
247 mHeader.exportVarNameList.offset = AFTER(mHeader.objectSlotList);
248 mHeader.exportVarNameList.count = mExportVarNames.size();
249
250 mHeader.exportFuncNameList.offset = AFTER(mHeader.exportVarNameList);
251 mHeader.exportFuncNameList.count = mExportFuncNames.size();
252
253 mHeader.exportForeachFuncList.offset = AFTER(mHeader.exportFuncNameList);
254 mHeader.exportForeachFuncList.count = mExportForeachFuncs.size();
255#undef AFTER
256
257 return true;
258}
259
260void RSInfo::dump() const {
261 // Hide the codes to save the code size when debugging is disabled.
262#if !LOG_NDEBUG
263
264 // Dump header
265 ALOGV("RSInfo Header:");
266 ALOGV("\tIs threadable: %s", ((mHeader.isThreadable) ? "true" : "false"));
267 ALOGV("\tHeader size: %u", mHeader.headerSize);
268 ALOGV("\tString pool size: %u", mHeader.strPoolSize);
269
270#define DUMP_LIST_HEADER(_name, _header) do { \
271 ALOGV(_name ":"); \
272 ALOGV("\toffset: %u", (_header).offset); \
273 ALOGV("\t# of item: %u", (_header).count); \
274 ALOGV("\tsize of each item: %u", (_header).itemSize); \
275} while (false)
276 DUMP_LIST_HEADER("Dependency table", mHeader.dependencyTable);
277 for (DependencyTableTy::const_iterator dep_iter = mDependencyTable.begin(),
278 dep_end = mDependencyTable.end(); dep_iter != dep_end; dep_iter++) {
279 PRINT_DEPENDENCY("", dep_iter->first, dep_iter->second);
280 }
281
282 DUMP_LIST_HEADER("Pragma list", mHeader.pragmaList);
283 for (PragmaListTy::const_iterator pragma_iter = mPragmas.begin(),
284 pragma_end = mPragmas.end(); pragma_iter != pragma_end; pragma_iter++) {
285 ALOGV("\tkey: %s, value: %s", pragma_iter->first, pragma_iter->second);
286 }
287
288 DUMP_LIST_HEADER("RS object slots", mHeader.objectSlotList);
289 for (ObjectSlotListTy::const_iterator slot_iter = mObjectSlots.begin(),
290 slot_end = mObjectSlots.end(); slot_iter != slot_end; slot_iter++) {
291 ALOGV("slot: %u", *slot_iter);
292 }
293
294 DUMP_LIST_HEADER("RS export variables", mHeader.exportVarNameList);
295 for (ExportVarNameListTy::const_iterator var_iter = mExportVarNames.begin(),
296 var_end = mExportVarNames.end(); var_iter != var_end; var_iter++) {
297 ALOGV("name: %s", *var_iter);
298 }
299
300 DUMP_LIST_HEADER("RS export functions", mHeader.exportFuncNameList);
301 for (ExportFuncNameListTy::const_iterator func_iter = mExportFuncNames.begin(),
302 func_end = mExportFuncNames.end(); func_iter != func_end; func_iter++) {
303 ALOGV("name: %s", *func_iter);
304 }
305
306 DUMP_LIST_HEADER("RS foreach list", mHeader.exportForeachFuncList);
307 for (ExportForeachFuncListTy::const_iterator
308 foreach_iter = mExportForeachFuncs.begin(),
309 foreach_end = mExportForeachFuncs.end(); foreach_iter != foreach_end;
310 foreach_iter++) {
311 ALOGV("name: %s, signature: %05x", foreach_iter->first,
312 foreach_iter->second);
313 }
314#undef DUMP_LIST_HEADER
315
316#endif // LOG_NDEBUG
317 return;
318}
319
320const char *RSInfo::getStringFromPool(rsinfo::StringIndexTy pStrIdx) const {
321 // String pool uses direct indexing. Ensure that the pStrIdx is within the
322 // range.
323 if (pStrIdx >= mHeader.strPoolSize) {
324 ALOGE("String index #%u is out of range in string pool (size: %u)!",
325 pStrIdx, mHeader.strPoolSize);
326 return NULL;
327 }
328 return &mStringPool[ pStrIdx ];
329}
330
331rsinfo::StringIndexTy RSInfo::getStringIdxInPool(const char *pStr) const {
332 // Assume we are on the flat memory architecture (i.e., the memory space is
333 // continuous.)
334 if ((mStringPool + mHeader.strPoolSize) < pStr) {
335 ALOGE("String %s does not in the string pool!", pStr);
336 return rsinfo::gInvalidStringIndex;
337 }
338 return (pStr - mStringPool);
339}
340
Shih-wei Liaoed7fffb2012-06-30 11:27:59 -0700341RSInfo::FloatPrecision RSInfo::getFloatPrecisionRequirement() const {
Zonr Chang1e2adce2012-04-12 13:29:43 +0800342 // Check to see if we have any FP precision-related pragmas.
Stephen Hines688e4c02012-12-12 18:04:18 -0800343 std::string relaxed_pragma("rs_fp_relaxed");
344 std::string imprecise_pragma("rs_fp_imprecise");
345 std::string full_pragma("rs_fp_full");
Zonr Chang1e2adce2012-04-12 13:29:43 +0800346 bool relaxed_pragma_seen = false;
Stephen Hines688e4c02012-12-12 18:04:18 -0800347 bool imprecise_pragma_seen = false;
348 RSInfo::FloatPrecision result = FP_Full;
Zonr Chang1e2adce2012-04-12 13:29:43 +0800349
350 for (PragmaListTy::const_iterator pragma_iter = mPragmas.begin(),
351 pragma_end = mPragmas.end(); pragma_iter != pragma_end;
352 pragma_iter++) {
353 const char *pragma_key = pragma_iter->first;
Stephen Hines688e4c02012-12-12 18:04:18 -0800354 if (!relaxed_pragma.compare(pragma_key)) {
355 if (relaxed_pragma_seen || imprecise_pragma_seen) {
356 ALOGE("Multiple float precision pragmas specified!");
Zonr Chang1e2adce2012-04-12 13:29:43 +0800357 }
Stephen Hines688e4c02012-12-12 18:04:18 -0800358 relaxed_pragma_seen = true;
359 } else if (!imprecise_pragma.compare(pragma_key)) {
360 if (relaxed_pragma_seen || imprecise_pragma_seen) {
361 ALOGE("Multiple float precision pragmas specified!");
362 }
363 imprecise_pragma_seen = true;
Zonr Chang1e2adce2012-04-12 13:29:43 +0800364 }
365 }
366
367 // Imprecise is selected over Relaxed precision.
368 // In the absence of both, we stick to the default Full precision.
Stephen Hines688e4c02012-12-12 18:04:18 -0800369 if (imprecise_pragma_seen) {
370 result = FP_Imprecise;
371 } else if (relaxed_pragma_seen) {
Shih-wei Liaoed7fffb2012-06-30 11:27:59 -0700372 result = FP_Relaxed;
Zonr Chang1e2adce2012-04-12 13:29:43 +0800373 }
Shih-wei Liaoed7fffb2012-06-30 11:27:59 -0700374
375 // Provide an override for precsion via adb shell setprop
376 // adb shell setprop debug.rs.precision rs_fp_full
377 // adb shell setprop debug.rs.precision rs_fp_relaxed
378 // adb shell setprop debug.rs.precision rs_fp_imprecise
379 char precision_prop_buf[PROPERTY_VALUE_MAX];
380 property_get("debug.rs.precision", precision_prop_buf, "");
381
382 if (precision_prop_buf[0]) {
Stephen Hines688e4c02012-12-12 18:04:18 -0800383 if (!relaxed_pragma.compare(precision_prop_buf)) {
Shih-wei Liaoed7fffb2012-06-30 11:27:59 -0700384 ALOGI("Switching to RS FP relaxed mode via setprop");
385 result = FP_Relaxed;
Stephen Hines688e4c02012-12-12 18:04:18 -0800386 } else if (!imprecise_pragma.compare(precision_prop_buf)) {
Shih-wei Liaoed7fffb2012-06-30 11:27:59 -0700387 ALOGI("Switching to RS FP imprecise mode via setprop");
388 result = FP_Imprecise;
Stephen Hines688e4c02012-12-12 18:04:18 -0800389 } else if (!full_pragma.compare(precision_prop_buf)) {
Shih-wei Liaoed7fffb2012-06-30 11:27:59 -0700390 ALOGI("Switching to RS FP full mode via setprop");
391 result = FP_Full;
392 }
393 }
394
395 return result;
Zonr Chang1e2adce2012-04-12 13:29:43 +0800396}