rsdRuntimeStubs.cpp revision dc0d8f7c0f1f43f25c34fbc04656ad578f6e953b
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 75127d51c1193f4055795da967d47a13bedd3cb951Miao Wang#ifndef __LP64__ 76d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray#define OPAQUETYPE(t) \ 77d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray typedef struct { const int* const p; } __attribute__((packed, aligned(4))) t; 78127d51c1193f4055795da967d47a13bedd3cb951Miao Wang#else 79127d51c1193f4055795da967d47a13bedd3cb951Miao Wang#define OPAQUETYPE(t) \ 80127d51c1193f4055795da967d47a13bedd3cb951Miao Wang typedef struct { const void* p; const void* r; const void* v1; const void* v2; } t; 81127d51c1193f4055795da967d47a13bedd3cb951Miao Wang#endif 82d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 83d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayOPAQUETYPE(rs_element) 84d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayOPAQUETYPE(rs_type) 85d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayOPAQUETYPE(rs_allocation) 86d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayOPAQUETYPE(rs_sampler) 87d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayOPAQUETYPE(rs_script) 88d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayOPAQUETYPE(rs_script_call) 89d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray#undef OPAQUETYPE 90d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 917a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hinestypedef enum { 927a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines // Empty to avoid conflicting definitions with RsAllocationCubemapFace 937a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines} rs_allocation_cubemap_face; 947a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines 95d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murraytypedef struct { 96d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray int tm_sec; ///< seconds 97d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray int tm_min; ///< minutes 98d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray int tm_hour; ///< hours 99d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray int tm_mday; ///< day of the month 100d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray int tm_mon; ///< month 101d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray int tm_year; ///< year 102d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray int tm_wday; ///< day of the week 103d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray int tm_yday; ///< day of the year 104d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray int tm_isdst; ///< daylight savings time 105d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray} rs_tm; 106d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 10787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 10887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// Allocation 10987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 11087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 11187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 1121aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_AllocationSyncAll2(android::renderscript::rs_allocation a, RsAllocationUsageType source) { 113709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 1141aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrAllocationSyncAll(rsc, (Allocation*)a.p, source); 11587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 11687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 1171aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_AllocationSyncAll(android::renderscript::rs_allocation a) { 118709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 1191aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrAllocationSyncAll(rsc, (Allocation*)a.p, RS_ALLOCATION_USAGE_SCRIPT); 12087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 12187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 1221aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray#ifndef RS_COMPATIBILITY_LIB 1231aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 124dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarstatic void SC_AllocationCopy1DRange(::rs_allocation dstAlloc, 12574a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk uint32_t dstOff, 12674a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk uint32_t dstMip, 12774a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk uint32_t count, 128dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar ::rs_allocation srcAlloc, 12974a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk uint32_t srcOff, uint32_t srcMip) { 130709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 1311aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrAllocationCopy1DRange(rsc, (Allocation*)dstAlloc.p, dstOff, dstMip, count, 1321aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray (Allocation*)srcAlloc.p, srcOff, srcMip); 13374a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk} 13474a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk 135dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarstatic void SC_AllocationCopy2DRange(::rs_allocation dstAlloc, 13674a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk uint32_t dstXoff, uint32_t dstYoff, 13774a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk uint32_t dstMip, uint32_t dstFace, 13874a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk uint32_t width, uint32_t height, 139dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar ::rs_allocation srcAlloc, 14074a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk uint32_t srcXoff, uint32_t srcYoff, 14174a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk uint32_t srcMip, uint32_t srcFace) { 142709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 1431aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrAllocationCopy2DRange(rsc, (Allocation*)dstAlloc.p, 144a94952436aeb251f587c1bccdf94c7f75285dfe2Alex Sakhartchouk dstXoff, dstYoff, dstMip, dstFace, 145a94952436aeb251f587c1bccdf94c7f75285dfe2Alex Sakhartchouk width, height, 1461aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray (Allocation*)srcAlloc.p, 147a94952436aeb251f587c1bccdf94c7f75285dfe2Alex Sakhartchouk srcXoff, srcYoff, srcMip, srcFace); 14874a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk} 14974a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk 150dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarstatic void SC_AllocationIoSend(::rs_allocation alloc) { 1511aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray Context *rsc = RsdCpuReference::getTlsContext(); 1521aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrAllocationIoSend(rsc, (Allocation*)alloc.p); 1531aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray} 1541aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 1551aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 156dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarstatic void SC_AllocationIoReceive(::rs_allocation alloc) { 1571aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray Context *rsc = RsdCpuReference::getTlsContext(); 1581aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrAllocationIoReceive(rsc, (Allocation*)alloc.p); 1591aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray} 1601aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 1611aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray#else 1621aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 1631aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_AllocationCopy1DRange(::rs_allocation dstAlloc, 1641aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray uint32_t dstOff, 1651aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray uint32_t dstMip, 1661aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray uint32_t count, 1671aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray ::rs_allocation srcAlloc, 1681aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray uint32_t srcOff, uint32_t srcMip) { 1691aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray Context *rsc = RsdCpuReference::getTlsContext(); 1701aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrAllocationCopy1DRange(rsc, (Allocation*)dstAlloc.p, dstOff, dstMip, count, 1711aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray (Allocation*)srcAlloc.p, srcOff, srcMip); 1721aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray} 1731aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 1741aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_AllocationCopy2DRange(::rs_allocation dstAlloc, 1751aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray uint32_t dstXoff, uint32_t dstYoff, 1761aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray uint32_t dstMip, uint32_t dstFace, 1771aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray uint32_t width, uint32_t height, 1781aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray ::rs_allocation srcAlloc, 1791aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray uint32_t srcXoff, uint32_t srcYoff, 1801aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray uint32_t srcMip, uint32_t srcFace) { 1811aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray Context *rsc = RsdCpuReference::getTlsContext(); 1821aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrAllocationCopy2DRange(rsc, (Allocation*)dstAlloc.p, 1831aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray dstXoff, dstYoff, dstMip, dstFace, 1841aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray width, height, 1851aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray (Allocation*)srcAlloc.p, 1861aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray srcXoff, srcYoff, srcMip, srcFace); 1871aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray} 1881aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 189dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarstatic void SC_AllocationIoSend(::rs_allocation alloc) { 190709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 191dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar rsrAllocationIoSend(rsc, (Allocation *) alloc.p); 192b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams} 193b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams 194b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams 195dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarstatic void SC_AllocationIoReceive(::rs_allocation alloc) { 196709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 197dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar rsrAllocationIoReceive(rsc, (Allocation *) alloc.p); 198b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams} 199b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams 2001aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray#endif 2011aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 2027a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines#ifndef RS_COMPATIBILITY_LIB 20374a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk 20487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 20587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// Context 20687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 20787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 20887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindTexture(ProgramFragment *pf, uint32_t slot, Allocation *a) { 209709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 210709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrBindTexture(rsc, pf, slot, a); 21187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 21287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 213a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchoukstatic void SC_BindVertexConstant(ProgramVertex *pv, uint32_t slot, Allocation *a) { 214709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 215709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrBindConstant(rsc, pv, slot, a); 216a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchouk} 217a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchouk 218a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchoukstatic void SC_BindFragmentConstant(ProgramFragment *pf, uint32_t slot, Allocation *a) { 219709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 220709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrBindConstant(rsc, pf, slot, a); 221a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchouk} 222a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchouk 22387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindSampler(ProgramFragment *pf, uint32_t slot, Sampler *s) { 224709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 225709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrBindSampler(rsc, pf, slot, s); 22687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 22787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 22887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindProgramStore(ProgramStore *ps) { 229709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 230709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrBindProgramStore(rsc, ps); 23187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 23287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 23387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindProgramFragment(ProgramFragment *pf) { 234709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 235709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrBindProgramFragment(rsc, pf); 23687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 23787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 23887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindProgramVertex(ProgramVertex *pv) { 239709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 240709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrBindProgramVertex(rsc, pv); 24187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 24287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 24387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindProgramRaster(ProgramRaster *pr) { 244709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 245709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrBindProgramRaster(rsc, pr); 24687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 24787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 24887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindFrameBufferObjectColorTarget(Allocation *a, uint32_t slot) { 249709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 250709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrBindFrameBufferObjectColorTarget(rsc, a, slot); 25187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 25287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 25387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindFrameBufferObjectDepthTarget(Allocation *a) { 254709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 255709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrBindFrameBufferObjectDepthTarget(rsc, a); 25687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 25787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 25887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_ClearFrameBufferObjectColorTarget(uint32_t slot) { 259709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 260709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrClearFrameBufferObjectColorTarget(rsc, slot); 26187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 26287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 26387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_ClearFrameBufferObjectDepthTarget(Context *, Script *) { 264709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 265709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrClearFrameBufferObjectDepthTarget(rsc); 26687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 26787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 26887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_ClearFrameBufferObjectTargets(Context *, Script *) { 269709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 270709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrClearFrameBufferObjectTargets(rsc); 27187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 27287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 27387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 27487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 27587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// VP 27687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 27787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 27887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_VpLoadProjectionMatrix(const rsc_Matrix *m) { 279709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 280709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrVpLoadProjectionMatrix(rsc, m); 28187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 28287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 28387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_VpLoadModelMatrix(const rsc_Matrix *m) { 284709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 285709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrVpLoadModelMatrix(rsc, m); 28687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 28787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 28887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_VpLoadTextureMatrix(const rsc_Matrix *m) { 289709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 290709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrVpLoadTextureMatrix(rsc, m); 29187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 29287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 29387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_PfConstantColor(ProgramFragment *pf, float r, float g, float b, float a) { 294709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 295709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrPfConstantColor(rsc, pf, r, g, b, a); 29687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 29787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 29887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_VpGetProjectionMatrix(rsc_Matrix *m) { 299709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 300709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrVpGetProjectionMatrix(rsc, m); 30187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 30287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 30387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 30487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 30587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// Drawing 30687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 30787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 30887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawQuadTexCoords(float x1, float y1, float z1, float u1, float v1, 30987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams float x2, float y2, float z2, float u2, float v2, 31087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams float x3, float y3, float z3, float u3, float v3, 31187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams float x4, float y4, float z4, float u4, float v4) { 312709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 313414a46166126da6864258bd25ff183f9a3c6261dStephen Hines 314414a46166126da6864258bd25ff183f9a3c6261dStephen Hines if (!rsc->setupCheck()) { 315414a46166126da6864258bd25ff183f9a3c6261dStephen Hines return; 316414a46166126da6864258bd25ff183f9a3c6261dStephen Hines } 317414a46166126da6864258bd25ff183f9a3c6261dStephen Hines 318414a46166126da6864258bd25ff183f9a3c6261dStephen Hines RsdHal *dc = (RsdHal *)rsc->mHal.drv; 319414a46166126da6864258bd25ff183f9a3c6261dStephen Hines if (!dc->gl.shaderCache->setup(rsc)) { 320414a46166126da6864258bd25ff183f9a3c6261dStephen Hines return; 321414a46166126da6864258bd25ff183f9a3c6261dStephen Hines } 322414a46166126da6864258bd25ff183f9a3c6261dStephen Hines 323414a46166126da6864258bd25ff183f9a3c6261dStephen Hines //ALOGE("Quad"); 324414a46166126da6864258bd25ff183f9a3c6261dStephen Hines //ALOGE("%4.2f, %4.2f, %4.2f", x1, y1, z1); 325414a46166126da6864258bd25ff183f9a3c6261dStephen Hines //ALOGE("%4.2f, %4.2f, %4.2f", x2, y2, z2); 326414a46166126da6864258bd25ff183f9a3c6261dStephen Hines //ALOGE("%4.2f, %4.2f, %4.2f", x3, y3, z3); 327414a46166126da6864258bd25ff183f9a3c6261dStephen Hines //ALOGE("%4.2f, %4.2f, %4.2f", x4, y4, z4); 328414a46166126da6864258bd25ff183f9a3c6261dStephen Hines 329414a46166126da6864258bd25ff183f9a3c6261dStephen Hines float vtx[] = {x1,y1,z1, x2,y2,z2, x3,y3,z3, x4,y4,z4}; 330414a46166126da6864258bd25ff183f9a3c6261dStephen Hines const float tex[] = {u1,v1, u2,v2, u3,v3, u4,v4}; 331414a46166126da6864258bd25ff183f9a3c6261dStephen Hines 332414a46166126da6864258bd25ff183f9a3c6261dStephen Hines RsdVertexArray::Attrib attribs[2]; 333e195a3f57ace3b66d313a6ee88c6e93d5c9d87f4Tim Murray attribs[0].set(GL_FLOAT, 3, 12, false, (size_t)vtx, "ATTRIB_position"); 334e195a3f57ace3b66d313a6ee88c6e93d5c9d87f4Tim Murray attribs[1].set(GL_FLOAT, 2, 8, false, (size_t)tex, "ATTRIB_texture0"); 335414a46166126da6864258bd25ff183f9a3c6261dStephen Hines 336414a46166126da6864258bd25ff183f9a3c6261dStephen Hines RsdVertexArray va(attribs, 2); 337414a46166126da6864258bd25ff183f9a3c6261dStephen Hines va.setup(rsc); 338414a46166126da6864258bd25ff183f9a3c6261dStephen Hines 339414a46166126da6864258bd25ff183f9a3c6261dStephen Hines RSD_CALL_GL(glDrawArrays, GL_TRIANGLE_FAN, 0, 4); 34087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 34187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 34287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawQuad(float x1, float y1, float z1, 34387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams float x2, float y2, float z2, 34487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams float x3, float y3, float z3, 34587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams float x4, float y4, float z4) { 346414a46166126da6864258bd25ff183f9a3c6261dStephen Hines SC_DrawQuadTexCoords(x1, y1, z1, 0, 1, 347414a46166126da6864258bd25ff183f9a3c6261dStephen Hines x2, y2, z2, 1, 1, 348414a46166126da6864258bd25ff183f9a3c6261dStephen Hines x3, y3, z3, 1, 0, 349414a46166126da6864258bd25ff183f9a3c6261dStephen Hines x4, y4, z4, 0, 0); 35087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 35187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 35287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawSpriteScreenspace(float x, float y, float z, float w, float h) { 353709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 354414a46166126da6864258bd25ff183f9a3c6261dStephen Hines 355414a46166126da6864258bd25ff183f9a3c6261dStephen Hines ObjectBaseRef<const ProgramVertex> tmp(rsc->getProgramVertex()); 356414a46166126da6864258bd25ff183f9a3c6261dStephen Hines rsc->setProgramVertex(rsc->getDefaultProgramVertex()); 357414a46166126da6864258bd25ff183f9a3c6261dStephen Hines //rsc->setupCheck(); 358414a46166126da6864258bd25ff183f9a3c6261dStephen Hines 359414a46166126da6864258bd25ff183f9a3c6261dStephen Hines //GLint crop[4] = {0, h, w, -h}; 360414a46166126da6864258bd25ff183f9a3c6261dStephen Hines 361414a46166126da6864258bd25ff183f9a3c6261dStephen Hines float sh = rsc->getHeight(); 362414a46166126da6864258bd25ff183f9a3c6261dStephen Hines 363414a46166126da6864258bd25ff183f9a3c6261dStephen Hines SC_DrawQuad(x, sh - y, z, 364414a46166126da6864258bd25ff183f9a3c6261dStephen Hines x+w, sh - y, z, 365414a46166126da6864258bd25ff183f9a3c6261dStephen Hines x+w, sh - (y+h), z, 366414a46166126da6864258bd25ff183f9a3c6261dStephen Hines x, sh - (y+h), z); 367414a46166126da6864258bd25ff183f9a3c6261dStephen Hines rsc->setProgramVertex((ProgramVertex *)tmp.get()); 36887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 36987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 37087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawRect(float x1, float y1, float x2, float y2, float z) { 371414a46166126da6864258bd25ff183f9a3c6261dStephen Hines SC_DrawQuad(x1, y2, z, x2, y2, z, x2, y1, z, x1, y1, z); 37287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 37387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 3749e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Samsstatic void SC_DrawPath(Path *p) { 375709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 3769e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams rsdPathDraw(rsc, p); 3779e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams} 3789e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams 37987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawMesh(Mesh *m) { 380709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 381709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrDrawMesh(rsc, m); 38287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 38387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 38487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawMeshPrimitive(Mesh *m, uint32_t primIndex) { 385709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 386709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrDrawMeshPrimitive(rsc, m, primIndex); 38787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 38887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 38987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawMeshPrimitiveRange(Mesh *m, uint32_t primIndex, uint32_t start, uint32_t len) { 390709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 391709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrDrawMeshPrimitiveRange(rsc, m, primIndex, start, len); 39287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 39387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 39487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_MeshComputeBoundingBox(Mesh *m, 39587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams float *minX, float *minY, float *minZ, 39687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams float *maxX, float *maxY, float *maxZ) { 397709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 398709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrMeshComputeBoundingBox(rsc, m, minX, minY, minZ, maxX, maxY, maxZ); 39987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 40087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 40187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 40287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 40387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 40487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// 40587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 40687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 40787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 40887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_Color(float r, float g, float b, float a) { 409709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 410709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrColor(rsc, r, g, b, a); 41187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 41287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 41387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_Finish() { 414709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 415653b53ebcd2bedc94ac486080d2e82e1920232e3Alex Sakhartchouk rsdGLFinish(rsc); 41687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 41787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 41887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_ClearColor(float r, float g, float b, float a) { 419709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 420709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrPrepareClear(rsc); 421653b53ebcd2bedc94ac486080d2e82e1920232e3Alex Sakhartchouk rsdGLClearColor(rsc, r, g, b, a); 42287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 42387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 42487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_ClearDepth(float v) { 425709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 426709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrPrepareClear(rsc); 427653b53ebcd2bedc94ac486080d2e82e1920232e3Alex Sakhartchouk rsdGLClearDepth(rsc, v); 42887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 42987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 43087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic uint32_t SC_GetWidth() { 431709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 432709a0978ae141198018ca9769f8d96292a8928e6Jason Sams return rsrGetWidth(rsc); 43387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 43487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 43587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic uint32_t SC_GetHeight() { 436709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 437709a0978ae141198018ca9769f8d96292a8928e6Jason Sams return rsrGetHeight(rsc); 43887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 43987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 44087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawTextAlloc(Allocation *a, int x, int y) { 441709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 442709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrDrawTextAlloc(rsc, a, x, y); 44387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 44487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 44587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawText(const char *text, int x, int y) { 446709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 447709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrDrawText(rsc, text, x, y); 44887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 44987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 45087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_MeasureTextAlloc(Allocation *a, 45187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams int32_t *left, int32_t *right, int32_t *top, int32_t *bottom) { 452709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 453709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrMeasureTextAlloc(rsc, a, left, right, top, bottom); 45487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 45587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 45687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_MeasureText(const char *text, 45787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams int32_t *left, int32_t *right, int32_t *top, int32_t *bottom) { 458709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 459709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrMeasureText(rsc, text, left, right, top, bottom); 46087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 46187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 46287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindFont(Font *f) { 463709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 464709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrBindFont(rsc, f); 46587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 46687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 46787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_FontColor(float r, float g, float b, float a) { 468709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 469709a0978ae141198018ca9769f8d96292a8928e6Jason Sams rsrFontColor(rsc, r, g, b, a); 47087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 471110f181b7966212a36ef18016f9b81c7322d0a2fJason Sams#endif 47287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 47387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 47487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 47587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// 47687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 47787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 4781aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_ClearObject(rs_object_base *dst) { 4791aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray Context *rsc = RsdCpuReference::getTlsContext(); 4801aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrClearObject(rsc, dst); 4811aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray} 482dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar 4831aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_SetObject(rs_object_base *dst, rs_object_base src) { 484a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams // ALOGE("SC_SetObject: dst = %p, src = %p", dst, src.p); 485a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams // ALOGE("SC_SetObject: dst[0] = %p", dst[0]); 486a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 4871aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray rsrSetObject(rsc, dst, (ObjectBase*)src.p); 48887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 48987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 4901aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic bool SC_IsObject(rs_object_base o) { 491709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 4921aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray return rsrIsObject(rsc, o); 4931aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray} 494444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen 495127d51c1193f4055795da967d47a13bedd3cb951Miao Wang#ifdef __LP64__ 496127d51c1193f4055795da967d47a13bedd3cb951Miao Wangstatic void SC_SetObject_ByRef(rs_object_base *dst, rs_object_base *src) { 497127d51c1193f4055795da967d47a13bedd3cb951Miao Wang // ALOGE("SC_SetObject2: dst = %p, src = %p", dst, src->p); 498127d51c1193f4055795da967d47a13bedd3cb951Miao Wang Context *rsc = RsdCpuReference::getTlsContext(); 499127d51c1193f4055795da967d47a13bedd3cb951Miao Wang rsrSetObject(rsc, dst, (ObjectBase*)src->p); 500127d51c1193f4055795da967d47a13bedd3cb951Miao Wang} 501127d51c1193f4055795da967d47a13bedd3cb951Miao Wang 502127d51c1193f4055795da967d47a13bedd3cb951Miao Wangstatic bool SC_IsObject_ByRef(rs_object_base *o) { 503127d51c1193f4055795da967d47a13bedd3cb951Miao Wang Context *rsc = RsdCpuReference::getTlsContext(); 504127d51c1193f4055795da967d47a13bedd3cb951Miao Wang return rsrIsObject(rsc, *o); 505127d51c1193f4055795da967d47a13bedd3cb951Miao Wang} 506127d51c1193f4055795da967d47a13bedd3cb951Miao Wang#endif 507127d51c1193f4055795da967d47a13bedd3cb951Miao Wang 508240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray 50947211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray#ifndef RS_COMPATIBILITY_LIB 51047211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray#ifndef __LP64__ 511240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray 512240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray// i386 has different struct return passing to ARM; emulate with void* 513240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray#ifdef __i386__ 514240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murraystatic const void* SC_GetAllocation(const void *ptr) { 515240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray Context *rsc = RsdCpuReference::getTlsContext(); 516240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray const Script *sc = RsdCpuReference::getTlsScript(); 517240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray Allocation* alloc = rsdScriptGetAllocationForPointer(rsc, sc, ptr); 518240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray android::renderscript::rs_allocation obj = {0}; 519240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray alloc->callUpdateCacheObject(rsc, &obj); 520240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray return (void*)obj.p; 521240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray} 522240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray#else 523240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray// ARMv7/MIPS 52447211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murraystatic const android::renderscript::rs_allocation SC_GetAllocation(const void *ptr) { 525709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 526709a0978ae141198018ca9769f8d96292a8928e6Jason Sams const Script *sc = RsdCpuReference::getTlsScript(); 52747211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray Allocation* alloc = rsdScriptGetAllocationForPointer(rsc, sc, ptr); 52847211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray android::renderscript::rs_allocation obj = {0}; 52947211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray alloc->callUpdateCacheObject(rsc, &obj); 53047211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray return obj; 53147211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray} 532240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray#endif 53347211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray#else 534240a6c96eb94734a84eed53349fb0928d3ce6d19Tim Murray// AArch64/x86_64/MIPS64 53547211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murraystatic const android::renderscript::rs_allocation SC_GetAllocation(const void *ptr) { 53647211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray Context *rsc = RsdCpuReference::getTlsContext(); 53747211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray const Script *sc = RsdCpuReference::getTlsScript(); 53847211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray Allocation* alloc = rsdScriptGetAllocationForPointer(rsc, sc, ptr); 53947211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray android::renderscript::rs_allocation obj = {0, 0, 0, 0}; 54047211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray alloc->callUpdateCacheObject(rsc, &obj); 54147211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray return obj; 54287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 54347211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray#endif 54447211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray#endif 54587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 546dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar 547444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#ifndef __LP64__ 548dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarstatic void SC_ForEach_SAA(::rs_script target, 549dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar ::rs_allocation in, 550dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar ::rs_allocation out); 551444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#else 552444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chenstatic void SC_ForEach_SAA(android::renderscript::rs_script *target, 553444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen android::renderscript::rs_allocation *in, 554444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen android::renderscript::rs_allocation *out) { 555444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen Context *rsc = RsdCpuReference::getTlsContext(); 556444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen rsrForEach(rsc, (Script*)target->p, (Allocation*)in->p, (Allocation*)out->p, NULL, 0, NULL); 557444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen} 558444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#endif 559c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams 560444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#ifndef __LP64__ 561dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarstatic void SC_ForEach_SAAU(::rs_script target, 562dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar ::rs_allocation in, 563dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar ::rs_allocation out, 564c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams const void *usr) { 565709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 56644bef6fba6244292b751387f3d6c31cca96c28adChris Wailes rsrForEach(rsc, (Script*)target.p, (Allocation*)in.p, (Allocation*)out.p, 56744bef6fba6244292b751387f3d6c31cca96c28adChris Wailes usr, 0, nullptr); 56887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 569444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#else 570dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarstatic void SC_ForEach_SAAU(::rs_script *target, 571dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar ::rs_allocation *in, 572dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar ::rs_allocation *out, 573444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen const void *usr) { 574444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen Context *rsc = RsdCpuReference::getTlsContext(); 575444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen rsrForEach(rsc, (Script*)target->p, (Allocation*)in->p, (Allocation*)out->p, usr, 0, NULL); 576444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen} 577444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#endif 57887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 579444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#ifndef __LP64__ 580dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarstatic void SC_ForEach_SAAUS(::rs_script target, 581dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar ::rs_allocation in, 582dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar ::rs_allocation out, 583c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams const void *usr, 584dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar const RsScriptCall *call); 585444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#else 586444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chenstatic void SC_ForEach_SAAUS(android::renderscript::rs_script *target, 587444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen android::renderscript::rs_allocation *in, 588444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen android::renderscript::rs_allocation *out, 589444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen const void *usr, 590444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen const RsScriptCall *call) { 591444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen Context *rsc = RsdCpuReference::getTlsContext(); 592444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen rsrForEach(rsc, (Script*)target->p, (Allocation*)in->p, (Allocation*)out->p, usr, 0, call); 593444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen} 594444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#endif 59587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 5962f6dc8469a45fa2dafcb772c76009565d0c3885fTim Murray// These functions are only supported in 32-bit. 597444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#ifndef __LP64__ 598dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarstatic void SC_ForEach_SAAUL(::rs_script target, 599dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar ::rs_allocation in, 600dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar ::rs_allocation out, 601c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams const void *usr, 602dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar uint32_t usrLen); 603dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar 604dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarstatic void SC_ForEach_SAAULS(::rs_script target, 605dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar ::rs_allocation in, 606dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar ::rs_allocation out, 607c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams const void *usr, 608c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams uint32_t usrLen, 609dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar const RsScriptCall *call); 6101aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray#endif 61187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 61287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 61387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 61487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// Time routines 61587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 61687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 61787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic float SC_GetDt() { 618709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 619709a0978ae141198018ca9769f8d96292a8928e6Jason Sams const Script *sc = RsdCpuReference::getTlsScript(); 62087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams return rsrGetDt(rsc, sc); 62187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 62287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 623dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar// #if !defined(RS_COMPATIBILITY_LIB) && defined(__LP64__) 624dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar#ifdef __LP64__ 62587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samstime_t SC_Time(time_t *timer) { 626709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 627709a0978ae141198018ca9769f8d96292a8928e6Jason Sams return rsrTime(rsc, timer); 62887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 629d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray#else 630d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murraystatic int SC_Time(int *timer) { 631d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray Context *rsc = RsdCpuReference::getTlsContext(); 632d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray return rsrTime(rsc, (long*)timer); 633d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray} 634d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray#endif 63587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 63687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samstm* SC_LocalTime(tm *local, time_t *timer) { 637709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 638709a0978ae141198018ca9769f8d96292a8928e6Jason Sams return rsrLocalTime(rsc, local, timer); 63987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 64087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 64187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsint64_t SC_UptimeMillis() { 642709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 643709a0978ae141198018ca9769f8d96292a8928e6Jason Sams return rsrUptimeMillis(rsc); 64487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 64587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 64687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsint64_t SC_UptimeNanos() { 647709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 648709a0978ae141198018ca9769f8d96292a8928e6Jason Sams return rsrUptimeNanos(rsc); 64987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 65087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 65187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 65287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// Message routines 65387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 65487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 655276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hinesstatic uint32_t SC_ToClient2(int cmdID, const void *data, uint32_t len) { 656709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 657709a0978ae141198018ca9769f8d96292a8928e6Jason Sams return rsrToClient(rsc, cmdID, data, len); 65887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 65987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 66087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic uint32_t SC_ToClient(int cmdID) { 661709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 66244bef6fba6244292b751387f3d6c31cca96c28adChris Wailes return rsrToClient(rsc, cmdID, (const void *)nullptr, 0); 66387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 66487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 665276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hinesstatic uint32_t SC_ToClientBlocking2(int cmdID, const void *data, uint32_t len) { 666709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 667709a0978ae141198018ca9769f8d96292a8928e6Jason Sams return rsrToClientBlocking(rsc, cmdID, data, len); 66887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 66987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 67087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic uint32_t SC_ToClientBlocking(int cmdID) { 671709a0978ae141198018ca9769f8d96292a8928e6Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 67244bef6fba6244292b751387f3d6c31cca96c28adChris Wailes return rsrToClientBlocking(rsc, cmdID, (const void *)nullptr, 0); 67387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 67487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 67587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 6765261a5ea546ff358edd5aac7602fc4132434f481Jason Samsstatic void * ElementAt1D(Allocation *a, RsDataType dt, uint32_t vecSize, uint32_t x) { 6775261a5ea546ff358edd5aac7602fc4132434f481Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 6785261a5ea546ff358edd5aac7602fc4132434f481Jason Sams const Type *t = a->getType(); 6795261a5ea546ff358edd5aac7602fc4132434f481Jason Sams const Element *e = t->getElement(); 6805261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 6815261a5ea546ff358edd5aac7602fc4132434f481Jason Sams char buf[256]; 6825261a5ea546ff358edd5aac7602fc4132434f481Jason Sams if (x >= t->getLODDimX(0)) { 6835261a5ea546ff358edd5aac7602fc4132434f481Jason Sams sprintf(buf, "Out range ElementAt X %i of %i", x, t->getLODDimX(0)); 684cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines rsc->setError(RS_ERROR_FATAL_DEBUG, buf); 68544bef6fba6244292b751387f3d6c31cca96c28adChris Wailes return nullptr; 6865261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } 6875261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 688d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (vecSize > 0) { 689d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (vecSize != e->getVectorSize()) { 690d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams sprintf(buf, "Vector size mismatch for ElementAt %i of %i", vecSize, e->getVectorSize()); 691cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines rsc->setError(RS_ERROR_FATAL_DEBUG, buf); 69244bef6fba6244292b751387f3d6c31cca96c28adChris Wailes return nullptr; 693d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams } 694d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 695d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (dt != e->getType()) { 696d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams sprintf(buf, "Data type mismatch for ElementAt %i of %i", dt, e->getType()); 697cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines rsc->setError(RS_ERROR_FATAL_DEBUG, buf); 69844bef6fba6244292b751387f3d6c31cca96c28adChris Wailes return nullptr; 699d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams } 7005261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } 7015261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 7025261a5ea546ff358edd5aac7602fc4132434f481Jason Sams uint8_t *p = (uint8_t *)a->mHal.drvState.lod[0].mallocPtr; 7035261a5ea546ff358edd5aac7602fc4132434f481Jason Sams const uint32_t eSize = e->getSizeBytes(); 7045261a5ea546ff358edd5aac7602fc4132434f481Jason Sams return &p[(eSize * x)]; 7055261a5ea546ff358edd5aac7602fc4132434f481Jason Sams} 7065261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 7075261a5ea546ff358edd5aac7602fc4132434f481Jason Samsstatic void * ElementAt2D(Allocation *a, RsDataType dt, uint32_t vecSize, uint32_t x, uint32_t y) { 7085261a5ea546ff358edd5aac7602fc4132434f481Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 7095261a5ea546ff358edd5aac7602fc4132434f481Jason Sams const Type *t = a->getType(); 7105261a5ea546ff358edd5aac7602fc4132434f481Jason Sams const Element *e = t->getElement(); 7115261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 7125261a5ea546ff358edd5aac7602fc4132434f481Jason Sams char buf[256]; 7135261a5ea546ff358edd5aac7602fc4132434f481Jason Sams if (x >= t->getLODDimX(0)) { 7145261a5ea546ff358edd5aac7602fc4132434f481Jason Sams sprintf(buf, "Out range ElementAt X %i of %i", x, t->getLODDimX(0)); 715cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines rsc->setError(RS_ERROR_FATAL_DEBUG, buf); 71644bef6fba6244292b751387f3d6c31cca96c28adChris Wailes return nullptr; 7175261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } 7185261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 7195261a5ea546ff358edd5aac7602fc4132434f481Jason Sams if (y >= t->getLODDimY(0)) { 7205261a5ea546ff358edd5aac7602fc4132434f481Jason Sams sprintf(buf, "Out range ElementAt Y %i of %i", y, t->getLODDimY(0)); 721cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines rsc->setError(RS_ERROR_FATAL_DEBUG, buf); 72244bef6fba6244292b751387f3d6c31cca96c28adChris Wailes return nullptr; 7235261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } 7245261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 725d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (vecSize > 0) { 726d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (vecSize != e->getVectorSize()) { 727d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams sprintf(buf, "Vector size mismatch for ElementAt %i of %i", vecSize, e->getVectorSize()); 728cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines rsc->setError(RS_ERROR_FATAL_DEBUG, buf); 72944bef6fba6244292b751387f3d6c31cca96c28adChris Wailes return nullptr; 730d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams } 731d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 732d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams if (dt != e->getType()) { 733d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams sprintf(buf, "Data type mismatch for ElementAt %i of %i", dt, e->getType()); 734cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines rsc->setError(RS_ERROR_FATAL_DEBUG, buf); 73544bef6fba6244292b751387f3d6c31cca96c28adChris Wailes return nullptr; 736d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams } 7375261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } 7385261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 7395261a5ea546ff358edd5aac7602fc4132434f481Jason Sams uint8_t *p = (uint8_t *)a->mHal.drvState.lod[0].mallocPtr; 7405261a5ea546ff358edd5aac7602fc4132434f481Jason Sams const uint32_t eSize = e->getSizeBytes(); 7415261a5ea546ff358edd5aac7602fc4132434f481Jason Sams const uint32_t stride = a->mHal.drvState.lod[0].stride; 7425261a5ea546ff358edd5aac7602fc4132434f481Jason Sams return &p[(eSize * x) + (y * stride)]; 7435261a5ea546ff358edd5aac7602fc4132434f481Jason Sams} 7445261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 7455261a5ea546ff358edd5aac7602fc4132434f481Jason Samsstatic void * ElementAt3D(Allocation *a, RsDataType dt, uint32_t vecSize, uint32_t x, uint32_t y, uint32_t z) { 7465261a5ea546ff358edd5aac7602fc4132434f481Jason Sams Context *rsc = RsdCpuReference::getTlsContext(); 7475261a5ea546ff358edd5aac7602fc4132434f481Jason Sams const Type *t = a->getType(); 7485261a5ea546ff358edd5aac7602fc4132434f481Jason Sams const Element *e = t->getElement(); 7495261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 7505261a5ea546ff358edd5aac7602fc4132434f481Jason Sams char buf[256]; 7515261a5ea546ff358edd5aac7602fc4132434f481Jason Sams if (x >= t->getLODDimX(0)) { 7525261a5ea546ff358edd5aac7602fc4132434f481Jason Sams sprintf(buf, "Out range ElementAt X %i of %i", x, t->getLODDimX(0)); 753cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines rsc->setError(RS_ERROR_FATAL_DEBUG, buf); 75444bef6fba6244292b751387f3d6c31cca96c28adChris Wailes return nullptr; 7555261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } 7565261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 7575261a5ea546ff358edd5aac7602fc4132434f481Jason Sams if (y >= t->getLODDimY(0)) { 7585261a5ea546ff358edd5aac7602fc4132434f481Jason Sams sprintf(buf, "Out range ElementAt Y %i of %i", y, t->getLODDimY(0)); 759cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines rsc->setError(RS_ERROR_FATAL_DEBUG, buf); 76044bef6fba6244292b751387f3d6c31cca96c28adChris Wailes return nullptr; 7615261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } 7625261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 7635261a5ea546ff358edd5aac7602fc4132434f481Jason Sams if (z >= t->getLODDimZ(0)) { 7645261a5ea546ff358edd5aac7602fc4132434f481Jason Sams sprintf(buf, "Out range ElementAt Z %i of %i", z, t->getLODDimZ(0)); 765cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines rsc->setError(RS_ERROR_FATAL_DEBUG, buf); 76644bef6fba6244292b751387f3d6c31cca96c28adChris Wailes return nullptr; 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); 77344bef6fba6244292b751387f3d6c31cca96c28adChris Wailes return nullptr; 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); 77944bef6fba6244292b751387f3d6c31cca96c28adChris Wailes return nullptr; 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 7891aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic const void * SC_GetElementAt1D(android::renderscript::rs_allocation a, uint32_t x) { 7901aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray return ElementAt1D((Allocation*)a.p, RS_TYPE_UNSIGNED_8, 0, x); 791d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams} 7921aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic const void * SC_GetElementAt2D(android::renderscript::rs_allocation a, uint32_t x, uint32_t y) { 7931aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray return ElementAt2D((Allocation*)a.p, RS_TYPE_UNSIGNED_8, 0, x, y); 794d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams} 7951aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic const void * SC_GetElementAt3D(android::renderscript::rs_allocation a, uint32_t x, uint32_t y, uint32_t z) { 7961aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray return ElementAt3D((Allocation*)a.p, RS_TYPE_UNSIGNED_8, 0, x, y, z); 797d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams} 798d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 7991aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_SetElementAt1D(android::renderscript::rs_allocation a, const void *ptr, uint32_t x) { 8001aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray const Type *t = ((Allocation*)a.p)->getType(); 801d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams const Element *e = t->getElement(); 8021aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray void *tmp = ElementAt1D((Allocation*)a.p, RS_TYPE_UNSIGNED_8, 0, x); 80344bef6fba6244292b751387f3d6c31cca96c28adChris Wailes if (tmp != nullptr) { 804d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams memcpy(tmp, ptr, e->getSizeBytes()); 805d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams } 806d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams} 8071aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_SetElementAt2D(android::renderscript::rs_allocation a, const void *ptr, uint32_t x, uint32_t y) { 8081aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray const Type *t = ((Allocation*)a.p)->getType(); 809d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams const Element *e = t->getElement(); 8101aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray void *tmp = ElementAt2D((Allocation*)a.p, RS_TYPE_UNSIGNED_8, 0, x, y); 81144bef6fba6244292b751387f3d6c31cca96c28adChris Wailes if (tmp != nullptr) { 812d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams memcpy(tmp, ptr, e->getSizeBytes()); 813d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams } 814d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams} 8151aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_SetElementAt3D(android::renderscript::rs_allocation a, const void *ptr, uint32_t x, uint32_t y, uint32_t z) { 8161aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray const Type *t = ((Allocation*)a.p)->getType(); 817d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams const Element *e = t->getElement(); 8181aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray void *tmp = ElementAt3D((Allocation*)a.p, RS_TYPE_UNSIGNED_8, 0, x, y, z); 81944bef6fba6244292b751387f3d6c31cca96c28adChris Wailes if (tmp != nullptr) { 820d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams memcpy(tmp, ptr, e->getSizeBytes()); 821d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams } 822d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams} 823d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 824dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarstatic inline 825dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarandroid::renderscript::rs_allocation castToARSAlloc(::rs_allocation a) { 826dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar android::renderscript::rs_allocation cast; 827dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar cast.p = (const Allocation *) a.p; 828dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar return cast; 829dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar} 830dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar 831dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarconst void *rsGetElementAt1D(::rs_allocation a, uint32_t x) { 832dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar return SC_GetElementAt1D(castToARSAlloc(a), x); 833dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar} 834dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar 835dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarconst void *rsGetElementAt2D(::rs_allocation a, uint32_t x, uint32_t y) { 836dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar return SC_GetElementAt2D(castToARSAlloc(a), x, y); 837dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar} 838dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar 839dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarconst void *rsGetElementAt3D(::rs_allocation a, uint32_t x, uint32_t y, uint32_t z) { 840dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar return SC_GetElementAt3D(castToARSAlloc(a), x, y, z); 841dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar} 842dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar 843dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarvoid rsSetElementAt1D(::rs_allocation a, const void *ptr, uint32_t x) { 844dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar SC_SetElementAt1D(castToARSAlloc(a), ptr, x); 845dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar} 846dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar 847dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarvoid rsSetElementAt2D(::rs_allocation a, const void *ptr, uint32_t x, uint32_t y) { 848dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar SC_SetElementAt2D(castToARSAlloc(a), ptr, x, y); 849dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar} 850dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar 851dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarvoid rsSetElementAt1D(::rs_allocation a, const void *ptr, uint32_t x, uint32_t y, uint32_t z) { 852dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar SC_SetElementAt3D(castToARSAlloc(a), ptr, x, y, z); 853dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar} 854dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar 855dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar 8565261a5ea546ff358edd5aac7602fc4132434f481Jason Sams#define ELEMENT_AT(T, DT, VS) \ 8571aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray static void SC_SetElementAt1_##T(android::renderscript::rs_allocation a, const T *val, uint32_t x) { \ 85844bef6fba6244292b751387f3d6c31cca96c28adChris Wailes void *r = ElementAt1D((Allocation*)a.p, DT, VS, x); \ 85944bef6fba6244292b751387f3d6c31cca96c28adChris Wailes if (r != nullptr) ((T *)r)[0] = *val; \ 8605261a5ea546ff358edd5aac7602fc4132434f481Jason Sams else ALOGE("Error from %s", __PRETTY_FUNCTION__); \ 8615261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } \ 8621aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray static void SC_SetElementAt2_##T(android::renderscript::rs_allocation a, const T * val, uint32_t x, uint32_t y) { \ 86344bef6fba6244292b751387f3d6c31cca96c28adChris Wailes void *r = ElementAt2D((Allocation*)a.p, DT, VS, x, y); \ 86444bef6fba6244292b751387f3d6c31cca96c28adChris Wailes if (r != nullptr) ((T *)r)[0] = *val; \ 8655261a5ea546ff358edd5aac7602fc4132434f481Jason Sams else ALOGE("Error from %s", __PRETTY_FUNCTION__); \ 8665261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } \ 8671aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray static void SC_SetElementAt3_##T(android::renderscript::rs_allocation a, const T * val, uint32_t x, uint32_t y, uint32_t z) { \ 86844bef6fba6244292b751387f3d6c31cca96c28adChris Wailes void *r = ElementAt3D((Allocation*)a.p, DT, VS, x, y, z); \ 86944bef6fba6244292b751387f3d6c31cca96c28adChris Wailes if (r != nullptr) ((T *)r)[0] = *val; \ 8705261a5ea546ff358edd5aac7602fc4132434f481Jason Sams else ALOGE("Error from %s", __PRETTY_FUNCTION__); \ 8715261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } \ 8721aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray static void SC_GetElementAt1_##T(android::renderscript::rs_allocation a, T *val, uint32_t x) { \ 87344bef6fba6244292b751387f3d6c31cca96c28adChris Wailes void *r = ElementAt1D((Allocation*)a.p, DT, VS, x); \ 87444bef6fba6244292b751387f3d6c31cca96c28adChris Wailes if (r != nullptr) *val = ((T *)r)[0]; \ 87544bef6fba6244292b751387f3d6c31cca96c28adChris Wailes else ALOGE("Error from %s", __PRETTY_FUNCTION__); \ 8765261a5ea546ff358edd5aac7602fc4132434f481Jason Sams } \ 8771aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray static void SC_GetElementAt2_##T(android::renderscript::rs_allocation a, T *val, uint32_t x, uint32_t y) { \ 87844bef6fba6244292b751387f3d6c31cca96c28adChris Wailes void *r = ElementAt2D((Allocation*)a.p, DT, VS, x, y); \ 87944bef6fba6244292b751387f3d6c31cca96c28adChris Wailes if (r != nullptr) *val = ((T *)r)[0]; \ 88044bef6fba6244292b751387f3d6c31cca96c28adChris Wailes else ALOGE("Error from %s", __PRETTY_FUNCTION__); \ 88144bef6fba6244292b751387f3d6c31cca96c28adChris Wailes } \ 8821aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray static void SC_GetElementAt3_##T(android::renderscript::rs_allocation a, T *val, uint32_t x, uint32_t y, uint32_t z) { \ 88344bef6fba6244292b751387f3d6c31cca96c28adChris Wailes void *r = ElementAt3D((Allocation*)a.p, DT, VS, x, y, z); \ 88444bef6fba6244292b751387f3d6c31cca96c28adChris Wailes if (r != nullptr) *val = ((T *)r)[0]; \ 88544bef6fba6244292b751387f3d6c31cca96c28adChris Wailes else ALOGE("Error from %s", __PRETTY_FUNCTION__); \ 886dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar } \ 887dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar void rsSetElementAt_##T(::rs_allocation a, const T *val, uint32_t x) { \ 888dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar SC_SetElementAt1_##T(castToARSAlloc(a), val, x); \ 889dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar } \ 890dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar void rsSetElementAt2_##T(::rs_allocation a, const T *val, uint32_t x, uint32_t y) { \ 891dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar SC_SetElementAt2_##T(castToARSAlloc(a), val, x, y); \ 892dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar } \ 893dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar void rsSetElementAt_##T(::rs_allocation a, const T *val, uint32_t x, uint32_t y, uint32_t z) { \ 894dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar SC_SetElementAt3_##T(castToARSAlloc(a), val, x, y, z); \ 895dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar } \ 8965261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 8975261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(char, RS_TYPE_SIGNED_8, 1) 8985261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(char2, RS_TYPE_SIGNED_8, 2) 8995261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(char3, RS_TYPE_SIGNED_8, 3) 9005261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(char4, RS_TYPE_SIGNED_8, 4) 9015261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uchar, RS_TYPE_UNSIGNED_8, 1) 9025261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uchar2, RS_TYPE_UNSIGNED_8, 2) 9035261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uchar3, RS_TYPE_UNSIGNED_8, 3) 9045261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uchar4, RS_TYPE_UNSIGNED_8, 4) 9055261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(short, RS_TYPE_SIGNED_16, 1) 9065261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(short2, RS_TYPE_SIGNED_16, 2) 9075261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(short3, RS_TYPE_SIGNED_16, 3) 9085261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(short4, RS_TYPE_SIGNED_16, 4) 9095261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ushort, RS_TYPE_UNSIGNED_16, 1) 9105261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ushort2, RS_TYPE_UNSIGNED_16, 2) 9115261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ushort3, RS_TYPE_UNSIGNED_16, 3) 9125261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ushort4, RS_TYPE_UNSIGNED_16, 4) 9135261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(int, RS_TYPE_SIGNED_32, 1) 9145261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(int2, RS_TYPE_SIGNED_32, 2) 9155261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(int3, RS_TYPE_SIGNED_32, 3) 9165261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(int4, RS_TYPE_SIGNED_32, 4) 9175261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uint, RS_TYPE_UNSIGNED_32, 1) 9185261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uint2, RS_TYPE_UNSIGNED_32, 2) 9195261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uint3, RS_TYPE_UNSIGNED_32, 3) 9205261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uint4, RS_TYPE_UNSIGNED_32, 4) 9215261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(long, RS_TYPE_SIGNED_64, 1) 9225261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(long2, RS_TYPE_SIGNED_64, 2) 9235261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(long3, RS_TYPE_SIGNED_64, 3) 9245261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(long4, RS_TYPE_SIGNED_64, 4) 9255261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ulong, RS_TYPE_UNSIGNED_64, 1) 9265261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ulong2, RS_TYPE_UNSIGNED_64, 2) 9275261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ulong3, RS_TYPE_UNSIGNED_64, 3) 9285261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ulong4, RS_TYPE_UNSIGNED_64, 4) 9295261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(float, RS_TYPE_FLOAT_32, 1) 9305261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(float2, RS_TYPE_FLOAT_32, 2) 9315261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(float3, RS_TYPE_FLOAT_32, 3) 9325261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(float4, RS_TYPE_FLOAT_32, 4) 9335261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(double, RS_TYPE_FLOAT_64, 1) 9345261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(double2, RS_TYPE_FLOAT_64, 2) 9355261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(double3, RS_TYPE_FLOAT_64, 3) 9365261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(double4, RS_TYPE_FLOAT_64, 4) 9375261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 9385261a5ea546ff358edd5aac7602fc4132434f481Jason Sams#undef ELEMENT_AT 93987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 94087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 94187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// Stub implementation 94287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams////////////////////////////////////////////////////////////////////////////// 94387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 94487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// llvm name mangling ref 94587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// <builtin-type> ::= v # void 94687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= b # bool 94787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= c # char 94887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= a # signed char 94987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= h # unsigned char 95087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= s # short 95187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= t # unsigned short 95287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= i # int 95387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= j # unsigned int 95487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= l # long 95587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= m # unsigned long 95687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= x # long long, __int64 95787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= y # unsigned long long, __int64 95887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= f # float 95987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// ::= d # double 96087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 961709a0978ae141198018ca9769f8d96292a8928e6Jason Samsstatic RsdCpuReference::CpuSymbol gSyms[] = { 9625261a5ea546ff358edd5aac7602fc4132434f481Jason Sams // Debug runtime 963d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z14rsGetElementAt13rs_allocationj", (void *)&SC_GetElementAt1D, true }, 964d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z14rsGetElementAt13rs_allocationjj", (void *)&SC_GetElementAt2D, true }, 965d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z14rsGetElementAt13rs_allocationjjj", (void *)&SC_GetElementAt3D, true }, 966d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z14rsSetElementAt13rs_allocationPKvj", (void *)&SC_SetElementAt1D, true }, 967d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z14rsSetElementAt13rs_allocationPKvjj", (void *)&SC_SetElementAt2D, true }, 968d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z14rsSetElementAt13rs_allocationPKvjjj", (void *)&SC_SetElementAt3D, true }, 969d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 970d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 971d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uchar13rs_allocationPhj", (void *)&SC_GetElementAt1_uchar, true }, 972d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_uchar213rs_allocationPDv2_hj", (void *)&SC_GetElementAt1_uchar2, true }, 973d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_uchar313rs_allocationPDv3_hj", (void *)&SC_GetElementAt1_uchar3, true }, 974d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_uchar413rs_allocationPDv4_hj", (void *)&SC_GetElementAt1_uchar4, true }, 975d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uchar13rs_allocationPhjj", (void *)&SC_GetElementAt2_uchar, true }, 976d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_uchar213rs_allocationPDv2_hjj", (void *)&SC_GetElementAt2_uchar2, true }, 977d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_uchar313rs_allocationPDv3_hjj", (void *)&SC_GetElementAt2_uchar3, true }, 978d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_uchar413rs_allocationPDv4_hjj", (void *)&SC_GetElementAt2_uchar4, true }, 979d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uchar13rs_allocationPhjjj", (void *)&SC_GetElementAt3_uchar, true }, 980d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_uchar213rs_allocationPDv2_hjjj", (void *)&SC_GetElementAt3_uchar2, true }, 981d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_uchar313rs_allocationPDv3_hjjj", (void *)&SC_GetElementAt3_uchar3, true }, 982d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_uchar413rs_allocationPDv4_hjjj", (void *)&SC_GetElementAt3_uchar4, true }, 983d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 984d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_char13rs_allocationPcj", (void *)&SC_GetElementAt1_char, true }, 985d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_char213rs_allocationPDv2_cj", (void *)&SC_GetElementAt1_char2, true }, 986d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_char313rs_allocationPDv3_cj", (void *)&SC_GetElementAt1_char3, true }, 987d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_char413rs_allocationPDv4_cj", (void *)&SC_GetElementAt1_char4, true }, 988d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_char13rs_allocationPcjj", (void *)&SC_GetElementAt2_char, true }, 989d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_char213rs_allocationPDv2_cjj", (void *)&SC_GetElementAt2_char2, true }, 990d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_char313rs_allocationPDv3_cjj", (void *)&SC_GetElementAt2_char3, true }, 991d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_char413rs_allocationPDv4_cjj", (void *)&SC_GetElementAt2_char4, true }, 992d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_char13rs_allocationPcjjj", (void *)&SC_GetElementAt3_char, true }, 993d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_char213rs_allocationPDv2_cjjj", (void *)&SC_GetElementAt3_char2, true }, 994d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_char313rs_allocationPDv3_cjjj", (void *)&SC_GetElementAt3_char3, true }, 995d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_char413rs_allocationPDv4_cjjj", (void *)&SC_GetElementAt3_char4, true }, 996d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 997d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ushort13rs_allocationPtj", (void *)&SC_GetElementAt1_ushort, true }, 998d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_ushort213rs_allocationPDv2_tj", (void *)&SC_GetElementAt1_ushort2, true }, 999d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_ushort313rs_allocationPDv3_tj", (void *)&SC_GetElementAt1_ushort3, true }, 1000d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_ushort413rs_allocationPDv4_tj", (void *)&SC_GetElementAt1_ushort4, true }, 1001d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ushort13rs_allocationPtjj", (void *)&SC_GetElementAt2_ushort, true }, 1002d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_ushort213rs_allocationPDv2_tjj", (void *)&SC_GetElementAt2_ushort2, true }, 1003d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_ushort313rs_allocationPDv3_tjj", (void *)&SC_GetElementAt2_ushort3, true }, 1004d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_ushort413rs_allocationPDv4_tjj", (void *)&SC_GetElementAt2_ushort4, true }, 1005d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ushort13rs_allocationPtjjj", (void *)&SC_GetElementAt3_ushort, true }, 1006d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_ushort213rs_allocationPDv2_tjjj", (void *)&SC_GetElementAt3_ushort2, true }, 1007d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_ushort313rs_allocationPDv3_tjjj", (void *)&SC_GetElementAt3_ushort3, true }, 1008d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_ushort413rs_allocationPDv4_tjjj", (void *)&SC_GetElementAt3_ushort4, true }, 1009d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1010d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_short13rs_allocationPsj", (void *)&SC_GetElementAt1_short, true }, 1011d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_short213rs_allocationPDv2_sj", (void *)&SC_GetElementAt1_short2, true }, 1012d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_short313rs_allocationPDv3_sj", (void *)&SC_GetElementAt1_short3, true }, 1013d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_short413rs_allocationPDv4_sj", (void *)&SC_GetElementAt1_short4, true }, 1014d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_short13rs_allocationPsjj", (void *)&SC_GetElementAt2_short, true }, 1015d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_short213rs_allocationPDv2_sjj", (void *)&SC_GetElementAt2_short2, true }, 1016d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_short313rs_allocationPDv3_sjj", (void *)&SC_GetElementAt2_short3, true }, 1017d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_short413rs_allocationPDv4_sjj", (void *)&SC_GetElementAt2_short4, true }, 1018d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_short13rs_allocationPsjjj", (void *)&SC_GetElementAt3_short, true }, 1019d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_short213rs_allocationPDv2_sjjj", (void *)&SC_GetElementAt3_short2, true }, 1020d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_short313rs_allocationPDv3_sjjj", (void *)&SC_GetElementAt3_short3, true }, 1021d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_short413rs_allocationPDv4_sjjj", (void *)&SC_GetElementAt3_short4, true }, 1022d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1023d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_uint13rs_allocationPjj", (void *)&SC_GetElementAt1_uint, true }, 1024d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uint213rs_allocationPDv2_jj", (void *)&SC_GetElementAt1_uint2, true }, 1025d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uint313rs_allocationPDv3_jj", (void *)&SC_GetElementAt1_uint3, true }, 1026d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uint413rs_allocationPDv4_jj", (void *)&SC_GetElementAt1_uint4, true }, 1027d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_uint13rs_allocationPjjj", (void *)&SC_GetElementAt2_uint, true }, 1028d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uint213rs_allocationPDv2_jjj", (void *)&SC_GetElementAt2_uint2, true }, 1029d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uint313rs_allocationPDv3_jjj", (void *)&SC_GetElementAt2_uint3, true }, 1030d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uint413rs_allocationPDv4_jjj", (void *)&SC_GetElementAt2_uint4, true }, 1031d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_uint13rs_allocationPjjjj", (void *)&SC_GetElementAt3_uint, true }, 1032d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uint213rs_allocationPDv2_jjjj", (void *)&SC_GetElementAt3_uint2, true }, 1033d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uint313rs_allocationPDv3_jjjj", (void *)&SC_GetElementAt3_uint3, true }, 1034d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_uint413rs_allocationPDv4_jjjj", (void *)&SC_GetElementAt3_uint4, true }, 1035d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1036d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z18rsGetElementAt_int13rs_allocationPij", (void *)&SC_GetElementAt1_int, true }, 1037d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_int213rs_allocationPDv2_ij", (void *)&SC_GetElementAt1_int2, true }, 1038d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_int313rs_allocationPDv3_ij", (void *)&SC_GetElementAt1_int3, true }, 1039d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_int413rs_allocationPDv4_ij", (void *)&SC_GetElementAt1_int4, true }, 1040d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z18rsGetElementAt_int13rs_allocationPijj", (void *)&SC_GetElementAt2_int, true }, 1041d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_int213rs_allocationPDv2_ijj", (void *)&SC_GetElementAt2_int2, true }, 1042d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_int313rs_allocationPDv3_ijj", (void *)&SC_GetElementAt2_int3, true }, 1043d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_int413rs_allocationPDv4_ijj", (void *)&SC_GetElementAt2_int4, true }, 1044d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z18rsGetElementAt_int13rs_allocationPijjj", (void *)&SC_GetElementAt3_int, true }, 1045d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_int213rs_allocationPDv2_ijjj", (void *)&SC_GetElementAt3_int2, true }, 1046d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_int313rs_allocationPDv3_ijjj", (void *)&SC_GetElementAt3_int3, true }, 1047d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_int413rs_allocationPDv4_ijjj", (void *)&SC_GetElementAt3_int4, true }, 1048d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1049d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_ulong13rs_allocationPmj", (void *)&SC_GetElementAt1_ulong, true }, 1050d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ulong213rs_allocationPDv2_mj", (void *)&SC_GetElementAt1_ulong2, true }, 1051d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ulong313rs_allocationPDv3_mj", (void *)&SC_GetElementAt1_ulong3, true }, 1052d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ulong413rs_allocationPDv4_mj", (void *)&SC_GetElementAt1_ulong4, true }, 1053d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_ulong13rs_allocationPmjj", (void *)&SC_GetElementAt2_ulong, true }, 1054d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ulong213rs_allocationPDv2_mjj", (void *)&SC_GetElementAt2_ulong2, true }, 1055d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ulong313rs_allocationPDv3_mjj", (void *)&SC_GetElementAt2_ulong3, true }, 1056d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ulong413rs_allocationPDv4_mjj", (void *)&SC_GetElementAt2_ulong4, true }, 1057d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_ulong13rs_allocationPmjjj", (void *)&SC_GetElementAt3_ulong, true }, 1058d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ulong213rs_allocationPDv2_mjjj", (void *)&SC_GetElementAt3_ulong2, true }, 1059d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ulong313rs_allocationPDv3_mjjj", (void *)&SC_GetElementAt3_ulong3, true }, 1060d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_ulong413rs_allocationPDv4_mjjj", (void *)&SC_GetElementAt3_ulong4, true }, 1061d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1062d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_long13rs_allocationPlj", (void *)&SC_GetElementAt1_long, true }, 1063d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_long213rs_allocationPDv2_lj", (void *)&SC_GetElementAt1_long2, true }, 1064d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_long313rs_allocationPDv3_lj", (void *)&SC_GetElementAt1_long3, true }, 1065d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_long413rs_allocationPDv4_lj", (void *)&SC_GetElementAt1_long4, true }, 1066d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_long13rs_allocationPljj", (void *)&SC_GetElementAt2_long, true }, 1067d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_long213rs_allocationPDv2_ljj", (void *)&SC_GetElementAt2_long2, true }, 1068d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_long313rs_allocationPDv3_ljj", (void *)&SC_GetElementAt2_long3, true }, 1069d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_long413rs_allocationPDv4_ljj", (void *)&SC_GetElementAt2_long4, true }, 1070d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsGetElementAt_long13rs_allocationPljjj", (void *)&SC_GetElementAt3_long, true }, 1071d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_long213rs_allocationPDv2_ljjj", (void *)&SC_GetElementAt3_long2, true }, 1072d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_long313rs_allocationPDv3_ljjj", (void *)&SC_GetElementAt3_long3, true }, 1073d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_long413rs_allocationPDv4_ljjj", (void *)&SC_GetElementAt3_long4, true }, 1074d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1075d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_float13rs_allocationPfj", (void *)&SC_GetElementAt1_float, true }, 1076d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_float213rs_allocationPDv2_fj", (void *)&SC_GetElementAt1_float2, true }, 1077d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_float313rs_allocationPDv3_fj", (void *)&SC_GetElementAt1_float3, true }, 1078d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_float413rs_allocationPDv4_fj", (void *)&SC_GetElementAt1_float4, true }, 1079d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_float13rs_allocationPfjj", (void *)&SC_GetElementAt2_float, true }, 1080d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_float213rs_allocationPDv2_fjj", (void *)&SC_GetElementAt2_float2, true }, 1081d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_float313rs_allocationPDv3_fjj", (void *)&SC_GetElementAt2_float3, true }, 1082d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_float413rs_allocationPDv4_fjj", (void *)&SC_GetElementAt2_float4, true }, 1083d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsGetElementAt_float13rs_allocationPfjjj", (void *)&SC_GetElementAt3_float, true }, 1084d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_float213rs_allocationPDv2_fjjj", (void *)&SC_GetElementAt3_float2, true }, 1085d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_float313rs_allocationPDv3_fjjj", (void *)&SC_GetElementAt3_float3, true }, 1086d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_float413rs_allocationPDv4_fjjj", (void *)&SC_GetElementAt3_float4, true }, 1087d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1088d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_double13rs_allocationPdj", (void *)&SC_GetElementAt1_double, true }, 1089d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_double213rs_allocationPDv2_dj", (void *)&SC_GetElementAt1_double2, true }, 1090d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_double313rs_allocationPDv3_dj", (void *)&SC_GetElementAt1_double3, true }, 1091d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_double413rs_allocationPDv4_dj", (void *)&SC_GetElementAt1_double4, true }, 1092d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_double13rs_allocationPdjj", (void *)&SC_GetElementAt2_double, true }, 1093d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_double213rs_allocationPDv2_djj", (void *)&SC_GetElementAt2_double2, true }, 1094d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_double313rs_allocationPDv3_djj", (void *)&SC_GetElementAt2_double3, true }, 1095d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_double413rs_allocationPDv4_djj", (void *)&SC_GetElementAt2_double4, true }, 1096d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsGetElementAt_double13rs_allocationPdjjj", (void *)&SC_GetElementAt3_double, true }, 1097d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_double213rs_allocationPDv2_djjj", (void *)&SC_GetElementAt3_double2, true }, 1098d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_double313rs_allocationPDv3_djjj", (void *)&SC_GetElementAt3_double3, true }, 1099d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsGetElementAt_double413rs_allocationPDv4_djjj", (void *)&SC_GetElementAt3_double4, true }, 1100d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1101d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1102d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1103d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uchar13rs_allocationPKhj", (void *)&SC_SetElementAt1_uchar, true }, 1104d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_uchar213rs_allocationPKDv2_hj", (void *)&SC_SetElementAt1_uchar2, true }, 1105d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_uchar313rs_allocationPKDv3_hj", (void *)&SC_SetElementAt1_uchar3, true }, 1106d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_uchar413rs_allocationPKDv4_hj", (void *)&SC_SetElementAt1_uchar4, true }, 1107d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uchar13rs_allocationPKhjj", (void *)&SC_SetElementAt2_uchar, true }, 1108d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_uchar213rs_allocationPKDv2_hjj", (void *)&SC_SetElementAt2_uchar2, true }, 1109d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_uchar313rs_allocationPKDv3_hjj", (void *)&SC_SetElementAt2_uchar3, true }, 1110d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_uchar413rs_allocationPKDv4_hjj", (void *)&SC_SetElementAt2_uchar4, true }, 1111d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uchar13rs_allocationPKhjjj", (void *)&SC_SetElementAt3_uchar, true }, 1112d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_uchar213rs_allocationPKDv2_hjjj", (void *)&SC_SetElementAt3_uchar2, true }, 1113d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_uchar313rs_allocationPKDv3_hjjj", (void *)&SC_SetElementAt3_uchar3, true }, 1114d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_uchar413rs_allocationPKDv4_hjjj", (void *)&SC_SetElementAt3_uchar4, true }, 1115d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1116d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_char13rs_allocationPKcj", (void *)&SC_SetElementAt1_char, true }, 1117d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_char213rs_allocationPKDv2_cj", (void *)&SC_SetElementAt1_char2, true }, 1118d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_char313rs_allocationPKDv3_cj", (void *)&SC_SetElementAt1_char3, true }, 1119d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_char413rs_allocationPKDv4_cj", (void *)&SC_SetElementAt1_char4, true }, 1120d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_char13rs_allocationPKcjj", (void *)&SC_SetElementAt2_char, true }, 1121d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_char213rs_allocationPKDv2_cjj", (void *)&SC_SetElementAt2_char2, true }, 1122d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_char313rs_allocationPKDv3_cjj", (void *)&SC_SetElementAt2_char3, true }, 1123d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_char413rs_allocationPKDv4_cjj", (void *)&SC_SetElementAt2_char4, true }, 1124d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_char13rs_allocationPKcjjj", (void *)&SC_SetElementAt3_char, true }, 1125d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_char213rs_allocationPKDv2_cjjj", (void *)&SC_SetElementAt3_char2, true }, 1126d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_char313rs_allocationPKDv3_cjjj", (void *)&SC_SetElementAt3_char3, true }, 1127d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_char413rs_allocationPKDv4_cjjj", (void *)&SC_SetElementAt3_char4, true }, 1128d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 112940db7a2a344bf56c82c62f481a57f9ff59f93c91Stephen Hines { "_Z21rsSetElementAt_ushort13rs_allocationPKtj", (void *)&SC_SetElementAt1_ushort, true }, 1130d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_ushort213rs_allocationPKDv2_tj", (void *)&SC_SetElementAt1_ushort2, true }, 1131d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_ushort313rs_allocationPKDv3_tj", (void *)&SC_SetElementAt1_ushort3, true }, 1132d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_ushort413rs_allocationPKDv4_tj", (void *)&SC_SetElementAt1_ushort4, true }, 1133d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ushort13rs_allocationPKtjj", (void *)&SC_SetElementAt2_ushort, true }, 1134d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_ushort213rs_allocationPKDv2_tjj", (void *)&SC_SetElementAt2_ushort2, true }, 1135d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_ushort313rs_allocationPKDv3_tjj", (void *)&SC_SetElementAt2_ushort3, true }, 1136d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_ushort413rs_allocationPKDv4_tjj", (void *)&SC_SetElementAt2_ushort4, true }, 1137d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ushort13rs_allocationPKtjjj", (void *)&SC_SetElementAt3_ushort, true }, 1138d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_ushort213rs_allocationPKDv2_tjjj", (void *)&SC_SetElementAt3_ushort2, true }, 1139d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_ushort313rs_allocationPKDv3_tjjj", (void *)&SC_SetElementAt3_ushort3, true }, 1140d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_ushort413rs_allocationPKDv4_tjjj", (void *)&SC_SetElementAt3_ushort4, true }, 1141d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1142d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_short13rs_allocationPKsj", (void *)&SC_SetElementAt1_short, true }, 1143d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_short213rs_allocationPKDv2_sj", (void *)&SC_SetElementAt1_short2, true }, 1144d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_short313rs_allocationPKDv3_sj", (void *)&SC_SetElementAt1_short3, true }, 1145d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_short413rs_allocationPKDv4_sj", (void *)&SC_SetElementAt1_short4, true }, 1146d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_short13rs_allocationPKsjj", (void *)&SC_SetElementAt2_short, true }, 1147d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_short213rs_allocationPKDv2_sjj", (void *)&SC_SetElementAt2_short2, true }, 1148d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_short313rs_allocationPKDv3_sjj", (void *)&SC_SetElementAt2_short3, true }, 1149d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_short413rs_allocationPKDv4_sjj", (void *)&SC_SetElementAt2_short4, true }, 1150d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_short13rs_allocationPKsjjj", (void *)&SC_SetElementAt3_short, true }, 1151d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_short213rs_allocationPKDv2_sjjj", (void *)&SC_SetElementAt3_short2, true }, 1152d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_short313rs_allocationPKDv3_sjjj", (void *)&SC_SetElementAt3_short3, true }, 1153d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_short413rs_allocationPKDv4_sjjj", (void *)&SC_SetElementAt3_short4, true }, 1154d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1155d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_uint13rs_allocationPKjj", (void *)&SC_SetElementAt1_uint, true }, 1156d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uint213rs_allocationPKDv2_jj", (void *)&SC_SetElementAt1_uint2, true }, 1157d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uint313rs_allocationPKDv3_jj", (void *)&SC_SetElementAt1_uint3, true }, 1158d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uint413rs_allocationPKDv4_jj", (void *)&SC_SetElementAt1_uint4, true }, 1159d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_uint13rs_allocationPKjjj", (void *)&SC_SetElementAt2_uint, true }, 1160d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uint213rs_allocationPKDv2_jjj", (void *)&SC_SetElementAt2_uint2, true }, 1161d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uint313rs_allocationPKDv3_jjj", (void *)&SC_SetElementAt2_uint3, true }, 1162d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uint413rs_allocationPKDv4_jjj", (void *)&SC_SetElementAt2_uint4, true }, 1163d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_uint13rs_allocationPKjjjj", (void *)&SC_SetElementAt3_uint, true }, 1164d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uint213rs_allocationPKDv2_jjjj", (void *)&SC_SetElementAt3_uint2, true }, 1165d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uint313rs_allocationPKDv3_jjjj", (void *)&SC_SetElementAt3_uint3, true }, 1166d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_uint413rs_allocationPKDv4_jjjj", (void *)&SC_SetElementAt3_uint4, true }, 1167d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1168cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines { "_Z18rsSetElementAt_int13rs_allocationPKij", (void *)&SC_SetElementAt1_int, true }, 1169d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_int213rs_allocationPKDv2_ij", (void *)&SC_SetElementAt1_int2, true }, 1170d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_int313rs_allocationPKDv3_ij", (void *)&SC_SetElementAt1_int3, true }, 1171d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_int413rs_allocationPKDv4_ij", (void *)&SC_SetElementAt1_int4, true }, 1172d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z18rsSetElementAt_int13rs_allocationPKijj", (void *)&SC_SetElementAt2_int, true }, 1173d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_int213rs_allocationPKDv2_ijj", (void *)&SC_SetElementAt2_int2, true }, 1174d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_int313rs_allocationPKDv3_ijj", (void *)&SC_SetElementAt2_int3, true }, 1175d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_int413rs_allocationPKDv4_ijj", (void *)&SC_SetElementAt2_int4, true }, 1176d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z18rsSetElementAt_int13rs_allocationPKijjj", (void *)&SC_SetElementAt3_int, true }, 1177d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_int213rs_allocationPKDv2_ijjj", (void *)&SC_SetElementAt3_int2, true }, 1178d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_int313rs_allocationPKDv3_ijjj", (void *)&SC_SetElementAt3_int3, true }, 1179d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_int413rs_allocationPKDv4_ijjj", (void *)&SC_SetElementAt3_int4, true }, 1180d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1181cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_ulong13rs_allocationPKmj", (void *)&SC_SetElementAt1_ulong, true }, 1182d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ulong213rs_allocationPKDv2_mj", (void *)&SC_SetElementAt1_ulong2, true }, 1183d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ulong313rs_allocationPKDv3_mj", (void *)&SC_SetElementAt1_ulong3, true }, 1184d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ulong413rs_allocationPKDv4_mj", (void *)&SC_SetElementAt1_ulong4, true }, 1185d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_ulong13rs_allocationPKmjj", (void *)&SC_SetElementAt2_ulong, true }, 1186d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ulong213rs_allocationPKDv2_mjj", (void *)&SC_SetElementAt2_ulong2, true }, 1187d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ulong313rs_allocationPKDv3_mjj", (void *)&SC_SetElementAt2_ulong3, true }, 1188d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ulong413rs_allocationPKDv4_mjj", (void *)&SC_SetElementAt2_ulong4, true }, 1189d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_ulong13rs_allocationPKmjjj", (void *)&SC_SetElementAt3_ulong, true }, 1190d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ulong213rs_allocationPKDv2_mjjj", (void *)&SC_SetElementAt3_ulong2, true }, 1191d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ulong313rs_allocationPKDv3_mjjj", (void *)&SC_SetElementAt3_ulong3, true }, 1192d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_ulong413rs_allocationPKDv4_mjjj", (void *)&SC_SetElementAt3_ulong4, true }, 1193d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1194cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray // Pre-21 compatibility path 1195cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_ulong13rs_allocationPKyj", (void *)&SC_SetElementAt1_ulong, true }, 1196cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z21rsSetElementAt_ulong213rs_allocationPKDv2_yj", (void *)&SC_SetElementAt1_ulong2, true }, 1197cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z21rsSetElementAt_ulong313rs_allocationPKDv3_yj", (void *)&SC_SetElementAt1_ulong3, true }, 1198cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z21rsSetElementAt_ulong413rs_allocationPKDv4_yj", (void *)&SC_SetElementAt1_ulong4, true }, 1199cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_ulong13rs_allocationPKyjj", (void *)&SC_SetElementAt2_ulong, true }, 1200cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z21rsSetElementAt_ulong213rs_allocationPKDv2_yjj", (void *)&SC_SetElementAt2_ulong2, true }, 1201cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z21rsSetElementAt_ulong313rs_allocationPKDv3_yjj", (void *)&SC_SetElementAt2_ulong3, true }, 1202cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z21rsSetElementAt_ulong413rs_allocationPKDv4_yjj", (void *)&SC_SetElementAt2_ulong4, true }, 1203cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_ulong13rs_allocationPKyjjj", (void *)&SC_SetElementAt3_ulong, true }, 1204cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z21rsSetElementAt_ulong213rs_allocationPKDv2_yjjj", (void *)&SC_SetElementAt3_ulong2, true }, 1205cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z21rsSetElementAt_ulong313rs_allocationPKDv3_yjjj", (void *)&SC_SetElementAt3_ulong3, true }, 1206cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z21rsSetElementAt_ulong413rs_allocationPKDv4_yjjj", (void *)&SC_SetElementAt3_ulong4, true }, 1207cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray 1208d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_long13rs_allocationPKlj", (void *)&SC_SetElementAt1_long, true }, 1209d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_long213rs_allocationPKDv2_lj", (void *)&SC_SetElementAt1_long2, true }, 1210d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_long313rs_allocationPKDv3_lj", (void *)&SC_SetElementAt1_long3, true }, 1211d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_long413rs_allocationPKDv4_lj", (void *)&SC_SetElementAt1_long4, true }, 1212d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_long13rs_allocationPKljj", (void *)&SC_SetElementAt2_long, true }, 1213d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_long213rs_allocationPKDv2_ljj", (void *)&SC_SetElementAt2_long2, true }, 1214d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_long313rs_allocationPKDv3_ljj", (void *)&SC_SetElementAt2_long3, true }, 1215d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_long413rs_allocationPKDv4_ljj", (void *)&SC_SetElementAt2_long4, true }, 1216d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z19rsSetElementAt_long13rs_allocationPKljjj", (void *)&SC_SetElementAt3_long, true }, 1217d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_long213rs_allocationPKDv2_ljjj", (void *)&SC_SetElementAt3_long2, true }, 1218d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_long313rs_allocationPKDv3_ljjj", (void *)&SC_SetElementAt3_long3, true }, 1219d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_long413rs_allocationPKDv4_ljjj", (void *)&SC_SetElementAt3_long4, true }, 1220d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 1221cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray // Pre-21 compatibility path 1222cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z19rsSetElementAt_long13rs_allocationPKxj", (void *)&SC_SetElementAt1_long, true }, 1223cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_long213rs_allocationPKDv2_xj", (void *)&SC_SetElementAt1_long2, true }, 1224cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_long313rs_allocationPKDv3_xj", (void *)&SC_SetElementAt1_long3, true }, 1225cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_long413rs_allocationPKDv4_xj", (void *)&SC_SetElementAt1_long4, true }, 1226cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z19rsSetElementAt_long13rs_allocationPKxjj", (void *)&SC_SetElementAt2_long, true }, 1227cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_long213rs_allocationPKDv2_xjj", (void *)&SC_SetElementAt2_long2, true }, 1228cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_long313rs_allocationPKDv3_xjj", (void *)&SC_SetElementAt2_long3, true }, 1229cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_long413rs_allocationPKDv4_xjj", (void *)&SC_SetElementAt2_long4, true }, 1230cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z19rsSetElementAt_long13rs_allocationPKxjjj", (void *)&SC_SetElementAt3_long, true }, 1231cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_long213rs_allocationPKDv2_xjjj", (void *)&SC_SetElementAt3_long2, true }, 1232cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_long313rs_allocationPKDv3_xjjj", (void *)&SC_SetElementAt3_long3, true }, 1233cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray { "_Z20rsSetElementAt_long413rs_allocationPKDv4_xjjj", (void *)&SC_SetElementAt3_long4, true }, 1234cbdb6480528fc374144df1ae9c604c9100d33268Tim Murray 123540db7a2a344bf56c82c62f481a57f9ff59f93c91Stephen Hines { "_Z20rsSetElementAt_float13rs_allocationPKfj", (void *)&SC_SetElementAt1_float, true }, 1236d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_float213rs_allocationPKDv2_fj", (void *)&SC_SetElementAt1_float2, true }, 1237d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_float313rs_allocationPKDv3_fj", (void *)&SC_SetElementAt1_float3, true }, 1238d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_float413rs_allocationPKDv4_fj", (void *)&SC_SetElementAt1_float4, true }, 1239d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_float13rs_allocationPKfjj", (void *)&SC_SetElementAt2_float, true }, 1240d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_float213rs_allocationPKDv2_fjj", (void *)&SC_SetElementAt2_float2, true }, 1241d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_float313rs_allocationPKDv3_fjj", (void *)&SC_SetElementAt2_float3, true }, 1242d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_float413rs_allocationPKDv4_fjj", (void *)&SC_SetElementAt2_float4, true }, 1243d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z20rsSetElementAt_float13rs_allocationPKfjjj", (void *)&SC_SetElementAt3_float, true }, 1244d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_float213rs_allocationPKDv2_fjjj", (void *)&SC_SetElementAt3_float2, true }, 1245d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_float313rs_allocationPKDv3_fjjj", (void *)&SC_SetElementAt3_float3, true }, 1246d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_float413rs_allocationPKDv4_fjjj", (void *)&SC_SetElementAt3_float4, true }, 1247d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams 124840db7a2a344bf56c82c62f481a57f9ff59f93c91Stephen Hines { "_Z21rsSetElementAt_double13rs_allocationPKdj", (void *)&SC_SetElementAt1_double, true }, 1249d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_double213rs_allocationPKDv2_dj", (void *)&SC_SetElementAt1_double2, true }, 1250d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_double313rs_allocationPKDv3_dj", (void *)&SC_SetElementAt1_double3, true }, 1251d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_double413rs_allocationPKDv4_dj", (void *)&SC_SetElementAt1_double4, true }, 1252d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_double13rs_allocationPKdjj", (void *)&SC_SetElementAt2_double, true }, 1253d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_double213rs_allocationPKDv2_djj", (void *)&SC_SetElementAt2_double2, true }, 1254d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_double313rs_allocationPKDv3_djj", (void *)&SC_SetElementAt2_double3, true }, 1255d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_double413rs_allocationPKDv4_djj", (void *)&SC_SetElementAt2_double4, true }, 1256d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z21rsSetElementAt_double13rs_allocationPKdjjj", (void *)&SC_SetElementAt3_double, true }, 1257d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_double213rs_allocationPKDv2_djjj", (void *)&SC_SetElementAt3_double2, true }, 1258d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_double313rs_allocationPKDv3_djjj", (void *)&SC_SetElementAt3_double3, true }, 1259d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams { "_Z22rsSetElementAt_double413rs_allocationPKDv4_djjj", (void *)&SC_SetElementAt3_double4, true }, 12605261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 12615261a5ea546ff358edd5aac7602fc4132434f481Jason Sams 126287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams // Refcounting 1263444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#ifndef __LP64__ 126487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsSetObjectP10rs_elementS_", (void *)&SC_SetObject, true }, 126587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z10rsIsObject10rs_element", (void *)&SC_IsObject, true }, 126687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 126787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsSetObjectP7rs_typeS_", (void *)&SC_SetObject, true }, 126887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z10rsIsObject7rs_type", (void *)&SC_IsObject, true }, 126987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 127087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsSetObjectP13rs_allocationS_", (void *)&SC_SetObject, true }, 127187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z10rsIsObject13rs_allocation", (void *)&SC_IsObject, true }, 127287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 127387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsSetObjectP10rs_samplerS_", (void *)&SC_SetObject, true }, 127487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z10rsIsObject10rs_sampler", (void *)&SC_IsObject, true }, 127587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 127687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsSetObjectP9rs_scriptS_", (void *)&SC_SetObject, true }, 127787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z10rsIsObject9rs_script", (void *)&SC_IsObject, true }, 1278444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#else 1279444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z11rsSetObjectP10rs_elementS_", (void *)&SC_SetObject_ByRef, true }, 1280444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z10rsIsObject10rs_element", (void *)&SC_IsObject_ByRef, true }, 1281444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen 1282444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z11rsSetObjectP7rs_typeS_", (void *)&SC_SetObject_ByRef, true }, 1283444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z10rsIsObject7rs_type", (void *)&SC_IsObject_ByRef, true }, 1284444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen 1285444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z11rsSetObjectP13rs_allocationS_", (void *)&SC_SetObject_ByRef, true }, 1286444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z10rsIsObject13rs_allocation", (void *)&SC_IsObject_ByRef, true }, 1287444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen 1288444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z11rsSetObjectP10rs_samplerS_", (void *)&SC_SetObject_ByRef, true }, 1289444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z10rsIsObject10rs_sampler", (void *)&SC_IsObject_ByRef, true }, 1290444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen 1291444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z11rsSetObjectP9rs_scriptS_", (void *)&SC_SetObject_ByRef, true }, 1292444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z10rsIsObject9rs_script", (void *)&SC_IsObject_ByRef, true }, 1293444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen#endif 1294444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z13rsClearObjectP10rs_element", (void *)&SC_ClearObject, true }, 1295444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z13rsClearObjectP7rs_type", (void *)&SC_ClearObject, true }, 1296444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z13rsClearObjectP13rs_allocation", (void *)&SC_ClearObject, true }, 1297444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z13rsClearObjectP10rs_sampler", (void *)&SC_ClearObject, true }, 1298444bd208b4f129bd8e4c0cce4cf6d709c8900891Yong Chen { "_Z13rsClearObjectP9rs_script", (void *)&SC_ClearObject, true }, 129987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 13009e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams { "_Z11rsSetObjectP7rs_pathS_", (void *)&SC_SetObject, true }, 13019e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams { "_Z13rsClearObjectP7rs_path", (void *)&SC_ClearObject, true }, 13029e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams { "_Z10rsIsObject7rs_path", (void *)&SC_IsObject, true }, 13039e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams 130487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsSetObjectP7rs_meshS_", (void *)&SC_SetObject, true }, 130587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z13rsClearObjectP7rs_mesh", (void *)&SC_ClearObject, true }, 130687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z10rsIsObject7rs_mesh", (void *)&SC_IsObject, true }, 130787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 130887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsSetObjectP19rs_program_fragmentS_", (void *)&SC_SetObject, true }, 130987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z13rsClearObjectP19rs_program_fragment", (void *)&SC_ClearObject, true }, 131087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z10rsIsObject19rs_program_fragment", (void *)&SC_IsObject, true }, 131187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 131287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsSetObjectP17rs_program_vertexS_", (void *)&SC_SetObject, true }, 131387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z13rsClearObjectP17rs_program_vertex", (void *)&SC_ClearObject, true }, 131487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z10rsIsObject17rs_program_vertex", (void *)&SC_IsObject, true }, 131587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 131687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsSetObjectP17rs_program_rasterS_", (void *)&SC_SetObject, true }, 131787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z13rsClearObjectP17rs_program_raster", (void *)&SC_ClearObject, true }, 131887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z10rsIsObject17rs_program_raster", (void *)&SC_IsObject, true }, 131987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 132087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsSetObjectP16rs_program_storeS_", (void *)&SC_SetObject, true }, 132187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z13rsClearObjectP16rs_program_store", (void *)&SC_ClearObject, true }, 132287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z10rsIsObject16rs_program_store", (void *)&SC_IsObject, true }, 132387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 132487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsSetObjectP7rs_fontS_", (void *)&SC_SetObject, true }, 132587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z13rsClearObjectP7rs_font", (void *)&SC_ClearObject, true }, 132687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z10rsIsObject7rs_font", (void *)&SC_IsObject, true }, 132787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 132887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams // Allocation ops 132987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z21rsAllocationMarkDirty13rs_allocation", (void *)&SC_AllocationSyncAll, true }, 133087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z20rsgAllocationSyncAll13rs_allocation", (void *)&SC_AllocationSyncAll, false }, 133187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z20rsgAllocationSyncAll13rs_allocationj", (void *)&SC_AllocationSyncAll2, false }, 133274a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk { "_Z20rsgAllocationSyncAll13rs_allocation24rs_allocation_usage_type", (void *)&SC_AllocationSyncAll2, false }, 13330b575de8ed0b628d84d256f5846500b0385979bdTim Murray#ifndef RS_COMPATIBILITY_LIB 133447211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray { "_Z15rsGetAllocationPKv", (void *)&SC_GetAllocation, true }, 1335b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams { "_Z18rsAllocationIoSend13rs_allocation", (void *)&SC_AllocationIoSend, false }, 1336b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams { "_Z21rsAllocationIoReceive13rs_allocation", (void *)&SC_AllocationIoReceive, false }, 13370b575de8ed0b628d84d256f5846500b0385979bdTim Murray#endif 133874a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk { "_Z23rsAllocationCopy1DRange13rs_allocationjjjS_jj", (void *)&SC_AllocationCopy1DRange, false }, 133974a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk { "_Z23rsAllocationCopy2DRange13rs_allocationjjj26rs_allocation_cubemap_facejjS_jjjS0_", (void *)&SC_AllocationCopy2DRange, false }, 134087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 134187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams // Messaging 134287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 134387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z14rsSendToClienti", (void *)&SC_ToClient, false }, 134487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z14rsSendToClientiPKvj", (void *)&SC_ToClient2, false }, 134587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z22rsSendToClientBlockingi", (void *)&SC_ToClientBlocking, false }, 134687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z22rsSendToClientBlockingiPKvj", (void *)&SC_ToClientBlocking2, false }, 13470b575de8ed0b628d84d256f5846500b0385979bdTim Murray#ifndef RS_COMPATIBILITY_LIB 134887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z22rsgBindProgramFragment19rs_program_fragment", (void *)&SC_BindProgramFragment, false }, 134987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z19rsgBindProgramStore16rs_program_store", (void *)&SC_BindProgramStore, false }, 135087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z20rsgBindProgramVertex17rs_program_vertex", (void *)&SC_BindProgramVertex, false }, 135187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z20rsgBindProgramRaster17rs_program_raster", (void *)&SC_BindProgramRaster, false }, 135287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z14rsgBindSampler19rs_program_fragmentj10rs_sampler", (void *)&SC_BindSampler, false }, 135387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z14rsgBindTexture19rs_program_fragmentj13rs_allocation", (void *)&SC_BindTexture, false }, 1354a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchouk { "_Z15rsgBindConstant19rs_program_fragmentj13rs_allocation", (void *)&SC_BindFragmentConstant, false }, 1355a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchouk { "_Z15rsgBindConstant17rs_program_vertexj13rs_allocation", (void *)&SC_BindVertexConstant, false }, 135687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 135787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z36rsgProgramVertexLoadProjectionMatrixPK12rs_matrix4x4", (void *)&SC_VpLoadProjectionMatrix, false }, 135887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z31rsgProgramVertexLoadModelMatrixPK12rs_matrix4x4", (void *)&SC_VpLoadModelMatrix, false }, 135987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z33rsgProgramVertexLoadTextureMatrixPK12rs_matrix4x4", (void *)&SC_VpLoadTextureMatrix, false }, 136087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 136187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z35rsgProgramVertexGetProjectionMatrixP12rs_matrix4x4", (void *)&SC_VpGetProjectionMatrix, false }, 136287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 136387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z31rsgProgramFragmentConstantColor19rs_program_fragmentffff", (void *)&SC_PfConstantColor, false }, 136487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 136587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsgGetWidthv", (void *)&SC_GetWidth, false }, 136687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z12rsgGetHeightv", (void *)&SC_GetHeight, false }, 136787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 136887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 136987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsgDrawRectfffff", (void *)&SC_DrawRect, false }, 137087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsgDrawQuadffffffffffff", (void *)&SC_DrawQuad, false }, 137187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z20rsgDrawQuadTexCoordsffffffffffffffffffff", (void *)&SC_DrawQuadTexCoords, false }, 137287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z24rsgDrawSpriteScreenspacefffff", (void *)&SC_DrawSpriteScreenspace, false }, 137387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 137487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsgDrawMesh7rs_mesh", (void *)&SC_DrawMesh, false }, 137587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsgDrawMesh7rs_meshj", (void *)&SC_DrawMeshPrimitive, false }, 137687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsgDrawMesh7rs_meshjjj", (void *)&SC_DrawMeshPrimitiveRange, false }, 137787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z25rsgMeshComputeBoundingBox7rs_meshPfS0_S0_S0_S0_S0_", (void *)&SC_MeshComputeBoundingBox, false }, 137887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 13799e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams { "_Z11rsgDrawPath7rs_path", (void *)&SC_DrawPath, false }, 13809e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams 138187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z13rsgClearColorffff", (void *)&SC_ClearColor, false }, 138287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z13rsgClearDepthf", (void *)&SC_ClearDepth, false }, 138387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 138487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsgDrawTextPKcii", (void *)&SC_DrawText, false }, 138587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsgDrawText13rs_allocationii", (void *)&SC_DrawTextAlloc, false }, 138687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z14rsgMeasureTextPKcPiS1_S1_S1_", (void *)&SC_MeasureText, false }, 138787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z14rsgMeasureText13rs_allocationPiS0_S0_S0_", (void *)&SC_MeasureTextAlloc, false }, 138887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 138987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsgBindFont7rs_font", (void *)&SC_BindFont, false }, 139087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z12rsgFontColorffff", (void *)&SC_FontColor, false }, 139187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 139287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z18rsgBindColorTarget13rs_allocationj", (void *)&SC_BindFrameBufferObjectColorTarget, false }, 139387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z18rsgBindDepthTarget13rs_allocation", (void *)&SC_BindFrameBufferObjectDepthTarget, false }, 139487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z19rsgClearColorTargetj", (void *)&SC_ClearFrameBufferObjectColorTarget, false }, 139587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z19rsgClearDepthTargetv", (void *)&SC_ClearFrameBufferObjectDepthTarget, false }, 139687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z24rsgClearAllRenderTargetsv", (void *)&SC_ClearFrameBufferObjectTargets, false }, 13971aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 139887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 1399aa152101cc4d04597d9aefc3e5a1454eaf39d2ccJason Sams { "_Z9rsForEach9rs_script13rs_allocationS0_", (void *)&SC_ForEach_SAA, true }, 1400aa152101cc4d04597d9aefc3e5a1454eaf39d2ccJason Sams { "_Z9rsForEach9rs_script13rs_allocationS0_PKv", (void *)&SC_ForEach_SAAU, true }, 1401f598811a60088236222bb1879503842094ca378bStephen Hines { "_Z9rsForEach9rs_script13rs_allocationS0_PKvPK14rs_script_call", (void *)&SC_ForEach_SAAUS, true }, 14022f6dc8469a45fa2dafcb772c76009565d0c3885fTim Murray 14032f6dc8469a45fa2dafcb772c76009565d0c3885fTim Murray //rsForEach with usrdata is not supported in 64-bit 14042f6dc8469a45fa2dafcb772c76009565d0c3885fTim Murray#ifndef __LP64__ 1405aa152101cc4d04597d9aefc3e5a1454eaf39d2ccJason Sams { "_Z9rsForEach9rs_script13rs_allocationS0_PKvj", (void *)&SC_ForEach_SAAUL, true }, 1406f598811a60088236222bb1879503842094ca378bStephen Hines { "_Z9rsForEach9rs_script13rs_allocationS0_PKvjPK14rs_script_call", (void *)&SC_ForEach_SAAULS, true }, 14072f6dc8469a45fa2dafcb772c76009565d0c3885fTim Murray#endif 14081aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray#endif // RS_COMPATIBILITY_LIB 140987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 141064147ebf4f0b1c23d2caf2cf7c1675d27de97d99Tim Murray#ifndef __LP64__ 141187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams // time 141287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z6rsTimePi", (void *)&SC_Time, true }, 141387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z11rsLocaltimeP5rs_tmPKi", (void *)&SC_LocalTime, true }, 141464147ebf4f0b1c23d2caf2cf7c1675d27de97d99Tim Murray#else 141564147ebf4f0b1c23d2caf2cf7c1675d27de97d99Tim Murray // time 141664147ebf4f0b1c23d2caf2cf7c1675d27de97d99Tim Murray { "_Z6rsTimePl", (void *)&SC_Time, true }, 141764147ebf4f0b1c23d2caf2cf7c1675d27de97d99Tim Murray { "_Z11rsLocaltimeP5rs_tmPKl", (void *)&SC_LocalTime, true }, 141864147ebf4f0b1c23d2caf2cf7c1675d27de97d99Tim Murray#endif 141987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z14rsUptimeMillisv", (void*)&SC_UptimeMillis, true }, 142087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z13rsUptimeNanosv", (void*)&SC_UptimeNanos, true }, 142187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z7rsGetDtv", (void*)&SC_GetDt, false }, 142287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 142387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams // misc 14240b575de8ed0b628d84d256f5846500b0385979bdTim Murray#ifndef RS_COMPATIBILITY_LIB 142587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z5colorffff", (void *)&SC_Color, false }, 142687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams { "_Z9rsgFinishv", (void *)&SC_Finish, false }, 14270b575de8ed0b628d84d256f5846500b0385979bdTim Murray#endif 142887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 142944bef6fba6244292b751387f3d6c31cca96c28adChris Wailes { nullptr, nullptr, false } 143087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}; 143187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 1432d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray////////////////////////////////////////////////////////////////////////////// 1433d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray// Compatibility Library entry points 1434d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray////////////////////////////////////////////////////////////////////////////// 1435d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 1436dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar#ifndef __LP64__ 1437dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar#define IS_CLEAR_SET_OBJ(t, u, v) \ 1438f827cadde659212b266b9635128c98515a7dcb01Stephen Hines bool rsIsObject(t src) { \ 143944bef6fba6244292b751387f3d6c31cca96c28adChris Wailes return src.p != nullptr; \ 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) { \ 1445dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar android::renderscript::rs_object_base cast; \ 1446dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar cast.p = (ObjectBase *) src.p; \ 1447dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar return SC_SetObject(reinterpret_cast<rs_object_base *>(dst), cast);\ 1448d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray } 1449dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar#else 1450dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar#define IS_CLEAR_SET_OBJ(t, u, v) \ 1451dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar extern "C" { bool u(t* src) { \ 1452dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar return src->p != nullptr; \ 1453dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar } }\ 1454dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar void __attribute__((overloadable)) rsClearObject(t *dst) { \ 1455dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar return SC_ClearObject(reinterpret_cast<rs_object_base *>(dst)); \ 1456dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar } \ 1457dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar extern "C" {\ 1458dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar void v (t *dst, t *src) { \ 1459dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar return SC_SetObject_ByRef(reinterpret_cast<rs_object_base *>(dst),\ 1460dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar reinterpret_cast<rs_object_base *>(src));\ 1461dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar } } 1462dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar#endif 1463dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar 1464dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga NainarIS_CLEAR_SET_OBJ(::rs_element, _Z10rsIsObject10rs_element, _Z11rsSetObjectP10rs_elementS_) 1465dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga NainarIS_CLEAR_SET_OBJ(::rs_type, _Z10rsIsObject7rs_type, _Z11rsSetObjectP7rs_typeS_) 1466dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga NainarIS_CLEAR_SET_OBJ(::rs_allocation, _Z10rsIsObject13rs_allocation, _Z11rsSetObjectP13rs_allocationS_) 1467dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga NainarIS_CLEAR_SET_OBJ(::rs_sampler, _Z10rsIsObject10rs_sampler, _Z11rsSetObjectP10rs_samplerS_) 1468dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga NainarIS_CLEAR_SET_OBJ(::rs_script, _Z10rsIsObject9rs_script, _Z11rsSetObjectP9rs_scriptS_) 1469dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar 1470d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 1471f827cadde659212b266b9635128c98515a7dcb01Stephen Hines#undef IS_CLEAR_SET_OBJ 1472d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 14731aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_ForEach_SAA(::rs_script target, 14741aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray ::rs_allocation in, 14751aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray ::rs_allocation out) { 14761aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray Context *rsc = RsdCpuReference::getTlsContext(); 147744bef6fba6244292b751387f3d6c31cca96c28adChris Wailes rsrForEach(rsc, (Script*)target.p, (Allocation*)in.p, (Allocation*)out.p, 147844bef6fba6244292b751387f3d6c31cca96c28adChris Wailes nullptr, 0, nullptr); 14791aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray} 14801aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 14811aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_ForEach_SAAUS(::rs_script target, 14821aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray ::rs_allocation in, 14831aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray ::rs_allocation out, 14841aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray const void *usr, 14851aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray const RsScriptCall *call) { 14861aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray Context *rsc = RsdCpuReference::getTlsContext(); 148744bef6fba6244292b751387f3d6c31cca96c28adChris Wailes rsrForEach(rsc, (Script*)target.p, (Allocation*)in.p, (Allocation*)out.p, 148844bef6fba6244292b751387f3d6c31cca96c28adChris Wailes usr, 0, call); 14891aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray} 14901aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 14911aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_ForEach_SAAUL(::rs_script target, 14921aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray ::rs_allocation in, 14931aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray ::rs_allocation out, 14941aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray const void *usr, 14951aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray uint32_t usrLen) { 14961aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray Context *rsc = RsdCpuReference::getTlsContext(); 149744bef6fba6244292b751387f3d6c31cca96c28adChris Wailes rsrForEach(rsc, (Script*)target.p, (Allocation*)in.p, (Allocation*)out.p, 149844bef6fba6244292b751387f3d6c31cca96c28adChris Wailes usr, usrLen, nullptr); 14991aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray} 15001aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 15011aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murraystatic void SC_ForEach_SAAULS(::rs_script target, 15021aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray ::rs_allocation in, 15031aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray ::rs_allocation out, 15041aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray const void *usr, 15051aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray uint32_t usrLen, 15061aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray const RsScriptCall *call) { 15071aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray Context *rsc = RsdCpuReference::getTlsContext(); 150844bef6fba6244292b751387f3d6c31cca96c28adChris Wailes rsrForEach(rsc, (Script*)target.p, (Allocation*)in.p, (Allocation*)out.p, 150944bef6fba6244292b751387f3d6c31cca96c28adChris Wailes usr, usrLen, call); 15101aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray} 15111aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray 1512dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar#ifdef RS_COMPATIBILITY_LIB 151347211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murraystatic const Allocation * SC_GetAllocation(const void *ptr) { 151447211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray Context *rsc = RsdCpuReference::getTlsContext(); 151547211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray const Script *sc = RsdCpuReference::getTlsScript(); 151647211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray return rsdScriptGetAllocationForPointer(rsc, sc, ptr); 151747211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray} 151847211dca5b2fc1aa5680ddebe5c4270c08c06e5dTim Murray 1519d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murrayconst Allocation * rsGetAllocation(const void *ptr) { 1520d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray return SC_GetAllocation(ptr); 1521d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray} 1522d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 1523dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar#else 1524dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarconst android::renderscript::rs_allocation rsGetAllocation(const void *ptr) { 1525dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar#ifdef __i386__ 1526dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar android::renderscript::rs_allocation obj; 1527dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar obj.p = (Allocation *) SC_GetAllocation(ptr); 1528dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar return obj; 1529dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar#else 1530dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar return SC_GetAllocation(ptr); 1531dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar#endif 1532dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar} 1533dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar#endif 1534dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar 1535dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar 1536a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Samsvoid __attribute__((overloadable)) rsAllocationIoSend(::rs_allocation a) { 1537dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar SC_AllocationIoSend(a); 15387a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines} 15397a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines 1540a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Samsvoid __attribute__((overloadable)) rsAllocationIoReceive(::rs_allocation a) { 1541dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar SC_AllocationIoReceive(a); 15427a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines} 15437a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines 15447a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines 15457a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hinesvoid __attribute__((overloadable)) rsAllocationCopy1DRange( 1546a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation dstAlloc, 15477a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines uint32_t dstOff, uint32_t dstMip, uint32_t count, 1548a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation srcAlloc, 15497a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines uint32_t srcOff, uint32_t srcMip) { 15501aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray SC_AllocationCopy1DRange(dstAlloc, dstOff, dstMip, count, 15511aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray srcAlloc, srcOff, srcMip); 15527a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines} 15537a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines 15547a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hinesvoid __attribute__((overloadable)) rsAllocationCopy2DRange( 1555a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation dstAlloc, 15567a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines uint32_t dstXoff, uint32_t dstYoff, 15577a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines uint32_t dstMip, rs_allocation_cubemap_face dstFace, 15587a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines uint32_t width, uint32_t height, 1559a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation srcAlloc, 15607a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines uint32_t srcXoff, uint32_t srcYoff, 15617a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines uint32_t srcMip, rs_allocation_cubemap_face srcFace) { 15621aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray SC_AllocationCopy2DRange(dstAlloc, dstXoff, dstYoff, 15637a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines dstMip, dstFace, width, height, 15641aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray srcAlloc, srcXoff, srcYoff, 15657a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines srcMip, srcFace); 15667a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines} 15677a01126d25c081f5b613eea80e5ff7e6c75c940fStephen Hines 1568a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Samsvoid __attribute__((overloadable)) rsForEach(::rs_script script, 1569a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation in, 1570a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation out, 1571d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray const void *usr, 1572d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray const rs_script_call *call) { 15731aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray return SC_ForEach_SAAUS(script, in, out, usr, (RsScriptCall*)call); 1574d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray} 1575d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 1576a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Samsvoid __attribute__((overloadable)) rsForEach(::rs_script script, 1577a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation in, 1578dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar ::rs_allocation out, 1579dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar const void *usr) { 1580dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar#ifdef __LP64__ 1581dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar return SC_ForEach_SAAU(&script, &in, &out, usr); 1582dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar#else 1583dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar return SC_ForEach_SAAU(script, in, out, usr); 1584dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar#endif 1585dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar} 1586dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar 1587dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarvoid __attribute__((overloadable)) rsForEach(::rs_script script, 1588dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar ::rs_allocation in, 1589a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation out) { 15901aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray return SC_ForEach_SAA(script, in, out); 1591276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines} 1592276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines 1593a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Samsvoid __attribute__((overloadable)) rsForEach(::rs_script script, 1594a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation in, 1595a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation out, 1596276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines const void *usr, 1597276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines uint32_t usrLen) { 15981aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray return SC_ForEach_SAAUL(script, in, out, usr, usrLen); 1599276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines} 1600276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines 1601a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Samsvoid __attribute__((overloadable)) rsForEach(::rs_script script, 1602a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation in, 1603a36c50a6ab87f4c9049318d4c6c8ec7b0a1e6e12Jason Sams ::rs_allocation out, 1604d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray const void *usr, 1605d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray uint32_t usrLen, 1606d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray const rs_script_call *call) { 16071aa9dfc002f6b763d34d75d9f47abb4aa70584a2Tim Murray return SC_ForEach_SAAULS(script, in, out, usr, usrLen, (RsScriptCall*)call); 1608d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray} 1609d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 1610dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar// #if defined(RS_COMPATIBILITY_LIB) || !defined(__LP64__) 1611dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar#ifndef __LP64__ 1612d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murrayint rsTime(int *timer) { 1613d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray return SC_Time(timer); 1614d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray} 1615dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar#else 1616dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainartime_t rsTime(time_t * timer) { 1617dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar return SC_Time(timer); 1618dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar} 1619dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar#endif // RS_COMPATIBILITY_LIB 1620d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 1621dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarrs_tm* rsLocaltime(rs_tm* local, const time_t *timer) { 1622dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar return (rs_tm*)(SC_LocalTime((tm*)local, (time_t *)timer)); 1623d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray} 1624d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 1625d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murrayint64_t rsUptimeMillis() { 1626d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray Context *rsc = RsdCpuReference::getTlsContext(); 1627d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray return rsrUptimeMillis(rsc); 1628d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray} 1629d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 1630cadee38f6940e5584d3ec3398a21bd2a494361e2Stephen Hinesint64_t rsUptimeNanos() { 1631cadee38f6940e5584d3ec3398a21bd2a494361e2Stephen Hines return SC_UptimeNanos(); 1632cadee38f6940e5584d3ec3398a21bd2a494361e2Stephen Hines} 1633cadee38f6940e5584d3ec3398a21bd2a494361e2Stephen Hines 1634cadee38f6940e5584d3ec3398a21bd2a494361e2Stephen Hinesfloat rsGetDt() { 1635cadee38f6940e5584d3ec3398a21bd2a494361e2Stephen Hines return SC_GetDt(); 1636cadee38f6940e5584d3ec3398a21bd2a494361e2Stephen Hines} 1637cadee38f6940e5584d3ec3398a21bd2a494361e2Stephen Hines 1638276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hinesuint32_t rsSendToClient(int cmdID) { 1639276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines return SC_ToClient(cmdID); 1640276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines} 1641276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines 1642276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hinesuint32_t rsSendToClient(int cmdID, const void *data, uint32_t len) { 1643276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines return SC_ToClient2(cmdID, data, len); 1644d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray} 1645d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray 16460b575de8ed0b628d84d256f5846500b0385979bdTim Murrayuint32_t rsSendToClientBlocking(int cmdID) { 1647276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines return SC_ToClientBlocking(cmdID); 1648276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines} 1649276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines 1650276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hinesuint32_t rsSendToClientBlocking(int cmdID, const void *data, uint32_t len) { 1651276000a3673e639f9abc41db4709c1b0a96c1bf9Stephen Hines return SC_ToClientBlocking2(cmdID, data, len); 16520b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16530b575de8ed0b628d84d256f5846500b0385979bdTim Murray 16540b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugF(const char *s, float f) { 16550b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %f, 0x%08x", s, f, *((int *) (&f))); 16560b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16570b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugFv2(const char *s, float f1, float f2) { 16580b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%f, %f}", s, f1, f2); 16590b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16600b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugFv3(const char *s, float f1, float f2, float f3) { 16610b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%f, %f, %f}", s, f1, f2, f3); 16620b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16630b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugFv4(const char *s, float f1, float f2, float f3, float f4) { 16640b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%f, %f, %f, %f}", s, f1, f2, f3, f4); 16650b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16660b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugF2(const char *s, float2 f) { 16670b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%f, %f}", s, f.x, f.y); 16680b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16690b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugF3(const char *s, float3 f) { 16700b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%f, %f, %f}", s, f.x, f.y, f.z); 16710b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16720b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugF4(const char *s, float4 f) { 16730b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%f, %f, %f, %f}", s, f.x, f.y, f.z, f.w); 16740b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16750b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugD(const char *s, double d) { 16760b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %f, 0x%08llx", s, d, *((long long *) (&d))); 16770b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16780b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugFM4v4(const char *s, const float *f) { 16790b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%f, %f, %f, %f", s, f[0], f[4], f[8], f[12]); 16800b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %f, %f, %f, %f", s, f[1], f[5], f[9], f[13]); 16810b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %f, %f, %f, %f", s, f[2], f[6], f[10], f[14]); 16820b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %f, %f, %f, %f}", s, f[3], f[7], f[11], f[15]); 16830b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16840b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugFM3v3(const char *s, const float *f) { 16850b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%f, %f, %f", s, f[0], f[3], f[6]); 16860b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %f, %f, %f", s, f[1], f[4], f[7]); 16870b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %f, %f, %f}",s, f[2], f[5], f[8]); 16880b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16890b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugFM2v2(const char *s, const float *f) { 16900b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%f, %f", s, f[0], f[2]); 16910b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %f, %f}",s, f[1], f[3]); 16920b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16930b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugI8(const char *s, char c) { 16940b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %hhd 0x%hhx", s, c, (unsigned char)c); 16950b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16960b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugC2(const char *s, char2 c) { 16970b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%hhd, %hhd} 0x%hhx 0x%hhx", s, c.x, c.y, (unsigned char)c.x, (unsigned char)c.y); 16980b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 16990b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugC3(const char *s, char3 c) { 17000b575de8ed0b628d84d256f5846500b0385979bdTim 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); 17010b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17020b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugC4(const char *s, char4 c) { 17030b575de8ed0b628d84d256f5846500b0385979bdTim 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); 17040b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17050b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugU8(const char *s, unsigned char c) { 17060b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %hhu 0x%hhx", s, c, c); 17070b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17080b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUC2(const char *s, uchar2 c) { 17090b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%hhu, %hhu} 0x%hhx 0x%hhx", s, c.x, c.y, c.x, c.y); 17100b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17110b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUC3(const char *s, uchar3 c) { 17120b575de8ed0b628d84d256f5846500b0385979bdTim 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); 17130b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17140b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUC4(const char *s, uchar4 c) { 17150b575de8ed0b628d84d256f5846500b0385979bdTim 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); 17160b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17170b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugI16(const char *s, short c) { 17180b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %hd 0x%hx", s, c, c); 17190b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17200b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugS2(const char *s, short2 c) { 17210b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%hd, %hd} 0x%hx 0x%hx", s, c.x, c.y, c.x, c.y); 17220b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17230b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugS3(const char *s, short3 c) { 17240b575de8ed0b628d84d256f5846500b0385979bdTim 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); 17250b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17260b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugS4(const char *s, short4 c) { 17270b575de8ed0b628d84d256f5846500b0385979bdTim 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); 17280b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17290b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugU16(const char *s, unsigned short c) { 17300b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %hu 0x%hx", s, c, c); 17310b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17320b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUS2(const char *s, ushort2 c) { 17330b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%hu, %hu} 0x%hx 0x%hx", s, c.x, c.y, c.x, c.y); 17340b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17350b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUS3(const char *s, ushort3 c) { 17360b575de8ed0b628d84d256f5846500b0385979bdTim 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); 17370b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17380b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUS4(const char *s, ushort4 c) { 17390b575de8ed0b628d84d256f5846500b0385979bdTim 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); 17400b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17410b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugI32(const char *s, int32_t i) { 17420b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %d 0x%x", s, i, i); 17430b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17440b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugI2(const char *s, int2 i) { 17450b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%d, %d} 0x%x 0x%x", s, i.x, i.y, i.x, i.y); 17460b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17470b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugI3(const char *s, int3 i) { 17480b575de8ed0b628d84d256f5846500b0385979bdTim 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); 17490b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17500b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugI4(const char *s, int4 i) { 17510b575de8ed0b628d84d256f5846500b0385979bdTim 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); 17520b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17530b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugU32(const char *s, uint32_t i) { 17540b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %u 0x%x", s, i, i); 17550b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17560b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUI2(const char *s, uint2 i) { 17570b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s {%u, %u} 0x%x 0x%x", s, i.x, i.y, i.x, i.y); 17580b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17590b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUI3(const char *s, uint3 i) { 17600b575de8ed0b628d84d256f5846500b0385979bdTim 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); 17610b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17620b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUI4(const char *s, uint4 i) { 17630b575de8ed0b628d84d256f5846500b0385979bdTim 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); 17640b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 1765127d51c1193f4055795da967d47a13bedd3cb951Miao Wang 1766127d51c1193f4055795da967d47a13bedd3cb951Miao Wangtemplate <typename T> 1767127d51c1193f4055795da967d47a13bedd3cb951Miao Wangstatic inline long long LL(const T &x) { 1768127d51c1193f4055795da967d47a13bedd3cb951Miao Wang return static_cast<long long>(x); 1769127d51c1193f4055795da967d47a13bedd3cb951Miao Wang} 1770127d51c1193f4055795da967d47a13bedd3cb951Miao Wang 1771127d51c1193f4055795da967d47a13bedd3cb951Miao Wangtemplate <typename T> 1772127d51c1193f4055795da967d47a13bedd3cb951Miao Wangstatic inline unsigned long long LLu(const T &x) { 1773127d51c1193f4055795da967d47a13bedd3cb951Miao Wang return static_cast<unsigned long long>(x); 1774127d51c1193f4055795da967d47a13bedd3cb951Miao Wang} 1775127d51c1193f4055795da967d47a13bedd3cb951Miao Wang 1776dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainarstatic void SC_debugLL64(const char *s, long long ll) { 1777dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar ALOGD("%s %lld 0x%llx", s, LL(ll), LL(ll)); 1778dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar} 1779dc0d8f7c0f1f43f25c34fbc04656ad578f6e953bPirama Arumuga Nainar 17800b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugL2(const char *s, long2 ll) { 1781127d51c1193f4055795da967d47a13bedd3cb951Miao Wang ALOGD("%s {%lld, %lld} 0x%llx 0x%llx", s, LL(ll.x), LL(ll.y), LL(ll.x), LL(ll.y)); 17820b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17830b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugL3(const char *s, long3 ll) { 1784127d51c1193f4055795da967d47a13bedd3cb951Miao Wang ALOGD("%s {%lld, %lld, %lld} 0x%llx 0x%llx 0x%llx", s, LL(ll.x), LL(ll.y), LL(ll.z), LL(ll.x), LL(ll.y), LL(ll.z)); 17850b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17860b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugL4(const char *s, long4 ll) { 1787127d51c1193f4055795da967d47a13bedd3cb951Miao Wang ALOGD("%s {%lld, %lld, %lld, %lld} 0x%llx 0x%llx 0x%llx 0x%llx", s, LL(ll.x), LL(ll.y), LL(ll.z), LL(ll.w), LL(ll.x), LL(ll.y), LL(ll.z), LL(ll.w)); 17880b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17890b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugULL64(const char *s, unsigned long long ll) { 17900b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %llu 0x%llx", s, ll, ll); 17910b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17920b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUL2(const char *s, ulong2 ll) { 1793127d51c1193f4055795da967d47a13bedd3cb951Miao Wang ALOGD("%s {%llu, %llu} 0x%llx 0x%llx", s, LLu(ll.x), LLu(ll.y), LLu(ll.x), LLu(ll.y)); 17940b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17950b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUL3(const char *s, ulong3 ll) { 1796127d51c1193f4055795da967d47a13bedd3cb951Miao Wang ALOGD("%s {%llu, %llu, %llu} 0x%llx 0x%llx 0x%llx", s, LLu(ll.x), LLu(ll.y), LLu(ll.z), LLu(ll.x), LLu(ll.y), LLu(ll.z)); 17970b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 17980b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUL4(const char *s, ulong4 ll) { 1799127d51c1193f4055795da967d47a13bedd3cb951Miao Wang ALOGD("%s {%llu, %llu, %llu, %llu} 0x%llx 0x%llx 0x%llx 0x%llx", s, LLu(ll.x), LLu(ll.y), LLu(ll.z), LLu(ll.w), LLu(ll.x), LLu(ll.y), LLu(ll.z), LLu(ll.w)); 18000b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 1801127d51c1193f4055795da967d47a13bedd3cb951Miao Wang 18020b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugP(const char *s, const void *p) { 18030b575de8ed0b628d84d256f5846500b0385979bdTim Murray ALOGD("%s %p", s, p); 18040b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18050b575de8ed0b628d84d256f5846500b0385979bdTim Murray 18060b575de8ed0b628d84d256f5846500b0385979bdTim Murray// TODO: allocation ops, messaging, time 18070b575de8ed0b628d84d256f5846500b0385979bdTim Murray 18080b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, float f) { 18090b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugF(s, f); 18100b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18110b575de8ed0b628d84d256f5846500b0385979bdTim Murray 18120b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, float f1, float f2) { 18130b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugFv2(s, f1, f2); 18140b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18150b575de8ed0b628d84d256f5846500b0385979bdTim Murray 18160b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, float f1, float f2, float f3) { 18170b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugFv3(s, f1, f2, f3); 18180b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18190b575de8ed0b628d84d256f5846500b0385979bdTim Murray 18200b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, float f1, float f2, float f3, float f4) { 18210b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugFv4(s, f1, f2, f3, f4); 18220b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18230b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1824b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const float2 *f) { 1825b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugF2(s, *f); 18260b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18270b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1828b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const float3 *f) { 1829b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugF3(s, *f); 18300b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18310b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1832b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const float4 *f) { 1833b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugF4(s, *f); 18340b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18350b575de8ed0b628d84d256f5846500b0385979bdTim Murray 18360b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, double d) { 18370b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugD(s, d); 18380b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18390b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1840b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const rs_matrix4x4 *m) { 18410b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugFM4v4(s, (float *) m); 18420b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18430b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1844b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const rs_matrix3x3 *m) { 1845d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray SC_debugFM3v3(s, (float *) m); 18460b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18470b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1848b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const rs_matrix2x2 *m) { 1849d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray SC_debugFM2v2(s, (float *) m); 18500b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18510b575de8ed0b628d84d256f5846500b0385979bdTim Murray 18520b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, char c) { 18530b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugI8(s, c); 18540b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18550b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1856b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const char2 *c) { 1857b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugC2(s, *c); 18580b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18590b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1860b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const char3 *c) { 1861b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugC3(s, *c); 18620b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18630b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1864b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const char4 *c) { 1865b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugC4(s, *c); 18660b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18670b575de8ed0b628d84d256f5846500b0385979bdTim Murray 18680b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, unsigned char c) { 18690b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugU8(s, c); 18700b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18710b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1872b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const uchar2 *c) { 1873b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUC2(s, *c); 18740b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18750b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1876b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const uchar3 *c) { 1877b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUC3(s, *c); 18780b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18790b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1880b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const uchar4 *c) { 1881b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUC4(s, *c); 18820b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18830b575de8ed0b628d84d256f5846500b0385979bdTim Murray 18840b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, short c) { 18850b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugI16(s, c); 18860b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18870b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1888b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const short2 *c) { 1889b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugS2(s, *c); 18900b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18910b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1892b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const short3 *c) { 1893b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugS3(s, *c); 18940b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18950b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1896b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const short4 *c) { 1897b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugS4(s, *c); 18980b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 18990b575de8ed0b628d84d256f5846500b0385979bdTim Murray 19000b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, unsigned short c) { 19010b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugU16(s, c); 19020b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19030b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1904b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const ushort2 *c) { 1905b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUS2(s, *c); 19060b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19070b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1908b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const ushort3 *c) { 1909b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUS3(s, *c); 19100b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19110b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1912b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const ushort4 *c) { 1913b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUS4(s, *c); 19140b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19150b575de8ed0b628d84d256f5846500b0385979bdTim Murray 19160b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, int c) { 19170b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugI32(s, c); 19180b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19190b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1920b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const int2 *c) { 1921b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugI2(s, *c); 19220b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19230b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1924b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const int3 *c) { 1925b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugI3(s, *c); 19260b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19270b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1928b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const int4 *c) { 1929b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugI4(s, *c); 19300b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19310b575de8ed0b628d84d256f5846500b0385979bdTim Murray 19320b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, unsigned int c) { 19330b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugU32(s, c); 19340b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19350b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1936b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const uint2 *c) { 1937b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUI2(s, *c); 19380b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19390b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1940b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const uint3 *c) { 1941b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUI3(s, *c); 19420b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19430b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1944b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const uint4 *c) { 1945b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUI4(s, *c); 19460b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19470b575de8ed0b628d84d256f5846500b0385979bdTim Murray 19480b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, long c) { 19490b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugLL64(s, c); 19500b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19510b575de8ed0b628d84d256f5846500b0385979bdTim Murray 19520b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, long long c) { 19530b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugLL64(s, c); 19540b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19550b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1956b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const long2 *c) { 1957b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugL2(s, *c); 19580b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19590b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1960b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const long3 *c) { 1961b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugL3(s, *c); 19620b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19630b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1964b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const long4 *c) { 1965b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugL4(s, *c); 19660b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19670b575de8ed0b628d84d256f5846500b0385979bdTim Murray 19680b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, unsigned long c) { 19690b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugULL64(s, c); 19700b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19710b575de8ed0b628d84d256f5846500b0385979bdTim Murray 19720b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, unsigned long long c) { 19730b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugULL64(s, c); 19740b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19750b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1976b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const ulong2 *c) { 1977b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUL2(s, *c); 19780b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19790b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1980b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const ulong3 *c) { 1981b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUL3(s, *c); 19820b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19830b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1984b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const ulong4 *c) { 1985b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines SC_debugUL4(s, *c); 19860b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 19870b575de8ed0b628d84d256f5846500b0385979bdTim Murray 1988a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines// FIXME: We need to export these function signatures for the compatibility 1989a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines// library. The C++ name mangling that LLVM uses for ext_vector_type requires 1990a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines// different versions for "long" vs. "long long". Note that the called 1991a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines// functions are still using the appropriate 64-bit sizes. 1992127d51c1193f4055795da967d47a13bedd3cb951Miao Wang 1993127d51c1193f4055795da967d47a13bedd3cb951Miao Wang#ifndef __LP64__ 1994a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinestypedef long l2 __attribute__((ext_vector_type(2))); 1995a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinestypedef long l3 __attribute__((ext_vector_type(3))); 1996a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinestypedef long l4 __attribute__((ext_vector_type(4))); 1997a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinestypedef unsigned long ul2 __attribute__((ext_vector_type(2))); 1998a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinestypedef unsigned long ul3 __attribute__((ext_vector_type(3))); 1999a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinestypedef unsigned long ul4 __attribute__((ext_vector_type(4))); 2000a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines 2001a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinesvoid rsDebug(const char *s, const l2 *c) { 2002a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines SC_debugL2(s, *(const long2 *)c); 2003a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines} 2004a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines 2005a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinesvoid rsDebug(const char *s, const l3 *c) { 2006a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines SC_debugL3(s, *(const long3 *)c); 2007a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines} 2008a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines 2009a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinesvoid rsDebug(const char *s, const l4 *c) { 2010a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines SC_debugL4(s, *(const long4 *)c); 2011a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines} 2012a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines 2013a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinesvoid rsDebug(const char *s, const ul2 *c) { 2014a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines SC_debugUL2(s, *(const ulong2 *)c); 2015a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines} 2016a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines 2017a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinesvoid rsDebug(const char *s, const ul3 *c) { 2018a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines SC_debugUL3(s, *(const ulong3 *)c); 2019a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines} 2020a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines 2021a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hinesvoid rsDebug(const char *s, const ul4 *c) { 2022a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines SC_debugUL4(s, *(const ulong4 *)c); 2023a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines} 2024127d51c1193f4055795da967d47a13bedd3cb951Miao Wang#endif 2025a5d9bef6b53ba394087c7c7b9cc60d3aaa7f121bStephen Hines 20269f39aaf0145e9607200141e4716b73319055e6d7Tim Murrayvoid rsDebug(const char *s, const long2 c) { 20279f39aaf0145e9607200141e4716b73319055e6d7Tim Murray SC_debugL2(s, c); 20289f39aaf0145e9607200141e4716b73319055e6d7Tim Murray} 20299f39aaf0145e9607200141e4716b73319055e6d7Tim Murray 20309f39aaf0145e9607200141e4716b73319055e6d7Tim Murrayvoid rsDebug(const char *s, const long3 c) { 20319f39aaf0145e9607200141e4716b73319055e6d7Tim Murray SC_debugL3(s, c); 20329f39aaf0145e9607200141e4716b73319055e6d7Tim Murray} 20339f39aaf0145e9607200141e4716b73319055e6d7Tim Murray 20349f39aaf0145e9607200141e4716b73319055e6d7Tim Murrayvoid rsDebug(const char *s, const long4 c) { 20359f39aaf0145e9607200141e4716b73319055e6d7Tim Murray SC_debugL4(s, c); 20369f39aaf0145e9607200141e4716b73319055e6d7Tim Murray} 20379f39aaf0145e9607200141e4716b73319055e6d7Tim Murray 20389f39aaf0145e9607200141e4716b73319055e6d7Tim Murrayvoid rsDebug(const char *s, const ulong2 c) { 20399f39aaf0145e9607200141e4716b73319055e6d7Tim Murray SC_debugUL2(s, c); 20409f39aaf0145e9607200141e4716b73319055e6d7Tim Murray} 20419f39aaf0145e9607200141e4716b73319055e6d7Tim Murray 20429f39aaf0145e9607200141e4716b73319055e6d7Tim Murrayvoid rsDebug(const char *s, const ulong3 c) { 20439f39aaf0145e9607200141e4716b73319055e6d7Tim Murray SC_debugUL3(s, c); 20449f39aaf0145e9607200141e4716b73319055e6d7Tim Murray} 20459f39aaf0145e9607200141e4716b73319055e6d7Tim Murray 20469f39aaf0145e9607200141e4716b73319055e6d7Tim Murrayvoid rsDebug(const char *s, const ulong4 c) { 20479f39aaf0145e9607200141e4716b73319055e6d7Tim Murray SC_debugUL4(s, c); 20489f39aaf0145e9607200141e4716b73319055e6d7Tim Murray} 20499f39aaf0145e9607200141e4716b73319055e6d7Tim Murray 20509f39aaf0145e9607200141e4716b73319055e6d7Tim Murray 20510b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, const void *p) { 20520b575de8ed0b628d84d256f5846500b0385979bdTim Murray SC_debugP(s, p); 20530b575de8ed0b628d84d256f5846500b0385979bdTim Murray} 205487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 2055709a0978ae141198018ca9769f8d96292a8928e6Jason Samsextern const RsdCpuReference::CpuSymbol * rsdLookupRuntimeStub(Context * pContext, char const* name) { 205687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams ScriptC *s = (ScriptC *)pContext; 2057709a0978ae141198018ca9769f8d96292a8928e6Jason Sams const RsdCpuReference::CpuSymbol *syms = gSyms; 205844bef6fba6244292b751387f3d6c31cca96c28adChris Wailes const RsdCpuReference::CpuSymbol *sym = nullptr; 205987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 206087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams if (!sym) { 2061709a0978ae141198018ca9769f8d96292a8928e6Jason Sams while (syms->fnPtr) { 2062709a0978ae141198018ca9769f8d96292a8928e6Jason Sams if (!strcmp(syms->name, name)) { 2063709a0978ae141198018ca9769f8d96292a8928e6Jason Sams return syms; 206487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams } 206587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams syms++; 206687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams } 206787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams } 206887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams 206944bef6fba6244292b751387f3d6c31cca96c28adChris Wailes return nullptr; 207087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams} 2071