rsdRuntimeStubs.cpp revision b0934b67b95cc27e2358c2aa4db5f7c1067c8f9b
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)));
49a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef short short2 __attribute__((ext_vector_type(2)));
50a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef short short3 __attribute__((ext_vector_type(3)));
51a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef short short4 __attribute__((ext_vector_type(4)));
52a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef unsigned short ushort2 __attribute__((ext_vector_type(2)));
53a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef unsigned short ushort3 __attribute__((ext_vector_type(3)));
54a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef unsigned short 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)));
61a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef long long long2 __attribute__((ext_vector_type(2)));
62a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef long long long3 __attribute__((ext_vector_type(3)));
63a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef long long long4 __attribute__((ext_vector_type(4)));
64a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef unsigned long long ulong2 __attribute__((ext_vector_type(2)));
65a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef unsigned long long ulong3 __attribute__((ext_vector_type(3)));
66a1dd74c5ce4db0991020a4836be24fc35af4f301Rajeev Sharmatypedef unsigned long long ulong4 __attribute__((ext_vector_type(4)));
6787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
685261a5ea546ff358edd5aac7602fc4132434f481Jason Samstypedef uint8_t uchar;
695261a5ea546ff358edd5aac7602fc4132434f481Jason Samstypedef uint16_t ushort;
705261a5ea546ff358edd5aac7602fc4132434f481Jason Samstypedef uint32_t uint;
710b575de8ed0b628d84d256f5846500b0385979bdTim Murray#ifndef RS_SERVER
725261a5ea546ff358edd5aac7602fc4132434f481Jason Samstypedef uint64_t ulong;
730b575de8ed0b628d84d256f5846500b0385979bdTim Murray#endif
7487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
75d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray#ifdef RS_COMPATIBILITY_LIB
76d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray#define OPAQUETYPE(t) \
77d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    typedef struct { const int* const p; } __attribute__((packed, aligned(4))) t;
78d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray
79d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayOPAQUETYPE(rs_element)
80d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayOPAQUETYPE(rs_type)
81d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayOPAQUETYPE(rs_allocation)
82d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayOPAQUETYPE(rs_sampler)
83d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayOPAQUETYPE(rs_script)
84d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayOPAQUETYPE(rs_script_call)
85d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray#undef OPAQUETYPE
86d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray
87d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murraytypedef struct {
88d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    int tm_sec;     ///< seconds
89d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    int tm_min;     ///< minutes
90d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    int tm_hour;    ///< hours
91d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    int tm_mday;    ///< day of the month
92d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    int tm_mon;     ///< month
93d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    int tm_year;    ///< year
94d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    int tm_wday;    ///< day of the week
95d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    int tm_yday;    ///< day of the year
96d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    int tm_isdst;   ///< daylight savings time
97d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray} rs_tm;
98d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray#endif
99d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray
10087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//////////////////////////////////////////////////////////////////////////////
10187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// Allocation
10287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//////////////////////////////////////////////////////////////////////////////
10387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
10487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
10587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_AllocationSyncAll2(Allocation *a, RsAllocationUsageType source) {
106709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
107709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrAllocationSyncAll(rsc, a, source);
10887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
10987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
11087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_AllocationSyncAll(Allocation *a) {
111709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
112709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrAllocationSyncAll(rsc, a, RS_ALLOCATION_USAGE_SCRIPT);
11387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
11487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
11574a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchoukstatic void SC_AllocationCopy1DRange(Allocation *dstAlloc,
11674a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk                                     uint32_t dstOff,
11774a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk                                     uint32_t dstMip,
11874a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk                                     uint32_t count,
11974a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk                                     Allocation *srcAlloc,
12074a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk                                     uint32_t srcOff, uint32_t srcMip) {
121709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
122a94952436aeb251f587c1bccdf94c7f75285dfe2Alex Sakhartchouk    rsrAllocationCopy1DRange(rsc, dstAlloc, dstOff, dstMip, count,
123a94952436aeb251f587c1bccdf94c7f75285dfe2Alex Sakhartchouk                             srcAlloc, srcOff, srcMip);
12474a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk}
12574a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk
12674a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchoukstatic void SC_AllocationCopy2DRange(Allocation *dstAlloc,
12774a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk                                     uint32_t dstXoff, uint32_t dstYoff,
12874a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk                                     uint32_t dstMip, uint32_t dstFace,
12974a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk                                     uint32_t width, uint32_t height,
13074a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk                                     Allocation *srcAlloc,
13174a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk                                     uint32_t srcXoff, uint32_t srcYoff,
13274a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk                                     uint32_t srcMip, uint32_t srcFace) {
133709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
134a94952436aeb251f587c1bccdf94c7f75285dfe2Alex Sakhartchouk    rsrAllocationCopy2DRange(rsc, dstAlloc,
135a94952436aeb251f587c1bccdf94c7f75285dfe2Alex Sakhartchouk                             dstXoff, dstYoff, dstMip, dstFace,
136a94952436aeb251f587c1bccdf94c7f75285dfe2Alex Sakhartchouk                             width, height,
137a94952436aeb251f587c1bccdf94c7f75285dfe2Alex Sakhartchouk                             srcAlloc,
138a94952436aeb251f587c1bccdf94c7f75285dfe2Alex Sakhartchouk                             srcXoff, srcYoff, srcMip, srcFace);
13974a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk}
14074a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk
141110f181b7966212a36ef18016f9b81c7322d0a2fJason Sams#ifndef RS_COMPATIBILITY_LIB
142b322033c13487a174bb9c26466e9684d1ff4de8dJason Samsstatic void SC_AllocationIoSend(Allocation *alloc) {
143709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
144b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams    rsdAllocationIoSend(rsc, alloc);
145b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams}
146b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams
147b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams
148b322033c13487a174bb9c26466e9684d1ff4de8dJason Samsstatic void SC_AllocationIoReceive(Allocation *alloc) {
149709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
150b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams    rsdAllocationIoReceive(rsc, alloc);
151b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams}
152b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams
153b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams
15474a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk
15587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//////////////////////////////////////////////////////////////////////////////
15687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// Context
15787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//////////////////////////////////////////////////////////////////////////////
15887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
15987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindTexture(ProgramFragment *pf, uint32_t slot, Allocation *a) {
160709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
161709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrBindTexture(rsc, pf, slot, a);
16287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
16387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
164a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchoukstatic void SC_BindVertexConstant(ProgramVertex *pv, uint32_t slot, Allocation *a) {
165709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
166709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrBindConstant(rsc, pv, slot, a);
167a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchouk}
168a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchouk
169a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchoukstatic void SC_BindFragmentConstant(ProgramFragment *pf, uint32_t slot, Allocation *a) {
170709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
171709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrBindConstant(rsc, pf, slot, a);
172a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchouk}
173a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchouk
17487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindSampler(ProgramFragment *pf, uint32_t slot, Sampler *s) {
175709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
176709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrBindSampler(rsc, pf, slot, s);
17787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
17887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
17987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindProgramStore(ProgramStore *ps) {
180709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
181709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrBindProgramStore(rsc, ps);
18287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
18387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
18487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindProgramFragment(ProgramFragment *pf) {
185709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
186709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrBindProgramFragment(rsc, pf);
18787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
18887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
18987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindProgramVertex(ProgramVertex *pv) {
190709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
191709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrBindProgramVertex(rsc, pv);
19287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
19387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
19487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindProgramRaster(ProgramRaster *pr) {
195709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
196709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrBindProgramRaster(rsc, pr);
19787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
19887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
19987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindFrameBufferObjectColorTarget(Allocation *a, uint32_t slot) {
200709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
201709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrBindFrameBufferObjectColorTarget(rsc, a, slot);
20287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
20387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
20487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindFrameBufferObjectDepthTarget(Allocation *a) {
205709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
206709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrBindFrameBufferObjectDepthTarget(rsc, a);
20787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
20887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
20987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_ClearFrameBufferObjectColorTarget(uint32_t slot) {
210709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
211709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrClearFrameBufferObjectColorTarget(rsc, slot);
21287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
21387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
21487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_ClearFrameBufferObjectDepthTarget(Context *, Script *) {
215709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
216709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrClearFrameBufferObjectDepthTarget(rsc);
21787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
21887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
21987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_ClearFrameBufferObjectTargets(Context *, Script *) {
220709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
221709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrClearFrameBufferObjectTargets(rsc);
22287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
22387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
22487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
22587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//////////////////////////////////////////////////////////////////////////////
22687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// VP
22787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//////////////////////////////////////////////////////////////////////////////
22887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
22987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_VpLoadProjectionMatrix(const rsc_Matrix *m) {
230709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
231709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrVpLoadProjectionMatrix(rsc, m);
23287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
23387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
23487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_VpLoadModelMatrix(const rsc_Matrix *m) {
235709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
236709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrVpLoadModelMatrix(rsc, m);
23787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
23887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
23987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_VpLoadTextureMatrix(const rsc_Matrix *m) {
240709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
241709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrVpLoadTextureMatrix(rsc, m);
24287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
24387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
24487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_PfConstantColor(ProgramFragment *pf, float r, float g, float b, float a) {
245709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
246709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrPfConstantColor(rsc, pf, r, g, b, a);
24787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
24887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
24987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_VpGetProjectionMatrix(rsc_Matrix *m) {
250709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
251709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrVpGetProjectionMatrix(rsc, m);
25287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
25387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
25487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
25587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//////////////////////////////////////////////////////////////////////////////
25687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// Drawing
25787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//////////////////////////////////////////////////////////////////////////////
25887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
25987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawQuadTexCoords(float x1, float y1, float z1, float u1, float v1,
26087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams                                 float x2, float y2, float z2, float u2, float v2,
26187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams                                 float x3, float y3, float z3, float u3, float v3,
26287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams                                 float x4, float y4, float z4, float u4, float v4) {
263709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
264414a46166126da6864258bd25ff183f9a3c6261dStephen Hines
265414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    if (!rsc->setupCheck()) {
266414a46166126da6864258bd25ff183f9a3c6261dStephen Hines        return;
267414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    }
268414a46166126da6864258bd25ff183f9a3c6261dStephen Hines
269414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    RsdHal *dc = (RsdHal *)rsc->mHal.drv;
270414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    if (!dc->gl.shaderCache->setup(rsc)) {
271414a46166126da6864258bd25ff183f9a3c6261dStephen Hines        return;
272414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    }
273414a46166126da6864258bd25ff183f9a3c6261dStephen Hines
274414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    //ALOGE("Quad");
275414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    //ALOGE("%4.2f, %4.2f, %4.2f", x1, y1, z1);
276414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    //ALOGE("%4.2f, %4.2f, %4.2f", x2, y2, z2);
277414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    //ALOGE("%4.2f, %4.2f, %4.2f", x3, y3, z3);
278414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    //ALOGE("%4.2f, %4.2f, %4.2f", x4, y4, z4);
279414a46166126da6864258bd25ff183f9a3c6261dStephen Hines
280414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    float vtx[] = {x1,y1,z1, x2,y2,z2, x3,y3,z3, x4,y4,z4};
281414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    const float tex[] = {u1,v1, u2,v2, u3,v3, u4,v4};
282414a46166126da6864258bd25ff183f9a3c6261dStephen Hines
283414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    RsdVertexArray::Attrib attribs[2];
284414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    attribs[0].set(GL_FLOAT, 3, 12, false, (uint32_t)vtx, "ATTRIB_position");
285414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    attribs[1].set(GL_FLOAT, 2, 8, false, (uint32_t)tex, "ATTRIB_texture0");
286414a46166126da6864258bd25ff183f9a3c6261dStephen Hines
287414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    RsdVertexArray va(attribs, 2);
288414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    va.setup(rsc);
289414a46166126da6864258bd25ff183f9a3c6261dStephen Hines
290414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    RSD_CALL_GL(glDrawArrays, GL_TRIANGLE_FAN, 0, 4);
29187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
29287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
29387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawQuad(float x1, float y1, float z1,
29487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams                        float x2, float y2, float z2,
29587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams                        float x3, float y3, float z3,
29687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams                        float x4, float y4, float z4) {
297414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    SC_DrawQuadTexCoords(x1, y1, z1, 0, 1,
298414a46166126da6864258bd25ff183f9a3c6261dStephen Hines                         x2, y2, z2, 1, 1,
299414a46166126da6864258bd25ff183f9a3c6261dStephen Hines                         x3, y3, z3, 1, 0,
300414a46166126da6864258bd25ff183f9a3c6261dStephen Hines                         x4, y4, z4, 0, 0);
30187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
30287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
30387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawSpriteScreenspace(float x, float y, float z, float w, float h) {
304709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
305414a46166126da6864258bd25ff183f9a3c6261dStephen Hines
306414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    ObjectBaseRef<const ProgramVertex> tmp(rsc->getProgramVertex());
307414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    rsc->setProgramVertex(rsc->getDefaultProgramVertex());
308414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    //rsc->setupCheck();
309414a46166126da6864258bd25ff183f9a3c6261dStephen Hines
310414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    //GLint crop[4] = {0, h, w, -h};
311414a46166126da6864258bd25ff183f9a3c6261dStephen Hines
312414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    float sh = rsc->getHeight();
313414a46166126da6864258bd25ff183f9a3c6261dStephen Hines
314414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    SC_DrawQuad(x,   sh - y,     z,
315414a46166126da6864258bd25ff183f9a3c6261dStephen Hines                x+w, sh - y,     z,
316414a46166126da6864258bd25ff183f9a3c6261dStephen Hines                x+w, sh - (y+h), z,
317414a46166126da6864258bd25ff183f9a3c6261dStephen Hines                x,   sh - (y+h), z);
318414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    rsc->setProgramVertex((ProgramVertex *)tmp.get());
31987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
32087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
32187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawRect(float x1, float y1, float x2, float y2, float z) {
322414a46166126da6864258bd25ff183f9a3c6261dStephen Hines    SC_DrawQuad(x1, y2, z, x2, y2, z, x2, y1, z, x1, y1, z);
32387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
32487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
3259e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Samsstatic void SC_DrawPath(Path *p) {
326709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
3279e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams    rsdPathDraw(rsc, p);
3289e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams}
3299e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams
33087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawMesh(Mesh *m) {
331709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
332709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrDrawMesh(rsc, m);
33387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
33487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
33587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawMeshPrimitive(Mesh *m, uint32_t primIndex) {
336709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
337709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrDrawMeshPrimitive(rsc, m, primIndex);
33887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
33987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
34087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawMeshPrimitiveRange(Mesh *m, uint32_t primIndex, uint32_t start, uint32_t len) {
341709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
342709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrDrawMeshPrimitiveRange(rsc, m, primIndex, start, len);
34387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
34487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
34587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_MeshComputeBoundingBox(Mesh *m,
34687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams                               float *minX, float *minY, float *minZ,
34787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams                               float *maxX, float *maxY, float *maxZ) {
348709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
349709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrMeshComputeBoundingBox(rsc, m, minX, minY, minZ, maxX, maxY, maxZ);
35087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
35187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
35287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
35387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
35487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//////////////////////////////////////////////////////////////////////////////
35587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//
35687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//////////////////////////////////////////////////////////////////////////////
35787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
35887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
35987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_Color(float r, float g, float b, float a) {
360709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
361709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrColor(rsc, r, g, b, a);
36287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
36387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
36487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_Finish() {
365709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
366653b53ebcd2bedc94ac486080d2e82e1920232e3Alex Sakhartchouk    rsdGLFinish(rsc);
36787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
36887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
36987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_ClearColor(float r, float g, float b, float a) {
370709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
371709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrPrepareClear(rsc);
372653b53ebcd2bedc94ac486080d2e82e1920232e3Alex Sakhartchouk    rsdGLClearColor(rsc, r, g, b, a);
37387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
37487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
37587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_ClearDepth(float v) {
376709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
377709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrPrepareClear(rsc);
378653b53ebcd2bedc94ac486080d2e82e1920232e3Alex Sakhartchouk    rsdGLClearDepth(rsc, v);
37987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
38087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
38187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic uint32_t SC_GetWidth() {
382709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
383709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    return rsrGetWidth(rsc);
38487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
38587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
38687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic uint32_t SC_GetHeight() {
387709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
388709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    return rsrGetHeight(rsc);
38987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
39087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
39187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawTextAlloc(Allocation *a, int x, int y) {
392709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
393709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrDrawTextAlloc(rsc, a, x, y);
39487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
39587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
39687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_DrawText(const char *text, int x, int y) {
397709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
398709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrDrawText(rsc, text, x, y);
39987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
40087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
40187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_MeasureTextAlloc(Allocation *a,
40287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams                         int32_t *left, int32_t *right, int32_t *top, int32_t *bottom) {
403709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
404709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrMeasureTextAlloc(rsc, a, left, right, top, bottom);
40587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
40687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
40787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_MeasureText(const char *text,
40887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams                    int32_t *left, int32_t *right, int32_t *top, int32_t *bottom) {
409709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
410709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrMeasureText(rsc, text, left, right, top, bottom);
41187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
41287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
41387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_BindFont(Font *f) {
414709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
415709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrBindFont(rsc, f);
41687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
41787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
41887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_FontColor(float r, float g, float b, float a) {
419709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
420709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrFontColor(rsc, r, g, b, a);
42187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
422110f181b7966212a36ef18016f9b81c7322d0a2fJason Sams#endif
42387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
42487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
42587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//////////////////////////////////////////////////////////////////////////////
42687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//
42787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//////////////////////////////////////////////////////////////////////////////
42887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
42987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_SetObject(ObjectBase **dst, ObjectBase * src) {
430709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
431709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrSetObject(rsc, dst, src);
43287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
43387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
43487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic void SC_ClearObject(ObjectBase **dst) {
435709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
436709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrClearObject(rsc, dst);
43787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
43887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
43987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic bool SC_IsObject(const ObjectBase *src) {
440709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
441709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    return rsrIsObject(rsc, src);
44287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
44387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
44487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
44587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
44687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
44787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic const Allocation * SC_GetAllocation(const void *ptr) {
448709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
449709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    const Script *sc = RsdCpuReference::getTlsScript();
450807fdc4b6f3fb893015ee136565d6151bb2332d3Jason Sams    return rsdScriptGetAllocationForPointer(rsc, sc, ptr);
45187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
45287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
453c500e74d0848b721bf01cf0ab344a6adb035c312Jason Samsstatic void SC_ForEach_SAA(Script *target,
454c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams                            Allocation *in,
455c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams                            Allocation *out) {
456709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
457709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrForEach(rsc, target, in, out, NULL, 0, NULL);
458c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams}
459c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams
460c500e74d0848b721bf01cf0ab344a6adb035c312Jason Samsstatic void SC_ForEach_SAAU(Script *target,
461c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams                            Allocation *in,
462c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams                            Allocation *out,
463c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams                            const void *usr) {
464709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
465709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrForEach(rsc, target, in, out, usr, 0, NULL);
46687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
46787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
468c500e74d0848b721bf01cf0ab344a6adb035c312Jason Samsstatic void SC_ForEach_SAAUS(Script *target,
469c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams                             Allocation *in,
470c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams                             Allocation *out,
471c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams                             const void *usr,
472c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams                             const RsScriptCall *call) {
473709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
474709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrForEach(rsc, target, in, out, usr, 0, call);
47587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
47687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
477c500e74d0848b721bf01cf0ab344a6adb035c312Jason Samsstatic void SC_ForEach_SAAUL(Script *target,
478c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams                             Allocation *in,
479c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams                             Allocation *out,
480c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams                             const void *usr,
481c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams                             uint32_t usrLen) {
482709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
483709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrForEach(rsc, target, in, out, usr, usrLen, NULL);
484c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams}
485c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams
486c500e74d0848b721bf01cf0ab344a6adb035c312Jason Samsstatic void SC_ForEach_SAAULS(Script *target,
487c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams                              Allocation *in,
488c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams                              Allocation *out,
489c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams                              const void *usr,
490c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams                              uint32_t usrLen,
491c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams                              const RsScriptCall *call) {
492709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
493709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    rsrForEach(rsc, target, in, out, usr, usrLen, call);
494c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams}
495c500e74d0848b721bf01cf0ab344a6adb035c312Jason Sams
49687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
49787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
49887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//////////////////////////////////////////////////////////////////////////////
49987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// Time routines
50087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//////////////////////////////////////////////////////////////////////////////
50187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
50287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic float SC_GetDt() {
503709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
504709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    const Script *sc = RsdCpuReference::getTlsScript();
50587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    return rsrGetDt(rsc, sc);
50687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
50787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
508d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray#ifndef RS_COMPATIBILITY_LIB
50987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samstime_t SC_Time(time_t *timer) {
510709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
511709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    return rsrTime(rsc, timer);
51287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
513d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray#else
514d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murraystatic int SC_Time(int *timer) {
515d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    Context *rsc = RsdCpuReference::getTlsContext();
516d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    return rsrTime(rsc, (long*)timer);
517d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray}
518d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray#endif
51987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
52087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samstm* SC_LocalTime(tm *local, time_t *timer) {
521709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
522709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    return rsrLocalTime(rsc, local, timer);
52387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
52487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
52587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsint64_t SC_UptimeMillis() {
526709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
527709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    return rsrUptimeMillis(rsc);
52887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
52987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
53087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsint64_t SC_UptimeNanos() {
531709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
532709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    return rsrUptimeNanos(rsc);
53387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
53487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
53587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//////////////////////////////////////////////////////////////////////////////
53687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// Message routines
53787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//////////////////////////////////////////////////////////////////////////////
53887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
53987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic uint32_t SC_ToClient2(int cmdID, void *data, int len) {
540709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
541709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    return rsrToClient(rsc, cmdID, data, len);
54287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
54387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
54487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic uint32_t SC_ToClient(int cmdID) {
545709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
546709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    return rsrToClient(rsc, cmdID, NULL, 0);
54787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
54887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
54987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic uint32_t SC_ToClientBlocking2(int cmdID, void *data, int len) {
550709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
551709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    return rsrToClientBlocking(rsc, cmdID, data, len);
55287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
55387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
55487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Samsstatic uint32_t SC_ToClientBlocking(int cmdID) {
555709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
556709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    return rsrToClientBlocking(rsc, cmdID, NULL, 0);
55787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
55887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
55987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
5605261a5ea546ff358edd5aac7602fc4132434f481Jason Samsstatic void * ElementAt1D(Allocation *a, RsDataType dt, uint32_t vecSize, uint32_t x) {
5615261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
5625261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    const Type *t = a->getType();
5635261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    const Element *e = t->getElement();
5645261a5ea546ff358edd5aac7602fc4132434f481Jason Sams
5655261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    char buf[256];
5665261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    if (x >= t->getLODDimX(0)) {
5675261a5ea546ff358edd5aac7602fc4132434f481Jason Sams        sprintf(buf, "Out range ElementAt X %i of %i", x, t->getLODDimX(0));
568cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines        rsc->setError(RS_ERROR_FATAL_DEBUG, buf);
5695261a5ea546ff358edd5aac7602fc4132434f481Jason Sams        return NULL;
5705261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    }
5715261a5ea546ff358edd5aac7602fc4132434f481Jason Sams
572d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    if (vecSize > 0) {
573d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        if (vecSize != e->getVectorSize()) {
574d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams            sprintf(buf, "Vector size mismatch for ElementAt %i of %i", vecSize, e->getVectorSize());
575cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines            rsc->setError(RS_ERROR_FATAL_DEBUG, buf);
576d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams            return NULL;
577d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        }
578d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
579d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        if (dt != e->getType()) {
580d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams            sprintf(buf, "Data type mismatch for ElementAt %i of %i", dt, e->getType());
581cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines            rsc->setError(RS_ERROR_FATAL_DEBUG, buf);
582d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams            return NULL;
583d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        }
5845261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    }
5855261a5ea546ff358edd5aac7602fc4132434f481Jason Sams
5865261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    uint8_t *p = (uint8_t *)a->mHal.drvState.lod[0].mallocPtr;
5875261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    const uint32_t eSize = e->getSizeBytes();
5885261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    return &p[(eSize * x)];
5895261a5ea546ff358edd5aac7602fc4132434f481Jason Sams}
5905261a5ea546ff358edd5aac7602fc4132434f481Jason Sams
5915261a5ea546ff358edd5aac7602fc4132434f481Jason Samsstatic void * ElementAt2D(Allocation *a, RsDataType dt, uint32_t vecSize, uint32_t x, uint32_t y) {
5925261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
5935261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    const Type *t = a->getType();
5945261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    const Element *e = t->getElement();
5955261a5ea546ff358edd5aac7602fc4132434f481Jason Sams
5965261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    char buf[256];
5975261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    if (x >= t->getLODDimX(0)) {
5985261a5ea546ff358edd5aac7602fc4132434f481Jason Sams        sprintf(buf, "Out range ElementAt X %i of %i", x, t->getLODDimX(0));
599cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines        rsc->setError(RS_ERROR_FATAL_DEBUG, buf);
6005261a5ea546ff358edd5aac7602fc4132434f481Jason Sams        return NULL;
6015261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    }
6025261a5ea546ff358edd5aac7602fc4132434f481Jason Sams
6035261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    if (y >= t->getLODDimY(0)) {
6045261a5ea546ff358edd5aac7602fc4132434f481Jason Sams        sprintf(buf, "Out range ElementAt Y %i of %i", y, t->getLODDimY(0));
605cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines        rsc->setError(RS_ERROR_FATAL_DEBUG, buf);
6065261a5ea546ff358edd5aac7602fc4132434f481Jason Sams        return NULL;
6075261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    }
6085261a5ea546ff358edd5aac7602fc4132434f481Jason Sams
609d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    if (vecSize > 0) {
610d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        if (vecSize != e->getVectorSize()) {
611d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams            sprintf(buf, "Vector size mismatch for ElementAt %i of %i", vecSize, e->getVectorSize());
612cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines            rsc->setError(RS_ERROR_FATAL_DEBUG, buf);
613d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams            return NULL;
614d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        }
615d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
616d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        if (dt != e->getType()) {
617d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams            sprintf(buf, "Data type mismatch for ElementAt %i of %i", dt, e->getType());
618cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines            rsc->setError(RS_ERROR_FATAL_DEBUG, buf);
619d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams            return NULL;
620d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        }
6215261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    }
6225261a5ea546ff358edd5aac7602fc4132434f481Jason Sams
6235261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    uint8_t *p = (uint8_t *)a->mHal.drvState.lod[0].mallocPtr;
6245261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    const uint32_t eSize = e->getSizeBytes();
6255261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    const uint32_t stride = a->mHal.drvState.lod[0].stride;
6265261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    return &p[(eSize * x) + (y * stride)];
6275261a5ea546ff358edd5aac7602fc4132434f481Jason Sams}
6285261a5ea546ff358edd5aac7602fc4132434f481Jason Sams
6295261a5ea546ff358edd5aac7602fc4132434f481Jason Samsstatic void * ElementAt3D(Allocation *a, RsDataType dt, uint32_t vecSize, uint32_t x, uint32_t y, uint32_t z) {
6305261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    Context *rsc = RsdCpuReference::getTlsContext();
6315261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    const Type *t = a->getType();
6325261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    const Element *e = t->getElement();
6335261a5ea546ff358edd5aac7602fc4132434f481Jason Sams
6345261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    char buf[256];
6355261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    if (x >= t->getLODDimX(0)) {
6365261a5ea546ff358edd5aac7602fc4132434f481Jason Sams        sprintf(buf, "Out range ElementAt X %i of %i", x, t->getLODDimX(0));
637cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines        rsc->setError(RS_ERROR_FATAL_DEBUG, buf);
6385261a5ea546ff358edd5aac7602fc4132434f481Jason Sams        return NULL;
6395261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    }
6405261a5ea546ff358edd5aac7602fc4132434f481Jason Sams
6415261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    if (y >= t->getLODDimY(0)) {
6425261a5ea546ff358edd5aac7602fc4132434f481Jason Sams        sprintf(buf, "Out range ElementAt Y %i of %i", y, t->getLODDimY(0));
643cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines        rsc->setError(RS_ERROR_FATAL_DEBUG, buf);
6445261a5ea546ff358edd5aac7602fc4132434f481Jason Sams        return NULL;
6455261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    }
6465261a5ea546ff358edd5aac7602fc4132434f481Jason Sams
6475261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    if (z >= t->getLODDimZ(0)) {
6485261a5ea546ff358edd5aac7602fc4132434f481Jason Sams        sprintf(buf, "Out range ElementAt Z %i of %i", z, t->getLODDimZ(0));
649cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines        rsc->setError(RS_ERROR_FATAL_DEBUG, buf);
6505261a5ea546ff358edd5aac7602fc4132434f481Jason Sams        return NULL;
6515261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    }
6525261a5ea546ff358edd5aac7602fc4132434f481Jason Sams
653d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    if (vecSize > 0) {
654d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        if (vecSize != e->getVectorSize()) {
655d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams            sprintf(buf, "Vector size mismatch for ElementAt %i of %i", vecSize, e->getVectorSize());
656cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines            rsc->setError(RS_ERROR_FATAL_DEBUG, buf);
657d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams            return NULL;
658d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        }
659d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
660d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        if (dt != e->getType()) {
661d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams            sprintf(buf, "Data type mismatch for ElementAt %i of %i", dt, e->getType());
662cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines            rsc->setError(RS_ERROR_FATAL_DEBUG, buf);
663d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams            return NULL;
664d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        }
6655261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    }
6665261a5ea546ff358edd5aac7602fc4132434f481Jason Sams
6675261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    uint8_t *p = (uint8_t *)a->mHal.drvState.lod[0].mallocPtr;
6685261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    const uint32_t eSize = e->getSizeBytes();
6695261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    const uint32_t stride = a->mHal.drvState.lod[0].stride;
6705261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    return &p[(eSize * x) + (y * stride)];
6715261a5ea546ff358edd5aac7602fc4132434f481Jason Sams}
6725261a5ea546ff358edd5aac7602fc4132434f481Jason Sams
673d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Samsstatic const void * SC_GetElementAt1D(Allocation *a, uint32_t x) {
674d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    return ElementAt1D(a, RS_TYPE_UNSIGNED_8, 0, x);
675d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams}
676d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Samsstatic const void * SC_GetElementAt2D(Allocation *a, uint32_t x, uint32_t y) {
677d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    return ElementAt2D(a, RS_TYPE_UNSIGNED_8, 0, x, y);
678d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams}
679d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Samsstatic const void * SC_GetElementAt3D(Allocation *a, uint32_t x, uint32_t y, uint32_t z) {
680d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    return ElementAt3D(a, RS_TYPE_UNSIGNED_8, 0, x, y, z);
681d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams}
682d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
683d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Samsstatic void SC_SetElementAt1D(Allocation *a, const void *ptr, uint32_t x) {
684d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    const Type *t = a->getType();
685d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    const Element *e = t->getElement();
686d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    void *tmp = ElementAt1D(a, RS_TYPE_UNSIGNED_8, 0, x);
687d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    if (tmp != NULL) {
688d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        memcpy(tmp, ptr, e->getSizeBytes());
689d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    }
690d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams}
691d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Samsstatic void SC_SetElementAt2D(Allocation *a, const void *ptr, uint32_t x, uint32_t y) {
692d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    const Type *t = a->getType();
693d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    const Element *e = t->getElement();
694d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    void *tmp = ElementAt2D(a, RS_TYPE_UNSIGNED_8, 0, x, y);
695d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    if (tmp != NULL) {
696d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        memcpy(tmp, ptr, e->getSizeBytes());
697d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    }
698d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams}
699d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Samsstatic void SC_SetElementAt3D(Allocation *a, const void *ptr, uint32_t x, uint32_t y, uint32_t z) {
700d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    const Type *t = a->getType();
701d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    const Element *e = t->getElement();
702d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    void *tmp = ElementAt3D(a, RS_TYPE_UNSIGNED_8, 0, x, y, z);
703d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    if (tmp != NULL) {
704d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        memcpy(tmp, ptr, e->getSizeBytes());
705d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    }
706d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams}
707d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
7085261a5ea546ff358edd5aac7602fc4132434f481Jason Sams#define ELEMENT_AT(T, DT, VS)                                               \
709d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    static void SC_SetElementAt1_##T(Allocation *a, const T *val, uint32_t x) {           \
7105261a5ea546ff358edd5aac7602fc4132434f481Jason Sams        void *r = ElementAt1D(a, DT, VS, x);                            \
711d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        if (r != NULL) ((T *)r)[0] = *val;                               \
7125261a5ea546ff358edd5aac7602fc4132434f481Jason Sams        else ALOGE("Error from %s", __PRETTY_FUNCTION__);               \
7135261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    }                                                                   \
714d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    static void SC_SetElementAt2_##T(Allocation * a, const T * val, uint32_t x, uint32_t y) { \
7155261a5ea546ff358edd5aac7602fc4132434f481Jason Sams        void *r = ElementAt2D(a, DT, VS, x, y);            \
716d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        if (r != NULL) ((T *)r)[0] = *val;                               \
7175261a5ea546ff358edd5aac7602fc4132434f481Jason Sams        else ALOGE("Error from %s", __PRETTY_FUNCTION__);               \
7185261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    }                                                                   \
719d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    static void SC_SetElementAt3_##T(Allocation * a, const T * val, uint32_t x, uint32_t y, uint32_t z) { \
7205261a5ea546ff358edd5aac7602fc4132434f481Jason Sams        void *r = ElementAt3D(a, DT, VS, x, y, z);         \
721d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        if (r != NULL) ((T *)r)[0] = *val;                               \
7225261a5ea546ff358edd5aac7602fc4132434f481Jason Sams        else ALOGE("Error from %s", __PRETTY_FUNCTION__);               \
7235261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    }                                                                   \
724d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    static void SC_GetElementAt1_##T(Allocation * a, T *val, uint32_t x) {                  \
7255261a5ea546ff358edd5aac7602fc4132434f481Jason Sams        void *r = ElementAt1D(a, DT, VS, x);               \
726d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        if (r != NULL) *val = ((T *)r)[0];                              \
727d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        else ALOGE("Error from %s", __PRETTY_FUNCTION__);                    \
7285261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    }                                                                   \
729d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    static void SC_GetElementAt2_##T(Allocation * a, T *val, uint32_t x, uint32_t y) {      \
7305261a5ea546ff358edd5aac7602fc4132434f481Jason Sams        void *r = ElementAt2D(a, DT, VS, x, y);            \
731d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        if (r != NULL) *val = ((T *)r)[0];                              \
732d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        else ALOGE("Error from %s", __PRETTY_FUNCTION__);                    \
7335261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    }                                                                   \
734d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    static void SC_GetElementAt3_##T(Allocation * a, T *val, uint32_t x, uint32_t y, uint32_t z) { \
7355261a5ea546ff358edd5aac7602fc4132434f481Jason Sams        void *r = ElementAt3D(a, DT, VS, x, y, z);         \
736d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        if (r != NULL) *val = ((T *)r)[0];                              \
737d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams        else ALOGE("Error from %s", __PRETTY_FUNCTION__);                    \
7385261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    }
7395261a5ea546ff358edd5aac7602fc4132434f481Jason Sams
7405261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(char, RS_TYPE_SIGNED_8, 1)
7415261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(char2, RS_TYPE_SIGNED_8, 2)
7425261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(char3, RS_TYPE_SIGNED_8, 3)
7435261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(char4, RS_TYPE_SIGNED_8, 4)
7445261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uchar, RS_TYPE_UNSIGNED_8, 1)
7455261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uchar2, RS_TYPE_UNSIGNED_8, 2)
7465261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uchar3, RS_TYPE_UNSIGNED_8, 3)
7475261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uchar4, RS_TYPE_UNSIGNED_8, 4)
7485261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(short, RS_TYPE_SIGNED_16, 1)
7495261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(short2, RS_TYPE_SIGNED_16, 2)
7505261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(short3, RS_TYPE_SIGNED_16, 3)
7515261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(short4, RS_TYPE_SIGNED_16, 4)
7525261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ushort, RS_TYPE_UNSIGNED_16, 1)
7535261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ushort2, RS_TYPE_UNSIGNED_16, 2)
7545261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ushort3, RS_TYPE_UNSIGNED_16, 3)
7555261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ushort4, RS_TYPE_UNSIGNED_16, 4)
7565261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(int, RS_TYPE_SIGNED_32, 1)
7575261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(int2, RS_TYPE_SIGNED_32, 2)
7585261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(int3, RS_TYPE_SIGNED_32, 3)
7595261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(int4, RS_TYPE_SIGNED_32, 4)
7605261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uint, RS_TYPE_UNSIGNED_32, 1)
7615261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uint2, RS_TYPE_UNSIGNED_32, 2)
7625261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uint3, RS_TYPE_UNSIGNED_32, 3)
7635261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(uint4, RS_TYPE_UNSIGNED_32, 4)
7645261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(long, RS_TYPE_SIGNED_64, 1)
7655261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(long2, RS_TYPE_SIGNED_64, 2)
7665261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(long3, RS_TYPE_SIGNED_64, 3)
7675261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(long4, RS_TYPE_SIGNED_64, 4)
7685261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ulong, RS_TYPE_UNSIGNED_64, 1)
7695261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ulong2, RS_TYPE_UNSIGNED_64, 2)
7705261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ulong3, RS_TYPE_UNSIGNED_64, 3)
7715261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(ulong4, RS_TYPE_UNSIGNED_64, 4)
7725261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(float, RS_TYPE_FLOAT_32, 1)
7735261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(float2, RS_TYPE_FLOAT_32, 2)
7745261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(float3, RS_TYPE_FLOAT_32, 3)
7755261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(float4, RS_TYPE_FLOAT_32, 4)
7765261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(double, RS_TYPE_FLOAT_64, 1)
7775261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(double2, RS_TYPE_FLOAT_64, 2)
7785261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(double3, RS_TYPE_FLOAT_64, 3)
7795261a5ea546ff358edd5aac7602fc4132434f481Jason SamsELEMENT_AT(double4, RS_TYPE_FLOAT_64, 4)
7805261a5ea546ff358edd5aac7602fc4132434f481Jason Sams
7815261a5ea546ff358edd5aac7602fc4132434f481Jason Sams#undef ELEMENT_AT
78287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
78387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//////////////////////////////////////////////////////////////////////////////
78487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// Stub implementation
78587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//////////////////////////////////////////////////////////////////////////////
78687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
78787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams// llvm name mangling ref
78887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//  <builtin-type> ::= v  # void
78987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//                 ::= b  # bool
79087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//                 ::= c  # char
79187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//                 ::= a  # signed char
79287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//                 ::= h  # unsigned char
79387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//                 ::= s  # short
79487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//                 ::= t  # unsigned short
79587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//                 ::= i  # int
79687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//                 ::= j  # unsigned int
79787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//                 ::= l  # long
79887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//                 ::= m  # unsigned long
79987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//                 ::= x  # long long, __int64
80087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//                 ::= y  # unsigned long long, __int64
80187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//                 ::= f  # float
80287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams//                 ::= d  # double
80387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
804709a0978ae141198018ca9769f8d96292a8928e6Jason Samsstatic RsdCpuReference::CpuSymbol gSyms[] = {
8055261a5ea546ff358edd5aac7602fc4132434f481Jason Sams    // Debug runtime
806d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z14rsGetElementAt13rs_allocationj", (void *)&SC_GetElementAt1D, true },
807d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z14rsGetElementAt13rs_allocationjj", (void *)&SC_GetElementAt2D, true },
808d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z14rsGetElementAt13rs_allocationjjj", (void *)&SC_GetElementAt3D, true },
809d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z14rsSetElementAt13rs_allocationPKvj", (void *)&SC_SetElementAt1D, true },
810d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z14rsSetElementAt13rs_allocationPKvjj", (void *)&SC_SetElementAt2D, true },
811d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z14rsSetElementAt13rs_allocationPKvjjj", (void *)&SC_SetElementAt3D, true },
812d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
813d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
814d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_uchar13rs_allocationPhj", (void *)&SC_GetElementAt1_uchar, true },
815d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_uchar213rs_allocationPDv2_hj", (void *)&SC_GetElementAt1_uchar2, true },
816d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_uchar313rs_allocationPDv3_hj", (void *)&SC_GetElementAt1_uchar3, true },
817d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_uchar413rs_allocationPDv4_hj", (void *)&SC_GetElementAt1_uchar4, true },
818d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_uchar13rs_allocationPhjj", (void *)&SC_GetElementAt2_uchar, true },
819d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_uchar213rs_allocationPDv2_hjj", (void *)&SC_GetElementAt2_uchar2, true },
820d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_uchar313rs_allocationPDv3_hjj", (void *)&SC_GetElementAt2_uchar3, true },
821d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_uchar413rs_allocationPDv4_hjj", (void *)&SC_GetElementAt2_uchar4, true },
822d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_uchar13rs_allocationPhjjj", (void *)&SC_GetElementAt3_uchar, true },
823d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_uchar213rs_allocationPDv2_hjjj", (void *)&SC_GetElementAt3_uchar2, true },
824d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_uchar313rs_allocationPDv3_hjjj", (void *)&SC_GetElementAt3_uchar3, true },
825d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_uchar413rs_allocationPDv4_hjjj", (void *)&SC_GetElementAt3_uchar4, true },
826d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
827d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsGetElementAt_char13rs_allocationPcj", (void *)&SC_GetElementAt1_char, true },
828d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_char213rs_allocationPDv2_cj", (void *)&SC_GetElementAt1_char2, true },
829d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_char313rs_allocationPDv3_cj", (void *)&SC_GetElementAt1_char3, true },
830d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_char413rs_allocationPDv4_cj", (void *)&SC_GetElementAt1_char4, true },
831d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsGetElementAt_char13rs_allocationPcjj", (void *)&SC_GetElementAt2_char, true },
832d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_char213rs_allocationPDv2_cjj", (void *)&SC_GetElementAt2_char2, true },
833d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_char313rs_allocationPDv3_cjj", (void *)&SC_GetElementAt2_char3, true },
834d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_char413rs_allocationPDv4_cjj", (void *)&SC_GetElementAt2_char4, true },
835d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsGetElementAt_char13rs_allocationPcjjj", (void *)&SC_GetElementAt3_char, true },
836d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_char213rs_allocationPDv2_cjjj", (void *)&SC_GetElementAt3_char2, true },
837d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_char313rs_allocationPDv3_cjjj", (void *)&SC_GetElementAt3_char3, true },
838d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_char413rs_allocationPDv4_cjjj", (void *)&SC_GetElementAt3_char4, true },
839d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
840d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_ushort13rs_allocationPtj", (void *)&SC_GetElementAt1_ushort, true },
841d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsGetElementAt_ushort213rs_allocationPDv2_tj", (void *)&SC_GetElementAt1_ushort2, true },
842d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsGetElementAt_ushort313rs_allocationPDv3_tj", (void *)&SC_GetElementAt1_ushort3, true },
843d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsGetElementAt_ushort413rs_allocationPDv4_tj", (void *)&SC_GetElementAt1_ushort4, true },
844d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_ushort13rs_allocationPtjj", (void *)&SC_GetElementAt2_ushort, true },
845d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsGetElementAt_ushort213rs_allocationPDv2_tjj", (void *)&SC_GetElementAt2_ushort2, true },
846d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsGetElementAt_ushort313rs_allocationPDv3_tjj", (void *)&SC_GetElementAt2_ushort3, true },
847d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsGetElementAt_ushort413rs_allocationPDv4_tjj", (void *)&SC_GetElementAt2_ushort4, true },
848d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_ushort13rs_allocationPtjjj", (void *)&SC_GetElementAt3_ushort, true },
849d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsGetElementAt_ushort213rs_allocationPDv2_tjjj", (void *)&SC_GetElementAt3_ushort2, true },
850d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsGetElementAt_ushort313rs_allocationPDv3_tjjj", (void *)&SC_GetElementAt3_ushort3, true },
851d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsGetElementAt_ushort413rs_allocationPDv4_tjjj", (void *)&SC_GetElementAt3_ushort4, true },
852d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
853d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_short13rs_allocationPsj", (void *)&SC_GetElementAt1_short, true },
854d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_short213rs_allocationPDv2_sj", (void *)&SC_GetElementAt1_short2, true },
855d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_short313rs_allocationPDv3_sj", (void *)&SC_GetElementAt1_short3, true },
856d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_short413rs_allocationPDv4_sj", (void *)&SC_GetElementAt1_short4, true },
857d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_short13rs_allocationPsjj", (void *)&SC_GetElementAt2_short, true },
858d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_short213rs_allocationPDv2_sjj", (void *)&SC_GetElementAt2_short2, true },
859d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_short313rs_allocationPDv3_sjj", (void *)&SC_GetElementAt2_short3, true },
860d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_short413rs_allocationPDv4_sjj", (void *)&SC_GetElementAt2_short4, true },
861d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_short13rs_allocationPsjjj", (void *)&SC_GetElementAt3_short, true },
862d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_short213rs_allocationPDv2_sjjj", (void *)&SC_GetElementAt3_short2, true },
863d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_short313rs_allocationPDv3_sjjj", (void *)&SC_GetElementAt3_short3, true },
864d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_short413rs_allocationPDv4_sjjj", (void *)&SC_GetElementAt3_short4, true },
865d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
866d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsGetElementAt_uint13rs_allocationPjj", (void *)&SC_GetElementAt1_uint, true },
867d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_uint213rs_allocationPDv2_jj", (void *)&SC_GetElementAt1_uint2, true },
868d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_uint313rs_allocationPDv3_jj", (void *)&SC_GetElementAt1_uint3, true },
869d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_uint413rs_allocationPDv4_jj", (void *)&SC_GetElementAt1_uint4, true },
870d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsGetElementAt_uint13rs_allocationPjjj", (void *)&SC_GetElementAt2_uint, true },
871d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_uint213rs_allocationPDv2_jjj", (void *)&SC_GetElementAt2_uint2, true },
872d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_uint313rs_allocationPDv3_jjj", (void *)&SC_GetElementAt2_uint3, true },
873d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_uint413rs_allocationPDv4_jjj", (void *)&SC_GetElementAt2_uint4, true },
874d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsGetElementAt_uint13rs_allocationPjjjj", (void *)&SC_GetElementAt3_uint, true },
875d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_uint213rs_allocationPDv2_jjjj", (void *)&SC_GetElementAt3_uint2, true },
876d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_uint313rs_allocationPDv3_jjjj", (void *)&SC_GetElementAt3_uint3, true },
877d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_uint413rs_allocationPDv4_jjjj", (void *)&SC_GetElementAt3_uint4, true },
878d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
879d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z18rsGetElementAt_int13rs_allocationPij", (void *)&SC_GetElementAt1_int, true },
880d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsGetElementAt_int213rs_allocationPDv2_ij", (void *)&SC_GetElementAt1_int2, true },
881d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsGetElementAt_int313rs_allocationPDv3_ij", (void *)&SC_GetElementAt1_int3, true },
882d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsGetElementAt_int413rs_allocationPDv4_ij", (void *)&SC_GetElementAt1_int4, true },
883d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z18rsGetElementAt_int13rs_allocationPijj", (void *)&SC_GetElementAt2_int, true },
884d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsGetElementAt_int213rs_allocationPDv2_ijj", (void *)&SC_GetElementAt2_int2, true },
885d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsGetElementAt_int313rs_allocationPDv3_ijj", (void *)&SC_GetElementAt2_int3, true },
886d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsGetElementAt_int413rs_allocationPDv4_ijj", (void *)&SC_GetElementAt2_int4, true },
887d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z18rsGetElementAt_int13rs_allocationPijjj", (void *)&SC_GetElementAt3_int, true },
888d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsGetElementAt_int213rs_allocationPDv2_ijjj", (void *)&SC_GetElementAt3_int2, true },
889d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsGetElementAt_int313rs_allocationPDv3_ijjj", (void *)&SC_GetElementAt3_int3, true },
890d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsGetElementAt_int413rs_allocationPDv4_ijjj", (void *)&SC_GetElementAt3_int4, true },
891d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
892d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_ulong13rs_allocationPmj", (void *)&SC_GetElementAt1_ulong, true },
893d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_ulong213rs_allocationPDv2_mj", (void *)&SC_GetElementAt1_ulong2, true },
894d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_ulong313rs_allocationPDv3_mj", (void *)&SC_GetElementAt1_ulong3, true },
895d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_ulong413rs_allocationPDv4_mj", (void *)&SC_GetElementAt1_ulong4, true },
896d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_ulong13rs_allocationPmjj", (void *)&SC_GetElementAt2_ulong, true },
897d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_ulong213rs_allocationPDv2_mjj", (void *)&SC_GetElementAt2_ulong2, true },
898d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_ulong313rs_allocationPDv3_mjj", (void *)&SC_GetElementAt2_ulong3, true },
899d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_ulong413rs_allocationPDv4_mjj", (void *)&SC_GetElementAt2_ulong4, true },
900d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_ulong13rs_allocationPmjjj", (void *)&SC_GetElementAt3_ulong, true },
901d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_ulong213rs_allocationPDv2_mjjj", (void *)&SC_GetElementAt3_ulong2, true },
902d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_ulong313rs_allocationPDv3_mjjj", (void *)&SC_GetElementAt3_ulong3, true },
903d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_ulong413rs_allocationPDv4_mjjj", (void *)&SC_GetElementAt3_ulong4, true },
904d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
905d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsGetElementAt_long13rs_allocationPlj", (void *)&SC_GetElementAt1_long, true },
906d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_long213rs_allocationPDv2_lj", (void *)&SC_GetElementAt1_long2, true },
907d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_long313rs_allocationPDv3_lj", (void *)&SC_GetElementAt1_long3, true },
908d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_long413rs_allocationPDv4_lj", (void *)&SC_GetElementAt1_long4, true },
909d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsGetElementAt_long13rs_allocationPljj", (void *)&SC_GetElementAt2_long, true },
910d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_long213rs_allocationPDv2_ljj", (void *)&SC_GetElementAt2_long2, true },
911d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_long313rs_allocationPDv3_ljj", (void *)&SC_GetElementAt2_long3, true },
912d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_long413rs_allocationPDv4_ljj", (void *)&SC_GetElementAt2_long4, true },
913d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsGetElementAt_long13rs_allocationPljjj", (void *)&SC_GetElementAt3_long, true },
914d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_long213rs_allocationPDv2_ljjj", (void *)&SC_GetElementAt3_long2, true },
915d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_long313rs_allocationPDv3_ljjj", (void *)&SC_GetElementAt3_long3, true },
916d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_long413rs_allocationPDv4_ljjj", (void *)&SC_GetElementAt3_long4, true },
917d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
918d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_float13rs_allocationPfj", (void *)&SC_GetElementAt1_float, true },
919d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_float213rs_allocationPDv2_fj", (void *)&SC_GetElementAt1_float2, true },
920d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_float313rs_allocationPDv3_fj", (void *)&SC_GetElementAt1_float3, true },
921d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_float413rs_allocationPDv4_fj", (void *)&SC_GetElementAt1_float4, true },
922d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_float13rs_allocationPfjj", (void *)&SC_GetElementAt2_float, true },
923d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_float213rs_allocationPDv2_fjj", (void *)&SC_GetElementAt2_float2, true },
924d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_float313rs_allocationPDv3_fjj", (void *)&SC_GetElementAt2_float3, true },
925d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_float413rs_allocationPDv4_fjj", (void *)&SC_GetElementAt2_float4, true },
926d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsGetElementAt_float13rs_allocationPfjjj", (void *)&SC_GetElementAt3_float, true },
927d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_float213rs_allocationPDv2_fjjj", (void *)&SC_GetElementAt3_float2, true },
928d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_float313rs_allocationPDv3_fjjj", (void *)&SC_GetElementAt3_float3, true },
929d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_float413rs_allocationPDv4_fjjj", (void *)&SC_GetElementAt3_float4, true },
930d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
931d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_double13rs_allocationPdj", (void *)&SC_GetElementAt1_double, true },
932d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsGetElementAt_double213rs_allocationPDv2_dj", (void *)&SC_GetElementAt1_double2, true },
933d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsGetElementAt_double313rs_allocationPDv3_dj", (void *)&SC_GetElementAt1_double3, true },
934d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsGetElementAt_double413rs_allocationPDv4_dj", (void *)&SC_GetElementAt1_double4, true },
935d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_double13rs_allocationPdjj", (void *)&SC_GetElementAt2_double, true },
936d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsGetElementAt_double213rs_allocationPDv2_djj", (void *)&SC_GetElementAt2_double2, true },
937d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsGetElementAt_double313rs_allocationPDv3_djj", (void *)&SC_GetElementAt2_double3, true },
938d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsGetElementAt_double413rs_allocationPDv4_djj", (void *)&SC_GetElementAt2_double4, true },
939d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsGetElementAt_double13rs_allocationPdjjj", (void *)&SC_GetElementAt3_double, true },
940d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsGetElementAt_double213rs_allocationPDv2_djjj", (void *)&SC_GetElementAt3_double2, true },
941d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsGetElementAt_double313rs_allocationPDv3_djjj", (void *)&SC_GetElementAt3_double3, true },
942d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsGetElementAt_double413rs_allocationPDv4_djjj", (void *)&SC_GetElementAt3_double4, true },
943d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
944d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
945d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
946d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_uchar13rs_allocationPKhj", (void *)&SC_SetElementAt1_uchar, true },
947d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_uchar213rs_allocationPKDv2_hj", (void *)&SC_SetElementAt1_uchar2, true },
948d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_uchar313rs_allocationPKDv3_hj", (void *)&SC_SetElementAt1_uchar3, true },
949d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_uchar413rs_allocationPKDv4_hj", (void *)&SC_SetElementAt1_uchar4, true },
950d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_uchar13rs_allocationPKhjj", (void *)&SC_SetElementAt2_uchar, true },
951d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_uchar213rs_allocationPKDv2_hjj", (void *)&SC_SetElementAt2_uchar2, true },
952d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_uchar313rs_allocationPKDv3_hjj", (void *)&SC_SetElementAt2_uchar3, true },
953d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_uchar413rs_allocationPKDv4_hjj", (void *)&SC_SetElementAt2_uchar4, true },
954d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_uchar13rs_allocationPKhjjj", (void *)&SC_SetElementAt3_uchar, true },
955d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_uchar213rs_allocationPKDv2_hjjj", (void *)&SC_SetElementAt3_uchar2, true },
956d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_uchar313rs_allocationPKDv3_hjjj", (void *)&SC_SetElementAt3_uchar3, true },
957d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_uchar413rs_allocationPKDv4_hjjj", (void *)&SC_SetElementAt3_uchar4, true },
958d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
959d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsSetElementAt_char13rs_allocationPKcj", (void *)&SC_SetElementAt1_char, true },
960d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_char213rs_allocationPKDv2_cj", (void *)&SC_SetElementAt1_char2, true },
961d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_char313rs_allocationPKDv3_cj", (void *)&SC_SetElementAt1_char3, true },
962d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_char413rs_allocationPKDv4_cj", (void *)&SC_SetElementAt1_char4, true },
963d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsSetElementAt_char13rs_allocationPKcjj", (void *)&SC_SetElementAt2_char, true },
964d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_char213rs_allocationPKDv2_cjj", (void *)&SC_SetElementAt2_char2, true },
965d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_char313rs_allocationPKDv3_cjj", (void *)&SC_SetElementAt2_char3, true },
966d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_char413rs_allocationPKDv4_cjj", (void *)&SC_SetElementAt2_char4, true },
967d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsSetElementAt_char13rs_allocationPKcjjj", (void *)&SC_SetElementAt3_char, true },
968d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_char213rs_allocationPKDv2_cjjj", (void *)&SC_SetElementAt3_char2, true },
969d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_char313rs_allocationPKDv3_cjjj", (void *)&SC_SetElementAt3_char3, true },
970d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_char413rs_allocationPKDv4_cjjj", (void *)&SC_SetElementAt3_char4, true },
971d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
972d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_ushort13rs_allocationPKht", (void *)&SC_SetElementAt1_ushort, true },
973d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsSetElementAt_ushort213rs_allocationPKDv2_tj", (void *)&SC_SetElementAt1_ushort2, true },
974d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsSetElementAt_ushort313rs_allocationPKDv3_tj", (void *)&SC_SetElementAt1_ushort3, true },
975d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsSetElementAt_ushort413rs_allocationPKDv4_tj", (void *)&SC_SetElementAt1_ushort4, true },
976d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_ushort13rs_allocationPKtjj", (void *)&SC_SetElementAt2_ushort, true },
977d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsSetElementAt_ushort213rs_allocationPKDv2_tjj", (void *)&SC_SetElementAt2_ushort2, true },
978d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsSetElementAt_ushort313rs_allocationPKDv3_tjj", (void *)&SC_SetElementAt2_ushort3, true },
979d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsSetElementAt_ushort413rs_allocationPKDv4_tjj", (void *)&SC_SetElementAt2_ushort4, true },
980d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_ushort13rs_allocationPKtjjj", (void *)&SC_SetElementAt3_ushort, true },
981d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsSetElementAt_ushort213rs_allocationPKDv2_tjjj", (void *)&SC_SetElementAt3_ushort2, true },
982d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsSetElementAt_ushort313rs_allocationPKDv3_tjjj", (void *)&SC_SetElementAt3_ushort3, true },
983d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsSetElementAt_ushort413rs_allocationPKDv4_tjjj", (void *)&SC_SetElementAt3_ushort4, true },
984d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
985d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_short13rs_allocationPKsj", (void *)&SC_SetElementAt1_short, true },
986d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_short213rs_allocationPKDv2_sj", (void *)&SC_SetElementAt1_short2, true },
987d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_short313rs_allocationPKDv3_sj", (void *)&SC_SetElementAt1_short3, true },
988d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_short413rs_allocationPKDv4_sj", (void *)&SC_SetElementAt1_short4, true },
989d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_short13rs_allocationPKsjj", (void *)&SC_SetElementAt2_short, true },
990d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_short213rs_allocationPKDv2_sjj", (void *)&SC_SetElementAt2_short2, true },
991d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_short313rs_allocationPKDv3_sjj", (void *)&SC_SetElementAt2_short3, true },
992d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_short413rs_allocationPKDv4_sjj", (void *)&SC_SetElementAt2_short4, true },
993d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_short13rs_allocationPKsjjj", (void *)&SC_SetElementAt3_short, true },
994d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_short213rs_allocationPKDv2_sjjj", (void *)&SC_SetElementAt3_short2, true },
995d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_short313rs_allocationPKDv3_sjjj", (void *)&SC_SetElementAt3_short3, true },
996d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_short413rs_allocationPKDv4_sjjj", (void *)&SC_SetElementAt3_short4, true },
997d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
998d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsSetElementAt_uint13rs_allocationPKjj", (void *)&SC_SetElementAt1_uint, true },
999d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_uint213rs_allocationPKDv2_jj", (void *)&SC_SetElementAt1_uint2, true },
1000d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_uint313rs_allocationPKDv3_jj", (void *)&SC_SetElementAt1_uint3, true },
1001d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_uint413rs_allocationPKDv4_jj", (void *)&SC_SetElementAt1_uint4, true },
1002d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsSetElementAt_uint13rs_allocationPKjjj", (void *)&SC_SetElementAt2_uint, true },
1003d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_uint213rs_allocationPKDv2_jjj", (void *)&SC_SetElementAt2_uint2, true },
1004d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_uint313rs_allocationPKDv3_jjj", (void *)&SC_SetElementAt2_uint3, true },
1005d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_uint413rs_allocationPKDv4_jjj", (void *)&SC_SetElementAt2_uint4, true },
1006d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsSetElementAt_uint13rs_allocationPKjjjj", (void *)&SC_SetElementAt3_uint, true },
1007d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_uint213rs_allocationPKDv2_jjjj", (void *)&SC_SetElementAt3_uint2, true },
1008d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_uint313rs_allocationPKDv3_jjjj", (void *)&SC_SetElementAt3_uint3, true },
1009d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_uint413rs_allocationPKDv4_jjjj", (void *)&SC_SetElementAt3_uint4, true },
1010d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
1011cca3d6ca444bef3b6d75431ec19bd07bfe40a733Stephen Hines    { "_Z18rsSetElementAt_int13rs_allocationPKij", (void *)&SC_SetElementAt1_int, true },
1012d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsSetElementAt_int213rs_allocationPKDv2_ij", (void *)&SC_SetElementAt1_int2, true },
1013d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsSetElementAt_int313rs_allocationPKDv3_ij", (void *)&SC_SetElementAt1_int3, true },
1014d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsSetElementAt_int413rs_allocationPKDv4_ij", (void *)&SC_SetElementAt1_int4, true },
1015d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z18rsSetElementAt_int13rs_allocationPKijj", (void *)&SC_SetElementAt2_int, true },
1016d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsSetElementAt_int213rs_allocationPKDv2_ijj", (void *)&SC_SetElementAt2_int2, true },
1017d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsSetElementAt_int313rs_allocationPKDv3_ijj", (void *)&SC_SetElementAt2_int3, true },
1018d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsSetElementAt_int413rs_allocationPKDv4_ijj", (void *)&SC_SetElementAt2_int4, true },
1019d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z18rsSetElementAt_int13rs_allocationPKijjj", (void *)&SC_SetElementAt3_int, true },
1020d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsSetElementAt_int213rs_allocationPKDv2_ijjj", (void *)&SC_SetElementAt3_int2, true },
1021d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsSetElementAt_int313rs_allocationPKDv3_ijjj", (void *)&SC_SetElementAt3_int3, true },
1022d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsSetElementAt_int413rs_allocationPKDv4_ijjj", (void *)&SC_SetElementAt3_int4, true },
1023d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
1024d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_ulong13rs_allocationPKmt", (void *)&SC_SetElementAt1_ulong, true },
1025d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_ulong213rs_allocationPKDv2_mj", (void *)&SC_SetElementAt1_ulong2, true },
1026d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_ulong313rs_allocationPKDv3_mj", (void *)&SC_SetElementAt1_ulong3, true },
1027d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_ulong413rs_allocationPKDv4_mj", (void *)&SC_SetElementAt1_ulong4, true },
1028d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_ulong13rs_allocationPKmjj", (void *)&SC_SetElementAt2_ulong, true },
1029d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_ulong213rs_allocationPKDv2_mjj", (void *)&SC_SetElementAt2_ulong2, true },
1030d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_ulong313rs_allocationPKDv3_mjj", (void *)&SC_SetElementAt2_ulong3, true },
1031d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_ulong413rs_allocationPKDv4_mjj", (void *)&SC_SetElementAt2_ulong4, true },
1032d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_ulong13rs_allocationPKmjjj", (void *)&SC_SetElementAt3_ulong, true },
1033d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_ulong213rs_allocationPKDv2_mjjj", (void *)&SC_SetElementAt3_ulong2, true },
1034d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_ulong313rs_allocationPKDv3_mjjj", (void *)&SC_SetElementAt3_ulong3, true },
1035d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_ulong413rs_allocationPKDv4_mjjj", (void *)&SC_SetElementAt3_ulong4, true },
1036d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
1037d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsSetElementAt_long13rs_allocationPKlj", (void *)&SC_SetElementAt1_long, true },
1038d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_long213rs_allocationPKDv2_lj", (void *)&SC_SetElementAt1_long2, true },
1039d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_long313rs_allocationPKDv3_lj", (void *)&SC_SetElementAt1_long3, true },
1040d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_long413rs_allocationPKDv4_lj", (void *)&SC_SetElementAt1_long4, true },
1041d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsSetElementAt_long13rs_allocationPKljj", (void *)&SC_SetElementAt2_long, true },
1042d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_long213rs_allocationPKDv2_ljj", (void *)&SC_SetElementAt2_long2, true },
1043d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_long313rs_allocationPKDv3_ljj", (void *)&SC_SetElementAt2_long3, true },
1044d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_long413rs_allocationPKDv4_ljj", (void *)&SC_SetElementAt2_long4, true },
1045d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z19rsSetElementAt_long13rs_allocationPKljjj", (void *)&SC_SetElementAt3_long, true },
1046d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_long213rs_allocationPKDv2_ljjj", (void *)&SC_SetElementAt3_long2, true },
1047d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_long313rs_allocationPKDv3_ljjj", (void *)&SC_SetElementAt3_long3, true },
1048d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_long413rs_allocationPKDv4_ljjj", (void *)&SC_SetElementAt3_long4, true },
1049d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
1050d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_float13rs_allocationPKft", (void *)&SC_SetElementAt1_float, true },
1051d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_float213rs_allocationPKDv2_fj", (void *)&SC_SetElementAt1_float2, true },
1052d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_float313rs_allocationPKDv3_fj", (void *)&SC_SetElementAt1_float3, true },
1053d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_float413rs_allocationPKDv4_fj", (void *)&SC_SetElementAt1_float4, true },
1054d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_float13rs_allocationPKfjj", (void *)&SC_SetElementAt2_float, true },
1055d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_float213rs_allocationPKDv2_fjj", (void *)&SC_SetElementAt2_float2, true },
1056d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_float313rs_allocationPKDv3_fjj", (void *)&SC_SetElementAt2_float3, true },
1057d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_float413rs_allocationPKDv4_fjj", (void *)&SC_SetElementAt2_float4, true },
1058d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z20rsSetElementAt_float13rs_allocationPKfjjj", (void *)&SC_SetElementAt3_float, true },
1059d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_float213rs_allocationPKDv2_fjjj", (void *)&SC_SetElementAt3_float2, true },
1060d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_float313rs_allocationPKDv3_fjjj", (void *)&SC_SetElementAt3_float3, true },
1061d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_float413rs_allocationPKDv4_fjjj", (void *)&SC_SetElementAt3_float4, true },
1062d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams
1063d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_double13rs_allocationPKdt", (void *)&SC_SetElementAt1_double, true },
1064d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsSetElementAt_double213rs_allocationPKDv2_dj", (void *)&SC_SetElementAt1_double2, true },
1065d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsSetElementAt_double313rs_allocationPKDv3_dj", (void *)&SC_SetElementAt1_double3, true },
1066d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsSetElementAt_double413rs_allocationPKDv4_dj", (void *)&SC_SetElementAt1_double4, true },
1067d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_double13rs_allocationPKdjj", (void *)&SC_SetElementAt2_double, true },
1068d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsSetElementAt_double213rs_allocationPKDv2_djj", (void *)&SC_SetElementAt2_double2, true },
1069d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsSetElementAt_double313rs_allocationPKDv3_djj", (void *)&SC_SetElementAt2_double3, true },
1070d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsSetElementAt_double413rs_allocationPKDv4_djj", (void *)&SC_SetElementAt2_double4, true },
1071d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z21rsSetElementAt_double13rs_allocationPKdjjj", (void *)&SC_SetElementAt3_double, true },
1072d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsSetElementAt_double213rs_allocationPKDv2_djjj", (void *)&SC_SetElementAt3_double2, true },
1073d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsSetElementAt_double313rs_allocationPKDv3_djjj", (void *)&SC_SetElementAt3_double3, true },
1074d09b9d667438c82e00c83cd21f693f32e3cf9f4bJason Sams    { "_Z22rsSetElementAt_double413rs_allocationPKDv4_djjj", (void *)&SC_SetElementAt3_double4, true },
10755261a5ea546ff358edd5aac7602fc4132434f481Jason Sams
10765261a5ea546ff358edd5aac7602fc4132434f481Jason Sams
107787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    // Refcounting
107887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z11rsSetObjectP10rs_elementS_", (void *)&SC_SetObject, true },
107987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z13rsClearObjectP10rs_element", (void *)&SC_ClearObject, true },
108087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z10rsIsObject10rs_element", (void *)&SC_IsObject, true },
108187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
108287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z11rsSetObjectP7rs_typeS_", (void *)&SC_SetObject, true },
108387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z13rsClearObjectP7rs_type", (void *)&SC_ClearObject, true },
108487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z10rsIsObject7rs_type", (void *)&SC_IsObject, true },
108587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
108687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z11rsSetObjectP13rs_allocationS_", (void *)&SC_SetObject, true },
108787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z13rsClearObjectP13rs_allocation", (void *)&SC_ClearObject, true },
108887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z10rsIsObject13rs_allocation", (void *)&SC_IsObject, true },
108987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
109087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z11rsSetObjectP10rs_samplerS_", (void *)&SC_SetObject, true },
109187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z13rsClearObjectP10rs_sampler", (void *)&SC_ClearObject, true },
109287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z10rsIsObject10rs_sampler", (void *)&SC_IsObject, true },
109387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
109487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z11rsSetObjectP9rs_scriptS_", (void *)&SC_SetObject, true },
109587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z13rsClearObjectP9rs_script", (void *)&SC_ClearObject, true },
109687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z10rsIsObject9rs_script", (void *)&SC_IsObject, true },
109787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
10989e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams    { "_Z11rsSetObjectP7rs_pathS_", (void *)&SC_SetObject, true },
10999e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams    { "_Z13rsClearObjectP7rs_path", (void *)&SC_ClearObject, true },
11009e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams    { "_Z10rsIsObject7rs_path", (void *)&SC_IsObject, true },
11019e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams
110287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z11rsSetObjectP7rs_meshS_", (void *)&SC_SetObject, true },
110387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z13rsClearObjectP7rs_mesh", (void *)&SC_ClearObject, true },
110487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z10rsIsObject7rs_mesh", (void *)&SC_IsObject, true },
110587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
110687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z11rsSetObjectP19rs_program_fragmentS_", (void *)&SC_SetObject, true },
110787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z13rsClearObjectP19rs_program_fragment", (void *)&SC_ClearObject, true },
110887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z10rsIsObject19rs_program_fragment", (void *)&SC_IsObject, true },
110987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
111087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z11rsSetObjectP17rs_program_vertexS_", (void *)&SC_SetObject, true },
111187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z13rsClearObjectP17rs_program_vertex", (void *)&SC_ClearObject, true },
111287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z10rsIsObject17rs_program_vertex", (void *)&SC_IsObject, true },
111387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
111487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z11rsSetObjectP17rs_program_rasterS_", (void *)&SC_SetObject, true },
111587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z13rsClearObjectP17rs_program_raster", (void *)&SC_ClearObject, true },
111687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z10rsIsObject17rs_program_raster", (void *)&SC_IsObject, true },
111787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
111887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z11rsSetObjectP16rs_program_storeS_", (void *)&SC_SetObject, true },
111987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z13rsClearObjectP16rs_program_store", (void *)&SC_ClearObject, true },
112087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z10rsIsObject16rs_program_store", (void *)&SC_IsObject, true },
112187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
112287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z11rsSetObjectP7rs_fontS_", (void *)&SC_SetObject, true },
112387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z13rsClearObjectP7rs_font", (void *)&SC_ClearObject, true },
112487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z10rsIsObject7rs_font", (void *)&SC_IsObject, true },
112587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
112687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    // Allocation ops
112787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z21rsAllocationMarkDirty13rs_allocation", (void *)&SC_AllocationSyncAll, true },
112887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z20rsgAllocationSyncAll13rs_allocation", (void *)&SC_AllocationSyncAll, false },
112987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z20rsgAllocationSyncAll13rs_allocationj", (void *)&SC_AllocationSyncAll2, false },
113074a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk    { "_Z20rsgAllocationSyncAll13rs_allocation24rs_allocation_usage_type", (void *)&SC_AllocationSyncAll2, false },
113187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z15rsGetAllocationPKv", (void *)&SC_GetAllocation, true },
11320b575de8ed0b628d84d256f5846500b0385979bdTim Murray#ifndef RS_COMPATIBILITY_LIB
1133b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams    { "_Z18rsAllocationIoSend13rs_allocation", (void *)&SC_AllocationIoSend, false },
1134b322033c13487a174bb9c26466e9684d1ff4de8dJason Sams    { "_Z21rsAllocationIoReceive13rs_allocation", (void *)&SC_AllocationIoReceive, false },
11350b575de8ed0b628d84d256f5846500b0385979bdTim Murray#endif
113674a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk    { "_Z23rsAllocationCopy1DRange13rs_allocationjjjS_jj", (void *)&SC_AllocationCopy1DRange, false },
113774a827988567a9d65954bb0d825a3ba4a97e2947Alex Sakhartchouk    { "_Z23rsAllocationCopy2DRange13rs_allocationjjj26rs_allocation_cubemap_facejjS_jjjS0_", (void *)&SC_AllocationCopy2DRange, false },
113887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
113987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    // Messaging
114087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
114187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z14rsSendToClienti", (void *)&SC_ToClient, false },
114287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z14rsSendToClientiPKvj", (void *)&SC_ToClient2, false },
114387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z22rsSendToClientBlockingi", (void *)&SC_ToClientBlocking, false },
114487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z22rsSendToClientBlockingiPKvj", (void *)&SC_ToClientBlocking2, false },
11450b575de8ed0b628d84d256f5846500b0385979bdTim Murray#ifndef RS_COMPATIBILITY_LIB
114687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z22rsgBindProgramFragment19rs_program_fragment", (void *)&SC_BindProgramFragment, false },
114787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z19rsgBindProgramStore16rs_program_store", (void *)&SC_BindProgramStore, false },
114887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z20rsgBindProgramVertex17rs_program_vertex", (void *)&SC_BindProgramVertex, false },
114987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z20rsgBindProgramRaster17rs_program_raster", (void *)&SC_BindProgramRaster, false },
115087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z14rsgBindSampler19rs_program_fragmentj10rs_sampler", (void *)&SC_BindSampler, false },
115187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z14rsgBindTexture19rs_program_fragmentj13rs_allocation", (void *)&SC_BindTexture, false },
1152a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchouk    { "_Z15rsgBindConstant19rs_program_fragmentj13rs_allocation", (void *)&SC_BindFragmentConstant, false },
1153a720a144508edd91e4790b23eadd6cd270368df9Alex Sakhartchouk    { "_Z15rsgBindConstant17rs_program_vertexj13rs_allocation", (void *)&SC_BindVertexConstant, false },
115487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
115587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z36rsgProgramVertexLoadProjectionMatrixPK12rs_matrix4x4", (void *)&SC_VpLoadProjectionMatrix, false },
115687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z31rsgProgramVertexLoadModelMatrixPK12rs_matrix4x4", (void *)&SC_VpLoadModelMatrix, false },
115787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z33rsgProgramVertexLoadTextureMatrixPK12rs_matrix4x4", (void *)&SC_VpLoadTextureMatrix, false },
115887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
115987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z35rsgProgramVertexGetProjectionMatrixP12rs_matrix4x4", (void *)&SC_VpGetProjectionMatrix, false },
116087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
116187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z31rsgProgramFragmentConstantColor19rs_program_fragmentffff", (void *)&SC_PfConstantColor, false },
116287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
116387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z11rsgGetWidthv", (void *)&SC_GetWidth, false },
116487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z12rsgGetHeightv", (void *)&SC_GetHeight, false },
116587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
116687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
116787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z11rsgDrawRectfffff", (void *)&SC_DrawRect, false },
116887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z11rsgDrawQuadffffffffffff", (void *)&SC_DrawQuad, false },
116987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z20rsgDrawQuadTexCoordsffffffffffffffffffff", (void *)&SC_DrawQuadTexCoords, false },
117087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z24rsgDrawSpriteScreenspacefffff", (void *)&SC_DrawSpriteScreenspace, false },
117187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
117287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z11rsgDrawMesh7rs_mesh", (void *)&SC_DrawMesh, false },
117387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z11rsgDrawMesh7rs_meshj", (void *)&SC_DrawMeshPrimitive, false },
117487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z11rsgDrawMesh7rs_meshjjj", (void *)&SC_DrawMeshPrimitiveRange, false },
117587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z25rsgMeshComputeBoundingBox7rs_meshPfS0_S0_S0_S0_S0_", (void *)&SC_MeshComputeBoundingBox, false },
117687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
11779e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams    { "_Z11rsgDrawPath7rs_path", (void *)&SC_DrawPath, false },
11789e0afb5a2b3e476c42a373e7cd89cef4a34f8195Jason Sams
117987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z13rsgClearColorffff", (void *)&SC_ClearColor, false },
118087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z13rsgClearDepthf", (void *)&SC_ClearDepth, false },
118187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
118287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z11rsgDrawTextPKcii", (void *)&SC_DrawText, false },
118387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z11rsgDrawText13rs_allocationii", (void *)&SC_DrawTextAlloc, false },
118487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z14rsgMeasureTextPKcPiS1_S1_S1_", (void *)&SC_MeasureText, false },
118587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z14rsgMeasureText13rs_allocationPiS0_S0_S0_", (void *)&SC_MeasureTextAlloc, false },
118687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
118787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z11rsgBindFont7rs_font", (void *)&SC_BindFont, false },
118887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z12rsgFontColorffff", (void *)&SC_FontColor, false },
118987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
119087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z18rsgBindColorTarget13rs_allocationj", (void *)&SC_BindFrameBufferObjectColorTarget, false },
119187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z18rsgBindDepthTarget13rs_allocation", (void *)&SC_BindFrameBufferObjectDepthTarget, false },
119287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z19rsgClearColorTargetj", (void *)&SC_ClearFrameBufferObjectColorTarget, false },
119387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z19rsgClearDepthTargetv", (void *)&SC_ClearFrameBufferObjectDepthTarget, false },
119487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z24rsgClearAllRenderTargetsv", (void *)&SC_ClearFrameBufferObjectTargets, false },
11950b575de8ed0b628d84d256f5846500b0385979bdTim Murray#endif // RS_COMPATIBILITY_LIB
119687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
1197aa152101cc4d04597d9aefc3e5a1454eaf39d2ccJason Sams    { "_Z9rsForEach9rs_script13rs_allocationS0_", (void *)&SC_ForEach_SAA, true },
1198aa152101cc4d04597d9aefc3e5a1454eaf39d2ccJason Sams    { "_Z9rsForEach9rs_script13rs_allocationS0_PKv", (void *)&SC_ForEach_SAAU, true },
1199f598811a60088236222bb1879503842094ca378bStephen Hines    { "_Z9rsForEach9rs_script13rs_allocationS0_PKvPK14rs_script_call", (void *)&SC_ForEach_SAAUS, true },
1200aa152101cc4d04597d9aefc3e5a1454eaf39d2ccJason Sams    { "_Z9rsForEach9rs_script13rs_allocationS0_PKvj", (void *)&SC_ForEach_SAAUL, true },
1201f598811a60088236222bb1879503842094ca378bStephen Hines    { "_Z9rsForEach9rs_script13rs_allocationS0_PKvjPK14rs_script_call", (void *)&SC_ForEach_SAAULS, true },
120287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
120387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    // time
120487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z6rsTimePi", (void *)&SC_Time, true },
120587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z11rsLocaltimeP5rs_tmPKi", (void *)&SC_LocalTime, true },
120687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z14rsUptimeMillisv", (void*)&SC_UptimeMillis, true },
120787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z13rsUptimeNanosv", (void*)&SC_UptimeNanos, true },
120887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z7rsGetDtv", (void*)&SC_GetDt, false },
120987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
121087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    // misc
12110b575de8ed0b628d84d256f5846500b0385979bdTim Murray#ifndef RS_COMPATIBILITY_LIB
121287fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z5colorffff", (void *)&SC_Color, false },
121387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { "_Z9rsgFinishv", (void *)&SC_Finish, false },
12140b575de8ed0b628d84d256f5846500b0385979bdTim Murray#endif
121587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
121687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    { NULL, NULL, false }
121787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams};
121887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
12190b575de8ed0b628d84d256f5846500b0385979bdTim Murray#ifdef RS_COMPATIBILITY_LIB
12200b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1221d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray//////////////////////////////////////////////////////////////////////////////
1222d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray// Compatibility Library entry points
1223d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray//////////////////////////////////////////////////////////////////////////////
1224d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray
1225d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murraybool rsIsObject(rs_element src) {
1226d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    return SC_IsObject((ObjectBase*)src.p);
1227d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray}
1228d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray
1229d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray#define CLEAR_SET_OBJ(t) \
1230d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    void __attribute__((overloadable)) rsClearObject(t *dst) { \
1231d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    return SC_ClearObject((ObjectBase**) dst); \
1232d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    } \
1233d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    void __attribute__((overloadable)) rsSetObject(t *dst, t src) { \
1234d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    return SC_SetObject((ObjectBase**) dst, (ObjectBase*) src.p); \
1235d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    }
1236d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray
1237d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayCLEAR_SET_OBJ(rs_element)
1238d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayCLEAR_SET_OBJ(rs_type)
1239d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayCLEAR_SET_OBJ(rs_allocation)
1240d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayCLEAR_SET_OBJ(rs_sampler)
1241d6f1f46b2929ed56c73ba32357cde31b82972fbeTim MurrayCLEAR_SET_OBJ(rs_script)
1242d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray#undef CLEAR_SET_OBJ
1243d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray
1244d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murrayconst Allocation * rsGetAllocation(const void *ptr) {
1245d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    return SC_GetAllocation(ptr);
1246d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray}
1247d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray
1248d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murrayvoid __attribute__((overloadable)) rsForEach(rs_script script,
1249d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray                                             rs_allocation in,
1250d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray                                             rs_allocation out,
1251d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray                                             const void *usr,
1252d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray                                             const rs_script_call *call) {
1253d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    return SC_ForEach_SAAUS((Script *)script.p, (Allocation*)in.p, (Allocation*)out.p, usr, (RsScriptCall*)call);
1254d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray}
1255d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray
1256d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murrayvoid __attribute__((overloadable)) rsForEach(rs_script script,
1257d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray                                             rs_allocation in,
1258d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray                                             rs_allocation out,
1259d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray                                             const void *usr,
1260d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray                                             uint32_t usrLen,
1261d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray                                             const rs_script_call *call) {
1262d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    return SC_ForEach_SAAULS((Script *)script.p, (Allocation*)in.p, (Allocation*)out.p, usr, usrLen, (RsScriptCall*)call);
1263d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray}
1264d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray
1265d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murrayint rsTime(int *timer) {
1266d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    return SC_Time(timer);
1267d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray}
1268d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray
1269d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murrayrs_tm* rsLocaltime(rs_tm* local, const int *timer) {
1270d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    return (rs_tm*)(SC_LocalTime((tm*)local, (long*)timer));
1271d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray}
1272d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray
1273d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murrayint64_t rsUptimeMillis() {
1274d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    Context *rsc = RsdCpuReference::getTlsContext();
1275d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    return rsrUptimeMillis(rsc);
1276d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray}
1277d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray
1278d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murrayuint32_t rsSendToClientBlocking2(int cmdID, void *data, int len) {
1279d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    Context *rsc = RsdCpuReference::getTlsContext();
1280d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    return rsrToClientBlocking(rsc, cmdID, data, len);
1281d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray}
1282d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray
12830b575de8ed0b628d84d256f5846500b0385979bdTim Murrayuint32_t rsSendToClientBlocking(int cmdID) {
12840b575de8ed0b628d84d256f5846500b0385979bdTim Murray    Context *rsc = RsdCpuReference::getTlsContext();
12850b575de8ed0b628d84d256f5846500b0385979bdTim Murray    return rsrToClientBlocking(rsc, cmdID, NULL, 0);
12860b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
12870b575de8ed0b628d84d256f5846500b0385979bdTim Murray
12880b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugF(const char *s, float f) {
12890b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s %f, 0x%08x", s, f, *((int *) (&f)));
12900b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
12910b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugFv2(const char *s, float f1, float f2) {
12920b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s {%f, %f}", s, f1, f2);
12930b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
12940b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugFv3(const char *s, float f1, float f2, float f3) {
12950b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s {%f, %f, %f}", s, f1, f2, f3);
12960b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
12970b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugFv4(const char *s, float f1, float f2, float f3, float f4) {
12980b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s {%f, %f, %f, %f}", s, f1, f2, f3, f4);
12990b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13000b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugF2(const char *s, float2 f) {
13010b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s {%f, %f}", s, f.x, f.y);
13020b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13030b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugF3(const char *s, float3 f) {
13040b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s {%f, %f, %f}", s, f.x, f.y, f.z);
13050b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13060b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugF4(const char *s, float4 f) {
13070b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s {%f, %f, %f, %f}", s, f.x, f.y, f.z, f.w);
13080b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13090b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugD(const char *s, double d) {
13100b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s %f, 0x%08llx", s, d, *((long long *) (&d)));
13110b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13120b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugFM4v4(const char *s, const float *f) {
13130b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s {%f, %f, %f, %f", s, f[0], f[4], f[8], f[12]);
13140b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s  %f, %f, %f, %f", s, f[1], f[5], f[9], f[13]);
13150b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s  %f, %f, %f, %f", s, f[2], f[6], f[10], f[14]);
13160b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s  %f, %f, %f, %f}", s, f[3], f[7], f[11], f[15]);
13170b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13180b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugFM3v3(const char *s, const float *f) {
13190b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s {%f, %f, %f", s, f[0], f[3], f[6]);
13200b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s  %f, %f, %f", s, f[1], f[4], f[7]);
13210b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s  %f, %f, %f}",s, f[2], f[5], f[8]);
13220b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13230b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugFM2v2(const char *s, const float *f) {
13240b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s {%f, %f", s, f[0], f[2]);
13250b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s  %f, %f}",s, f[1], f[3]);
13260b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13270b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugI8(const char *s, char c) {
13280b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s %hhd  0x%hhx", s, c, (unsigned char)c);
13290b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13300b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugC2(const char *s, char2 c) {
13310b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s {%hhd, %hhd}  0x%hhx 0x%hhx", s, c.x, c.y, (unsigned char)c.x, (unsigned char)c.y);
13320b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13330b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugC3(const char *s, char3 c) {
13340b575de8ed0b628d84d256f5846500b0385979bdTim 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);
13350b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13360b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugC4(const char *s, char4 c) {
13370b575de8ed0b628d84d256f5846500b0385979bdTim 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);
13380b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13390b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugU8(const char *s, unsigned char c) {
13400b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s %hhu  0x%hhx", s, c, c);
13410b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13420b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUC2(const char *s, uchar2 c) {
13430b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s {%hhu, %hhu}  0x%hhx 0x%hhx", s, c.x, c.y, c.x, c.y);
13440b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13450b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUC3(const char *s, uchar3 c) {
13460b575de8ed0b628d84d256f5846500b0385979bdTim 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);
13470b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13480b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUC4(const char *s, uchar4 c) {
13490b575de8ed0b628d84d256f5846500b0385979bdTim 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);
13500b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13510b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugI16(const char *s, short c) {
13520b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s %hd  0x%hx", s, c, c);
13530b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13540b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugS2(const char *s, short2 c) {
13550b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s {%hd, %hd}  0x%hx 0x%hx", s, c.x, c.y, c.x, c.y);
13560b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13570b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugS3(const char *s, short3 c) {
13580b575de8ed0b628d84d256f5846500b0385979bdTim 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);
13590b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13600b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugS4(const char *s, short4 c) {
13610b575de8ed0b628d84d256f5846500b0385979bdTim 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);
13620b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13630b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugU16(const char *s, unsigned short c) {
13640b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s %hu  0x%hx", s, c, c);
13650b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13660b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUS2(const char *s, ushort2 c) {
13670b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s {%hu, %hu}  0x%hx 0x%hx", s, c.x, c.y, c.x, c.y);
13680b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13690b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUS3(const char *s, ushort3 c) {
13700b575de8ed0b628d84d256f5846500b0385979bdTim 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);
13710b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13720b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUS4(const char *s, ushort4 c) {
13730b575de8ed0b628d84d256f5846500b0385979bdTim 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);
13740b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13750b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugI32(const char *s, int32_t i) {
13760b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s %d  0x%x", s, i, i);
13770b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13780b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugI2(const char *s, int2 i) {
13790b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s {%d, %d}  0x%x 0x%x", s, i.x, i.y, i.x, i.y);
13800b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13810b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugI3(const char *s, int3 i) {
13820b575de8ed0b628d84d256f5846500b0385979bdTim 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);
13830b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13840b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugI4(const char *s, int4 i) {
13850b575de8ed0b628d84d256f5846500b0385979bdTim 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);
13860b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13870b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugU32(const char *s, uint32_t i) {
13880b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s %u  0x%x", s, i, i);
13890b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13900b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUI2(const char *s, uint2 i) {
13910b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s {%u, %u}  0x%x 0x%x", s, i.x, i.y, i.x, i.y);
13920b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13930b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUI3(const char *s, uint3 i) {
13940b575de8ed0b628d84d256f5846500b0385979bdTim 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);
13950b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13960b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUI4(const char *s, uint4 i) {
13970b575de8ed0b628d84d256f5846500b0385979bdTim 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);
13980b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
13990b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugLL64(const char *s, long long ll) {
14000b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s %lld  0x%llx", s, ll, ll);
14010b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14020b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugL2(const char *s, long2 ll) {
14030b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s {%lld, %lld}  0x%llx 0x%llx", s, ll.x, ll.y, ll.x, ll.y);
14040b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14050b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugL3(const char *s, long3 ll) {
14060b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s {%lld, %lld, %lld}  0x%llx 0x%llx 0x%llx", s, ll.x, ll.y, ll.z, ll.x, ll.y, ll.z);
14070b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14080b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugL4(const char *s, long4 ll) {
14090b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s {%lld, %lld, %lld, %lld}  0x%llx 0x%llx 0x%llx 0x%llx", s, ll.x, ll.y, ll.z, ll.w, ll.x, ll.y, ll.z, ll.w);
14100b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14110b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugULL64(const char *s, unsigned long long ll) {
14120b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s %llu  0x%llx", s, ll, ll);
14130b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14140b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUL2(const char *s, ulong2 ll) {
14150b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s {%llu, %llu}  0x%llx 0x%llx", s, ll.x, ll.y, ll.x, ll.y);
14160b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14170b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUL3(const char *s, ulong3 ll) {
14180b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s {%llu, %llu, %llu}  0x%llx 0x%llx 0x%llx", s, ll.x, ll.y, ll.z, ll.x, ll.y, ll.z);
14190b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14200b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugUL4(const char *s, ulong4 ll) {
14210b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s {%llu, %llu, %llu, %llu}  0x%llx 0x%llx 0x%llx 0x%llx", s, ll.x, ll.y, ll.z, ll.w, ll.x, ll.y, ll.z, ll.w);
14220b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14230b575de8ed0b628d84d256f5846500b0385979bdTim Murraystatic void SC_debugP(const char *s, const void *p) {
14240b575de8ed0b628d84d256f5846500b0385979bdTim Murray    ALOGD("%s %p", s, p);
14250b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14260b575de8ed0b628d84d256f5846500b0385979bdTim Murray
14270b575de8ed0b628d84d256f5846500b0385979bdTim Murray// TODO: allocation ops, messaging, time
14280b575de8ed0b628d84d256f5846500b0385979bdTim Murray
14290b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, float f) {
14300b575de8ed0b628d84d256f5846500b0385979bdTim Murray    SC_debugF(s, f);
14310b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14320b575de8ed0b628d84d256f5846500b0385979bdTim Murray
14330b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, float f1, float f2) {
14340b575de8ed0b628d84d256f5846500b0385979bdTim Murray    SC_debugFv2(s, f1, f2);
14350b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14360b575de8ed0b628d84d256f5846500b0385979bdTim Murray
14370b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, float f1, float f2, float f3) {
14380b575de8ed0b628d84d256f5846500b0385979bdTim Murray    SC_debugFv3(s, f1, f2, f3);
14390b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14400b575de8ed0b628d84d256f5846500b0385979bdTim Murray
14410b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, float f1, float f2, float f3, float f4) {
14420b575de8ed0b628d84d256f5846500b0385979bdTim Murray    SC_debugFv4(s, f1, f2, f3, f4);
14430b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14440b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1445b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const float2 *f) {
1446b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugF2(s, *f);
14470b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14480b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1449b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const float3 *f) {
1450b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugF3(s, *f);
14510b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14520b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1453b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const float4 *f) {
1454b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugF4(s, *f);
14550b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14560b575de8ed0b628d84d256f5846500b0385979bdTim Murray
14570b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, double d) {
14580b575de8ed0b628d84d256f5846500b0385979bdTim Murray    SC_debugD(s, d);
14590b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14600b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1461b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const rs_matrix4x4 *m) {
14620b575de8ed0b628d84d256f5846500b0385979bdTim Murray    SC_debugFM4v4(s, (float *) m);
14630b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14640b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1465b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const rs_matrix3x3 *m) {
1466d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    SC_debugFM3v3(s, (float *) m);
14670b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14680b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1469b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const rs_matrix2x2 *m) {
1470d6f1f46b2929ed56c73ba32357cde31b82972fbeTim Murray    SC_debugFM2v2(s, (float *) m);
14710b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14720b575de8ed0b628d84d256f5846500b0385979bdTim Murray
14730b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, char c) {
14740b575de8ed0b628d84d256f5846500b0385979bdTim Murray    SC_debugI8(s, c);
14750b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14760b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1477b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const char2 *c) {
1478b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugC2(s, *c);
14790b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14800b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1481b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const char3 *c) {
1482b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugC3(s, *c);
14830b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14840b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1485b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const char4 *c) {
1486b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugC4(s, *c);
14870b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14880b575de8ed0b628d84d256f5846500b0385979bdTim Murray
14890b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, unsigned char c) {
14900b575de8ed0b628d84d256f5846500b0385979bdTim Murray    SC_debugU8(s, c);
14910b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14920b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1493b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const uchar2 *c) {
1494b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugUC2(s, *c);
14950b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
14960b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1497b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const uchar3 *c) {
1498b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugUC3(s, *c);
14990b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15000b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1501b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const uchar4 *c) {
1502b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugUC4(s, *c);
15030b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15040b575de8ed0b628d84d256f5846500b0385979bdTim Murray
15050b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, short c) {
15060b575de8ed0b628d84d256f5846500b0385979bdTim Murray    SC_debugI16(s, c);
15070b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15080b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1509b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const short2 *c) {
1510b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugS2(s, *c);
15110b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15120b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1513b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const short3 *c) {
1514b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugS3(s, *c);
15150b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15160b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1517b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const short4 *c) {
1518b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugS4(s, *c);
15190b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15200b575de8ed0b628d84d256f5846500b0385979bdTim Murray
15210b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, unsigned short c) {
15220b575de8ed0b628d84d256f5846500b0385979bdTim Murray    SC_debugU16(s, c);
15230b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15240b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1525b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const ushort2 *c) {
1526b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugUS2(s, *c);
15270b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15280b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1529b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const ushort3 *c) {
1530b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugUS3(s, *c);
15310b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15320b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1533b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const ushort4 *c) {
1534b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugUS4(s, *c);
15350b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15360b575de8ed0b628d84d256f5846500b0385979bdTim Murray
15370b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, int c) {
15380b575de8ed0b628d84d256f5846500b0385979bdTim Murray    SC_debugI32(s, c);
15390b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15400b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1541b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const int2 *c) {
1542b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugI2(s, *c);
15430b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15440b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1545b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const int3 *c) {
1546b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugI3(s, *c);
15470b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15480b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1549b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const int4 *c) {
1550b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugI4(s, *c);
15510b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15520b575de8ed0b628d84d256f5846500b0385979bdTim Murray
15530b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, unsigned int c) {
15540b575de8ed0b628d84d256f5846500b0385979bdTim Murray    SC_debugU32(s, c);
15550b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15560b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1557b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const uint2 *c) {
1558b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugUI2(s, *c);
15590b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15600b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1561b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const uint3 *c) {
1562b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugUI3(s, *c);
15630b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15640b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1565b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const uint4 *c) {
1566b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugUI4(s, *c);
15670b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15680b575de8ed0b628d84d256f5846500b0385979bdTim Murray
15690b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, long c) {
15700b575de8ed0b628d84d256f5846500b0385979bdTim Murray    SC_debugLL64(s, c);
15710b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15720b575de8ed0b628d84d256f5846500b0385979bdTim Murray
15730b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, long long c) {
15740b575de8ed0b628d84d256f5846500b0385979bdTim Murray    SC_debugLL64(s, c);
15750b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15760b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1577b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const long2 *c) {
1578b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugL2(s, *c);
15790b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15800b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1581b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const long3 *c) {
1582b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugL3(s, *c);
15830b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15840b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1585b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const long4 *c) {
1586b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugL4(s, *c);
15870b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15880b575de8ed0b628d84d256f5846500b0385979bdTim Murray
15890b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, unsigned long c) {
15900b575de8ed0b628d84d256f5846500b0385979bdTim Murray    SC_debugULL64(s, c);
15910b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15920b575de8ed0b628d84d256f5846500b0385979bdTim Murray
15930b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, unsigned long long c) {
15940b575de8ed0b628d84d256f5846500b0385979bdTim Murray    SC_debugULL64(s, c);
15950b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
15960b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1597b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const ulong2 *c) {
1598b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugUL2(s, *c);
15990b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
16000b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1601b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const ulong3 *c) {
1602b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugUL3(s, *c);
16030b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
16040b575de8ed0b628d84d256f5846500b0385979bdTim Murray
1605b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hinesvoid rsDebug(const char *s, const ulong4 *c) {
1606b0934b67b95cc27e2358c2aa4db5f7c1067c8f9bStephen Hines    SC_debugUL4(s, *c);
16070b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
16080b575de8ed0b628d84d256f5846500b0385979bdTim Murray
16090b575de8ed0b628d84d256f5846500b0385979bdTim Murrayvoid rsDebug(const char *s, const void *p) {
16100b575de8ed0b628d84d256f5846500b0385979bdTim Murray    SC_debugP(s, p);
16110b575de8ed0b628d84d256f5846500b0385979bdTim Murray}
16120b575de8ed0b628d84d256f5846500b0385979bdTim Murray#endif // RS_COMPATIBILITY_LIB
161387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
1614709a0978ae141198018ca9769f8d96292a8928e6Jason Samsextern const RsdCpuReference::CpuSymbol * rsdLookupRuntimeStub(Context * pContext, char const* name) {
161587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    ScriptC *s = (ScriptC *)pContext;
1616709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    const RsdCpuReference::CpuSymbol *syms = gSyms;
1617709a0978ae141198018ca9769f8d96292a8928e6Jason Sams    const RsdCpuReference::CpuSymbol *sym = NULL;
161887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
161987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    if (!sym) {
1620709a0978ae141198018ca9769f8d96292a8928e6Jason Sams        while (syms->fnPtr) {
1621709a0978ae141198018ca9769f8d96292a8928e6Jason Sams            if (!strcmp(syms->name, name)) {
1622709a0978ae141198018ca9769f8d96292a8928e6Jason Sams                return syms;
162387fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams            }
162487fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams            syms++;
162587fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams        }
162687fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    }
162787fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
162887fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams    return NULL;
162987fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams}
163087fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
163187fe59a2f4d4c74539bfa0bff5f9a7e320e99415Jason Sams
1632