187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams/* 2709a0978ae141198018ca9769f8d96292a8928e6Jason Sams * Copyright (C) 2011-2012 The Android Open Source Project 387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams * 487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams * Licensed under the Apache License, Version 2.0 (the "License"); 587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams * you may not use this file except in compliance with the License. 687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams * You may obtain a copy of the License at 787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams * 887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams * http://www.apache.org/licenses/LICENSE-2.0 987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams * 1087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams * Unless required by applicable law or agreed to in writing, software 1187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams * distributed under the License is distributed on an "AS IS" BASIS, 1287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams * See the License for the specific language governing permissions and 1487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams * limitations under the License. 1587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams */ 1687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 1787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams#include "rsContext.h" 1887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams#include "rsScriptC.h" 1987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams#include "rsMatrix4x4.h" 2087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams#include "rsMatrix3x3.h" 2187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams#include "rsMatrix2x2.h" 2287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams#include "rsRuntime.h" 2387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 2487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams#include "rsdCore.h" 25807fdc4b6f3fb893015ee136565d6151bb2332d3Jason Sams#include "rsdBcc.h" 2687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 279e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams#include "rsdPath.h" 28b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams#include "rsdAllocation.h" 29414a46166126da6864258bd25ff183f9a3c6261dStephen Hines#include "rsdShaderCache.h" 30414a46166126da6864258bd25ff183f9a3c6261dStephen Hines#include "rsdVertexArray.h" 3187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 3287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams#include <time.h> 3387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 3487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsusing namespace android; 3587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsusing namespace android::renderscript; 3687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 37a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef float float2 __attribute__((ext_vector_type(2))); 38a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef float float3 __attribute__((ext_vector_type(3))); 39a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef float float4 __attribute__((ext_vector_type(4))); 405261a5ea546ff358edd5aac7602fc4132434f481Jason Samstypedef double double2 __attribute__((ext_vector_type(2))); 415261a5ea546ff358edd5aac7602fc4132434f481Jason Samstypedef double double3 __attribute__((ext_vector_type(3))); 425261a5ea546ff358edd5aac7602fc4132434f481Jason Samstypedef double double4 __attribute__((ext_vector_type(4))); 43a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef char char2 __attribute__((ext_vector_type(2))); 44a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef char char3 __attribute__((ext_vector_type(3))); 45a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef char char4 __attribute__((ext_vector_type(4))); 46a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef unsigned char uchar2 __attribute__((ext_vector_type(2))); 47a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef unsigned char uchar3 __attribute__((ext_vector_type(3))); 48a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef unsigned char uchar4 __attribute__((ext_vector_type(4))); 49d8b8f8a16415496acc9844a89599ce7f377bd04dJason Samstypedef int16_t short2 __attribute__((ext_vector_type(2))); 50d8b8f8a16415496acc9844a89599ce7f377bd04dJason Samstypedef int16_t short3 __attribute__((ext_vector_type(3))); 51d8b8f8a16415496acc9844a89599ce7f377bd04dJason Samstypedef int16_t short4 __attribute__((ext_vector_type(4))); 52d8b8f8a16415496acc9844a89599ce7f377bd04dJason Samstypedef uint16_t ushort2 __attribute__((ext_vector_type(2))); 53d8b8f8a16415496acc9844a89599ce7f377bd04dJason Samstypedef uint16_t ushort3 __attribute__((ext_vector_type(3))); 54d8b8f8a16415496acc9844a89599ce7f377bd04dJason Samstypedef uint16_t ushort4 __attribute__((ext_vector_type(4))); 55a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef int32_t int2 __attribute__((ext_vector_type(2))); 56a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef int32_t int3 __attribute__((ext_vector_type(3))); 57a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef int32_t int4 __attribute__((ext_vector_type(4))); 58a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef uint32_t uint2 __attribute__((ext_vector_type(2))); 59a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef uint32_t uint3 __attribute__((ext_vector_type(3))); 60a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef uint32_t uint4 __attribute__((ext_vector_type(4))); 61d8b8f8a16415496acc9844a89599ce7f377bd04dJason Samstypedef int64_t long2 __attribute__((ext_vector_type(2))); 62d8b8f8a16415496acc9844a89599ce7f377bd04dJason Samstypedef int64_t long3 __attribute__((ext_vector_type(3))); 63d8b8f8a16415496acc9844a89599ce7f377bd04dJason Samstypedef int64_t long4 __attribute__((ext_vector_type(4))); 64d8b8f8a16415496acc9844a89599ce7f377bd04dJason Samstypedef uint64_t ulong2 __attribute__((ext_vector_type(2))); 65d8b8f8a16415496acc9844a89599ce7f377bd04dJason Samstypedef uint64_t ulong3 __attribute__((ext_vector_type(3))); 66d8b8f8a16415496acc9844a89599ce7f377bd04dJason Samstypedef uint64_t ulong4 __attribute__((ext_vector_type(4))); 6787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 685261a5ea546ff358edd5aac7602fc4132434f481Jason Samstypedef uint8_t uchar; 695261a5ea546ff358edd5aac7602fc4132434f481Jason Samstypedef uint16_t ushort; 705261a5ea546ff358edd5aac7602fc4132434f481Jason Samstypedef uint32_t uint; 710b575de8ed0b628d84d256f5846500b0385979bdTim Murray#ifndef RS_SERVER 725261a5ea546ff358edd5aac7602fc4132434f481Jason Samstypedef uint64_t ulong; 730b575de8ed0b628d84d256f5846500b0385979bdTim Murray#endif 7487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 75d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray#ifdef RS_COMPATIBILITY_LIB 76d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray#define OPAQUETYPE(t) \ 77d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray typedef struct { const int* const p; } __attribute__((packed, aligned(4))) t; 78d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 79d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayOPAQUETYPE(rs_element) 80d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayOPAQUETYPE(rs_type) 81d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayOPAQUETYPE(rs_allocation) 82d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayOPAQUETYPE(rs_sampler) 83d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayOPAQUETYPE(rs_script) 84d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayOPAQUETYPE(rs_script_call) 85d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray#undef OPAQUETYPE 86d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 877a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hinestypedef enum { 887a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines // Empty to avoid conflicting definitions with RsAllocationCubemapFace 897a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines} rs_allocation_cubemap_face; 907a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines 91d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murraytypedef struct { 92d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray int tm_sec; ///< seconds 93d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray int tm_min; ///< minutes 94d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray int tm_hour; ///< hours 95d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray int tm_mday; ///< day of the month 96d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray int tm_mon; ///< month 97d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray int tm_year; ///< year 98d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray int tm_wday; ///< day of the week 99d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray int tm_yday; ///< day of the year 100d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray int tm_isdst; ///< daylight savings time 101d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray} rs_tm; 102d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray#endif 103d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 10487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 10587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// Allocation 10687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 10787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 10887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 1091aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_AllocationSyncAll2(android::renderscript::rs_allocation a, RsAllocationUsageType source) { 110709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 1111aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrAllocationSyncAll(rsc, (Allocation*)a.p, source); 11287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 11387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 1141aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_AllocationSyncAll(android::renderscript::rs_allocation a) { 115709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 1161aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrAllocationSyncAll(rsc, (Allocation*)a.p, RS_ALLOCATION_USAGE_SCRIPT); 11787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 11887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 1191aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray#ifndef RS_COMPATIBILITY_LIB 1201aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 1211aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_AllocationCopy1DRange(android::renderscript::rs_allocation dstAlloc, 12274a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk uint32_t dstOff, 12374a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk uint32_t dstMip, 12474a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk uint32_t count, 1251aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray android::renderscript::rs_allocation srcAlloc, 12674a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk uint32_t srcOff, uint32_t srcMip) { 127709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 1281aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrAllocationCopy1DRange(rsc, (Allocation*)dstAlloc.p, dstOff, dstMip, count, 1291aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray (Allocation*)srcAlloc.p, srcOff, srcMip); 13074a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk} 13174a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk 1321aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_AllocationCopy2DRange(android::renderscript::rs_allocation dstAlloc, 13374a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk uint32_t dstXoff, uint32_t dstYoff, 13474a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk uint32_t dstMip, uint32_t dstFace, 13574a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk uint32_t width, uint32_t height, 1361aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray android::renderscript::rs_allocation srcAlloc, 13774a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk uint32_t srcXoff, uint32_t srcYoff, 13874a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk uint32_t srcMip, uint32_t srcFace) { 139709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 1401aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrAllocationCopy2DRange(rsc, (Allocation*)dstAlloc.p, 141a94952436aeb251f587c1bccdf94c7f75285dfe2Alex Sakhartchouk dstXoff, dstYoff, dstMip, dstFace, 142a94952436aeb251f587c1bccdf94c7f75285dfe2Alex Sakhartchouk width, height, 1431aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray (Allocation*)srcAlloc.p, 144a94952436aeb251f587c1bccdf94c7f75285dfe2Alex Sakhartchouk srcXoff, srcYoff, srcMip, srcFace); 14574a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk} 14674a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk 1471aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_AllocationIoSend(android::renderscript::rs_allocation alloc) { 1481aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray Context *rsc = RsdCpuReference::getTlsContext(); 1491aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrAllocationIoSend(rsc, (Allocation*)alloc.p); 1501aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray} 1511aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 1521aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 1531aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_AllocationIoReceive(android::renderscript::rs_allocation alloc) { 1541aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray Context *rsc = RsdCpuReference::getTlsContext(); 1551aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrAllocationIoReceive(rsc, (Allocation*)alloc.p); 1561aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray} 1571aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 1581aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray#else 1591aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 1601aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_AllocationCopy1DRange(::rs_allocation dstAlloc, 1611aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray uint32_t dstOff, 1621aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray uint32_t dstMip, 1631aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray uint32_t count, 1641aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray ::rs_allocation srcAlloc, 1651aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray uint32_t srcOff, uint32_t srcMip) { 1661aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray Context *rsc = RsdCpuReference::getTlsContext(); 1671aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrAllocationCopy1DRange(rsc, (Allocation*)dstAlloc.p, dstOff, dstMip, count, 1681aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray (Allocation*)srcAlloc.p, srcOff, srcMip); 1691aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray} 1701aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 1711aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_AllocationCopy2DRange(::rs_allocation dstAlloc, 1721aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray uint32_t dstXoff, uint32_t dstYoff, 1731aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray uint32_t dstMip, uint32_t dstFace, 1741aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray uint32_t width, uint32_t height, 1751aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray ::rs_allocation srcAlloc, 1761aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray uint32_t srcXoff, uint32_t srcYoff, 1771aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray uint32_t srcMip, uint32_t srcFace) { 1781aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray Context *rsc = RsdCpuReference::getTlsContext(); 1791aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrAllocationCopy2DRange(rsc, (Allocation*)dstAlloc.p, 1801aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray dstXoff, dstYoff, dstMip, dstFace, 1811aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray width, height, 1821aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray (Allocation*)srcAlloc.p, 1831aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray srcXoff, srcYoff, srcMip, srcFace); 1841aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray} 1851aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 1861aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_AllocationIoSend(Allocation* alloc) { 187709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 188ddceab9a001f07a3395226c5e06e3b420720af0fJason Sams rsrAllocationIoSend(rsc, alloc); 189b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams} 190b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams 191b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams 1921aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_AllocationIoReceive(Allocation* alloc) { 193709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 194ddceab9a001f07a3395226c5e06e3b420720af0fJason Sams rsrAllocationIoReceive(rsc, alloc); 195b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams} 196b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams 1971aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray#endif 1981aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 1997a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines#ifndef RS_COMPATIBILITY_LIB 20074a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk 20187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 20287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// Context 20387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 20487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 20587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindTexture(ProgramFragment *pf, uint32_t slot, Allocation *a) { 206709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 207709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrBindTexture(rsc, pf, slot, a); 20887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 20987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 210a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchoukstatic void SC_BindVertexConstant(ProgramVertex *pv, uint32_t slot, Allocation *a) { 211709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 212709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrBindConstant(rsc, pv, slot, a); 213a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchouk} 214a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchouk 215a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchoukstatic void SC_BindFragmentConstant(ProgramFragment *pf, uint32_t slot, Allocation *a) { 216709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 217709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrBindConstant(rsc, pf, slot, a); 218a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchouk} 219a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchouk 22087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindSampler(ProgramFragment *pf, uint32_t slot, Sampler *s) { 221709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 222709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrBindSampler(rsc, pf, slot, s); 22387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 22487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 22587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindProgramStore(ProgramStore *ps) { 226709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 227709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrBindProgramStore(rsc, ps); 22887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 22987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 23087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindProgramFragment(ProgramFragment *pf) { 231709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 232709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrBindProgramFragment(rsc, pf); 23387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 23487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 23587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindProgramVertex(ProgramVertex *pv) { 236709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 237709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrBindProgramVertex(rsc, pv); 23887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 23987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 24087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindProgramRaster(ProgramRaster *pr) { 241709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 242709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrBindProgramRaster(rsc, pr); 24387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 24487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 24587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindFrameBufferObjectColorTarget(Allocation *a, uint32_t slot) { 246709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 247709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrBindFrameBufferObjectColorTarget(rsc, a, slot); 24887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 24987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 25087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindFrameBufferObjectDepthTarget(Allocation *a) { 251709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 252709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrBindFrameBufferObjectDepthTarget(rsc, a); 25387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 25487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 25587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_ClearFrameBufferObjectColorTarget(uint32_t slot) { 256709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 257709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrClearFrameBufferObjectColorTarget(rsc, slot); 25887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 25987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 26087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_ClearFrameBufferObjectDepthTarget(Context *, Script *) { 261709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 262709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrClearFrameBufferObjectDepthTarget(rsc); 26387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 26487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 26587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_ClearFrameBufferObjectTargets(Context *, Script *) { 266709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 267709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrClearFrameBufferObjectTargets(rsc); 26887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 26987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 27087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 27187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 27287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// VP 27387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 27487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 27587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_VpLoadProjectionMatrix(const rsc_Matrix *m) { 276709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 277709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrVpLoadProjectionMatrix(rsc, m); 27887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 27987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 28087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_VpLoadModelMatrix(const rsc_Matrix *m) { 281709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 282709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrVpLoadModelMatrix(rsc, m); 28387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 28487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 28587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_VpLoadTextureMatrix(const rsc_Matrix *m) { 286709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 287709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrVpLoadTextureMatrix(rsc, m); 28887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 28987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 29087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_PfConstantColor(ProgramFragment *pf, float r, float g, float b, float a) { 291709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 292709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrPfConstantColor(rsc, pf, r, g, b, a); 29387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 29487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 29587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_VpGetProjectionMatrix(rsc_Matrix *m) { 296709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 297709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrVpGetProjectionMatrix(rsc, m); 29887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 29987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 30087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 30187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 30287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// Drawing 30387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 30487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 30587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawQuadTexCoords(float x1, float y1, float z1, float u1, float v1, 30687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams float x2, float y2, float z2, float u2, float v2, 30787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams float x3, float y3, float z3, float u3, float v3, 30887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams float x4, float y4, float z4, float u4, float v4) { 309709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 310414a46166126da6864258bd25ff183f9a3c6261dStephen Hines 311414a46166126da6864258bd25ff183f9a3c6261dStephen Hines if (!rsc->setupCheck()) { 312414a46166126da6864258bd25ff183f9a3c6261dStephen Hines return; 313414a46166126da6864258bd25ff183f9a3c6261dStephen Hines } 314414a46166126da6864258bd25ff183f9a3c6261dStephen Hines 315414a46166126da6864258bd25ff183f9a3c6261dStephen Hines RsdHal *dc = (RsdHal *)rsc->mHal.drv; 316414a46166126da6864258bd25ff183f9a3c6261dStephen Hines if (!dc->gl.shaderCache->setup(rsc)) { 317414a46166126da6864258bd25ff183f9a3c6261dStephen Hines return; 318414a46166126da6864258bd25ff183f9a3c6261dStephen Hines } 319414a46166126da6864258bd25ff183f9a3c6261dStephen Hines 320414a46166126da6864258bd25ff183f9a3c6261dStephen Hines //ALOGE("Quad"); 321414a46166126da6864258bd25ff183f9a3c6261dStephen Hines //ALOGE("%4.2f, %4.2f, %4.2f", x1, y1, z1); 322414a46166126da6864258bd25ff183f9a3c6261dStephen Hines //ALOGE("%4.2f, %4.2f, %4.2f", x2, y2, z2); 323414a46166126da6864258bd25ff183f9a3c6261dStephen Hines //ALOGE("%4.2f, %4.2f, %4.2f", x3, y3, z3); 324414a46166126da6864258bd25ff183f9a3c6261dStephen Hines //ALOGE("%4.2f, %4.2f, %4.2f", x4, y4, z4); 325414a46166126da6864258bd25ff183f9a3c6261dStephen Hines 326414a46166126da6864258bd25ff183f9a3c6261dStephen Hines float vtx[] = {x1,y1,z1, x2,y2,z2, x3,y3,z3, x4,y4,z4}; 327414a46166126da6864258bd25ff183f9a3c6261dStephen Hines const float tex[] = {u1,v1, u2,v2, u3,v3, u4,v4}; 328414a46166126da6864258bd25ff183f9a3c6261dStephen Hines 329414a46166126da6864258bd25ff183f9a3c6261dStephen Hines RsdVertexArray::Attrib attribs[2]; 330e195a3f57ace3b66d313a6ee88c6e93d5c9d87f4Tim Murray attribs[0].set(GL_FLOAT, 3, 12, false, (size_t)vtx, "ATTRIB_position"); 331e195a3f57ace3b66d313a6ee88c6e93d5c9d87f4Tim Murray attribs[1].set(GL_FLOAT, 2, 8, false, (size_t)tex, "ATTRIB_texture0"); 332414a46166126da6864258bd25ff183f9a3c6261dStephen Hines 333414a46166126da6864258bd25ff183f9a3c6261dStephen Hines RsdVertexArray va(attribs, 2); 334414a46166126da6864258bd25ff183f9a3c6261dStephen Hines va.setup(rsc); 335414a46166126da6864258bd25ff183f9a3c6261dStephen Hines 336414a46166126da6864258bd25ff183f9a3c6261dStephen Hines RSD_CALL_GL(glDrawArrays, GL_TRIANGLE_FAN, 0, 4); 33787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 33887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 33987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawQuad(float x1, float y1, float z1, 34087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams float x2, float y2, float z2, 34187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams float x3, float y3, float z3, 34287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams float x4, float y4, float z4) { 343414a46166126da6864258bd25ff183f9a3c6261dStephen Hines SC_DrawQuadTexCoords(x1, y1, z1, 0, 1, 344414a46166126da6864258bd25ff183f9a3c6261dStephen Hines x2, y2, z2, 1, 1, 345414a46166126da6864258bd25ff183f9a3c6261dStephen Hines x3, y3, z3, 1, 0, 346414a46166126da6864258bd25ff183f9a3c6261dStephen Hines x4, y4, z4, 0, 0); 34787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 34887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 34987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawSpriteScreenspace(float x, float y, float z, float w, float h) { 350709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 351414a46166126da6864258bd25ff183f9a3c6261dStephen Hines 352414a46166126da6864258bd25ff183f9a3c6261dStephen Hines ObjectBaseRef<const ProgramVertex> tmp(rsc->getProgramVertex()); 353414a46166126da6864258bd25ff183f9a3c6261dStephen Hines rsc->setProgramVertex(rsc->getDefaultProgramVertex()); 354414a46166126da6864258bd25ff183f9a3c6261dStephen Hines //rsc->setupCheck(); 355414a46166126da6864258bd25ff183f9a3c6261dStephen Hines 356414a46166126da6864258bd25ff183f9a3c6261dStephen Hines //GLint crop[4] = {0, h, w, -h}; 357414a46166126da6864258bd25ff183f9a3c6261dStephen Hines 358414a46166126da6864258bd25ff183f9a3c6261dStephen Hines float sh = rsc->getHeight(); 359414a46166126da6864258bd25ff183f9a3c6261dStephen Hines 360414a46166126da6864258bd25ff183f9a3c6261dStephen Hines SC_DrawQuad(x, sh - y, z, 361414a46166126da6864258bd25ff183f9a3c6261dStephen Hines x+w, sh - y, z, 362414a46166126da6864258bd25ff183f9a3c6261dStephen Hines x+w, sh - (y+h), z, 363414a46166126da6864258bd25ff183f9a3c6261dStephen Hines x, sh - (y+h), z); 364414a46166126da6864258bd25ff183f9a3c6261dStephen Hines rsc->setProgramVertex((ProgramVertex *)tmp.get()); 36587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 36687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 36787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawRect(float x1, float y1, float x2, float y2, float z) { 368414a46166126da6864258bd25ff183f9a3c6261dStephen Hines SC_DrawQuad(x1, y2, z, x2, y2, z, x2, y1, z, x1, y1, z); 36987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 37087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 3719e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Samsstatic void SC_DrawPath(Path *p) { 372709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 3739e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams rsdPathDraw(rsc, p); 3749e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams} 3759e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams 37687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawMesh(Mesh *m) { 377709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 378709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrDrawMesh(rsc, m); 37987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 38087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 38187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawMeshPrimitive(Mesh *m, uint32_t primIndex) { 382709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 383709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrDrawMeshPrimitive(rsc, m, primIndex); 38487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 38587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 38687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawMeshPrimitiveRange(Mesh *m, uint32_t primIndex, uint32_t start, uint32_t len) { 387709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 388709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrDrawMeshPrimitiveRange(rsc, m, primIndex, start, len); 38987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 39087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 39187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_MeshComputeBoundingBox(Mesh *m, 39287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams float *minX, float *minY, float *minZ, 39387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams float *maxX, float *maxY, float *maxZ) { 394709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 395709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrMeshComputeBoundingBox(rsc, m, minX, minY, minZ, maxX, maxY, maxZ); 39687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 39787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 39887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 39987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 40087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 40187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// 40287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 40387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 40487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 40587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_Color(float r, float g, float b, float a) { 406709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 407709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrColor(rsc, r, g, b, a); 40887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 40987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 41087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_Finish() { 411709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 412653b53ebcd2bedc94ac486080d2e82e1920232e3Alex Sakhartchouk rsdGLFinish(rsc); 41387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 41487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 41587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_ClearColor(float r, float g, float b, float a) { 416709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 417709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrPrepareClear(rsc); 418653b53ebcd2bedc94ac486080d2e82e1920232e3Alex Sakhartchouk rsdGLClearColor(rsc, r, g, b, a); 41987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 42087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 42187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_ClearDepth(float v) { 422709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 423709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrPrepareClear(rsc); 424653b53ebcd2bedc94ac486080d2e82e1920232e3Alex Sakhartchouk rsdGLClearDepth(rsc, v); 42587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 42687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 42787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic uint32_t SC_GetWidth() { 428709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 429709a0978ae141198018ca9769f8d96292a8928e6Jason Sams return rsrGetWidth(rsc); 43087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 43187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 43287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic uint32_t SC_GetHeight() { 433709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 434709a0978ae141198018ca9769f8d96292a8928e6Jason Sams return rsrGetHeight(rsc); 43587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 43687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 43787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawTextAlloc(Allocation *a, int x, int y) { 438709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 439709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrDrawTextAlloc(rsc, a, x, y); 44087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 44187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 44287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawText(const char *text, int x, int y) { 443709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 444709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrDrawText(rsc, text, x, y); 44587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 44687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 44787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_MeasureTextAlloc(Allocation *a, 44887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams int32_t *left, int32_t *right, int32_t *top, int32_t *bottom) { 449709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 450709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrMeasureTextAlloc(rsc, a, left, right, top, bottom); 45187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 45287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 45387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_MeasureText(const char *text, 45487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams int32_t *left, int32_t *right, int32_t *top, int32_t *bottom) { 455709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 456709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrMeasureText(rsc, text, left, right, top, bottom); 45787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 45887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 45987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindFont(Font *f) { 460709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 461709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrBindFont(rsc, f); 46287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 46387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 46487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_FontColor(float r, float g, float b, float a) { 465709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 466709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrFontColor(rsc, r, g, b, a); 46787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 468110f181b7966212a36ef18016f9b81c7322d0a2fJason Sams#endif 46987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 47087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 47187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 47287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// 47387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 47487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 4751aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_ClearObject(rs_object_base *dst) { 4761aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray Context *rsc = RsdCpuReference::getTlsContext(); 4771aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrClearObject(rsc, dst); 4781aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray} 4791aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray#ifndef RS_COMPATIBILITY_LIB 4801aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_SetObject(rs_object_base *dst, rs_object_base src) { 481a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams // ALOGE("SC_SetObject: dst = %p, src = %p", dst, src.p); 482a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams // ALOGE("SC_SetObject: dst[0] = %p", dst[0]); 483a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 4841aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrSetObject(rsc, dst, (ObjectBase*)src.p); 48587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 48687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 487444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#ifdef __LP64__ 488444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chenstatic void SC_SetObject_ByRef(rs_object_base *dst, rs_object_base *src) { 489444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen // ALOGE("SC_SetObject2: dst = %p, src = %p", dst, src->p); 490444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen Context *rsc = RsdCpuReference::getTlsContext(); 491444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen rsrSetObject(rsc, dst, (ObjectBase*)src->p); 492444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen} 493444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#endif 494444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen 4951aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic bool SC_IsObject(rs_object_base o) { 496709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 4971aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray return rsrIsObject(rsc, o); 4981aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray} 499444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen 500444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#ifdef __LP64__ 501444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chenstatic bool SC_IsObject_ByRef(rs_object_base *o) { 502444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen Context *rsc = RsdCpuReference::getTlsContext(); 503444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen return rsrIsObject(rsc, *o); 504444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen} 505444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#endif 506444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen 5071aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray#else 5081aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_SetObject(rs_object_base *dst, ObjectBase* src) { 5091aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray // ALOGE("SC_SetObject: dst = %p, src = %p", dst, src.p); 5101aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray // ALOGE("SC_SetObject: dst[0] = %p", dst[0]); 5111aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray Context *rsc = RsdCpuReference::getTlsContext(); 5121aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrSetObject(rsc, dst, src); 51387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 51487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 5151aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic bool SC_IsObject(ObjectBase* o) { 516709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 517f29edf80510d483b8663e9d8b859959e37361aeeJason Sams return rsrIsObject(rsc, o); 51887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 5191aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray#endif 52087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 521240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray 52247211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray#ifndef RS_COMPATIBILITY_LIB 52347211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray#ifndef __LP64__ 524240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray 525240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray// i386 has different struct return passing to ARM; emulate with void* 526240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray#ifdef __i386__ 527240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murraystatic const void* SC_GetAllocation(const void *ptr) { 528240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray Context *rsc = RsdCpuReference::getTlsContext(); 529240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray const Script *sc = RsdCpuReference::getTlsScript(); 530240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray Allocation* alloc = rsdScriptGetAllocationForPointer(rsc, sc, ptr); 531240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray android::renderscript::rs_allocation obj = {0}; 532240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray alloc->callUpdateCacheObject(rsc, &obj); 533240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray return (void*)obj.p; 534240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray} 535240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray#else 536240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray// ARMv7/MIPS 53747211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murraystatic const android::renderscript::rs_allocation SC_GetAllocation(const void *ptr) { 538709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 539709a0978ae141198018ca9769f8d96292a8928e6Jason Sams const Script *sc = RsdCpuReference::getTlsScript(); 54047211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray Allocation* alloc = rsdScriptGetAllocationForPointer(rsc, sc, ptr); 54147211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray android::renderscript::rs_allocation obj = {0}; 54247211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray alloc->callUpdateCacheObject(rsc, &obj); 54347211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray return obj; 54447211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray} 545240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray#endif 54647211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray#else 547240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray// AArch64/x86_64/MIPS64 54847211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murraystatic const android::renderscript::rs_allocation SC_GetAllocation(const void *ptr) { 54947211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray Context *rsc = RsdCpuReference::getTlsContext(); 55047211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray const Script *sc = RsdCpuReference::getTlsScript(); 55147211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray Allocation* alloc = rsdScriptGetAllocationForPointer(rsc, sc, ptr); 55247211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray android::renderscript::rs_allocation obj = {0, 0, 0, 0}; 55347211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray alloc->callUpdateCacheObject(rsc, &obj); 55447211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray return obj; 55587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 55647211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray#endif 55747211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray#endif 55887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 5591aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray#ifndef RS_COMPATIBILITY_LIB 560444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#ifndef __LP64__ 5611aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_ForEach_SAA(android::renderscript::rs_script target, 5621aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray android::renderscript::rs_allocation in, 5631aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray android::renderscript::rs_allocation out) { 564709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 5651aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrForEach(rsc, (Script*)target.p, (Allocation*)in.p, (Allocation*)out.p, NULL, 0, NULL); 566c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams} 567444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#else 568444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chenstatic void SC_ForEach_SAA(android::renderscript::rs_script *target, 569444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen android::renderscript::rs_allocation *in, 570444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen android::renderscript::rs_allocation *out) { 571444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen Context *rsc = RsdCpuReference::getTlsContext(); 572444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen rsrForEach(rsc, (Script*)target->p, (Allocation*)in->p, (Allocation*)out->p, NULL, 0, NULL); 573444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen} 574444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#endif 575c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams 576444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#ifndef __LP64__ 5771aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_ForEach_SAAU(android::renderscript::rs_script target, 5781aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray android::renderscript::rs_allocation in, 5791aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray android::renderscript::rs_allocation out, 580c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams const void *usr) { 581709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 5821aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrForEach(rsc, (Script*)target.p, (Allocation*)in.p, (Allocation*)out.p, usr, 0, NULL); 58387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 584444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#else 585444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chenstatic void SC_ForEach_SAAU(android::renderscript::rs_script *target, 586444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen android::renderscript::rs_allocation *in, 587444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen android::renderscript::rs_allocation *out, 588444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen const void *usr) { 589444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen Context *rsc = RsdCpuReference::getTlsContext(); 590444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen rsrForEach(rsc, (Script*)target->p, (Allocation*)in->p, (Allocation*)out->p, usr, 0, NULL); 591444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen} 592444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#endif 59387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 594444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#ifndef __LP64__ 5951aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_ForEach_SAAUS(android::renderscript::rs_script target, 5961aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray android::renderscript::rs_allocation in, 5971aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray android::renderscript::rs_allocation out, 598c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams const void *usr, 599c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams const RsScriptCall *call) { 600709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 6011aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrForEach(rsc, (Script*)target.p, (Allocation*)in.p, (Allocation*)out.p, usr, 0, call); 60287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 603444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#else 604444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chenstatic void SC_ForEach_SAAUS(android::renderscript::rs_script *target, 605444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen android::renderscript::rs_allocation *in, 606444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen android::renderscript::rs_allocation *out, 607444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen const void *usr, 608444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen const RsScriptCall *call) { 609444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen Context *rsc = RsdCpuReference::getTlsContext(); 610444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen rsrForEach(rsc, (Script*)target->p, (Allocation*)in->p, (Allocation*)out->p, usr, 0, call); 611444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen} 612444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#endif 61387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 614444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#ifndef __LP64__ 6151aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_ForEach_SAAUL(android::renderscript::rs_script target, 6161aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray android::renderscript::rs_allocation in, 6171aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray android::renderscript::rs_allocation out, 618c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams const void *usr, 619c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams uint32_t usrLen) { 620709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 6211aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrForEach(rsc, (Script*)target.p, (Allocation*)in.p, (Allocation*)out.p, usr, usrLen, NULL); 622c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams} 623444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#else 624444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chenstatic void SC_ForEach_SAAUL(android::renderscript::rs_script *target, 625444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen android::renderscript::rs_allocation *in, 626444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen android::renderscript::rs_allocation *out, 627444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen const void *usr, 628444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen uint32_t usrLen) { 629444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen Context *rsc = RsdCpuReference::getTlsContext(); 630444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen rsrForEach(rsc, (Script*)target->p, (Allocation*)in->p, (Allocation*)out->p, usr, usrLen, NULL); 631444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen} 632444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#endif 633c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams 634444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#ifndef __LP64__ 6351aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_ForEach_SAAULS(android::renderscript::rs_script target, 6361aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray android::renderscript::rs_allocation in, 6371aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray android::renderscript::rs_allocation out, 638c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams const void *usr, 639c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams uint32_t usrLen, 640c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams const RsScriptCall *call) { 641709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 6421aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrForEach(rsc, (Script*)target.p, (Allocation*)in.p, (Allocation*)out.p, usr, usrLen, call); 643c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams} 644444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#else 645444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chenstatic void SC_ForEach_SAAULS(android::renderscript::rs_script *target, 646444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen android::renderscript::rs_allocation *in, 647444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen android::renderscript::rs_allocation *out, 648444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen const void *usr, 649444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen uint32_t usrLen, 650444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen const RsScriptCall *call) { 651444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen Context *rsc = RsdCpuReference::getTlsContext(); 652444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen rsrForEach(rsc, (Script*)target->p, (Allocation*)in->p, (Allocation*)out->p, usr, usrLen, call); 653444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen} 654444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#endif 6551aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray#endif 65687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 65787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 65887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 65987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// Time routines 66087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 66187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 66287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic float SC_GetDt() { 663709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 664709a0978ae141198018ca9769f8d96292a8928e6Jason Sams const Script *sc = RsdCpuReference::getTlsScript(); 66587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams return rsrGetDt(rsc, sc); 66687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 66787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 668d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray#ifndef RS_COMPATIBILITY_LIB 66987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samstime_t SC_Time(time_t *timer) { 670709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 671709a0978ae141198018ca9769f8d96292a8928e6Jason Sams return rsrTime(rsc, timer); 67287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 673d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray#else 674d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murraystatic int SC_Time(int *timer) { 675d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray Context *rsc = RsdCpuReference::getTlsContext(); 676d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray return rsrTime(rsc, (long*)timer); 677d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray} 678d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray#endif 67987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 68087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samstm* SC_LocalTime(tm *local, time_t *timer) { 681709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 682709a0978ae141198018ca9769f8d96292a8928e6Jason Sams return rsrLocalTime(rsc, local, timer); 68387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 68487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 68587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsint64_t SC_UptimeMillis() { 686709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 687709a0978ae141198018ca9769f8d96292a8928e6Jason Sams return rsrUptimeMillis(rsc); 68887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 68987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 69087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsint64_t SC_UptimeNanos() { 691709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 692709a0978ae141198018ca9769f8d96292a8928e6Jason Sams return rsrUptimeNanos(rsc); 69387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 69487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 69587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 69687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// Message routines 69787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 69887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 699276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hinesstatic uint32_t SC_ToClient2(int cmdID, const void *data, uint32_t len) { 700709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 701709a0978ae141198018ca9769f8d96292a8928e6Jason Sams return rsrToClient(rsc, cmdID, data, len); 70287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 70387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 70487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic uint32_t SC_ToClient(int cmdID) { 705709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 70670537f52bdc6e8702db03cc91fe511371fb31267Stephen Hines return rsrToClient(rsc, cmdID, (const void *)NULL, 0); 70787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 70887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 709276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hinesstatic uint32_t SC_ToClientBlocking2(int cmdID, const void *data, uint32_t len) { 710709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 711709a0978ae141198018ca9769f8d96292a8928e6Jason Sams return rsrToClientBlocking(rsc, cmdID, data, len); 71287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 71387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 71487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic uint32_t SC_ToClientBlocking(int cmdID) { 715709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 71670537f52bdc6e8702db03cc91fe511371fb31267Stephen Hines return rsrToClientBlocking(rsc, cmdID, (const void *)NULL, 0); 71787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 71887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 71987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 7205261a5ea546ff358edd5aac7602fc4132434f481Jason Samsstatic void * ElementAt1D(Allocation *a, RsDataType dt, uint32_t vecSize, uint32_t x) { 7215261a5ea546ff358edd5aac7602fc4132434f481Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 7225261a5ea546ff358edd5aac7602fc4132434f481Jason Sams const Type *t = a->getType(); 7235261a5ea546ff358edd5aac7602fc4132434f481Jason Sams const Element *e = t->getElement(); 7245261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 7255261a5ea546ff358edd5aac7602fc4132434f481Jason Sams char buf[256]; 7265261a5ea546ff358edd5aac7602fc4132434f481Jason Sams if (x >= t->getLODDimX(0)) { 7275261a5ea546ff358edd5aac7602fc4132434f481Jason Sams sprintf(buf, "Out range ElementAt X %i of %i", x, t->getLODDimX(0)); 728cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines rsc->setError(RS_ERROR_FATAL_DEBUG, buf); 7295261a5ea546ff358edd5aac7602fc4132434f481Jason Sams return NULL; 7305261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } 7315261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 732d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (vecSize > 0) { 733d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (vecSize != e->getVectorSize()) { 734d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams sprintf(buf, "Vector size mismatch for ElementAt %i of %i", vecSize, e->getVectorSize()); 735cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines rsc->setError(RS_ERROR_FATAL_DEBUG, buf); 736d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams return NULL; 737d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams } 738d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 739d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (dt != e->getType()) { 740d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams sprintf(buf, "Data type mismatch for ElementAt %i of %i", dt, e->getType()); 741cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines rsc->setError(RS_ERROR_FATAL_DEBUG, buf); 742d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams return NULL; 743d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams } 7445261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } 7455261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 7465261a5ea546ff358edd5aac7602fc4132434f481Jason Sams uint8_t *p = (uint8_t *)a->mHal.drvState.lod[0].mallocPtr; 7475261a5ea546ff358edd5aac7602fc4132434f481Jason Sams const uint32_t eSize = e->getSizeBytes(); 7485261a5ea546ff358edd5aac7602fc4132434f481Jason Sams return &p[(eSize * x)]; 7495261a5ea546ff358edd5aac7602fc4132434f481Jason Sams} 7505261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 7515261a5ea546ff358edd5aac7602fc4132434f481Jason Samsstatic void * ElementAt2D(Allocation *a, RsDataType dt, uint32_t vecSize, uint32_t x, uint32_t y) { 7525261a5ea546ff358edd5aac7602fc4132434f481Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 7535261a5ea546ff358edd5aac7602fc4132434f481Jason Sams const Type *t = a->getType(); 7545261a5ea546ff358edd5aac7602fc4132434f481Jason Sams const Element *e = t->getElement(); 7555261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 7565261a5ea546ff358edd5aac7602fc4132434f481Jason Sams char buf[256]; 7575261a5ea546ff358edd5aac7602fc4132434f481Jason Sams if (x >= t->getLODDimX(0)) { 7585261a5ea546ff358edd5aac7602fc4132434f481Jason Sams sprintf(buf, "Out range ElementAt X %i of %i", x, t->getLODDimX(0)); 759cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines rsc->setError(RS_ERROR_FATAL_DEBUG, buf); 7605261a5ea546ff358edd5aac7602fc4132434f481Jason Sams return NULL; 7615261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } 7625261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 7635261a5ea546ff358edd5aac7602fc4132434f481Jason Sams if (y >= t->getLODDimY(0)) { 7645261a5ea546ff358edd5aac7602fc4132434f481Jason Sams sprintf(buf, "Out range ElementAt Y %i of %i", y, t->getLODDimY(0)); 765cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines rsc->setError(RS_ERROR_FATAL_DEBUG, buf); 7665261a5ea546ff358edd5aac7602fc4132434f481Jason Sams return NULL; 7675261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } 7685261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 769d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (vecSize > 0) { 770d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (vecSize != e->getVectorSize()) { 771d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams sprintf(buf, "Vector size mismatch for ElementAt %i of %i", vecSize, e->getVectorSize()); 772cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines rsc->setError(RS_ERROR_FATAL_DEBUG, buf); 773d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams return NULL; 774d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams } 775d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 776d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (dt != e->getType()) { 777d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams sprintf(buf, "Data type mismatch for ElementAt %i of %i", dt, e->getType()); 778cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines rsc->setError(RS_ERROR_FATAL_DEBUG, buf); 779d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams return NULL; 780d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams } 7815261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } 7825261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 7835261a5ea546ff358edd5aac7602fc4132434f481Jason Sams uint8_t *p = (uint8_t *)a->mHal.drvState.lod[0].mallocPtr; 7845261a5ea546ff358edd5aac7602fc4132434f481Jason Sams const uint32_t eSize = e->getSizeBytes(); 7855261a5ea546ff358edd5aac7602fc4132434f481Jason Sams const uint32_t stride = a->mHal.drvState.lod[0].stride; 7865261a5ea546ff358edd5aac7602fc4132434f481Jason Sams return &p[(eSize * x) + (y * stride)]; 7875261a5ea546ff358edd5aac7602fc4132434f481Jason Sams} 7885261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 7895261a5ea546ff358edd5aac7602fc4132434f481Jason Samsstatic void * ElementAt3D(Allocation *a, RsDataType dt, uint32_t vecSize, uint32_t x, uint32_t y, uint32_t z) { 7905261a5ea546ff358edd5aac7602fc4132434f481Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 7915261a5ea546ff358edd5aac7602fc4132434f481Jason Sams const Type *t = a->getType(); 7925261a5ea546ff358edd5aac7602fc4132434f481Jason Sams const Element *e = t->getElement(); 7935261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 7945261a5ea546ff358edd5aac7602fc4132434f481Jason Sams char buf[256]; 7955261a5ea546ff358edd5aac7602fc4132434f481Jason Sams if (x >= t->getLODDimX(0)) { 7965261a5ea546ff358edd5aac7602fc4132434f481Jason Sams sprintf(buf, "Out range ElementAt X %i of %i", x, t->getLODDimX(0)); 797cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines rsc->setError(RS_ERROR_FATAL_DEBUG, buf); 7985261a5ea546ff358edd5aac7602fc4132434f481Jason Sams return NULL; 7995261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } 8005261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 8015261a5ea546ff358edd5aac7602fc4132434f481Jason Sams if (y >= t->getLODDimY(0)) { 8025261a5ea546ff358edd5aac7602fc4132434f481Jason Sams sprintf(buf, "Out range ElementAt Y %i of %i", y, t->getLODDimY(0)); 803cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines rsc->setError(RS_ERROR_FATAL_DEBUG, buf); 8045261a5ea546ff358edd5aac7602fc4132434f481Jason Sams return NULL; 8055261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } 8065261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 8075261a5ea546ff358edd5aac7602fc4132434f481Jason Sams if (z >= t->getLODDimZ(0)) { 8085261a5ea546ff358edd5aac7602fc4132434f481Jason Sams sprintf(buf, "Out range ElementAt Z %i of %i", z, t->getLODDimZ(0)); 809cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines rsc->setError(RS_ERROR_FATAL_DEBUG, buf); 8105261a5ea546ff358edd5aac7602fc4132434f481Jason Sams return NULL; 8115261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } 8125261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 813d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (vecSize > 0) { 814d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (vecSize != e->getVectorSize()) { 815d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams sprintf(buf, "Vector size mismatch for ElementAt %i of %i", vecSize, e->getVectorSize()); 816cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines rsc->setError(RS_ERROR_FATAL_DEBUG, buf); 817d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams return NULL; 818d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams } 819d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 820d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (dt != e->getType()) { 821d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams sprintf(buf, "Data type mismatch for ElementAt %i of %i", dt, e->getType()); 822cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines rsc->setError(RS_ERROR_FATAL_DEBUG, buf); 823d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams return NULL; 824d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams } 8255261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } 8265261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 8275261a5ea546ff358edd5aac7602fc4132434f481Jason Sams uint8_t *p = (uint8_t *)a->mHal.drvState.lod[0].mallocPtr; 8285261a5ea546ff358edd5aac7602fc4132434f481Jason Sams const uint32_t eSize = e->getSizeBytes(); 8295261a5ea546ff358edd5aac7602fc4132434f481Jason Sams const uint32_t stride = a->mHal.drvState.lod[0].stride; 8305261a5ea546ff358edd5aac7602fc4132434f481Jason Sams return &p[(eSize * x) + (y * stride)]; 8315261a5ea546ff358edd5aac7602fc4132434f481Jason Sams} 8325261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 8331aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic const void * SC_GetElementAt1D(android::renderscript::rs_allocation a, uint32_t x) { 8341aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray return ElementAt1D((Allocation*)a.p, RS_TYPE_UNSIGNED_8, 0, x); 835d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams} 8361aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic const void * SC_GetElementAt2D(android::renderscript::rs_allocation a, uint32_t x, uint32_t y) { 8371aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray return ElementAt2D((Allocation*)a.p, RS_TYPE_UNSIGNED_8, 0, x, y); 838d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams} 8391aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic const void * SC_GetElementAt3D(android::renderscript::rs_allocation a, uint32_t x, uint32_t y, uint32_t z) { 8401aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray return ElementAt3D((Allocation*)a.p, RS_TYPE_UNSIGNED_8, 0, x, y, z); 841d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams} 842d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 8431aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_SetElementAt1D(android::renderscript::rs_allocation a, const void *ptr, uint32_t x) { 8441aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray const Type *t = ((Allocation*)a.p)->getType(); 845d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams const Element *e = t->getElement(); 8461aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray void *tmp = ElementAt1D((Allocation*)a.p, RS_TYPE_UNSIGNED_8, 0, x); 847d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (tmp != NULL) { 848d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams memcpy(tmp, ptr, e->getSizeBytes()); 849d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams } 850d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams} 8511aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_SetElementAt2D(android::renderscript::rs_allocation a, const void *ptr, uint32_t x, uint32_t y) { 8521aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray const Type *t = ((Allocation*)a.p)->getType(); 853d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams const Element *e = t->getElement(); 8541aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray void *tmp = ElementAt2D((Allocation*)a.p, RS_TYPE_UNSIGNED_8, 0, x, y); 855d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (tmp != NULL) { 856d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams memcpy(tmp, ptr, e->getSizeBytes()); 857d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams } 858d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams} 8591aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_SetElementAt3D(android::renderscript::rs_allocation a, const void *ptr, uint32_t x, uint32_t y, uint32_t z) { 8601aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray const Type *t = ((Allocation*)a.p)->getType(); 861d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams const Element *e = t->getElement(); 8621aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray void *tmp = ElementAt3D((Allocation*)a.p, RS_TYPE_UNSIGNED_8, 0, x, y, z); 863d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (tmp != NULL) { 864d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams memcpy(tmp, ptr, e->getSizeBytes()); 865d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams } 866d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams} 867d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 8685261a5ea546ff358edd5aac7602fc4132434f481Jason Sams#define ELEMENT_AT(T, DT, VS) \ 8691aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray static void SC_SetElementAt1_##T(android::renderscript::rs_allocation a, const T *val, uint32_t x) { \ 8701aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray void *r = ElementAt1D((Allocation*)a.p, DT, VS, x); \ 871d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (r != NULL) ((T *)r)[0] = *val; \ 8725261a5ea546ff358edd5aac7602fc4132434f481Jason Sams else ALOGE("Error from %s", __PRETTY_FUNCTION__); \ 8735261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } \ 8741aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray static void SC_SetElementAt2_##T(android::renderscript::rs_allocation a, const T * val, uint32_t x, uint32_t y) { \ 8751aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray void *r = ElementAt2D((Allocation*)a.p, DT, VS, x, y); \ 876d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (r != NULL) ((T *)r)[0] = *val; \ 8775261a5ea546ff358edd5aac7602fc4132434f481Jason Sams else ALOGE("Error from %s", __PRETTY_FUNCTION__); \ 8785261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } \ 8791aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray static void SC_SetElementAt3_##T(android::renderscript::rs_allocation a, const T * val, uint32_t x, uint32_t y, uint32_t z) { \ 8801aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray void *r = ElementAt3D((Allocation*)a.p, DT, VS, x, y, z); \ 881d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (r != NULL) ((T *)r)[0] = *val; \ 8825261a5ea546ff358edd5aac7602fc4132434f481Jason Sams else ALOGE("Error from %s", __PRETTY_FUNCTION__); \ 8835261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } \ 8841aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray static void SC_GetElementAt1_##T(android::renderscript::rs_allocation a, T *val, uint32_t x) { \ 8851aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray void *r = ElementAt1D((Allocation*)a.p, DT, VS, x); \ 886d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (r != NULL) *val = ((T *)r)[0]; \ 887d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams else ALOGE("Error from %s", __PRETTY_FUNCTION__); \ 8885261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } \ 8891aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray static void SC_GetElementAt2_##T(android::renderscript::rs_allocation a, T *val, uint32_t x, uint32_t y) { \ 8901aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray void *r = ElementAt2D((Allocation*)a.p, DT, VS, x, y); \ 891d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (r != NULL) *val = ((T *)r)[0]; \ 892d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams else ALOGE("Error from %s", __PRETTY_FUNCTION__); \ 8935261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } \ 8941aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray static void SC_GetElementAt3_##T(android::renderscript::rs_allocation a, T *val, uint32_t x, uint32_t y, uint32_t z) { \ 8951aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray void *r = ElementAt3D((Allocation*)a.p, DT, VS, x, y, z); \ 896d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (r != NULL) *val = ((T *)r)[0]; \ 897d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams else ALOGE("Error from %s", __PRETTY_FUNCTION__); \ 8985261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } 8995261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 9005261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(char, RS_TYPE_SIGNED_8, 1) 9015261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(char2, RS_TYPE_SIGNED_8, 2) 9025261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(char3, RS_TYPE_SIGNED_8, 3) 9035261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(char4, RS_TYPE_SIGNED_8, 4) 9045261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uchar, RS_TYPE_UNSIGNED_8, 1) 9055261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uchar2, RS_TYPE_UNSIGNED_8, 2) 9065261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uchar3, RS_TYPE_UNSIGNED_8, 3) 9075261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uchar4, RS_TYPE_UNSIGNED_8, 4) 9085261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(short, RS_TYPE_SIGNED_16, 1) 9095261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(short2, RS_TYPE_SIGNED_16, 2) 9105261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(short3, RS_TYPE_SIGNED_16, 3) 9115261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(short4, RS_TYPE_SIGNED_16, 4) 9125261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ushort, RS_TYPE_UNSIGNED_16, 1) 9135261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ushort2, RS_TYPE_UNSIGNED_16, 2) 9145261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ushort3, RS_TYPE_UNSIGNED_16, 3) 9155261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ushort4, RS_TYPE_UNSIGNED_16, 4) 9165261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(int, RS_TYPE_SIGNED_32, 1) 9175261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(int2, RS_TYPE_SIGNED_32, 2) 9185261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(int3, RS_TYPE_SIGNED_32, 3) 9195261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(int4, RS_TYPE_SIGNED_32, 4) 9205261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uint, RS_TYPE_UNSIGNED_32, 1) 9215261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uint2, RS_TYPE_UNSIGNED_32, 2) 9225261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uint3, RS_TYPE_UNSIGNED_32, 3) 9235261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uint4, RS_TYPE_UNSIGNED_32, 4) 9245261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(long, RS_TYPE_SIGNED_64, 1) 9255261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(long2, RS_TYPE_SIGNED_64, 2) 9265261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(long3, RS_TYPE_SIGNED_64, 3) 9275261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(long4, RS_TYPE_SIGNED_64, 4) 9285261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ulong, RS_TYPE_UNSIGNED_64, 1) 9295261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ulong2, RS_TYPE_UNSIGNED_64, 2) 9305261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ulong3, RS_TYPE_UNSIGNED_64, 3) 9315261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ulong4, RS_TYPE_UNSIGNED_64, 4) 9325261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(float, RS_TYPE_FLOAT_32, 1) 9335261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(float2, RS_TYPE_FLOAT_32, 2) 9345261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(float3, RS_TYPE_FLOAT_32, 3) 9355261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(float4, RS_TYPE_FLOAT_32, 4) 9365261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(double, RS_TYPE_FLOAT_64, 1) 9375261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(double2, RS_TYPE_FLOAT_64, 2) 9385261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(double3, RS_TYPE_FLOAT_64, 3) 9395261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(double4, RS_TYPE_FLOAT_64, 4) 9405261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 9415261a5ea546ff358edd5aac7602fc4132434f481Jason Sams#undef ELEMENT_AT 94287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 94387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 94487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// Stub implementation 94587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 94687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 94787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// llvm name mangling ref 94887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// <builtin-type> ::= v # void 94987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= b # bool 95087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= c # char 95187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= a # signed char 95287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= h # unsigned char 95387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= s # short 95487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= t # unsigned short 95587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= i # int 95687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= j # unsigned int 95787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= l # long 95887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= m # unsigned long 95987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= x # long long, __int64 96087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= y # unsigned long long, __int64 96187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= f # float 96287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= d # double 96387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 964709a0978ae141198018ca9769f8d96292a8928e6Jason Samsstatic RsdCpuReference::CpuSymbol gSyms[] = { 9655261a5ea546ff358edd5aac7602fc4132434f481Jason Sams // Debug runtime 966d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z14rsGetElementAt13rs_allocationj", (void *)&SC_GetElementAt1D, true }, 967d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z14rsGetElementAt13rs_allocationjj", (void *)&SC_GetElementAt2D, true }, 968d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z14rsGetElementAt13rs_allocationjjj", (void *)&SC_GetElementAt3D, true }, 969d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z14rsSetElementAt13rs_allocationPKvj", (void *)&SC_SetElementAt1D, true }, 970d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z14rsSetElementAt13rs_allocationPKvjj", (void *)&SC_SetElementAt2D, true }, 971d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z14rsSetElementAt13rs_allocationPKvjjj", (void *)&SC_SetElementAt3D, true }, 972d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 973d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 974d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uchar13rs_allocationPhj", (void *)&SC_GetElementAt1_uchar, true }, 975d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_uchar213rs_allocationPDv2_hj", (void *)&SC_GetElementAt1_uchar2, true }, 976d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_uchar313rs_allocationPDv3_hj", (void *)&SC_GetElementAt1_uchar3, true }, 977d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_uchar413rs_allocationPDv4_hj", (void *)&SC_GetElementAt1_uchar4, true }, 978d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uchar13rs_allocationPhjj", (void *)&SC_GetElementAt2_uchar, true }, 979d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_uchar213rs_allocationPDv2_hjj", (void *)&SC_GetElementAt2_uchar2, true }, 980d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_uchar313rs_allocationPDv3_hjj", (void *)&SC_GetElementAt2_uchar3, true }, 981d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_uchar413rs_allocationPDv4_hjj", (void *)&SC_GetElementAt2_uchar4, true }, 982d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uchar13rs_allocationPhjjj", (void *)&SC_GetElementAt3_uchar, true }, 983d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_uchar213rs_allocationPDv2_hjjj", (void *)&SC_GetElementAt3_uchar2, true }, 984d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_uchar313rs_allocationPDv3_hjjj", (void *)&SC_GetElementAt3_uchar3, true }, 985d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_uchar413rs_allocationPDv4_hjjj", (void *)&SC_GetElementAt3_uchar4, true }, 986d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 987d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_char13rs_allocationPcj", (void *)&SC_GetElementAt1_char, true }, 988d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_char213rs_allocationPDv2_cj", (void *)&SC_GetElementAt1_char2, true }, 989d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_char313rs_allocationPDv3_cj", (void *)&SC_GetElementAt1_char3, true }, 990d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_char413rs_allocationPDv4_cj", (void *)&SC_GetElementAt1_char4, true }, 991d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_char13rs_allocationPcjj", (void *)&SC_GetElementAt2_char, true }, 992d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_char213rs_allocationPDv2_cjj", (void *)&SC_GetElementAt2_char2, true }, 993d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_char313rs_allocationPDv3_cjj", (void *)&SC_GetElementAt2_char3, true }, 994d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_char413rs_allocationPDv4_cjj", (void *)&SC_GetElementAt2_char4, true }, 995d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_char13rs_allocationPcjjj", (void *)&SC_GetElementAt3_char, true }, 996d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_char213rs_allocationPDv2_cjjj", (void *)&SC_GetElementAt3_char2, true }, 997d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_char313rs_allocationPDv3_cjjj", (void *)&SC_GetElementAt3_char3, true }, 998d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_char413rs_allocationPDv4_cjjj", (void *)&SC_GetElementAt3_char4, true }, 999d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1000d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ushort13rs_allocationPtj", (void *)&SC_GetElementAt1_ushort, true }, 1001d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_ushort213rs_allocationPDv2_tj", (void *)&SC_GetElementAt1_ushort2, true }, 1002d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_ushort313rs_allocationPDv3_tj", (void *)&SC_GetElementAt1_ushort3, true }, 1003d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_ushort413rs_allocationPDv4_tj", (void *)&SC_GetElementAt1_ushort4, true }, 1004d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ushort13rs_allocationPtjj", (void *)&SC_GetElementAt2_ushort, true }, 1005d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_ushort213rs_allocationPDv2_tjj", (void *)&SC_GetElementAt2_ushort2, true }, 1006d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_ushort313rs_allocationPDv3_tjj", (void *)&SC_GetElementAt2_ushort3, true }, 1007d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_ushort413rs_allocationPDv4_tjj", (void *)&SC_GetElementAt2_ushort4, true }, 1008d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ushort13rs_allocationPtjjj", (void *)&SC_GetElementAt3_ushort, true }, 1009d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_ushort213rs_allocationPDv2_tjjj", (void *)&SC_GetElementAt3_ushort2, true }, 1010d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_ushort313rs_allocationPDv3_tjjj", (void *)&SC_GetElementAt3_ushort3, true }, 1011d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_ushort413rs_allocationPDv4_tjjj", (void *)&SC_GetElementAt3_ushort4, true }, 1012d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1013d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_short13rs_allocationPsj", (void *)&SC_GetElementAt1_short, true }, 1014d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_short213rs_allocationPDv2_sj", (void *)&SC_GetElementAt1_short2, true }, 1015d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_short313rs_allocationPDv3_sj", (void *)&SC_GetElementAt1_short3, true }, 1016d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_short413rs_allocationPDv4_sj", (void *)&SC_GetElementAt1_short4, true }, 1017d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_short13rs_allocationPsjj", (void *)&SC_GetElementAt2_short, true }, 1018d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_short213rs_allocationPDv2_sjj", (void *)&SC_GetElementAt2_short2, true }, 1019d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_short313rs_allocationPDv3_sjj", (void *)&SC_GetElementAt2_short3, true }, 1020d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_short413rs_allocationPDv4_sjj", (void *)&SC_GetElementAt2_short4, true }, 1021d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_short13rs_allocationPsjjj", (void *)&SC_GetElementAt3_short, true }, 1022d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_short213rs_allocationPDv2_sjjj", (void *)&SC_GetElementAt3_short2, true }, 1023d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_short313rs_allocationPDv3_sjjj", (void *)&SC_GetElementAt3_short3, true }, 1024d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_short413rs_allocationPDv4_sjjj", (void *)&SC_GetElementAt3_short4, true }, 1025d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1026d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_uint13rs_allocationPjj", (void *)&SC_GetElementAt1_uint, true }, 1027d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uint213rs_allocationPDv2_jj", (void *)&SC_GetElementAt1_uint2, true }, 1028d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uint313rs_allocationPDv3_jj", (void *)&SC_GetElementAt1_uint3, true }, 1029d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uint413rs_allocationPDv4_jj", (void *)&SC_GetElementAt1_uint4, true }, 1030d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_uint13rs_allocationPjjj", (void *)&SC_GetElementAt2_uint, true }, 1031d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uint213rs_allocationPDv2_jjj", (void *)&SC_GetElementAt2_uint2, true }, 1032d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uint313rs_allocationPDv3_jjj", (void *)&SC_GetElementAt2_uint3, true }, 1033d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uint413rs_allocationPDv4_jjj", (void *)&SC_GetElementAt2_uint4, true }, 1034d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_uint13rs_allocationPjjjj", (void *)&SC_GetElementAt3_uint, true }, 1035d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uint213rs_allocationPDv2_jjjj", (void *)&SC_GetElementAt3_uint2, true }, 1036d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uint313rs_allocationPDv3_jjjj", (void *)&SC_GetElementAt3_uint3, true }, 1037d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uint413rs_allocationPDv4_jjjj", (void *)&SC_GetElementAt3_uint4, true }, 1038d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1039d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z18rsGetElementAt_int13rs_allocationPij", (void *)&SC_GetElementAt1_int, true }, 1040d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_int213rs_allocationPDv2_ij", (void *)&SC_GetElementAt1_int2, true }, 1041d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_int313rs_allocationPDv3_ij", (void *)&SC_GetElementAt1_int3, true }, 1042d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_int413rs_allocationPDv4_ij", (void *)&SC_GetElementAt1_int4, true }, 1043d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z18rsGetElementAt_int13rs_allocationPijj", (void *)&SC_GetElementAt2_int, true }, 1044d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_int213rs_allocationPDv2_ijj", (void *)&SC_GetElementAt2_int2, true }, 1045d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_int313rs_allocationPDv3_ijj", (void *)&SC_GetElementAt2_int3, true }, 1046d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_int413rs_allocationPDv4_ijj", (void *)&SC_GetElementAt2_int4, true }, 1047d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z18rsGetElementAt_int13rs_allocationPijjj", (void *)&SC_GetElementAt3_int, true }, 1048d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_int213rs_allocationPDv2_ijjj", (void *)&SC_GetElementAt3_int2, true }, 1049d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_int313rs_allocationPDv3_ijjj", (void *)&SC_GetElementAt3_int3, true }, 1050d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_int413rs_allocationPDv4_ijjj", (void *)&SC_GetElementAt3_int4, true }, 1051d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1052d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_ulong13rs_allocationPmj", (void *)&SC_GetElementAt1_ulong, true }, 1053d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ulong213rs_allocationPDv2_mj", (void *)&SC_GetElementAt1_ulong2, true }, 1054d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ulong313rs_allocationPDv3_mj", (void *)&SC_GetElementAt1_ulong3, true }, 1055d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ulong413rs_allocationPDv4_mj", (void *)&SC_GetElementAt1_ulong4, true }, 1056d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_ulong13rs_allocationPmjj", (void *)&SC_GetElementAt2_ulong, true }, 1057d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ulong213rs_allocationPDv2_mjj", (void *)&SC_GetElementAt2_ulong2, true }, 1058d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ulong313rs_allocationPDv3_mjj", (void *)&SC_GetElementAt2_ulong3, true }, 1059d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ulong413rs_allocationPDv4_mjj", (void *)&SC_GetElementAt2_ulong4, true }, 1060d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_ulong13rs_allocationPmjjj", (void *)&SC_GetElementAt3_ulong, true }, 1061d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ulong213rs_allocationPDv2_mjjj", (void *)&SC_GetElementAt3_ulong2, true }, 1062d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ulong313rs_allocationPDv3_mjjj", (void *)&SC_GetElementAt3_ulong3, true }, 1063d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ulong413rs_allocationPDv4_mjjj", (void *)&SC_GetElementAt3_ulong4, true }, 1064d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1065d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_long13rs_allocationPlj", (void *)&SC_GetElementAt1_long, true }, 1066d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_long213rs_allocationPDv2_lj", (void *)&SC_GetElementAt1_long2, true }, 1067d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_long313rs_allocationPDv3_lj", (void *)&SC_GetElementAt1_long3, true }, 1068d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_long413rs_allocationPDv4_lj", (void *)&SC_GetElementAt1_long4, true }, 1069d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_long13rs_allocationPljj", (void *)&SC_GetElementAt2_long, true }, 1070d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_long213rs_allocationPDv2_ljj", (void *)&SC_GetElementAt2_long2, true }, 1071d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_long313rs_allocationPDv3_ljj", (void *)&SC_GetElementAt2_long3, true }, 1072d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_long413rs_allocationPDv4_ljj", (void *)&SC_GetElementAt2_long4, true }, 1073d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_long13rs_allocationPljjj", (void *)&SC_GetElementAt3_long, true }, 1074d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_long213rs_allocationPDv2_ljjj", (void *)&SC_GetElementAt3_long2, true }, 1075d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_long313rs_allocationPDv3_ljjj", (void *)&SC_GetElementAt3_long3, true }, 1076d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_long413rs_allocationPDv4_ljjj", (void *)&SC_GetElementAt3_long4, true }, 1077d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1078d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_float13rs_allocationPfj", (void *)&SC_GetElementAt1_float, true }, 1079d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_float213rs_allocationPDv2_fj", (void *)&SC_GetElementAt1_float2, true }, 1080d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_float313rs_allocationPDv3_fj", (void *)&SC_GetElementAt1_float3, true }, 1081d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_float413rs_allocationPDv4_fj", (void *)&SC_GetElementAt1_float4, true }, 1082d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_float13rs_allocationPfjj", (void *)&SC_GetElementAt2_float, true }, 1083d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_float213rs_allocationPDv2_fjj", (void *)&SC_GetElementAt2_float2, true }, 1084d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_float313rs_allocationPDv3_fjj", (void *)&SC_GetElementAt2_float3, true }, 1085d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_float413rs_allocationPDv4_fjj", (void *)&SC_GetElementAt2_float4, true }, 1086d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_float13rs_allocationPfjjj", (void *)&SC_GetElementAt3_float, true }, 1087d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_float213rs_allocationPDv2_fjjj", (void *)&SC_GetElementAt3_float2, true }, 1088d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_float313rs_allocationPDv3_fjjj", (void *)&SC_GetElementAt3_float3, true }, 1089d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_float413rs_allocationPDv4_fjjj", (void *)&SC_GetElementAt3_float4, true }, 1090d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1091d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_double13rs_allocationPdj", (void *)&SC_GetElementAt1_double, true }, 1092d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_double213rs_allocationPDv2_dj", (void *)&SC_GetElementAt1_double2, true }, 1093d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_double313rs_allocationPDv3_dj", (void *)&SC_GetElementAt1_double3, true }, 1094d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_double413rs_allocationPDv4_dj", (void *)&SC_GetElementAt1_double4, true }, 1095d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_double13rs_allocationPdjj", (void *)&SC_GetElementAt2_double, true }, 1096d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_double213rs_allocationPDv2_djj", (void *)&SC_GetElementAt2_double2, true }, 1097d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_double313rs_allocationPDv3_djj", (void *)&SC_GetElementAt2_double3, true }, 1098d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_double413rs_allocationPDv4_djj", (void *)&SC_GetElementAt2_double4, true }, 1099d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_double13rs_allocationPdjjj", (void *)&SC_GetElementAt3_double, true }, 1100d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_double213rs_allocationPDv2_djjj", (void *)&SC_GetElementAt3_double2, true }, 1101d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_double313rs_allocationPDv3_djjj", (void *)&SC_GetElementAt3_double3, true }, 1102d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_double413rs_allocationPDv4_djjj", (void *)&SC_GetElementAt3_double4, true }, 1103d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1104d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1105d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1106d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uchar13rs_allocationPKhj", (void *)&SC_SetElementAt1_uchar, true }, 1107d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_uchar213rs_allocationPKDv2_hj", (void *)&SC_SetElementAt1_uchar2, true }, 1108d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_uchar313rs_allocationPKDv3_hj", (void *)&SC_SetElementAt1_uchar3, true }, 1109d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_uchar413rs_allocationPKDv4_hj", (void *)&SC_SetElementAt1_uchar4, true }, 1110d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uchar13rs_allocationPKhjj", (void *)&SC_SetElementAt2_uchar, true }, 1111d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_uchar213rs_allocationPKDv2_hjj", (void *)&SC_SetElementAt2_uchar2, true }, 1112d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_uchar313rs_allocationPKDv3_hjj", (void *)&SC_SetElementAt2_uchar3, true }, 1113d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_uchar413rs_allocationPKDv4_hjj", (void *)&SC_SetElementAt2_uchar4, true }, 1114d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uchar13rs_allocationPKhjjj", (void *)&SC_SetElementAt3_uchar, true }, 1115d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_uchar213rs_allocationPKDv2_hjjj", (void *)&SC_SetElementAt3_uchar2, true }, 1116d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_uchar313rs_allocationPKDv3_hjjj", (void *)&SC_SetElementAt3_uchar3, true }, 1117d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_uchar413rs_allocationPKDv4_hjjj", (void *)&SC_SetElementAt3_uchar4, true }, 1118d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1119d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_char13rs_allocationPKcj", (void *)&SC_SetElementAt1_char, true }, 1120d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_char213rs_allocationPKDv2_cj", (void *)&SC_SetElementAt1_char2, true }, 1121d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_char313rs_allocationPKDv3_cj", (void *)&SC_SetElementAt1_char3, true }, 1122d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_char413rs_allocationPKDv4_cj", (void *)&SC_SetElementAt1_char4, true }, 1123d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_char13rs_allocationPKcjj", (void *)&SC_SetElementAt2_char, true }, 1124d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_char213rs_allocationPKDv2_cjj", (void *)&SC_SetElementAt2_char2, true }, 1125d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_char313rs_allocationPKDv3_cjj", (void *)&SC_SetElementAt2_char3, true }, 1126d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_char413rs_allocationPKDv4_cjj", (void *)&SC_SetElementAt2_char4, true }, 1127d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_char13rs_allocationPKcjjj", (void *)&SC_SetElementAt3_char, true }, 1128d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_char213rs_allocationPKDv2_cjjj", (void *)&SC_SetElementAt3_char2, true }, 1129d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_char313rs_allocationPKDv3_cjjj", (void *)&SC_SetElementAt3_char3, true }, 1130d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_char413rs_allocationPKDv4_cjjj", (void *)&SC_SetElementAt3_char4, true }, 1131d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1132d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ushort13rs_allocationPKht", (void *)&SC_SetElementAt1_ushort, true }, 1133d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_ushort213rs_allocationPKDv2_tj", (void *)&SC_SetElementAt1_ushort2, true }, 1134d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_ushort313rs_allocationPKDv3_tj", (void *)&SC_SetElementAt1_ushort3, true }, 1135d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_ushort413rs_allocationPKDv4_tj", (void *)&SC_SetElementAt1_ushort4, true }, 1136d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ushort13rs_allocationPKtjj", (void *)&SC_SetElementAt2_ushort, true }, 1137d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_ushort213rs_allocationPKDv2_tjj", (void *)&SC_SetElementAt2_ushort2, true }, 1138d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_ushort313rs_allocationPKDv3_tjj", (void *)&SC_SetElementAt2_ushort3, true }, 1139d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_ushort413rs_allocationPKDv4_tjj", (void *)&SC_SetElementAt2_ushort4, true }, 1140d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ushort13rs_allocationPKtjjj", (void *)&SC_SetElementAt3_ushort, true }, 1141d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_ushort213rs_allocationPKDv2_tjjj", (void *)&SC_SetElementAt3_ushort2, true }, 1142d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_ushort313rs_allocationPKDv3_tjjj", (void *)&SC_SetElementAt3_ushort3, true }, 1143d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_ushort413rs_allocationPKDv4_tjjj", (void *)&SC_SetElementAt3_ushort4, true }, 1144d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1145d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_short13rs_allocationPKsj", (void *)&SC_SetElementAt1_short, true }, 1146d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_short213rs_allocationPKDv2_sj", (void *)&SC_SetElementAt1_short2, true }, 1147d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_short313rs_allocationPKDv3_sj", (void *)&SC_SetElementAt1_short3, true }, 1148d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_short413rs_allocationPKDv4_sj", (void *)&SC_SetElementAt1_short4, true }, 1149d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_short13rs_allocationPKsjj", (void *)&SC_SetElementAt2_short, true }, 1150d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_short213rs_allocationPKDv2_sjj", (void *)&SC_SetElementAt2_short2, true }, 1151d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_short313rs_allocationPKDv3_sjj", (void *)&SC_SetElementAt2_short3, true }, 1152d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_short413rs_allocationPKDv4_sjj", (void *)&SC_SetElementAt2_short4, true }, 1153d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_short13rs_allocationPKsjjj", (void *)&SC_SetElementAt3_short, true }, 1154d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_short213rs_allocationPKDv2_sjjj", (void *)&SC_SetElementAt3_short2, true }, 1155d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_short313rs_allocationPKDv3_sjjj", (void *)&SC_SetElementAt3_short3, true }, 1156d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_short413rs_allocationPKDv4_sjjj", (void *)&SC_SetElementAt3_short4, true }, 1157d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1158d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_uint13rs_allocationPKjj", (void *)&SC_SetElementAt1_uint, true }, 1159d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uint213rs_allocationPKDv2_jj", (void *)&SC_SetElementAt1_uint2, true }, 1160d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uint313rs_allocationPKDv3_jj", (void *)&SC_SetElementAt1_uint3, true }, 1161d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uint413rs_allocationPKDv4_jj", (void *)&SC_SetElementAt1_uint4, true }, 1162d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_uint13rs_allocationPKjjj", (void *)&SC_SetElementAt2_uint, true }, 1163d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uint213rs_allocationPKDv2_jjj", (void *)&SC_SetElementAt2_uint2, true }, 1164d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uint313rs_allocationPKDv3_jjj", (void *)&SC_SetElementAt2_uint3, true }, 1165d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uint413rs_allocationPKDv4_jjj", (void *)&SC_SetElementAt2_uint4, true }, 1166d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_uint13rs_allocationPKjjjj", (void *)&SC_SetElementAt3_uint, true }, 1167d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uint213rs_allocationPKDv2_jjjj", (void *)&SC_SetElementAt3_uint2, true }, 1168d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uint313rs_allocationPKDv3_jjjj", (void *)&SC_SetElementAt3_uint3, true }, 1169d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uint413rs_allocationPKDv4_jjjj", (void *)&SC_SetElementAt3_uint4, true }, 1170d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1171cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines { "_Z18rsSetElementAt_int13rs_allocationPKij", (void *)&SC_SetElementAt1_int, true }, 1172d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_int213rs_allocationPKDv2_ij", (void *)&SC_SetElementAt1_int2, true }, 1173d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_int313rs_allocationPKDv3_ij", (void *)&SC_SetElementAt1_int3, true }, 1174d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_int413rs_allocationPKDv4_ij", (void *)&SC_SetElementAt1_int4, true }, 1175d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z18rsSetElementAt_int13rs_allocationPKijj", (void *)&SC_SetElementAt2_int, true }, 1176d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_int213rs_allocationPKDv2_ijj", (void *)&SC_SetElementAt2_int2, true }, 1177d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_int313rs_allocationPKDv3_ijj", (void *)&SC_SetElementAt2_int3, true }, 1178d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_int413rs_allocationPKDv4_ijj", (void *)&SC_SetElementAt2_int4, true }, 1179d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z18rsSetElementAt_int13rs_allocationPKijjj", (void *)&SC_SetElementAt3_int, true }, 1180d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_int213rs_allocationPKDv2_ijjj", (void *)&SC_SetElementAt3_int2, true }, 1181d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_int313rs_allocationPKDv3_ijjj", (void *)&SC_SetElementAt3_int3, true }, 1182d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_int413rs_allocationPKDv4_ijjj", (void *)&SC_SetElementAt3_int4, true }, 1183d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1184cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_ulong13rs_allocationPKmj", (void *)&SC_SetElementAt1_ulong, true }, 1185d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ulong213rs_allocationPKDv2_mj", (void *)&SC_SetElementAt1_ulong2, true }, 1186d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ulong313rs_allocationPKDv3_mj", (void *)&SC_SetElementAt1_ulong3, true }, 1187d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ulong413rs_allocationPKDv4_mj", (void *)&SC_SetElementAt1_ulong4, true }, 1188d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_ulong13rs_allocationPKmjj", (void *)&SC_SetElementAt2_ulong, true }, 1189d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ulong213rs_allocationPKDv2_mjj", (void *)&SC_SetElementAt2_ulong2, true }, 1190d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ulong313rs_allocationPKDv3_mjj", (void *)&SC_SetElementAt2_ulong3, true }, 1191d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ulong413rs_allocationPKDv4_mjj", (void *)&SC_SetElementAt2_ulong4, true }, 1192d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_ulong13rs_allocationPKmjjj", (void *)&SC_SetElementAt3_ulong, true }, 1193d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ulong213rs_allocationPKDv2_mjjj", (void *)&SC_SetElementAt3_ulong2, true }, 1194d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ulong313rs_allocationPKDv3_mjjj", (void *)&SC_SetElementAt3_ulong3, true }, 1195d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ulong413rs_allocationPKDv4_mjjj", (void *)&SC_SetElementAt3_ulong4, true }, 1196d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1197cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray // Pre-21 compatibility path 1198cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_ulong13rs_allocationPKyj", (void *)&SC_SetElementAt1_ulong, true }, 1199cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z21rsSetElementAt_ulong213rs_allocationPKDv2_yj", (void *)&SC_SetElementAt1_ulong2, true }, 1200cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z21rsSetElementAt_ulong313rs_allocationPKDv3_yj", (void *)&SC_SetElementAt1_ulong3, true }, 1201cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z21rsSetElementAt_ulong413rs_allocationPKDv4_yj", (void *)&SC_SetElementAt1_ulong4, true }, 1202cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_ulong13rs_allocationPKyjj", (void *)&SC_SetElementAt2_ulong, true }, 1203cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z21rsSetElementAt_ulong213rs_allocationPKDv2_yjj", (void *)&SC_SetElementAt2_ulong2, true }, 1204cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z21rsSetElementAt_ulong313rs_allocationPKDv3_yjj", (void *)&SC_SetElementAt2_ulong3, true }, 1205cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z21rsSetElementAt_ulong413rs_allocationPKDv4_yjj", (void *)&SC_SetElementAt2_ulong4, true }, 1206cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_ulong13rs_allocationPKyjjj", (void *)&SC_SetElementAt3_ulong, true }, 1207cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z21rsSetElementAt_ulong213rs_allocationPKDv2_yjjj", (void *)&SC_SetElementAt3_ulong2, true }, 1208cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z21rsSetElementAt_ulong313rs_allocationPKDv3_yjjj", (void *)&SC_SetElementAt3_ulong3, true }, 1209cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z21rsSetElementAt_ulong413rs_allocationPKDv4_yjjj", (void *)&SC_SetElementAt3_ulong4, true }, 1210cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray 1211d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_long13rs_allocationPKlj", (void *)&SC_SetElementAt1_long, true }, 1212d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_long213rs_allocationPKDv2_lj", (void *)&SC_SetElementAt1_long2, true }, 1213d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_long313rs_allocationPKDv3_lj", (void *)&SC_SetElementAt1_long3, true }, 1214d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_long413rs_allocationPKDv4_lj", (void *)&SC_SetElementAt1_long4, true }, 1215d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_long13rs_allocationPKljj", (void *)&SC_SetElementAt2_long, true }, 1216d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_long213rs_allocationPKDv2_ljj", (void *)&SC_SetElementAt2_long2, true }, 1217d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_long313rs_allocationPKDv3_ljj", (void *)&SC_SetElementAt2_long3, true }, 1218d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_long413rs_allocationPKDv4_ljj", (void *)&SC_SetElementAt2_long4, true }, 1219d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_long13rs_allocationPKljjj", (void *)&SC_SetElementAt3_long, true }, 1220d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_long213rs_allocationPKDv2_ljjj", (void *)&SC_SetElementAt3_long2, true }, 1221d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_long313rs_allocationPKDv3_ljjj", (void *)&SC_SetElementAt3_long3, true }, 1222d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_long413rs_allocationPKDv4_ljjj", (void *)&SC_SetElementAt3_long4, true }, 1223d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1224cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray // Pre-21 compatibility path 1225cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z19rsSetElementAt_long13rs_allocationPKxj", (void *)&SC_SetElementAt1_long, true }, 1226cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_long213rs_allocationPKDv2_xj", (void *)&SC_SetElementAt1_long2, true }, 1227cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_long313rs_allocationPKDv3_xj", (void *)&SC_SetElementAt1_long3, true }, 1228cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_long413rs_allocationPKDv4_xj", (void *)&SC_SetElementAt1_long4, true }, 1229cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z19rsSetElementAt_long13rs_allocationPKxjj", (void *)&SC_SetElementAt2_long, true }, 1230cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_long213rs_allocationPKDv2_xjj", (void *)&SC_SetElementAt2_long2, true }, 1231cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_long313rs_allocationPKDv3_xjj", (void *)&SC_SetElementAt2_long3, true }, 1232cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_long413rs_allocationPKDv4_xjj", (void *)&SC_SetElementAt2_long4, true }, 1233cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z19rsSetElementAt_long13rs_allocationPKxjjj", (void *)&SC_SetElementAt3_long, true }, 1234cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_long213rs_allocationPKDv2_xjjj", (void *)&SC_SetElementAt3_long2, true }, 1235cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_long313rs_allocationPKDv3_xjjj", (void *)&SC_SetElementAt3_long3, true }, 1236cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_long413rs_allocationPKDv4_xjjj", (void *)&SC_SetElementAt3_long4, true }, 1237cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray 1238d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_float13rs_allocationPKft", (void *)&SC_SetElementAt1_float, true }, 1239d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_float213rs_allocationPKDv2_fj", (void *)&SC_SetElementAt1_float2, true }, 1240d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_float313rs_allocationPKDv3_fj", (void *)&SC_SetElementAt1_float3, true }, 1241d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_float413rs_allocationPKDv4_fj", (void *)&SC_SetElementAt1_float4, true }, 1242d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_float13rs_allocationPKfjj", (void *)&SC_SetElementAt2_float, true }, 1243d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_float213rs_allocationPKDv2_fjj", (void *)&SC_SetElementAt2_float2, true }, 1244d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_float313rs_allocationPKDv3_fjj", (void *)&SC_SetElementAt2_float3, true }, 1245d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_float413rs_allocationPKDv4_fjj", (void *)&SC_SetElementAt2_float4, true }, 1246d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_float13rs_allocationPKfjjj", (void *)&SC_SetElementAt3_float, true }, 1247d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_float213rs_allocationPKDv2_fjjj", (void *)&SC_SetElementAt3_float2, true }, 1248d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_float313rs_allocationPKDv3_fjjj", (void *)&SC_SetElementAt3_float3, true }, 1249d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_float413rs_allocationPKDv4_fjjj", (void *)&SC_SetElementAt3_float4, true }, 1250d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1251d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_double13rs_allocationPKdt", (void *)&SC_SetElementAt1_double, true }, 1252d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_double213rs_allocationPKDv2_dj", (void *)&SC_SetElementAt1_double2, true }, 1253d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_double313rs_allocationPKDv3_dj", (void *)&SC_SetElementAt1_double3, true }, 1254d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_double413rs_allocationPKDv4_dj", (void *)&SC_SetElementAt1_double4, true }, 1255d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_double13rs_allocationPKdjj", (void *)&SC_SetElementAt2_double, true }, 1256d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_double213rs_allocationPKDv2_djj", (void *)&SC_SetElementAt2_double2, true }, 1257d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_double313rs_allocationPKDv3_djj", (void *)&SC_SetElementAt2_double3, true }, 1258d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_double413rs_allocationPKDv4_djj", (void *)&SC_SetElementAt2_double4, true }, 1259d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_double13rs_allocationPKdjjj", (void *)&SC_SetElementAt3_double, true }, 1260d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_double213rs_allocationPKDv2_djjj", (void *)&SC_SetElementAt3_double2, true }, 1261d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_double313rs_allocationPKDv3_djjj", (void *)&SC_SetElementAt3_double3, true }, 1262d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_double413rs_allocationPKDv4_djjj", (void *)&SC_SetElementAt3_double4, true }, 12635261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 12645261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 126587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams // Refcounting 1266444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#ifndef __LP64__ 126787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsSetObjectP10rs_elementS_", (void *)&SC_SetObject, true }, 126887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z10rsIsObject10rs_element", (void *)&SC_IsObject, true }, 126987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 127087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsSetObjectP7rs_typeS_", (void *)&SC_SetObject, true }, 127187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z10rsIsObject7rs_type", (void *)&SC_IsObject, true }, 127287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 127387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsSetObjectP13rs_allocationS_", (void *)&SC_SetObject, true }, 127487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z10rsIsObject13rs_allocation", (void *)&SC_IsObject, true }, 127587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 127687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsSetObjectP10rs_samplerS_", (void *)&SC_SetObject, true }, 127787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z10rsIsObject10rs_sampler", (void *)&SC_IsObject, true }, 127887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 127987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsSetObjectP9rs_scriptS_", (void *)&SC_SetObject, true }, 128087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z10rsIsObject9rs_script", (void *)&SC_IsObject, true }, 1281444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#else 1282444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z11rsSetObjectP10rs_elementS_", (void *)&SC_SetObject_ByRef, true }, 1283444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z10rsIsObject10rs_element", (void *)&SC_IsObject_ByRef, true }, 1284444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen 1285444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z11rsSetObjectP7rs_typeS_", (void *)&SC_SetObject_ByRef, true }, 1286444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z10rsIsObject7rs_type", (void *)&SC_IsObject_ByRef, true }, 1287444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen 1288444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z11rsSetObjectP13rs_allocationS_", (void *)&SC_SetObject_ByRef, true }, 1289444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z10rsIsObject13rs_allocation", (void *)&SC_IsObject_ByRef, true }, 1290444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen 1291444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z11rsSetObjectP10rs_samplerS_", (void *)&SC_SetObject_ByRef, true }, 1292444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z10rsIsObject10rs_sampler", (void *)&SC_IsObject_ByRef, true }, 1293444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen 1294444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z11rsSetObjectP9rs_scriptS_", (void *)&SC_SetObject_ByRef, true }, 1295444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z10rsIsObject9rs_script", (void *)&SC_IsObject_ByRef, true }, 1296444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#endif 1297444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z13rsClearObjectP10rs_element", (void *)&SC_ClearObject, true }, 1298444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z13rsClearObjectP7rs_type", (void *)&SC_ClearObject, true }, 1299444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z13rsClearObjectP13rs_allocation", (void *)&SC_ClearObject, true }, 1300444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z13rsClearObjectP10rs_sampler", (void *)&SC_ClearObject, true }, 1301444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z13rsClearObjectP9rs_script", (void *)&SC_ClearObject, true }, 130287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 13039e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams { "_Z11rsSetObjectP7rs_pathS_", (void *)&SC_SetObject, true }, 13049e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams { "_Z13rsClearObjectP7rs_path", (void *)&SC_ClearObject, true }, 13059e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams { "_Z10rsIsObject7rs_path", (void *)&SC_IsObject, true }, 13069e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams 130787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsSetObjectP7rs_meshS_", (void *)&SC_SetObject, true }, 130887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z13rsClearObjectP7rs_mesh", (void *)&SC_ClearObject, true }, 130987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z10rsIsObject7rs_mesh", (void *)&SC_IsObject, true }, 131087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 131187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsSetObjectP19rs_program_fragmentS_", (void *)&SC_SetObject, true }, 131287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z13rsClearObjectP19rs_program_fragment", (void *)&SC_ClearObject, true }, 131387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z10rsIsObject19rs_program_fragment", (void *)&SC_IsObject, true }, 131487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 131587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsSetObjectP17rs_program_vertexS_", (void *)&SC_SetObject, true }, 131687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z13rsClearObjectP17rs_program_vertex", (void *)&SC_ClearObject, true }, 131787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z10rsIsObject17rs_program_vertex", (void *)&SC_IsObject, true }, 131887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 131987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsSetObjectP17rs_program_rasterS_", (void *)&SC_SetObject, true }, 132087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z13rsClearObjectP17rs_program_raster", (void *)&SC_ClearObject, true }, 132187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z10rsIsObject17rs_program_raster", (void *)&SC_IsObject, true }, 132287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 132387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsSetObjectP16rs_program_storeS_", (void *)&SC_SetObject, true }, 132487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z13rsClearObjectP16rs_program_store", (void *)&SC_ClearObject, true }, 132587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z10rsIsObject16rs_program_store", (void *)&SC_IsObject, true }, 132687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 132787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsSetObjectP7rs_fontS_", (void *)&SC_SetObject, true }, 132887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z13rsClearObjectP7rs_font", (void *)&SC_ClearObject, true }, 132987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z10rsIsObject7rs_font", (void *)&SC_IsObject, true }, 133087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 133187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams // Allocation ops 133287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z21rsAllocationMarkDirty13rs_allocation", (void *)&SC_AllocationSyncAll, true }, 133387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z20rsgAllocationSyncAll13rs_allocation", (void *)&SC_AllocationSyncAll, false }, 133487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z20rsgAllocationSyncAll13rs_allocationj", (void *)&SC_AllocationSyncAll2, false }, 133574a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk { "_Z20rsgAllocationSyncAll13rs_allocation24rs_allocation_usage_type", (void *)&SC_AllocationSyncAll2, false }, 13360b575de8ed0b628d84d256f5846500b0385979bdTim Murray#ifndef RS_COMPATIBILITY_LIB 133747211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray { "_Z15rsGetAllocationPKv", (void *)&SC_GetAllocation, true }, 1338b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams { "_Z18rsAllocationIoSend13rs_allocation", (void *)&SC_AllocationIoSend, false }, 1339b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams { "_Z21rsAllocationIoReceive13rs_allocation", (void *)&SC_AllocationIoReceive, false }, 13400b575de8ed0b628d84d256f5846500b0385979bdTim Murray#endif 134174a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk { "_Z23rsAllocationCopy1DRange13rs_allocationjjjS_jj", (void *)&SC_AllocationCopy1DRange, false }, 134274a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk { "_Z23rsAllocationCopy2DRange13rs_allocationjjj26rs_allocation_cubemap_facejjS_jjjS0_", (void *)&SC_AllocationCopy2DRange, false }, 134387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 134487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams // Messaging 134587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 134687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z14rsSendToClienti", (void *)&SC_ToClient, false }, 134787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z14rsSendToClientiPKvj", (void *)&SC_ToClient2, false }, 134887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z22rsSendToClientBlockingi", (void *)&SC_ToClientBlocking, false }, 134987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z22rsSendToClientBlockingiPKvj", (void *)&SC_ToClientBlocking2, false }, 13500b575de8ed0b628d84d256f5846500b0385979bdTim Murray#ifndef RS_COMPATIBILITY_LIB 135187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z22rsgBindProgramFragment19rs_program_fragment", (void *)&SC_BindProgramFragment, false }, 135287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z19rsgBindProgramStore16rs_program_store", (void *)&SC_BindProgramStore, false }, 135387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z20rsgBindProgramVertex17rs_program_vertex", (void *)&SC_BindProgramVertex, false }, 135487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z20rsgBindProgramRaster17rs_program_raster", (void *)&SC_BindProgramRaster, false }, 135587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z14rsgBindSampler19rs_program_fragmentj10rs_sampler", (void *)&SC_BindSampler, false }, 135687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z14rsgBindTexture19rs_program_fragmentj13rs_allocation", (void *)&SC_BindTexture, false }, 1357a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchouk { "_Z15rsgBindConstant19rs_program_fragmentj13rs_allocation", (void *)&SC_BindFragmentConstant, false }, 1358a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchouk { "_Z15rsgBindConstant17rs_program_vertexj13rs_allocation", (void *)&SC_BindVertexConstant, false }, 135987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 136087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z36rsgProgramVertexLoadProjectionMatrixPK12rs_matrix4x4", (void *)&SC_VpLoadProjectionMatrix, false }, 136187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z31rsgProgramVertexLoadModelMatrixPK12rs_matrix4x4", (void *)&SC_VpLoadModelMatrix, false }, 136287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z33rsgProgramVertexLoadTextureMatrixPK12rs_matrix4x4", (void *)&SC_VpLoadTextureMatrix, false }, 136387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 136487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z35rsgProgramVertexGetProjectionMatrixP12rs_matrix4x4", (void *)&SC_VpGetProjectionMatrix, false }, 136587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 136687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z31rsgProgramFragmentConstantColor19rs_program_fragmentffff", (void *)&SC_PfConstantColor, false }, 136787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 136887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsgGetWidthv", (void *)&SC_GetWidth, false }, 136987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z12rsgGetHeightv", (void *)&SC_GetHeight, false }, 137087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 137187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 137287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsgDrawRectfffff", (void *)&SC_DrawRect, false }, 137387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsgDrawQuadffffffffffff", (void *)&SC_DrawQuad, false }, 137487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z20rsgDrawQuadTexCoordsffffffffffffffffffff", (void *)&SC_DrawQuadTexCoords, false }, 137587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z24rsgDrawSpriteScreenspacefffff", (void *)&SC_DrawSpriteScreenspace, false }, 137687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 137787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsgDrawMesh7rs_mesh", (void *)&SC_DrawMesh, false }, 137887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsgDrawMesh7rs_meshj", (void *)&SC_DrawMeshPrimitive, false }, 137987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsgDrawMesh7rs_meshjjj", (void *)&SC_DrawMeshPrimitiveRange, false }, 138087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z25rsgMeshComputeBoundingBox7rs_meshPfS0_S0_S0_S0_S0_", (void *)&SC_MeshComputeBoundingBox, false }, 138187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 13829e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams { "_Z11rsgDrawPath7rs_path", (void *)&SC_DrawPath, false }, 13839e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams 138487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z13rsgClearColorffff", (void *)&SC_ClearColor, false }, 138587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z13rsgClearDepthf", (void *)&SC_ClearDepth, false }, 138687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 138787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsgDrawTextPKcii", (void *)&SC_DrawText, false }, 138887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsgDrawText13rs_allocationii", (void *)&SC_DrawTextAlloc, false }, 138987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z14rsgMeasureTextPKcPiS1_S1_S1_", (void *)&SC_MeasureText, false }, 139087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z14rsgMeasureText13rs_allocationPiS0_S0_S0_", (void *)&SC_MeasureTextAlloc, false }, 139187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 139287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsgBindFont7rs_font", (void *)&SC_BindFont, false }, 139387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z12rsgFontColorffff", (void *)&SC_FontColor, false }, 139487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 139587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z18rsgBindColorTarget13rs_allocationj", (void *)&SC_BindFrameBufferObjectColorTarget, false }, 139687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z18rsgBindDepthTarget13rs_allocation", (void *)&SC_BindFrameBufferObjectDepthTarget, false }, 139787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z19rsgClearColorTargetj", (void *)&SC_ClearFrameBufferObjectColorTarget, false }, 139887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z19rsgClearDepthTargetv", (void *)&SC_ClearFrameBufferObjectDepthTarget, false }, 139987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z24rsgClearAllRenderTargetsv", (void *)&SC_ClearFrameBufferObjectTargets, false }, 14001aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 140187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 1402aa152101cc4d04597d9aefc3e5a1454eaf39d2ccJason Sams { "_Z9rsForEach9rs_script13rs_allocationS0_", (void *)&SC_ForEach_SAA, true }, 1403aa152101cc4d04597d9aefc3e5a1454eaf39d2ccJason Sams { "_Z9rsForEach9rs_script13rs_allocationS0_PKv", (void *)&SC_ForEach_SAAU, true }, 1404f598811a60088236222bb1879503842094ca378bStephen Hines { "_Z9rsForEach9rs_script13rs_allocationS0_PKvPK14rs_script_call", (void *)&SC_ForEach_SAAUS, true }, 1405aa152101cc4d04597d9aefc3e5a1454eaf39d2ccJason Sams { "_Z9rsForEach9rs_script13rs_allocationS0_PKvj", (void *)&SC_ForEach_SAAUL, true }, 1406f598811a60088236222bb1879503842094ca378bStephen Hines { "_Z9rsForEach9rs_script13rs_allocationS0_PKvjPK14rs_script_call", (void *)&SC_ForEach_SAAULS, true }, 14071aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray#endif // RS_COMPATIBILITY_LIB 140887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 140964147ebf4f0b1c23d2caf2cf7c1675d27de97d99Tim Murray#ifndef __LP64__ 141087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams // time 141187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z6rsTimePi", (void *)&SC_Time, true }, 141287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsLocaltimeP5rs_tmPKi", (void *)&SC_LocalTime, true }, 141364147ebf4f0b1c23d2caf2cf7c1675d27de97d99Tim Murray#else 141464147ebf4f0b1c23d2caf2cf7c1675d27de97d99Tim Murray // time 141564147ebf4f0b1c23d2caf2cf7c1675d27de97d99Tim Murray { "_Z6rsTimePl", (void *)&SC_Time, true }, 141664147ebf4f0b1c23d2caf2cf7c1675d27de97d99Tim Murray { "_Z11rsLocaltimeP5rs_tmPKl", (void *)&SC_LocalTime, true }, 141764147ebf4f0b1c23d2caf2cf7c1675d27de97d99Tim Murray#endif 141887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z14rsUptimeMillisv", (void*)&SC_UptimeMillis, true }, 141987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z13rsUptimeNanosv", (void*)&SC_UptimeNanos, true }, 142087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z7rsGetDtv", (void*)&SC_GetDt, false }, 142187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 142287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams // misc 14230b575de8ed0b628d84d256f5846500b0385979bdTim Murray#ifndef RS_COMPATIBILITY_LIB 142487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z5colorffff", (void *)&SC_Color, false }, 142587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z9rsgFinishv", (void *)&SC_Finish, false }, 14260b575de8ed0b628d84d256f5846500b0385979bdTim Murray#endif 142787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 142887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { NULL, NULL, false } 142987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}; 143087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 14310b575de8ed0b628d84d256f5846500b0385979bdTim Murray#ifdef RS_COMPATIBILITY_LIB 14320b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1433d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray////////////////////////////////////////////////////////////////////////////// 1434d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray// Compatibility Library entry points 1435d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray////////////////////////////////////////////////////////////////////////////// 1436d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 1437f827cadde659212b266b9635128c98515a7dcb01Stephen Hines#define IS_CLEAR_SET_OBJ(t) \ 1438f827cadde659212b266b9635128c98515a7dcb01Stephen Hines bool rsIsObject(t src) { \ 1439f29edf80510d483b8663e9d8b859959e37361aeeJason Sams return src.p != NULL; \ 1440f827cadde659212b266b9635128c98515a7dcb01Stephen Hines } \ 1441d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray void __attribute__((overloadable)) rsClearObject(t *dst) { \ 1442f29edf80510d483b8663e9d8b859959e37361aeeJason Sams return SC_ClearObject(reinterpret_cast<rs_object_base *>(dst)); \ 1443d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray } \ 1444d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray void __attribute__((overloadable)) rsSetObject(t *dst, t src) { \ 14451aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray return SC_SetObject(reinterpret_cast<rs_object_base *>(dst), (ObjectBase*)src.p); \ 1446d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray } 1447d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 1448f29edf80510d483b8663e9d8b859959e37361aeeJason SamsIS_CLEAR_SET_OBJ(::rs_element) 1449f29edf80510d483b8663e9d8b859959e37361aeeJason SamsIS_CLEAR_SET_OBJ(::rs_type) 1450f29edf80510d483b8663e9d8b859959e37361aeeJason SamsIS_CLEAR_SET_OBJ(::rs_allocation) 1451f29edf80510d483b8663e9d8b859959e37361aeeJason SamsIS_CLEAR_SET_OBJ(::rs_sampler) 1452f29edf80510d483b8663e9d8b859959e37361aeeJason SamsIS_CLEAR_SET_OBJ(::rs_script) 1453f827cadde659212b266b9635128c98515a7dcb01Stephen Hines#undef IS_CLEAR_SET_OBJ 1454d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 14551aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_ForEach_SAA(::rs_script target, 14561aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray ::rs_allocation in, 14571aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray ::rs_allocation out) { 14581aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray Context *rsc = RsdCpuReference::getTlsContext(); 14591aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrForEach(rsc, (Script*)target.p, (Allocation*)in.p, (Allocation*)out.p, NULL, 0, NULL); 14601aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray} 14611aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 14621aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_ForEach_SAAUS(::rs_script target, 14631aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray ::rs_allocation in, 14641aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray ::rs_allocation out, 14651aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray const void *usr, 14661aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray const RsScriptCall *call) { 14671aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray Context *rsc = RsdCpuReference::getTlsContext(); 14681aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrForEach(rsc, (Script*)target.p, (Allocation*)in.p, (Allocation*)out.p, usr, 0, call); 14691aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray} 14701aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 14711aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_ForEach_SAAUL(::rs_script target, 14721aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray ::rs_allocation in, 14731aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray ::rs_allocation out, 14741aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray const void *usr, 14751aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray uint32_t usrLen) { 14761aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray Context *rsc = RsdCpuReference::getTlsContext(); 14771aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrForEach(rsc, (Script*)target.p, (Allocation*)in.p, (Allocation*)out.p, usr, usrLen, NULL); 14781aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray} 14791aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 14801aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_ForEach_SAAULS(::rs_script target, 14811aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray ::rs_allocation in, 14821aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray ::rs_allocation out, 14831aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray const void *usr, 14841aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray uint32_t usrLen, 14851aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray const RsScriptCall *call) { 14861aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray Context *rsc = RsdCpuReference::getTlsContext(); 14871aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrForEach(rsc, (Script*)target.p, (Allocation*)in.p, (Allocation*)out.p, usr, usrLen, call); 14881aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray} 14891aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 149047211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murraystatic const Allocation * SC_GetAllocation(const void *ptr) { 149147211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray Context *rsc = RsdCpuReference::getTlsContext(); 149247211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray const Script *sc = RsdCpuReference::getTlsScript(); 149347211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray return rsdScriptGetAllocationForPointer(rsc, sc, ptr); 149447211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray} 149547211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray 1496d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murrayconst Allocation * rsGetAllocation(const void *ptr) { 1497d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray return SC_GetAllocation(ptr); 1498d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray} 1499d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 1500a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Samsvoid __attribute__((overloadable)) rsAllocationIoSend(::rs_allocation a) { 15017a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines SC_AllocationIoSend((Allocation *)a.p); 15027a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines} 15037a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines 1504a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Samsvoid __attribute__((overloadable)) rsAllocationIoReceive(::rs_allocation a) { 15057a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines SC_AllocationIoReceive((Allocation *)a.p); 15067a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines} 15077a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines 15087a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines 15097a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hinesvoid __attribute__((overloadable)) rsAllocationCopy1DRange( 1510a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation dstAlloc, 15117a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines uint32_t dstOff, uint32_t dstMip, uint32_t count, 1512a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation srcAlloc, 15137a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines uint32_t srcOff, uint32_t srcMip) { 15141aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray SC_AllocationCopy1DRange(dstAlloc, dstOff, dstMip, count, 15151aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray srcAlloc, srcOff, srcMip); 15167a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines} 15177a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines 15187a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hinesvoid __attribute__((overloadable)) rsAllocationCopy2DRange( 1519a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation dstAlloc, 15207a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines uint32_t dstXoff, uint32_t dstYoff, 15217a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines uint32_t dstMip, rs_allocation_cubemap_face dstFace, 15227a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines uint32_t width, uint32_t height, 1523a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation srcAlloc, 15247a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines uint32_t srcXoff, uint32_t srcYoff, 15257a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines uint32_t srcMip, rs_allocation_cubemap_face srcFace) { 15261aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray SC_AllocationCopy2DRange(dstAlloc, dstXoff, dstYoff, 15277a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines dstMip, dstFace, width, height, 15281aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray srcAlloc, srcXoff, srcYoff, 15297a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines srcMip, srcFace); 15307a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines} 15317a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines 1532a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Samsvoid __attribute__((overloadable)) rsForEach(::rs_script script, 1533a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation in, 1534a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation out, 1535d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray const void *usr, 1536d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray const rs_script_call *call) { 15371aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray return SC_ForEach_SAAUS(script, in, out, usr, (RsScriptCall*)call); 1538d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray} 1539d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 1540a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Samsvoid __attribute__((overloadable)) rsForEach(::rs_script script, 1541a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation in, 1542a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation out) { 15431aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray return SC_ForEach_SAA(script, in, out); 1544276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines} 1545276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines 1546a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Samsvoid __attribute__((overloadable)) rsForEach(::rs_script script, 1547a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation in, 1548a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation out, 1549276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines const void *usr, 1550276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines uint32_t usrLen) { 15511aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray return SC_ForEach_SAAUL(script, in, out, usr, usrLen); 1552276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines} 1553276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines 1554a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Samsvoid __attribute__((overloadable)) rsForEach(::rs_script script, 1555a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation in, 1556a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation out, 1557d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray const void *usr, 1558d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray uint32_t usrLen, 1559d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray const rs_script_call *call) { 15601aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray return SC_ForEach_SAAULS(script, in, out, usr, usrLen, (RsScriptCall*)call); 1561d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray} 1562d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 1563d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murrayint rsTime(int *timer) { 1564d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray return SC_Time(timer); 1565d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray} 1566d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 1567d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murrayrs_tm* rsLocaltime(rs_tm* local, const int *timer) { 1568d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray return (rs_tm*)(SC_LocalTime((tm*)local, (long*)timer)); 1569d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray} 1570d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 1571d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murrayint64_t rsUptimeMillis() { 1572d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray Context *rsc = RsdCpuReference::getTlsContext(); 1573d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray return rsrUptimeMillis(rsc); 1574d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray} 1575d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 1576cadee38f6940e5584d3ec3398a21bd2a494361e2Stephen Hinesint64_t rsUptimeNanos() { 1577cadee38f6940e5584d3ec3398a21bd2a494361e2Stephen Hines return SC_UptimeNanos(); 1578cadee38f6940e5584d3ec3398a21bd2a494361e2Stephen Hines} 1579cadee38f6940e5584d3ec3398a21bd2a494361e2Stephen Hines 1580cadee38f6940e5584d3ec3398a21bd2a494361e2Stephen Hinesfloat rsGetDt() { 1581cadee38f6940e5584d3ec3398a21bd2a494361e2Stephen Hines return SC_GetDt(); 1582cadee38f6940e5584d3ec3398a21bd2a494361e2Stephen Hines} 1583cadee38f6940e5584d3ec3398a21bd2a494361e2Stephen Hines 1584276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hinesuint32_t rsSendToClient(int cmdID) { 1585276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines return SC_ToClient(cmdID); 1586276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines} 1587276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines 1588276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hinesuint32_t rsSendToClient(int cmdID, const void *data, uint32_t len) { 1589276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines return SC_ToClient2(cmdID, data, len); 1590d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray} 1591d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 15920b575de8ed0b628d84d256f5846500b0385979bdTim Murrayuint32_t rsSendToClientBlocking(int cmdID) { 1593276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines return SC_ToClientBlocking(cmdID); 1594276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines} 1595276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines 1596276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hinesuint32_t rsSendToClientBlocking(int cmdID, const void *data, uint32_t len) { 1597276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines return SC_ToClientBlocking2(cmdID, data, len); 15980b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 15990b575de8ed0b628d84d256f5846500b0385979bdTim Murray 16000b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugF(const char *s, float f) { 16010b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %f, 0x%08x", s, f, *((int *) (&f))); 16020b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16030b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugFv2(const char *s, float f1, float f2) { 16040b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%f, %f}", s, f1, f2); 16050b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16060b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugFv3(const char *s, float f1, float f2, float f3) { 16070b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%f, %f, %f}", s, f1, f2, f3); 16080b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16090b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugFv4(const char *s, float f1, float f2, float f3, float f4) { 16100b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%f, %f, %f, %f}", s, f1, f2, f3, f4); 16110b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16120b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugF2(const char *s, float2 f) { 16130b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%f, %f}", s, f.x, f.y); 16140b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16150b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugF3(const char *s, float3 f) { 16160b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%f, %f, %f}", s, f.x, f.y, f.z); 16170b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16180b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugF4(const char *s, float4 f) { 16190b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%f, %f, %f, %f}", s, f.x, f.y, f.z, f.w); 16200b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16210b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugD(const char *s, double d) { 16220b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %f, 0x%08llx", s, d, *((long long *) (&d))); 16230b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16240b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugFM4v4(const char *s, const float *f) { 16250b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%f, %f, %f, %f", s, f[0], f[4], f[8], f[12]); 16260b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %f, %f, %f, %f", s, f[1], f[5], f[9], f[13]); 16270b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %f, %f, %f, %f", s, f[2], f[6], f[10], f[14]); 16280b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %f, %f, %f, %f}", s, f[3], f[7], f[11], f[15]); 16290b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16300b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugFM3v3(const char *s, const float *f) { 16310b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%f, %f, %f", s, f[0], f[3], f[6]); 16320b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %f, %f, %f", s, f[1], f[4], f[7]); 16330b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %f, %f, %f}",s, f[2], f[5], f[8]); 16340b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16350b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugFM2v2(const char *s, const float *f) { 16360b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%f, %f", s, f[0], f[2]); 16370b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %f, %f}",s, f[1], f[3]); 16380b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16390b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugI8(const char *s, char c) { 16400b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %hhd 0x%hhx", s, c, (unsigned char)c); 16410b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16420b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugC2(const char *s, char2 c) { 16430b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%hhd, %hhd} 0x%hhx 0x%hhx", s, c.x, c.y, (unsigned char)c.x, (unsigned char)c.y); 16440b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16450b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugC3(const char *s, char3 c) { 16460b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%hhd, %hhd, %hhd} 0x%hhx 0x%hhx 0x%hhx", s, c.x, c.y, c.z, (unsigned char)c.x, (unsigned char)c.y, (unsigned char)c.z); 16470b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16480b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugC4(const char *s, char4 c) { 16490b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%hhd, %hhd, %hhd, %hhd} 0x%hhx 0x%hhx 0x%hhx 0x%hhx", s, c.x, c.y, c.z, c.w, (unsigned char)c.x, (unsigned char)c.y, (unsigned char)c.z, (unsigned char)c.w); 16500b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16510b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugU8(const char *s, unsigned char c) { 16520b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %hhu 0x%hhx", s, c, c); 16530b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16540b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUC2(const char *s, uchar2 c) { 16550b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%hhu, %hhu} 0x%hhx 0x%hhx", s, c.x, c.y, c.x, c.y); 16560b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16570b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUC3(const char *s, uchar3 c) { 16580b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%hhu, %hhu, %hhu} 0x%hhx 0x%hhx 0x%hhx", s, c.x, c.y, c.z, c.x, c.y, c.z); 16590b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16600b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUC4(const char *s, uchar4 c) { 16610b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%hhu, %hhu, %hhu, %hhu} 0x%hhx 0x%hhx 0x%hhx 0x%hhx", s, c.x, c.y, c.z, c.w, c.x, c.y, c.z, c.w); 16620b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16630b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugI16(const char *s, short c) { 16640b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %hd 0x%hx", s, c, c); 16650b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16660b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugS2(const char *s, short2 c) { 16670b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%hd, %hd} 0x%hx 0x%hx", s, c.x, c.y, c.x, c.y); 16680b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16690b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugS3(const char *s, short3 c) { 16700b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%hd, %hd, %hd} 0x%hx 0x%hx 0x%hx", s, c.x, c.y, c.z, c.x, c.y, c.z); 16710b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16720b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugS4(const char *s, short4 c) { 16730b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%hd, %hd, %hd, %hd} 0x%hx 0x%hx 0x%hx 0x%hx", s, c.x, c.y, c.z, c.w, c.x, c.y, c.z, c.w); 16740b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16750b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugU16(const char *s, unsigned short c) { 16760b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %hu 0x%hx", s, c, c); 16770b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16780b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUS2(const char *s, ushort2 c) { 16790b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%hu, %hu} 0x%hx 0x%hx", s, c.x, c.y, c.x, c.y); 16800b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16810b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUS3(const char *s, ushort3 c) { 16820b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%hu, %hu, %hu} 0x%hx 0x%hx 0x%hx", s, c.x, c.y, c.z, c.x, c.y, c.z); 16830b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16840b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUS4(const char *s, ushort4 c) { 16850b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%hu, %hu, %hu, %hu} 0x%hx 0x%hx 0x%hx 0x%hx", s, c.x, c.y, c.z, c.w, c.x, c.y, c.z, c.w); 16860b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16870b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugI32(const char *s, int32_t i) { 16880b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %d 0x%x", s, i, i); 16890b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16900b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugI2(const char *s, int2 i) { 16910b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%d, %d} 0x%x 0x%x", s, i.x, i.y, i.x, i.y); 16920b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16930b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugI3(const char *s, int3 i) { 16940b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%d, %d, %d} 0x%x 0x%x 0x%x", s, i.x, i.y, i.z, i.x, i.y, i.z); 16950b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16960b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugI4(const char *s, int4 i) { 16970b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%d, %d, %d, %d} 0x%x 0x%x 0x%x 0x%x", s, i.x, i.y, i.z, i.w, i.x, i.y, i.z, i.w); 16980b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16990b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugU32(const char *s, uint32_t i) { 17000b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %u 0x%x", s, i, i); 17010b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17020b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUI2(const char *s, uint2 i) { 17030b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%u, %u} 0x%x 0x%x", s, i.x, i.y, i.x, i.y); 17040b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17050b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUI3(const char *s, uint3 i) { 17060b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%u, %u, %u} 0x%x 0x%x 0x%x", s, i.x, i.y, i.z, i.x, i.y, i.z); 17070b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17080b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUI4(const char *s, uint4 i) { 17090b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%u, %u, %u, %u} 0x%x 0x%x 0x%x 0x%x", s, i.x, i.y, i.z, i.w, i.x, i.y, i.z, i.w); 17100b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17110b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugLL64(const char *s, long long ll) { 17120b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %lld 0x%llx", s, ll, ll); 17130b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17140b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugL2(const char *s, long2 ll) { 17150b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%lld, %lld} 0x%llx 0x%llx", s, ll.x, ll.y, ll.x, ll.y); 17160b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17170b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugL3(const char *s, long3 ll) { 17180b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%lld, %lld, %lld} 0x%llx 0x%llx 0x%llx", s, ll.x, ll.y, ll.z, ll.x, ll.y, ll.z); 17190b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17200b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugL4(const char *s, long4 ll) { 17210b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%lld, %lld, %lld, %lld} 0x%llx 0x%llx 0x%llx 0x%llx", s, ll.x, ll.y, ll.z, ll.w, ll.x, ll.y, ll.z, ll.w); 17220b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17230b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugULL64(const char *s, unsigned long long ll) { 17240b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %llu 0x%llx", s, ll, ll); 17250b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17260b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUL2(const char *s, ulong2 ll) { 17270b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%llu, %llu} 0x%llx 0x%llx", s, ll.x, ll.y, ll.x, ll.y); 17280b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17290b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUL3(const char *s, ulong3 ll) { 17300b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%llu, %llu, %llu} 0x%llx 0x%llx 0x%llx", s, ll.x, ll.y, ll.z, ll.x, ll.y, ll.z); 17310b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17320b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUL4(const char *s, ulong4 ll) { 17330b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%llu, %llu, %llu, %llu} 0x%llx 0x%llx 0x%llx 0x%llx", s, ll.x, ll.y, ll.z, ll.w, ll.x, ll.y, ll.z, ll.w); 17340b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17350b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugP(const char *s, const void *p) { 17360b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %p", s, p); 17370b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17380b575de8ed0b628d84d256f5846500b0385979bdTim Murray 17390b575de8ed0b628d84d256f5846500b0385979bdTim Murray// TODO: allocation ops, messaging, time 17400b575de8ed0b628d84d256f5846500b0385979bdTim Murray 17410b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, float f) { 17420b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugF(s, f); 17430b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17440b575de8ed0b628d84d256f5846500b0385979bdTim Murray 17450b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, float f1, float f2) { 17460b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugFv2(s, f1, f2); 17470b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17480b575de8ed0b628d84d256f5846500b0385979bdTim Murray 17490b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, float f1, float f2, float f3) { 17500b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugFv3(s, f1, f2, f3); 17510b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17520b575de8ed0b628d84d256f5846500b0385979bdTim Murray 17530b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, float f1, float f2, float f3, float f4) { 17540b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugFv4(s, f1, f2, f3, f4); 17550b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17560b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1757b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const float2 *f) { 1758b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugF2(s, *f); 17590b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17600b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1761b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const float3 *f) { 1762b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugF3(s, *f); 17630b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17640b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1765b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const float4 *f) { 1766b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugF4(s, *f); 17670b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17680b575de8ed0b628d84d256f5846500b0385979bdTim Murray 17690b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, double d) { 17700b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugD(s, d); 17710b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17720b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1773b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const rs_matrix4x4 *m) { 17740b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugFM4v4(s, (float *) m); 17750b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17760b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1777b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const rs_matrix3x3 *m) { 1778d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray SC_debugFM3v3(s, (float *) m); 17790b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17800b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1781b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const rs_matrix2x2 *m) { 1782d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray SC_debugFM2v2(s, (float *) m); 17830b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17840b575de8ed0b628d84d256f5846500b0385979bdTim Murray 17850b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, char c) { 17860b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugI8(s, c); 17870b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17880b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1789b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const char2 *c) { 1790b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugC2(s, *c); 17910b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17920b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1793b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const char3 *c) { 1794b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugC3(s, *c); 17950b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17960b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1797b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const char4 *c) { 1798b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugC4(s, *c); 17990b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18000b575de8ed0b628d84d256f5846500b0385979bdTim Murray 18010b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, unsigned char c) { 18020b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugU8(s, c); 18030b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18040b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1805b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const uchar2 *c) { 1806b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUC2(s, *c); 18070b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18080b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1809b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const uchar3 *c) { 1810b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUC3(s, *c); 18110b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18120b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1813b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const uchar4 *c) { 1814b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUC4(s, *c); 18150b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18160b575de8ed0b628d84d256f5846500b0385979bdTim Murray 18170b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, short c) { 18180b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugI16(s, c); 18190b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18200b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1821b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const short2 *c) { 1822b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugS2(s, *c); 18230b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18240b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1825b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const short3 *c) { 1826b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugS3(s, *c); 18270b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18280b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1829b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const short4 *c) { 1830b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugS4(s, *c); 18310b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18320b575de8ed0b628d84d256f5846500b0385979bdTim Murray 18330b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, unsigned short c) { 18340b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugU16(s, c); 18350b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18360b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1837b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const ushort2 *c) { 1838b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUS2(s, *c); 18390b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18400b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1841b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const ushort3 *c) { 1842b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUS3(s, *c); 18430b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18440b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1845b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const ushort4 *c) { 1846b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUS4(s, *c); 18470b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18480b575de8ed0b628d84d256f5846500b0385979bdTim Murray 18490b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, int c) { 18500b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugI32(s, c); 18510b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18520b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1853b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const int2 *c) { 1854b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugI2(s, *c); 18550b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18560b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1857b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const int3 *c) { 1858b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugI3(s, *c); 18590b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18600b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1861b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const int4 *c) { 1862b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugI4(s, *c); 18630b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18640b575de8ed0b628d84d256f5846500b0385979bdTim Murray 18650b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, unsigned int c) { 18660b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugU32(s, c); 18670b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18680b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1869b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const uint2 *c) { 1870b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUI2(s, *c); 18710b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18720b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1873b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const uint3 *c) { 1874b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUI3(s, *c); 18750b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18760b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1877b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const uint4 *c) { 1878b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUI4(s, *c); 18790b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18800b575de8ed0b628d84d256f5846500b0385979bdTim Murray 18810b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, long c) { 18820b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugLL64(s, c); 18830b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18840b575de8ed0b628d84d256f5846500b0385979bdTim Murray 18850b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, long long c) { 18860b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugLL64(s, c); 18870b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18880b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1889b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const long2 *c) { 1890b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugL2(s, *c); 18910b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18920b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1893b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const long3 *c) { 1894b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugL3(s, *c); 18950b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18960b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1897b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const long4 *c) { 1898b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugL4(s, *c); 18990b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19000b575de8ed0b628d84d256f5846500b0385979bdTim Murray 19010b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, unsigned long c) { 19020b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugULL64(s, c); 19030b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19040b575de8ed0b628d84d256f5846500b0385979bdTim Murray 19050b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, unsigned long long c) { 19060b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugULL64(s, c); 19070b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19080b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1909b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const ulong2 *c) { 1910b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUL2(s, *c); 19110b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19120b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1913b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const ulong3 *c) { 1914b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUL3(s, *c); 19150b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19160b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1917b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const ulong4 *c) { 1918b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUL4(s, *c); 19190b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19200b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1921a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines// FIXME: We need to export these function signatures for the compatibility 1922a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines// library. The C++ name mangling that LLVM uses for ext_vector_type requires 1923a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines// different versions for "long" vs. "long long". Note that the called 1924a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines// functions are still using the appropriate 64-bit sizes. 1925a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinestypedef long l2 __attribute__((ext_vector_type(2))); 1926a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinestypedef long l3 __attribute__((ext_vector_type(3))); 1927a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinestypedef long l4 __attribute__((ext_vector_type(4))); 1928a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinestypedef unsigned long ul2 __attribute__((ext_vector_type(2))); 1929a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinestypedef unsigned long ul3 __attribute__((ext_vector_type(3))); 1930a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinestypedef unsigned long ul4 __attribute__((ext_vector_type(4))); 1931a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines 1932a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinesvoid rsDebug(const char *s, const l2 *c) { 1933a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines SC_debugL2(s, *(const long2 *)c); 1934a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines} 1935a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines 1936a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinesvoid rsDebug(const char *s, const l3 *c) { 1937a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines SC_debugL3(s, *(const long3 *)c); 1938a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines} 1939a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines 1940a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinesvoid rsDebug(const char *s, const l4 *c) { 1941a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines SC_debugL4(s, *(const long4 *)c); 1942a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines} 1943a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines 1944a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinesvoid rsDebug(const char *s, const ul2 *c) { 1945a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines SC_debugUL2(s, *(const ulong2 *)c); 1946a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines} 1947a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines 1948a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinesvoid rsDebug(const char *s, const ul3 *c) { 1949a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines SC_debugUL3(s, *(const ulong3 *)c); 1950a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines} 1951a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines 1952a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinesvoid rsDebug(const char *s, const ul4 *c) { 1953a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines SC_debugUL4(s, *(const ulong4 *)c); 1954a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines} 1955a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines 19569f39aaf0145e9607200141e4716b73319055e6d7Tim Murrayvoid rsDebug(const char *s, const long2 c) { 19579f39aaf0145e9607200141e4716b73319055e6d7Tim Murray SC_debugL2(s, c); 19589f39aaf0145e9607200141e4716b73319055e6d7Tim Murray} 19599f39aaf0145e9607200141e4716b73319055e6d7Tim Murray 19609f39aaf0145e9607200141e4716b73319055e6d7Tim Murrayvoid rsDebug(const char *s, const long3 c) { 19619f39aaf0145e9607200141e4716b73319055e6d7Tim Murray SC_debugL3(s, c); 19629f39aaf0145e9607200141e4716b73319055e6d7Tim Murray} 19639f39aaf0145e9607200141e4716b73319055e6d7Tim Murray 19649f39aaf0145e9607200141e4716b73319055e6d7Tim Murrayvoid rsDebug(const char *s, const long4 c) { 19659f39aaf0145e9607200141e4716b73319055e6d7Tim Murray SC_debugL4(s, c); 19669f39aaf0145e9607200141e4716b73319055e6d7Tim Murray} 19679f39aaf0145e9607200141e4716b73319055e6d7Tim Murray 19689f39aaf0145e9607200141e4716b73319055e6d7Tim Murrayvoid rsDebug(const char *s, const ulong2 c) { 19699f39aaf0145e9607200141e4716b73319055e6d7Tim Murray SC_debugUL2(s, c); 19709f39aaf0145e9607200141e4716b73319055e6d7Tim Murray} 19719f39aaf0145e9607200141e4716b73319055e6d7Tim Murray 19729f39aaf0145e9607200141e4716b73319055e6d7Tim Murrayvoid rsDebug(const char *s, const ulong3 c) { 19739f39aaf0145e9607200141e4716b73319055e6d7Tim Murray SC_debugUL3(s, c); 19749f39aaf0145e9607200141e4716b73319055e6d7Tim Murray} 19759f39aaf0145e9607200141e4716b73319055e6d7Tim Murray 19769f39aaf0145e9607200141e4716b73319055e6d7Tim Murrayvoid rsDebug(const char *s, const ulong4 c) { 19779f39aaf0145e9607200141e4716b73319055e6d7Tim Murray SC_debugUL4(s, c); 19789f39aaf0145e9607200141e4716b73319055e6d7Tim Murray} 19799f39aaf0145e9607200141e4716b73319055e6d7Tim Murray 19809f39aaf0145e9607200141e4716b73319055e6d7Tim Murray 19810b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, const void *p) { 19820b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugP(s, p); 19830b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19840b575de8ed0b628d84d256f5846500b0385979bdTim Murray#endif // RS_COMPATIBILITY_LIB 198587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 1986709a0978ae141198018ca9769f8d96292a8928e6Jason Samsextern const RsdCpuReference::CpuSymbol * rsdLookupRuntimeStub(Context * pContext, char const* name) { 198787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams ScriptC *s = (ScriptC *)pContext; 1988709a0978ae141198018ca9769f8d96292a8928e6Jason Sams const RsdCpuReference::CpuSymbol *syms = gSyms; 1989709a0978ae141198018ca9769f8d96292a8928e6Jason Sams const RsdCpuReference::CpuSymbol *sym = NULL; 199087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 199187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams if (!sym) { 1992709a0978ae141198018ca9769f8d96292a8928e6Jason Sams while (syms->fnPtr) { 1993709a0978ae141198018ca9769f8d96292a8928e6Jason Sams if (!strcmp(syms->name, name)) { 1994709a0978ae141198018ca9769f8d96292a8928e6Jason Sams return syms; 199587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams } 199687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams syms++; 199787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams } 199887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams } 199987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 200087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams return NULL; 200187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 2002