124035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian/*
224035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian ** Copyright 2009, The Android Open Source Project
324035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian **
424035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian ** Licensed under the Apache License, Version 2.0 (the "License");
524035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian ** you may not use this file except in compliance with the License.
624035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian ** You may obtain a copy of the License at
724035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian **
824035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian **     http://www.apache.org/licenses/LICENSE-2.0
924035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian **
1024035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian ** Unless required by applicable law or agreed to in writing, software
1124035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian ** distributed under the License is distributed on an "AS IS" BASIS,
1224035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1324035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian ** See the License for the specific language governing permissions and
1424035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian ** limitations under the License.
1524035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian */
1624035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian
1724035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian#include <ctype.h>
1824035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian#include <stdlib.h>
1924035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian#include <errno.h>
2024035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian
2124035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian#include <cutils/log.h>
2224035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian
231cadb25da1ed875bdd078270e642966724a0c39aMathias Agopian#include "egldefs.h"
2424035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian
2524035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian// ----------------------------------------------------------------------------
2624035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopiannamespace android {
2724035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian// ----------------------------------------------------------------------------
2824035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian
2924035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian#undef API_ENTRY
307f781d155221c4067c93f85b4153c204423f49f2Mathias Agopian#undef CALL_GL_EXTENSION_API
3124035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian#undef GL_EXTENSION
3224035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian#undef GL_EXTENSION_NAME
337f781d155221c4067c93f85b4153c204423f49f2Mathias Agopian#undef GL_EXTENSION_ARRAY
347f781d155221c4067c93f85b4153c204423f49f2Mathias Agopian#undef GL_EXTENSION_LIST
357f781d155221c4067c93f85b4153c204423f49f2Mathias Agopian#undef GET_TLS
3624035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian
37e0ea89ceef3b0fc5f3efc5d709a8156f0628c6c8Mathias Agopian#if defined(__arm__)
3846b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand
39288870ebc3da8121b7a237a53280bd8b931b7a2fElliott Hughes    #define GET_TLS(reg) "mrc p15, 0, " #reg ", c13, c0, 3 \n"
4024035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian
4124035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian    #define API_ENTRY(_api) __attribute__((naked)) _api
4224035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian
4324035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian    #define CALL_GL_EXTENSION_API(_api)                         \
4424035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian         asm volatile(                                          \
4524035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian            GET_TLS(r12)                                        \
4624035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian            "ldr   r12, [r12, %[tls]] \n"                       \
4724035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian            "cmp   r12, #0            \n"                       \
4824035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian            "ldrne r12, [r12, %[api]] \n"                       \
4924035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian            "cmpne r12, #0            \n"                       \
5024035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian            "bxne  r12                \n"                       \
5124035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian            "bx    lr                 \n"                       \
5224035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian            :                                                   \
5324035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian            : [tls] "J"(TLS_SLOT_OPENGL_API*4),                 \
5424035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian              [api] "J"(__builtin_offsetof(gl_hooks_t,          \
5524035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian                                      ext.extensions[_api]))    \
5630a41aa1ccc47de41642308a243fa5df2bfeec06Jesse Hall            : "r12"                                             \
5724035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian            );
5824035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian
5930a41aa1ccc47de41642308a243fa5df2bfeec06Jesse Hall#elif defined(__aarch64__)
6030a41aa1ccc47de41642308a243fa5df2bfeec06Jesse Hall
6130a41aa1ccc47de41642308a243fa5df2bfeec06Jesse Hall    #define API_ENTRY(_api) __attribute__((noinline)) _api
6230a41aa1ccc47de41642308a243fa5df2bfeec06Jesse Hall
6330a41aa1ccc47de41642308a243fa5df2bfeec06Jesse Hall    #define CALL_GL_EXTENSION_API(_api)                             \
6430a41aa1ccc47de41642308a243fa5df2bfeec06Jesse Hall        asm volatile(                                               \
6530a41aa1ccc47de41642308a243fa5df2bfeec06Jesse Hall            "mrs x16, tpidr_el0\n"                                  \
6630a41aa1ccc47de41642308a243fa5df2bfeec06Jesse Hall            "ldr x16, [x16, %[tls]]\n"                              \
6730a41aa1ccc47de41642308a243fa5df2bfeec06Jesse Hall            "cbz x16, 1f\n"                                         \
6830a41aa1ccc47de41642308a243fa5df2bfeec06Jesse Hall            "ldr x16, [x16, %[api]]\n"                              \
6930a41aa1ccc47de41642308a243fa5df2bfeec06Jesse Hall            "cbz x16, 1f\n"                                         \
7030a41aa1ccc47de41642308a243fa5df2bfeec06Jesse Hall            "br  x16\n"                                             \
7130a41aa1ccc47de41642308a243fa5df2bfeec06Jesse Hall            "1:\n"                                                  \
7230a41aa1ccc47de41642308a243fa5df2bfeec06Jesse Hall            :                                                       \
7330a41aa1ccc47de41642308a243fa5df2bfeec06Jesse Hall            : [tls] "i" (TLS_SLOT_OPENGL_API * sizeof(void*)),      \
7430a41aa1ccc47de41642308a243fa5df2bfeec06Jesse Hall              [api] "i" (__builtin_offsetof(gl_hooks_t,             \
7530a41aa1ccc47de41642308a243fa5df2bfeec06Jesse Hall                                        ext.extensions[_api]))      \
7630a41aa1ccc47de41642308a243fa5df2bfeec06Jesse Hall            : "x16"                                                 \
7730a41aa1ccc47de41642308a243fa5df2bfeec06Jesse Hall        );
7830a41aa1ccc47de41642308a243fa5df2bfeec06Jesse Hall
79c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz#elif defined(__i386__)
80c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz
81c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz    #define API_ENTRY(_api) __attribute__((noinline)) _api
82c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz
83c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz    #define CALL_GL_EXTENSION_API(_api)                         \
84c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz         register void** fn;                                    \
85c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz         __asm__ volatile(                                      \
86c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            "mov %%gs:0, %[fn]\n"                               \
87c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            "mov %P[tls](%[fn]), %[fn]\n"                       \
88c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            "test %[fn], %[fn]\n"                               \
89c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            "cmovne %P[api](%[fn]), %[fn]\n"                    \
90c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            "test %[fn], %[fn]\n"                               \
91c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            "je 1f\n"                                           \
92c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            "jmp *%[fn]\n"                                      \
93c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            "1:\n"                                              \
94c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            : [fn] "=r" (fn)                                    \
95c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            : [tls] "i" (TLS_SLOT_OPENGL_API*sizeof(void*)),    \
96c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz              [api] "i" (__builtin_offsetof(gl_hooks_t,         \
97c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz                                      ext.extensions[_api]))    \
98c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            : "cc"                                              \
99c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            );
100c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz
101c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz#elif defined(__x86_64__)
102c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz
103c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz    #define API_ENTRY(_api) __attribute__((noinline)) _api
104c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz
105c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz    #define CALL_GL_EXTENSION_API(_api)                         \
106c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz         register void** fn;                                    \
107c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz         __asm__ volatile(                                      \
108c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            "mov %%fs:0, %[fn]\n"                               \
109c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            "mov %P[tls](%[fn]), %[fn]\n"                       \
110c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            "test %[fn], %[fn]\n"                               \
111c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            "cmovne %P[api](%[fn]), %[fn]\n"                    \
112c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            "test %[fn], %[fn]\n"                               \
113c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            "je 1f\n"                                           \
114c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            "jmp *%[fn]\n"                                      \
115c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            "1:\n"                                              \
116c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            : [fn] "=r" (fn)                                    \
117c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            : [tls] "i" (TLS_SLOT_OPENGL_API*sizeof(void*)),    \
118c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz              [api] "i" (__builtin_offsetof(gl_hooks_t,         \
119c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz                                      ext.extensions[_api]))    \
120c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            : "cc"                                              \
121c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz            );
122c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz
123e0ea89ceef3b0fc5f3efc5d709a8156f0628c6c8Mathias Agopian#elif defined(__mips__)
12446b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand
12546b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand        #define API_ENTRY(_api) __attribute__((noinline)) _api
12646b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand
12746b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand        #define CALL_GL_EXTENSION_API(_api, ...)                    \
128441f69463ec595ad42fdaad1bbfbb0f7a932437cJesse Hall            register unsigned int _t0 asm("t0");                    \
129441f69463ec595ad42fdaad1bbfbb0f7a932437cJesse Hall            register unsigned int _fn asm("t1");                    \
130441f69463ec595ad42fdaad1bbfbb0f7a932437cJesse Hall            register unsigned int _tls asm("v1");                   \
13146b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand            asm volatile(                                           \
13246b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand                ".set  push\n\t"                                    \
13346b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand                ".set  noreorder\n\t"                               \
13446b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand                ".set  mips32r2\n\t"                                \
13546b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand                "rdhwr %[tls], $29\n\t"                             \
13646b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand                "lw    %[t0], %[OPENGL_API](%[tls])\n\t"            \
13746b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand                "beqz  %[t0], 1f\n\t"                               \
13846b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand                " move %[fn], $ra\n\t"                              \
13946b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand                "lw    %[fn], %[API](%[t0])\n\t"                    \
14046b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand                "movz  %[fn], $ra, %[fn]\n\t"                       \
14146b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand                "1:\n\t"                                            \
14246b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand                "j     %[fn]\n\t"                                   \
14346b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand                " nop\n\t"                                          \
14446b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand                ".set  pop\n\t"                                     \
145441f69463ec595ad42fdaad1bbfbb0f7a932437cJesse Hall                : [fn] "=c"(_fn),                                   \
146441f69463ec595ad42fdaad1bbfbb0f7a932437cJesse Hall                  [tls] "=&r"(_tls),                                \
147441f69463ec595ad42fdaad1bbfbb0f7a932437cJesse Hall                  [t0] "=&r"(_t0)                                   \
14846b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand                : [OPENGL_API] "I"(TLS_SLOT_OPENGL_API*4),          \
14946b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand                  [API] "I"(__builtin_offsetof(gl_hooks_t,          \
15046b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand                                          ext.extensions[_api]))    \
15146b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand                :                                                   \
15246b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand            );
153c80aafa61d619087a879dc1095ddf1ca2a5e69fbmwajdecz
154e0ea89ceef3b0fc5f3efc5d709a8156f0628c6c8Mathias Agopian#endif
15546b4253b760916ea8f64c8c32a51ae85ec3b050eDuane Sand
156e0ea89ceef3b0fc5f3efc5d709a8156f0628c6c8Mathias Agopian#if defined(CALL_GL_EXTENSION_API)
1577f781d155221c4067c93f85b4153c204423f49f2Mathias Agopian    #define GL_EXTENSION_NAME(_n)   __glExtFwd##_n
15824035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian
15924035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian    #define GL_EXTENSION(_n)                         \
16024035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian        void API_ENTRY(GL_EXTENSION_NAME(_n))() {    \
16124035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian            CALL_GL_EXTENSION_API(_n);               \
16224035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian        }
16324035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian#else
164e0ea89ceef3b0fc5f3efc5d709a8156f0628c6c8Mathias Agopian        #define GL_EXTENSION_NAME(_n) NULL
16524035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian
166e0ea89ceef3b0fc5f3efc5d709a8156f0628c6c8Mathias Agopian        #define GL_EXTENSION(_n)
16724035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian
168e0ea89ceef3b0fc5f3efc5d709a8156f0628c6c8Mathias Agopian        #warning "eglGetProcAddress() partially supported"
16924035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian#endif
17024035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian
171a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian
1727f781d155221c4067c93f85b4153c204423f49f2Mathias Agopian#define GL_EXTENSION_LIST(name) \
173a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(0)   name(1)   name(2)   name(3)   name(4)   name(5)   name(6)   name(7)  \
174a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(8)   name(9)   name(10)  name(11)  name(12)  name(13)  name(14)  name(15) \
175a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(16)  name(17)  name(18)  name(19)  name(20)  name(21)  name(22)  name(23) \
176a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(24)  name(25)  name(26)  name(27)  name(28)  name(29)  name(30)  name(31) \
177a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(32)  name(33)  name(34)  name(35)  name(36)  name(37)  name(38)  name(39) \
178a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(40)  name(41)  name(42)  name(43)  name(44)  name(45)  name(46)  name(47) \
179a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(48)  name(49)  name(50)  name(51)  name(52)  name(53)  name(54)  name(55) \
180a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(56)  name(57)  name(58)  name(59)  name(60)  name(61)  name(62)  name(63) \
181a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(64)  name(65)  name(66)  name(67)  name(68)  name(69)  name(70)  name(71) \
182a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(72)  name(73)  name(74)  name(75)  name(76)  name(77)  name(78)  name(79) \
183a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(80)  name(81)  name(82)  name(83)  name(84)  name(85)  name(86)  name(87) \
184a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(88)  name(89)  name(90)  name(91)  name(92)  name(93)  name(94)  name(95) \
185a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(96)  name(97)  name(98)  name(99)  \
186a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(100) name(101) name(102) name(103) name(104) name(105) name(106) name(107) \
187a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(108) name(109) name(110) name(111) name(112) name(113) name(114) name(115) \
188a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(116) name(117) name(118) name(119) name(120) name(121) name(122) name(123) \
189a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(124) name(125) name(126) name(127) name(128) name(129) name(130) name(131) \
190a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(132) name(133) name(134) name(135) name(136) name(137) name(138) name(139) \
191a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(140) name(141) name(142) name(143) name(144) name(145) name(146) name(147) \
192a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(148) name(149) name(150) name(151) name(152) name(153) name(154) name(155) \
193a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(156) name(157) name(158) name(159) name(160) name(161) name(162) name(163) \
194a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(164) name(165) name(166) name(167) name(168) name(169) name(170) name(171) \
195a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(172) name(173) name(174) name(175) name(176) name(177) name(178) name(179) \
196a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(180) name(181) name(182) name(183) name(184) name(185) name(186) name(187) \
197a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(188) name(189) name(190) name(191) name(192) name(193) name(194) name(195) \
198a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(196) name(197) name(198) name(199) \
199a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(200) name(201) name(202) name(203) name(204) name(205) name(206) name(207) \
200a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(208) name(209) name(210) name(211) name(212) name(213) name(214) name(215) \
201a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(216) name(217) name(218) name(219) name(220) name(221) name(222) name(223) \
202a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(224) name(225) name(226) name(227) name(228) name(229) name(230) name(231) \
203a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(232) name(233) name(234) name(235) name(236) name(237) name(238) name(239) \
204a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(240) name(241) name(242) name(243) name(244) name(245) name(246) name(247) \
205a6d86e5ea748a7bcde4ff30b0b1f882dca36a8f3Mathias Agopian    name(248) name(249) name(250) name(251) name(252) name(253) name(254) name(255)
2067f781d155221c4067c93f85b4153c204423f49f2Mathias Agopian
2077f781d155221c4067c93f85b4153c204423f49f2Mathias Agopian
2087f781d155221c4067c93f85b4153c204423f49f2Mathias AgopianGL_EXTENSION_LIST( GL_EXTENSION )
2097f781d155221c4067c93f85b4153c204423f49f2Mathias Agopian
2107f781d155221c4067c93f85b4153c204423f49f2Mathias Agopian#define GL_EXTENSION_ARRAY(_n)  GL_EXTENSION_NAME(_n),
21124035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian
21224035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopianextern const __eglMustCastToProperFunctionPointerType gExtensionForwarders[MAX_NUMBER_OF_GL_EXTENSIONS] = {
2137f781d155221c4067c93f85b4153c204423f49f2Mathias Agopian        GL_EXTENSION_LIST( GL_EXTENSION_ARRAY )
21424035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian };
21524035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian
2167f781d155221c4067c93f85b4153c204423f49f2Mathias Agopian#undef GET_TLS
2177f781d155221c4067c93f85b4153c204423f49f2Mathias Agopian#undef GL_EXTENSION_LIST
2187f781d155221c4067c93f85b4153c204423f49f2Mathias Agopian#undef GL_EXTENSION_ARRAY
21924035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian#undef GL_EXTENSION_NAME
22024035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian#undef GL_EXTENSION
22124035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian#undef API_ENTRY
2227f781d155221c4067c93f85b4153c204423f49f2Mathias Agopian#undef CALL_GL_EXTENSION_API
22324035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian
22424035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian// ----------------------------------------------------------------------------
22524035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian}; // namespace android
22624035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian// ----------------------------------------------------------------------------
22724035338ed6329e4d85fb00cf99a91e2cdd55ba5Mathias Agopian
228