diff options
Diffstat (limited to 'opengl/libs')
58 files changed, 0 insertions, 20105 deletions
diff --git a/opengl/libs/Android.mk b/opengl/libs/Android.mk deleted file mode 100644 index 9c1a10e..0000000 --- a/opengl/libs/Android.mk +++ /dev/null @@ -1,167 +0,0 @@ -LOCAL_PATH:= $(call my-dir) - -############################################################################### -# Build META EGL library -# - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - EGL/egl_tls.cpp \ - EGL/egl_cache.cpp \ - EGL/egl_display.cpp \ - EGL/egl_object.cpp \ - EGL/egl.cpp \ - EGL/eglApi.cpp \ - EGL/trace.cpp \ - EGL/getProcAddress.cpp.arm \ - EGL/Loader.cpp \ -# - -LOCAL_SHARED_LIBRARIES += libcutils libutils libGLESv2_dbg -LOCAL_LDLIBS := -lpthread -ldl -LOCAL_MODULE:= libEGL -LOCAL_LDFLAGS += -Wl,--exclude-libs=ALL -LOCAL_SHARED_LIBRARIES += libdl -# Bionic's private TLS header relies on the ARCH_ARM_HAVE_TLS_REGISTER to -# select the appropriate TLS codepath -ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) - LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER -endif -# we need to access the private Bionic header <bionic_tls.h> -LOCAL_C_INCLUDES += bionic/libc/private - -LOCAL_CFLAGS += -DLOG_TAG=\"libEGL\" -LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES -LOCAL_CFLAGS += -fvisibility=hidden -LOCAL_CFLAGS += -DEGL_TRACE=1 - -ifeq ($(TARGET_BOARD_PLATFORM),msm7k) -LOCAL_CFLAGS += -DADRENO130=1 -endif - -ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) - LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER -endif - -ifneq ($(MAX_EGL_CACHE_ENTRY_SIZE),) - LOCAL_CFLAGS += -DMAX_EGL_CACHE_ENTRY_SIZE=$(MAX_EGL_CACHE_ENTRY_SIZE) -endif - -ifneq ($(MAX_EGL_CACHE_SIZE),) - LOCAL_CFLAGS += -DMAX_EGL_CACHE_SIZE=$(MAX_EGL_CACHE_SIZE) -endif - -include $(BUILD_SHARED_LIBRARY) -installed_libEGL := $(LOCAL_INSTALLED_MODULE) - -# OpenGL drivers config file -ifneq ($(BOARD_EGL_CFG),) - -include $(CLEAR_VARS) -LOCAL_MODULE := egl.cfg -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_CLASS := ETC -LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/egl -LOCAL_SRC_FILES := ../../../../$(BOARD_EGL_CFG) -include $(BUILD_PREBUILT) - -# make sure we depend on egl.cfg, so it gets installed -$(installed_libEGL): | egl.cfg - -endif - -############################################################################### -# Build the wrapper OpenGL ES 1.x library -# - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - GLES_CM/gl.cpp.arm \ -# - -LOCAL_SHARED_LIBRARIES += libcutils libEGL -LOCAL_LDLIBS := -lpthread -ldl -LOCAL_MODULE:= libGLESv1_CM - -LOCAL_SHARED_LIBRARIES += libdl -# we need to access the private Bionic header <bionic_tls.h> -ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) - LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER -endif -LOCAL_C_INCLUDES += bionic/libc/private - -LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv1\" -LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES -LOCAL_CFLAGS += -fvisibility=hidden - -ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) - LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER -endif - -include $(BUILD_SHARED_LIBRARY) - - -############################################################################### -# Build the wrapper OpenGL ES 2.x library -# - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - GLES2/gl2.cpp.arm \ -# - -LOCAL_SHARED_LIBRARIES += libcutils libEGL -LOCAL_LDLIBS := -lpthread -ldl -LOCAL_MODULE:= libGLESv2 - -LOCAL_SHARED_LIBRARIES += libdl -# we need to access the private Bionic header <bionic_tls.h> -ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) - LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER -endif -LOCAL_C_INCLUDES += bionic/libc/private - -LOCAL_CFLAGS += -DLOG_TAG=\"libGLESv2\" -LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES -LOCAL_CFLAGS += -fvisibility=hidden - -ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) - LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER -endif - -include $(BUILD_SHARED_LIBRARY) - -############################################################################### -# Build the ETC1 host static library -# - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - ETC1/etc1.cpp \ -# - -LOCAL_LDLIBS := -lpthread -ldl -LOCAL_MODULE:= libETC1 - -include $(BUILD_HOST_STATIC_LIBRARY) - -############################################################################### -# Build the ETC1 device library -# - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES:= \ - ETC1/etc1.cpp \ -# - -LOCAL_LDLIBS := -lpthread -ldl -LOCAL_MODULE:= libETC1 - -include $(BUILD_SHARED_LIBRARY) - -include $(call all-makefiles-under,$(LOCAL_PATH)) diff --git a/opengl/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp deleted file mode 100644 index 325193c..0000000 --- a/opengl/libs/EGL/Loader.cpp +++ /dev/null @@ -1,332 +0,0 @@ -/* - ** Copyright 2007, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#include <ctype.h> -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <errno.h> -#include <dlfcn.h> -#include <limits.h> - -#include <cutils/log.h> -#include <cutils/properties.h> - -#include <EGL/egl.h> - -#include "egldefs.h" -#include "glesv2dbg.h" -#include "hooks.h" -#include "Loader.h" - -// ---------------------------------------------------------------------------- -namespace android { -// ---------------------------------------------------------------------------- - - -/* - * EGL drivers are called - * - * /system/lib/egl/lib{[EGL|GLESv1_CM|GLESv2] | GLES}_$TAG.so - * - */ - -ANDROID_SINGLETON_STATIC_INSTANCE( Loader ) - -/* This function is called to check whether we run inside the emulator, - * and if this is the case whether GLES GPU emulation is supported. - * - * Returned values are: - * -1 -> not running inside the emulator - * 0 -> running inside the emulator, but GPU emulation not supported - * 1 -> running inside the emulator, GPU emulation is supported - * through the "emulation" config. - */ -static int -checkGlesEmulationStatus(void) -{ - /* We're going to check for the following kernel parameters: - * - * qemu=1 -> tells us that we run inside the emulator - * android.qemu.gles=<number> -> tells us the GLES GPU emulation status - * - * Note that we will return <number> if we find it. This let us support - * more additionnal emulation modes in the future. - */ - char prop[PROPERTY_VALUE_MAX]; - int result = -1; - - /* First, check for qemu=1 */ - property_get("ro.kernel.qemu",prop,"0"); - if (atoi(prop) != 1) - return -1; - - /* We are in the emulator, get GPU status value */ - property_get("ro.kernel.qemu.gles",prop,"0"); - return atoi(prop); -} - -// ---------------------------------------------------------------------------- - -Loader::driver_t::driver_t(void* gles) -{ - dso[0] = gles; - for (size_t i=1 ; i<NELEM(dso) ; i++) - dso[i] = 0; -} - -Loader::driver_t::~driver_t() -{ - for (size_t i=0 ; i<NELEM(dso) ; i++) { - if (dso[i]) { - dlclose(dso[i]); - dso[i] = 0; - } - } -} - -status_t Loader::driver_t::set(void* hnd, int32_t api) -{ - switch (api) { - case EGL: - dso[0] = hnd; - break; - case GLESv1_CM: - dso[1] = hnd; - break; - case GLESv2: - dso[2] = hnd; - break; - default: - return BAD_INDEX; - } - return NO_ERROR; -} - -// ---------------------------------------------------------------------------- - -Loader::entry_t::entry_t(int dpy, int impl, const char* tag) - : dpy(dpy), impl(impl), tag(tag) { -} - -// ---------------------------------------------------------------------------- - -Loader::Loader() -{ - char line[256]; - char tag[256]; - - /* Special case for GLES emulation */ - if (checkGlesEmulationStatus() == 0) { - LOGD("Emulator without GPU support detected. Fallback to software renderer."); - gConfig.add( entry_t(0, 0, "android") ); - return; - } - - /* Otherwise, use egl.cfg */ - FILE* cfg = fopen("/system/lib/egl/egl.cfg", "r"); - if (cfg == NULL) { - // default config - LOGD("egl.cfg not found, using default config"); - gConfig.add( entry_t(0, 0, "android") ); - } else { - while (fgets(line, 256, cfg)) { - int dpy; - int impl; - if (sscanf(line, "%u %u %s", &dpy, &impl, tag) == 3) { - //LOGD(">>> %u %u %s", dpy, impl, tag); - gConfig.add( entry_t(dpy, impl, tag) ); - } - } - fclose(cfg); - } -} - -Loader::~Loader() -{ - StopDebugServer(); -} - -const char* Loader::getTag(int dpy, int impl) -{ - const Vector<entry_t>& cfgs(gConfig); - const size_t c = cfgs.size(); - for (size_t i=0 ; i<c ; i++) { - if (dpy == cfgs[i].dpy) - if (impl == cfgs[i].impl) - return cfgs[i].tag.string(); - } - return 0; -} - -void* Loader::open(EGLNativeDisplayType display, int impl, egl_connection_t* cnx) -{ - /* - * TODO: if we don't find display/0, then use 0/0 - * (0/0 should always work) - */ - - void* dso; - int index = int(display); - driver_t* hnd = 0; - - char const* tag = getTag(index, impl); - if (tag) { - dso = load_driver("GLES", tag, cnx, EGL | GLESv1_CM | GLESv2); - if (dso) { - hnd = new driver_t(dso); - } else { - // Always load EGL first - dso = load_driver("EGL", tag, cnx, EGL); - if (dso) { - hnd = new driver_t(dso); - - // TODO: make this more automated - hnd->set( load_driver("GLESv1_CM", tag, cnx, GLESv1_CM), GLESv1_CM ); - - hnd->set( load_driver("GLESv2", tag, cnx, GLESv2), GLESv2 ); - } - } - } - - LOG_FATAL_IF(!index && !impl && !hnd, - "couldn't find the default OpenGL ES implementation " - "for default display"); - - return (void*)hnd; -} - -status_t Loader::close(void* driver) -{ - driver_t* hnd = (driver_t*)driver; - delete hnd; - return NO_ERROR; -} - -void Loader::init_api(void* dso, - char const * const * api, - __eglMustCastToProperFunctionPointerType* curr, - getProcAddressType getProcAddress) -{ - const size_t SIZE = 256; - char scrap[SIZE]; - while (*api) { - char const * name = *api; - __eglMustCastToProperFunctionPointerType f = - (__eglMustCastToProperFunctionPointerType)dlsym(dso, name); - if (f == NULL) { - // couldn't find the entry-point, use eglGetProcAddress() - f = getProcAddress(name); - } - if (f == NULL) { - // Try without the OES postfix - ssize_t index = ssize_t(strlen(name)) - 3; - if ((index>0 && (index<SIZE-1)) && (!strcmp(name+index, "OES"))) { - strncpy(scrap, name, index); - scrap[index] = 0; - f = (__eglMustCastToProperFunctionPointerType)dlsym(dso, scrap); - //LOGD_IF(f, "found <%s> instead", scrap); - } - } - if (f == NULL) { - // Try with the OES postfix - ssize_t index = ssize_t(strlen(name)) - 3; - if (index>0 && strcmp(name+index, "OES")) { - snprintf(scrap, SIZE, "%sOES", name); - f = (__eglMustCastToProperFunctionPointerType)dlsym(dso, scrap); - //LOGD_IF(f, "found <%s> instead", scrap); - } - } - if (f == NULL) { - //LOGD("%s", name); - f = (__eglMustCastToProperFunctionPointerType)gl_unimplemented; - } - *curr++ = f; - api++; - } -} - -void *Loader::load_driver(const char* kind, const char *tag, - egl_connection_t* cnx, uint32_t mask) -{ - char driver_absolute_path[PATH_MAX]; - const char* const search1 = "/vendor/lib/egl/lib%s_%s.so"; - const char* const search2 = "/system/lib/egl/lib%s_%s.so"; - - snprintf(driver_absolute_path, PATH_MAX, search1, kind, tag); - if (access(driver_absolute_path, R_OK)) { - snprintf(driver_absolute_path, PATH_MAX, search2, kind, tag); - if (access(driver_absolute_path, R_OK)) { - // this happens often, we don't want to log an error - return 0; - } - } - - void* dso = dlopen(driver_absolute_path, RTLD_NOW | RTLD_LOCAL); - if (dso == 0) { - const char* err = dlerror(); - LOGE("load_driver(%s): %s", driver_absolute_path, err?err:"unknown"); - return 0; - } - - LOGD("loaded %s", driver_absolute_path); - - if (mask & EGL) { - getProcAddress = (getProcAddressType)dlsym(dso, "eglGetProcAddress"); - - LOGE_IF(!getProcAddress, - "can't find eglGetProcAddress() in %s", driver_absolute_path); - - egl_t* egl = &cnx->egl; - __eglMustCastToProperFunctionPointerType* curr = - (__eglMustCastToProperFunctionPointerType*)egl; - char const * const * api = egl_names; - while (*api) { - char const * name = *api; - __eglMustCastToProperFunctionPointerType f = - (__eglMustCastToProperFunctionPointerType)dlsym(dso, name); - if (f == NULL) { - // couldn't find the entry-point, use eglGetProcAddress() - f = getProcAddress(name); - if (f == NULL) { - f = (__eglMustCastToProperFunctionPointerType)0; - } - } - *curr++ = f; - api++; - } - } - - if (mask & GLESv1_CM) { - init_api(dso, gl_names, - (__eglMustCastToProperFunctionPointerType*) - &cnx->hooks[GLESv1_INDEX]->gl, - getProcAddress); - } - - if (mask & GLESv2) { - init_api(dso, gl_names, - (__eglMustCastToProperFunctionPointerType*) - &cnx->hooks[GLESv2_INDEX]->gl, - getProcAddress); - } - - return dso; -} - -// ---------------------------------------------------------------------------- -}; // namespace android -// ---------------------------------------------------------------------------- diff --git a/opengl/libs/EGL/Loader.h b/opengl/libs/EGL/Loader.h deleted file mode 100644 index 580d6e4..0000000 --- a/opengl/libs/EGL/Loader.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - ** Copyright 2009, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#ifndef ANDROID_EGL_LOADER_H -#define ANDROID_EGL_LOADER_H - -#include <ctype.h> -#include <string.h> -#include <errno.h> - -#include <utils/Errors.h> -#include <utils/Singleton.h> -#include <utils/String8.h> -#include <utils/Vector.h> - -#include <EGL/egl.h> - -// ---------------------------------------------------------------------------- -namespace android { -// ---------------------------------------------------------------------------- - -struct egl_connection_t; - -class Loader : public Singleton<Loader> -{ - friend class Singleton<Loader>; - - typedef __eglMustCastToProperFunctionPointerType (*getProcAddressType)( - const char*); - - enum { - EGL = 0x01, - GLESv1_CM = 0x02, - GLESv2 = 0x04 - }; - struct driver_t { - driver_t(void* gles); - ~driver_t(); - status_t set(void* hnd, int32_t api); - void* dso[3]; - }; - - struct entry_t { - entry_t() { } - entry_t(int dpy, int impl, const char* tag); - int dpy; - int impl; - String8 tag; - }; - - Vector<entry_t> gConfig; - getProcAddressType getProcAddress; - - const char* getTag(int dpy, int impl); - -public: - ~Loader(); - - void* open(EGLNativeDisplayType display, int impl, egl_connection_t* cnx); - status_t close(void* driver); - -private: - Loader(); - void *load_driver(const char* kind, const char *tag, egl_connection_t* cnx, uint32_t mask); - - static __attribute__((noinline)) - void init_api(void* dso, - char const * const * api, - __eglMustCastToProperFunctionPointerType* curr, - getProcAddressType getProcAddress); -}; - -// ---------------------------------------------------------------------------- -}; // namespace android -// ---------------------------------------------------------------------------- - -#endif /* ANDROID_EGL_LOADER_H */ diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp deleted file mode 100644 index 6ad06af..0000000 --- a/opengl/libs/EGL/egl.cpp +++ /dev/null @@ -1,362 +0,0 @@ -/* - ** Copyright 2007, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#include <ctype.h> -#include <stdlib.h> -#include <string.h> - -#include <hardware/gralloc.h> -#include <system/window.h> - -#include <EGL/egl.h> -#include <EGL/eglext.h> -#include <GLES/gl.h> -#include <GLES/glext.h> - -#include <cutils/log.h> -#include <cutils/atomic.h> -#include <cutils/properties.h> -#include <cutils/memory.h> - -#include <utils/CallStack.h> -#include <utils/String8.h> - -#include "egldefs.h" -#include "egl_impl.h" -#include "egl_tls.h" -#include "glesv2dbg.h" -#include "hooks.h" -#include "Loader.h" - -#include "egl_display.h" -#include "egl_object.h" - -// ---------------------------------------------------------------------------- -namespace android { -// ---------------------------------------------------------------------------- - -egl_connection_t gEGLImpl[IMPL_NUM_IMPLEMENTATIONS]; -gl_hooks_t gHooks[2][IMPL_NUM_IMPLEMENTATIONS]; -gl_hooks_t gHooksNoContext; -pthread_key_t gGLWrapperKey = -1; - -// ---------------------------------------------------------------------------- - -#if EGL_TRACE - -EGLAPI pthread_key_t gGLTraceKey = -1; - -// ---------------------------------------------------------------------------- - -int gEGLDebugLevel; - -static int sEGLTraceLevel; -static int sEGLApplicationTraceLevel; - -extern gl_hooks_t gHooksTrace; -extern gl_hooks_t gHooksDebug; - -static inline void setGlTraceThreadSpecific(gl_hooks_t const *value) { - pthread_setspecific(gGLTraceKey, value); -} - -gl_hooks_t const* getGLTraceThreadSpecific() { - return static_cast<gl_hooks_t*>(pthread_getspecific(gGLTraceKey)); -} - -void initEglTraceLevel() { - char value[PROPERTY_VALUE_MAX]; - property_get("debug.egl.trace", value, "0"); - int propertyLevel = atoi(value); - int applicationLevel = sEGLApplicationTraceLevel; - sEGLTraceLevel = propertyLevel > applicationLevel ? propertyLevel : applicationLevel; - - property_get("debug.egl.debug_proc", value, ""); - long pid = getpid(); - char procPath[128] = {}; - sprintf(procPath, "/proc/%ld/cmdline", pid); - FILE * file = fopen(procPath, "r"); - if (file) - { - char cmdline[256] = {}; - if (fgets(cmdline, sizeof(cmdline) - 1, file)) - { - if (!strcmp(value, cmdline)) - gEGLDebugLevel = 1; - } - fclose(file); - } - - if (gEGLDebugLevel > 0) - { - property_get("debug.egl.debug_port", value, "5039"); - const unsigned short port = (unsigned short)atoi(value); - property_get("debug.egl.debug_forceUseFile", value, "0"); - const bool forceUseFile = (bool)atoi(value); - property_get("debug.egl.debug_maxFileSize", value, "8"); - const unsigned int maxFileSize = atoi(value) << 20; - property_get("debug.egl.debug_filePath", value, "/data/local/tmp/dump.gles2dbg"); - StartDebugServer(port, forceUseFile, maxFileSize, value); - } -} - -void setGLHooksThreadSpecific(gl_hooks_t const *value) { - if (sEGLTraceLevel > 0) { - setGlTraceThreadSpecific(value); - setGlThreadSpecific(&gHooksTrace); - } else if (gEGLDebugLevel > 0 && value != &gHooksNoContext) { - setGlTraceThreadSpecific(value); - setGlThreadSpecific(&gHooksDebug); - } else { - setGlThreadSpecific(value); - } -} - -/* - * Global entry point to allow applications to modify their own trace level. - * The effective trace level is the max of this level and the value of debug.egl.trace. - */ -extern "C" -void setGLTraceLevel(int level) { - sEGLApplicationTraceLevel = level; -} - -#else - -void setGLHooksThreadSpecific(gl_hooks_t const *value) { - setGlThreadSpecific(value); -} - -#endif - -/*****************************************************************************/ - -static int gl_no_context() { - if (egl_tls_t::logNoContextCall()) { - LOGE("call to OpenGL ES API with no current context " - "(logged once per thread)"); - char value[PROPERTY_VALUE_MAX]; - property_get("debug.egl.callstack", value, "0"); - if (atoi(value)) { - CallStack stack; - stack.update(); - stack.dump(); - } - } - return 0; -} - -static void early_egl_init(void) -{ -#if !USE_FAST_TLS_KEY - pthread_key_create(&gGLWrapperKey, NULL); -#endif -#if EGL_TRACE - pthread_key_create(&gGLTraceKey, NULL); - initEglTraceLevel(); -#endif - uint32_t addr = (uint32_t)((void*)gl_no_context); - android_memset32( - (uint32_t*)(void*)&gHooksNoContext, - addr, - sizeof(gHooksNoContext)); - - setGLHooksThreadSpecific(&gHooksNoContext); -} - -static pthread_once_t once_control = PTHREAD_ONCE_INIT; -static int sEarlyInitState = pthread_once(&once_control, &early_egl_init); - -// ---------------------------------------------------------------------------- - -egl_display_t* validate_display(EGLDisplay dpy) { - egl_display_t * const dp = get_display(dpy); - if (!dp) - return setError(EGL_BAD_DISPLAY, (egl_display_t*)NULL); - if (!dp->isReady()) - return setError(EGL_NOT_INITIALIZED, (egl_display_t*)NULL); - - return dp; -} - -egl_connection_t* validate_display_config(EGLDisplay dpy, EGLConfig config, - egl_display_t const*& dp) { - dp = validate_display(dpy); - if (!dp) - return (egl_connection_t*) NULL; - - if (intptr_t(config) >= dp->numTotalConfigs) { - return setError(EGL_BAD_CONFIG, (egl_connection_t*)NULL); - } - egl_connection_t* const cnx = &gEGLImpl[dp->configs[intptr_t(config)].impl]; - if (cnx->dso == 0) { - return setError(EGL_BAD_CONFIG, (egl_connection_t*)NULL); - } - return cnx; -} - -// ---------------------------------------------------------------------------- - -EGLImageKHR egl_get_image_for_current_context(EGLImageKHR image) -{ - EGLContext context = egl_tls_t::getContext(); - if (context == EGL_NO_CONTEXT || image == EGL_NO_IMAGE_KHR) - return EGL_NO_IMAGE_KHR; - - egl_context_t const * const c = get_context(context); - if (c == NULL) // this should never happen, by construction - return EGL_NO_IMAGE_KHR; - - egl_display_t* display = egl_display_t::get(c->dpy); - if (display == NULL) // this should never happen, by construction - return EGL_NO_IMAGE_KHR; - - ImageRef _i(display, image); - if (!_i.get()) - return EGL_NO_IMAGE_KHR; - - // here we don't validate the context because if it's been marked for - // termination, this call should still succeed since it's internal to - // EGL. - - egl_image_t const * const i = get_image(image); - return i->images[c->impl]; -} - -// ---------------------------------------------------------------------------- - -// this mutex protects: -// d->disp[] -// egl_init_drivers_locked() -// -static EGLBoolean egl_init_drivers_locked() { - if (sEarlyInitState) { - // initialized by static ctor. should be set here. - return EGL_FALSE; - } - - // get our driver loader - Loader& loader(Loader::getInstance()); - - // dynamically load all our EGL implementations - egl_connection_t* cnx; - - cnx = &gEGLImpl[IMPL_SOFTWARE]; - if (cnx->dso == 0) { - cnx->hooks[GLESv1_INDEX] = &gHooks[GLESv1_INDEX][IMPL_SOFTWARE]; - cnx->hooks[GLESv2_INDEX] = &gHooks[GLESv2_INDEX][IMPL_SOFTWARE]; - cnx->dso = loader.open(EGL_DEFAULT_DISPLAY, 0, cnx); - } - - cnx = &gEGLImpl[IMPL_HARDWARE]; - if (cnx->dso == 0) { - char value[PROPERTY_VALUE_MAX]; - property_get("debug.egl.hw", value, "1"); - if (atoi(value) != 0) { - cnx->hooks[GLESv1_INDEX] = &gHooks[GLESv1_INDEX][IMPL_HARDWARE]; - cnx->hooks[GLESv2_INDEX] = &gHooks[GLESv2_INDEX][IMPL_HARDWARE]; - cnx->dso = loader.open(EGL_DEFAULT_DISPLAY, 1, cnx); - } else { - LOGD("3D hardware acceleration is disabled"); - } - } - - if (!gEGLImpl[IMPL_SOFTWARE].dso && !gEGLImpl[IMPL_HARDWARE].dso) { - return EGL_FALSE; - } - - return EGL_TRUE; -} - -static pthread_mutex_t sInitDriverMutex = PTHREAD_MUTEX_INITIALIZER; - -EGLBoolean egl_init_drivers() { - EGLBoolean res; - pthread_mutex_lock(&sInitDriverMutex); - res = egl_init_drivers_locked(); - pthread_mutex_unlock(&sInitDriverMutex); - return res; -} - -void gl_unimplemented() { - LOGE("called unimplemented OpenGL ES API"); -} - -// ---------------------------------------------------------------------------- - -#if USE_FAST_TLS_KEY - -// We have a dedicated TLS slot in bionic -static inline gl_hooks_t const * volatile * get_tls_hooks() { - volatile void *tls_base = __get_tls(); - gl_hooks_t const * volatile * tls_hooks = - reinterpret_cast<gl_hooks_t const * volatile *>(tls_base); - return tls_hooks; -} - -void setGlThreadSpecific(gl_hooks_t const *value) { - gl_hooks_t const * volatile * tls_hooks = get_tls_hooks(); - tls_hooks[TLS_SLOT_OPENGL_API] = value; -} - -gl_hooks_t const* getGlThreadSpecific() { - gl_hooks_t const * volatile * tls_hooks = get_tls_hooks(); - gl_hooks_t const* hooks = tls_hooks[TLS_SLOT_OPENGL_API]; - if (hooks) return hooks; - return &gHooksNoContext; -} - -#else - -void setGlThreadSpecific(gl_hooks_t const *value) { - pthread_setspecific(gGLWrapperKey, value); -} - -gl_hooks_t const* getGlThreadSpecific() { - gl_hooks_t const* hooks = static_cast<gl_hooks_t*>(pthread_getspecific(gGLWrapperKey)); - if (hooks) return hooks; - return &gHooksNoContext; -} - -#endif - -// ---------------------------------------------------------------------------- -// GL / EGL hooks -// ---------------------------------------------------------------------------- - -#undef GL_ENTRY -#undef EGL_ENTRY -#define GL_ENTRY(_r, _api, ...) #_api, -#define EGL_ENTRY(_r, _api, ...) #_api, - -char const * const gl_names[] = { - #include "entries.in" - NULL -}; - -char const * const egl_names[] = { - #include "egl_entries.in" - NULL -}; - -#undef GL_ENTRY -#undef EGL_ENTRY - - -// ---------------------------------------------------------------------------- -}; // namespace android -// ---------------------------------------------------------------------------- - diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp deleted file mode 100644 index 2b0ed5d..0000000 --- a/opengl/libs/EGL/eglApi.cpp +++ /dev/null @@ -1,1488 +0,0 @@ -/* - ** Copyright 2007, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#include <ctype.h> -#include <stdlib.h> -#include <string.h> - -#include <hardware/gralloc.h> -#include <system/window.h> - -#include <EGL/egl.h> -#include <EGL/eglext.h> -#include <GLES/gl.h> -#include <GLES/glext.h> - -#include <cutils/log.h> -#include <cutils/atomic.h> -#include <cutils/properties.h> -#include <cutils/memory.h> - -#include <utils/KeyedVector.h> -#include <utils/SortedVector.h> -#include <utils/String8.h> - -#include "egl_impl.h" -#include "egl_tls.h" -#include "glesv2dbg.h" -#include "hooks.h" - -#include "egl_display.h" -#include "egl_impl.h" -#include "egl_object.h" -#include "egl_tls.h" - -using namespace android; - -// ---------------------------------------------------------------------------- - -#define EGL_VERSION_HW_ANDROID 0x3143 - -struct extention_map_t { - const char* name; - __eglMustCastToProperFunctionPointerType address; -}; - -static const extention_map_t sExtentionMap[] = { - { "eglLockSurfaceKHR", - (__eglMustCastToProperFunctionPointerType)&eglLockSurfaceKHR }, - { "eglUnlockSurfaceKHR", - (__eglMustCastToProperFunctionPointerType)&eglUnlockSurfaceKHR }, - { "eglCreateImageKHR", - (__eglMustCastToProperFunctionPointerType)&eglCreateImageKHR }, - { "eglDestroyImageKHR", - (__eglMustCastToProperFunctionPointerType)&eglDestroyImageKHR }, - { "eglGetSystemTimeFrequencyNV", - (__eglMustCastToProperFunctionPointerType)&eglGetSystemTimeFrequencyNV }, - { "eglGetSystemTimeNV", - (__eglMustCastToProperFunctionPointerType)&eglGetSystemTimeNV }, -}; - -// accesses protected by sExtensionMapMutex -static DefaultKeyedVector<String8, __eglMustCastToProperFunctionPointerType> sGLExtentionMap; -static int sGLExtentionSlot = 0; -static pthread_mutex_t sExtensionMapMutex = PTHREAD_MUTEX_INITIALIZER; - -static void(*findProcAddress(const char* name, - const extention_map_t* map, size_t n))() { - for (uint32_t i=0 ; i<n ; i++) { - if (!strcmp(name, map[i].name)) { - return map[i].address; - } - } - return NULL; -} - -// ---------------------------------------------------------------------------- - -template<typename T> -static __attribute__((noinline)) -int binarySearch(T const sortedArray[], int first, int last, T key) { - while (first <= last) { - int mid = (first + last) / 2; - if (sortedArray[mid] < key) { - first = mid + 1; - } else if (key < sortedArray[mid]) { - last = mid - 1; - } else { - return mid; - } - } - return -1; -} - -// ---------------------------------------------------------------------------- - -namespace android { -extern void setGLHooksThreadSpecific(gl_hooks_t const *value); -extern EGLBoolean egl_init_drivers(); -extern const __eglMustCastToProperFunctionPointerType gExtensionForwarders[MAX_NUMBER_OF_GL_EXTENSIONS]; -extern int gEGLDebugLevel; -extern gl_hooks_t gHooksTrace; -extern gl_hooks_t gHooksDebug; -} // namespace android; - -// ---------------------------------------------------------------------------- - -static inline void clearError() { egl_tls_t::clearError(); } -static inline EGLContext getContext() { return egl_tls_t::getContext(); } - -// ---------------------------------------------------------------------------- - -EGLDisplay eglGetDisplay(EGLNativeDisplayType display) -{ - clearError(); - - uint32_t index = uint32_t(display); - if (index >= NUM_DISPLAYS) { - return setError(EGL_BAD_PARAMETER, EGL_NO_DISPLAY); - } - - if (egl_init_drivers() == EGL_FALSE) { - return setError(EGL_BAD_PARAMETER, EGL_NO_DISPLAY); - } - - EGLDisplay dpy = egl_display_t::getFromNativeDisplay(display); - return dpy; -} - -// ---------------------------------------------------------------------------- -// Initialization -// ---------------------------------------------------------------------------- - -EGLBoolean eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) -{ - clearError(); - - egl_display_t * const dp = get_display(dpy); - if (!dp) return setError(EGL_BAD_DISPLAY, EGL_FALSE); - - EGLBoolean res = dp->initialize(major, minor); - - return res; -} - -EGLBoolean eglTerminate(EGLDisplay dpy) -{ - // NOTE: don't unload the drivers b/c some APIs can be called - // after eglTerminate() has been called. eglTerminate() only - // terminates an EGLDisplay, not a EGL itself. - - clearError(); - - egl_display_t* const dp = get_display(dpy); - if (!dp) return setError(EGL_BAD_DISPLAY, EGL_FALSE); - - EGLBoolean res = dp->terminate(); - - return res; -} - -// ---------------------------------------------------------------------------- -// configuration -// ---------------------------------------------------------------------------- - -EGLBoolean eglGetConfigs( EGLDisplay dpy, - EGLConfig *configs, - EGLint config_size, EGLint *num_config) -{ - clearError(); - - egl_display_t const * const dp = validate_display(dpy); - if (!dp) return EGL_FALSE; - - GLint numConfigs = dp->numTotalConfigs; - if (!configs) { - *num_config = numConfigs; - return EGL_TRUE; - } - - GLint n = 0; - for (intptr_t i=0 ; i<dp->numTotalConfigs && config_size ; i++) { - *configs++ = EGLConfig(i); - config_size--; - n++; - } - - *num_config = n; - return EGL_TRUE; -} - -EGLBoolean eglChooseConfig( EGLDisplay dpy, const EGLint *attrib_list, - EGLConfig *configs, EGLint config_size, - EGLint *num_config) -{ - clearError(); - - egl_display_t const * const dp = validate_display(dpy); - if (!dp) return EGL_FALSE; - - if (num_config==0) { - return setError(EGL_BAD_PARAMETER, EGL_FALSE); - } - - EGLint n; - EGLBoolean res = EGL_FALSE; - *num_config = 0; - - - // It is unfortunate, but we need to remap the EGL_CONFIG_IDs, - // to do this, we have to go through the attrib_list array once - // to figure out both its size and if it contains an EGL_CONFIG_ID - // key. If so, the full array is copied and patched. - // NOTE: we assume that there can be only one occurrence - // of EGL_CONFIG_ID. - - EGLint patch_index = -1; - GLint attr; - size_t size = 0; - if (attrib_list) { - while ((attr=attrib_list[size]) != EGL_NONE) { - if (attr == EGL_CONFIG_ID) - patch_index = size; - size += 2; - } - } - if (patch_index >= 0) { - size += 2; // we need copy the sentinel as well - EGLint* new_list = (EGLint*)malloc(size*sizeof(EGLint)); - if (new_list == 0) - return setError(EGL_BAD_ALLOC, EGL_FALSE); - memcpy(new_list, attrib_list, size*sizeof(EGLint)); - - // patch the requested EGL_CONFIG_ID - bool found = false; - EGLConfig ourConfig(0); - EGLint& configId(new_list[patch_index+1]); - for (intptr_t i=0 ; i<dp->numTotalConfigs ; i++) { - if (dp->configs[i].configId == configId) { - ourConfig = EGLConfig(i); - configId = dp->configs[i].implConfigId; - found = true; - break; - } - } - - egl_connection_t* const cnx = &gEGLImpl[dp->configs[intptr_t(ourConfig)].impl]; - if (found && cnx->dso) { - // and switch to the new list - attrib_list = const_cast<const EGLint *>(new_list); - - // At this point, the only configuration that can match is - // dp->configs[i][index], however, we don't know if it would be - // rejected because of the other attributes, so we do have to call - // cnx->egl.eglChooseConfig() -- but we don't have to loop - // through all the EGLimpl[]. - // We also know we can only get a single config back, and we know - // which one. - - res = cnx->egl.eglChooseConfig( - dp->disp[ dp->configs[intptr_t(ourConfig)].impl ].dpy, - attrib_list, configs, config_size, &n); - if (res && n>0) { - // n has to be 0 or 1, by construction, and we already know - // which config it will return (since there can be only one). - if (configs) { - configs[0] = ourConfig; - } - *num_config = 1; - } - } - - free(const_cast<EGLint *>(attrib_list)); - return res; - } - - - for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { - egl_connection_t* const cnx = &gEGLImpl[i]; - if (cnx->dso) { - if (cnx->egl.eglChooseConfig( - dp->disp[i].dpy, attrib_list, configs, config_size, &n)) { - if (configs) { - // now we need to convert these client EGLConfig to our - // internal EGLConfig format. - // This is done in O(n Log(n)) time. - for (int j=0 ; j<n ; j++) { - egl_config_t key(i, configs[j]); - intptr_t index = binarySearch<egl_config_t>( - dp->configs, 0, dp->numTotalConfigs, key); - if (index >= 0) { - configs[j] = EGLConfig(index); - } else { - return setError(EGL_BAD_CONFIG, EGL_FALSE); - } - } - configs += n; - config_size -= n; - } - *num_config += n; - res = EGL_TRUE; - } - } - } - return res; -} - -EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, - EGLint attribute, EGLint *value) -{ - clearError(); - - egl_display_t const* dp = 0; - egl_connection_t* cnx = validate_display_config(dpy, config, dp); - if (!cnx) return EGL_FALSE; - - if (attribute == EGL_CONFIG_ID) { - *value = dp->configs[intptr_t(config)].configId; - return EGL_TRUE; - } - return cnx->egl.eglGetConfigAttrib( - dp->disp[ dp->configs[intptr_t(config)].impl ].dpy, - dp->configs[intptr_t(config)].config, attribute, value); -} - -// ---------------------------------------------------------------------------- -// surfaces -// ---------------------------------------------------------------------------- - -EGLSurface eglCreateWindowSurface( EGLDisplay dpy, EGLConfig config, - NativeWindowType window, - const EGLint *attrib_list) -{ - clearError(); - - egl_display_t const* dp = 0; - egl_connection_t* cnx = validate_display_config(dpy, config, dp); - if (cnx) { - EGLDisplay iDpy = dp->disp[ dp->configs[intptr_t(config)].impl ].dpy; - EGLConfig iConfig = dp->configs[intptr_t(config)].config; - EGLint format; - - if (native_window_api_connect(window, NATIVE_WINDOW_API_EGL) != OK) { - LOGE("EGLNativeWindowType %p already connected to another API", - window); - return setError(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE); - } - - // set the native window's buffers format to match this config - if (cnx->egl.eglGetConfigAttrib(iDpy, - iConfig, EGL_NATIVE_VISUAL_ID, &format)) { - if (format != 0) { - int err = native_window_set_buffers_format(window, format); - if (err != 0) { - LOGE("error setting native window pixel format: %s (%d)", - strerror(-err), err); - native_window_api_disconnect(window, NATIVE_WINDOW_API_EGL); - return setError(EGL_BAD_NATIVE_WINDOW, EGL_NO_SURFACE); - } - } - } - - // the EGL spec requires that a new EGLSurface default to swap interval - // 1, so explicitly set that on the window here. - ANativeWindow* anw = reinterpret_cast<ANativeWindow*>(window); - anw->setSwapInterval(anw, 1); - - EGLSurface surface = cnx->egl.eglCreateWindowSurface( - iDpy, iConfig, window, attrib_list); - if (surface != EGL_NO_SURFACE) { - egl_surface_t* s = new egl_surface_t(dpy, config, window, surface, - dp->configs[intptr_t(config)].impl, cnx); - return s; - } - - // EGLSurface creation failed - native_window_set_buffers_format(window, 0); - native_window_api_disconnect(window, NATIVE_WINDOW_API_EGL); - } - return EGL_NO_SURFACE; -} - -EGLSurface eglCreatePixmapSurface( EGLDisplay dpy, EGLConfig config, - NativePixmapType pixmap, - const EGLint *attrib_list) -{ - clearError(); - - egl_display_t const* dp = 0; - egl_connection_t* cnx = validate_display_config(dpy, config, dp); - if (cnx) { - EGLSurface surface = cnx->egl.eglCreatePixmapSurface( - dp->disp[ dp->configs[intptr_t(config)].impl ].dpy, - dp->configs[intptr_t(config)].config, pixmap, attrib_list); - if (surface != EGL_NO_SURFACE) { - egl_surface_t* s = new egl_surface_t(dpy, config, NULL, surface, - dp->configs[intptr_t(config)].impl, cnx); - return s; - } - } - return EGL_NO_SURFACE; -} - -EGLSurface eglCreatePbufferSurface( EGLDisplay dpy, EGLConfig config, - const EGLint *attrib_list) -{ - clearError(); - - egl_display_t const* dp = 0; - egl_connection_t* cnx = validate_display_config(dpy, config, dp); - if (cnx) { - EGLSurface surface = cnx->egl.eglCreatePbufferSurface( - dp->disp[ dp->configs[intptr_t(config)].impl ].dpy, - dp->configs[intptr_t(config)].config, attrib_list); - if (surface != EGL_NO_SURFACE) { - egl_surface_t* s = new egl_surface_t(dpy, config, NULL, surface, - dp->configs[intptr_t(config)].impl, cnx); - return s; - } - } - return EGL_NO_SURFACE; -} - -EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface) -{ - clearError(); - - egl_display_t const * const dp = validate_display(dpy); - if (!dp) return EGL_FALSE; - - SurfaceRef _s(dp, surface); - if (!_s.get()) - return setError(EGL_BAD_SURFACE, EGL_FALSE); - - egl_surface_t * const s = get_surface(surface); - EGLBoolean result = s->cnx->egl.eglDestroySurface( - dp->disp[s->impl].dpy, s->surface); - if (result == EGL_TRUE) { - _s.terminate(); - } - return result; -} - -EGLBoolean eglQuerySurface( EGLDisplay dpy, EGLSurface surface, - EGLint attribute, EGLint *value) -{ - clearError(); - - egl_display_t const * const dp = validate_display(dpy); - if (!dp) return EGL_FALSE; - - SurfaceRef _s(dp, surface); - if (!_s.get()) - return setError(EGL_BAD_SURFACE, EGL_FALSE); - - egl_surface_t const * const s = get_surface(surface); - EGLBoolean result(EGL_TRUE); - if (attribute == EGL_CONFIG_ID) { - // We need to remap EGL_CONFIG_IDs - *value = dp->configs[intptr_t(s->config)].configId; - } else { - result = s->cnx->egl.eglQuerySurface( - dp->disp[s->impl].dpy, s->surface, attribute, value); - } - - return result; -} - -// ---------------------------------------------------------------------------- -// Contexts -// ---------------------------------------------------------------------------- - -EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config, - EGLContext share_list, const EGLint *attrib_list) -{ - clearError(); - - egl_display_t const* dp = 0; - egl_connection_t* cnx = validate_display_config(dpy, config, dp); - if (cnx) { - if (share_list != EGL_NO_CONTEXT) { - egl_context_t* const c = get_context(share_list); - share_list = c->context; - } - EGLContext context = cnx->egl.eglCreateContext( - dp->disp[ dp->configs[intptr_t(config)].impl ].dpy, - dp->configs[intptr_t(config)].config, - share_list, attrib_list); - if (context != EGL_NO_CONTEXT) { - // figure out if it's a GLESv1 or GLESv2 - int version = 0; - if (attrib_list) { - while (*attrib_list != EGL_NONE) { - GLint attr = *attrib_list++; - GLint value = *attrib_list++; - if (attr == EGL_CONTEXT_CLIENT_VERSION) { - if (value == 1) { - version = GLESv1_INDEX; - } else if (value == 2) { - version = GLESv2_INDEX; - } - } - }; - } - egl_context_t* c = new egl_context_t(dpy, context, config, - dp->configs[intptr_t(config)].impl, cnx, version); - return c; - } - } - return EGL_NO_CONTEXT; -} - -EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext ctx) -{ - clearError(); - - egl_display_t const * const dp = validate_display(dpy); - if (!dp) - return EGL_FALSE; - - ContextRef _c(dp, ctx); - if (!_c.get()) - return setError(EGL_BAD_CONTEXT, EGL_FALSE); - - egl_context_t * const c = get_context(ctx); - EGLBoolean result = c->cnx->egl.eglDestroyContext( - dp->disp[c->impl].dpy, c->context); - if (result == EGL_TRUE) { - _c.terminate(); - } - return result; -} - -static void loseCurrent(egl_context_t * cur_c) -{ - if (cur_c) { - egl_surface_t * cur_r = get_surface(cur_c->read); - egl_surface_t * cur_d = get_surface(cur_c->draw); - - // by construction, these are either 0 or valid (possibly terminated) - // it should be impossible for these to be invalid - ContextRef _cur_c(cur_c); - SurfaceRef _cur_r(cur_r); - SurfaceRef _cur_d(cur_d); - - cur_c->read = NULL; - cur_c->draw = NULL; - - _cur_c.release(); - _cur_r.release(); - _cur_d.release(); - } -} - -EGLBoolean eglMakeCurrent( EGLDisplay dpy, EGLSurface draw, - EGLSurface read, EGLContext ctx) -{ - clearError(); - - egl_display_t const * const dp = get_display(dpy); - if (!dp) return setError(EGL_BAD_DISPLAY, EGL_FALSE); - - // If ctx is not EGL_NO_CONTEXT, read is not EGL_NO_SURFACE, or draw is not - // EGL_NO_SURFACE, then an EGL_NOT_INITIALIZED error is generated if dpy is - // a valid but uninitialized display. - if ( (ctx != EGL_NO_CONTEXT) || (read != EGL_NO_SURFACE) || - (draw != EGL_NO_SURFACE) ) { - if (!dp->isReady()) return setError(EGL_NOT_INITIALIZED, EGL_FALSE); - } - - // get a reference to the object passed in - ContextRef _c(dp, ctx); - SurfaceRef _d(dp, draw); - SurfaceRef _r(dp, read); - - // validate the context (if not EGL_NO_CONTEXT) - if ((ctx != EGL_NO_CONTEXT) && !_c.get()) { - // EGL_NO_CONTEXT is valid - return EGL_FALSE; - } - - // these are the underlying implementation's object - EGLContext impl_ctx = EGL_NO_CONTEXT; - EGLSurface impl_draw = EGL_NO_SURFACE; - EGLSurface impl_read = EGL_NO_SURFACE; - - // these are our objects structs passed in - egl_context_t * c = NULL; - egl_surface_t const * d = NULL; - egl_surface_t const * r = NULL; - - // these are the current objects structs - egl_context_t * cur_c = get_context(getContext()); - - if (ctx != EGL_NO_CONTEXT) { - c = get_context(ctx); - impl_ctx = c->context; - } else { - // no context given, use the implementation of the current context - if (cur_c == NULL) { - // no current context - if (draw != EGL_NO_SURFACE || read != EGL_NO_SURFACE) { - // calling eglMakeCurrent( ..., !=0, !=0, EGL_NO_CONTEXT); - return setError(EGL_BAD_MATCH, EGL_FALSE); - } - // not an error, there is just no current context. - return EGL_TRUE; - } - } - - // retrieve the underlying implementation's draw EGLSurface - if (draw != EGL_NO_SURFACE) { - d = get_surface(draw); - // make sure the EGLContext and EGLSurface passed in are for - // the same driver - if (c && d->impl != c->impl) - return setError(EGL_BAD_MATCH, EGL_FALSE); - impl_draw = d->surface; - } - - // retrieve the underlying implementation's read EGLSurface - if (read != EGL_NO_SURFACE) { - r = get_surface(read); - // make sure the EGLContext and EGLSurface passed in are for - // the same driver - if (c && r->impl != c->impl) - return setError(EGL_BAD_MATCH, EGL_FALSE); - impl_read = r->surface; - } - - EGLBoolean result; - - if (c) { - result = c->cnx->egl.eglMakeCurrent( - dp->disp[c->impl].dpy, impl_draw, impl_read, impl_ctx); - } else { - result = cur_c->cnx->egl.eglMakeCurrent( - dp->disp[cur_c->impl].dpy, impl_draw, impl_read, impl_ctx); - } - - if (result == EGL_TRUE) { - - loseCurrent(cur_c); - - if (ctx != EGL_NO_CONTEXT) { - setGLHooksThreadSpecific(c->cnx->hooks[c->version]); - egl_tls_t::setContext(ctx); - if (gEGLDebugLevel > 0) { - CreateDbgContext(c->version, c->cnx->hooks[c->version]); - } - _c.acquire(); - _r.acquire(); - _d.acquire(); - c->read = read; - c->draw = draw; - } else { - setGLHooksThreadSpecific(&gHooksNoContext); - egl_tls_t::setContext(EGL_NO_CONTEXT); - } - } else { - // this will LOGE the error - result = setError(c->cnx->egl.eglGetError(), EGL_FALSE); - } - return result; -} - - -EGLBoolean eglQueryContext( EGLDisplay dpy, EGLContext ctx, - EGLint attribute, EGLint *value) -{ - clearError(); - - egl_display_t const * const dp = validate_display(dpy); - if (!dp) return EGL_FALSE; - - ContextRef _c(dp, ctx); - if (!_c.get()) return setError(EGL_BAD_CONTEXT, EGL_FALSE); - - egl_context_t * const c = get_context(ctx); - - EGLBoolean result(EGL_TRUE); - if (attribute == EGL_CONFIG_ID) { - *value = dp->configs[intptr_t(c->config)].configId; - } else { - // We need to remap EGL_CONFIG_IDs - result = c->cnx->egl.eglQueryContext( - dp->disp[c->impl].dpy, c->context, attribute, value); - } - - return result; -} - -EGLContext eglGetCurrentContext(void) -{ - // could be called before eglInitialize(), but we wouldn't have a context - // then, and this function would correctly return EGL_NO_CONTEXT. - - clearError(); - - EGLContext ctx = getContext(); - return ctx; -} - -EGLSurface eglGetCurrentSurface(EGLint readdraw) -{ - // could be called before eglInitialize(), but we wouldn't have a context - // then, and this function would correctly return EGL_NO_SURFACE. - - clearError(); - - EGLContext ctx = getContext(); - if (ctx) { - egl_context_t const * const c = get_context(ctx); - if (!c) return setError(EGL_BAD_CONTEXT, EGL_NO_SURFACE); - switch (readdraw) { - case EGL_READ: return c->read; - case EGL_DRAW: return c->draw; - default: return setError(EGL_BAD_PARAMETER, EGL_NO_SURFACE); - } - } - return EGL_NO_SURFACE; -} - -EGLDisplay eglGetCurrentDisplay(void) -{ - // could be called before eglInitialize(), but we wouldn't have a context - // then, and this function would correctly return EGL_NO_DISPLAY. - - clearError(); - - EGLContext ctx = getContext(); - if (ctx) { - egl_context_t const * const c = get_context(ctx); - if (!c) return setError(EGL_BAD_CONTEXT, EGL_NO_SURFACE); - return c->dpy; - } - return EGL_NO_DISPLAY; -} - -EGLBoolean eglWaitGL(void) -{ - // could be called before eglInitialize(), but we wouldn't have a context - // then, and this function would return GL_TRUE, which isn't wrong. - - clearError(); - - EGLBoolean res = EGL_TRUE; - EGLContext ctx = getContext(); - if (ctx) { - egl_context_t const * const c = get_context(ctx); - if (!c) return setError(EGL_BAD_CONTEXT, EGL_FALSE); - if (uint32_t(c->impl)>=2) - return setError(EGL_BAD_CONTEXT, EGL_FALSE); - egl_connection_t* const cnx = &gEGLImpl[c->impl]; - if (!cnx->dso) - return setError(EGL_BAD_CONTEXT, EGL_FALSE); - res = cnx->egl.eglWaitGL(); - } - return res; -} - -EGLBoolean eglWaitNative(EGLint engine) -{ - // could be called before eglInitialize(), but we wouldn't have a context - // then, and this function would return GL_TRUE, which isn't wrong. - - clearError(); - - EGLBoolean res = EGL_TRUE; - EGLContext ctx = getContext(); - if (ctx) { - egl_context_t const * const c = get_context(ctx); - if (!c) return setError(EGL_BAD_CONTEXT, EGL_FALSE); - if (uint32_t(c->impl)>=2) - return setError(EGL_BAD_CONTEXT, EGL_FALSE); - egl_connection_t* const cnx = &gEGLImpl[c->impl]; - if (!cnx->dso) - return setError(EGL_BAD_CONTEXT, EGL_FALSE); - res = cnx->egl.eglWaitNative(engine); - } - return res; -} - -EGLint eglGetError(void) -{ - EGLint result = EGL_SUCCESS; - EGLint err; - for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { - err = EGL_SUCCESS; - egl_connection_t* const cnx = &gEGLImpl[i]; - if (cnx->dso) - err = cnx->egl.eglGetError(); - if (err!=EGL_SUCCESS && result==EGL_SUCCESS) - result = err; - } - err = egl_tls_t::getError(); - if (result == EGL_SUCCESS) - result = err; - return result; -} - -// Note: Similar implementations of these functions also exist in -// gl2.cpp and gl.cpp, and are used by applications that call the -// exported entry points directly. -typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); -typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); - -static PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glEGLImageTargetTexture2DOES_impl = NULL; -static PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC glEGLImageTargetRenderbufferStorageOES_impl = NULL; - -static void glEGLImageTargetTexture2DOES_wrapper(GLenum target, GLeglImageOES image) -{ - GLeglImageOES implImage = - (GLeglImageOES)egl_get_image_for_current_context((EGLImageKHR)image); - glEGLImageTargetTexture2DOES_impl(target, implImage); -} - -static void glEGLImageTargetRenderbufferStorageOES_wrapper(GLenum target, GLeglImageOES image) -{ - GLeglImageOES implImage = - (GLeglImageOES)egl_get_image_for_current_context((EGLImageKHR)image); - glEGLImageTargetRenderbufferStorageOES_impl(target, implImage); -} - -__eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *procname) -{ - // eglGetProcAddress() could be the very first function called - // in which case we must make sure we've initialized ourselves, this - // happens the first time egl_get_display() is called. - - clearError(); - - if (egl_init_drivers() == EGL_FALSE) { - setError(EGL_BAD_PARAMETER, NULL); - return NULL; - } - - // The EGL_ANDROID_blob_cache extension should not be exposed to - // applications. It is used internally by the Android EGL layer. - if (!strcmp(procname, "eglSetBlobCacheFuncsANDROID")) { - return NULL; - } - - __eglMustCastToProperFunctionPointerType addr; - addr = findProcAddress(procname, sExtentionMap, NELEM(sExtentionMap)); - if (addr) return addr; - - - // this protects accesses to sGLExtentionMap and sGLExtentionSlot - pthread_mutex_lock(&sExtensionMapMutex); - - /* - * Since eglGetProcAddress() is not associated to anything, it needs - * to return a function pointer that "works" regardless of what - * the current context is. - * - * For this reason, we return a "forwarder", a small stub that takes - * care of calling the function associated with the context - * currently bound. - * - * We first look for extensions we've already resolved, if we're seeing - * this extension for the first time, we go through all our - * implementations and call eglGetProcAddress() and record the - * result in the appropriate implementation hooks and return the - * address of the forwarder corresponding to that hook set. - * - */ - - const String8 name(procname); - addr = sGLExtentionMap.valueFor(name); - const int slot = sGLExtentionSlot; - - LOGE_IF(slot >= MAX_NUMBER_OF_GL_EXTENSIONS, - "no more slots for eglGetProcAddress(\"%s\")", - procname); - - if (!addr && (slot < MAX_NUMBER_OF_GL_EXTENSIONS)) { - bool found = false; - for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { - egl_connection_t* const cnx = &gEGLImpl[i]; - if (cnx->dso && cnx->egl.eglGetProcAddress) { - found = true; - // Extensions are independent of the bound context - cnx->hooks[GLESv1_INDEX]->ext.extensions[slot] = - cnx->hooks[GLESv2_INDEX]->ext.extensions[slot] = -#if EGL_TRACE - gHooksDebug.ext.extensions[slot] = gHooksTrace.ext.extensions[slot] = -#endif - cnx->egl.eglGetProcAddress(procname); - } - } - if (found) { - addr = gExtensionForwarders[slot]; - - if (!strcmp(procname, "glEGLImageTargetTexture2DOES")) { - glEGLImageTargetTexture2DOES_impl = (PFNGLEGLIMAGETARGETTEXTURE2DOESPROC)addr; - addr = (__eglMustCastToProperFunctionPointerType)glEGLImageTargetTexture2DOES_wrapper; - } - if (!strcmp(procname, "glEGLImageTargetRenderbufferStorageOES")) { - glEGLImageTargetRenderbufferStorageOES_impl = (PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC)addr; - addr = (__eglMustCastToProperFunctionPointerType)glEGLImageTargetRenderbufferStorageOES_wrapper; - } - - sGLExtentionMap.add(name, addr); - sGLExtentionSlot++; - } - } - - pthread_mutex_unlock(&sExtensionMapMutex); - return addr; -} - -EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface draw) -{ - EGLBoolean Debug_eglSwapBuffers(EGLDisplay dpy, EGLSurface draw); - if (gEGLDebugLevel > 0) - Debug_eglSwapBuffers(dpy, draw); - - clearError(); - - egl_display_t const * const dp = validate_display(dpy); - if (!dp) return EGL_FALSE; - - SurfaceRef _s(dp, draw); - if (!_s.get()) - return setError(EGL_BAD_SURFACE, EGL_FALSE); - - egl_surface_t const * const s = get_surface(draw); - return s->cnx->egl.eglSwapBuffers(dp->disp[s->impl].dpy, s->surface); -} - -EGLBoolean eglCopyBuffers( EGLDisplay dpy, EGLSurface surface, - NativePixmapType target) -{ - clearError(); - - egl_display_t const * const dp = validate_display(dpy); - if (!dp) return EGL_FALSE; - - SurfaceRef _s(dp, surface); - if (!_s.get()) - return setError(EGL_BAD_SURFACE, EGL_FALSE); - - egl_surface_t const * const s = get_surface(surface); - return s->cnx->egl.eglCopyBuffers( - dp->disp[s->impl].dpy, s->surface, target); -} - -const char* eglQueryString(EGLDisplay dpy, EGLint name) -{ - clearError(); - - egl_display_t const * const dp = validate_display(dpy); - if (!dp) return (const char *) NULL; - - switch (name) { - case EGL_VENDOR: - return dp->getVendorString(); - case EGL_VERSION: - return dp->getVersionString(); - case EGL_EXTENSIONS: - return dp->getExtensionString(); - case EGL_CLIENT_APIS: - return dp->getClientApiString(); - case EGL_VERSION_HW_ANDROID: { - if (gEGLImpl[IMPL_HARDWARE].dso) { - return dp->disp[IMPL_HARDWARE].queryString.version; - } - return dp->disp[IMPL_SOFTWARE].queryString.version; - } - } - return setError(EGL_BAD_PARAMETER, (const char *)0); -} - - -// ---------------------------------------------------------------------------- -// EGL 1.1 -// ---------------------------------------------------------------------------- - -EGLBoolean eglSurfaceAttrib( - EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value) -{ - clearError(); - - egl_display_t const * const dp = validate_display(dpy); - if (!dp) return EGL_FALSE; - - SurfaceRef _s(dp, surface); - if (!_s.get()) - return setError(EGL_BAD_SURFACE, EGL_FALSE); - - egl_surface_t const * const s = get_surface(surface); - if (s->cnx->egl.eglSurfaceAttrib) { - return s->cnx->egl.eglSurfaceAttrib( - dp->disp[s->impl].dpy, s->surface, attribute, value); - } - return setError(EGL_BAD_SURFACE, EGL_FALSE); -} - -EGLBoolean eglBindTexImage( - EGLDisplay dpy, EGLSurface surface, EGLint buffer) -{ - clearError(); - - egl_display_t const * const dp = validate_display(dpy); - if (!dp) return EGL_FALSE; - - SurfaceRef _s(dp, surface); - if (!_s.get()) - return setError(EGL_BAD_SURFACE, EGL_FALSE); - - egl_surface_t const * const s = get_surface(surface); - if (s->cnx->egl.eglBindTexImage) { - return s->cnx->egl.eglBindTexImage( - dp->disp[s->impl].dpy, s->surface, buffer); - } - return setError(EGL_BAD_SURFACE, EGL_FALSE); -} - -EGLBoolean eglReleaseTexImage( - EGLDisplay dpy, EGLSurface surface, EGLint buffer) -{ - clearError(); - - egl_display_t const * const dp = validate_display(dpy); - if (!dp) return EGL_FALSE; - - SurfaceRef _s(dp, surface); - if (!_s.get()) - return setError(EGL_BAD_SURFACE, EGL_FALSE); - - egl_surface_t const * const s = get_surface(surface); - if (s->cnx->egl.eglReleaseTexImage) { - return s->cnx->egl.eglReleaseTexImage( - dp->disp[s->impl].dpy, s->surface, buffer); - } - return setError(EGL_BAD_SURFACE, EGL_FALSE); -} - -EGLBoolean eglSwapInterval(EGLDisplay dpy, EGLint interval) -{ - clearError(); - - egl_display_t const * const dp = validate_display(dpy); - if (!dp) return EGL_FALSE; - - EGLBoolean res = EGL_TRUE; - for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { - egl_connection_t* const cnx = &gEGLImpl[i]; - if (cnx->dso) { - if (cnx->egl.eglSwapInterval) { - if (cnx->egl.eglSwapInterval( - dp->disp[i].dpy, interval) == EGL_FALSE) { - res = EGL_FALSE; - } - } - } - } - return res; -} - - -// ---------------------------------------------------------------------------- -// EGL 1.2 -// ---------------------------------------------------------------------------- - -EGLBoolean eglWaitClient(void) -{ - clearError(); - - // could be called before eglInitialize(), but we wouldn't have a context - // then, and this function would return GL_TRUE, which isn't wrong. - EGLBoolean res = EGL_TRUE; - EGLContext ctx = getContext(); - if (ctx) { - egl_context_t const * const c = get_context(ctx); - if (!c) return setError(EGL_BAD_CONTEXT, EGL_FALSE); - if (uint32_t(c->impl)>=2) - return setError(EGL_BAD_CONTEXT, EGL_FALSE); - egl_connection_t* const cnx = &gEGLImpl[c->impl]; - if (!cnx->dso) - return setError(EGL_BAD_CONTEXT, EGL_FALSE); - if (cnx->egl.eglWaitClient) { - res = cnx->egl.eglWaitClient(); - } else { - res = cnx->egl.eglWaitGL(); - } - } - return res; -} - -EGLBoolean eglBindAPI(EGLenum api) -{ - clearError(); - - if (egl_init_drivers() == EGL_FALSE) { - return setError(EGL_BAD_PARAMETER, EGL_FALSE); - } - - // bind this API on all EGLs - EGLBoolean res = EGL_TRUE; - for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { - egl_connection_t* const cnx = &gEGLImpl[i]; - if (cnx->dso) { - if (cnx->egl.eglBindAPI) { - if (cnx->egl.eglBindAPI(api) == EGL_FALSE) { - res = EGL_FALSE; - } - } - } - } - return res; -} - -EGLenum eglQueryAPI(void) -{ - clearError(); - - if (egl_init_drivers() == EGL_FALSE) { - return setError(EGL_BAD_PARAMETER, EGL_FALSE); - } - - for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { - egl_connection_t* const cnx = &gEGLImpl[i]; - if (cnx->dso) { - if (cnx->egl.eglQueryAPI) { - // the first one we find is okay, because they all - // should be the same - return cnx->egl.eglQueryAPI(); - } - } - } - // or, it can only be OpenGL ES - return EGL_OPENGL_ES_API; -} - -EGLBoolean eglReleaseThread(void) -{ - clearError(); - - // If there is context bound to the thread, release it - loseCurrent(get_context(getContext())); - - for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { - egl_connection_t* const cnx = &gEGLImpl[i]; - if (cnx->dso) { - if (cnx->egl.eglReleaseThread) { - cnx->egl.eglReleaseThread(); - } - } - } - egl_tls_t::clearTLS(); - dbgReleaseThread(); - return EGL_TRUE; -} - -EGLSurface eglCreatePbufferFromClientBuffer( - EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, - EGLConfig config, const EGLint *attrib_list) -{ - clearError(); - - egl_display_t const* dp = 0; - egl_connection_t* cnx = validate_display_config(dpy, config, dp); - if (!cnx) return EGL_FALSE; - if (cnx->egl.eglCreatePbufferFromClientBuffer) { - return cnx->egl.eglCreatePbufferFromClientBuffer( - dp->disp[ dp->configs[intptr_t(config)].impl ].dpy, - buftype, buffer, - dp->configs[intptr_t(config)].config, attrib_list); - } - return setError(EGL_BAD_CONFIG, EGL_NO_SURFACE); -} - -// ---------------------------------------------------------------------------- -// EGL_EGLEXT_VERSION 3 -// ---------------------------------------------------------------------------- - -EGLBoolean eglLockSurfaceKHR(EGLDisplay dpy, EGLSurface surface, - const EGLint *attrib_list) -{ - clearError(); - - egl_display_t const * const dp = validate_display(dpy); - if (!dp) return EGL_FALSE; - - SurfaceRef _s(dp, surface); - if (!_s.get()) - return setError(EGL_BAD_SURFACE, EGL_FALSE); - - egl_surface_t const * const s = get_surface(surface); - if (s->cnx->egl.eglLockSurfaceKHR) { - return s->cnx->egl.eglLockSurfaceKHR( - dp->disp[s->impl].dpy, s->surface, attrib_list); - } - return setError(EGL_BAD_DISPLAY, EGL_FALSE); -} - -EGLBoolean eglUnlockSurfaceKHR(EGLDisplay dpy, EGLSurface surface) -{ - clearError(); - - egl_display_t const * const dp = validate_display(dpy); - if (!dp) return EGL_FALSE; - - SurfaceRef _s(dp, surface); - if (!_s.get()) - return setError(EGL_BAD_SURFACE, EGL_FALSE); - - egl_surface_t const * const s = get_surface(surface); - if (s->cnx->egl.eglUnlockSurfaceKHR) { - return s->cnx->egl.eglUnlockSurfaceKHR( - dp->disp[s->impl].dpy, s->surface); - } - return setError(EGL_BAD_DISPLAY, EGL_FALSE); -} - -EGLImageKHR eglCreateImageKHR(EGLDisplay dpy, EGLContext ctx, EGLenum target, - EGLClientBuffer buffer, const EGLint *attrib_list) -{ - clearError(); - - egl_display_t const * const dp = validate_display(dpy); - if (!dp) return EGL_NO_IMAGE_KHR; - - if (ctx != EGL_NO_CONTEXT) { - ContextRef _c(dp, ctx); - if (!_c.get()) - return setError(EGL_BAD_CONTEXT, EGL_NO_IMAGE_KHR); - egl_context_t * const c = get_context(ctx); - // since we have an EGLContext, we know which implementation to use - EGLImageKHR image = c->cnx->egl.eglCreateImageKHR( - dp->disp[c->impl].dpy, c->context, target, buffer, attrib_list); - if (image == EGL_NO_IMAGE_KHR) - return image; - - egl_image_t* result = new egl_image_t(dpy, ctx); - result->images[c->impl] = image; - return (EGLImageKHR)result; - } else { - // EGL_NO_CONTEXT is a valid parameter - - /* Since we don't have a way to know which implementation to call, - * we're calling all of them. If at least one of the implementation - * succeeded, this is a success. - */ - - EGLint currentError = eglGetError(); - - EGLImageKHR implImages[IMPL_NUM_IMPLEMENTATIONS]; - bool success = false; - for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { - egl_connection_t* const cnx = &gEGLImpl[i]; - implImages[i] = EGL_NO_IMAGE_KHR; - if (cnx->dso) { - if (cnx->egl.eglCreateImageKHR) { - implImages[i] = cnx->egl.eglCreateImageKHR( - dp->disp[i].dpy, ctx, target, buffer, attrib_list); - if (implImages[i] != EGL_NO_IMAGE_KHR) { - success = true; - } - } - } - } - - if (!success) { - // failure, if there was an error when we entered this function, - // the error flag must not be updated. - // Otherwise, the error is whatever happened in the implementation - // that faulted. - if (currentError != EGL_SUCCESS) { - setError(currentError, EGL_NO_IMAGE_KHR); - } - return EGL_NO_IMAGE_KHR; - } else { - // In case of success, we need to clear all error flags - // (especially those caused by the implementation that didn't - // succeed). TODO: we could avoid this if we knew this was - // a "full" success (all implementation succeeded). - eglGetError(); - } - - egl_image_t* result = new egl_image_t(dpy, ctx); - memcpy(result->images, implImages, sizeof(implImages)); - return (EGLImageKHR)result; - } -} - -EGLBoolean eglDestroyImageKHR(EGLDisplay dpy, EGLImageKHR img) -{ - clearError(); - - egl_display_t const * const dp = validate_display(dpy); - if (!dp) return EGL_FALSE; - - ImageRef _i(dp, img); - if (!_i.get()) return setError(EGL_BAD_PARAMETER, EGL_FALSE); - - egl_image_t* image = get_image(img); - bool success = false; - for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { - egl_connection_t* const cnx = &gEGLImpl[i]; - if (image->images[i] != EGL_NO_IMAGE_KHR) { - if (cnx->dso) { - if (cnx->egl.eglDestroyImageKHR) { - if (cnx->egl.eglDestroyImageKHR( - dp->disp[i].dpy, image->images[i])) { - success = true; - } - } - } - } - } - if (!success) - return EGL_FALSE; - - _i.terminate(); - - return EGL_TRUE; -} - -// ---------------------------------------------------------------------------- -// EGL_EGLEXT_VERSION 5 -// ---------------------------------------------------------------------------- - - -EGLSyncKHR eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list) -{ - clearError(); - - egl_display_t const * const dp = validate_display(dpy); - if (!dp) return EGL_NO_SYNC_KHR; - - EGLContext ctx = eglGetCurrentContext(); - ContextRef _c(dp, ctx); - if (!_c.get()) - return setError(EGL_BAD_CONTEXT, EGL_NO_SYNC_KHR); - - egl_context_t * const c = get_context(ctx); - EGLSyncKHR result = EGL_NO_SYNC_KHR; - if (c->cnx->egl.eglCreateSyncKHR) { - EGLSyncKHR sync = c->cnx->egl.eglCreateSyncKHR( - dp->disp[c->impl].dpy, type, attrib_list); - if (sync == EGL_NO_SYNC_KHR) - return sync; - result = (egl_sync_t*)new egl_sync_t(dpy, ctx, sync); - } - return (EGLSyncKHR)result; -} - -EGLBoolean eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync) -{ - clearError(); - - egl_display_t const * const dp = validate_display(dpy); - if (!dp) return EGL_FALSE; - - SyncRef _s(dp, sync); - if (!_s.get()) return setError(EGL_BAD_PARAMETER, EGL_FALSE); - egl_sync_t* syncObject = get_sync(sync); - - EGLContext ctx = syncObject->context; - ContextRef _c(dp, ctx); - if (!_c.get()) - return setError(EGL_BAD_CONTEXT, EGL_FALSE); - - EGLBoolean result = EGL_FALSE; - egl_context_t * const c = get_context(ctx); - if (c->cnx->egl.eglDestroySyncKHR) { - result = c->cnx->egl.eglDestroySyncKHR( - dp->disp[c->impl].dpy, syncObject->sync); - if (result) - _s.terminate(); - } - return result; -} - -EGLint eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout) -{ - clearError(); - - egl_display_t const * const dp = validate_display(dpy); - if (!dp) return EGL_FALSE; - - SyncRef _s(dp, sync); - if (!_s.get()) return setError(EGL_BAD_PARAMETER, EGL_FALSE); - egl_sync_t* syncObject = get_sync(sync); - - EGLContext ctx = syncObject->context; - ContextRef _c(dp, ctx); - if (!_c.get()) - return setError(EGL_BAD_CONTEXT, EGL_FALSE); - - egl_context_t * const c = get_context(ctx); - if (c->cnx->egl.eglClientWaitSyncKHR) { - return c->cnx->egl.eglClientWaitSyncKHR( - dp->disp[c->impl].dpy, syncObject->sync, flags, timeout); - } - - return EGL_FALSE; -} - -EGLBoolean eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value) -{ - clearError(); - - egl_display_t const * const dp = validate_display(dpy); - if (!dp) return EGL_FALSE; - - SyncRef _s(dp, sync); - if (!_s.get()) - return setError(EGL_BAD_PARAMETER, EGL_FALSE); - - egl_sync_t* syncObject = get_sync(sync); - EGLContext ctx = syncObject->context; - ContextRef _c(dp, ctx); - if (!_c.get()) - return setError(EGL_BAD_CONTEXT, EGL_FALSE); - - egl_context_t * const c = get_context(ctx); - if (c->cnx->egl.eglGetSyncAttribKHR) { - return c->cnx->egl.eglGetSyncAttribKHR( - dp->disp[c->impl].dpy, syncObject->sync, attribute, value); - } - - return EGL_FALSE; -} - -// ---------------------------------------------------------------------------- -// ANDROID extensions -// ---------------------------------------------------------------------------- - -/* ANDROID extensions entry-point go here */ - -// ---------------------------------------------------------------------------- -// NVIDIA extensions -// ---------------------------------------------------------------------------- -EGLuint64NV eglGetSystemTimeFrequencyNV() -{ - clearError(); - - if (egl_init_drivers() == EGL_FALSE) { - return setError(EGL_BAD_PARAMETER, EGL_FALSE); - } - - EGLuint64NV ret = 0; - egl_connection_t* const cnx = &gEGLImpl[IMPL_HARDWARE]; - - if (cnx->dso) { - if (cnx->egl.eglGetSystemTimeFrequencyNV) { - return cnx->egl.eglGetSystemTimeFrequencyNV(); - } - } - - return setErrorQuiet(EGL_BAD_DISPLAY, 0); -} - -EGLuint64NV eglGetSystemTimeNV() -{ - clearError(); - - if (egl_init_drivers() == EGL_FALSE) { - return setError(EGL_BAD_PARAMETER, EGL_FALSE); - } - - EGLuint64NV ret = 0; - egl_connection_t* const cnx = &gEGLImpl[IMPL_HARDWARE]; - - if (cnx->dso) { - if (cnx->egl.eglGetSystemTimeNV) { - return cnx->egl.eglGetSystemTimeNV(); - } - } - - return setErrorQuiet(EGL_BAD_DISPLAY, 0); -} diff --git a/opengl/libs/EGL/egl_cache.cpp b/opengl/libs/EGL/egl_cache.cpp deleted file mode 100644 index c4a7466..0000000 --- a/opengl/libs/EGL/egl_cache.cpp +++ /dev/null @@ -1,352 +0,0 @@ -/* - ** Copyright 2011, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#include "egl_cache.h" -#include "egl_display.h" -#include "egl_impl.h" -#include "egldefs.h" - -#include <fcntl.h> -#include <sys/mman.h> -#include <sys/stat.h> -#include <sys/types.h> -#include <unistd.h> - -#ifndef MAX_EGL_CACHE_ENTRY_SIZE -#define MAX_EGL_CACHE_ENTRY_SIZE (16 * 1024); -#endif - -#ifndef MAX_EGL_CACHE_SIZE -#define MAX_EGL_CACHE_SIZE (64 * 1024); -#endif - -// Cache size limits. -static const size_t maxKeySize = 1024; -static const size_t maxValueSize = MAX_EGL_CACHE_ENTRY_SIZE; -static const size_t maxTotalSize = MAX_EGL_CACHE_SIZE; - -// Cache file header -static const char* cacheFileMagic = "EGL$"; -static const size_t cacheFileHeaderSize = 8; - -// The time in seconds to wait before saving newly inserted cache entries. -static const unsigned int deferredSaveDelay = 4; - -// ---------------------------------------------------------------------------- -namespace android { -// ---------------------------------------------------------------------------- - -#define BC_EXT_STR "EGL_ANDROID_blob_cache" - -// -// Callback functions passed to EGL. -// -static void setBlob(const void* key, EGLsizeiANDROID keySize, - const void* value, EGLsizeiANDROID valueSize) { - egl_cache_t::get()->setBlob(key, keySize, value, valueSize); -} - -static EGLsizeiANDROID getBlob(const void* key, EGLsizeiANDROID keySize, - void* value, EGLsizeiANDROID valueSize) { - return egl_cache_t::get()->getBlob(key, keySize, value, valueSize); -} - -// -// egl_cache_t definition -// -egl_cache_t::egl_cache_t() : - mInitialized(false), - mBlobCache(NULL) { -} - -egl_cache_t::~egl_cache_t() { -} - -egl_cache_t egl_cache_t::sCache; - -egl_cache_t* egl_cache_t::get() { - return &sCache; -} - -void egl_cache_t::initialize(egl_display_t *display) { - Mutex::Autolock lock(mMutex); - for (int i = 0; i < IMPL_NUM_IMPLEMENTATIONS; i++) { - egl_connection_t* const cnx = &gEGLImpl[i]; - if (cnx->dso && cnx->major >= 0 && cnx->minor >= 0) { - const char* exts = display->disp[i].queryString.extensions; - size_t bcExtLen = strlen(BC_EXT_STR); - size_t extsLen = strlen(exts); - bool equal = !strcmp(BC_EXT_STR, exts); - bool atStart = !strncmp(BC_EXT_STR " ", exts, bcExtLen+1); - bool atEnd = (bcExtLen+1) < extsLen && - !strcmp(" " BC_EXT_STR, exts + extsLen - (bcExtLen+1)); - bool inMiddle = strstr(exts, " " BC_EXT_STR " "); - if (equal || atStart || atEnd || inMiddle) { - PFNEGLSETBLOBCACHEFUNCSANDROIDPROC eglSetBlobCacheFuncsANDROID; - eglSetBlobCacheFuncsANDROID = - reinterpret_cast<PFNEGLSETBLOBCACHEFUNCSANDROIDPROC>( - cnx->egl.eglGetProcAddress( - "eglSetBlobCacheFuncsANDROID")); - if (eglSetBlobCacheFuncsANDROID == NULL) { - LOGE("EGL_ANDROID_blob_cache advertised by display %d, " - "but unable to get eglSetBlobCacheFuncsANDROID", i); - continue; - } - - eglSetBlobCacheFuncsANDROID(display->disp[i].dpy, - android::setBlob, android::getBlob); - EGLint err = cnx->egl.eglGetError(); - if (err != EGL_SUCCESS) { - LOGE("eglSetBlobCacheFuncsANDROID resulted in an error: " - "%#x", err); - } - } - } - } - mInitialized = true; -} - -void egl_cache_t::terminate() { - Mutex::Autolock lock(mMutex); - if (mBlobCache != NULL) { - saveBlobCacheLocked(); - mBlobCache = NULL; - } - mInitialized = false; -} - -void egl_cache_t::setBlob(const void* key, EGLsizeiANDROID keySize, - const void* value, EGLsizeiANDROID valueSize) { - Mutex::Autolock lock(mMutex); - - if (keySize < 0 || valueSize < 0) { - LOGW("EGL_ANDROID_blob_cache set: negative sizes are not allowed"); - return; - } - - if (mInitialized) { - sp<BlobCache> bc = getBlobCacheLocked(); - bc->set(key, keySize, value, valueSize); - - if (!mSavePending) { - class DeferredSaveThread : public Thread { - public: - DeferredSaveThread() : Thread(false) {} - - virtual bool threadLoop() { - sleep(deferredSaveDelay); - egl_cache_t* c = egl_cache_t::get(); - Mutex::Autolock lock(c->mMutex); - if (c->mInitialized) { - c->saveBlobCacheLocked(); - } - c->mSavePending = false; - return false; - } - }; - - // The thread will hold a strong ref to itself until it has finished - // running, so there's no need to keep a ref around. - sp<Thread> deferredSaveThread(new DeferredSaveThread()); - mSavePending = true; - deferredSaveThread->run(); - } - } -} - -EGLsizeiANDROID egl_cache_t::getBlob(const void* key, EGLsizeiANDROID keySize, - void* value, EGLsizeiANDROID valueSize) { - Mutex::Autolock lock(mMutex); - - if (keySize < 0 || valueSize < 0) { - LOGW("EGL_ANDROID_blob_cache set: negative sizes are not allowed"); - return 0; - } - - if (mInitialized) { - sp<BlobCache> bc = getBlobCacheLocked(); - return bc->get(key, keySize, value, valueSize); - } - return 0; -} - -void egl_cache_t::setCacheFilename(const char* filename) { - Mutex::Autolock lock(mMutex); - mFilename = filename; -} - -sp<BlobCache> egl_cache_t::getBlobCacheLocked() { - if (mBlobCache == NULL) { - mBlobCache = new BlobCache(maxKeySize, maxValueSize, maxTotalSize); - loadBlobCacheLocked(); - } - return mBlobCache; -} - -static uint32_t crc32c(const uint8_t* buf, size_t len) { - const uint32_t polyBits = 0x82F63B78; - uint32_t r = 0; - for (size_t i = 0; i < len; i++) { - r ^= buf[i]; - for (int j = 0; j < 8; j++) { - if (r & 1) { - r = (r >> 1) ^ polyBits; - } else { - r >>= 1; - } - } - } - return r; -} - -void egl_cache_t::saveBlobCacheLocked() { - if (mFilename.length() > 0) { - size_t cacheSize = mBlobCache->getFlattenedSize(); - size_t headerSize = cacheFileHeaderSize; - const char* fname = mFilename.string(); - - // Try to create the file with no permissions so we can write it - // without anyone trying to read it. - int fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0); - if (fd == -1) { - if (errno == EEXIST) { - // The file exists, delete it and try again. - if (unlink(fname) == -1) { - // No point in retrying if the unlink failed. - LOGE("error unlinking cache file %s: %s (%d)", fname, - strerror(errno), errno); - return; - } - // Retry now that we've unlinked the file. - fd = open(fname, O_CREAT | O_EXCL | O_RDWR, 0); - } - if (fd == -1) { - LOGE("error creating cache file %s: %s (%d)", fname, - strerror(errno), errno); - return; - } - } - - size_t fileSize = headerSize + cacheSize; - if (ftruncate(fd, fileSize) == -1) { - LOGE("error setting cache file size: %s (%d)", strerror(errno), - errno); - close(fd); - unlink(fname); - return; - } - - uint8_t* buf = reinterpret_cast<uint8_t*>(mmap(NULL, fileSize, - PROT_WRITE, MAP_SHARED, fd, 0)); - if (buf == MAP_FAILED) { - LOGE("error mmaping cache file: %s (%d)", strerror(errno), - errno); - close(fd); - unlink(fname); - return; - } - - status_t err = mBlobCache->flatten(buf + headerSize, cacheSize, NULL, - 0); - if (err != OK) { - LOGE("error writing cache contents: %s (%d)", strerror(-err), - -err); - munmap(buf, fileSize); - close(fd); - unlink(fname); - return; - } - - // Write the file magic and CRC - memcpy(buf, cacheFileMagic, 4); - uint32_t* crc = reinterpret_cast<uint32_t*>(buf + 4); - *crc = crc32c(buf + headerSize, cacheSize); - - munmap(buf, fileSize); - fchmod(fd, S_IRUSR); - close(fd); - } -} - -void egl_cache_t::loadBlobCacheLocked() { - if (mFilename.length() > 0) { - size_t headerSize = cacheFileHeaderSize; - - int fd = open(mFilename.string(), O_RDONLY, 0); - if (fd == -1) { - if (errno != ENOENT) { - LOGE("error opening cache file %s: %s (%d)", mFilename.string(), - strerror(errno), errno); - } - return; - } - - struct stat statBuf; - if (fstat(fd, &statBuf) == -1) { - LOGE("error stat'ing cache file: %s (%d)", strerror(errno), errno); - close(fd); - return; - } - - // Sanity check the size before trying to mmap it. - size_t fileSize = statBuf.st_size; - if (fileSize > maxTotalSize * 2) { - LOGE("cache file is too large: %#llx", statBuf.st_size); - close(fd); - return; - } - - uint8_t* buf = reinterpret_cast<uint8_t*>(mmap(NULL, fileSize, - PROT_READ, MAP_PRIVATE, fd, 0)); - if (buf == MAP_FAILED) { - LOGE("error mmaping cache file: %s (%d)", strerror(errno), - errno); - close(fd); - return; - } - - // Check the file magic and CRC - size_t cacheSize = fileSize - headerSize; - if (memcmp(buf, cacheFileMagic, 4) != 0) { - LOGE("cache file has bad mojo"); - close(fd); - return; - } - uint32_t* crc = reinterpret_cast<uint32_t*>(buf + 4); - if (crc32c(buf + headerSize, cacheSize) != *crc) { - LOGE("cache file failed CRC check"); - close(fd); - return; - } - - status_t err = mBlobCache->unflatten(buf + headerSize, cacheSize, NULL, - 0); - if (err != OK) { - LOGE("error reading cache contents: %s (%d)", strerror(-err), - -err); - munmap(buf, fileSize); - close(fd); - return; - } - - munmap(buf, fileSize); - close(fd); - } -} - -// ---------------------------------------------------------------------------- -}; // namespace android -// ---------------------------------------------------------------------------- diff --git a/opengl/libs/EGL/egl_cache.h b/opengl/libs/EGL/egl_cache.h deleted file mode 100644 index 8760009..0000000 --- a/opengl/libs/EGL/egl_cache.h +++ /dev/null @@ -1,130 +0,0 @@ -/* - ** Copyright 2011, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#ifndef ANDROID_EGL_CACHE_H -#define ANDROID_EGL_CACHE_H - -#include <EGL/egl.h> -#include <EGL/eglext.h> - -#include <utils/BlobCache.h> -#include <utils/String8.h> -#include <utils/StrongPointer.h> - -// ---------------------------------------------------------------------------- -namespace android { -// ---------------------------------------------------------------------------- - -class egl_display_t; - -class EGLAPI egl_cache_t { -public: - - // get returns a pointer to the singleton egl_cache_t object. This - // singleton object will never be destroyed. - static egl_cache_t* get(); - - // initialize puts the egl_cache_t into an initialized state, such that it - // is able to insert and retrieve entries from the cache. This should be - // called when EGL is initialized. When not in the initialized state the - // getBlob and setBlob methods will return without performing any cache - // operations. - void initialize(egl_display_t* display); - - // terminate puts the egl_cache_t back into the uninitialized state. When - // in this state the getBlob and setBlob methods will return without - // performing any cache operations. - void terminate(); - - // setBlob attempts to insert a new key/value blob pair into the cache. - // This will be called by the hardware vendor's EGL implementation via the - // EGL_ANDROID_blob_cache extension. - void setBlob(const void* key, EGLsizeiANDROID keySize, const void* value, - EGLsizeiANDROID valueSize); - - // getBlob attempts to retrieve the value blob associated with a given key - // blob from cache. This will be called by the hardware vendor's EGL - // implementation via the EGL_ANDROID_blob_cache extension. - EGLsizeiANDROID getBlob(const void* key, EGLsizeiANDROID keySize, - void* value, EGLsizeiANDROID valueSize); - - // setCacheFilename sets the name of the file that should be used to store - // cache contents from one program invocation to another. - void setCacheFilename(const char* filename); - -private: - // Creation and (the lack of) destruction is handled internally. - egl_cache_t(); - ~egl_cache_t(); - - // Copying is disallowed. - egl_cache_t(const egl_cache_t&); // not implemented - void operator=(const egl_cache_t&); // not implemented - - // getBlobCacheLocked returns the BlobCache object being used to store the - // key/value blob pairs. If the BlobCache object has not yet been created, - // this will do so, loading the serialized cache contents from disk if - // possible. - sp<BlobCache> getBlobCacheLocked(); - - // saveBlobCache attempts to save the current contents of mBlobCache to - // disk. - void saveBlobCacheLocked(); - - // loadBlobCache attempts to load the saved cache contents from disk into - // mBlobCache. - void loadBlobCacheLocked(); - - // mInitialized indicates whether the egl_cache_t is in the initialized - // state. It is initialized to false at construction time, and gets set to - // true when initialize is called. It is set back to false when terminate - // is called. When in this state, the cache behaves as normal. When not, - // the getBlob and setBlob methods will return without performing any cache - // operations. - bool mInitialized; - - // mBlobCache is the cache in which the key/value blob pairs are stored. It - // is initially NULL, and will be initialized by getBlobCacheLocked the - // first time it's needed. - sp<BlobCache> mBlobCache; - - // mFilename is the name of the file for storing cache contents in between - // program invocations. It is initialized to an empty string at - // construction time, and can be set with the setCacheFilename method. An - // empty string indicates that the cache should not be saved to or restored - // from disk. - String8 mFilename; - - // mSavePending indicates whether or not a deferred save operation is - // pending. Each time a key/value pair is inserted into the cache via - // setBlob, a deferred save is initiated if one is not already pending. - // This will wait some amount of time and then trigger a save of the cache - // contents to disk. - bool mSavePending; - - // mMutex is the mutex used to prevent concurrent access to the member - // variables. It must be locked whenever the member variables are accessed. - mutable Mutex mMutex; - - // sCache is the singleton egl_cache_t object. - static egl_cache_t sCache; -}; - -// ---------------------------------------------------------------------------- -}; // namespace android -// ---------------------------------------------------------------------------- - -#endif // ANDROID_EGL_CACHE_H diff --git a/opengl/libs/EGL/egl_display.cpp b/opengl/libs/EGL/egl_display.cpp deleted file mode 100644 index 31119f9..0000000 --- a/opengl/libs/EGL/egl_display.cpp +++ /dev/null @@ -1,348 +0,0 @@ -/* - ** Copyright 2007, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#include <string.h> - -#include "egl_cache.h" -#include "egl_display.h" -#include "egl_object.h" -#include "egl_tls.h" -#include "egl_impl.h" -#include "Loader.h" - -// ---------------------------------------------------------------------------- -namespace android { -// ---------------------------------------------------------------------------- - -static char const * const sVendorString = "Android"; -static char const * const sVersionString = "1.4 Android META-EGL"; -static char const * const sClientApiString = "OpenGL ES"; - -// this is the list of EGL extensions that are exposed to applications -// some of them are mandatory because used by the ANDROID system. -// -// mandatory extensions are required per the CDD and not explicitly -// checked during EGL initialization. the system *assumes* these extensions -// are present. the system may not function properly if some mandatory -// extensions are missing. -// -// NOTE: sExtensionString MUST be have a single space as the last character. -// -static char const * const sExtensionString = - "EGL_KHR_image " // mandatory - "EGL_KHR_image_base " // mandatory - "EGL_KHR_image_pixmap " - "EGL_KHR_gl_texture_2D_image " - "EGL_KHR_gl_texture_cubemap_image " - "EGL_KHR_gl_renderbuffer_image " - "EGL_KHR_fence_sync " - "EGL_NV_system_time " - "EGL_ANDROID_image_native_buffer " // mandatory - ; - -// extensions not exposed to applications but used by the ANDROID system -// "EGL_ANDROID_recordable " // mandatory -// "EGL_ANDROID_blob_cache " // strongly recommended - -extern void initEglTraceLevel(); -extern void setGLHooksThreadSpecific(gl_hooks_t const *value); - -static int cmp_configs(const void* a, const void *b) { - const egl_config_t& c0 = *(egl_config_t const *)a; - const egl_config_t& c1 = *(egl_config_t const *)b; - return c0<c1 ? -1 : (c1<c0 ? 1 : 0); -} - -// ---------------------------------------------------------------------------- - -egl_display_t egl_display_t::sDisplay[NUM_DISPLAYS]; - -egl_display_t::egl_display_t() : - magic('_dpy'), numTotalConfigs(0), configs(0), refs(0) { -} - -egl_display_t::~egl_display_t() { - magic = 0; - egl_cache_t::get()->terminate(); -} - -egl_display_t* egl_display_t::get(EGLDisplay dpy) { - uintptr_t index = uintptr_t(dpy)-1U; - return (index >= NUM_DISPLAYS) ? NULL : &sDisplay[index]; -} - -void egl_display_t::addObject(egl_object_t* object) { - Mutex::Autolock _l(lock); - objects.add(object); -} - -void egl_display_t::removeObject(egl_object_t* object) { - Mutex::Autolock _l(lock); - objects.remove(object); -} - -bool egl_display_t::getObject(egl_object_t* object) const { - Mutex::Autolock _l(lock); - if (objects.indexOf(object) >= 0) { - if (object->getDisplay() == this) { - object->incRef(); - return true; - } - } - return false; -} - -EGLDisplay egl_display_t::getFromNativeDisplay(EGLNativeDisplayType disp) { - if (uintptr_t(disp) >= NUM_DISPLAYS) - return NULL; - - return sDisplay[uintptr_t(disp)].getDisplay(disp); -} - -EGLDisplay egl_display_t::getDisplay(EGLNativeDisplayType display) { - - Mutex::Autolock _l(lock); - - // get our driver loader - Loader& loader(Loader::getInstance()); - - for (int i = 0; i < IMPL_NUM_IMPLEMENTATIONS; i++) { - egl_connection_t* const cnx = &gEGLImpl[i]; - if (cnx->dso && disp[i].dpy == EGL_NO_DISPLAY) { - EGLDisplay dpy = cnx->egl.eglGetDisplay(display); - disp[i].dpy = dpy; - if (dpy == EGL_NO_DISPLAY) { - loader.close(cnx->dso); - cnx->dso = NULL; - } - } - } - - return EGLDisplay(uintptr_t(display) + 1U); -} - -EGLBoolean egl_display_t::initialize(EGLint *major, EGLint *minor) { - - Mutex::Autolock _l(lock); - - if (refs > 0) { - if (major != NULL) - *major = VERSION_MAJOR; - if (minor != NULL) - *minor = VERSION_MINOR; - refs++; - return EGL_TRUE; - } - -#if EGL_TRACE - - // Called both at early_init time and at this time. (Early_init is pre-zygote, so - // the information from that call may be stale.) - initEglTraceLevel(); - -#endif - - setGLHooksThreadSpecific(&gHooksNoContext); - - // initialize each EGL and - // build our own extension string first, based on the extension we know - // and the extension supported by our client implementation - for (int i = 0; i < IMPL_NUM_IMPLEMENTATIONS; i++) { - egl_connection_t* const cnx = &gEGLImpl[i]; - cnx->major = -1; - cnx->minor = -1; - if (!cnx->dso) - continue; - -#if defined(ADRENO130) -#warning "Adreno-130 eglInitialize() workaround" - /* - * The ADRENO 130 driver returns a different EGLDisplay each time - * eglGetDisplay() is called, but also makes the EGLDisplay invalid - * after eglTerminate() has been called, so that eglInitialize() - * cannot be called again. Therefore, we need to make sure to call - * eglGetDisplay() before calling eglInitialize(); - */ - if (i == IMPL_HARDWARE) { - disp[i].dpy = - cnx->egl.eglGetDisplay(EGL_DEFAULT_DISPLAY); - } -#endif - - EGLDisplay idpy = disp[i].dpy; - if (cnx->egl.eglInitialize(idpy, &cnx->major, &cnx->minor)) { - //LOGD("initialized %d dpy=%p, ver=%d.%d, cnx=%p", - // i, idpy, cnx->major, cnx->minor, cnx); - - // display is now initialized - disp[i].state = egl_display_t::INITIALIZED; - - // get the query-strings for this display for each implementation - disp[i].queryString.vendor = cnx->egl.eglQueryString(idpy, - EGL_VENDOR); - disp[i].queryString.version = cnx->egl.eglQueryString(idpy, - EGL_VERSION); - disp[i].queryString.extensions = cnx->egl.eglQueryString(idpy, - EGL_EXTENSIONS); - disp[i].queryString.clientApi = cnx->egl.eglQueryString(idpy, - EGL_CLIENT_APIS); - - } else { - LOGW("%d: eglInitialize(%p) failed (%s)", i, idpy, - egl_tls_t::egl_strerror(cnx->egl.eglGetError())); - } - } - - // the query strings are per-display - mVendorString.setTo(sVendorString); - mVersionString.setTo(sVersionString); - mClientApiString.setTo(sClientApiString); - - // we only add extensions that exist in at least one implementation - char const* start = sExtensionString; - char const* end; - do { - // find the space separating this extension for the next one - end = strchr(start, ' '); - if (end) { - // length of the extension string - const size_t len = end - start; - if (len) { - // NOTE: we could avoid the copy if we had strnstr. - const String8 ext(start, len); - // now go through all implementations and look for this extension - for (int i = 0; i < IMPL_NUM_IMPLEMENTATIONS; i++) { - if (disp[i].queryString.extensions) { - // if we find it, add this extension string to our list - // (and don't forget the space) - const char* match = strstr(disp[i].queryString.extensions, ext.string()); - if (match && (match[len] == ' ' || match[len] == 0)) { - mExtensionString.append(start, len+1); - } - } - } - } - // process the next extension string, and skip the space. - start = end + 1; - } - } while (end); - - egl_cache_t::get()->initialize(this); - - EGLBoolean res = EGL_FALSE; - for (int i = 0; i < IMPL_NUM_IMPLEMENTATIONS; i++) { - egl_connection_t* const cnx = &gEGLImpl[i]; - if (cnx->dso && cnx->major >= 0 && cnx->minor >= 0) { - EGLint n; - if (cnx->egl.eglGetConfigs(disp[i].dpy, 0, 0, &n)) { - disp[i].config = (EGLConfig*) malloc(sizeof(EGLConfig) * n); - if (disp[i].config) { - if (cnx->egl.eglGetConfigs(disp[i].dpy, disp[i].config, n, - &disp[i].numConfigs)) { - numTotalConfigs += n; - res = EGL_TRUE; - } - } - } - } - } - - if (res == EGL_TRUE) { - configs = new egl_config_t[numTotalConfigs]; - for (int i = 0, k = 0; i < IMPL_NUM_IMPLEMENTATIONS; i++) { - egl_connection_t* const cnx = &gEGLImpl[i]; - if (cnx->dso && cnx->major >= 0 && cnx->minor >= 0) { - for (int j = 0; j < disp[i].numConfigs; j++) { - configs[k].impl = i; - configs[k].config = disp[i].config[j]; - configs[k].configId = k + 1; // CONFIG_ID start at 1 - // store the implementation's CONFIG_ID - cnx->egl.eglGetConfigAttrib(disp[i].dpy, disp[i].config[j], - EGL_CONFIG_ID, &configs[k].implConfigId); - k++; - } - } - } - - // sort our configurations so we can do binary-searches - qsort(configs, numTotalConfigs, sizeof(egl_config_t), cmp_configs); - - refs++; - if (major != NULL) - *major = VERSION_MAJOR; - if (minor != NULL) - *minor = VERSION_MINOR; - return EGL_TRUE; - } - return setError(EGL_NOT_INITIALIZED, EGL_FALSE); -} - -EGLBoolean egl_display_t::terminate() { - - Mutex::Autolock _l(lock); - - if (refs == 0) { - return setError(EGL_NOT_INITIALIZED, EGL_FALSE); - } - - // this is specific to Android, display termination is ref-counted. - if (refs > 1) { - refs--; - return EGL_TRUE; - } - - EGLBoolean res = EGL_FALSE; - for (int i = 0; i < IMPL_NUM_IMPLEMENTATIONS; i++) { - egl_connection_t* const cnx = &gEGLImpl[i]; - if (cnx->dso && disp[i].state == egl_display_t::INITIALIZED) { - if (cnx->egl.eglTerminate(disp[i].dpy) == EGL_FALSE) { - LOGW("%d: eglTerminate(%p) failed (%s)", i, disp[i].dpy, - egl_tls_t::egl_strerror(cnx->egl.eglGetError())); - } - // REVISIT: it's unclear what to do if eglTerminate() fails - free(disp[i].config); - - disp[i].numConfigs = 0; - disp[i].config = 0; - disp[i].state = egl_display_t::TERMINATED; - - res = EGL_TRUE; - } - } - - // Mark all objects remaining in the list as terminated, unless - // there are no reference to them, it which case, we're free to - // delete them. - size_t count = objects.size(); - LOGW_IF(count, "eglTerminate() called w/ %d objects remaining", count); - for (size_t i=0 ; i<count ; i++) { - egl_object_t* o = objects.itemAt(i); - o->destroy(); - } - - // this marks all object handles are "terminated" - objects.clear(); - - refs--; - numTotalConfigs = 0; - delete[] configs; - return res; -} - - -// ---------------------------------------------------------------------------- -}; // namespace android -// ---------------------------------------------------------------------------- diff --git a/opengl/libs/EGL/egl_display.h b/opengl/libs/EGL/egl_display.h deleted file mode 100644 index 042ae07..0000000 --- a/opengl/libs/EGL/egl_display.h +++ /dev/null @@ -1,155 +0,0 @@ -/* - ** Copyright 2007, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#ifndef ANDROID_EGL_DISPLAY_H -#define ANDROID_EGL_DISPLAY_H - - -#include <ctype.h> -#include <stdint.h> -#include <stdlib.h> - -#include <EGL/egl.h> -#include <EGL/eglext.h> -#include <GLES/gl.h> -#include <GLES/glext.h> - -#include <utils/SortedVector.h> -#include <utils/threads.h> -#include <utils/String8.h> - -#include "egldefs.h" -#include "hooks.h" - -// ---------------------------------------------------------------------------- -namespace android { -// ---------------------------------------------------------------------------- - -class egl_object_t; -class egl_connection_t; - -// ---------------------------------------------------------------------------- - -struct egl_config_t { - egl_config_t() {} - egl_config_t(int impl, EGLConfig config) - : impl(impl), config(config), configId(0), implConfigId(0) { } - int impl; // the implementation this config is for - EGLConfig config; // the implementation's EGLConfig - EGLint configId; // our CONFIG_ID - EGLint implConfigId; // the implementation's CONFIG_ID - inline bool operator < (const egl_config_t& rhs) const { - if (impl < rhs.impl) return true; - if (impl > rhs.impl) return false; - return config < rhs.config; - } -}; - -// ---------------------------------------------------------------------------- - -class EGLAPI egl_display_t { // marked as EGLAPI for testing purposes - static egl_display_t sDisplay[NUM_DISPLAYS]; - EGLDisplay getDisplay(EGLNativeDisplayType display); - -public: - enum { - NOT_INITIALIZED = 0, - INITIALIZED = 1, - TERMINATED = 2 - }; - - egl_display_t(); - ~egl_display_t(); - - EGLBoolean initialize(EGLint *major, EGLint *minor); - EGLBoolean terminate(); - - // add object to this display's list - void addObject(egl_object_t* object); - // remove object from this display's list - void removeObject(egl_object_t* object); - // add reference to this object. returns true if this is a valid object. - bool getObject(egl_object_t* object) const; - - - static egl_display_t* get(EGLDisplay dpy); - static EGLDisplay getFromNativeDisplay(EGLNativeDisplayType disp); - - inline bool isReady() const { return (refs > 0); } - inline bool isValid() const { return magic == '_dpy'; } - inline bool isAlive() const { return isValid(); } - - char const * getVendorString() const { return mVendorString.string(); } - char const * getVersionString() const { return mVersionString.string(); } - char const * getClientApiString() const { return mClientApiString.string(); } - char const * getExtensionString() const { return mExtensionString.string(); } - - inline uint32_t getRefsCount() const { return refs; } - - struct strings_t { - char const * vendor; - char const * version; - char const * clientApi; - char const * extensions; - }; - - struct DisplayImpl { - DisplayImpl() : dpy(EGL_NO_DISPLAY), config(0), - state(NOT_INITIALIZED), numConfigs(0) { } - EGLDisplay dpy; - EGLConfig* config; - EGLint state; - EGLint numConfigs; - strings_t queryString; - }; - -private: - uint32_t magic; - -public: - DisplayImpl disp[IMPL_NUM_IMPLEMENTATIONS]; - EGLint numTotalConfigs; - egl_config_t* configs; - -private: - uint32_t refs; - mutable Mutex lock; - SortedVector<egl_object_t*> objects; - String8 mVendorString; - String8 mVersionString; - String8 mClientApiString; - String8 mExtensionString; -}; - -// ---------------------------------------------------------------------------- - -inline egl_display_t* get_display(EGLDisplay dpy) { - return egl_display_t::get(dpy); -} - -// ---------------------------------------------------------------------------- - -egl_display_t* validate_display(EGLDisplay dpy); -egl_connection_t* validate_display_config(EGLDisplay dpy, - EGLConfig config, egl_display_t const*& dp); -EGLBoolean validate_display_context(EGLDisplay dpy, EGLContext ctx); -EGLBoolean validate_display_surface(EGLDisplay dpy, EGLSurface surface); - -// ---------------------------------------------------------------------------- -}; // namespace android -// ---------------------------------------------------------------------------- - -#endif // ANDROID_EGL_DISPLAY_H diff --git a/opengl/libs/EGL/egl_entries.in b/opengl/libs/EGL/egl_entries.in deleted file mode 100644 index bdd2a7e..0000000 --- a/opengl/libs/EGL/egl_entries.in +++ /dev/null @@ -1,69 +0,0 @@ -EGL_ENTRY(EGLDisplay, eglGetDisplay, NativeDisplayType) -EGL_ENTRY(EGLBoolean, eglInitialize, EGLDisplay, EGLint*, EGLint*) -EGL_ENTRY(EGLBoolean, eglTerminate, EGLDisplay) -EGL_ENTRY(EGLBoolean, eglGetConfigs, EGLDisplay, EGLConfig*, EGLint, EGLint*) -EGL_ENTRY(EGLBoolean, eglChooseConfig, EGLDisplay, const EGLint *, EGLConfig *, EGLint, EGLint *) - -EGL_ENTRY(EGLBoolean, eglGetConfigAttrib, EGLDisplay, EGLConfig, EGLint, EGLint *) -EGL_ENTRY(EGLSurface, eglCreateWindowSurface, EGLDisplay, EGLConfig, NativeWindowType, const EGLint *) -EGL_ENTRY(EGLSurface, eglCreatePixmapSurface, EGLDisplay, EGLConfig, NativePixmapType, const EGLint *) -EGL_ENTRY(EGLSurface, eglCreatePbufferSurface, EGLDisplay, EGLConfig, const EGLint *) -EGL_ENTRY(EGLBoolean, eglDestroySurface, EGLDisplay, EGLSurface) -EGL_ENTRY(EGLBoolean, eglQuerySurface, EGLDisplay, EGLSurface, EGLint, EGLint *) -EGL_ENTRY(EGLContext, eglCreateContext, EGLDisplay, EGLConfig, EGLContext, const EGLint *) -EGL_ENTRY(EGLBoolean, eglDestroyContext, EGLDisplay, EGLContext) -EGL_ENTRY(EGLBoolean, eglMakeCurrent, EGLDisplay, EGLSurface, EGLSurface, EGLContext) -EGL_ENTRY(EGLContext, eglGetCurrentContext, void) -EGL_ENTRY(EGLSurface, eglGetCurrentSurface, EGLint) -EGL_ENTRY(EGLDisplay, eglGetCurrentDisplay, void) -EGL_ENTRY(EGLBoolean, eglQueryContext, EGLDisplay, EGLContext, EGLint, EGLint *) -EGL_ENTRY(EGLBoolean, eglWaitGL, void) -EGL_ENTRY(EGLBoolean, eglWaitNative, EGLint) -EGL_ENTRY(EGLBoolean, eglSwapBuffers, EGLDisplay, EGLSurface) -EGL_ENTRY(EGLBoolean, eglCopyBuffers, EGLDisplay, EGLSurface, NativePixmapType) -EGL_ENTRY(EGLint, eglGetError, void) -EGL_ENTRY(const char*, eglQueryString, EGLDisplay, EGLint) -EGL_ENTRY(__eglMustCastToProperFunctionPointerType, eglGetProcAddress, const char *) - -/* EGL 1.1 */ - -EGL_ENTRY(EGLBoolean, eglSurfaceAttrib, EGLDisplay, EGLSurface, EGLint, EGLint) -EGL_ENTRY(EGLBoolean, eglBindTexImage, EGLDisplay, EGLSurface, EGLint) -EGL_ENTRY(EGLBoolean, eglReleaseTexImage, EGLDisplay, EGLSurface, EGLint) -EGL_ENTRY(EGLBoolean, eglSwapInterval, EGLDisplay, EGLint) - -/* EGL 1.2 */ - -EGL_ENTRY(EGLBoolean, eglBindAPI, EGLenum) -EGL_ENTRY(EGLenum, eglQueryAPI, void) -EGL_ENTRY(EGLBoolean, eglWaitClient, void) -EGL_ENTRY(EGLBoolean, eglReleaseThread, void) -EGL_ENTRY(EGLSurface, eglCreatePbufferFromClientBuffer, EGLDisplay, EGLenum, EGLClientBuffer, EGLConfig, const EGLint *) - -/* EGL 1.3 */ - -/* EGL 1.4 */ - -/* EGL_EGLEXT_VERSION 3 */ - -EGL_ENTRY(EGLBoolean, eglLockSurfaceKHR, EGLDisplay, EGLSurface, const EGLint *) -EGL_ENTRY(EGLBoolean, eglUnlockSurfaceKHR, EGLDisplay, EGLSurface) -EGL_ENTRY(EGLImageKHR, eglCreateImageKHR, EGLDisplay, EGLContext, EGLenum, EGLClientBuffer, const EGLint *) -EGL_ENTRY(EGLBoolean, eglDestroyImageKHR, EGLDisplay, EGLImageKHR) - -/* EGL_EGLEXT_VERSION 5 */ - -EGL_ENTRY(EGLSyncKHR, eglCreateSyncKHR, EGLDisplay, EGLenum, const EGLint *) -EGL_ENTRY(EGLBoolean, eglDestroySyncKHR, EGLDisplay, EGLSyncKHR) -EGL_ENTRY(EGLint, eglClientWaitSyncKHR, EGLDisplay, EGLSyncKHR, EGLint, EGLTimeKHR) -EGL_ENTRY(EGLBoolean, eglGetSyncAttribKHR, EGLDisplay, EGLSyncKHR, EGLint, EGLint *) - -/* ANDROID extensions */ - -EGL_ENTRY(EGLBoolean, eglSetSwapRectangleANDROID, EGLDisplay, EGLSurface, EGLint, EGLint, EGLint, EGLint) -EGL_ENTRY(EGLClientBuffer, eglGetRenderBufferANDROID, EGLDisplay, EGLSurface) - -/* NVIDIA extensions */ - -EGL_ENTRY(EGLuint64NV, eglGetSystemTimeFrequencyNV, void) -EGL_ENTRY(EGLuint64NV, eglGetSystemTimeNV, void) diff --git a/opengl/libs/EGL/egl_object.cpp b/opengl/libs/EGL/egl_object.cpp deleted file mode 100644 index 20cdc7e..0000000 --- a/opengl/libs/EGL/egl_object.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/* - ** Copyright 2007, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#include <ctype.h> -#include <stdint.h> -#include <stdlib.h> - -#include <EGL/egl.h> -#include <EGL/eglext.h> -#include <GLES/gl.h> -#include <GLES/glext.h> - -#include <utils/threads.h> - -#include "egl_object.h" - -// ---------------------------------------------------------------------------- -namespace android { -// ---------------------------------------------------------------------------- - -egl_object_t::egl_object_t(egl_display_t* disp) : - display(disp), count(1) { - // NOTE: this does an implicit incRef - display->addObject(this); -} - -egl_object_t::~egl_object_t() { -} - -void egl_object_t::terminate() { - // this marks the object as "terminated" - display->removeObject(this); - if (decRef() == 1) { - // shouldn't happen because this is called from LocalRef - LOGE("egl_object_t::terminate() removed the last reference!"); - } -} - -void egl_object_t::destroy() { - if (decRef() == 1) { - delete this; - } -} - -bool egl_object_t::get(egl_display_t const* display, egl_object_t* object) { - // used by LocalRef, this does an incRef() atomically with - // checking that the object is valid. - return display->getObject(object); -} - -// ---------------------------------------------------------------------------- -}; // namespace android -// ---------------------------------------------------------------------------- diff --git a/opengl/libs/EGL/egl_object.h b/opengl/libs/EGL/egl_object.h deleted file mode 100644 index df1b261..0000000 --- a/opengl/libs/EGL/egl_object.h +++ /dev/null @@ -1,243 +0,0 @@ -/* - ** Copyright 2007, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#ifndef ANDROID_EGL_OBJECT_H -#define ANDROID_EGL_OBJECT_H - - -#include <ctype.h> -#include <stdint.h> -#include <stdlib.h> - -#include <EGL/egl.h> -#include <EGL/eglext.h> -#include <GLES/gl.h> -#include <GLES/glext.h> - -#include <utils/threads.h> - -#include <system/window.h> - -#include "egl_display.h" - -// ---------------------------------------------------------------------------- -namespace android { -// ---------------------------------------------------------------------------- - -struct egl_display_t; - -class egl_object_t { - egl_display_t *display; - mutable volatile int32_t count; - -protected: - virtual ~egl_object_t(); - -public: - egl_object_t(egl_display_t* display); - void destroy(); - - inline int32_t incRef() { return android_atomic_inc(&count); } - inline int32_t decRef() { return android_atomic_dec(&count); } - inline egl_display_t* getDisplay() const { return display; } - -private: - void terminate(); - static bool get(egl_display_t const* display, egl_object_t* object); - -public: - template <typename N, typename T> - class LocalRef { - egl_object_t* ref; - LocalRef(); - LocalRef(const LocalRef* rhs); - public: - ~LocalRef(); - explicit LocalRef(egl_object_t* rhs); - explicit LocalRef(egl_display_t const* display, T o) : ref(0) { - egl_object_t* native = reinterpret_cast<N*>(o); - if (o && egl_object_t::get(display, native)) { - ref = native; - } - } - inline N* get() { - return static_cast<N*>(ref); - } - void acquire() const; - void release() const; - void terminate(); - }; - template <typename N, typename T> - friend class LocalRef; -}; - -template<typename N, typename T> -egl_object_t::LocalRef<N, T>::LocalRef(egl_object_t* rhs) : ref(rhs) { - if (ref) { - ref->incRef(); - } -} - -template <typename N, typename T> -egl_object_t::LocalRef<N,T>::~LocalRef() { - if (ref) { - ref->destroy(); - } -} - -template <typename N, typename T> -void egl_object_t::LocalRef<N,T>::acquire() const { - if (ref) { - ref->incRef(); - } -} - -template <typename N, typename T> -void egl_object_t::LocalRef<N,T>::release() const { - if (ref) { - if (ref->decRef() == 1) { - // shouldn't happen because this is called from LocalRef - LOGE("LocalRef::release() removed the last reference!"); - } - } -} - -template <typename N, typename T> -void egl_object_t::LocalRef<N,T>::terminate() { - if (ref) { - ref->terminate(); - } -} - -// ---------------------------------------------------------------------------- - -class egl_surface_t: public egl_object_t { -protected: - ~egl_surface_t() { - ANativeWindow* const window = win.get(); - if (window != NULL) { - native_window_set_buffers_format(window, 0); - if (native_window_api_disconnect(window, NATIVE_WINDOW_API_EGL)) { - LOGW("EGLNativeWindowType %p disconnect failed", window); - } - } - } -public: - typedef egl_object_t::LocalRef<egl_surface_t, EGLSurface> Ref; - - egl_surface_t(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, - EGLSurface surface, int impl, egl_connection_t const* cnx) : - egl_object_t(get_display(dpy)), dpy(dpy), surface(surface), - config(config), win(win), impl(impl), cnx(cnx) { - } - EGLDisplay dpy; - EGLSurface surface; - EGLConfig config; - sp<ANativeWindow> win; - int impl; - egl_connection_t const* cnx; -}; - -class egl_context_t: public egl_object_t { -protected: - ~egl_context_t() {} -public: - typedef egl_object_t::LocalRef<egl_context_t, EGLContext> Ref; - - egl_context_t(EGLDisplay dpy, EGLContext context, EGLConfig config, - int impl, egl_connection_t const* cnx, int version) : - egl_object_t(get_display(dpy)), dpy(dpy), context(context), - config(config), read(0), draw(0), impl(impl), cnx(cnx), - version(version) { - } - EGLDisplay dpy; - EGLContext context; - EGLConfig config; - EGLSurface read; - EGLSurface draw; - int impl; - egl_connection_t const* cnx; - int version; -}; - -class egl_image_t: public egl_object_t { -protected: - ~egl_image_t() {} -public: - typedef egl_object_t::LocalRef<egl_image_t, EGLImageKHR> Ref; - - egl_image_t(EGLDisplay dpy, EGLContext context) : - egl_object_t(get_display(dpy)), dpy(dpy), context(context) { - memset(images, 0, sizeof(images)); - } - EGLDisplay dpy; - EGLContext context; - EGLImageKHR images[IMPL_NUM_IMPLEMENTATIONS]; -}; - -class egl_sync_t: public egl_object_t { -protected: - ~egl_sync_t() {} -public: - typedef egl_object_t::LocalRef<egl_sync_t, EGLSyncKHR> Ref; - - egl_sync_t(EGLDisplay dpy, EGLContext context, EGLSyncKHR sync) : - egl_object_t(get_display(dpy)), dpy(dpy), context(context), sync(sync) { - } - EGLDisplay dpy; - EGLContext context; - EGLSyncKHR sync; -}; - -// ---------------------------------------------------------------------------- - -typedef egl_surface_t::Ref SurfaceRef; -typedef egl_context_t::Ref ContextRef; -typedef egl_image_t::Ref ImageRef; -typedef egl_sync_t::Ref SyncRef; - -// ---------------------------------------------------------------------------- - -template<typename NATIVE, typename EGL> -static inline NATIVE* egl_to_native_cast(EGL arg) { - return reinterpret_cast<NATIVE*>(arg); -} - -static inline -egl_surface_t* get_surface(EGLSurface surface) { - return egl_to_native_cast<egl_surface_t>(surface); -} - -static inline -egl_context_t* get_context(EGLContext context) { - return egl_to_native_cast<egl_context_t>(context); -} - -static inline -egl_image_t* get_image(EGLImageKHR image) { - return egl_to_native_cast<egl_image_t>(image); -} - -static inline -egl_sync_t* get_sync(EGLSyncKHR sync) { - return egl_to_native_cast<egl_sync_t>(sync); -} - -// ---------------------------------------------------------------------------- -}; // namespace android -// ---------------------------------------------------------------------------- - -#endif // ANDROID_EGL_OBJECT_H diff --git a/opengl/libs/EGL/egl_tls.cpp b/opengl/libs/EGL/egl_tls.cpp deleted file mode 100644 index b341ddb..0000000 --- a/opengl/libs/EGL/egl_tls.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/* - ** Copyright 2011, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#include <stdlib.h> -#include <pthread.h> - -#include <cutils/log.h> -#include <cutils/properties.h> - -#include <utils/CallStack.h> - -#include <EGL/egl.h> - -#include "egl_tls.h" - - -namespace android { - -pthread_key_t egl_tls_t::sKey = -1; -pthread_mutex_t egl_tls_t::sLockKey = PTHREAD_MUTEX_INITIALIZER; - -egl_tls_t::egl_tls_t() - : error(EGL_SUCCESS), ctx(0), logCallWithNoContext(EGL_TRUE), dbg(0) { -} - -const char *egl_tls_t::egl_strerror(EGLint err) { - switch (err) { - case EGL_SUCCESS: return "EGL_SUCCESS"; - case EGL_NOT_INITIALIZED: return "EGL_NOT_INITIALIZED"; - case EGL_BAD_ACCESS: return "EGL_BAD_ACCESS"; - case EGL_BAD_ALLOC: return "EGL_BAD_ALLOC"; - case EGL_BAD_ATTRIBUTE: return "EGL_BAD_ATTRIBUTE"; - case EGL_BAD_CONFIG: return "EGL_BAD_CONFIG"; - case EGL_BAD_CONTEXT: return "EGL_BAD_CONTEXT"; - case EGL_BAD_CURRENT_SURFACE: return "EGL_BAD_CURRENT_SURFACE"; - case EGL_BAD_DISPLAY: return "EGL_BAD_DISPLAY"; - case EGL_BAD_MATCH: return "EGL_BAD_MATCH"; - case EGL_BAD_NATIVE_PIXMAP: return "EGL_BAD_NATIVE_PIXMAP"; - case EGL_BAD_NATIVE_WINDOW: return "EGL_BAD_NATIVE_WINDOW"; - case EGL_BAD_PARAMETER: return "EGL_BAD_PARAMETER"; - case EGL_BAD_SURFACE: return "EGL_BAD_SURFACE"; - case EGL_CONTEXT_LOST: return "EGL_CONTEXT_LOST"; - default: return "UNKNOWN"; - } -} - -void egl_tls_t::validateTLSKey() -{ - if (sKey == -1) { - pthread_mutex_lock(&sLockKey); - if (sKey == -1) - pthread_key_create(&sKey, NULL); - pthread_mutex_unlock(&sLockKey); - } -} - -void egl_tls_t::setErrorEtcImpl( - const char* caller, int line, EGLint error, bool quiet) { - validateTLSKey(); - egl_tls_t* tls = getTLS(); - if (tls->error != error) { - if (!quiet) { - LOGE("%s:%d error %x (%s)", - caller, line, error, egl_strerror(error)); - char value[PROPERTY_VALUE_MAX]; - property_get("debug.egl.callstack", value, "0"); - if (atoi(value)) { - CallStack stack; - stack.update(); - stack.dump(); - } - } - tls->error = error; - } -} - -bool egl_tls_t::logNoContextCall() { - egl_tls_t* tls = getTLS(); - if (tls->logCallWithNoContext == true) { - tls->logCallWithNoContext = false; - return true; - } - return false; -} - -egl_tls_t* egl_tls_t::getTLS() { - egl_tls_t* tls = (egl_tls_t*)pthread_getspecific(sKey); - if (tls == 0) { - tls = new egl_tls_t; - pthread_setspecific(sKey, tls); - } - return tls; -} - -void egl_tls_t::clearTLS() { - if (sKey != -1) { - egl_tls_t* tls = (egl_tls_t*)pthread_getspecific(sKey); - if (tls) { - delete tls; - pthread_setspecific(sKey, 0); - } - } -} - -void egl_tls_t::clearError() { - // This must clear the error from all the underlying EGL implementations as - // well as the EGL wrapper layer. - eglGetError(); -} - -EGLint egl_tls_t::getError() { - if (sKey == -1) - return EGL_SUCCESS; - egl_tls_t* tls = (egl_tls_t*)pthread_getspecific(sKey); - if (!tls) return EGL_SUCCESS; - EGLint error = tls->error; - tls->error = EGL_SUCCESS; - return error; -} - -void egl_tls_t::setContext(EGLContext ctx) { - validateTLSKey(); - getTLS()->ctx = ctx; -} - -EGLContext egl_tls_t::getContext() { - if (sKey == -1) - return EGL_NO_CONTEXT; - egl_tls_t* tls = (egl_tls_t *)pthread_getspecific(sKey); - if (!tls) return EGL_NO_CONTEXT; - return tls->ctx; -} - - -} // namespace android diff --git a/opengl/libs/EGL/egl_tls.h b/opengl/libs/EGL/egl_tls.h deleted file mode 100644 index 78b0b2f..0000000 --- a/opengl/libs/EGL/egl_tls.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - ** Copyright 2011, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#ifndef ANDROID_EGL_TLS_H -#define ANDROID_EGL_TLS_H - -#include <pthread.h> - -#include <EGL/egl.h> - -#include "egldefs.h" -#include "hooks.h" - -// ---------------------------------------------------------------------------- -namespace android { -// ---------------------------------------------------------------------------- - -class DbgContext; - -class egl_tls_t { - static pthread_key_t sKey; - static pthread_mutex_t sLockKey; - - EGLint error; - EGLContext ctx; - EGLBoolean logCallWithNoContext; - DbgContext* dbg; - - egl_tls_t(); - static void validateTLSKey(); - static void setErrorEtcImpl( - const char* caller, int line, EGLint error, bool quiet); - -public: - static egl_tls_t* getTLS(); - static void clearTLS(); - static void clearError(); - static EGLint getError(); - static void setContext(EGLContext ctx); - static EGLContext getContext(); - static bool logNoContextCall(); - static const char *egl_strerror(EGLint err); - - template<typename T> - static T setErrorEtc(const char* caller, - int line, EGLint error, T returnValue, bool quiet = false) { - setErrorEtcImpl(caller, line, error, quiet); - return returnValue; - } -}; - -#define setError(_e, _r) \ - egl_tls_t::setErrorEtc(__FUNCTION__, __LINE__, _e, _r) - -#define setErrorQuiet(_e, _r) \ - egl_tls_t::setErrorEtc(__FUNCTION__, __LINE__, _e, _r, true) - -// ---------------------------------------------------------------------------- - -#if EGL_TRACE - -extern gl_hooks_t const* getGLTraceThreadSpecific(); - -#endif - -// ---------------------------------------------------------------------------- -}; // namespace android -// ---------------------------------------------------------------------------- - -#endif // ANDROID_EGL_TLS_H diff --git a/opengl/libs/EGL/egldefs.h b/opengl/libs/EGL/egldefs.h deleted file mode 100644 index 107acd9..0000000 --- a/opengl/libs/EGL/egldefs.h +++ /dev/null @@ -1,71 +0,0 @@ -/* - ** Copyright 2011, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#ifndef ANDROID_EGLDEFS_H -#define ANDROID_EGLDEFS_H - -#include "hooks.h" - -// ---------------------------------------------------------------------------- -namespace android { -// ---------------------------------------------------------------------------- - -#define VERSION_MAJOR 1 -#define VERSION_MINOR 4 - -// EGLDisplay are global, not attached to a given thread -const unsigned int NUM_DISPLAYS = 1; - -enum { - IMPL_HARDWARE = 0, - IMPL_SOFTWARE, - IMPL_NUM_IMPLEMENTATIONS -}; - -enum { - GLESv1_INDEX = 0, - GLESv2_INDEX = 1, -}; - -// ---------------------------------------------------------------------------- - -struct egl_connection_t -{ - inline egl_connection_t() : dso(0) { } - void * dso; - gl_hooks_t * hooks[2]; - EGLint major; - EGLint minor; - egl_t egl; -}; - -// ---------------------------------------------------------------------------- - -extern gl_hooks_t gHooks[2][IMPL_NUM_IMPLEMENTATIONS]; -extern gl_hooks_t gHooksNoContext; -extern pthread_key_t gGLWrapperKey; -extern "C" void gl_unimplemented(); - -extern char const * const gl_names[]; -extern char const * const egl_names[]; - -extern egl_connection_t gEGLImpl[IMPL_NUM_IMPLEMENTATIONS]; - -// ---------------------------------------------------------------------------- -}; // namespace android -// ---------------------------------------------------------------------------- - -#endif /* ANDROID_EGLDEFS_H */ diff --git a/opengl/libs/EGL/getProcAddress.cpp b/opengl/libs/EGL/getProcAddress.cpp deleted file mode 100644 index f89c865..0000000 --- a/opengl/libs/EGL/getProcAddress.cpp +++ /dev/null @@ -1,123 +0,0 @@ -/* - ** Copyright 2009, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#include <ctype.h> -#include <stdlib.h> -#include <errno.h> - -#include <cutils/log.h> - -#include "egldefs.h" -#include "hooks.h" - -// ---------------------------------------------------------------------------- -namespace android { -// ---------------------------------------------------------------------------- - -#undef API_ENTRY -#undef CALL_GL_EXTENSION_API -#undef GL_EXTENSION -#undef GL_EXTENSION_NAME -#undef GL_EXTENSION_ARRAY -#undef GL_EXTENSION_LIST -#undef GET_TLS - -#if USE_FAST_TLS_KEY - - #ifdef HAVE_ARM_TLS_REGISTER - #define GET_TLS(reg) \ - "mrc p15, 0, " #reg ", c13, c0, 3 \n" - #else - #define GET_TLS(reg) \ - "mov " #reg ", #0xFFFF0FFF \n" \ - "ldr " #reg ", [" #reg ", #-15] \n" - #endif - - #define API_ENTRY(_api) __attribute__((naked)) _api - - #define CALL_GL_EXTENSION_API(_api) \ - asm volatile( \ - GET_TLS(r12) \ - "ldr r12, [r12, %[tls]] \n" \ - "cmp r12, #0 \n" \ - "ldrne r12, [r12, %[api]] \n" \ - "cmpne r12, #0 \n" \ - "bxne r12 \n" \ - "bx lr \n" \ - : \ - : [tls] "J"(TLS_SLOT_OPENGL_API*4), \ - [api] "J"(__builtin_offsetof(gl_hooks_t, \ - ext.extensions[_api])) \ - : \ - ); - - #define GL_EXTENSION_NAME(_n) __glExtFwd##_n - - #define GL_EXTENSION(_n) \ - void API_ENTRY(GL_EXTENSION_NAME(_n))() { \ - CALL_GL_EXTENSION_API(_n); \ - } - - -#else - - #define GL_EXTENSION_NAME(_n) NULL - - #define GL_EXTENSION(_n) - - #warning "eglGetProcAddress() partially supported" - -#endif - -#define GL_EXTENSION_LIST(name) \ - name(0) name(1) name(2) name(3) \ - name(4) name(5) name(6) name(7) \ - name(8) name(9) name(10) name(11) \ - name(12) name(13) name(14) name(15) \ - name(16) name(17) name(18) name(19) \ - name(20) name(21) name(22) name(23) \ - name(24) name(25) name(26) name(27) \ - name(28) name(29) name(30) name(31) \ - name(32) name(33) name(34) name(35) \ - name(36) name(37) name(38) name(39) \ - name(40) name(41) name(42) name(43) \ - name(44) name(45) name(46) name(47) \ - name(48) name(49) name(50) name(51) \ - name(52) name(53) name(54) name(55) \ - name(56) name(57) name(58) name(59) \ - name(60) name(61) name(62) name(63) - - -GL_EXTENSION_LIST( GL_EXTENSION ) - -#define GL_EXTENSION_ARRAY(_n) GL_EXTENSION_NAME(_n), - -extern const __eglMustCastToProperFunctionPointerType gExtensionForwarders[MAX_NUMBER_OF_GL_EXTENSIONS] = { - GL_EXTENSION_LIST( GL_EXTENSION_ARRAY ) - }; - -#undef GET_TLS -#undef GL_EXTENSION_LIST -#undef GL_EXTENSION_ARRAY -#undef GL_EXTENSION_NAME -#undef GL_EXTENSION -#undef API_ENTRY -#undef CALL_GL_EXTENSION_API - -// ---------------------------------------------------------------------------- -}; // namespace android -// ---------------------------------------------------------------------------- - diff --git a/opengl/libs/EGL/trace.cpp b/opengl/libs/EGL/trace.cpp deleted file mode 100644 index 0e934e2..0000000 --- a/opengl/libs/EGL/trace.cpp +++ /dev/null @@ -1,398 +0,0 @@ -/* - ** Copyright 2010, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#if EGL_TRACE - -#include <stdarg.h> -#include <stdlib.h> - -#include <EGL/egl.h> -#include <EGL/eglext.h> -#include <GLES/gl.h> -#include <GLES/glext.h> - -#include <cutils/log.h> - -#include "egl_tls.h" -#include "hooks.h" - -// ---------------------------------------------------------------------------- -namespace android { -// ---------------------------------------------------------------------------- - -struct GLenumString { - GLenum e; - const char* s; -}; - -#undef GL_ENUM -#define GL_ENUM(VAL,NAME) {VAL, #NAME}, - -static GLenumString g_enumnames[] = { -#include "enums.in" -}; -#undef GL_ENUM - -static int compareGLEnum(const void* a, const void* b) { - return ((const GLenumString*) a)->e - ((const GLenumString*) b)->e; -} - -static const char* GLEnumToString(GLenum e) { - GLenumString key = {e, ""}; - const GLenumString* result = (const GLenumString*) bsearch( - &key, g_enumnames, - sizeof(g_enumnames) / sizeof(g_enumnames[0]), - sizeof(g_enumnames[0]), compareGLEnum); - if (result) { - return result->s; - } - return NULL; -} - -static const char* GLbooleanToString(GLboolean arg) { - return arg ? "GL_TRUE" : "GL_FALSE"; -} - -static GLenumString g_bitfieldNames[] = { - {0x00004000, "GL_COLOR_BUFFER_BIT"}, - {0x00000400, "GL_STENCIL_BUFFER_BIT"}, - {0x00000100, "GL_DEPTH_BUFFER_BIT"} -}; - -class StringBuilder { - static const int lineSize = 500; - char line[lineSize]; - int line_index; -public: - StringBuilder() { - line_index = 0; - line[0] = '\0'; - } - void append(const char* fmt, ...) { - va_list argp; - va_start(argp, fmt); - line_index += vsnprintf(line + line_index, lineSize-line_index, fmt, argp); - va_end(argp); - } - const char* getString() { - line_index = 0; - line[lineSize-1] = '\0'; - return line; - } -}; - - -static void TraceGLShaderSource(GLuint shader, GLsizei count, - const GLchar** string, const GLint* length) { - LOGD("const char* shaderSrc[] = {"); - for (GLsizei i = 0; i < count; i++) { - const char* comma = i < count-1 ? "," : ""; - const GLchar* s = string[i]; - if (length) { - GLint len = length[i]; - LOGD(" \"%*s\"%s", len, s, comma); - } else { - LOGD(" \"%s\"%s", s, comma); - } - } - LOGD("};"); - if (length) { - LOGD("const GLint* shaderLength[] = {"); - for (GLsizei i = 0; i < count; i++) { - const char* comma = i < count-1 ? "," : ""; - GLint len = length[i]; - LOGD(" \"%d\"%s", len, comma); - } - LOGD("};"); - LOGD("glShaderSource(%u, %u, shaderSrc, shaderLength);", - shader, count); - } else { - LOGD("glShaderSource(%u, %u, shaderSrc, (const GLint*) 0);", - shader, count); - } -} - -static void TraceValue(int elementCount, char type, - GLsizei chunkCount, GLsizei chunkSize, const void* value) { - StringBuilder stringBuilder; - GLsizei count = chunkCount * chunkSize; - bool isFloat = type == 'f'; - const char* typeString = isFloat ? "GLfloat" : "GLint"; - LOGD("const %s value[] = {", typeString); - for (GLsizei i = 0; i < count; i++) { - StringBuilder builder; - builder.append(" "); - for (int e = 0; e < elementCount; e++) { - const char* comma = ", "; - if (e == elementCount-1) { - if (i == count - 1) { - comma = ""; - } else { - comma = ","; - } - } - if (isFloat) { - builder.append("%g%s", * (GLfloat*) value, comma); - value = (void*) (((GLfloat*) value) + 1); - } else { - builder.append("%d%s", * (GLint*) value, comma); - value = (void*) (((GLint*) value) + 1); - } - } - LOGD("%s", builder.getString()); - if (chunkSize > 1 && i < count-1 - && (i % chunkSize) == (chunkSize-1)) { - LOGD("%s", ""); // Print a blank line. - } - } - LOGD("};"); -} - -static void TraceUniformv(int elementCount, char type, - GLuint location, GLsizei count, const void* value) { - TraceValue(elementCount, type, count, 1, value); - LOGD("glUniform%d%c(%u, %u, value);", elementCount, type, location, count); -} - -static void TraceUniformMatrix(int matrixSideLength, - GLuint location, GLsizei count, GLboolean transpose, const void* value) { - TraceValue(matrixSideLength, 'f', count, matrixSideLength, value); - LOGD("glUniformMatrix%dfv(%u, %u, %s, value);", matrixSideLength, location, count, - GLbooleanToString(transpose)); -} - -static void TraceGL(const char* name, int numArgs, ...) { - va_list argp; - va_start(argp, numArgs); - int nameLen = strlen(name); - - // glShaderSource - if (nameLen == 14 && strcmp(name, "glShaderSource") == 0) { - va_arg(argp, const char*); - GLuint shader = va_arg(argp, GLuint); - va_arg(argp, const char*); - GLsizei count = va_arg(argp, GLsizei); - va_arg(argp, const char*); - const GLchar** string = (const GLchar**) va_arg(argp, void*); - va_arg(argp, const char*); - const GLint* length = (const GLint*) va_arg(argp, void*); - va_end(argp); - TraceGLShaderSource(shader, count, string, length); - return; - } - - // glUniformXXv - - if (nameLen == 12 && strncmp(name, "glUniform", 9) == 0 && name[11] == 'v') { - int elementCount = name[9] - '0'; // 1..4 - char type = name[10]; // 'f' or 'i' - va_arg(argp, const char*); - GLuint location = va_arg(argp, GLuint); - va_arg(argp, const char*); - GLsizei count = va_arg(argp, GLsizei); - va_arg(argp, const char*); - const void* value = (const void*) va_arg(argp, void*); - va_end(argp); - TraceUniformv(elementCount, type, location, count, value); - return; - } - - // glUniformMatrixXfv - - if (nameLen == 18 && strncmp(name, "glUniformMatrix", 15) == 0 - && name[16] == 'f' && name[17] == 'v') { - int matrixSideLength = name[15] - '0'; // 2..4 - va_arg(argp, const char*); - GLuint location = va_arg(argp, GLuint); - va_arg(argp, const char*); - GLsizei count = va_arg(argp, GLsizei); - va_arg(argp, const char*); - GLboolean transpose = (GLboolean) va_arg(argp, int); - va_arg(argp, const char*); - const void* value = (const void*) va_arg(argp, void*); - va_end(argp); - TraceUniformMatrix(matrixSideLength, location, count, transpose, value); - return; - } - - StringBuilder builder; - builder.append("%s(", name); - for (int i = 0; i < numArgs; i++) { - if (i > 0) { - builder.append(", "); - } - const char* type = va_arg(argp, const char*); - bool isPtr = type[strlen(type)-1] == '*' - || strcmp(type, "GLeglImageOES") == 0; - if (isPtr) { - const void* arg = va_arg(argp, const void*); - builder.append("(%s) 0x%08x", type, (size_t) arg); - } else if (strcmp(type, "GLbitfield") == 0) { - size_t arg = va_arg(argp, size_t); - bool first = true; - for (size_t i = 0; i < sizeof(g_bitfieldNames) / sizeof(g_bitfieldNames[0]); i++) { - const GLenumString* b = &g_bitfieldNames[i]; - if (b->e & arg) { - if (first) { - first = false; - } else { - builder.append(" | "); - } - builder.append("%s", b->s); - arg &= ~b->e; - } - } - if (first || arg != 0) { - if (!first) { - builder.append(" | "); - } - builder.append("0x%08x", arg); - } - } else if (strcmp(type, "GLboolean") == 0) { - GLboolean arg = va_arg(argp, int); - builder.append("%s", GLbooleanToString(arg)); - } else if (strcmp(type, "GLclampf") == 0) { - double arg = va_arg(argp, double); - builder.append("%g", arg); - } else if (strcmp(type, "GLenum") == 0) { - GLenum arg = va_arg(argp, int); - const char* s = GLEnumToString(arg); - if (s) { - builder.append("%s", s); - } else { - builder.append("0x%x", arg); - } - } else if (strcmp(type, "GLfixed") == 0) { - int arg = va_arg(argp, int); - builder.append("0x%08x", arg); - } else if (strcmp(type, "GLfloat") == 0) { - double arg = va_arg(argp, double); - builder.append("%g", arg); - } else if (strcmp(type, "GLint") == 0) { - int arg = va_arg(argp, int); - const char* s = NULL; - if (strcmp(name, "glTexParameteri") == 0) { - s = GLEnumToString(arg); - } - if (s) { - builder.append("%s", s); - } else { - builder.append("%d", arg); - } - } else if (strcmp(type, "GLintptr") == 0) { - int arg = va_arg(argp, unsigned int); - builder.append("%u", arg); - } else if (strcmp(type, "GLsizei") == 0) { - int arg = va_arg(argp, size_t); - builder.append("%u", arg); - } else if (strcmp(type, "GLsizeiptr") == 0) { - int arg = va_arg(argp, size_t); - builder.append("%u", arg); - } else if (strcmp(type, "GLuint") == 0) { - int arg = va_arg(argp, unsigned int); - builder.append("%u", arg); - } else { - builder.append("/* ??? %s */", type); - break; - } - } - builder.append(");"); - LOGD("%s", builder.getString()); - va_end(argp); -} - -#undef TRACE_GL_VOID -#undef TRACE_GL - -#define TRACE_GL_VOID(_api, _args, _argList, ...) \ -static void Tracing_ ## _api _args { \ - TraceGL(#_api, __VA_ARGS__); \ - gl_hooks_t::gl_t const * const _c = &getGLTraceThreadSpecific()->gl; \ - _c->_api _argList; \ -} - -#define TRACE_GL(_type, _api, _args, _argList, ...) \ -static _type Tracing_ ## _api _args { \ - TraceGL(#_api, __VA_ARGS__); \ - gl_hooks_t::gl_t const * const _c = &getGLTraceThreadSpecific()->gl; \ - return _c->_api _argList; \ -} - -extern "C" { -#include "../trace.in" -} - -#undef TRACE_GL_VOID -#undef TRACE_GL - -#define GL_ENTRY(_r, _api, ...) Tracing_ ## _api, -EGLAPI gl_hooks_t gHooksTrace = { - { - #include "entries.in" - }, - { - {0} - } -}; -#undef GL_ENTRY - - -#undef TRACE_GL_VOID -#undef TRACE_GL - -// define the ES 1.0 Debug_gl* functions as Tracing_gl functions -#define TRACE_GL_VOID(_api, _args, _argList, ...) \ -static void Debug_ ## _api _args { \ - TraceGL(#_api, __VA_ARGS__); \ - gl_hooks_t::gl_t const * const _c = &getGLTraceThreadSpecific()->gl; \ - _c->_api _argList; \ -} - -#define TRACE_GL(_type, _api, _args, _argList, ...) \ -static _type Debug_ ## _api _args { \ - TraceGL(#_api, __VA_ARGS__); \ - gl_hooks_t::gl_t const * const _c = &getGLTraceThreadSpecific()->gl; \ - return _c->_api _argList; \ -} - -extern "C" { -#include "../debug.in" -} - -#undef TRACE_GL_VOID -#undef TRACE_GL - -// declare all Debug_gl* functions -#define GL_ENTRY(_r, _api, ...) _r Debug_##_api ( __VA_ARGS__ ); -#include "glesv2dbg_functions.h" -#undef GL_ENTRY - -#define GL_ENTRY(_r, _api, ...) Debug_ ## _api, -EGLAPI gl_hooks_t gHooksDebug = { - { - #include "entries.in" - }, - { - {0} - } -}; -#undef GL_ENTRY - -// ---------------------------------------------------------------------------- -}; // namespace android -// ---------------------------------------------------------------------------- - -#endif // EGL_TRACE diff --git a/opengl/libs/ETC1/etc1.cpp b/opengl/libs/ETC1/etc1.cpp deleted file mode 100644 index 5ed2c3c..0000000 --- a/opengl/libs/ETC1/etc1.cpp +++ /dev/null @@ -1,670 +0,0 @@ -// Copyright 2009 Google Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include <ETC1/etc1.h> - -#include <string.h> - -/* From http://www.khronos.org/registry/gles/extensions/OES/OES_compressed_ETC1_RGB8_texture.txt - - The number of bits that represent a 4x4 texel block is 64 bits if - <internalformat> is given by ETC1_RGB8_OES. - - The data for a block is a number of bytes, - - {q0, q1, q2, q3, q4, q5, q6, q7} - - where byte q0 is located at the lowest memory address and q7 at - the highest. The 64 bits specifying the block is then represented - by the following 64 bit integer: - - int64bit = 256*(256*(256*(256*(256*(256*(256*q0+q1)+q2)+q3)+q4)+q5)+q6)+q7; - - ETC1_RGB8_OES: - - a) bit layout in bits 63 through 32 if diffbit = 0 - - 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 - ----------------------------------------------- - | base col1 | base col2 | base col1 | base col2 | - | R1 (4bits)| R2 (4bits)| G1 (4bits)| G2 (4bits)| - ----------------------------------------------- - - 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 - --------------------------------------------------- - | base col1 | base col2 | table | table |diff|flip| - | B1 (4bits)| B2 (4bits)| cw 1 | cw 2 |bit |bit | - --------------------------------------------------- - - - b) bit layout in bits 63 through 32 if diffbit = 1 - - 63 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 - ----------------------------------------------- - | base col1 | dcol 2 | base col1 | dcol 2 | - | R1' (5 bits) | dR2 | G1' (5 bits) | dG2 | - ----------------------------------------------- - - 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 32 - --------------------------------------------------- - | base col 1 | dcol 2 | table | table |diff|flip| - | B1' (5 bits) | dB2 | cw 1 | cw 2 |bit |bit | - --------------------------------------------------- - - - c) bit layout in bits 31 through 0 (in both cases) - - 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 - ----------------------------------------------- - | most significant pixel index bits | - | p| o| n| m| l| k| j| i| h| g| f| e| d| c| b| a| - ----------------------------------------------- - - 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 - -------------------------------------------------- - | least significant pixel index bits | - | p| o| n| m| l| k| j| i| h| g| f| e| d| c | b | a | - -------------------------------------------------- - - - Add table 3.17.2: Intensity modifier sets for ETC1 compressed textures: - - table codeword modifier table - ------------------ ---------------------- - 0 -8 -2 2 8 - 1 -17 -5 5 17 - 2 -29 -9 9 29 - 3 -42 -13 13 42 - 4 -60 -18 18 60 - 5 -80 -24 24 80 - 6 -106 -33 33 106 - 7 -183 -47 47 183 - - - Add table 3.17.3 Mapping from pixel index values to modifier values for - ETC1 compressed textures: - - pixel index value - --------------- - msb lsb resulting modifier value - ----- ----- ------------------------- - 1 1 -b (large negative value) - 1 0 -a (small negative value) - 0 0 a (small positive value) - 0 1 b (large positive value) - - - */ - -static const int kModifierTable[] = { -/* 0 */2, 8, -2, -8, -/* 1 */5, 17, -5, -17, -/* 2 */9, 29, -9, -29, -/* 3 */13, 42, -13, -42, -/* 4 */18, 60, -18, -60, -/* 5 */24, 80, -24, -80, -/* 6 */33, 106, -33, -106, -/* 7 */47, 183, -47, -183 }; - -static const int kLookup[8] = { 0, 1, 2, 3, -4, -3, -2, -1 }; - -static inline etc1_byte clamp(int x) { - return (etc1_byte) (x >= 0 ? (x < 255 ? x : 255) : 0); -} - -static -inline int convert4To8(int b) { - int c = b & 0xf; - return (c << 4) | c; -} - -static -inline int convert5To8(int b) { - int c = b & 0x1f; - return (c << 3) | (c >> 2); -} - -static -inline int convert6To8(int b) { - int c = b & 0x3f; - return (c << 2) | (c >> 4); -} - -static -inline int divideBy255(int d) { - return (d + 128 + (d >> 8)) >> 8; -} - -static -inline int convert8To4(int b) { - int c = b & 0xff; - return divideBy255(b * 15); -} - -static -inline int convert8To5(int b) { - int c = b & 0xff; - return divideBy255(b * 31); -} - -static -inline int convertDiff(int base, int diff) { - return convert5To8((0x1f & base) + kLookup[0x7 & diff]); -} - -static -void decode_subblock(etc1_byte* pOut, int r, int g, int b, const int* table, - etc1_uint32 low, bool second, bool flipped) { - int baseX = 0; - int baseY = 0; - if (second) { - if (flipped) { - baseY = 2; - } else { - baseX = 2; - } - } - for (int i = 0; i < 8; i++) { - int x, y; - if (flipped) { - x = baseX + (i >> 1); - y = baseY + (i & 1); - } else { - x = baseX + (i >> 2); - y = baseY + (i & 3); - } - int k = y + (x * 4); - int offset = ((low >> k) & 1) | ((low >> (k + 15)) & 2); - int delta = table[offset]; - etc1_byte* q = pOut + 3 * (x + 4 * y); - *q++ = clamp(r + delta); - *q++ = clamp(g + delta); - *q++ = clamp(b + delta); - } -} - -// Input is an ETC1 compressed version of the data. -// Output is a 4 x 4 square of 3-byte pixels in form R, G, B - -void etc1_decode_block(const etc1_byte* pIn, etc1_byte* pOut) { - etc1_uint32 high = (pIn[0] << 24) | (pIn[1] << 16) | (pIn[2] << 8) | pIn[3]; - etc1_uint32 low = (pIn[4] << 24) | (pIn[5] << 16) | (pIn[6] << 8) | pIn[7]; - int r1, r2, g1, g2, b1, b2; - if (high & 2) { - // differential - int rBase = high >> 27; - int gBase = high >> 19; - int bBase = high >> 11; - r1 = convert5To8(rBase); - r2 = convertDiff(rBase, high >> 24); - g1 = convert5To8(gBase); - g2 = convertDiff(gBase, high >> 16); - b1 = convert5To8(bBase); - b2 = convertDiff(bBase, high >> 8); - } else { - // not differential - r1 = convert4To8(high >> 28); - r2 = convert4To8(high >> 24); - g1 = convert4To8(high >> 20); - g2 = convert4To8(high >> 16); - b1 = convert4To8(high >> 12); - b2 = convert4To8(high >> 8); - } - int tableIndexA = 7 & (high >> 5); - int tableIndexB = 7 & (high >> 2); - const int* tableA = kModifierTable + tableIndexA * 4; - const int* tableB = kModifierTable + tableIndexB * 4; - bool flipped = (high & 1) != 0; - decode_subblock(pOut, r1, g1, b1, tableA, low, false, flipped); - decode_subblock(pOut, r2, g2, b2, tableB, low, true, flipped); -} - -typedef struct { - etc1_uint32 high; - etc1_uint32 low; - etc1_uint32 score; // Lower is more accurate -} etc_compressed; - -static -inline void take_best(etc_compressed* a, const etc_compressed* b) { - if (a->score > b->score) { - *a = *b; - } -} - -static -void etc_average_colors_subblock(const etc1_byte* pIn, etc1_uint32 inMask, - etc1_byte* pColors, bool flipped, bool second) { - int r = 0; - int g = 0; - int b = 0; - - if (flipped) { - int by = 0; - if (second) { - by = 2; - } - for (int y = 0; y < 2; y++) { - int yy = by + y; - for (int x = 0; x < 4; x++) { - int i = x + 4 * yy; - if (inMask & (1 << i)) { - const etc1_byte* p = pIn + i * 3; - r += *(p++); - g += *(p++); - b += *(p++); - } - } - } - } else { - int bx = 0; - if (second) { - bx = 2; - } - for (int y = 0; y < 4; y++) { - for (int x = 0; x < 2; x++) { - int xx = bx + x; - int i = xx + 4 * y; - if (inMask & (1 << i)) { - const etc1_byte* p = pIn + i * 3; - r += *(p++); - g += *(p++); - b += *(p++); - } - } - } - } - pColors[0] = (etc1_byte)((r + 4) >> 3); - pColors[1] = (etc1_byte)((g + 4) >> 3); - pColors[2] = (etc1_byte)((b + 4) >> 3); -} - -static -inline int square(int x) { - return x * x; -} - -static etc1_uint32 chooseModifier(const etc1_byte* pBaseColors, - const etc1_byte* pIn, etc1_uint32 *pLow, int bitIndex, - const int* pModifierTable) { - etc1_uint32 bestScore = ~0; - int bestIndex = 0; - int pixelR = pIn[0]; - int pixelG = pIn[1]; - int pixelB = pIn[2]; - int r = pBaseColors[0]; - int g = pBaseColors[1]; - int b = pBaseColors[2]; - for (int i = 0; i < 4; i++) { - int modifier = pModifierTable[i]; - int decodedG = clamp(g + modifier); - etc1_uint32 score = (etc1_uint32) (6 * square(decodedG - pixelG)); - if (score >= bestScore) { - continue; - } - int decodedR = clamp(r + modifier); - score += (etc1_uint32) (3 * square(decodedR - pixelR)); - if (score >= bestScore) { - continue; - } - int decodedB = clamp(b + modifier); - score += (etc1_uint32) square(decodedB - pixelB); - if (score < bestScore) { - bestScore = score; - bestIndex = i; - } - } - etc1_uint32 lowMask = (((bestIndex >> 1) << 16) | (bestIndex & 1)) - << bitIndex; - *pLow |= lowMask; - return bestScore; -} - -static -void etc_encode_subblock_helper(const etc1_byte* pIn, etc1_uint32 inMask, - etc_compressed* pCompressed, bool flipped, bool second, - const etc1_byte* pBaseColors, const int* pModifierTable) { - int score = pCompressed->score; - if (flipped) { - int by = 0; - if (second) { - by = 2; - } - for (int y = 0; y < 2; y++) { - int yy = by + y; - for (int x = 0; x < 4; x++) { - int i = x + 4 * yy; - if (inMask & (1 << i)) { - score += chooseModifier(pBaseColors, pIn + i * 3, - &pCompressed->low, yy + x * 4, pModifierTable); - } - } - } - } else { - int bx = 0; - if (second) { - bx = 2; - } - for (int y = 0; y < 4; y++) { - for (int x = 0; x < 2; x++) { - int xx = bx + x; - int i = xx + 4 * y; - if (inMask & (1 << i)) { - score += chooseModifier(pBaseColors, pIn + i * 3, - &pCompressed->low, y + xx * 4, pModifierTable); - } - } - } - } - pCompressed->score = score; -} - -static bool inRange4bitSigned(int color) { - return color >= -4 && color <= 3; -} - -static void etc_encodeBaseColors(etc1_byte* pBaseColors, - const etc1_byte* pColors, etc_compressed* pCompressed) { - int r1, g1, b1, r2, g2, b2; // 8 bit base colors for sub-blocks - bool differential; - { - int r51 = convert8To5(pColors[0]); - int g51 = convert8To5(pColors[1]); - int b51 = convert8To5(pColors[2]); - int r52 = convert8To5(pColors[3]); - int g52 = convert8To5(pColors[4]); - int b52 = convert8To5(pColors[5]); - - r1 = convert5To8(r51); - g1 = convert5To8(g51); - b1 = convert5To8(b51); - - int dr = r52 - r51; - int dg = g52 - g51; - int db = b52 - b51; - - differential = inRange4bitSigned(dr) && inRange4bitSigned(dg) - && inRange4bitSigned(db); - if (differential) { - r2 = convert5To8(r51 + dr); - g2 = convert5To8(g51 + dg); - b2 = convert5To8(b51 + db); - pCompressed->high |= (r51 << 27) | ((7 & dr) << 24) | (g51 << 19) - | ((7 & dg) << 16) | (b51 << 11) | ((7 & db) << 8) | 2; - } - } - - if (!differential) { - int r41 = convert8To4(pColors[0]); - int g41 = convert8To4(pColors[1]); - int b41 = convert8To4(pColors[2]); - int r42 = convert8To4(pColors[3]); - int g42 = convert8To4(pColors[4]); - int b42 = convert8To4(pColors[5]); - r1 = convert4To8(r41); - g1 = convert4To8(g41); - b1 = convert4To8(b41); - r2 = convert4To8(r42); - g2 = convert4To8(g42); - b2 = convert4To8(b42); - pCompressed->high |= (r41 << 28) | (r42 << 24) | (g41 << 20) | (g42 - << 16) | (b41 << 12) | (b42 << 8); - } - pBaseColors[0] = r1; - pBaseColors[1] = g1; - pBaseColors[2] = b1; - pBaseColors[3] = r2; - pBaseColors[4] = g2; - pBaseColors[5] = b2; -} - -static -void etc_encode_block_helper(const etc1_byte* pIn, etc1_uint32 inMask, - const etc1_byte* pColors, etc_compressed* pCompressed, bool flipped) { - pCompressed->score = ~0; - pCompressed->high = (flipped ? 1 : 0); - pCompressed->low = 0; - - etc1_byte pBaseColors[6]; - - etc_encodeBaseColors(pBaseColors, pColors, pCompressed); - - int originalHigh = pCompressed->high; - - const int* pModifierTable = kModifierTable; - for (int i = 0; i < 8; i++, pModifierTable += 4) { - etc_compressed temp; - temp.score = 0; - temp.high = originalHigh | (i << 5); - temp.low = 0; - etc_encode_subblock_helper(pIn, inMask, &temp, flipped, false, - pBaseColors, pModifierTable); - take_best(pCompressed, &temp); - } - pModifierTable = kModifierTable; - etc_compressed firstHalf = *pCompressed; - for (int i = 0; i < 8; i++, pModifierTable += 4) { - etc_compressed temp; - temp.score = firstHalf.score; - temp.high = firstHalf.high | (i << 2); - temp.low = firstHalf.low; - etc_encode_subblock_helper(pIn, inMask, &temp, flipped, true, - pBaseColors + 3, pModifierTable); - if (i == 0) { - *pCompressed = temp; - } else { - take_best(pCompressed, &temp); - } - } -} - -static void writeBigEndian(etc1_byte* pOut, etc1_uint32 d) { - pOut[0] = (etc1_byte)(d >> 24); - pOut[1] = (etc1_byte)(d >> 16); - pOut[2] = (etc1_byte)(d >> 8); - pOut[3] = (etc1_byte) d; -} - -// Input is a 4 x 4 square of 3-byte pixels in form R, G, B -// inmask is a 16-bit mask where bit (1 << (x + y * 4)) tells whether the corresponding (x,y) -// pixel is valid or not. Invalid pixel color values are ignored when compressing. -// Output is an ETC1 compressed version of the data. - -void etc1_encode_block(const etc1_byte* pIn, etc1_uint32 inMask, - etc1_byte* pOut) { - etc1_byte colors[6]; - etc1_byte flippedColors[6]; - etc_average_colors_subblock(pIn, inMask, colors, false, false); - etc_average_colors_subblock(pIn, inMask, colors + 3, false, true); - etc_average_colors_subblock(pIn, inMask, flippedColors, true, false); - etc_average_colors_subblock(pIn, inMask, flippedColors + 3, true, true); - - etc_compressed a, b; - etc_encode_block_helper(pIn, inMask, colors, &a, false); - etc_encode_block_helper(pIn, inMask, flippedColors, &b, true); - take_best(&a, &b); - writeBigEndian(pOut, a.high); - writeBigEndian(pOut + 4, a.low); -} - -// Return the size of the encoded image data (does not include size of PKM header). - -etc1_uint32 etc1_get_encoded_data_size(etc1_uint32 width, etc1_uint32 height) { - return (((width + 3) & ~3) * ((height + 3) & ~3)) >> 1; -} - -// Encode an entire image. -// pIn - pointer to the image data. Formatted such that the Red component of -// pixel (x,y) is at pIn + pixelSize * x + stride * y + redOffset; -// pOut - pointer to encoded data. Must be large enough to store entire encoded image. - -int etc1_encode_image(const etc1_byte* pIn, etc1_uint32 width, etc1_uint32 height, - etc1_uint32 pixelSize, etc1_uint32 stride, etc1_byte* pOut) { - if (pixelSize < 2 || pixelSize > 3) { - return -1; - } - static const unsigned short kYMask[] = { 0x0, 0xf, 0xff, 0xfff, 0xffff }; - static const unsigned short kXMask[] = { 0x0, 0x1111, 0x3333, 0x7777, - 0xffff }; - etc1_byte block[ETC1_DECODED_BLOCK_SIZE]; - etc1_byte encoded[ETC1_ENCODED_BLOCK_SIZE]; - - etc1_uint32 encodedWidth = (width + 3) & ~3; - etc1_uint32 encodedHeight = (height + 3) & ~3; - - for (etc1_uint32 y = 0; y < encodedHeight; y += 4) { - etc1_uint32 yEnd = height - y; - if (yEnd > 4) { - yEnd = 4; - } - int ymask = kYMask[yEnd]; - for (etc1_uint32 x = 0; x < encodedWidth; x += 4) { - etc1_uint32 xEnd = width - x; - if (xEnd > 4) { - xEnd = 4; - } - int mask = ymask & kXMask[xEnd]; - for (etc1_uint32 cy = 0; cy < yEnd; cy++) { - etc1_byte* q = block + (cy * 4) * 3; - const etc1_byte* p = pIn + pixelSize * x + stride * (y + cy); - if (pixelSize == 3) { - memcpy(q, p, xEnd * 3); - } else { - for (etc1_uint32 cx = 0; cx < xEnd; cx++) { - int pixel = (p[1] << 8) | p[0]; - *q++ = convert5To8(pixel >> 11); - *q++ = convert6To8(pixel >> 5); - *q++ = convert5To8(pixel); - p += pixelSize; - } - } - } - etc1_encode_block(block, mask, encoded); - memcpy(pOut, encoded, sizeof(encoded)); - pOut += sizeof(encoded); - } - } - return 0; -} - -// Decode an entire image. -// pIn - pointer to encoded data. -// pOut - pointer to the image data. Will be written such that the Red component of -// pixel (x,y) is at pIn + pixelSize * x + stride * y + redOffset. Must be -// large enough to store entire image. - - -int etc1_decode_image(const etc1_byte* pIn, etc1_byte* pOut, - etc1_uint32 width, etc1_uint32 height, - etc1_uint32 pixelSize, etc1_uint32 stride) { - if (pixelSize < 2 || pixelSize > 3) { - return -1; - } - etc1_byte block[ETC1_DECODED_BLOCK_SIZE]; - - etc1_uint32 encodedWidth = (width + 3) & ~3; - etc1_uint32 encodedHeight = (height + 3) & ~3; - - for (etc1_uint32 y = 0; y < encodedHeight; y += 4) { - etc1_uint32 yEnd = height - y; - if (yEnd > 4) { - yEnd = 4; - } - for (etc1_uint32 x = 0; x < encodedWidth; x += 4) { - etc1_uint32 xEnd = width - x; - if (xEnd > 4) { - xEnd = 4; - } - etc1_decode_block(pIn, block); - pIn += ETC1_ENCODED_BLOCK_SIZE; - for (etc1_uint32 cy = 0; cy < yEnd; cy++) { - const etc1_byte* q = block + (cy * 4) * 3; - etc1_byte* p = pOut + pixelSize * x + stride * (y + cy); - if (pixelSize == 3) { - memcpy(p, q, xEnd * 3); - } else { - for (etc1_uint32 cx = 0; cx < xEnd; cx++) { - etc1_byte r = *q++; - etc1_byte g = *q++; - etc1_byte b = *q++; - etc1_uint32 pixel = ((r >> 3) << 11) | ((g >> 2) << 5) | (b >> 3); - *p++ = (etc1_byte) pixel; - *p++ = (etc1_byte) (pixel >> 8); - } - } - } - } - } - return 0; -} - -static const char kMagic[] = { 'P', 'K', 'M', ' ', '1', '0' }; - -static const etc1_uint32 ETC1_PKM_FORMAT_OFFSET = 6; -static const etc1_uint32 ETC1_PKM_ENCODED_WIDTH_OFFSET = 8; -static const etc1_uint32 ETC1_PKM_ENCODED_HEIGHT_OFFSET = 10; -static const etc1_uint32 ETC1_PKM_WIDTH_OFFSET = 12; -static const etc1_uint32 ETC1_PKM_HEIGHT_OFFSET = 14; - -static const etc1_uint32 ETC1_RGB_NO_MIPMAPS = 0; - -static void writeBEUint16(etc1_byte* pOut, etc1_uint32 data) { - pOut[0] = (etc1_byte) (data >> 8); - pOut[1] = (etc1_byte) data; -} - -static etc1_uint32 readBEUint16(const etc1_byte* pIn) { - return (pIn[0] << 8) | pIn[1]; -} - -// Format a PKM header - -void etc1_pkm_format_header(etc1_byte* pHeader, etc1_uint32 width, etc1_uint32 height) { - memcpy(pHeader, kMagic, sizeof(kMagic)); - etc1_uint32 encodedWidth = (width + 3) & ~3; - etc1_uint32 encodedHeight = (height + 3) & ~3; - writeBEUint16(pHeader + ETC1_PKM_FORMAT_OFFSET, ETC1_RGB_NO_MIPMAPS); - writeBEUint16(pHeader + ETC1_PKM_ENCODED_WIDTH_OFFSET, encodedWidth); - writeBEUint16(pHeader + ETC1_PKM_ENCODED_HEIGHT_OFFSET, encodedHeight); - writeBEUint16(pHeader + ETC1_PKM_WIDTH_OFFSET, width); - writeBEUint16(pHeader + ETC1_PKM_HEIGHT_OFFSET, height); -} - -// Check if a PKM header is correctly formatted. - -etc1_bool etc1_pkm_is_valid(const etc1_byte* pHeader) { - if (memcmp(pHeader, kMagic, sizeof(kMagic))) { - return false; - } - etc1_uint32 format = readBEUint16(pHeader + ETC1_PKM_FORMAT_OFFSET); - etc1_uint32 encodedWidth = readBEUint16(pHeader + ETC1_PKM_ENCODED_WIDTH_OFFSET); - etc1_uint32 encodedHeight = readBEUint16(pHeader + ETC1_PKM_ENCODED_HEIGHT_OFFSET); - etc1_uint32 width = readBEUint16(pHeader + ETC1_PKM_WIDTH_OFFSET); - etc1_uint32 height = readBEUint16(pHeader + ETC1_PKM_HEIGHT_OFFSET); - return format == ETC1_RGB_NO_MIPMAPS && - encodedWidth >= width && encodedWidth - width < 4 && - encodedHeight >= height && encodedHeight - height < 4; -} - -// Read the image width from a PKM header - -etc1_uint32 etc1_pkm_get_width(const etc1_byte* pHeader) { - return readBEUint16(pHeader + ETC1_PKM_WIDTH_OFFSET); -} - -// Read the image height from a PKM header - -etc1_uint32 etc1_pkm_get_height(const etc1_byte* pHeader){ - return readBEUint16(pHeader + ETC1_PKM_HEIGHT_OFFSET); -} diff --git a/opengl/libs/GLES2/gl2.cpp b/opengl/libs/GLES2/gl2.cpp deleted file mode 100644 index fee4609..0000000 --- a/opengl/libs/GLES2/gl2.cpp +++ /dev/null @@ -1,136 +0,0 @@ -/* - ** Copyright 2007, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#include <ctype.h> -#include <string.h> -#include <errno.h> - -#include <sys/ioctl.h> - -#include <GLES2/gl2.h> -#include <GLES2/gl2ext.h> - -#include <cutils/log.h> -#include <cutils/properties.h> - -#include "hooks.h" -#include "egl_impl.h" - -using namespace android; - -// ---------------------------------------------------------------------------- -// Actual GL entry-points -// ---------------------------------------------------------------------------- - -#undef API_ENTRY -#undef CALL_GL_API -#undef CALL_GL_API_RETURN - -#define DEBUG_CALL_GL_API 0 - -#if USE_FAST_TLS_KEY - - #ifdef HAVE_ARM_TLS_REGISTER - #define GET_TLS(reg) \ - "mrc p15, 0, " #reg ", c13, c0, 3 \n" - #else - #define GET_TLS(reg) \ - "mov " #reg ", #0xFFFF0FFF \n" \ - "ldr " #reg ", [" #reg ", #-15] \n" - #endif - - #define API_ENTRY(_api) __attribute__((naked)) _api - - #define CALL_GL_API(_api, ...) \ - asm volatile( \ - GET_TLS(r12) \ - "ldr r12, [r12, %[tls]] \n" \ - "cmp r12, #0 \n" \ - "ldrne pc, [r12, %[api]] \n" \ - "mov r0, #0 \n" \ - "bx lr \n" \ - : \ - : [tls] "J"(TLS_SLOT_OPENGL_API*4), \ - [api] "J"(__builtin_offsetof(gl_hooks_t, gl._api)) \ - : \ - ); - - #define CALL_GL_API_RETURN(_api, ...) \ - CALL_GL_API(_api, __VA_ARGS__) \ - return 0; // placate gcc's warnings. never reached. - -#else - - #define API_ENTRY(_api) _api - -#if DEBUG_CALL_GL_API - - #define CALL_GL_API(_api, ...) \ - gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \ - _c->_api(__VA_ARGS__); \ - GLenum status = GL_NO_ERROR; \ - while ((status = glGetError()) != GL_NO_ERROR) { \ - LOGD("[" #_api "] 0x%x", status); \ - } - -#else - - #define CALL_GL_API(_api, ...) \ - gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \ - _c->_api(__VA_ARGS__); - -#endif - - #define CALL_GL_API_RETURN(_api, ...) \ - gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \ - return _c->_api(__VA_ARGS__) - -#endif - - -extern "C" { -#include "gl2_api.in" -#include "gl2ext_api.in" -} - -#undef API_ENTRY -#undef CALL_GL_API -#undef CALL_GL_API_RETURN - - -/* - * These GL calls are special because they need to EGL to retrieve some - * informations before they can execute. - */ - -extern "C" void __glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image); -extern "C" void __glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image); - - -void glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image) -{ - GLeglImageOES implImage = - (GLeglImageOES)egl_get_image_for_current_context((EGLImageKHR)image); - __glEGLImageTargetTexture2DOES(target, implImage); -} - -void glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image) -{ - GLeglImageOES implImage = - (GLeglImageOES)egl_get_image_for_current_context((EGLImageKHR)image); - __glEGLImageTargetRenderbufferStorageOES(target, implImage); -} - diff --git a/opengl/libs/GLES2/gl2_api.in b/opengl/libs/GLES2/gl2_api.in deleted file mode 100644 index 5164450..0000000 --- a/opengl/libs/GLES2/gl2_api.in +++ /dev/null @@ -1,426 +0,0 @@ -void API_ENTRY(glActiveTexture)(GLenum texture) { - CALL_GL_API(glActiveTexture, texture); -} -void API_ENTRY(glAttachShader)(GLuint program, GLuint shader) { - CALL_GL_API(glAttachShader, program, shader); -} -void API_ENTRY(glBindAttribLocation)(GLuint program, GLuint index, const GLchar* name) { - CALL_GL_API(glBindAttribLocation, program, index, name); -} -void API_ENTRY(glBindBuffer)(GLenum target, GLuint buffer) { - CALL_GL_API(glBindBuffer, target, buffer); -} -void API_ENTRY(glBindFramebuffer)(GLenum target, GLuint framebuffer) { - CALL_GL_API(glBindFramebuffer, target, framebuffer); -} -void API_ENTRY(glBindRenderbuffer)(GLenum target, GLuint renderbuffer) { - CALL_GL_API(glBindRenderbuffer, target, renderbuffer); -} -void API_ENTRY(glBindTexture)(GLenum target, GLuint texture) { - CALL_GL_API(glBindTexture, target, texture); -} -void API_ENTRY(glBlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { - CALL_GL_API(glBlendColor, red, green, blue, alpha); -} -void API_ENTRY(glBlendEquation)( GLenum mode ) { - CALL_GL_API(glBlendEquation, mode); -} -void API_ENTRY(glBlendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha) { - CALL_GL_API(glBlendEquationSeparate, modeRGB, modeAlpha); -} -void API_ENTRY(glBlendFunc)(GLenum sfactor, GLenum dfactor) { - CALL_GL_API(glBlendFunc, sfactor, dfactor); -} -void API_ENTRY(glBlendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { - CALL_GL_API(glBlendFuncSeparate, srcRGB, dstRGB, srcAlpha, dstAlpha); -} -void API_ENTRY(glBufferData)(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) { - CALL_GL_API(glBufferData, target, size, data, usage); -} -void API_ENTRY(glBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) { - CALL_GL_API(glBufferSubData, target, offset, size, data); -} -GLenum API_ENTRY(glCheckFramebufferStatus)(GLenum target) { - CALL_GL_API_RETURN(glCheckFramebufferStatus, target); -} -void API_ENTRY(glClear)(GLbitfield mask) { - CALL_GL_API(glClear, mask); -} -void API_ENTRY(glClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { - CALL_GL_API(glClearColor, red, green, blue, alpha); -} -void API_ENTRY(glClearDepthf)(GLclampf depth) { - CALL_GL_API(glClearDepthf, depth); -} -void API_ENTRY(glClearStencil)(GLint s) { - CALL_GL_API(glClearStencil, s); -} -void API_ENTRY(glColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { - CALL_GL_API(glColorMask, red, green, blue, alpha); -} -void API_ENTRY(glCompileShader)(GLuint shader) { - CALL_GL_API(glCompileShader, shader); -} -void API_ENTRY(glCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data) { - CALL_GL_API(glCompressedTexImage2D, target, level, internalformat, width, height, border, imageSize, data); -} -void API_ENTRY(glCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data) { - CALL_GL_API(glCompressedTexSubImage2D, target, level, xoffset, yoffset, width, height, format, imageSize, data); -} -void API_ENTRY(glCopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { - CALL_GL_API(glCopyTexImage2D, target, level, internalformat, x, y, width, height, border); -} -void API_ENTRY(glCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { - CALL_GL_API(glCopyTexSubImage2D, target, level, xoffset, yoffset, x, y, width, height); -} -GLuint API_ENTRY(glCreateProgram)(void) { - CALL_GL_API_RETURN(glCreateProgram); -} -GLuint API_ENTRY(glCreateShader)(GLenum type) { - CALL_GL_API_RETURN(glCreateShader, type); -} -void API_ENTRY(glCullFace)(GLenum mode) { - CALL_GL_API(glCullFace, mode); -} -void API_ENTRY(glDeleteBuffers)(GLsizei n, const GLuint* buffers) { - CALL_GL_API(glDeleteBuffers, n, buffers); -} -void API_ENTRY(glDeleteFramebuffers)(GLsizei n, const GLuint* framebuffers) { - CALL_GL_API(glDeleteFramebuffers, n, framebuffers); -} -void API_ENTRY(glDeleteProgram)(GLuint program) { - CALL_GL_API(glDeleteProgram, program); -} -void API_ENTRY(glDeleteRenderbuffers)(GLsizei n, const GLuint* renderbuffers) { - CALL_GL_API(glDeleteRenderbuffers, n, renderbuffers); -} -void API_ENTRY(glDeleteShader)(GLuint shader) { - CALL_GL_API(glDeleteShader, shader); -} -void API_ENTRY(glDeleteTextures)(GLsizei n, const GLuint* textures) { - CALL_GL_API(glDeleteTextures, n, textures); -} -void API_ENTRY(glDepthFunc)(GLenum func) { - CALL_GL_API(glDepthFunc, func); -} -void API_ENTRY(glDepthMask)(GLboolean flag) { - CALL_GL_API(glDepthMask, flag); -} -void API_ENTRY(glDepthRangef)(GLclampf zNear, GLclampf zFar) { - CALL_GL_API(glDepthRangef, zNear, zFar); -} -void API_ENTRY(glDetachShader)(GLuint program, GLuint shader) { - CALL_GL_API(glDetachShader, program, shader); -} -void API_ENTRY(glDisable)(GLenum cap) { - CALL_GL_API(glDisable, cap); -} -void API_ENTRY(glDisableVertexAttribArray)(GLuint index) { - CALL_GL_API(glDisableVertexAttribArray, index); -} -void API_ENTRY(glDrawArrays)(GLenum mode, GLint first, GLsizei count) { - CALL_GL_API(glDrawArrays, mode, first, count); -} -void API_ENTRY(glDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) { - CALL_GL_API(glDrawElements, mode, count, type, indices); -} -void API_ENTRY(glEnable)(GLenum cap) { - CALL_GL_API(glEnable, cap); -} -void API_ENTRY(glEnableVertexAttribArray)(GLuint index) { - CALL_GL_API(glEnableVertexAttribArray, index); -} -void API_ENTRY(glFinish)(void) { - CALL_GL_API(glFinish); -} -void API_ENTRY(glFlush)(void) { - CALL_GL_API(glFlush); -} -void API_ENTRY(glFramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) { - CALL_GL_API(glFramebufferRenderbuffer, target, attachment, renderbuffertarget, renderbuffer); -} -void API_ENTRY(glFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) { - CALL_GL_API(glFramebufferTexture2D, target, attachment, textarget, texture, level); -} -void API_ENTRY(glFrontFace)(GLenum mode) { - CALL_GL_API(glFrontFace, mode); -} -void API_ENTRY(glGenBuffers)(GLsizei n, GLuint* buffers) { - CALL_GL_API(glGenBuffers, n, buffers); -} -void API_ENTRY(glGenerateMipmap)(GLenum target) { - CALL_GL_API(glGenerateMipmap, target); -} -void API_ENTRY(glGenFramebuffers)(GLsizei n, GLuint* framebuffers) { - CALL_GL_API(glGenFramebuffers, n, framebuffers); -} -void API_ENTRY(glGenRenderbuffers)(GLsizei n, GLuint* renderbuffers) { - CALL_GL_API(glGenRenderbuffers, n, renderbuffers); -} -void API_ENTRY(glGenTextures)(GLsizei n, GLuint* textures) { - CALL_GL_API(glGenTextures, n, textures); -} -void API_ENTRY(glGetActiveAttrib)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) { - CALL_GL_API(glGetActiveAttrib, program, index, bufsize, length, size, type, name); -} -void API_ENTRY(glGetActiveUniform)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) { - CALL_GL_API(glGetActiveUniform, program, index, bufsize, length, size, type, name); -} -void API_ENTRY(glGetAttachedShaders)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) { - CALL_GL_API(glGetAttachedShaders, program, maxcount, count, shaders); -} -int API_ENTRY(glGetAttribLocation)(GLuint program, const GLchar* name) { - CALL_GL_API_RETURN(glGetAttribLocation, program, name); -} -void API_ENTRY(glGetBooleanv)(GLenum pname, GLboolean* params) { - CALL_GL_API(glGetBooleanv, pname, params); -} -void API_ENTRY(glGetBufferParameteriv)(GLenum target, GLenum pname, GLint* params) { - CALL_GL_API(glGetBufferParameteriv, target, pname, params); -} -GLenum API_ENTRY(glGetError)(void) { - CALL_GL_API_RETURN(glGetError); -} -void API_ENTRY(glGetFloatv)(GLenum pname, GLfloat* params) { - CALL_GL_API(glGetFloatv, pname, params); -} -void API_ENTRY(glGetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint* params) { - CALL_GL_API(glGetFramebufferAttachmentParameteriv, target, attachment, pname, params); -} -void API_ENTRY(glGetIntegerv)(GLenum pname, GLint* params) { - CALL_GL_API(glGetIntegerv, pname, params); -} -void API_ENTRY(glGetProgramiv)(GLuint program, GLenum pname, GLint* params) { - CALL_GL_API(glGetProgramiv, program, pname, params); -} -void API_ENTRY(glGetProgramInfoLog)(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog) { - CALL_GL_API(glGetProgramInfoLog, program, bufsize, length, infolog); -} -void API_ENTRY(glGetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint* params) { - CALL_GL_API(glGetRenderbufferParameteriv, target, pname, params); -} -void API_ENTRY(glGetShaderiv)(GLuint shader, GLenum pname, GLint* params) { - CALL_GL_API(glGetShaderiv, shader, pname, params); -} -void API_ENTRY(glGetShaderInfoLog)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog) { - CALL_GL_API(glGetShaderInfoLog, shader, bufsize, length, infolog); -} -void API_ENTRY(glGetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) { - CALL_GL_API(glGetShaderPrecisionFormat, shadertype, precisiontype, range, precision); -} -void API_ENTRY(glGetShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) { - CALL_GL_API(glGetShaderSource, shader, bufsize, length, source); -} -const GLubyte* API_ENTRY(glGetString)(GLenum name) { - CALL_GL_API_RETURN(glGetString, name); -} -void API_ENTRY(glGetTexParameterfv)(GLenum target, GLenum pname, GLfloat* params) { - CALL_GL_API(glGetTexParameterfv, target, pname, params); -} -void API_ENTRY(glGetTexParameteriv)(GLenum target, GLenum pname, GLint* params) { - CALL_GL_API(glGetTexParameteriv, target, pname, params); -} -void API_ENTRY(glGetUniformfv)(GLuint program, GLint location, GLfloat* params) { - CALL_GL_API(glGetUniformfv, program, location, params); -} -void API_ENTRY(glGetUniformiv)(GLuint program, GLint location, GLint* params) { - CALL_GL_API(glGetUniformiv, program, location, params); -} -int API_ENTRY(glGetUniformLocation)(GLuint program, const GLchar* name) { - CALL_GL_API_RETURN(glGetUniformLocation, program, name); -} -void API_ENTRY(glGetVertexAttribfv)(GLuint index, GLenum pname, GLfloat* params) { - CALL_GL_API(glGetVertexAttribfv, index, pname, params); -} -void API_ENTRY(glGetVertexAttribiv)(GLuint index, GLenum pname, GLint* params) { - CALL_GL_API(glGetVertexAttribiv, index, pname, params); -} -void API_ENTRY(glGetVertexAttribPointerv)(GLuint index, GLenum pname, GLvoid** pointer) { - CALL_GL_API(glGetVertexAttribPointerv, index, pname, pointer); -} -void API_ENTRY(glHint)(GLenum target, GLenum mode) { - CALL_GL_API(glHint, target, mode); -} -GLboolean API_ENTRY(glIsBuffer)(GLuint buffer) { - CALL_GL_API_RETURN(glIsBuffer, buffer); -} -GLboolean API_ENTRY(glIsEnabled)(GLenum cap) { - CALL_GL_API_RETURN(glIsEnabled, cap); -} -GLboolean API_ENTRY(glIsFramebuffer)(GLuint framebuffer) { - CALL_GL_API_RETURN(glIsFramebuffer, framebuffer); -} -GLboolean API_ENTRY(glIsProgram)(GLuint program) { - CALL_GL_API_RETURN(glIsProgram, program); -} -GLboolean API_ENTRY(glIsRenderbuffer)(GLuint renderbuffer) { - CALL_GL_API_RETURN(glIsRenderbuffer, renderbuffer); -} -GLboolean API_ENTRY(glIsShader)(GLuint shader) { - CALL_GL_API_RETURN(glIsShader, shader); -} -GLboolean API_ENTRY(glIsTexture)(GLuint texture) { - CALL_GL_API_RETURN(glIsTexture, texture); -} -void API_ENTRY(glLineWidth)(GLfloat width) { - CALL_GL_API(glLineWidth, width); -} -void API_ENTRY(glLinkProgram)(GLuint program) { - CALL_GL_API(glLinkProgram, program); -} -void API_ENTRY(glPixelStorei)(GLenum pname, GLint param) { - CALL_GL_API(glPixelStorei, pname, param); -} -void API_ENTRY(glPolygonOffset)(GLfloat factor, GLfloat units) { - CALL_GL_API(glPolygonOffset, factor, units); -} -void API_ENTRY(glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels) { - CALL_GL_API(glReadPixels, x, y, width, height, format, type, pixels); -} -void API_ENTRY(glReleaseShaderCompiler)(void) { - CALL_GL_API(glReleaseShaderCompiler); -} -void API_ENTRY(glRenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { - CALL_GL_API(glRenderbufferStorage, target, internalformat, width, height); -} -void API_ENTRY(glSampleCoverage)(GLclampf value, GLboolean invert) { - CALL_GL_API(glSampleCoverage, value, invert); -} -void API_ENTRY(glScissor)(GLint x, GLint y, GLsizei width, GLsizei height) { - CALL_GL_API(glScissor, x, y, width, height); -} -void API_ENTRY(glShaderBinary)(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length) { - CALL_GL_API(glShaderBinary, n, shaders, binaryformat, binary, length); -} -void API_ENTRY(glShaderSource)(GLuint shader, GLsizei count, const GLchar** string, const GLint* length) { - CALL_GL_API(glShaderSource, shader, count, string, length); -} -void API_ENTRY(glStencilFunc)(GLenum func, GLint ref, GLuint mask) { - CALL_GL_API(glStencilFunc, func, ref, mask); -} -void API_ENTRY(glStencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask) { - CALL_GL_API(glStencilFuncSeparate, face, func, ref, mask); -} -void API_ENTRY(glStencilMask)(GLuint mask) { - CALL_GL_API(glStencilMask, mask); -} -void API_ENTRY(glStencilMaskSeparate)(GLenum face, GLuint mask) { - CALL_GL_API(glStencilMaskSeparate, face, mask); -} -void API_ENTRY(glStencilOp)(GLenum fail, GLenum zfail, GLenum zpass) { - CALL_GL_API(glStencilOp, fail, zfail, zpass); -} -void API_ENTRY(glStencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) { - CALL_GL_API(glStencilOpSeparate, face, fail, zfail, zpass); -} -void API_ENTRY(glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) { - CALL_GL_API(glTexImage2D, target, level, internalformat, width, height, border, format, type, pixels); -} -void API_ENTRY(glTexParameterf)(GLenum target, GLenum pname, GLfloat param) { - CALL_GL_API(glTexParameterf, target, pname, param); -} -void API_ENTRY(glTexParameterfv)(GLenum target, GLenum pname, const GLfloat* params) { - CALL_GL_API(glTexParameterfv, target, pname, params); -} -void API_ENTRY(glTexParameteri)(GLenum target, GLenum pname, GLint param) { - CALL_GL_API(glTexParameteri, target, pname, param); -} -void API_ENTRY(glTexParameteriv)(GLenum target, GLenum pname, const GLint* params) { - CALL_GL_API(glTexParameteriv, target, pname, params); -} -void API_ENTRY(glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels) { - CALL_GL_API(glTexSubImage2D, target, level, xoffset, yoffset, width, height, format, type, pixels); -} -void API_ENTRY(glUniform1f)(GLint location, GLfloat x) { - CALL_GL_API(glUniform1f, location, x); -} -void API_ENTRY(glUniform1fv)(GLint location, GLsizei count, const GLfloat* v) { - CALL_GL_API(glUniform1fv, location, count, v); -} -void API_ENTRY(glUniform1i)(GLint location, GLint x) { - CALL_GL_API(glUniform1i, location, x); -} -void API_ENTRY(glUniform1iv)(GLint location, GLsizei count, const GLint* v) { - CALL_GL_API(glUniform1iv, location, count, v); -} -void API_ENTRY(glUniform2f)(GLint location, GLfloat x, GLfloat y) { - CALL_GL_API(glUniform2f, location, x, y); -} -void API_ENTRY(glUniform2fv)(GLint location, GLsizei count, const GLfloat* v) { - CALL_GL_API(glUniform2fv, location, count, v); -} -void API_ENTRY(glUniform2i)(GLint location, GLint x, GLint y) { - CALL_GL_API(glUniform2i, location, x, y); -} -void API_ENTRY(glUniform2iv)(GLint location, GLsizei count, const GLint* v) { - CALL_GL_API(glUniform2iv, location, count, v); -} -void API_ENTRY(glUniform3f)(GLint location, GLfloat x, GLfloat y, GLfloat z) { - CALL_GL_API(glUniform3f, location, x, y, z); -} -void API_ENTRY(glUniform3fv)(GLint location, GLsizei count, const GLfloat* v) { - CALL_GL_API(glUniform3fv, location, count, v); -} -void API_ENTRY(glUniform3i)(GLint location, GLint x, GLint y, GLint z) { - CALL_GL_API(glUniform3i, location, x, y, z); -} -void API_ENTRY(glUniform3iv)(GLint location, GLsizei count, const GLint* v) { - CALL_GL_API(glUniform3iv, location, count, v); -} -void API_ENTRY(glUniform4f)(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { - CALL_GL_API(glUniform4f, location, x, y, z, w); -} -void API_ENTRY(glUniform4fv)(GLint location, GLsizei count, const GLfloat* v) { - CALL_GL_API(glUniform4fv, location, count, v); -} -void API_ENTRY(glUniform4i)(GLint location, GLint x, GLint y, GLint z, GLint w) { - CALL_GL_API(glUniform4i, location, x, y, z, w); -} -void API_ENTRY(glUniform4iv)(GLint location, GLsizei count, const GLint* v) { - CALL_GL_API(glUniform4iv, location, count, v); -} -void API_ENTRY(glUniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { - CALL_GL_API(glUniformMatrix2fv, location, count, transpose, value); -} -void API_ENTRY(glUniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { - CALL_GL_API(glUniformMatrix3fv, location, count, transpose, value); -} -void API_ENTRY(glUniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { - CALL_GL_API(glUniformMatrix4fv, location, count, transpose, value); -} -void API_ENTRY(glUseProgram)(GLuint program) { - CALL_GL_API(glUseProgram, program); -} -void API_ENTRY(glValidateProgram)(GLuint program) { - CALL_GL_API(glValidateProgram, program); -} -void API_ENTRY(glVertexAttrib1f)(GLuint indx, GLfloat x) { - CALL_GL_API(glVertexAttrib1f, indx, x); -} -void API_ENTRY(glVertexAttrib1fv)(GLuint indx, const GLfloat* values) { - CALL_GL_API(glVertexAttrib1fv, indx, values); -} -void API_ENTRY(glVertexAttrib2f)(GLuint indx, GLfloat x, GLfloat y) { - CALL_GL_API(glVertexAttrib2f, indx, x, y); -} -void API_ENTRY(glVertexAttrib2fv)(GLuint indx, const GLfloat* values) { - CALL_GL_API(glVertexAttrib2fv, indx, values); -} -void API_ENTRY(glVertexAttrib3f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z) { - CALL_GL_API(glVertexAttrib3f, indx, x, y, z); -} -void API_ENTRY(glVertexAttrib3fv)(GLuint indx, const GLfloat* values) { - CALL_GL_API(glVertexAttrib3fv, indx, values); -} -void API_ENTRY(glVertexAttrib4f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { - CALL_GL_API(glVertexAttrib4f, indx, x, y, z, w); -} -void API_ENTRY(glVertexAttrib4fv)(GLuint indx, const GLfloat* values) { - CALL_GL_API(glVertexAttrib4fv, indx, values); -} -void API_ENTRY(glVertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr) { - CALL_GL_API(glVertexAttribPointer, indx, size, type, normalized, stride, ptr); -} -void API_ENTRY(glViewport)(GLint x, GLint y, GLsizei width, GLsizei height) { - CALL_GL_API(glViewport, x, y, width, height); -} diff --git a/opengl/libs/GLES2/gl2ext_api.in b/opengl/libs/GLES2/gl2ext_api.in deleted file mode 100644 index e965625..0000000 --- a/opengl/libs/GLES2/gl2ext_api.in +++ /dev/null @@ -1,180 +0,0 @@ -void API_ENTRY(__glEGLImageTargetTexture2DOES)(GLenum target, GLeglImageOES image) { - CALL_GL_API(glEGLImageTargetTexture2DOES, target, image); -} -void API_ENTRY(__glEGLImageTargetRenderbufferStorageOES)(GLenum target, GLeglImageOES image) { - CALL_GL_API(glEGLImageTargetRenderbufferStorageOES, target, image); -} -void API_ENTRY(glGetProgramBinaryOES)(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary) { - CALL_GL_API(glGetProgramBinaryOES, program, bufSize, length, binaryFormat, binary); -} -void API_ENTRY(glProgramBinaryOES)(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length) { - CALL_GL_API(glProgramBinaryOES, program, binaryFormat, binary, length); -} -void* API_ENTRY(glMapBufferOES)(GLenum target, GLenum access) { - CALL_GL_API_RETURN(glMapBufferOES, target, access); -} -GLboolean API_ENTRY(glUnmapBufferOES)(GLenum target) { - CALL_GL_API_RETURN(glUnmapBufferOES, target); -} -void API_ENTRY(glGetBufferPointervOES)(GLenum target, GLenum pname, GLvoid** params) { - CALL_GL_API(glGetBufferPointervOES, target, pname, params); -} -void API_ENTRY(glTexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels) { - CALL_GL_API(glTexImage3DOES, target, level, internalformat, width, height, depth, border, format, type, pixels); -} -void API_ENTRY(glTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels) { - CALL_GL_API(glTexSubImage3DOES, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); -} -void API_ENTRY(glCopyTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) { - CALL_GL_API(glCopyTexSubImage3DOES, target, level, xoffset, yoffset, zoffset, x, y, width, height); -} -void API_ENTRY(glCompressedTexImage3DOES)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data) { - CALL_GL_API(glCompressedTexImage3DOES, target, level, internalformat, width, height, depth, border, imageSize, data); -} -void API_ENTRY(glCompressedTexSubImage3DOES)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data) { - CALL_GL_API(glCompressedTexSubImage3DOES, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); -} -void API_ENTRY(glFramebufferTexture3DOES)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) { - CALL_GL_API(glFramebufferTexture3DOES, target, attachment, textarget, texture, level, zoffset); -} -void API_ENTRY(glBindVertexArrayOES)(GLuint array) { - CALL_GL_API(glBindVertexArrayOES, array); -} -void API_ENTRY(glDeleteVertexArraysOES)(GLsizei n, const GLuint *arrays) { - CALL_GL_API(glDeleteVertexArraysOES, n, arrays); -} -void API_ENTRY(glGenVertexArraysOES)(GLsizei n, GLuint *arrays) { - CALL_GL_API(glGenVertexArraysOES, n, arrays); -} -GLboolean API_ENTRY(glIsVertexArrayOES)(GLuint array) { - CALL_GL_API_RETURN(glIsVertexArrayOES, array); -} -void API_ENTRY(glGetPerfMonitorGroupsAMD)(GLint *numGroups, GLsizei groupsSize, GLuint *groups) { - CALL_GL_API(glGetPerfMonitorGroupsAMD, numGroups, groupsSize, groups); -} -void API_ENTRY(glGetPerfMonitorCountersAMD)(GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters) { - CALL_GL_API(glGetPerfMonitorCountersAMD, group, numCounters, maxActiveCounters, counterSize, counters); -} -void API_ENTRY(glGetPerfMonitorGroupStringAMD)(GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString) { - CALL_GL_API(glGetPerfMonitorGroupStringAMD, group, bufSize, length, groupString); -} -void API_ENTRY(glGetPerfMonitorCounterStringAMD)(GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString) { - CALL_GL_API(glGetPerfMonitorCounterStringAMD, group, counter, bufSize, length, counterString); -} -void API_ENTRY(glGetPerfMonitorCounterInfoAMD)(GLuint group, GLuint counter, GLenum pname, GLvoid *data) { - CALL_GL_API(glGetPerfMonitorCounterInfoAMD, group, counter, pname, data); -} -void API_ENTRY(glGenPerfMonitorsAMD)(GLsizei n, GLuint *monitors) { - CALL_GL_API(glGenPerfMonitorsAMD, n, monitors); -} -void API_ENTRY(glDeletePerfMonitorsAMD)(GLsizei n, GLuint *monitors) { - CALL_GL_API(glDeletePerfMonitorsAMD, n, monitors); -} -void API_ENTRY(glSelectPerfMonitorCountersAMD)(GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList) { - CALL_GL_API(glSelectPerfMonitorCountersAMD, monitor, enable, group, numCounters, countersList); -} -void API_ENTRY(glBeginPerfMonitorAMD)(GLuint monitor) { - CALL_GL_API(glBeginPerfMonitorAMD, monitor); -} -void API_ENTRY(glEndPerfMonitorAMD)(GLuint monitor) { - CALL_GL_API(glEndPerfMonitorAMD, monitor); -} -void API_ENTRY(glGetPerfMonitorCounterDataAMD)(GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten) { - CALL_GL_API(glGetPerfMonitorCounterDataAMD, monitor, pname, dataSize, data, bytesWritten); -} -void API_ENTRY(glDiscardFramebufferEXT)(GLenum target, GLsizei numAttachments, const GLenum *attachments) { - CALL_GL_API(glDiscardFramebufferEXT, target, numAttachments, attachments); -} -void API_ENTRY(glMultiDrawArraysEXT)(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount) { - CALL_GL_API(glMultiDrawArraysEXT, mode, first, count, primcount); -} -void API_ENTRY(glMultiDrawElementsEXT)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount) { - CALL_GL_API(glMultiDrawElementsEXT, mode, count, type, indices, primcount); -} -void API_ENTRY(glRenderbufferStorageMultisampleIMG)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { - CALL_GL_API(glRenderbufferStorageMultisampleIMG, target, samples, internalformat, width, height); -} -void API_ENTRY(glFramebufferTexture2DMultisampleIMG)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) { - CALL_GL_API(glFramebufferTexture2DMultisampleIMG, target, attachment, textarget, texture, level, samples); -} -void API_ENTRY(glDeleteFencesNV)(GLsizei n, const GLuint *fences) { - CALL_GL_API(glDeleteFencesNV, n, fences); -} -void API_ENTRY(glGenFencesNV)(GLsizei n, GLuint *fences) { - CALL_GL_API(glGenFencesNV, n, fences); -} -GLboolean API_ENTRY(glIsFenceNV)(GLuint fence) { - CALL_GL_API_RETURN(glIsFenceNV, fence); -} -GLboolean API_ENTRY(glTestFenceNV)(GLuint fence) { - CALL_GL_API_RETURN(glTestFenceNV, fence); -} -void API_ENTRY(glGetFenceivNV)(GLuint fence, GLenum pname, GLint *params) { - CALL_GL_API(glGetFenceivNV, fence, pname, params); -} -void API_ENTRY(glFinishFenceNV)(GLuint fence) { - CALL_GL_API(glFinishFenceNV, fence); -} -void API_ENTRY(glSetFenceNV)(GLuint fence, GLenum condition) { - CALL_GL_API(glSetFenceNV, fence, condition); -} -void API_ENTRY(glCoverageMaskNV)(GLboolean mask) { - CALL_GL_API(glCoverageMaskNV, mask); -} -void API_ENTRY(glCoverageOperationNV)(GLenum operation) { - CALL_GL_API(glCoverageOperationNV, operation); -} -void API_ENTRY(glGetDriverControlsQCOM)(GLint *num, GLsizei size, GLuint *driverControls) { - CALL_GL_API(glGetDriverControlsQCOM, num, size, driverControls); -} -void API_ENTRY(glGetDriverControlStringQCOM)(GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString) { - CALL_GL_API(glGetDriverControlStringQCOM, driverControl, bufSize, length, driverControlString); -} -void API_ENTRY(glEnableDriverControlQCOM)(GLuint driverControl) { - CALL_GL_API(glEnableDriverControlQCOM, driverControl); -} -void API_ENTRY(glDisableDriverControlQCOM)(GLuint driverControl) { - CALL_GL_API(glDisableDriverControlQCOM, driverControl); -} -void API_ENTRY(glExtGetTexturesQCOM)(GLuint *textures, GLint maxTextures, GLint *numTextures) { - CALL_GL_API(glExtGetTexturesQCOM, textures, maxTextures, numTextures); -} -void API_ENTRY(glExtGetBuffersQCOM)(GLuint *buffers, GLint maxBuffers, GLint *numBuffers) { - CALL_GL_API(glExtGetBuffersQCOM, buffers, maxBuffers, numBuffers); -} -void API_ENTRY(glExtGetRenderbuffersQCOM)(GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers) { - CALL_GL_API(glExtGetRenderbuffersQCOM, renderbuffers, maxRenderbuffers, numRenderbuffers); -} -void API_ENTRY(glExtGetFramebuffersQCOM)(GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers) { - CALL_GL_API(glExtGetFramebuffersQCOM, framebuffers, maxFramebuffers, numFramebuffers); -} -void API_ENTRY(glExtGetTexLevelParameterivQCOM)(GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params) { - CALL_GL_API(glExtGetTexLevelParameterivQCOM, texture, face, level, pname, params); -} -void API_ENTRY(glExtTexObjectStateOverrideiQCOM)(GLenum target, GLenum pname, GLint param) { - CALL_GL_API(glExtTexObjectStateOverrideiQCOM, target, pname, param); -} -void API_ENTRY(glExtGetTexSubImageQCOM)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels) { - CALL_GL_API(glExtGetTexSubImageQCOM, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels); -} -void API_ENTRY(glExtGetBufferPointervQCOM)(GLenum target, GLvoid **params) { - CALL_GL_API(glExtGetBufferPointervQCOM, target, params); -} -void API_ENTRY(glExtGetShadersQCOM)(GLuint *shaders, GLint maxShaders, GLint *numShaders) { - CALL_GL_API(glExtGetShadersQCOM, shaders, maxShaders, numShaders); -} -void API_ENTRY(glExtGetProgramsQCOM)(GLuint *programs, GLint maxPrograms, GLint *numPrograms) { - CALL_GL_API(glExtGetProgramsQCOM, programs, maxPrograms, numPrograms); -} -GLboolean API_ENTRY(glExtIsProgramBinaryQCOM)(GLuint program) { - CALL_GL_API_RETURN(glExtIsProgramBinaryQCOM, program); -} -void API_ENTRY(glExtGetProgramBinarySourceQCOM)(GLuint program, GLenum shadertype, GLchar *source, GLint *length) { - CALL_GL_API(glExtGetProgramBinarySourceQCOM, program, shadertype, source, length); -} -void API_ENTRY(glStartTilingQCOM)(GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask) { - CALL_GL_API(glStartTilingQCOM, x, y, width, height, preserveMask); -} -void API_ENTRY(glEndTilingQCOM)(GLbitfield preserveMask) { - CALL_GL_API(glEndTilingQCOM, preserveMask); -} diff --git a/opengl/libs/GLES2_dbg/Android.mk b/opengl/libs/GLES2_dbg/Android.mk deleted file mode 100644 index 70853d8..0000000 --- a/opengl/libs/GLES2_dbg/Android.mk +++ /dev/null @@ -1,50 +0,0 @@ -LOCAL_PATH:= $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_SRC_FILES := \ - src/api.cpp \ - src/caller.cpp \ - src/dbgcontext.cpp \ - src/debugger_message.pb.cpp \ - src/egl.cpp \ - src/server.cpp \ - src/vertex.cpp - -LOCAL_C_INCLUDES := \ - $(LOCAL_PATH) \ - $(LOCAL_PATH)/../ \ - external/stlport/stlport \ - external/protobuf/src \ - external \ - bionic - -#LOCAL_CFLAGS += -O0 -g -DDEBUG -UNDEBUG -LOCAL_CFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI -LOCAL_STATIC_LIBRARIES := libprotobuf-cpp-2.3.0-lite liblzf -LOCAL_SHARED_LIBRARIES := libcutils libutils libstlport -ifeq ($(TARGET_ARCH),arm) - LOCAL_CFLAGS += -fstrict-aliasing -endif - -ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) - LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER -endif - -LOCAL_CFLAGS += -DLOG_TAG=\"libGLES2_dbg\" - - -# we need to access the private Bionic header <bionic_tls.h> -# on ARM platforms, we need to mirror the ARCH_ARM_HAVE_TLS_REGISTER -# behavior from the bionic Android.mk file -ifeq ($(TARGET_ARCH)-$(ARCH_ARM_HAVE_TLS_REGISTER),arm-true) - LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER -endif -LOCAL_C_INCLUDES += bionic/libc/private - -LOCAL_MODULE:= libGLESv2_dbg -LOCAL_MODULE_TAGS := optional - -include $(BUILD_SHARED_LIBRARY) - -include $(LOCAL_PATH)/test/Android.mk diff --git a/opengl/libs/GLES2_dbg/generate_api_cpp.py b/opengl/libs/GLES2_dbg/generate_api_cpp.py deleted file mode 100755 index 96cde57..0000000 --- a/opengl/libs/GLES2_dbg/generate_api_cpp.py +++ /dev/null @@ -1,219 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# -# Copyright 2011, The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import os -import sys - -def RemoveAnnotation(line): - if line.find(":") >= 0: - annotation = line[line.find(":"): line.find(" ", line.find(":"))] - return line.replace(annotation, "*") - else: - return line - -def generate_api(lines): - externs = [] - i = 0 - # these have been hand written - skipFunctions = ["glDrawArrays", "glDrawElements"] - - # these have an EXTEND_Debug_* macro for getting data - extendFunctions = ["glCopyTexImage2D", "glCopyTexSubImage2D", "glReadPixels", -"glShaderSource", "glTexImage2D", "glTexSubImage2D"] - - # these also needs to be forwarded to DbgContext - contextFunctions = ["glUseProgram", "glEnableVertexAttribArray", "glDisableVertexAttribArray", -"glVertexAttribPointer", "glBindBuffer", "glBufferData", "glBufferSubData", "glDeleteBuffers",] - - for line in lines: - if line.find("API_ENTRY(") >= 0: # a function prototype - returnType = line[0: line.find(" API_ENTRY(")] - functionName = line[line.find("(") + 1: line.find(")")] #extract GL function name - parameterList = line[line.find(")(") + 2: line.find(") {")] - - #if line.find("*") >= 0: - # extern = "%s Debug_%s(%s);" % (returnType, functionName, parameterList) - # externs.append(extern) - # continue - - if functionName in skipFunctions: - sys.stderr.write("!\n! skipping function '%s'\n!\n" % (functionName)) - continue - - parameters = parameterList.split(',') - paramIndex = 0 - if line.find("*") >= 0 and (line.find("*") < line.find(":") or line.find("*") > line.rfind(":")): # unannotated pointer - if not functionName in extendFunctions: - # add function to list of functions that should be hand written, but generate code anyways - extern = "%s Debug_%s(%s);" % (returnType, functionName, RemoveAnnotation(parameterList)) - sys.stderr.write("%s should be hand written\n" % (extern)) - print "// FIXME: this function has pointers, it should be hand written" - externs.append(extern) - - print "%s Debug_%s(%s)\n{" % (returnType, functionName, RemoveAnnotation(parameterList)) - print " glesv2debugger::Message msg;" - - if parameterList == "void": - parameters = [] - arguments = "" - paramNames = [] - inout = "" - getData = "" - - callerMembers = "" - setCallerMembers = "" - setMsgParameters = "" - - for parameter in parameters: - const = parameter.find("const") - parameter = parameter.replace("const", "") - parameter = parameter.strip() - paramType = parameter.split(' ')[0] - paramName = parameter.split(' ')[1] - annotation = "" - arguments += paramName - if parameter.find(":") >= 0: # has annotation - assert inout == "" # only one parameter should be annotated - sys.stderr.write("%s is annotated: %s \n" % (functionName, paramType)) - inout = paramType.split(":")[2] - annotation = paramType.split(":")[1] - paramType = paramType.split(":")[0] - count = 1 - countArg = "" - if annotation.find("*") >= 0: # [1,n] * param - count = int(annotation.split("*")[0]) - countArg = annotation.split("*")[1] - assert countArg in paramNames - elif annotation in paramNames: - count = 1 - countArg = annotation - elif annotation == "GLstring": - annotation = "strlen(%s)" % (paramName) - else: - count = int(annotation) - - setMsgParameters += " msg.set_arg%d(ToInt(%s));\n" % (paramIndex, paramName) - if paramType.find("void") >= 0: - getData += " msg.mutable_data()->assign(reinterpret_cast<const char *>(%s), %s * sizeof(char));" % (paramName, annotation) - else: - getData += " msg.mutable_data()->assign(reinterpret_cast<const char *>(%s), %s * sizeof(%s));" % (paramName, annotation, paramType) - paramType += "*" - else: - if paramType == "GLfloat" or paramType == "GLclampf" or paramType.find("*") >= 0: - setMsgParameters += " msg.set_arg%d(ToInt(%s));\n" % (paramIndex, paramName) - else: - setMsgParameters += " msg.set_arg%d(%s);\n" % (paramIndex, paramName) - if paramIndex < len(parameters) - 1: - arguments += ', ' - if const >= 0: - paramType = "const " + paramType - paramNames.append(paramName) - paramIndex += 1 - callerMembers += " %s %s;\n" % (paramType, paramName) - setCallerMembers += " caller.%s = %s;\n" % (paramName, paramName) - - print " struct : public FunctionCall {" - print callerMembers - print " const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) {" - if inout in ["out", "inout"]: # get timing excluding output data copy - print " nsecs_t c0 = systemTime(timeMode);" - if returnType == "void": - print " _c->%s(%s);" % (functionName, arguments) - else: - print " const int * ret = reinterpret_cast<const int *>(_c->%s(%s));" % (functionName, arguments) - print " msg.set_ret(ToInt(ret));" - if inout in ["out", "inout"]: - print " msg.set_time((systemTime(timeMode) - c0) * 1e-6f);" - print " " + getData - if functionName in extendFunctions: - print "\ -#ifdef EXTEND_AFTER_CALL_Debug_%s\n\ - EXTEND_AFTER_CALL_Debug_%s;\n\ -#endif" % (functionName, functionName) - if functionName in contextFunctions: - print " getDbgContextThreadSpecific()->%s(%s);" % (functionName, arguments) - if returnType == "void": - print " return 0;" - else: - print " return ret;" - print """ } - } caller;""" - print setCallerMembers - print setMsgParameters - - if line.find("*") >= 0 or line.find(":") >= 0: - print " // FIXME: check for pointer usage" - if inout in ["in", "inout"]: - print getData - if functionName in extendFunctions: - print "\ -#ifdef EXTEND_Debug_%s\n\ - EXTEND_Debug_%s;\n\ -#endif" % (functionName, functionName) - print " int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_%s);"\ - % (functionName) - if returnType != "void": - if returnType == "GLboolean": - print " return static_cast<GLboolean>(reinterpret_cast<int>(ret));" - else: - print " return reinterpret_cast<%s>(ret);" % (returnType) - print "}\n" - - - print "// FIXME: the following functions should be written by hand" - for extern in externs: - print extern - -if __name__ == "__main__": - print """\ -/* - ** Copyright 2011, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -// auto generated by generate_api_cpp.py - -#include <utils/Debug.h> - -#include "src/header.h" -#include "src/api.h" - -template<typename T> static int ToInt(const T & t) -{ - COMPILE_TIME_ASSERT_FUNCTION_SCOPE(sizeof(T) == sizeof(int)); - return (int &)t; -} -""" - lines = open("gl2_api_annotated.in").readlines() - generate_api(lines) - #lines = open("gl2ext_api.in").readlines() - #generate_api(lines) - - diff --git a/opengl/libs/GLES2_dbg/generate_caller_cpp.py b/opengl/libs/GLES2_dbg/generate_caller_cpp.py deleted file mode 100755 index ee4208d..0000000 --- a/opengl/libs/GLES2_dbg/generate_caller_cpp.py +++ /dev/null @@ -1,199 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# -# Copyright 2011, The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import os -import sys - -externs = [] - -def generate_caller(lines): - i = 0 - output = "" - skipFunctions = [] - - for line in lines: - if line.find("API_ENTRY(") >= 0: # a function prototype - returnType = line[0: line.find(" API_ENTRY(")] - functionName = line[line.find("(") + 1: line.find(")")] #extract GL function name - parameterList = line[line.find(")(") + 2: line.find(") {")] - - #if line.find("*") >= 0: - # extern = "%s Debug_%s(%s);" % (returnType, functionName, parameterList) - # externs.append(extern) - # continue - - if functionName in skipFunctions: - sys.stderr.write("!\n! skipping function '%s'\n!\n" % functionName) - continue - output += "\ - case glesv2debugger::Message_Function_%s:\n" % functionName - parameters = parameterList.split(',') - paramIndex = 0 - if line.find("*") >= 0 and (line.find("*") < line.find(":") or line.find("*") > line.rfind(":")): # unannotated pointer - # add function to list of functions that should be hand written, but generate code anyways - externs.append(functionName) - output += "\ - ret = GenerateCall_%s(dbg, cmd, msg, prevRet);\n\ - break;\n" % (functionName) - continue - elif line.find(":out") >= 0 or line.find(":inout") >= 0: - externs.append(functionName) - output += "\ - ret = GenerateCall_%s(dbg, cmd, msg, prevRet);\n\ - break; // annotated output pointers\n" % (functionName) - continue - - if parameterList == "void": - parameters = [] - arguments = "" - paramNames = [] - inout = "" - getData = "" - - callerMembers = "" - - for parameter in parameters: - const = parameter.find("const") - parameter = parameter.replace("const", "") - parameter = parameter.strip() - paramType = parameter.split(' ')[0] - paramName = parameter.split(' ')[1] - annotation = "" - if parameter.find(":") >= 0: # has annotation - assert inout == "" # only one parameter should be annotated - sys.stderr.write("%s is annotated: %s \n" % (functionName, paramType)) - inout = paramType.split(":")[2] - annotation = paramType.split(":")[1] - paramType = paramType.split(":")[0] - count = 1 - countArg = "" - if annotation.find("*") >= 0: # [1,n] * param - count = int(annotation.split("*")[0]) - countArg = annotation.split("*")[1] - assert countArg in paramNames - elif annotation in paramNames: - count = 1 - countArg = annotation - elif annotation == "GLstring": - annotation = "strlen(%s)" % (paramName) - else: - count = int(annotation) - - paramType += "*" - arguments += "reinterpret_cast<%s>(const_cast<char *>(cmd.data().data()))" % (paramType) - elif paramType == "GLboolean": - arguments += "GLboolean(cmd.arg%d())" % (paramIndex) - else: - arguments += "static_cast<%s>(cmd.arg%d())" % (paramType, paramIndex) - - if paramIndex < len(parameters) - 1: - arguments += ", " - if len(arguments) - arguments.rfind("\n") > 60 : - arguments += "\n\ - " - if const >= 0: - paramType = "const " + paramType - paramNames.append(paramName) - paramIndex += 1 - - if returnType == "void": - output += "\ - dbg->hooks->gl.%s(\n\ - %s);\n\ - break;\n" % (functionName, arguments) - else: - output += "\ - msg.set_ret(static_cast<int>(dbg->hooks->gl.%s(\n\ - %s)));\n\ - if (cmd.has_ret())\n\ - ret = reinterpret_cast<int *>(msg.ret());\n\ - break;\n" % (functionName, arguments) - return output - -if __name__ == "__main__": - - lines = open("gl2_api_annotated.in").readlines() - output = generate_caller(lines) - - out = open("src/caller.cpp", "w") - out.write("""\ -/* - ** Copyright 2011, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -// auto generated by generate_caller_cpp.py -// implement declarations in caller.h - -#include "header.h" - -namespace android { - -""") - - for extern in externs: - out.write("\ -static const int * GenerateCall_%s(DbgContext * const dbg,\n\ - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet);\n" % (extern)) - print("\ -static const int * GenerateCall_%s(DbgContext * const dbg,\n\ - const glesv2debugger::Message & cmd,\n\ - glesv2debugger::Message & msg, const int * const prevRet)\n\ -{ assert(0); return prevRet; }\n" % (extern)) - - out.write( -""" -#include "caller.h" - -const int * GenerateCall(DbgContext * const dbg, const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - LOGD("GenerateCall function=%u", cmd.function()); - const int * ret = prevRet; // only some functions have return value - nsecs_t c0 = systemTime(timeMode); - switch (cmd.function()) {""") - - out.write(output) - - out.write("""\ - default: - assert(0); - } - msg.set_time((systemTime(timeMode) - c0) * 1e-6f); - msg.set_context_id(reinterpret_cast<int>(dbg)); - msg.set_function(cmd.function()); - msg.set_type(glesv2debugger::Message_Type_AfterCall); - return ret; -} - -}; // name space android { -""") - - diff --git a/opengl/libs/GLES2_dbg/generate_debug_in.py b/opengl/libs/GLES2_dbg/generate_debug_in.py deleted file mode 100755 index 1280c6f..0000000 --- a/opengl/libs/GLES2_dbg/generate_debug_in.py +++ /dev/null @@ -1,80 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# -# Copyright 2011, The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import os -import sys - -def append_functions(functions, lines): - i = 0 - for line in lines: - if line.find("API_ENTRY(") >= 0: # a function prototype - returnType = line[0: line.find(" API_ENTRY(")] - functionName = line[line.find("(") + 1: line.find(")")] #extract GL function name - parameterList = line[line.find(")(") + 2: line.find(") {")] - - functions.append(functionName) - #print functionName - continue - - parameters = parameterList.split(',') - paramIndex = 0 - if line.find("*") >= 0: - print "// FIXME: this function has pointers, it should be hand written" - externs.append("%s Tracing_%s(%s);" % (returnType, functionName, parameterList)) - print "%s Tracing_%s(%s)\n{" % (returnType, functionName, parameterList) - - if parameterList == "void": - parameters = [] - - arguments = "" - - for parameter in parameters: - parameter = parameter.replace("const", "") - parameter = parameter.strip() - paramType = parameter.split(' ')[0] - paramName = parameter.split(' ')[1] - - paramIndex += 1 - - return functions - - - -if __name__ == "__main__": - definedFunctions = [] - lines = open("gl2_api_annotated.in").readlines() - definedFunctions = append_functions(definedFunctions, lines) - - output = open("../debug.in", "w") - lines = open("../trace.in").readlines() - output.write("// the following functions are not defined in GLESv2_dbg\n") - for line in lines: - functionName = "" - if line.find("TRACE_GL(") >= 0: # a function prototype - functionName = line.split(',')[1].strip() - elif line.find("TRACE_GL_VOID(") >= 0: # a function prototype - functionName = line[line.find("(") + 1: line.find(",")] #extract GL function name - else: - continue - if functionName in definedFunctions: - #print functionName - continue - else: - output.write(line) - diff --git a/opengl/libs/GLES2_dbg/generate_debugger_message_proto.py b/opengl/libs/GLES2_dbg/generate_debugger_message_proto.py deleted file mode 100755 index 535b13e..0000000 --- a/opengl/libs/GLES2_dbg/generate_debugger_message_proto.py +++ /dev/null @@ -1,155 +0,0 @@ -#!/usr/bin/python -# -*- coding: utf-8 -*- - -# -# Copyright 2011, The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import os - -def generate_egl_entries(output, lines, i): - for line in lines: - if line.find("EGL_ENTRY(") >= 0: - line = line.split(",")[1].strip() #extract EGL function name - output.write(" %s = %d;\n" % (line, i)) - i += 1 - return i - - -def generate_gl_entries(output,lines,i): - for line in lines: - if line.find("API_ENTRY(") >= 0: - line = line[line.find("(") + 1: line.find(")")] #extract GL function name - output.write(" %s = %d;\n" % (line, i)) - i += 1 - return i - - -if __name__ == "__main__": - output = open("debugger_message.proto",'w') - output.write("""\ -/* - * Copyright (C) 2011 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// do not edit; auto generated by generate_debugger_message_proto.py - -package com.android.glesv2debugger; - -option optimize_for = LITE_RUNTIME; - -message Message -{ - required int32 context_id = 1; // GL context id - enum Function - { -""") - - i = 0; - - lines = open("gl2_api_annotated.in").readlines() - i = generate_gl_entries(output, lines, i) - output.write(" // end of GL functions\n") - - #lines = open("gl2ext_api.in").readlines() - #i = generate_gl_entries(output, lines, i) - #output.write(" // end of GL EXT functions\n") - - lines = open("../EGL/egl_entries.in").readlines() - i = generate_egl_entries(output, lines, i) - output.write(" // end of GL EXT functions\n") - - output.write(" ACK = %d;\n" % (i)) - i += 1 - - output.write(" NEG = %d;\n" % (i)) - i += 1 - - output.write(" CONTINUE = %d;\n" % (i)) - i += 1 - - output.write(" SKIP = %d;\n" % (i)) - i += 1 - - output.write(" SETPROP = %d;\n" % (i)) - i += 1 - - output.write(""" } - required Function function = 2 [default = NEG]; // type/function of message - enum Type - { - BeforeCall = 0; - AfterCall = 1; - AfterGeneratedCall = 2; - Response = 3; // currently used for misc messages - CompleteCall = 4; // BeforeCall and AfterCall merged - } - required Type type = 3; - required bool expect_response = 4; - optional int32 ret = 5; // return value from previous GL call - optional int32 arg0 = 6; // args to GL call - optional int32 arg1 = 7; - optional int32 arg2 = 8; - optional int32 arg3 = 9; - optional int32 arg4 = 16; - optional int32 arg5 = 17; - optional int32 arg6 = 18; - optional int32 arg7 = 19; // glDrawArrays/Elements sets this to active number of attributes - optional int32 arg8 = 20; - - optional bytes data = 10; // variable length data used for GL call - enum DataType - { - ReferencedImage = 0; // for image sourced from ReadPixels - NonreferencedImage = 1; // for image sourced from ReadPixels - }; - // most data types can be inferred from function - optional DataType data_type = 23; - // these are used for image data when they cannot be determined from args - optional int32 pixel_format = 24; - optional int32 pixel_type = 25; - optional int32 image_width = 26; - optional int32 image_height = 27; - - optional float time = 11; // duration of previous GL call (ms) - enum Prop - { - CaptureDraw = 0; // arg0 = number of glDrawArrays/Elements to glReadPixels - TimeMode = 1; // arg0 = SYSTEM_TIME_* in utils/Timers.h - ExpectResponse = 2; // arg0 = enum Function, arg1 = true/false - CaptureSwap = 3; // arg0 = number of eglSwapBuffers to glReadPixels - GLConstant = 4; // arg0 = GLenum, arg1 = constant; send GL impl. constants - }; - optional Prop prop = 21; // used with SETPROP, value in arg0 - optional float clock = 22; // wall clock in seconds -} -""") - - output.close() - - os.system("aprotoc --cpp_out=src --java_out=../../../../../development/tools/glesv2debugger/src debugger_message.proto") - os.system('mv -f "src/debugger_message.pb.cc" "src/debugger_message.pb.cpp"') diff --git a/opengl/libs/GLES2_dbg/gl2_api_annotated.in b/opengl/libs/GLES2_dbg/gl2_api_annotated.in deleted file mode 100644 index 227e2eb..0000000 --- a/opengl/libs/GLES2_dbg/gl2_api_annotated.in +++ /dev/null @@ -1,426 +0,0 @@ -void API_ENTRY(glActiveTexture)(GLenum texture) { - CALL_GL_API(glActiveTexture, texture); -} -void API_ENTRY(glAttachShader)(GLuint program, GLuint shader) { - CALL_GL_API(glAttachShader, program, shader); -} -void API_ENTRY(glBindAttribLocation)(GLuint program, GLuint index, const GLchar:GLstring:in name) { - CALL_GL_API(glBindAttribLocation, program, index, name); -} -void API_ENTRY(glBindBuffer)(GLenum target, GLuint buffer) { - CALL_GL_API(glBindBuffer, target, buffer); -} -void API_ENTRY(glBindFramebuffer)(GLenum target, GLuint framebuffer) { - CALL_GL_API(glBindFramebuffer, target, framebuffer); -} -void API_ENTRY(glBindRenderbuffer)(GLenum target, GLuint renderbuffer) { - CALL_GL_API(glBindRenderbuffer, target, renderbuffer); -} -void API_ENTRY(glBindTexture)(GLenum target, GLuint texture) { - CALL_GL_API(glBindTexture, target, texture); -} -void API_ENTRY(glBlendColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { - CALL_GL_API(glBlendColor, red, green, blue, alpha); -} -void API_ENTRY(glBlendEquation)( GLenum mode ) { - CALL_GL_API(glBlendEquation, mode); -} -void API_ENTRY(glBlendEquationSeparate)(GLenum modeRGB, GLenum modeAlpha) { - CALL_GL_API(glBlendEquationSeparate, modeRGB, modeAlpha); -} -void API_ENTRY(glBlendFunc)(GLenum sfactor, GLenum dfactor) { - CALL_GL_API(glBlendFunc, sfactor, dfactor); -} -void API_ENTRY(glBlendFuncSeparate)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { - CALL_GL_API(glBlendFuncSeparate, srcRGB, dstRGB, srcAlpha, dstAlpha); -} -void API_ENTRY(glBufferData)(GLenum target, GLsizeiptr size, const GLvoid:size:in data, GLenum usage) { - CALL_GL_API(glBufferData, target, size, data, usage); -} -void API_ENTRY(glBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid:size:in data) { - CALL_GL_API(glBufferSubData, target, offset, size, data); -} -GLenum API_ENTRY(glCheckFramebufferStatus)(GLenum target) { - CALL_GL_API_RETURN(glCheckFramebufferStatus, target); -} -void API_ENTRY(glClear)(GLbitfield mask) { - CALL_GL_API(glClear, mask); -} -void API_ENTRY(glClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { - CALL_GL_API(glClearColor, red, green, blue, alpha); -} -void API_ENTRY(glClearDepthf)(GLclampf depth) { - CALL_GL_API(glClearDepthf, depth); -} -void API_ENTRY(glClearStencil)(GLint s) { - CALL_GL_API(glClearStencil, s); -} -void API_ENTRY(glColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { - CALL_GL_API(glColorMask, red, green, blue, alpha); -} -void API_ENTRY(glCompileShader)(GLuint shader) { - CALL_GL_API(glCompileShader, shader); -} -void API_ENTRY(glCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data) { - CALL_GL_API(glCompressedTexImage2D, target, level, internalformat, width, height, border, imageSize, data); -} -void API_ENTRY(glCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data) { - CALL_GL_API(glCompressedTexSubImage2D, target, level, xoffset, yoffset, width, height, format, imageSize, data); -} -void API_ENTRY(glCopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { - CALL_GL_API(glCopyTexImage2D, target, level, internalformat, x, y, width, height, border); -} -void API_ENTRY(glCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { - CALL_GL_API(glCopyTexSubImage2D, target, level, xoffset, yoffset, x, y, width, height); -} -GLuint API_ENTRY(glCreateProgram)(void) { - CALL_GL_API_RETURN(glCreateProgram); -} -GLuint API_ENTRY(glCreateShader)(GLenum type) { - CALL_GL_API_RETURN(glCreateShader, type); -} -void API_ENTRY(glCullFace)(GLenum mode) { - CALL_GL_API(glCullFace, mode); -} -void API_ENTRY(glDeleteBuffers)(GLsizei n, const GLuint:n:in buffers) { - CALL_GL_API(glDeleteBuffers, n, buffers); -} -void API_ENTRY(glDeleteFramebuffers)(GLsizei n, const GLuint:n:in framebuffers) { - CALL_GL_API(glDeleteFramebuffers, n, framebuffers); -} -void API_ENTRY(glDeleteProgram)(GLuint program) { - CALL_GL_API(glDeleteProgram, program); -} -void API_ENTRY(glDeleteRenderbuffers)(GLsizei n, const GLuint:n:in renderbuffers) { - CALL_GL_API(glDeleteRenderbuffers, n, renderbuffers); -} -void API_ENTRY(glDeleteShader)(GLuint shader) { - CALL_GL_API(glDeleteShader, shader); -} -void API_ENTRY(glDeleteTextures)(GLsizei n, const GLuint:n:in textures) { - CALL_GL_API(glDeleteTextures, n, textures); -} -void API_ENTRY(glDepthFunc)(GLenum func) { - CALL_GL_API(glDepthFunc, func); -} -void API_ENTRY(glDepthMask)(GLboolean flag) { - CALL_GL_API(glDepthMask, flag); -} -void API_ENTRY(glDepthRangef)(GLclampf zNear, GLclampf zFar) { - CALL_GL_API(glDepthRangef, zNear, zFar); -} -void API_ENTRY(glDetachShader)(GLuint program, GLuint shader) { - CALL_GL_API(glDetachShader, program, shader); -} -void API_ENTRY(glDisable)(GLenum cap) { - CALL_GL_API(glDisable, cap); -} -void API_ENTRY(glDisableVertexAttribArray)(GLuint index) { - CALL_GL_API(glDisableVertexAttribArray, index); -} -void API_ENTRY(glDrawArrays)(GLenum mode, GLint first, GLsizei count) { - CALL_GL_API(glDrawArrays, mode, first, count); -} -void API_ENTRY(glDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) { - CALL_GL_API(glDrawElements, mode, count, type, indices); -} -void API_ENTRY(glEnable)(GLenum cap) { - CALL_GL_API(glEnable, cap); -} -void API_ENTRY(glEnableVertexAttribArray)(GLuint index) { - CALL_GL_API(glEnableVertexAttribArray, index); -} -void API_ENTRY(glFinish)(void) { - CALL_GL_API(glFinish); -} -void API_ENTRY(glFlush)(void) { - CALL_GL_API(glFlush); -} -void API_ENTRY(glFramebufferRenderbuffer)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) { - CALL_GL_API(glFramebufferRenderbuffer, target, attachment, renderbuffertarget, renderbuffer); -} -void API_ENTRY(glFramebufferTexture2D)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) { - CALL_GL_API(glFramebufferTexture2D, target, attachment, textarget, texture, level); -} -void API_ENTRY(glFrontFace)(GLenum mode) { - CALL_GL_API(glFrontFace, mode); -} -void API_ENTRY(glGenBuffers)(GLsizei n, GLuint:n:out buffers) { - CALL_GL_API(glGenBuffers, n, buffers); -} -void API_ENTRY(glGenerateMipmap)(GLenum target) { - CALL_GL_API(glGenerateMipmap, target); -} -void API_ENTRY(glGenFramebuffers)(GLsizei n, GLuint:n:out framebuffers) { - CALL_GL_API(glGenFramebuffers, n, framebuffers); -} -void API_ENTRY(glGenRenderbuffers)(GLsizei n, GLuint:n:out renderbuffers) { - CALL_GL_API(glGenRenderbuffers, n, renderbuffers); -} -void API_ENTRY(glGenTextures)(GLsizei n, GLuint:n:out textures) { - CALL_GL_API(glGenTextures, n, textures); -} -void API_ENTRY(glGetActiveAttrib)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar:GLstring:in name) { - CALL_GL_API(glGetActiveAttrib, program, index, bufsize, length, size, type, name); -} -void API_ENTRY(glGetActiveUniform)(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar:GLstring:in name) { - CALL_GL_API(glGetActiveUniform, program, index, bufsize, length, size, type, name); -} -void API_ENTRY(glGetAttachedShaders)(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) { - CALL_GL_API(glGetAttachedShaders, program, maxcount, count, shaders); -} -int API_ENTRY(glGetAttribLocation)(GLuint program, const GLchar:GLstring:in name) { - CALL_GL_API_RETURN(glGetAttribLocation, program, name); -} -void API_ENTRY(glGetBooleanv)(GLenum pname, GLboolean* params) { - CALL_GL_API(glGetBooleanv, pname, params); -} -void API_ENTRY(glGetBufferParameteriv)(GLenum target, GLenum pname, GLint* params) { - CALL_GL_API(glGetBufferParameteriv, target, pname, params); -} -GLenum API_ENTRY(glGetError)(void) { - CALL_GL_API_RETURN(glGetError); -} -void API_ENTRY(glGetFloatv)(GLenum pname, GLfloat* params) { - CALL_GL_API(glGetFloatv, pname, params); -} -void API_ENTRY(glGetFramebufferAttachmentParameteriv)(GLenum target, GLenum attachment, GLenum pname, GLint* params) { - CALL_GL_API(glGetFramebufferAttachmentParameteriv, target, attachment, pname, params); -} -void API_ENTRY(glGetIntegerv)(GLenum pname, GLint* params) { - CALL_GL_API(glGetIntegerv, pname, params); -} -void API_ENTRY(glGetProgramiv)(GLuint program, GLenum pname, GLint:1:out params) { - CALL_GL_API(glGetProgramiv, program, pname, params); -} -void API_ENTRY(glGetProgramInfoLog)(GLuint program, GLsizei bufsize, GLsizei* length, GLchar:GLstring:out infolog) { - CALL_GL_API(glGetProgramInfoLog, program, bufsize, length, infolog); -} -void API_ENTRY(glGetRenderbufferParameteriv)(GLenum target, GLenum pname, GLint* params) { - CALL_GL_API(glGetRenderbufferParameteriv, target, pname, params); -} -void API_ENTRY(glGetShaderiv)(GLuint shader, GLenum pname, GLint:1:out params) { - CALL_GL_API(glGetShaderiv, shader, pname, params); -} -void API_ENTRY(glGetShaderInfoLog)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar:GLstring:out infolog) { - CALL_GL_API(glGetShaderInfoLog, shader, bufsize, length, infolog); -} -void API_ENTRY(glGetShaderPrecisionFormat)(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) { - CALL_GL_API(glGetShaderPrecisionFormat, shadertype, precisiontype, range, precision); -} -void API_ENTRY(glGetShaderSource)(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar:GLstring:out source) { - CALL_GL_API(glGetShaderSource, shader, bufsize, length, source); -} -const GLubyte* API_ENTRY(glGetString)(GLenum name) { - CALL_GL_API_RETURN(glGetString, name); -} -void API_ENTRY(glGetTexParameterfv)(GLenum target, GLenum pname, GLfloat* params) { - CALL_GL_API(glGetTexParameterfv, target, pname, params); -} -void API_ENTRY(glGetTexParameteriv)(GLenum target, GLenum pname, GLint* params) { - CALL_GL_API(glGetTexParameteriv, target, pname, params); -} -void API_ENTRY(glGetUniformfv)(GLuint program, GLint location, GLfloat* params) { - CALL_GL_API(glGetUniformfv, program, location, params); -} -void API_ENTRY(glGetUniformiv)(GLuint program, GLint location, GLint* params) { - CALL_GL_API(glGetUniformiv, program, location, params); -} -int API_ENTRY(glGetUniformLocation)(GLuint program, const GLchar:GLstring:in name) { - CALL_GL_API_RETURN(glGetUniformLocation, program, name); -} -void API_ENTRY(glGetVertexAttribfv)(GLuint index, GLenum pname, GLfloat* params) { - CALL_GL_API(glGetVertexAttribfv, index, pname, params); -} -void API_ENTRY(glGetVertexAttribiv)(GLuint index, GLenum pname, GLint* params) { - CALL_GL_API(glGetVertexAttribiv, index, pname, params); -} -void API_ENTRY(glGetVertexAttribPointerv)(GLuint index, GLenum pname, GLvoid** pointer) { - CALL_GL_API(glGetVertexAttribPointerv, index, pname, pointer); -} -void API_ENTRY(glHint)(GLenum target, GLenum mode) { - CALL_GL_API(glHint, target, mode); -} -GLboolean API_ENTRY(glIsBuffer)(GLuint buffer) { - CALL_GL_API_RETURN(glIsBuffer, buffer); -} -GLboolean API_ENTRY(glIsEnabled)(GLenum cap) { - CALL_GL_API_RETURN(glIsEnabled, cap); -} -GLboolean API_ENTRY(glIsFramebuffer)(GLuint framebuffer) { - CALL_GL_API_RETURN(glIsFramebuffer, framebuffer); -} -GLboolean API_ENTRY(glIsProgram)(GLuint program) { - CALL_GL_API_RETURN(glIsProgram, program); -} -GLboolean API_ENTRY(glIsRenderbuffer)(GLuint renderbuffer) { - CALL_GL_API_RETURN(glIsRenderbuffer, renderbuffer); -} -GLboolean API_ENTRY(glIsShader)(GLuint shader) { - CALL_GL_API_RETURN(glIsShader, shader); -} -GLboolean API_ENTRY(glIsTexture)(GLuint texture) { - CALL_GL_API_RETURN(glIsTexture, texture); -} -void API_ENTRY(glLineWidth)(GLfloat width) { - CALL_GL_API(glLineWidth, width); -} -void API_ENTRY(glLinkProgram)(GLuint program) { - CALL_GL_API(glLinkProgram, program); -} -void API_ENTRY(glPixelStorei)(GLenum pname, GLint param) { - CALL_GL_API(glPixelStorei, pname, param); -} -void API_ENTRY(glPolygonOffset)(GLfloat factor, GLfloat units) { - CALL_GL_API(glPolygonOffset, factor, units); -} -void API_ENTRY(glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels) { - CALL_GL_API(glReadPixels, x, y, width, height, format, type, pixels); -} -void API_ENTRY(glReleaseShaderCompiler)(void) { - CALL_GL_API(glReleaseShaderCompiler); -} -void API_ENTRY(glRenderbufferStorage)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { - CALL_GL_API(glRenderbufferStorage, target, internalformat, width, height); -} -void API_ENTRY(glSampleCoverage)(GLclampf value, GLboolean invert) { - CALL_GL_API(glSampleCoverage, value, invert); -} -void API_ENTRY(glScissor)(GLint x, GLint y, GLsizei width, GLsizei height) { - CALL_GL_API(glScissor, x, y, width, height); -} -void API_ENTRY(glShaderBinary)(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length) { - CALL_GL_API(glShaderBinary, n, shaders, binaryformat, binary, length); -} -void API_ENTRY(glShaderSource)(GLuint shader, GLsizei count, const GLchar** string, const GLint* length) { - CALL_GL_API(glShaderSource, shader, count, string, length); -} -void API_ENTRY(glStencilFunc)(GLenum func, GLint ref, GLuint mask) { - CALL_GL_API(glStencilFunc, func, ref, mask); -} -void API_ENTRY(glStencilFuncSeparate)(GLenum face, GLenum func, GLint ref, GLuint mask) { - CALL_GL_API(glStencilFuncSeparate, face, func, ref, mask); -} -void API_ENTRY(glStencilMask)(GLuint mask) { - CALL_GL_API(glStencilMask, mask); -} -void API_ENTRY(glStencilMaskSeparate)(GLenum face, GLuint mask) { - CALL_GL_API(glStencilMaskSeparate, face, mask); -} -void API_ENTRY(glStencilOp)(GLenum fail, GLenum zfail, GLenum zpass) { - CALL_GL_API(glStencilOp, fail, zfail, zpass); -} -void API_ENTRY(glStencilOpSeparate)(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) { - CALL_GL_API(glStencilOpSeparate, face, fail, zfail, zpass); -} -void API_ENTRY(glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) { - CALL_GL_API(glTexImage2D, target, level, internalformat, width, height, border, format, type, pixels); -} -void API_ENTRY(glTexParameterf)(GLenum target, GLenum pname, GLfloat param) { - CALL_GL_API(glTexParameterf, target, pname, param); -} -void API_ENTRY(glTexParameterfv)(GLenum target, GLenum pname, const GLfloat* params) { - CALL_GL_API(glTexParameterfv, target, pname, params); -} -void API_ENTRY(glTexParameteri)(GLenum target, GLenum pname, GLint param) { - CALL_GL_API(glTexParameteri, target, pname, param); -} -void API_ENTRY(glTexParameteriv)(GLenum target, GLenum pname, const GLint* params) { - CALL_GL_API(glTexParameteriv, target, pname, params); -} -void API_ENTRY(glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels) { - CALL_GL_API(glTexSubImage2D, target, level, xoffset, yoffset, width, height, format, type, pixels); -} -void API_ENTRY(glUniform1f)(GLint location, GLfloat x) { - CALL_GL_API(glUniform1f, location, x); -} -void API_ENTRY(glUniform1fv)(GLint location, GLsizei count, const GLfloat:1*count:in v) { - CALL_GL_API(glUniform1fv, location, count, v); -} -void API_ENTRY(glUniform1i)(GLint location, GLint x) { - CALL_GL_API(glUniform1i, location, x); -} -void API_ENTRY(glUniform1iv)(GLint location, GLsizei count, const GLint:1*count:in v) { - CALL_GL_API(glUniform1iv, location, count, v); -} -void API_ENTRY(glUniform2f)(GLint location, GLfloat x, GLfloat y) { - CALL_GL_API(glUniform2f, location, x, y); -} -void API_ENTRY(glUniform2fv)(GLint location, GLsizei count, const GLfloat:2*count:in v) { - CALL_GL_API(glUniform2fv, location, count, v); -} -void API_ENTRY(glUniform2i)(GLint location, GLint x, GLint y) { - CALL_GL_API(glUniform2i, location, x, y); -} -void API_ENTRY(glUniform2iv)(GLint location, GLsizei count, const GLint:2*count:in v) { - CALL_GL_API(glUniform2iv, location, count, v); -} -void API_ENTRY(glUniform3f)(GLint location, GLfloat x, GLfloat y, GLfloat z) { - CALL_GL_API(glUniform3f, location, x, y, z); -} -void API_ENTRY(glUniform3fv)(GLint location, GLsizei count, const GLfloat:3*count:in v) { - CALL_GL_API(glUniform3fv, location, count, v); -} -void API_ENTRY(glUniform3i)(GLint location, GLint x, GLint y, GLint z) { - CALL_GL_API(glUniform3i, location, x, y, z); -} -void API_ENTRY(glUniform3iv)(GLint location, GLsizei count, const GLint:3*count:in v) { - CALL_GL_API(glUniform3iv, location, count, v); -} -void API_ENTRY(glUniform4f)(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { - CALL_GL_API(glUniform4f, location, x, y, z, w); -} -void API_ENTRY(glUniform4fv)(GLint location, GLsizei count, const GLfloat:4*count:in v) { - CALL_GL_API(glUniform4fv, location, count, v); -} -void API_ENTRY(glUniform4i)(GLint location, GLint x, GLint y, GLint z, GLint w) { - CALL_GL_API(glUniform4i, location, x, y, z, w); -} -void API_ENTRY(glUniform4iv)(GLint location, GLsizei count, const GLint:4*count:in v) { - CALL_GL_API(glUniform4iv, location, count, v); -} -void API_ENTRY(glUniformMatrix2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat:4*count:in value) { - CALL_GL_API(glUniformMatrix2fv, location, count, transpose, value); -} -void API_ENTRY(glUniformMatrix3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat:9*count:in value) { - CALL_GL_API(glUniformMatrix3fv, location, count, transpose, value); -} -void API_ENTRY(glUniformMatrix4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat:16*count:in value) { - CALL_GL_API(glUniformMatrix4fv, location, count, transpose, value); -} -void API_ENTRY(glUseProgram)(GLuint program) { - CALL_GL_API(glUseProgram, program); -} -void API_ENTRY(glValidateProgram)(GLuint program) { - CALL_GL_API(glValidateProgram, program); -} -void API_ENTRY(glVertexAttrib1f)(GLuint indx, GLfloat x) { - CALL_GL_API(glVertexAttrib1f, indx, x); -} -void API_ENTRY(glVertexAttrib1fv)(GLuint indx, const GLfloat:1:in values) { - CALL_GL_API(glVertexAttrib1fv, indx, values); -} -void API_ENTRY(glVertexAttrib2f)(GLuint indx, GLfloat x, GLfloat y) { - CALL_GL_API(glVertexAttrib2f, indx, x, y); -} -void API_ENTRY(glVertexAttrib2fv)(GLuint indx, const GLfloat:2:in values) { - CALL_GL_API(glVertexAttrib2fv, indx, values); -} -void API_ENTRY(glVertexAttrib3f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z) { - CALL_GL_API(glVertexAttrib3f, indx, x, y, z); -} -void API_ENTRY(glVertexAttrib3fv)(GLuint indx, const GLfloat:3:in values) { - CALL_GL_API(glVertexAttrib3fv, indx, values); -} -void API_ENTRY(glVertexAttrib4f)(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) { - CALL_GL_API(glVertexAttrib4f, indx, x, y, z, w); -} -void API_ENTRY(glVertexAttrib4fv)(GLuint indx, const GLfloat:4:in values) { - CALL_GL_API(glVertexAttrib4fv, indx, values); -} -void API_ENTRY(glVertexAttribPointer)(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr) { - CALL_GL_API(glVertexAttribPointer, indx, size, type, normalized, stride, ptr); -} -void API_ENTRY(glViewport)(GLint x, GLint y, GLsizei width, GLsizei height) { - CALL_GL_API(glViewport, x, y, width, height); -} diff --git a/opengl/libs/GLES2_dbg/src/api.cpp b/opengl/libs/GLES2_dbg/src/api.cpp deleted file mode 100644 index c483547..0000000 --- a/opengl/libs/GLES2_dbg/src/api.cpp +++ /dev/null @@ -1,3540 +0,0 @@ -/* - ** Copyright 2011, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -// auto generated by generate_api_cpp.py - -#include <utils/Debug.h> - -#include "src/header.h" -#include "src/api.h" - -template<typename T> static int ToInt(const T & t) -{ - COMPILE_TIME_ASSERT_FUNCTION_SCOPE(sizeof(T) == sizeof(int)); - return (int &)t; -} - -void Debug_glActiveTexture(GLenum texture) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum texture; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glActiveTexture(texture); - return 0; - } - } caller; - caller.texture = texture; - - msg.set_arg0(texture); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glActiveTexture); -} - -void Debug_glAttachShader(GLuint program, GLuint shader) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint program; - GLuint shader; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glAttachShader(program, shader); - return 0; - } - } caller; - caller.program = program; - caller.shader = shader; - - msg.set_arg0(program); - msg.set_arg1(shader); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glAttachShader); -} - -void Debug_glBindAttribLocation(GLuint program, GLuint index, const GLchar* name) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint program; - GLuint index; - const GLchar* name; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glBindAttribLocation(program, index, name); - return 0; - } - } caller; - caller.program = program; - caller.index = index; - caller.name = name; - - msg.set_arg0(program); - msg.set_arg1(index); - msg.set_arg2(ToInt(name)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(name), strlen(name) * sizeof(GLchar)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBindAttribLocation); -} - -void Debug_glBindBuffer(GLenum target, GLuint buffer) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLuint buffer; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glBindBuffer(target, buffer); - getDbgContextThreadSpecific()->glBindBuffer(target, buffer); - return 0; - } - } caller; - caller.target = target; - caller.buffer = buffer; - - msg.set_arg0(target); - msg.set_arg1(buffer); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBindBuffer); -} - -void Debug_glBindFramebuffer(GLenum target, GLuint framebuffer) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLuint framebuffer; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glBindFramebuffer(target, framebuffer); - return 0; - } - } caller; - caller.target = target; - caller.framebuffer = framebuffer; - - msg.set_arg0(target); - msg.set_arg1(framebuffer); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBindFramebuffer); -} - -void Debug_glBindRenderbuffer(GLenum target, GLuint renderbuffer) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLuint renderbuffer; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glBindRenderbuffer(target, renderbuffer); - return 0; - } - } caller; - caller.target = target; - caller.renderbuffer = renderbuffer; - - msg.set_arg0(target); - msg.set_arg1(renderbuffer); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBindRenderbuffer); -} - -void Debug_glBindTexture(GLenum target, GLuint texture) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLuint texture; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glBindTexture(target, texture); - return 0; - } - } caller; - caller.target = target; - caller.texture = texture; - - msg.set_arg0(target); - msg.set_arg1(texture); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBindTexture); -} - -void Debug_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLclampf red; - GLclampf green; - GLclampf blue; - GLclampf alpha; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glBlendColor(red, green, blue, alpha); - return 0; - } - } caller; - caller.red = red; - caller.green = green; - caller.blue = blue; - caller.alpha = alpha; - - msg.set_arg0(ToInt(red)); - msg.set_arg1(ToInt(green)); - msg.set_arg2(ToInt(blue)); - msg.set_arg3(ToInt(alpha)); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBlendColor); -} - -void Debug_glBlendEquation( GLenum mode ) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum mode; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glBlendEquation(mode); - return 0; - } - } caller; - caller.mode = mode; - - msg.set_arg0(mode); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBlendEquation); -} - -void Debug_glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum modeRGB; - GLenum modeAlpha; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glBlendEquationSeparate(modeRGB, modeAlpha); - return 0; - } - } caller; - caller.modeRGB = modeRGB; - caller.modeAlpha = modeAlpha; - - msg.set_arg0(modeRGB); - msg.set_arg1(modeAlpha); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBlendEquationSeparate); -} - -void Debug_glBlendFunc(GLenum sfactor, GLenum dfactor) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum sfactor; - GLenum dfactor; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glBlendFunc(sfactor, dfactor); - return 0; - } - } caller; - caller.sfactor = sfactor; - caller.dfactor = dfactor; - - msg.set_arg0(sfactor); - msg.set_arg1(dfactor); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBlendFunc); -} - -void Debug_glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum srcRGB; - GLenum dstRGB; - GLenum srcAlpha; - GLenum dstAlpha; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); - return 0; - } - } caller; - caller.srcRGB = srcRGB; - caller.dstRGB = dstRGB; - caller.srcAlpha = srcAlpha; - caller.dstAlpha = dstAlpha; - - msg.set_arg0(srcRGB); - msg.set_arg1(dstRGB); - msg.set_arg2(srcAlpha); - msg.set_arg3(dstAlpha); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBlendFuncSeparate); -} - -void Debug_glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLsizeiptr size; - const GLvoid* data; - GLenum usage; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glBufferData(target, size, data, usage); - getDbgContextThreadSpecific()->glBufferData(target, size, data, usage); - return 0; - } - } caller; - caller.target = target; - caller.size = size; - caller.data = data; - caller.usage = usage; - - msg.set_arg0(target); - msg.set_arg1(size); - msg.set_arg2(ToInt(data)); - msg.set_arg3(usage); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(data), size * sizeof(char)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBufferData); -} - -void Debug_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLintptr offset; - GLsizeiptr size; - const GLvoid* data; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glBufferSubData(target, offset, size, data); - getDbgContextThreadSpecific()->glBufferSubData(target, offset, size, data); - return 0; - } - } caller; - caller.target = target; - caller.offset = offset; - caller.size = size; - caller.data = data; - - msg.set_arg0(target); - msg.set_arg1(offset); - msg.set_arg2(size); - msg.set_arg3(ToInt(data)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(data), size * sizeof(char)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glBufferSubData); -} - -GLenum Debug_glCheckFramebufferStatus(GLenum target) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - const int * ret = reinterpret_cast<const int *>(_c->glCheckFramebufferStatus(target)); - msg.set_ret(ToInt(ret)); - return ret; - } - } caller; - caller.target = target; - - msg.set_arg0(target); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glCheckFramebufferStatus); - return reinterpret_cast<GLenum>(ret); -} - -void Debug_glClear(GLbitfield mask) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLbitfield mask; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glClear(mask); - return 0; - } - } caller; - caller.mask = mask; - - msg.set_arg0(mask); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glClear); -} - -void Debug_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLclampf red; - GLclampf green; - GLclampf blue; - GLclampf alpha; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glClearColor(red, green, blue, alpha); - return 0; - } - } caller; - caller.red = red; - caller.green = green; - caller.blue = blue; - caller.alpha = alpha; - - msg.set_arg0(ToInt(red)); - msg.set_arg1(ToInt(green)); - msg.set_arg2(ToInt(blue)); - msg.set_arg3(ToInt(alpha)); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glClearColor); -} - -void Debug_glClearDepthf(GLclampf depth) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLclampf depth; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glClearDepthf(depth); - return 0; - } - } caller; - caller.depth = depth; - - msg.set_arg0(ToInt(depth)); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glClearDepthf); -} - -void Debug_glClearStencil(GLint s) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint s; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glClearStencil(s); - return 0; - } - } caller; - caller.s = s; - - msg.set_arg0(s); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glClearStencil); -} - -void Debug_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLboolean red; - GLboolean green; - GLboolean blue; - GLboolean alpha; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glColorMask(red, green, blue, alpha); - return 0; - } - } caller; - caller.red = red; - caller.green = green; - caller.blue = blue; - caller.alpha = alpha; - - msg.set_arg0(red); - msg.set_arg1(green); - msg.set_arg2(blue); - msg.set_arg3(alpha); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glColorMask); -} - -void Debug_glCompileShader(GLuint shader) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint shader; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glCompileShader(shader); - return 0; - } - } caller; - caller.shader = shader; - - msg.set_arg0(shader); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glCompileShader); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLint level; - GLenum internalformat; - GLsizei width; - GLsizei height; - GLint border; - GLsizei imageSize; - const GLvoid* data; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); - return 0; - } - } caller; - caller.target = target; - caller.level = level; - caller.internalformat = internalformat; - caller.width = width; - caller.height = height; - caller.border = border; - caller.imageSize = imageSize; - caller.data = data; - - msg.set_arg0(target); - msg.set_arg1(level); - msg.set_arg2(internalformat); - msg.set_arg3(width); - msg.set_arg4(height); - msg.set_arg5(border); - msg.set_arg6(imageSize); - msg.set_arg7(ToInt(data)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glCompressedTexImage2D); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLint level; - GLint xoffset; - GLint yoffset; - GLsizei width; - GLsizei height; - GLenum format; - GLsizei imageSize; - const GLvoid* data; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); - return 0; - } - } caller; - caller.target = target; - caller.level = level; - caller.xoffset = xoffset; - caller.yoffset = yoffset; - caller.width = width; - caller.height = height; - caller.format = format; - caller.imageSize = imageSize; - caller.data = data; - - msg.set_arg0(target); - msg.set_arg1(level); - msg.set_arg2(xoffset); - msg.set_arg3(yoffset); - msg.set_arg4(width); - msg.set_arg5(height); - msg.set_arg6(format); - msg.set_arg7(imageSize); - msg.set_arg8(ToInt(data)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glCompressedTexSubImage2D); -} - -void Debug_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLint level; - GLenum internalformat; - GLint x; - GLint y; - GLsizei width; - GLsizei height; - GLint border; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glCopyTexImage2D(target, level, internalformat, x, y, width, height, border); -#ifdef EXTEND_AFTER_CALL_Debug_glCopyTexImage2D - EXTEND_AFTER_CALL_Debug_glCopyTexImage2D; -#endif - return 0; - } - } caller; - caller.target = target; - caller.level = level; - caller.internalformat = internalformat; - caller.x = x; - caller.y = y; - caller.width = width; - caller.height = height; - caller.border = border; - - msg.set_arg0(target); - msg.set_arg1(level); - msg.set_arg2(internalformat); - msg.set_arg3(x); - msg.set_arg4(y); - msg.set_arg5(width); - msg.set_arg6(height); - msg.set_arg7(border); - -#ifdef EXTEND_Debug_glCopyTexImage2D - EXTEND_Debug_glCopyTexImage2D; -#endif - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glCopyTexImage2D); -} - -void Debug_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLint level; - GLint xoffset; - GLint yoffset; - GLint x; - GLint y; - GLsizei width; - GLsizei height; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); -#ifdef EXTEND_AFTER_CALL_Debug_glCopyTexSubImage2D - EXTEND_AFTER_CALL_Debug_glCopyTexSubImage2D; -#endif - return 0; - } - } caller; - caller.target = target; - caller.level = level; - caller.xoffset = xoffset; - caller.yoffset = yoffset; - caller.x = x; - caller.y = y; - caller.width = width; - caller.height = height; - - msg.set_arg0(target); - msg.set_arg1(level); - msg.set_arg2(xoffset); - msg.set_arg3(yoffset); - msg.set_arg4(x); - msg.set_arg5(y); - msg.set_arg6(width); - msg.set_arg7(height); - -#ifdef EXTEND_Debug_glCopyTexSubImage2D - EXTEND_Debug_glCopyTexSubImage2D; -#endif - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glCopyTexSubImage2D); -} - -GLuint Debug_glCreateProgram(void) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - const int * ret = reinterpret_cast<const int *>(_c->glCreateProgram()); - msg.set_ret(ToInt(ret)); - return ret; - } - } caller; - - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glCreateProgram); - return reinterpret_cast<GLuint>(ret); -} - -GLuint Debug_glCreateShader(GLenum type) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum type; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - const int * ret = reinterpret_cast<const int *>(_c->glCreateShader(type)); - msg.set_ret(ToInt(ret)); - return ret; - } - } caller; - caller.type = type; - - msg.set_arg0(type); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glCreateShader); - return reinterpret_cast<GLuint>(ret); -} - -void Debug_glCullFace(GLenum mode) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum mode; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glCullFace(mode); - return 0; - } - } caller; - caller.mode = mode; - - msg.set_arg0(mode); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glCullFace); -} - -void Debug_glDeleteBuffers(GLsizei n, const GLuint* buffers) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLsizei n; - const GLuint* buffers; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glDeleteBuffers(n, buffers); - getDbgContextThreadSpecific()->glDeleteBuffers(n, buffers); - return 0; - } - } caller; - caller.n = n; - caller.buffers = buffers; - - msg.set_arg0(n); - msg.set_arg1(ToInt(buffers)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(buffers), n * sizeof(GLuint)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDeleteBuffers); -} - -void Debug_glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLsizei n; - const GLuint* framebuffers; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glDeleteFramebuffers(n, framebuffers); - return 0; - } - } caller; - caller.n = n; - caller.framebuffers = framebuffers; - - msg.set_arg0(n); - msg.set_arg1(ToInt(framebuffers)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(framebuffers), n * sizeof(GLuint)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDeleteFramebuffers); -} - -void Debug_glDeleteProgram(GLuint program) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint program; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glDeleteProgram(program); - return 0; - } - } caller; - caller.program = program; - - msg.set_arg0(program); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDeleteProgram); -} - -void Debug_glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLsizei n; - const GLuint* renderbuffers; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glDeleteRenderbuffers(n, renderbuffers); - return 0; - } - } caller; - caller.n = n; - caller.renderbuffers = renderbuffers; - - msg.set_arg0(n); - msg.set_arg1(ToInt(renderbuffers)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(renderbuffers), n * sizeof(GLuint)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDeleteRenderbuffers); -} - -void Debug_glDeleteShader(GLuint shader) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint shader; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glDeleteShader(shader); - return 0; - } - } caller; - caller.shader = shader; - - msg.set_arg0(shader); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDeleteShader); -} - -void Debug_glDeleteTextures(GLsizei n, const GLuint* textures) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLsizei n; - const GLuint* textures; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glDeleteTextures(n, textures); - return 0; - } - } caller; - caller.n = n; - caller.textures = textures; - - msg.set_arg0(n); - msg.set_arg1(ToInt(textures)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(textures), n * sizeof(GLuint)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDeleteTextures); -} - -void Debug_glDepthFunc(GLenum func) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum func; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glDepthFunc(func); - return 0; - } - } caller; - caller.func = func; - - msg.set_arg0(func); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDepthFunc); -} - -void Debug_glDepthMask(GLboolean flag) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLboolean flag; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glDepthMask(flag); - return 0; - } - } caller; - caller.flag = flag; - - msg.set_arg0(flag); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDepthMask); -} - -void Debug_glDepthRangef(GLclampf zNear, GLclampf zFar) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLclampf zNear; - GLclampf zFar; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glDepthRangef(zNear, zFar); - return 0; - } - } caller; - caller.zNear = zNear; - caller.zFar = zFar; - - msg.set_arg0(ToInt(zNear)); - msg.set_arg1(ToInt(zFar)); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDepthRangef); -} - -void Debug_glDetachShader(GLuint program, GLuint shader) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint program; - GLuint shader; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glDetachShader(program, shader); - return 0; - } - } caller; - caller.program = program; - caller.shader = shader; - - msg.set_arg0(program); - msg.set_arg1(shader); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDetachShader); -} - -void Debug_glDisable(GLenum cap) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum cap; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glDisable(cap); - return 0; - } - } caller; - caller.cap = cap; - - msg.set_arg0(cap); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDisable); -} - -void Debug_glDisableVertexAttribArray(GLuint index) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint index; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glDisableVertexAttribArray(index); - getDbgContextThreadSpecific()->glDisableVertexAttribArray(index); - return 0; - } - } caller; - caller.index = index; - - msg.set_arg0(index); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glDisableVertexAttribArray); -} - -void Debug_glEnable(GLenum cap) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum cap; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glEnable(cap); - return 0; - } - } caller; - caller.cap = cap; - - msg.set_arg0(cap); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glEnable); -} - -void Debug_glEnableVertexAttribArray(GLuint index) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint index; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glEnableVertexAttribArray(index); - getDbgContextThreadSpecific()->glEnableVertexAttribArray(index); - return 0; - } - } caller; - caller.index = index; - - msg.set_arg0(index); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glEnableVertexAttribArray); -} - -void Debug_glFinish(void) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glFinish(); - return 0; - } - } caller; - - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glFinish); -} - -void Debug_glFlush(void) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glFlush(); - return 0; - } - } caller; - - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glFlush); -} - -void Debug_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLenum attachment; - GLenum renderbuffertarget; - GLuint renderbuffer; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); - return 0; - } - } caller; - caller.target = target; - caller.attachment = attachment; - caller.renderbuffertarget = renderbuffertarget; - caller.renderbuffer = renderbuffer; - - msg.set_arg0(target); - msg.set_arg1(attachment); - msg.set_arg2(renderbuffertarget); - msg.set_arg3(renderbuffer); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glFramebufferRenderbuffer); -} - -void Debug_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLenum attachment; - GLenum textarget; - GLuint texture; - GLint level; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glFramebufferTexture2D(target, attachment, textarget, texture, level); - return 0; - } - } caller; - caller.target = target; - caller.attachment = attachment; - caller.textarget = textarget; - caller.texture = texture; - caller.level = level; - - msg.set_arg0(target); - msg.set_arg1(attachment); - msg.set_arg2(textarget); - msg.set_arg3(texture); - msg.set_arg4(level); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glFramebufferTexture2D); -} - -void Debug_glFrontFace(GLenum mode) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum mode; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glFrontFace(mode); - return 0; - } - } caller; - caller.mode = mode; - - msg.set_arg0(mode); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glFrontFace); -} - -void Debug_glGenBuffers(GLsizei n, GLuint* buffers) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLsizei n; - GLuint* buffers; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - nsecs_t c0 = systemTime(timeMode); - _c->glGenBuffers(n, buffers); - msg.set_time((systemTime(timeMode) - c0) * 1e-6f); - msg.mutable_data()->assign(reinterpret_cast<const char *>(buffers), n * sizeof(GLuint)); - return 0; - } - } caller; - caller.n = n; - caller.buffers = buffers; - - msg.set_arg0(n); - msg.set_arg1(ToInt(buffers)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGenBuffers); -} - -void Debug_glGenerateMipmap(GLenum target) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glGenerateMipmap(target); - return 0; - } - } caller; - caller.target = target; - - msg.set_arg0(target); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGenerateMipmap); -} - -void Debug_glGenFramebuffers(GLsizei n, GLuint* framebuffers) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLsizei n; - GLuint* framebuffers; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - nsecs_t c0 = systemTime(timeMode); - _c->glGenFramebuffers(n, framebuffers); - msg.set_time((systemTime(timeMode) - c0) * 1e-6f); - msg.mutable_data()->assign(reinterpret_cast<const char *>(framebuffers), n * sizeof(GLuint)); - return 0; - } - } caller; - caller.n = n; - caller.framebuffers = framebuffers; - - msg.set_arg0(n); - msg.set_arg1(ToInt(framebuffers)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGenFramebuffers); -} - -void Debug_glGenRenderbuffers(GLsizei n, GLuint* renderbuffers) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLsizei n; - GLuint* renderbuffers; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - nsecs_t c0 = systemTime(timeMode); - _c->glGenRenderbuffers(n, renderbuffers); - msg.set_time((systemTime(timeMode) - c0) * 1e-6f); - msg.mutable_data()->assign(reinterpret_cast<const char *>(renderbuffers), n * sizeof(GLuint)); - return 0; - } - } caller; - caller.n = n; - caller.renderbuffers = renderbuffers; - - msg.set_arg0(n); - msg.set_arg1(ToInt(renderbuffers)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGenRenderbuffers); -} - -void Debug_glGenTextures(GLsizei n, GLuint* textures) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLsizei n; - GLuint* textures; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - nsecs_t c0 = systemTime(timeMode); - _c->glGenTextures(n, textures); - msg.set_time((systemTime(timeMode) - c0) * 1e-6f); - msg.mutable_data()->assign(reinterpret_cast<const char *>(textures), n * sizeof(GLuint)); - return 0; - } - } caller; - caller.n = n; - caller.textures = textures; - - msg.set_arg0(n); - msg.set_arg1(ToInt(textures)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGenTextures); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint program; - GLuint index; - GLsizei bufsize; - GLsizei* length; - GLint* size; - GLenum* type; - GLchar* name; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glGetActiveAttrib(program, index, bufsize, length, size, type, name); - return 0; - } - } caller; - caller.program = program; - caller.index = index; - caller.bufsize = bufsize; - caller.length = length; - caller.size = size; - caller.type = type; - caller.name = name; - - msg.set_arg0(program); - msg.set_arg1(index); - msg.set_arg2(bufsize); - msg.set_arg3(ToInt(length)); - msg.set_arg4(ToInt(size)); - msg.set_arg5(ToInt(type)); - msg.set_arg6(ToInt(name)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(name), strlen(name) * sizeof(GLchar)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetActiveAttrib); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint program; - GLuint index; - GLsizei bufsize; - GLsizei* length; - GLint* size; - GLenum* type; - GLchar* name; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glGetActiveUniform(program, index, bufsize, length, size, type, name); - return 0; - } - } caller; - caller.program = program; - caller.index = index; - caller.bufsize = bufsize; - caller.length = length; - caller.size = size; - caller.type = type; - caller.name = name; - - msg.set_arg0(program); - msg.set_arg1(index); - msg.set_arg2(bufsize); - msg.set_arg3(ToInt(length)); - msg.set_arg4(ToInt(size)); - msg.set_arg5(ToInt(type)); - msg.set_arg6(ToInt(name)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(name), strlen(name) * sizeof(GLchar)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetActiveUniform); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint program; - GLsizei maxcount; - GLsizei* count; - GLuint* shaders; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glGetAttachedShaders(program, maxcount, count, shaders); - return 0; - } - } caller; - caller.program = program; - caller.maxcount = maxcount; - caller.count = count; - caller.shaders = shaders; - - msg.set_arg0(program); - msg.set_arg1(maxcount); - msg.set_arg2(ToInt(count)); - msg.set_arg3(ToInt(shaders)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetAttachedShaders); -} - -int Debug_glGetAttribLocation(GLuint program, const GLchar* name) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint program; - const GLchar* name; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - const int * ret = reinterpret_cast<const int *>(_c->glGetAttribLocation(program, name)); - msg.set_ret(ToInt(ret)); - return ret; - } - } caller; - caller.program = program; - caller.name = name; - - msg.set_arg0(program); - msg.set_arg1(ToInt(name)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(name), strlen(name) * sizeof(GLchar)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetAttribLocation); - return reinterpret_cast<int>(ret); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glGetBooleanv(GLenum pname, GLboolean* params) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum pname; - GLboolean* params; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glGetBooleanv(pname, params); - return 0; - } - } caller; - caller.pname = pname; - caller.params = params; - - msg.set_arg0(pname); - msg.set_arg1(ToInt(params)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetBooleanv); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLenum pname; - GLint* params; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glGetBufferParameteriv(target, pname, params); - return 0; - } - } caller; - caller.target = target; - caller.pname = pname; - caller.params = params; - - msg.set_arg0(target); - msg.set_arg1(pname); - msg.set_arg2(ToInt(params)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetBufferParameteriv); -} - -GLenum Debug_glGetError(void) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - const int * ret = reinterpret_cast<const int *>(_c->glGetError()); - msg.set_ret(ToInt(ret)); - return ret; - } - } caller; - - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetError); - return reinterpret_cast<GLenum>(ret); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glGetFloatv(GLenum pname, GLfloat* params) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum pname; - GLfloat* params; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glGetFloatv(pname, params); - return 0; - } - } caller; - caller.pname = pname; - caller.params = params; - - msg.set_arg0(pname); - msg.set_arg1(ToInt(params)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetFloatv); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLenum attachment; - GLenum pname; - GLint* params; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glGetFramebufferAttachmentParameteriv(target, attachment, pname, params); - return 0; - } - } caller; - caller.target = target; - caller.attachment = attachment; - caller.pname = pname; - caller.params = params; - - msg.set_arg0(target); - msg.set_arg1(attachment); - msg.set_arg2(pname); - msg.set_arg3(ToInt(params)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetFramebufferAttachmentParameteriv); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glGetIntegerv(GLenum pname, GLint* params) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum pname; - GLint* params; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glGetIntegerv(pname, params); - return 0; - } - } caller; - caller.pname = pname; - caller.params = params; - - msg.set_arg0(pname); - msg.set_arg1(ToInt(params)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetIntegerv); -} - -void Debug_glGetProgramiv(GLuint program, GLenum pname, GLint* params) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint program; - GLenum pname; - GLint* params; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - nsecs_t c0 = systemTime(timeMode); - _c->glGetProgramiv(program, pname, params); - msg.set_time((systemTime(timeMode) - c0) * 1e-6f); - msg.mutable_data()->assign(reinterpret_cast<const char *>(params), 1 * sizeof(GLint)); - return 0; - } - } caller; - caller.program = program; - caller.pname = pname; - caller.params = params; - - msg.set_arg0(program); - msg.set_arg1(pname); - msg.set_arg2(ToInt(params)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetProgramiv); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint program; - GLsizei bufsize; - GLsizei* length; - GLchar* infolog; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - nsecs_t c0 = systemTime(timeMode); - _c->glGetProgramInfoLog(program, bufsize, length, infolog); - msg.set_time((systemTime(timeMode) - c0) * 1e-6f); - msg.mutable_data()->assign(reinterpret_cast<const char *>(infolog), strlen(infolog) * sizeof(GLchar)); - return 0; - } - } caller; - caller.program = program; - caller.bufsize = bufsize; - caller.length = length; - caller.infolog = infolog; - - msg.set_arg0(program); - msg.set_arg1(bufsize); - msg.set_arg2(ToInt(length)); - msg.set_arg3(ToInt(infolog)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetProgramInfoLog); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLenum pname; - GLint* params; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glGetRenderbufferParameteriv(target, pname, params); - return 0; - } - } caller; - caller.target = target; - caller.pname = pname; - caller.params = params; - - msg.set_arg0(target); - msg.set_arg1(pname); - msg.set_arg2(ToInt(params)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetRenderbufferParameteriv); -} - -void Debug_glGetShaderiv(GLuint shader, GLenum pname, GLint* params) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint shader; - GLenum pname; - GLint* params; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - nsecs_t c0 = systemTime(timeMode); - _c->glGetShaderiv(shader, pname, params); - msg.set_time((systemTime(timeMode) - c0) * 1e-6f); - msg.mutable_data()->assign(reinterpret_cast<const char *>(params), 1 * sizeof(GLint)); - return 0; - } - } caller; - caller.shader = shader; - caller.pname = pname; - caller.params = params; - - msg.set_arg0(shader); - msg.set_arg1(pname); - msg.set_arg2(ToInt(params)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetShaderiv); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint shader; - GLsizei bufsize; - GLsizei* length; - GLchar* infolog; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - nsecs_t c0 = systemTime(timeMode); - _c->glGetShaderInfoLog(shader, bufsize, length, infolog); - msg.set_time((systemTime(timeMode) - c0) * 1e-6f); - msg.mutable_data()->assign(reinterpret_cast<const char *>(infolog), strlen(infolog) * sizeof(GLchar)); - return 0; - } - } caller; - caller.shader = shader; - caller.bufsize = bufsize; - caller.length = length; - caller.infolog = infolog; - - msg.set_arg0(shader); - msg.set_arg1(bufsize); - msg.set_arg2(ToInt(length)); - msg.set_arg3(ToInt(infolog)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetShaderInfoLog); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum shadertype; - GLenum precisiontype; - GLint* range; - GLint* precision; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); - return 0; - } - } caller; - caller.shadertype = shadertype; - caller.precisiontype = precisiontype; - caller.range = range; - caller.precision = precision; - - msg.set_arg0(shadertype); - msg.set_arg1(precisiontype); - msg.set_arg2(ToInt(range)); - msg.set_arg3(ToInt(precision)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetShaderPrecisionFormat); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint shader; - GLsizei bufsize; - GLsizei* length; - GLchar* source; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - nsecs_t c0 = systemTime(timeMode); - _c->glGetShaderSource(shader, bufsize, length, source); - msg.set_time((systemTime(timeMode) - c0) * 1e-6f); - msg.mutable_data()->assign(reinterpret_cast<const char *>(source), strlen(source) * sizeof(GLchar)); - return 0; - } - } caller; - caller.shader = shader; - caller.bufsize = bufsize; - caller.length = length; - caller.source = source; - - msg.set_arg0(shader); - msg.set_arg1(bufsize); - msg.set_arg2(ToInt(length)); - msg.set_arg3(ToInt(source)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetShaderSource); -} - -// FIXME: this function has pointers, it should be hand written -const GLubyte* Debug_glGetString(GLenum name) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum name; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - const int * ret = reinterpret_cast<const int *>(_c->glGetString(name)); - msg.set_ret(ToInt(ret)); - return ret; - } - } caller; - caller.name = name; - - msg.set_arg0(name); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetString); - return reinterpret_cast<const GLubyte*>(ret); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLenum pname; - GLfloat* params; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glGetTexParameterfv(target, pname, params); - return 0; - } - } caller; - caller.target = target; - caller.pname = pname; - caller.params = params; - - msg.set_arg0(target); - msg.set_arg1(pname); - msg.set_arg2(ToInt(params)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetTexParameterfv); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glGetTexParameteriv(GLenum target, GLenum pname, GLint* params) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLenum pname; - GLint* params; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glGetTexParameteriv(target, pname, params); - return 0; - } - } caller; - caller.target = target; - caller.pname = pname; - caller.params = params; - - msg.set_arg0(target); - msg.set_arg1(pname); - msg.set_arg2(ToInt(params)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetTexParameteriv); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glGetUniformfv(GLuint program, GLint location, GLfloat* params) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint program; - GLint location; - GLfloat* params; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glGetUniformfv(program, location, params); - return 0; - } - } caller; - caller.program = program; - caller.location = location; - caller.params = params; - - msg.set_arg0(program); - msg.set_arg1(location); - msg.set_arg2(ToInt(params)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetUniformfv); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glGetUniformiv(GLuint program, GLint location, GLint* params) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint program; - GLint location; - GLint* params; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glGetUniformiv(program, location, params); - return 0; - } - } caller; - caller.program = program; - caller.location = location; - caller.params = params; - - msg.set_arg0(program); - msg.set_arg1(location); - msg.set_arg2(ToInt(params)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetUniformiv); -} - -int Debug_glGetUniformLocation(GLuint program, const GLchar* name) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint program; - const GLchar* name; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - const int * ret = reinterpret_cast<const int *>(_c->glGetUniformLocation(program, name)); - msg.set_ret(ToInt(ret)); - return ret; - } - } caller; - caller.program = program; - caller.name = name; - - msg.set_arg0(program); - msg.set_arg1(ToInt(name)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(name), strlen(name) * sizeof(GLchar)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetUniformLocation); - return reinterpret_cast<int>(ret); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint index; - GLenum pname; - GLfloat* params; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glGetVertexAttribfv(index, pname, params); - return 0; - } - } caller; - caller.index = index; - caller.pname = pname; - caller.params = params; - - msg.set_arg0(index); - msg.set_arg1(pname); - msg.set_arg2(ToInt(params)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetVertexAttribfv); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint index; - GLenum pname; - GLint* params; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glGetVertexAttribiv(index, pname, params); - return 0; - } - } caller; - caller.index = index; - caller.pname = pname; - caller.params = params; - - msg.set_arg0(index); - msg.set_arg1(pname); - msg.set_arg2(ToInt(params)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetVertexAttribiv); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint index; - GLenum pname; - GLvoid** pointer; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glGetVertexAttribPointerv(index, pname, pointer); - return 0; - } - } caller; - caller.index = index; - caller.pname = pname; - caller.pointer = pointer; - - msg.set_arg0(index); - msg.set_arg1(pname); - msg.set_arg2(ToInt(pointer)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glGetVertexAttribPointerv); -} - -void Debug_glHint(GLenum target, GLenum mode) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLenum mode; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glHint(target, mode); - return 0; - } - } caller; - caller.target = target; - caller.mode = mode; - - msg.set_arg0(target); - msg.set_arg1(mode); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glHint); -} - -GLboolean Debug_glIsBuffer(GLuint buffer) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint buffer; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - const int * ret = reinterpret_cast<const int *>(_c->glIsBuffer(buffer)); - msg.set_ret(ToInt(ret)); - return ret; - } - } caller; - caller.buffer = buffer; - - msg.set_arg0(buffer); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glIsBuffer); - return static_cast<GLboolean>(reinterpret_cast<int>(ret)); -} - -GLboolean Debug_glIsEnabled(GLenum cap) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum cap; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - const int * ret = reinterpret_cast<const int *>(_c->glIsEnabled(cap)); - msg.set_ret(ToInt(ret)); - return ret; - } - } caller; - caller.cap = cap; - - msg.set_arg0(cap); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glIsEnabled); - return static_cast<GLboolean>(reinterpret_cast<int>(ret)); -} - -GLboolean Debug_glIsFramebuffer(GLuint framebuffer) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint framebuffer; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - const int * ret = reinterpret_cast<const int *>(_c->glIsFramebuffer(framebuffer)); - msg.set_ret(ToInt(ret)); - return ret; - } - } caller; - caller.framebuffer = framebuffer; - - msg.set_arg0(framebuffer); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glIsFramebuffer); - return static_cast<GLboolean>(reinterpret_cast<int>(ret)); -} - -GLboolean Debug_glIsProgram(GLuint program) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint program; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - const int * ret = reinterpret_cast<const int *>(_c->glIsProgram(program)); - msg.set_ret(ToInt(ret)); - return ret; - } - } caller; - caller.program = program; - - msg.set_arg0(program); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glIsProgram); - return static_cast<GLboolean>(reinterpret_cast<int>(ret)); -} - -GLboolean Debug_glIsRenderbuffer(GLuint renderbuffer) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint renderbuffer; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - const int * ret = reinterpret_cast<const int *>(_c->glIsRenderbuffer(renderbuffer)); - msg.set_ret(ToInt(ret)); - return ret; - } - } caller; - caller.renderbuffer = renderbuffer; - - msg.set_arg0(renderbuffer); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glIsRenderbuffer); - return static_cast<GLboolean>(reinterpret_cast<int>(ret)); -} - -GLboolean Debug_glIsShader(GLuint shader) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint shader; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - const int * ret = reinterpret_cast<const int *>(_c->glIsShader(shader)); - msg.set_ret(ToInt(ret)); - return ret; - } - } caller; - caller.shader = shader; - - msg.set_arg0(shader); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glIsShader); - return static_cast<GLboolean>(reinterpret_cast<int>(ret)); -} - -GLboolean Debug_glIsTexture(GLuint texture) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint texture; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - const int * ret = reinterpret_cast<const int *>(_c->glIsTexture(texture)); - msg.set_ret(ToInt(ret)); - return ret; - } - } caller; - caller.texture = texture; - - msg.set_arg0(texture); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glIsTexture); - return static_cast<GLboolean>(reinterpret_cast<int>(ret)); -} - -void Debug_glLineWidth(GLfloat width) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLfloat width; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glLineWidth(width); - return 0; - } - } caller; - caller.width = width; - - msg.set_arg0(ToInt(width)); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glLineWidth); -} - -void Debug_glLinkProgram(GLuint program) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint program; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glLinkProgram(program); - return 0; - } - } caller; - caller.program = program; - - msg.set_arg0(program); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glLinkProgram); -} - -void Debug_glPixelStorei(GLenum pname, GLint param) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum pname; - GLint param; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glPixelStorei(pname, param); - return 0; - } - } caller; - caller.pname = pname; - caller.param = param; - - msg.set_arg0(pname); - msg.set_arg1(param); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glPixelStorei); -} - -void Debug_glPolygonOffset(GLfloat factor, GLfloat units) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLfloat factor; - GLfloat units; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glPolygonOffset(factor, units); - return 0; - } - } caller; - caller.factor = factor; - caller.units = units; - - msg.set_arg0(ToInt(factor)); - msg.set_arg1(ToInt(units)); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glPolygonOffset); -} - -void Debug_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint x; - GLint y; - GLsizei width; - GLsizei height; - GLenum format; - GLenum type; - GLvoid* pixels; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glReadPixels(x, y, width, height, format, type, pixels); -#ifdef EXTEND_AFTER_CALL_Debug_glReadPixels - EXTEND_AFTER_CALL_Debug_glReadPixels; -#endif - return 0; - } - } caller; - caller.x = x; - caller.y = y; - caller.width = width; - caller.height = height; - caller.format = format; - caller.type = type; - caller.pixels = pixels; - - msg.set_arg0(x); - msg.set_arg1(y); - msg.set_arg2(width); - msg.set_arg3(height); - msg.set_arg4(format); - msg.set_arg5(type); - msg.set_arg6(ToInt(pixels)); - - // FIXME: check for pointer usage -#ifdef EXTEND_Debug_glReadPixels - EXTEND_Debug_glReadPixels; -#endif - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glReadPixels); -} - -void Debug_glReleaseShaderCompiler(void) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glReleaseShaderCompiler(); - return 0; - } - } caller; - - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glReleaseShaderCompiler); -} - -void Debug_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLenum internalformat; - GLsizei width; - GLsizei height; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glRenderbufferStorage(target, internalformat, width, height); - return 0; - } - } caller; - caller.target = target; - caller.internalformat = internalformat; - caller.width = width; - caller.height = height; - - msg.set_arg0(target); - msg.set_arg1(internalformat); - msg.set_arg2(width); - msg.set_arg3(height); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glRenderbufferStorage); -} - -void Debug_glSampleCoverage(GLclampf value, GLboolean invert) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLclampf value; - GLboolean invert; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glSampleCoverage(value, invert); - return 0; - } - } caller; - caller.value = value; - caller.invert = invert; - - msg.set_arg0(ToInt(value)); - msg.set_arg1(invert); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glSampleCoverage); -} - -void Debug_glScissor(GLint x, GLint y, GLsizei width, GLsizei height) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint x; - GLint y; - GLsizei width; - GLsizei height; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glScissor(x, y, width, height); - return 0; - } - } caller; - caller.x = x; - caller.y = y; - caller.width = width; - caller.height = height; - - msg.set_arg0(x); - msg.set_arg1(y); - msg.set_arg2(width); - msg.set_arg3(height); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glScissor); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLsizei n; - const GLuint* shaders; - GLenum binaryformat; - const GLvoid* binary; - GLsizei length; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glShaderBinary(n, shaders, binaryformat, binary, length); - return 0; - } - } caller; - caller.n = n; - caller.shaders = shaders; - caller.binaryformat = binaryformat; - caller.binary = binary; - caller.length = length; - - msg.set_arg0(n); - msg.set_arg1(ToInt(shaders)); - msg.set_arg2(binaryformat); - msg.set_arg3(ToInt(binary)); - msg.set_arg4(length); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glShaderBinary); -} - -void Debug_glShaderSource(GLuint shader, GLsizei count, const GLchar** string, const GLint* length) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint shader; - GLsizei count; - const GLchar** string; - const GLint* length; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glShaderSource(shader, count, string, length); -#ifdef EXTEND_AFTER_CALL_Debug_glShaderSource - EXTEND_AFTER_CALL_Debug_glShaderSource; -#endif - return 0; - } - } caller; - caller.shader = shader; - caller.count = count; - caller.string = string; - caller.length = length; - - msg.set_arg0(shader); - msg.set_arg1(count); - msg.set_arg2(ToInt(string)); - msg.set_arg3(ToInt(length)); - - // FIXME: check for pointer usage -#ifdef EXTEND_Debug_glShaderSource - EXTEND_Debug_glShaderSource; -#endif - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glShaderSource); -} - -void Debug_glStencilFunc(GLenum func, GLint ref, GLuint mask) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum func; - GLint ref; - GLuint mask; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glStencilFunc(func, ref, mask); - return 0; - } - } caller; - caller.func = func; - caller.ref = ref; - caller.mask = mask; - - msg.set_arg0(func); - msg.set_arg1(ref); - msg.set_arg2(mask); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glStencilFunc); -} - -void Debug_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum face; - GLenum func; - GLint ref; - GLuint mask; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glStencilFuncSeparate(face, func, ref, mask); - return 0; - } - } caller; - caller.face = face; - caller.func = func; - caller.ref = ref; - caller.mask = mask; - - msg.set_arg0(face); - msg.set_arg1(func); - msg.set_arg2(ref); - msg.set_arg3(mask); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glStencilFuncSeparate); -} - -void Debug_glStencilMask(GLuint mask) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint mask; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glStencilMask(mask); - return 0; - } - } caller; - caller.mask = mask; - - msg.set_arg0(mask); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glStencilMask); -} - -void Debug_glStencilMaskSeparate(GLenum face, GLuint mask) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum face; - GLuint mask; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glStencilMaskSeparate(face, mask); - return 0; - } - } caller; - caller.face = face; - caller.mask = mask; - - msg.set_arg0(face); - msg.set_arg1(mask); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glStencilMaskSeparate); -} - -void Debug_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum fail; - GLenum zfail; - GLenum zpass; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glStencilOp(fail, zfail, zpass); - return 0; - } - } caller; - caller.fail = fail; - caller.zfail = zfail; - caller.zpass = zpass; - - msg.set_arg0(fail); - msg.set_arg1(zfail); - msg.set_arg2(zpass); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glStencilOp); -} - -void Debug_glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum face; - GLenum fail; - GLenum zfail; - GLenum zpass; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glStencilOpSeparate(face, fail, zfail, zpass); - return 0; - } - } caller; - caller.face = face; - caller.fail = fail; - caller.zfail = zfail; - caller.zpass = zpass; - - msg.set_arg0(face); - msg.set_arg1(fail); - msg.set_arg2(zfail); - msg.set_arg3(zpass); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glStencilOpSeparate); -} - -void Debug_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLint level; - GLint internalformat; - GLsizei width; - GLsizei height; - GLint border; - GLenum format; - GLenum type; - const GLvoid* pixels; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); -#ifdef EXTEND_AFTER_CALL_Debug_glTexImage2D - EXTEND_AFTER_CALL_Debug_glTexImage2D; -#endif - return 0; - } - } caller; - caller.target = target; - caller.level = level; - caller.internalformat = internalformat; - caller.width = width; - caller.height = height; - caller.border = border; - caller.format = format; - caller.type = type; - caller.pixels = pixels; - - msg.set_arg0(target); - msg.set_arg1(level); - msg.set_arg2(internalformat); - msg.set_arg3(width); - msg.set_arg4(height); - msg.set_arg5(border); - msg.set_arg6(format); - msg.set_arg7(type); - msg.set_arg8(ToInt(pixels)); - - // FIXME: check for pointer usage -#ifdef EXTEND_Debug_glTexImage2D - EXTEND_Debug_glTexImage2D; -#endif - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glTexImage2D); -} - -void Debug_glTexParameterf(GLenum target, GLenum pname, GLfloat param) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLenum pname; - GLfloat param; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glTexParameterf(target, pname, param); - return 0; - } - } caller; - caller.target = target; - caller.pname = pname; - caller.param = param; - - msg.set_arg0(target); - msg.set_arg1(pname); - msg.set_arg2(ToInt(param)); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glTexParameterf); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLenum pname; - const GLfloat* params; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glTexParameterfv(target, pname, params); - return 0; - } - } caller; - caller.target = target; - caller.pname = pname; - caller.params = params; - - msg.set_arg0(target); - msg.set_arg1(pname); - msg.set_arg2(ToInt(params)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glTexParameterfv); -} - -void Debug_glTexParameteri(GLenum target, GLenum pname, GLint param) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLenum pname; - GLint param; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glTexParameteri(target, pname, param); - return 0; - } - } caller; - caller.target = target; - caller.pname = pname; - caller.param = param; - - msg.set_arg0(target); - msg.set_arg1(pname); - msg.set_arg2(param); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glTexParameteri); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glTexParameteriv(GLenum target, GLenum pname, const GLint* params) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLenum pname; - const GLint* params; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glTexParameteriv(target, pname, params); - return 0; - } - } caller; - caller.target = target; - caller.pname = pname; - caller.params = params; - - msg.set_arg0(target); - msg.set_arg1(pname); - msg.set_arg2(ToInt(params)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glTexParameteriv); -} - -void Debug_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLenum target; - GLint level; - GLint xoffset; - GLint yoffset; - GLsizei width; - GLsizei height; - GLenum format; - GLenum type; - const GLvoid* pixels; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); -#ifdef EXTEND_AFTER_CALL_Debug_glTexSubImage2D - EXTEND_AFTER_CALL_Debug_glTexSubImage2D; -#endif - return 0; - } - } caller; - caller.target = target; - caller.level = level; - caller.xoffset = xoffset; - caller.yoffset = yoffset; - caller.width = width; - caller.height = height; - caller.format = format; - caller.type = type; - caller.pixels = pixels; - - msg.set_arg0(target); - msg.set_arg1(level); - msg.set_arg2(xoffset); - msg.set_arg3(yoffset); - msg.set_arg4(width); - msg.set_arg5(height); - msg.set_arg6(format); - msg.set_arg7(type); - msg.set_arg8(ToInt(pixels)); - - // FIXME: check for pointer usage -#ifdef EXTEND_Debug_glTexSubImage2D - EXTEND_Debug_glTexSubImage2D; -#endif - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glTexSubImage2D); -} - -void Debug_glUniform1f(GLint location, GLfloat x) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint location; - GLfloat x; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glUniform1f(location, x); - return 0; - } - } caller; - caller.location = location; - caller.x = x; - - msg.set_arg0(location); - msg.set_arg1(ToInt(x)); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform1f); -} - -void Debug_glUniform1fv(GLint location, GLsizei count, const GLfloat* v) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint location; - GLsizei count; - const GLfloat* v; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glUniform1fv(location, count, v); - return 0; - } - } caller; - caller.location = location; - caller.count = count; - caller.v = v; - - msg.set_arg0(location); - msg.set_arg1(count); - msg.set_arg2(ToInt(v)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(v), 1*count * sizeof(GLfloat)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform1fv); -} - -void Debug_glUniform1i(GLint location, GLint x) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint location; - GLint x; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glUniform1i(location, x); - return 0; - } - } caller; - caller.location = location; - caller.x = x; - - msg.set_arg0(location); - msg.set_arg1(x); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform1i); -} - -void Debug_glUniform1iv(GLint location, GLsizei count, const GLint* v) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint location; - GLsizei count; - const GLint* v; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glUniform1iv(location, count, v); - return 0; - } - } caller; - caller.location = location; - caller.count = count; - caller.v = v; - - msg.set_arg0(location); - msg.set_arg1(count); - msg.set_arg2(ToInt(v)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(v), 1*count * sizeof(GLint)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform1iv); -} - -void Debug_glUniform2f(GLint location, GLfloat x, GLfloat y) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint location; - GLfloat x; - GLfloat y; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glUniform2f(location, x, y); - return 0; - } - } caller; - caller.location = location; - caller.x = x; - caller.y = y; - - msg.set_arg0(location); - msg.set_arg1(ToInt(x)); - msg.set_arg2(ToInt(y)); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform2f); -} - -void Debug_glUniform2fv(GLint location, GLsizei count, const GLfloat* v) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint location; - GLsizei count; - const GLfloat* v; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glUniform2fv(location, count, v); - return 0; - } - } caller; - caller.location = location; - caller.count = count; - caller.v = v; - - msg.set_arg0(location); - msg.set_arg1(count); - msg.set_arg2(ToInt(v)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(v), 2*count * sizeof(GLfloat)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform2fv); -} - -void Debug_glUniform2i(GLint location, GLint x, GLint y) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint location; - GLint x; - GLint y; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glUniform2i(location, x, y); - return 0; - } - } caller; - caller.location = location; - caller.x = x; - caller.y = y; - - msg.set_arg0(location); - msg.set_arg1(x); - msg.set_arg2(y); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform2i); -} - -void Debug_glUniform2iv(GLint location, GLsizei count, const GLint* v) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint location; - GLsizei count; - const GLint* v; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glUniform2iv(location, count, v); - return 0; - } - } caller; - caller.location = location; - caller.count = count; - caller.v = v; - - msg.set_arg0(location); - msg.set_arg1(count); - msg.set_arg2(ToInt(v)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(v), 2*count * sizeof(GLint)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform2iv); -} - -void Debug_glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint location; - GLfloat x; - GLfloat y; - GLfloat z; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glUniform3f(location, x, y, z); - return 0; - } - } caller; - caller.location = location; - caller.x = x; - caller.y = y; - caller.z = z; - - msg.set_arg0(location); - msg.set_arg1(ToInt(x)); - msg.set_arg2(ToInt(y)); - msg.set_arg3(ToInt(z)); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform3f); -} - -void Debug_glUniform3fv(GLint location, GLsizei count, const GLfloat* v) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint location; - GLsizei count; - const GLfloat* v; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glUniform3fv(location, count, v); - return 0; - } - } caller; - caller.location = location; - caller.count = count; - caller.v = v; - - msg.set_arg0(location); - msg.set_arg1(count); - msg.set_arg2(ToInt(v)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(v), 3*count * sizeof(GLfloat)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform3fv); -} - -void Debug_glUniform3i(GLint location, GLint x, GLint y, GLint z) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint location; - GLint x; - GLint y; - GLint z; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glUniform3i(location, x, y, z); - return 0; - } - } caller; - caller.location = location; - caller.x = x; - caller.y = y; - caller.z = z; - - msg.set_arg0(location); - msg.set_arg1(x); - msg.set_arg2(y); - msg.set_arg3(z); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform3i); -} - -void Debug_glUniform3iv(GLint location, GLsizei count, const GLint* v) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint location; - GLsizei count; - const GLint* v; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glUniform3iv(location, count, v); - return 0; - } - } caller; - caller.location = location; - caller.count = count; - caller.v = v; - - msg.set_arg0(location); - msg.set_arg1(count); - msg.set_arg2(ToInt(v)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(v), 3*count * sizeof(GLint)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform3iv); -} - -void Debug_glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint location; - GLfloat x; - GLfloat y; - GLfloat z; - GLfloat w; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glUniform4f(location, x, y, z, w); - return 0; - } - } caller; - caller.location = location; - caller.x = x; - caller.y = y; - caller.z = z; - caller.w = w; - - msg.set_arg0(location); - msg.set_arg1(ToInt(x)); - msg.set_arg2(ToInt(y)); - msg.set_arg3(ToInt(z)); - msg.set_arg4(ToInt(w)); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform4f); -} - -void Debug_glUniform4fv(GLint location, GLsizei count, const GLfloat* v) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint location; - GLsizei count; - const GLfloat* v; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glUniform4fv(location, count, v); - return 0; - } - } caller; - caller.location = location; - caller.count = count; - caller.v = v; - - msg.set_arg0(location); - msg.set_arg1(count); - msg.set_arg2(ToInt(v)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(v), 4*count * sizeof(GLfloat)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform4fv); -} - -void Debug_glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint location; - GLint x; - GLint y; - GLint z; - GLint w; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glUniform4i(location, x, y, z, w); - return 0; - } - } caller; - caller.location = location; - caller.x = x; - caller.y = y; - caller.z = z; - caller.w = w; - - msg.set_arg0(location); - msg.set_arg1(x); - msg.set_arg2(y); - msg.set_arg3(z); - msg.set_arg4(w); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform4i); -} - -void Debug_glUniform4iv(GLint location, GLsizei count, const GLint* v) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint location; - GLsizei count; - const GLint* v; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glUniform4iv(location, count, v); - return 0; - } - } caller; - caller.location = location; - caller.count = count; - caller.v = v; - - msg.set_arg0(location); - msg.set_arg1(count); - msg.set_arg2(ToInt(v)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(v), 4*count * sizeof(GLint)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniform4iv); -} - -void Debug_glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint location; - GLsizei count; - GLboolean transpose; - const GLfloat* value; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glUniformMatrix2fv(location, count, transpose, value); - return 0; - } - } caller; - caller.location = location; - caller.count = count; - caller.transpose = transpose; - caller.value = value; - - msg.set_arg0(location); - msg.set_arg1(count); - msg.set_arg2(transpose); - msg.set_arg3(ToInt(value)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(value), 4*count * sizeof(GLfloat)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniformMatrix2fv); -} - -void Debug_glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint location; - GLsizei count; - GLboolean transpose; - const GLfloat* value; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glUniformMatrix3fv(location, count, transpose, value); - return 0; - } - } caller; - caller.location = location; - caller.count = count; - caller.transpose = transpose; - caller.value = value; - - msg.set_arg0(location); - msg.set_arg1(count); - msg.set_arg2(transpose); - msg.set_arg3(ToInt(value)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(value), 9*count * sizeof(GLfloat)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniformMatrix3fv); -} - -void Debug_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint location; - GLsizei count; - GLboolean transpose; - const GLfloat* value; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glUniformMatrix4fv(location, count, transpose, value); - return 0; - } - } caller; - caller.location = location; - caller.count = count; - caller.transpose = transpose; - caller.value = value; - - msg.set_arg0(location); - msg.set_arg1(count); - msg.set_arg2(transpose); - msg.set_arg3(ToInt(value)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(value), 16*count * sizeof(GLfloat)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUniformMatrix4fv); -} - -void Debug_glUseProgram(GLuint program) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint program; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glUseProgram(program); - getDbgContextThreadSpecific()->glUseProgram(program); - return 0; - } - } caller; - caller.program = program; - - msg.set_arg0(program); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glUseProgram); -} - -void Debug_glValidateProgram(GLuint program) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint program; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glValidateProgram(program); - return 0; - } - } caller; - caller.program = program; - - msg.set_arg0(program); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glValidateProgram); -} - -void Debug_glVertexAttrib1f(GLuint indx, GLfloat x) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint indx; - GLfloat x; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glVertexAttrib1f(indx, x); - return 0; - } - } caller; - caller.indx = indx; - caller.x = x; - - msg.set_arg0(indx); - msg.set_arg1(ToInt(x)); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glVertexAttrib1f); -} - -void Debug_glVertexAttrib1fv(GLuint indx, const GLfloat* values) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint indx; - const GLfloat* values; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glVertexAttrib1fv(indx, values); - return 0; - } - } caller; - caller.indx = indx; - caller.values = values; - - msg.set_arg0(indx); - msg.set_arg1(ToInt(values)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(values), 1 * sizeof(GLfloat)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glVertexAttrib1fv); -} - -void Debug_glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint indx; - GLfloat x; - GLfloat y; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glVertexAttrib2f(indx, x, y); - return 0; - } - } caller; - caller.indx = indx; - caller.x = x; - caller.y = y; - - msg.set_arg0(indx); - msg.set_arg1(ToInt(x)); - msg.set_arg2(ToInt(y)); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glVertexAttrib2f); -} - -void Debug_glVertexAttrib2fv(GLuint indx, const GLfloat* values) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint indx; - const GLfloat* values; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glVertexAttrib2fv(indx, values); - return 0; - } - } caller; - caller.indx = indx; - caller.values = values; - - msg.set_arg0(indx); - msg.set_arg1(ToInt(values)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(values), 2 * sizeof(GLfloat)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glVertexAttrib2fv); -} - -void Debug_glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint indx; - GLfloat x; - GLfloat y; - GLfloat z; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glVertexAttrib3f(indx, x, y, z); - return 0; - } - } caller; - caller.indx = indx; - caller.x = x; - caller.y = y; - caller.z = z; - - msg.set_arg0(indx); - msg.set_arg1(ToInt(x)); - msg.set_arg2(ToInt(y)); - msg.set_arg3(ToInt(z)); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glVertexAttrib3f); -} - -void Debug_glVertexAttrib3fv(GLuint indx, const GLfloat* values) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint indx; - const GLfloat* values; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glVertexAttrib3fv(indx, values); - return 0; - } - } caller; - caller.indx = indx; - caller.values = values; - - msg.set_arg0(indx); - msg.set_arg1(ToInt(values)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(values), 3 * sizeof(GLfloat)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glVertexAttrib3fv); -} - -void Debug_glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint indx; - GLfloat x; - GLfloat y; - GLfloat z; - GLfloat w; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glVertexAttrib4f(indx, x, y, z, w); - return 0; - } - } caller; - caller.indx = indx; - caller.x = x; - caller.y = y; - caller.z = z; - caller.w = w; - - msg.set_arg0(indx); - msg.set_arg1(ToInt(x)); - msg.set_arg2(ToInt(y)); - msg.set_arg3(ToInt(z)); - msg.set_arg4(ToInt(w)); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glVertexAttrib4f); -} - -void Debug_glVertexAttrib4fv(GLuint indx, const GLfloat* values) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint indx; - const GLfloat* values; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glVertexAttrib4fv(indx, values); - return 0; - } - } caller; - caller.indx = indx; - caller.values = values; - - msg.set_arg0(indx); - msg.set_arg1(ToInt(values)); - - // FIXME: check for pointer usage - msg.mutable_data()->assign(reinterpret_cast<const char *>(values), 4 * sizeof(GLfloat)); - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glVertexAttrib4fv); -} - -// FIXME: this function has pointers, it should be hand written -void Debug_glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLuint indx; - GLint size; - GLenum type; - GLboolean normalized; - GLsizei stride; - const GLvoid* ptr; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glVertexAttribPointer(indx, size, type, normalized, stride, ptr); - getDbgContextThreadSpecific()->glVertexAttribPointer(indx, size, type, normalized, stride, ptr); - return 0; - } - } caller; - caller.indx = indx; - caller.size = size; - caller.type = type; - caller.normalized = normalized; - caller.stride = stride; - caller.ptr = ptr; - - msg.set_arg0(indx); - msg.set_arg1(size); - msg.set_arg2(type); - msg.set_arg3(normalized); - msg.set_arg4(stride); - msg.set_arg5(ToInt(ptr)); - - // FIXME: check for pointer usage - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glVertexAttribPointer); -} - -void Debug_glViewport(GLint x, GLint y, GLsizei width, GLsizei height) -{ - glesv2debugger::Message msg; - struct : public FunctionCall { - GLint x; - GLint y; - GLsizei width; - GLsizei height; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - _c->glViewport(x, y, width, height); - return 0; - } - } caller; - caller.x = x; - caller.y = y; - caller.width = width; - caller.height = height; - - msg.set_arg0(x); - msg.set_arg1(y); - msg.set_arg2(width); - msg.set_arg3(height); - - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_glViewport); -} - -// FIXME: the following functions should be written by hand -void Debug_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data); -void Debug_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data); -void Debug_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); -void Debug_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); -void Debug_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders); -void Debug_glGetBooleanv(GLenum pname, GLboolean* params); -void Debug_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params); -void Debug_glGetFloatv(GLenum pname, GLfloat* params); -void Debug_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params); -void Debug_glGetIntegerv(GLenum pname, GLint* params); -void Debug_glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog); -void Debug_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params); -void Debug_glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog); -void Debug_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); -void Debug_glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source); -const GLubyte* Debug_glGetString(GLenum name); -void Debug_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params); -void Debug_glGetTexParameteriv(GLenum target, GLenum pname, GLint* params); -void Debug_glGetUniformfv(GLuint program, GLint location, GLfloat* params); -void Debug_glGetUniformiv(GLuint program, GLint location, GLint* params); -void Debug_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params); -void Debug_glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params); -void Debug_glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer); -void Debug_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length); -void Debug_glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params); -void Debug_glTexParameteriv(GLenum target, GLenum pname, const GLint* params); -void Debug_glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr); diff --git a/opengl/libs/GLES2_dbg/src/api.h b/opengl/libs/GLES2_dbg/src/api.h deleted file mode 100644 index 0b227bc..0000000 --- a/opengl/libs/GLES2_dbg/src/api.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - ** Copyright 2011, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#define EXTEND_Debug_glCopyTexImage2D \ - DbgContext * const dbg = getDbgContextThreadSpecific(); \ - void * readData = dbg->GetReadPixelsBuffer(4 * width * height); \ - /* pick easy format for client to convert */ \ - dbg->hooks->gl.glReadPixels(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, readData); \ - dbg->CompressReadPixelBuffer(msg.mutable_data()); \ - msg.set_data_type(msg.ReferencedImage); \ - msg.set_pixel_format(GL_RGBA); \ - msg.set_pixel_type(GL_UNSIGNED_BYTE); - -#define EXTEND_Debug_glCopyTexSubImage2D EXTEND_Debug_glCopyTexImage2D - -#define EXTEND_AFTER_CALL_Debug_glReadPixels \ - { \ - DbgContext * const dbg = getDbgContextThreadSpecific(); \ - if (dbg->IsReadPixelBuffer(pixels)) { \ - dbg->CompressReadPixelBuffer(msg.mutable_data()); \ - msg.set_data_type(msg.ReferencedImage); \ - } else { \ - const unsigned int size = width * height * GetBytesPerPixel(format, type); \ - dbg->Compress(pixels, size, msg.mutable_data()); \ - msg.set_data_type(msg.NonreferencedImage); \ - } \ - } - -#define EXTEND_Debug_glShaderSource \ - std::string * const data = msg.mutable_data(); \ - for (unsigned i = 0; i < count; i++) \ - if (!length || length[i] < 0) \ - data->append(string[i]); \ - else \ - data->append(string[i], length[i]); - -#define EXTEND_Debug_glTexImage2D \ - if (pixels) { \ - DbgContext * const dbg = getDbgContextThreadSpecific(); \ - const unsigned size = GetBytesPerPixel(format, type) * width * height; \ - assert(0 < size); \ - dbg->Compress(pixels, size, msg.mutable_data()); \ - } - -#define EXTEND_Debug_glTexSubImage2D EXTEND_Debug_glTexImage2D diff --git a/opengl/libs/GLES2_dbg/src/caller.cpp b/opengl/libs/GLES2_dbg/src/caller.cpp deleted file mode 100644 index 6b72751..0000000 --- a/opengl/libs/GLES2_dbg/src/caller.cpp +++ /dev/null @@ -1,778 +0,0 @@ -/* - ** Copyright 2011, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -// auto generated by generate_caller_cpp.py -// implement declarations in caller.h - -#include "header.h" - -namespace android { - -static const int * GenerateCall_glCompressedTexImage2D(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glCompressedTexSubImage2D(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glDrawElements(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGenBuffers(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGenFramebuffers(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGenRenderbuffers(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGenTextures(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetActiveAttrib(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetActiveUniform(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetAttachedShaders(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetBooleanv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetBufferParameteriv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetFloatv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetFramebufferAttachmentParameteriv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetIntegerv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetProgramiv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetProgramInfoLog(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetRenderbufferParameteriv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetShaderiv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetShaderInfoLog(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetShaderPrecisionFormat(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetShaderSource(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetString(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetTexParameterfv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetTexParameteriv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetUniformfv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetUniformiv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetVertexAttribfv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetVertexAttribiv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glGetVertexAttribPointerv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glReadPixels(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glShaderBinary(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glShaderSource(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glTexImage2D(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glTexParameterfv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glTexParameteriv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glTexSubImage2D(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); -static const int * GenerateCall_glVertexAttribPointer(DbgContext * const dbg, - const glesv2debugger::Message & cmd, glesv2debugger::Message & msg, const int * const prevRet); - -#include "caller.h" - -const int * GenerateCall(DbgContext * const dbg, const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - LOGD("GenerateCall function=%u", cmd.function()); - const int * ret = prevRet; // only some functions have return value - nsecs_t c0 = systemTime(timeMode); - switch (cmd.function()) { case glesv2debugger::Message_Function_glActiveTexture: - dbg->hooks->gl.glActiveTexture( - static_cast<GLenum>(cmd.arg0())); - break; - case glesv2debugger::Message_Function_glAttachShader: - dbg->hooks->gl.glAttachShader( - static_cast<GLuint>(cmd.arg0()), static_cast<GLuint>(cmd.arg1()) - ); - break; - case glesv2debugger::Message_Function_glBindAttribLocation: - dbg->hooks->gl.glBindAttribLocation( - static_cast<GLuint>(cmd.arg0()), static_cast<GLuint>(cmd.arg1()), - reinterpret_cast<GLchar*>(const_cast<char *>(cmd.data().data())) - ); - break; - case glesv2debugger::Message_Function_glBindBuffer: - dbg->hooks->gl.glBindBuffer( - static_cast<GLenum>(cmd.arg0()), static_cast<GLuint>(cmd.arg1()) - ); - break; - case glesv2debugger::Message_Function_glBindFramebuffer: - dbg->hooks->gl.glBindFramebuffer( - static_cast<GLenum>(cmd.arg0()), static_cast<GLuint>(cmd.arg1()) - ); - break; - case glesv2debugger::Message_Function_glBindRenderbuffer: - dbg->hooks->gl.glBindRenderbuffer( - static_cast<GLenum>(cmd.arg0()), static_cast<GLuint>(cmd.arg1()) - ); - break; - case glesv2debugger::Message_Function_glBindTexture: - dbg->hooks->gl.glBindTexture( - static_cast<GLenum>(cmd.arg0()), static_cast<GLuint>(cmd.arg1()) - ); - break; - case glesv2debugger::Message_Function_glBlendColor: - dbg->hooks->gl.glBlendColor( - static_cast<GLclampf>(cmd.arg0()), static_cast<GLclampf>(cmd.arg1()), - static_cast<GLclampf>(cmd.arg2()), static_cast<GLclampf>(cmd.arg3()) - ); - break; - case glesv2debugger::Message_Function_glBlendEquation: - dbg->hooks->gl.glBlendEquation( - static_cast<GLenum>(cmd.arg0())); - break; - case glesv2debugger::Message_Function_glBlendEquationSeparate: - dbg->hooks->gl.glBlendEquationSeparate( - static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1()) - ); - break; - case glesv2debugger::Message_Function_glBlendFunc: - dbg->hooks->gl.glBlendFunc( - static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1()) - ); - break; - case glesv2debugger::Message_Function_glBlendFuncSeparate: - dbg->hooks->gl.glBlendFuncSeparate( - static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1()), - static_cast<GLenum>(cmd.arg2()), static_cast<GLenum>(cmd.arg3()) - ); - break; - case glesv2debugger::Message_Function_glBufferData: - dbg->hooks->gl.glBufferData( - static_cast<GLenum>(cmd.arg0()), static_cast<GLsizeiptr>(cmd.arg1()), - reinterpret_cast<GLvoid*>(const_cast<char *>(cmd.data().data())), - static_cast<GLenum>(cmd.arg3())); - break; - case glesv2debugger::Message_Function_glBufferSubData: - dbg->hooks->gl.glBufferSubData( - static_cast<GLenum>(cmd.arg0()), static_cast<GLintptr>(cmd.arg1()), - static_cast<GLsizeiptr>(cmd.arg2()), reinterpret_cast<GLvoid*>(const_cast<char *>(cmd.data().data())) - ); - break; - case glesv2debugger::Message_Function_glCheckFramebufferStatus: - msg.set_ret(static_cast<int>(dbg->hooks->gl.glCheckFramebufferStatus( - static_cast<GLenum>(cmd.arg0())))); - if (cmd.has_ret()) - ret = reinterpret_cast<int *>(msg.ret()); - break; - case glesv2debugger::Message_Function_glClear: - dbg->hooks->gl.glClear( - static_cast<GLbitfield>(cmd.arg0())); - break; - case glesv2debugger::Message_Function_glClearColor: - dbg->hooks->gl.glClearColor( - static_cast<GLclampf>(cmd.arg0()), static_cast<GLclampf>(cmd.arg1()), - static_cast<GLclampf>(cmd.arg2()), static_cast<GLclampf>(cmd.arg3()) - ); - break; - case glesv2debugger::Message_Function_glClearDepthf: - dbg->hooks->gl.glClearDepthf( - static_cast<GLclampf>(cmd.arg0())); - break; - case glesv2debugger::Message_Function_glClearStencil: - dbg->hooks->gl.glClearStencil( - static_cast<GLint>(cmd.arg0())); - break; - case glesv2debugger::Message_Function_glColorMask: - dbg->hooks->gl.glColorMask( - GLboolean(cmd.arg0()), GLboolean(cmd.arg1()), GLboolean(cmd.arg2()), - GLboolean(cmd.arg3())); - break; - case glesv2debugger::Message_Function_glCompileShader: - dbg->hooks->gl.glCompileShader( - static_cast<GLuint>(cmd.arg0())); - break; - case glesv2debugger::Message_Function_glCompressedTexImage2D: - ret = GenerateCall_glCompressedTexImage2D(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glCompressedTexSubImage2D: - ret = GenerateCall_glCompressedTexSubImage2D(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glCopyTexImage2D: - dbg->hooks->gl.glCopyTexImage2D( - static_cast<GLenum>(cmd.arg0()), static_cast<GLint>(cmd.arg1()), - static_cast<GLenum>(cmd.arg2()), static_cast<GLint>(cmd.arg3()), - static_cast<GLint>(cmd.arg4()), static_cast<GLsizei>(cmd.arg5()), - static_cast<GLsizei>(cmd.arg6()), static_cast<GLint>(cmd.arg7()) - ); - break; - case glesv2debugger::Message_Function_glCopyTexSubImage2D: - dbg->hooks->gl.glCopyTexSubImage2D( - static_cast<GLenum>(cmd.arg0()), static_cast<GLint>(cmd.arg1()), - static_cast<GLint>(cmd.arg2()), static_cast<GLint>(cmd.arg3()), - static_cast<GLint>(cmd.arg4()), static_cast<GLint>(cmd.arg5()), - static_cast<GLsizei>(cmd.arg6()), static_cast<GLsizei>(cmd.arg7()) - ); - break; - case glesv2debugger::Message_Function_glCreateProgram: - msg.set_ret(static_cast<int>(dbg->hooks->gl.glCreateProgram( - ))); - if (cmd.has_ret()) - ret = reinterpret_cast<int *>(msg.ret()); - break; - case glesv2debugger::Message_Function_glCreateShader: - msg.set_ret(static_cast<int>(dbg->hooks->gl.glCreateShader( - static_cast<GLenum>(cmd.arg0())))); - if (cmd.has_ret()) - ret = reinterpret_cast<int *>(msg.ret()); - break; - case glesv2debugger::Message_Function_glCullFace: - dbg->hooks->gl.glCullFace( - static_cast<GLenum>(cmd.arg0())); - break; - case glesv2debugger::Message_Function_glDeleteBuffers: - dbg->hooks->gl.glDeleteBuffers( - static_cast<GLsizei>(cmd.arg0()), reinterpret_cast<GLuint*>(const_cast<char *>(cmd.data().data())) - ); - break; - case glesv2debugger::Message_Function_glDeleteFramebuffers: - dbg->hooks->gl.glDeleteFramebuffers( - static_cast<GLsizei>(cmd.arg0()), reinterpret_cast<GLuint*>(const_cast<char *>(cmd.data().data())) - ); - break; - case glesv2debugger::Message_Function_glDeleteProgram: - dbg->hooks->gl.glDeleteProgram( - static_cast<GLuint>(cmd.arg0())); - break; - case glesv2debugger::Message_Function_glDeleteRenderbuffers: - dbg->hooks->gl.glDeleteRenderbuffers( - static_cast<GLsizei>(cmd.arg0()), reinterpret_cast<GLuint*>(const_cast<char *>(cmd.data().data())) - ); - break; - case glesv2debugger::Message_Function_glDeleteShader: - dbg->hooks->gl.glDeleteShader( - static_cast<GLuint>(cmd.arg0())); - break; - case glesv2debugger::Message_Function_glDeleteTextures: - dbg->hooks->gl.glDeleteTextures( - static_cast<GLsizei>(cmd.arg0()), reinterpret_cast<GLuint*>(const_cast<char *>(cmd.data().data())) - ); - break; - case glesv2debugger::Message_Function_glDepthFunc: - dbg->hooks->gl.glDepthFunc( - static_cast<GLenum>(cmd.arg0())); - break; - case glesv2debugger::Message_Function_glDepthMask: - dbg->hooks->gl.glDepthMask( - GLboolean(cmd.arg0())); - break; - case glesv2debugger::Message_Function_glDepthRangef: - dbg->hooks->gl.glDepthRangef( - static_cast<GLclampf>(cmd.arg0()), static_cast<GLclampf>(cmd.arg1()) - ); - break; - case glesv2debugger::Message_Function_glDetachShader: - dbg->hooks->gl.glDetachShader( - static_cast<GLuint>(cmd.arg0()), static_cast<GLuint>(cmd.arg1()) - ); - break; - case glesv2debugger::Message_Function_glDisable: - dbg->hooks->gl.glDisable( - static_cast<GLenum>(cmd.arg0())); - break; - case glesv2debugger::Message_Function_glDisableVertexAttribArray: - dbg->hooks->gl.glDisableVertexAttribArray( - static_cast<GLuint>(cmd.arg0())); - break; - case glesv2debugger::Message_Function_glDrawArrays: - dbg->hooks->gl.glDrawArrays( - static_cast<GLenum>(cmd.arg0()), static_cast<GLint>(cmd.arg1()), - static_cast<GLsizei>(cmd.arg2())); - break; - case glesv2debugger::Message_Function_glDrawElements: - ret = GenerateCall_glDrawElements(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glEnable: - dbg->hooks->gl.glEnable( - static_cast<GLenum>(cmd.arg0())); - break; - case glesv2debugger::Message_Function_glEnableVertexAttribArray: - dbg->hooks->gl.glEnableVertexAttribArray( - static_cast<GLuint>(cmd.arg0())); - break; - case glesv2debugger::Message_Function_glFinish: - dbg->hooks->gl.glFinish( - ); - break; - case glesv2debugger::Message_Function_glFlush: - dbg->hooks->gl.glFlush( - ); - break; - case glesv2debugger::Message_Function_glFramebufferRenderbuffer: - dbg->hooks->gl.glFramebufferRenderbuffer( - static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1()), - static_cast<GLenum>(cmd.arg2()), static_cast<GLuint>(cmd.arg3()) - ); - break; - case glesv2debugger::Message_Function_glFramebufferTexture2D: - dbg->hooks->gl.glFramebufferTexture2D( - static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1()), - static_cast<GLenum>(cmd.arg2()), static_cast<GLuint>(cmd.arg3()), - static_cast<GLint>(cmd.arg4())); - break; - case glesv2debugger::Message_Function_glFrontFace: - dbg->hooks->gl.glFrontFace( - static_cast<GLenum>(cmd.arg0())); - break; - case glesv2debugger::Message_Function_glGenBuffers: - ret = GenerateCall_glGenBuffers(dbg, cmd, msg, prevRet); - break; // annotated output pointers - case glesv2debugger::Message_Function_glGenerateMipmap: - dbg->hooks->gl.glGenerateMipmap( - static_cast<GLenum>(cmd.arg0())); - break; - case glesv2debugger::Message_Function_glGenFramebuffers: - ret = GenerateCall_glGenFramebuffers(dbg, cmd, msg, prevRet); - break; // annotated output pointers - case glesv2debugger::Message_Function_glGenRenderbuffers: - ret = GenerateCall_glGenRenderbuffers(dbg, cmd, msg, prevRet); - break; // annotated output pointers - case glesv2debugger::Message_Function_glGenTextures: - ret = GenerateCall_glGenTextures(dbg, cmd, msg, prevRet); - break; // annotated output pointers - case glesv2debugger::Message_Function_glGetActiveAttrib: - ret = GenerateCall_glGetActiveAttrib(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glGetActiveUniform: - ret = GenerateCall_glGetActiveUniform(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glGetAttachedShaders: - ret = GenerateCall_glGetAttachedShaders(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glGetAttribLocation: - msg.set_ret(static_cast<int>(dbg->hooks->gl.glGetAttribLocation( - static_cast<GLuint>(cmd.arg0()), reinterpret_cast<GLchar*>(const_cast<char *>(cmd.data().data())) - ))); - if (cmd.has_ret()) - ret = reinterpret_cast<int *>(msg.ret()); - break; - case glesv2debugger::Message_Function_glGetBooleanv: - ret = GenerateCall_glGetBooleanv(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glGetBufferParameteriv: - ret = GenerateCall_glGetBufferParameteriv(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glGetError: - msg.set_ret(static_cast<int>(dbg->hooks->gl.glGetError( - ))); - if (cmd.has_ret()) - ret = reinterpret_cast<int *>(msg.ret()); - break; - case glesv2debugger::Message_Function_glGetFloatv: - ret = GenerateCall_glGetFloatv(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glGetFramebufferAttachmentParameteriv: - ret = GenerateCall_glGetFramebufferAttachmentParameteriv(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glGetIntegerv: - ret = GenerateCall_glGetIntegerv(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glGetProgramiv: - ret = GenerateCall_glGetProgramiv(dbg, cmd, msg, prevRet); - break; // annotated output pointers - case glesv2debugger::Message_Function_glGetProgramInfoLog: - ret = GenerateCall_glGetProgramInfoLog(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glGetRenderbufferParameteriv: - ret = GenerateCall_glGetRenderbufferParameteriv(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glGetShaderiv: - ret = GenerateCall_glGetShaderiv(dbg, cmd, msg, prevRet); - break; // annotated output pointers - case glesv2debugger::Message_Function_glGetShaderInfoLog: - ret = GenerateCall_glGetShaderInfoLog(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glGetShaderPrecisionFormat: - ret = GenerateCall_glGetShaderPrecisionFormat(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glGetShaderSource: - ret = GenerateCall_glGetShaderSource(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glGetString: - ret = GenerateCall_glGetString(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glGetTexParameterfv: - ret = GenerateCall_glGetTexParameterfv(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glGetTexParameteriv: - ret = GenerateCall_glGetTexParameteriv(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glGetUniformfv: - ret = GenerateCall_glGetUniformfv(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glGetUniformiv: - ret = GenerateCall_glGetUniformiv(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glGetUniformLocation: - msg.set_ret(static_cast<int>(dbg->hooks->gl.glGetUniformLocation( - static_cast<GLuint>(cmd.arg0()), reinterpret_cast<GLchar*>(const_cast<char *>(cmd.data().data())) - ))); - if (cmd.has_ret()) - ret = reinterpret_cast<int *>(msg.ret()); - break; - case glesv2debugger::Message_Function_glGetVertexAttribfv: - ret = GenerateCall_glGetVertexAttribfv(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glGetVertexAttribiv: - ret = GenerateCall_glGetVertexAttribiv(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glGetVertexAttribPointerv: - ret = GenerateCall_glGetVertexAttribPointerv(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glHint: - dbg->hooks->gl.glHint( - static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1()) - ); - break; - case glesv2debugger::Message_Function_glIsBuffer: - msg.set_ret(static_cast<int>(dbg->hooks->gl.glIsBuffer( - static_cast<GLuint>(cmd.arg0())))); - if (cmd.has_ret()) - ret = reinterpret_cast<int *>(msg.ret()); - break; - case glesv2debugger::Message_Function_glIsEnabled: - msg.set_ret(static_cast<int>(dbg->hooks->gl.glIsEnabled( - static_cast<GLenum>(cmd.arg0())))); - if (cmd.has_ret()) - ret = reinterpret_cast<int *>(msg.ret()); - break; - case glesv2debugger::Message_Function_glIsFramebuffer: - msg.set_ret(static_cast<int>(dbg->hooks->gl.glIsFramebuffer( - static_cast<GLuint>(cmd.arg0())))); - if (cmd.has_ret()) - ret = reinterpret_cast<int *>(msg.ret()); - break; - case glesv2debugger::Message_Function_glIsProgram: - msg.set_ret(static_cast<int>(dbg->hooks->gl.glIsProgram( - static_cast<GLuint>(cmd.arg0())))); - if (cmd.has_ret()) - ret = reinterpret_cast<int *>(msg.ret()); - break; - case glesv2debugger::Message_Function_glIsRenderbuffer: - msg.set_ret(static_cast<int>(dbg->hooks->gl.glIsRenderbuffer( - static_cast<GLuint>(cmd.arg0())))); - if (cmd.has_ret()) - ret = reinterpret_cast<int *>(msg.ret()); - break; - case glesv2debugger::Message_Function_glIsShader: - msg.set_ret(static_cast<int>(dbg->hooks->gl.glIsShader( - static_cast<GLuint>(cmd.arg0())))); - if (cmd.has_ret()) - ret = reinterpret_cast<int *>(msg.ret()); - break; - case glesv2debugger::Message_Function_glIsTexture: - msg.set_ret(static_cast<int>(dbg->hooks->gl.glIsTexture( - static_cast<GLuint>(cmd.arg0())))); - if (cmd.has_ret()) - ret = reinterpret_cast<int *>(msg.ret()); - break; - case glesv2debugger::Message_Function_glLineWidth: - dbg->hooks->gl.glLineWidth( - static_cast<GLfloat>(cmd.arg0())); - break; - case glesv2debugger::Message_Function_glLinkProgram: - dbg->hooks->gl.glLinkProgram( - static_cast<GLuint>(cmd.arg0())); - break; - case glesv2debugger::Message_Function_glPixelStorei: - dbg->hooks->gl.glPixelStorei( - static_cast<GLenum>(cmd.arg0()), static_cast<GLint>(cmd.arg1()) - ); - break; - case glesv2debugger::Message_Function_glPolygonOffset: - dbg->hooks->gl.glPolygonOffset( - static_cast<GLfloat>(cmd.arg0()), static_cast<GLfloat>(cmd.arg1()) - ); - break; - case glesv2debugger::Message_Function_glReadPixels: - ret = GenerateCall_glReadPixels(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glReleaseShaderCompiler: - dbg->hooks->gl.glReleaseShaderCompiler( - ); - break; - case glesv2debugger::Message_Function_glRenderbufferStorage: - dbg->hooks->gl.glRenderbufferStorage( - static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1()), - static_cast<GLsizei>(cmd.arg2()), static_cast<GLsizei>(cmd.arg3()) - ); - break; - case glesv2debugger::Message_Function_glSampleCoverage: - dbg->hooks->gl.glSampleCoverage( - static_cast<GLclampf>(cmd.arg0()), GLboolean(cmd.arg1())); - break; - case glesv2debugger::Message_Function_glScissor: - dbg->hooks->gl.glScissor( - static_cast<GLint>(cmd.arg0()), static_cast<GLint>(cmd.arg1()), - static_cast<GLsizei>(cmd.arg2()), static_cast<GLsizei>(cmd.arg3()) - ); - break; - case glesv2debugger::Message_Function_glShaderBinary: - ret = GenerateCall_glShaderBinary(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glShaderSource: - ret = GenerateCall_glShaderSource(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glStencilFunc: - dbg->hooks->gl.glStencilFunc( - static_cast<GLenum>(cmd.arg0()), static_cast<GLint>(cmd.arg1()), - static_cast<GLuint>(cmd.arg2())); - break; - case glesv2debugger::Message_Function_glStencilFuncSeparate: - dbg->hooks->gl.glStencilFuncSeparate( - static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1()), - static_cast<GLint>(cmd.arg2()), static_cast<GLuint>(cmd.arg3()) - ); - break; - case glesv2debugger::Message_Function_glStencilMask: - dbg->hooks->gl.glStencilMask( - static_cast<GLuint>(cmd.arg0())); - break; - case glesv2debugger::Message_Function_glStencilMaskSeparate: - dbg->hooks->gl.glStencilMaskSeparate( - static_cast<GLenum>(cmd.arg0()), static_cast<GLuint>(cmd.arg1()) - ); - break; - case glesv2debugger::Message_Function_glStencilOp: - dbg->hooks->gl.glStencilOp( - static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1()), - static_cast<GLenum>(cmd.arg2())); - break; - case glesv2debugger::Message_Function_glStencilOpSeparate: - dbg->hooks->gl.glStencilOpSeparate( - static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1()), - static_cast<GLenum>(cmd.arg2()), static_cast<GLenum>(cmd.arg3()) - ); - break; - case glesv2debugger::Message_Function_glTexImage2D: - ret = GenerateCall_glTexImage2D(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glTexParameterf: - dbg->hooks->gl.glTexParameterf( - static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1()), - static_cast<GLfloat>(cmd.arg2())); - break; - case glesv2debugger::Message_Function_glTexParameterfv: - ret = GenerateCall_glTexParameterfv(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glTexParameteri: - dbg->hooks->gl.glTexParameteri( - static_cast<GLenum>(cmd.arg0()), static_cast<GLenum>(cmd.arg1()), - static_cast<GLint>(cmd.arg2())); - break; - case glesv2debugger::Message_Function_glTexParameteriv: - ret = GenerateCall_glTexParameteriv(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glTexSubImage2D: - ret = GenerateCall_glTexSubImage2D(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glUniform1f: - dbg->hooks->gl.glUniform1f( - static_cast<GLint>(cmd.arg0()), static_cast<GLfloat>(cmd.arg1()) - ); - break; - case glesv2debugger::Message_Function_glUniform1fv: - dbg->hooks->gl.glUniform1fv( - static_cast<GLint>(cmd.arg0()), static_cast<GLsizei>(cmd.arg1()), - reinterpret_cast<GLfloat*>(const_cast<char *>(cmd.data().data())) - ); - break; - case glesv2debugger::Message_Function_glUniform1i: - dbg->hooks->gl.glUniform1i( - static_cast<GLint>(cmd.arg0()), static_cast<GLint>(cmd.arg1()) - ); - break; - case glesv2debugger::Message_Function_glUniform1iv: - dbg->hooks->gl.glUniform1iv( - static_cast<GLint>(cmd.arg0()), static_cast<GLsizei>(cmd.arg1()), - reinterpret_cast<GLint*>(const_cast<char *>(cmd.data().data())) - ); - break; - case glesv2debugger::Message_Function_glUniform2f: - dbg->hooks->gl.glUniform2f( - static_cast<GLint>(cmd.arg0()), static_cast<GLfloat>(cmd.arg1()), - static_cast<GLfloat>(cmd.arg2())); - break; - case glesv2debugger::Message_Function_glUniform2fv: - dbg->hooks->gl.glUniform2fv( - static_cast<GLint>(cmd.arg0()), static_cast<GLsizei>(cmd.arg1()), - reinterpret_cast<GLfloat*>(const_cast<char *>(cmd.data().data())) - ); - break; - case glesv2debugger::Message_Function_glUniform2i: - dbg->hooks->gl.glUniform2i( - static_cast<GLint>(cmd.arg0()), static_cast<GLint>(cmd.arg1()), - static_cast<GLint>(cmd.arg2())); - break; - case glesv2debugger::Message_Function_glUniform2iv: - dbg->hooks->gl.glUniform2iv( - static_cast<GLint>(cmd.arg0()), static_cast<GLsizei>(cmd.arg1()), - reinterpret_cast<GLint*>(const_cast<char *>(cmd.data().data())) - ); - break; - case glesv2debugger::Message_Function_glUniform3f: - dbg->hooks->gl.glUniform3f( - static_cast<GLint>(cmd.arg0()), static_cast<GLfloat>(cmd.arg1()), - static_cast<GLfloat>(cmd.arg2()), static_cast<GLfloat>(cmd.arg3()) - ); - break; - case glesv2debugger::Message_Function_glUniform3fv: - dbg->hooks->gl.glUniform3fv( - static_cast<GLint>(cmd.arg0()), static_cast<GLsizei>(cmd.arg1()), - reinterpret_cast<GLfloat*>(const_cast<char *>(cmd.data().data())) - ); - break; - case glesv2debugger::Message_Function_glUniform3i: - dbg->hooks->gl.glUniform3i( - static_cast<GLint>(cmd.arg0()), static_cast<GLint>(cmd.arg1()), - static_cast<GLint>(cmd.arg2()), static_cast<GLint>(cmd.arg3()) - ); - break; - case glesv2debugger::Message_Function_glUniform3iv: - dbg->hooks->gl.glUniform3iv( - static_cast<GLint>(cmd.arg0()), static_cast<GLsizei>(cmd.arg1()), - reinterpret_cast<GLint*>(const_cast<char *>(cmd.data().data())) - ); - break; - case glesv2debugger::Message_Function_glUniform4f: - dbg->hooks->gl.glUniform4f( - static_cast<GLint>(cmd.arg0()), static_cast<GLfloat>(cmd.arg1()), - static_cast<GLfloat>(cmd.arg2()), static_cast<GLfloat>(cmd.arg3()), - static_cast<GLfloat>(cmd.arg4())); - break; - case glesv2debugger::Message_Function_glUniform4fv: - dbg->hooks->gl.glUniform4fv( - static_cast<GLint>(cmd.arg0()), static_cast<GLsizei>(cmd.arg1()), - reinterpret_cast<GLfloat*>(const_cast<char *>(cmd.data().data())) - ); - break; - case glesv2debugger::Message_Function_glUniform4i: - dbg->hooks->gl.glUniform4i( - static_cast<GLint>(cmd.arg0()), static_cast<GLint>(cmd.arg1()), - static_cast<GLint>(cmd.arg2()), static_cast<GLint>(cmd.arg3()), - static_cast<GLint>(cmd.arg4())); - break; - case glesv2debugger::Message_Function_glUniform4iv: - dbg->hooks->gl.glUniform4iv( - static_cast<GLint>(cmd.arg0()), static_cast<GLsizei>(cmd.arg1()), - reinterpret_cast<GLint*>(const_cast<char *>(cmd.data().data())) - ); - break; - case glesv2debugger::Message_Function_glUniformMatrix2fv: - dbg->hooks->gl.glUniformMatrix2fv( - static_cast<GLint>(cmd.arg0()), static_cast<GLsizei>(cmd.arg1()), - GLboolean(cmd.arg2()), reinterpret_cast<GLfloat*>(const_cast<char *>(cmd.data().data())) - ); - break; - case glesv2debugger::Message_Function_glUniformMatrix3fv: - dbg->hooks->gl.glUniformMatrix3fv( - static_cast<GLint>(cmd.arg0()), static_cast<GLsizei>(cmd.arg1()), - GLboolean(cmd.arg2()), reinterpret_cast<GLfloat*>(const_cast<char *>(cmd.data().data())) - ); - break; - case glesv2debugger::Message_Function_glUniformMatrix4fv: - dbg->hooks->gl.glUniformMatrix4fv( - static_cast<GLint>(cmd.arg0()), static_cast<GLsizei>(cmd.arg1()), - GLboolean(cmd.arg2()), reinterpret_cast<GLfloat*>(const_cast<char *>(cmd.data().data())) - ); - break; - case glesv2debugger::Message_Function_glUseProgram: - dbg->hooks->gl.glUseProgram( - static_cast<GLuint>(cmd.arg0())); - break; - case glesv2debugger::Message_Function_glValidateProgram: - dbg->hooks->gl.glValidateProgram( - static_cast<GLuint>(cmd.arg0())); - break; - case glesv2debugger::Message_Function_glVertexAttrib1f: - dbg->hooks->gl.glVertexAttrib1f( - static_cast<GLuint>(cmd.arg0()), static_cast<GLfloat>(cmd.arg1()) - ); - break; - case glesv2debugger::Message_Function_glVertexAttrib1fv: - dbg->hooks->gl.glVertexAttrib1fv( - static_cast<GLuint>(cmd.arg0()), reinterpret_cast<GLfloat*>(const_cast<char *>(cmd.data().data())) - ); - break; - case glesv2debugger::Message_Function_glVertexAttrib2f: - dbg->hooks->gl.glVertexAttrib2f( - static_cast<GLuint>(cmd.arg0()), static_cast<GLfloat>(cmd.arg1()), - static_cast<GLfloat>(cmd.arg2())); - break; - case glesv2debugger::Message_Function_glVertexAttrib2fv: - dbg->hooks->gl.glVertexAttrib2fv( - static_cast<GLuint>(cmd.arg0()), reinterpret_cast<GLfloat*>(const_cast<char *>(cmd.data().data())) - ); - break; - case glesv2debugger::Message_Function_glVertexAttrib3f: - dbg->hooks->gl.glVertexAttrib3f( - static_cast<GLuint>(cmd.arg0()), static_cast<GLfloat>(cmd.arg1()), - static_cast<GLfloat>(cmd.arg2()), static_cast<GLfloat>(cmd.arg3()) - ); - break; - case glesv2debugger::Message_Function_glVertexAttrib3fv: - dbg->hooks->gl.glVertexAttrib3fv( - static_cast<GLuint>(cmd.arg0()), reinterpret_cast<GLfloat*>(const_cast<char *>(cmd.data().data())) - ); - break; - case glesv2debugger::Message_Function_glVertexAttrib4f: - dbg->hooks->gl.glVertexAttrib4f( - static_cast<GLuint>(cmd.arg0()), static_cast<GLfloat>(cmd.arg1()), - static_cast<GLfloat>(cmd.arg2()), static_cast<GLfloat>(cmd.arg3()), - static_cast<GLfloat>(cmd.arg4())); - break; - case glesv2debugger::Message_Function_glVertexAttrib4fv: - dbg->hooks->gl.glVertexAttrib4fv( - static_cast<GLuint>(cmd.arg0()), reinterpret_cast<GLfloat*>(const_cast<char *>(cmd.data().data())) - ); - break; - case glesv2debugger::Message_Function_glVertexAttribPointer: - ret = GenerateCall_glVertexAttribPointer(dbg, cmd, msg, prevRet); - break; - case glesv2debugger::Message_Function_glViewport: - dbg->hooks->gl.glViewport( - static_cast<GLint>(cmd.arg0()), static_cast<GLint>(cmd.arg1()), - static_cast<GLsizei>(cmd.arg2()), static_cast<GLsizei>(cmd.arg3()) - ); - break; - default: - assert(0); - } - msg.set_time((systemTime(timeMode) - c0) * 1e-6f); - msg.set_context_id(reinterpret_cast<int>(dbg)); - msg.set_function(cmd.function()); - msg.set_type(glesv2debugger::Message_Type_AfterGeneratedCall); - return ret; -} - -}; // name space android { diff --git a/opengl/libs/GLES2_dbg/src/caller.h b/opengl/libs/GLES2_dbg/src/caller.h deleted file mode 100644 index e8111b3..0000000 --- a/opengl/libs/GLES2_dbg/src/caller.h +++ /dev/null @@ -1,330 +0,0 @@ -/* - ** Copyright 2011, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License") - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -static const int * GenerateCall_glCompressedTexImage2D(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glCompressedTexSubImage2D(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glDrawElements(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGenBuffers(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGenFramebuffers(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGenRenderbuffers(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGenTextures(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGetActiveAttrib(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGetActiveUniform(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGetAttachedShaders(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGetBooleanv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGetBufferParameteriv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGetFloatv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGetFramebufferAttachmentParameteriv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGetIntegerv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGetProgramiv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - GLint params = -1; - dbg->hooks->gl.glGetProgramiv(cmd.arg0(), cmd.arg1(), ¶ms); - msg.mutable_data()->append(reinterpret_cast<char *>(¶ms), sizeof(params)); - return prevRet; -} - -static const int * GenerateCall_glGetProgramInfoLog(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - const GLsizei bufSize = static_cast<GLsizei>(dbg->GetBufferSize()); - GLsizei length = -1; - dbg->hooks->gl.glGetProgramInfoLog(cmd.arg0(), bufSize, &length, dbg->GetBuffer()); - msg.mutable_data()->append(dbg->GetBuffer(), length); - return prevRet; -} - -static const int * GenerateCall_glGetRenderbufferParameteriv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGetShaderiv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - GLint params = -1; - dbg->hooks->gl.glGetShaderiv(cmd.arg0(), cmd.arg1(), ¶ms); - msg.mutable_data()->append(reinterpret_cast<char *>(¶ms), sizeof(params)); - return prevRet; -} - -static const int * GenerateCall_glGetShaderInfoLog(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - const GLsizei bufSize = static_cast<GLsizei>(dbg->GetBufferSize()); - GLsizei length = -1; - dbg->hooks->gl.glGetShaderInfoLog(cmd.arg0(), bufSize, &length, dbg->GetBuffer()); - msg.mutable_data()->append(dbg->GetBuffer(), length); - return prevRet; -} - -static const int * GenerateCall_glGetShaderPrecisionFormat(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGetShaderSource(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGetString(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGetTexParameterfv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGetTexParameteriv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGetUniformfv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGetUniformiv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGetVertexAttribfv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGetVertexAttribiv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glGetVertexAttribPointerv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glReadPixels(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glShaderBinary(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glShaderSource(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - const char * string = cmd.data().data(); - dbg->hooks->gl.glShaderSource(cmd.arg0(), 1, &string, NULL); - return prevRet; -} - -static const int * GenerateCall_glTexImage2D(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glTexParameterfv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glTexParameteriv(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glTexSubImage2D(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} - -static const int * GenerateCall_glVertexAttribPointer(DbgContext * const dbg, - const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet) -{ - assert(0); - return prevRet; -} diff --git a/opengl/libs/GLES2_dbg/src/dbgcontext.cpp b/opengl/libs/GLES2_dbg/src/dbgcontext.cpp deleted file mode 100644 index 41061e1..0000000 --- a/opengl/libs/GLES2_dbg/src/dbgcontext.cpp +++ /dev/null @@ -1,427 +0,0 @@ -/* - ** Copyright 2011, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#include "header.h" - -extern "C" { -#include "liblzf/lzf.h" -} - -namespace android { - -static pthread_key_t dbgEGLThreadLocalStorageKey = -1; -static pthread_mutex_t gThreadLocalStorageKeyMutex = PTHREAD_MUTEX_INITIALIZER; - -DbgContext * getDbgContextThreadSpecific() { - return (DbgContext*)pthread_getspecific(dbgEGLThreadLocalStorageKey); -} - -DbgContext::DbgContext(const unsigned version, const gl_hooks_t * const hooks, - const unsigned MAX_VERTEX_ATTRIBS) - : lzf_buf(NULL), lzf_readIndex(0), lzf_refSize(0), lzf_refBufSize(0) - , version(version), hooks(hooks) - , MAX_VERTEX_ATTRIBS(MAX_VERTEX_ATTRIBS) - , readBytesPerPixel(4) - , captureSwap(0), captureDraw(0) - , vertexAttribs(new VertexAttrib[MAX_VERTEX_ATTRIBS]) - , hasNonVBOAttribs(false), indexBuffers(NULL), indexBuffer(NULL) - , program(0), maxAttrib(0) -{ - lzf_ref[0] = lzf_ref[1] = NULL; - for (unsigned i = 0; i < MAX_VERTEX_ATTRIBS; i++) - vertexAttribs[i] = VertexAttrib(); - memset(&expectResponse, 0, sizeof(expectResponse)); -} - -DbgContext::~DbgContext() -{ - delete vertexAttribs; - free(lzf_buf); - free(lzf_ref[0]); - free(lzf_ref[1]); -} - -DbgContext* CreateDbgContext(const unsigned version, const gl_hooks_t * const hooks) -{ - pthread_mutex_lock(&gThreadLocalStorageKeyMutex); - if (dbgEGLThreadLocalStorageKey == -1) - pthread_key_create(&dbgEGLThreadLocalStorageKey, NULL); - pthread_mutex_unlock(&gThreadLocalStorageKeyMutex); - - assert(version < 2); - assert(GL_NO_ERROR == hooks->gl.glGetError()); - GLint MAX_VERTEX_ATTRIBS = 0; - hooks->gl.glGetIntegerv(GL_MAX_VERTEX_ATTRIBS, &MAX_VERTEX_ATTRIBS); - DbgContext* dbg = new DbgContext(version, hooks, MAX_VERTEX_ATTRIBS); - glesv2debugger::Message msg, cmd; - msg.set_context_id(reinterpret_cast<int>(dbg)); - msg.set_expect_response(false); - msg.set_type(msg.Response); - msg.set_function(msg.SETPROP); - msg.set_prop(msg.GLConstant); - msg.set_arg0(GL_MAX_VERTEX_ATTRIBS); - msg.set_arg1(MAX_VERTEX_ATTRIBS); - Send(msg, cmd); - - GLint MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0; - hooks->gl.glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &MAX_COMBINED_TEXTURE_IMAGE_UNITS); - msg.set_arg0(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS); - msg.set_arg1(MAX_COMBINED_TEXTURE_IMAGE_UNITS); - Send(msg, cmd); - - pthread_setspecific(dbgEGLThreadLocalStorageKey, dbg); - return dbg; -} - -void dbgReleaseThread() { - delete getDbgContextThreadSpecific(); -} - -unsigned GetBytesPerPixel(const GLenum format, const GLenum type) -{ - switch (type) { - case GL_UNSIGNED_SHORT_5_6_5: - case GL_UNSIGNED_SHORT_4_4_4_4: - case GL_UNSIGNED_SHORT_5_5_5_1: - return 2; - case GL_UNSIGNED_BYTE: - break; - default: - LOGE("GetBytesPerPixel: unknown type %x", type); - } - - switch (format) { - case GL_ALPHA: - case GL_LUMINANCE: - return 1; - case GL_LUMINANCE_ALPHA: - return 2; - case GL_RGB: - return 3; - case GL_RGBA: - case 0x80E1: // GL_BGRA_EXT - return 4; - default: - LOGE("GetBytesPerPixel: unknown format %x", format); - } - - return 1; // in doubt... -} - -void DbgContext::Fetch(const unsigned index, std::string * const data) const -{ - // VBO data is already on client, just send user pointer data - for (unsigned i = 0; i < maxAttrib; i++) { - if (!vertexAttribs[i].enabled) - continue; - if (vertexAttribs[i].buffer > 0) - continue; - const char * ptr = (const char *)vertexAttribs[i].ptr; - ptr += index * vertexAttribs[i].stride; - data->append(ptr, vertexAttribs[i].elemSize); - } -} - -void DbgContext::Compress(const void * in_data, unsigned int in_len, - std::string * const outStr) -{ - if (!lzf_buf) - lzf_buf = (char *)malloc(LZF_CHUNK_SIZE); - assert(lzf_buf); - const uint32_t totalDecompSize = in_len; - outStr->append((const char *)&totalDecompSize, sizeof(totalDecompSize)); - for (unsigned int i = 0; i < in_len; i += LZF_CHUNK_SIZE) { - uint32_t chunkSize = LZF_CHUNK_SIZE; - if (i + LZF_CHUNK_SIZE > in_len) - chunkSize = in_len - i; - const uint32_t compSize = lzf_compress((const char *)in_data + i, chunkSize, - lzf_buf, LZF_CHUNK_SIZE); - outStr->append((const char *)&chunkSize, sizeof(chunkSize)); - outStr->append((const char *)&compSize, sizeof(compSize)); - if (compSize > 0) - outStr->append(lzf_buf, compSize); - else // compressed chunk bigger than LZF_CHUNK_SIZE (and uncompressed) - outStr->append((const char *)in_data + i, chunkSize); - } -} - -unsigned char * DbgContext::Decompress(const void * in, const unsigned int inLen, - unsigned int * const outLen) -{ - assert(inLen > 4 * 3); - if (inLen < 4 * 3) - return NULL; - *outLen = *(uint32_t *)in; - unsigned char * const out = (unsigned char *)malloc(*outLen); - unsigned int outPos = 0; - const unsigned char * const end = (const unsigned char *)in + inLen; - for (const unsigned char * inData = (const unsigned char *)in + 4; inData < end; ) { - const uint32_t chunkOut = *(uint32_t *)inData; - inData += 4; - const uint32_t chunkIn = *(uint32_t *)inData; - inData += 4; - if (chunkIn > 0) { - assert(inData + chunkIn <= end); - assert(outPos + chunkOut <= *outLen); - outPos += lzf_decompress(inData, chunkIn, out + outPos, chunkOut); - inData += chunkIn; - } else { - assert(inData + chunkOut <= end); - assert(outPos + chunkOut <= *outLen); - memcpy(out + outPos, inData, chunkOut); - inData += chunkOut; - outPos += chunkOut; - } - } - return out; -} - -void * DbgContext::GetReadPixelsBuffer(const unsigned size) -{ - if (lzf_refBufSize < size + 8) { - lzf_refBufSize = size + 8; - lzf_ref[0] = (unsigned *)realloc(lzf_ref[0], lzf_refBufSize); - assert(lzf_ref[0]); - memset(lzf_ref[0], 0, lzf_refBufSize); - lzf_ref[1] = (unsigned *)realloc(lzf_ref[1], lzf_refBufSize); - assert(lzf_ref[1]); - memset(lzf_ref[1], 0, lzf_refBufSize); - } - if (lzf_refSize != size) // need to clear unused ref to maintain consistency - { // since ref and src are swapped each time - memset((char *)lzf_ref[0] + lzf_refSize, 0, lzf_refBufSize - lzf_refSize); - memset((char *)lzf_ref[1] + lzf_refSize, 0, lzf_refBufSize - lzf_refSize); - } - lzf_refSize = size; - lzf_readIndex ^= 1; - return lzf_ref[lzf_readIndex]; -} - -void DbgContext::CompressReadPixelBuffer(std::string * const outStr) -{ - assert(lzf_ref[0] && lzf_ref[1]); - unsigned * const ref = lzf_ref[lzf_readIndex ^ 1]; - unsigned * const src = lzf_ref[lzf_readIndex]; - for (unsigned i = 0; i < lzf_refSize / sizeof(*ref) + 1; i++) - ref[i] ^= src[i]; - Compress(ref, lzf_refSize, outStr); -} - -char * DbgContext::GetBuffer() -{ - if (!lzf_buf) - lzf_buf = (char *)malloc(LZF_CHUNK_SIZE); - assert(lzf_buf); - return lzf_buf; -} - -unsigned int DbgContext::GetBufferSize() -{ - if (!lzf_buf) - lzf_buf = (char *)malloc(LZF_CHUNK_SIZE); - assert(lzf_buf); - if (lzf_buf) - return LZF_CHUNK_SIZE; - else - return 0; -} - -void DbgContext::glUseProgram(GLuint program) -{ - while (GLenum error = hooks->gl.glGetError()) - LOGD("DbgContext::glUseProgram(%u): before glGetError() = 0x%.4X", - program, error); - this->program = program; - maxAttrib = 0; - if (program == 0) - return; - GLint activeAttributes = 0; - hooks->gl.glGetProgramiv(program, GL_ACTIVE_ATTRIBUTES, &activeAttributes); - maxAttrib = 0; - GLint maxNameLen = -1; - hooks->gl.glGetProgramiv(program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &maxNameLen); - char * name = new char [maxNameLen + 1]; - name[maxNameLen] = 0; - // find total number of attribute slots used - for (unsigned i = 0; i < activeAttributes; i++) { - GLint size = -1; - GLenum type = -1; - hooks->gl.glGetActiveAttrib(program, i, maxNameLen + 1, NULL, &size, &type, name); - GLint slot = hooks->gl.glGetAttribLocation(program, name); - assert(slot >= 0); - switch (type) { - case GL_FLOAT: - case GL_FLOAT_VEC2: - case GL_FLOAT_VEC3: - case GL_FLOAT_VEC4: - slot += size; - break; - case GL_FLOAT_MAT2: - slot += size * 2; - break; - case GL_FLOAT_MAT3: - slot += size * 3; - break; - case GL_FLOAT_MAT4: - slot += size * 4; - break; - default: - assert(0); - } - if (slot > maxAttrib) - maxAttrib = slot; - } - delete name; - while (GLenum error = hooks->gl.glGetError()) - LOGD("DbgContext::glUseProgram(%u): after glGetError() = 0x%.4X", - program, error); -} - -static bool HasNonVBOAttribs(const DbgContext * const ctx) -{ - bool need = false; - for (unsigned i = 0; !need && i < ctx->maxAttrib; i++) - if (ctx->vertexAttribs[i].enabled && ctx->vertexAttribs[i].buffer == 0) - need = true; - return need; -} - -void DbgContext::glVertexAttribPointer(GLuint indx, GLint size, GLenum type, - GLboolean normalized, GLsizei stride, const GLvoid* ptr) -{ - assert(GL_NO_ERROR == hooks->gl.glGetError()); - assert(indx < MAX_VERTEX_ATTRIBS); - vertexAttribs[indx].size = size; - vertexAttribs[indx].type = type; - vertexAttribs[indx].normalized = normalized; - switch (type) { - case GL_FLOAT: - vertexAttribs[indx].elemSize = sizeof(GLfloat) * size; - break; - case GL_INT: - case GL_UNSIGNED_INT: - vertexAttribs[indx].elemSize = sizeof(GLint) * size; - break; - case GL_SHORT: - case GL_UNSIGNED_SHORT: - vertexAttribs[indx].elemSize = sizeof(GLshort) * size; - break; - case GL_BYTE: - case GL_UNSIGNED_BYTE: - vertexAttribs[indx].elemSize = sizeof(GLbyte) * size; - break; - default: - assert(0); - } - if (0 == stride) - stride = vertexAttribs[indx].elemSize; - vertexAttribs[indx].stride = stride; - vertexAttribs[indx].ptr = ptr; - hooks->gl.glGetVertexAttribiv(indx, GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING, - (GLint *)&vertexAttribs[indx].buffer); - hasNonVBOAttribs = HasNonVBOAttribs(this); -} - -void DbgContext::glEnableVertexAttribArray(GLuint index) -{ - if (index >= MAX_VERTEX_ATTRIBS) - return; - vertexAttribs[index].enabled = true; - hasNonVBOAttribs = HasNonVBOAttribs(this); -} - -void DbgContext::glDisableVertexAttribArray(GLuint index) -{ - if (index >= MAX_VERTEX_ATTRIBS) - return; - vertexAttribs[index].enabled = false; - hasNonVBOAttribs = HasNonVBOAttribs(this); -} - -void DbgContext::glBindBuffer(GLenum target, GLuint buffer) -{ - if (GL_ELEMENT_ARRAY_BUFFER != target) - return; - if (0 == buffer) { - indexBuffer = NULL; - return; - } - VBO * b = indexBuffers; - indexBuffer = NULL; - while (b) { - if (b->name == buffer) { - assert(GL_ELEMENT_ARRAY_BUFFER == b->target); - indexBuffer = b; - break; - } - b = b->next; - } - if (!indexBuffer) - indexBuffer = indexBuffers = new VBO(buffer, target, indexBuffers); -} - -void DbgContext::glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage) -{ - if (GL_ELEMENT_ARRAY_BUFFER != target) - return; - assert(indexBuffer); - assert(size >= 0); - indexBuffer->size = size; - indexBuffer->data = realloc(indexBuffer->data, size); - memcpy(indexBuffer->data, data, size); -} - -void DbgContext::glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data) -{ - if (GL_ELEMENT_ARRAY_BUFFER != target) - return; - assert(indexBuffer); - assert(size >= 0); - assert(offset >= 0); - assert(offset + size <= indexBuffer->size); - memcpy((char *)indexBuffer->data + offset, data, size); -} - -void DbgContext::glDeleteBuffers(GLsizei n, const GLuint *buffers) -{ - for (unsigned i = 0; i < n; i++) { - for (unsigned j = 0; j < MAX_VERTEX_ATTRIBS; j++) - if (buffers[i] == vertexAttribs[j].buffer) { - vertexAttribs[j].buffer = 0; - vertexAttribs[j].enabled = false; - } - VBO * b = indexBuffers, * previous = NULL; - while (b) { - if (b->name == buffers[i]) { - assert(GL_ELEMENT_ARRAY_BUFFER == b->target); - if (indexBuffer == b) - indexBuffer = NULL; - if (previous) - previous->next = b->next; - else - indexBuffers = b->next; - free(b->data); - delete b; - break; - } - previous = b; - b = b->next; - } - } - hasNonVBOAttribs = HasNonVBOAttribs(this); -} - -}; // namespace android diff --git a/opengl/libs/GLES2_dbg/src/debugger_message.pb.cpp b/opengl/libs/GLES2_dbg/src/debugger_message.pb.cpp deleted file mode 100644 index 50f70f7..0000000 --- a/opengl/libs/GLES2_dbg/src/debugger_message.pb.cpp +++ /dev/null @@ -1,1455 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! - -#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION -#include "debugger_message.pb.h" -#include <google/protobuf/stubs/once.h> -#include <google/protobuf/io/coded_stream.h> -#include <google/protobuf/wire_format_lite_inl.h> -// @@protoc_insertion_point(includes) - -namespace com { -namespace android { -namespace glesv2debugger { - -void protobuf_ShutdownFile_debugger_5fmessage_2eproto() { - delete Message::default_instance_; -} - -void protobuf_AddDesc_debugger_5fmessage_2eproto() { - static bool already_here = false; - if (already_here) return; - already_here = true; - GOOGLE_PROTOBUF_VERIFY_VERSION; - - Message::default_instance_ = new Message(); - Message::default_instance_->InitAsDefaultInstance(); - ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_debugger_5fmessage_2eproto); -} - -// Force AddDescriptors() to be called at static initialization time. -struct StaticDescriptorInitializer_debugger_5fmessage_2eproto { - StaticDescriptorInitializer_debugger_5fmessage_2eproto() { - protobuf_AddDesc_debugger_5fmessage_2eproto(); - } -} static_descriptor_initializer_debugger_5fmessage_2eproto_; - - -// =================================================================== - -bool Message_Function_IsValid(int value) { - switch(value) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - case 19: - case 20: - case 21: - case 22: - case 23: - case 24: - case 25: - case 26: - case 27: - case 28: - case 29: - case 30: - case 31: - case 32: - case 33: - case 34: - case 35: - case 36: - case 37: - case 38: - case 39: - case 40: - case 41: - case 42: - case 43: - case 44: - case 45: - case 46: - case 47: - case 48: - case 49: - case 50: - case 51: - case 52: - case 53: - case 54: - case 55: - case 56: - case 57: - case 58: - case 59: - case 60: - case 61: - case 62: - case 63: - case 64: - case 65: - case 66: - case 67: - case 68: - case 69: - case 70: - case 71: - case 72: - case 73: - case 74: - case 75: - case 76: - case 77: - case 78: - case 79: - case 80: - case 81: - case 82: - case 83: - case 84: - case 85: - case 86: - case 87: - case 88: - case 89: - case 90: - case 91: - case 92: - case 93: - case 94: - case 95: - case 96: - case 97: - case 98: - case 99: - case 100: - case 101: - case 102: - case 103: - case 104: - case 105: - case 106: - case 107: - case 108: - case 109: - case 110: - case 111: - case 112: - case 113: - case 114: - case 115: - case 116: - case 117: - case 118: - case 119: - case 120: - case 121: - case 122: - case 123: - case 124: - case 125: - case 126: - case 127: - case 128: - case 129: - case 130: - case 131: - case 132: - case 133: - case 134: - case 135: - case 136: - case 137: - case 138: - case 139: - case 140: - case 141: - case 142: - case 143: - case 144: - case 145: - case 146: - case 147: - case 148: - case 149: - case 150: - case 151: - case 152: - case 153: - case 154: - case 155: - case 156: - case 157: - case 158: - case 159: - case 160: - case 161: - case 162: - case 163: - case 164: - case 165: - case 166: - case 167: - case 168: - case 169: - case 170: - case 171: - case 172: - case 173: - case 174: - case 175: - case 176: - case 177: - case 178: - case 179: - case 180: - case 181: - case 182: - case 183: - case 184: - case 185: - case 186: - case 187: - case 188: - case 189: - case 190: - return true; - default: - return false; - } -} - -#ifndef _MSC_VER -const Message_Function Message::glActiveTexture; -const Message_Function Message::glAttachShader; -const Message_Function Message::glBindAttribLocation; -const Message_Function Message::glBindBuffer; -const Message_Function Message::glBindFramebuffer; -const Message_Function Message::glBindRenderbuffer; -const Message_Function Message::glBindTexture; -const Message_Function Message::glBlendColor; -const Message_Function Message::glBlendEquation; -const Message_Function Message::glBlendEquationSeparate; -const Message_Function Message::glBlendFunc; -const Message_Function Message::glBlendFuncSeparate; -const Message_Function Message::glBufferData; -const Message_Function Message::glBufferSubData; -const Message_Function Message::glCheckFramebufferStatus; -const Message_Function Message::glClear; -const Message_Function Message::glClearColor; -const Message_Function Message::glClearDepthf; -const Message_Function Message::glClearStencil; -const Message_Function Message::glColorMask; -const Message_Function Message::glCompileShader; -const Message_Function Message::glCompressedTexImage2D; -const Message_Function Message::glCompressedTexSubImage2D; -const Message_Function Message::glCopyTexImage2D; -const Message_Function Message::glCopyTexSubImage2D; -const Message_Function Message::glCreateProgram; -const Message_Function Message::glCreateShader; -const Message_Function Message::glCullFace; -const Message_Function Message::glDeleteBuffers; -const Message_Function Message::glDeleteFramebuffers; -const Message_Function Message::glDeleteProgram; -const Message_Function Message::glDeleteRenderbuffers; -const Message_Function Message::glDeleteShader; -const Message_Function Message::glDeleteTextures; -const Message_Function Message::glDepthFunc; -const Message_Function Message::glDepthMask; -const Message_Function Message::glDepthRangef; -const Message_Function Message::glDetachShader; -const Message_Function Message::glDisable; -const Message_Function Message::glDisableVertexAttribArray; -const Message_Function Message::glDrawArrays; -const Message_Function Message::glDrawElements; -const Message_Function Message::glEnable; -const Message_Function Message::glEnableVertexAttribArray; -const Message_Function Message::glFinish; -const Message_Function Message::glFlush; -const Message_Function Message::glFramebufferRenderbuffer; -const Message_Function Message::glFramebufferTexture2D; -const Message_Function Message::glFrontFace; -const Message_Function Message::glGenBuffers; -const Message_Function Message::glGenerateMipmap; -const Message_Function Message::glGenFramebuffers; -const Message_Function Message::glGenRenderbuffers; -const Message_Function Message::glGenTextures; -const Message_Function Message::glGetActiveAttrib; -const Message_Function Message::glGetActiveUniform; -const Message_Function Message::glGetAttachedShaders; -const Message_Function Message::glGetAttribLocation; -const Message_Function Message::glGetBooleanv; -const Message_Function Message::glGetBufferParameteriv; -const Message_Function Message::glGetError; -const Message_Function Message::glGetFloatv; -const Message_Function Message::glGetFramebufferAttachmentParameteriv; -const Message_Function Message::glGetIntegerv; -const Message_Function Message::glGetProgramiv; -const Message_Function Message::glGetProgramInfoLog; -const Message_Function Message::glGetRenderbufferParameteriv; -const Message_Function Message::glGetShaderiv; -const Message_Function Message::glGetShaderInfoLog; -const Message_Function Message::glGetShaderPrecisionFormat; -const Message_Function Message::glGetShaderSource; -const Message_Function Message::glGetString; -const Message_Function Message::glGetTexParameterfv; -const Message_Function Message::glGetTexParameteriv; -const Message_Function Message::glGetUniformfv; -const Message_Function Message::glGetUniformiv; -const Message_Function Message::glGetUniformLocation; -const Message_Function Message::glGetVertexAttribfv; -const Message_Function Message::glGetVertexAttribiv; -const Message_Function Message::glGetVertexAttribPointerv; -const Message_Function Message::glHint; -const Message_Function Message::glIsBuffer; -const Message_Function Message::glIsEnabled; -const Message_Function Message::glIsFramebuffer; -const Message_Function Message::glIsProgram; -const Message_Function Message::glIsRenderbuffer; -const Message_Function Message::glIsShader; -const Message_Function Message::glIsTexture; -const Message_Function Message::glLineWidth; -const Message_Function Message::glLinkProgram; -const Message_Function Message::glPixelStorei; -const Message_Function Message::glPolygonOffset; -const Message_Function Message::glReadPixels; -const Message_Function Message::glReleaseShaderCompiler; -const Message_Function Message::glRenderbufferStorage; -const Message_Function Message::glSampleCoverage; -const Message_Function Message::glScissor; -const Message_Function Message::glShaderBinary; -const Message_Function Message::glShaderSource; -const Message_Function Message::glStencilFunc; -const Message_Function Message::glStencilFuncSeparate; -const Message_Function Message::glStencilMask; -const Message_Function Message::glStencilMaskSeparate; -const Message_Function Message::glStencilOp; -const Message_Function Message::glStencilOpSeparate; -const Message_Function Message::glTexImage2D; -const Message_Function Message::glTexParameterf; -const Message_Function Message::glTexParameterfv; -const Message_Function Message::glTexParameteri; -const Message_Function Message::glTexParameteriv; -const Message_Function Message::glTexSubImage2D; -const Message_Function Message::glUniform1f; -const Message_Function Message::glUniform1fv; -const Message_Function Message::glUniform1i; -const Message_Function Message::glUniform1iv; -const Message_Function Message::glUniform2f; -const Message_Function Message::glUniform2fv; -const Message_Function Message::glUniform2i; -const Message_Function Message::glUniform2iv; -const Message_Function Message::glUniform3f; -const Message_Function Message::glUniform3fv; -const Message_Function Message::glUniform3i; -const Message_Function Message::glUniform3iv; -const Message_Function Message::glUniform4f; -const Message_Function Message::glUniform4fv; -const Message_Function Message::glUniform4i; -const Message_Function Message::glUniform4iv; -const Message_Function Message::glUniformMatrix2fv; -const Message_Function Message::glUniformMatrix3fv; -const Message_Function Message::glUniformMatrix4fv; -const Message_Function Message::glUseProgram; -const Message_Function Message::glValidateProgram; -const Message_Function Message::glVertexAttrib1f; -const Message_Function Message::glVertexAttrib1fv; -const Message_Function Message::glVertexAttrib2f; -const Message_Function Message::glVertexAttrib2fv; -const Message_Function Message::glVertexAttrib3f; -const Message_Function Message::glVertexAttrib3fv; -const Message_Function Message::glVertexAttrib4f; -const Message_Function Message::glVertexAttrib4fv; -const Message_Function Message::glVertexAttribPointer; -const Message_Function Message::glViewport; -const Message_Function Message::eglGetDisplay; -const Message_Function Message::eglInitialize; -const Message_Function Message::eglTerminate; -const Message_Function Message::eglGetConfigs; -const Message_Function Message::eglChooseConfig; -const Message_Function Message::eglGetConfigAttrib; -const Message_Function Message::eglCreateWindowSurface; -const Message_Function Message::eglCreatePixmapSurface; -const Message_Function Message::eglCreatePbufferSurface; -const Message_Function Message::eglDestroySurface; -const Message_Function Message::eglQuerySurface; -const Message_Function Message::eglCreateContext; -const Message_Function Message::eglDestroyContext; -const Message_Function Message::eglMakeCurrent; -const Message_Function Message::eglGetCurrentContext; -const Message_Function Message::eglGetCurrentSurface; -const Message_Function Message::eglGetCurrentDisplay; -const Message_Function Message::eglQueryContext; -const Message_Function Message::eglWaitGL; -const Message_Function Message::eglWaitNative; -const Message_Function Message::eglSwapBuffers; -const Message_Function Message::eglCopyBuffers; -const Message_Function Message::eglGetError; -const Message_Function Message::eglQueryString; -const Message_Function Message::eglGetProcAddress; -const Message_Function Message::eglSurfaceAttrib; -const Message_Function Message::eglBindTexImage; -const Message_Function Message::eglReleaseTexImage; -const Message_Function Message::eglSwapInterval; -const Message_Function Message::eglBindAPI; -const Message_Function Message::eglQueryAPI; -const Message_Function Message::eglWaitClient; -const Message_Function Message::eglReleaseThread; -const Message_Function Message::eglCreatePbufferFromClientBuffer; -const Message_Function Message::eglLockSurfaceKHR; -const Message_Function Message::eglUnlockSurfaceKHR; -const Message_Function Message::eglCreateImageKHR; -const Message_Function Message::eglDestroyImageKHR; -const Message_Function Message::eglCreateSyncKHR; -const Message_Function Message::eglDestroySyncKHR; -const Message_Function Message::eglClientWaitSyncKHR; -const Message_Function Message::eglGetSyncAttribKHR; -const Message_Function Message::eglSetSwapRectangleANDROID; -const Message_Function Message::eglGetRenderBufferANDROID; -const Message_Function Message::ACK; -const Message_Function Message::NEG; -const Message_Function Message::CONTINUE; -const Message_Function Message::SKIP; -const Message_Function Message::SETPROP; -const Message_Function Message::Function_MIN; -const Message_Function Message::Function_MAX; -const int Message::Function_ARRAYSIZE; -#endif // _MSC_VER -bool Message_Type_IsValid(int value) { - switch(value) { - case 0: - case 1: - case 2: - case 3: - case 4: - return true; - default: - return false; - } -} - -#ifndef _MSC_VER -const Message_Type Message::BeforeCall; -const Message_Type Message::AfterCall; -const Message_Type Message::AfterGeneratedCall; -const Message_Type Message::Response; -const Message_Type Message::CompleteCall; -const Message_Type Message::Type_MIN; -const Message_Type Message::Type_MAX; -const int Message::Type_ARRAYSIZE; -#endif // _MSC_VER -bool Message_DataType_IsValid(int value) { - switch(value) { - case 0: - case 1: - return true; - default: - return false; - } -} - -#ifndef _MSC_VER -const Message_DataType Message::ReferencedImage; -const Message_DataType Message::NonreferencedImage; -const Message_DataType Message::DataType_MIN; -const Message_DataType Message::DataType_MAX; -const int Message::DataType_ARRAYSIZE; -#endif // _MSC_VER -bool Message_Prop_IsValid(int value) { - switch(value) { - case 0: - case 1: - case 2: - case 3: - case 4: - return true; - default: - return false; - } -} - -#ifndef _MSC_VER -const Message_Prop Message::CaptureDraw; -const Message_Prop Message::TimeMode; -const Message_Prop Message::ExpectResponse; -const Message_Prop Message::CaptureSwap; -const Message_Prop Message::GLConstant; -const Message_Prop Message::Prop_MIN; -const Message_Prop Message::Prop_MAX; -const int Message::Prop_ARRAYSIZE; -#endif // _MSC_VER -const ::std::string Message::_default_data_; -#ifndef _MSC_VER -const int Message::kContextIdFieldNumber; -const int Message::kFunctionFieldNumber; -const int Message::kTypeFieldNumber; -const int Message::kExpectResponseFieldNumber; -const int Message::kRetFieldNumber; -const int Message::kArg0FieldNumber; -const int Message::kArg1FieldNumber; -const int Message::kArg2FieldNumber; -const int Message::kArg3FieldNumber; -const int Message::kArg4FieldNumber; -const int Message::kArg5FieldNumber; -const int Message::kArg6FieldNumber; -const int Message::kArg7FieldNumber; -const int Message::kArg8FieldNumber; -const int Message::kDataFieldNumber; -const int Message::kDataTypeFieldNumber; -const int Message::kPixelFormatFieldNumber; -const int Message::kPixelTypeFieldNumber; -const int Message::kImageWidthFieldNumber; -const int Message::kImageHeightFieldNumber; -const int Message::kTimeFieldNumber; -const int Message::kPropFieldNumber; -const int Message::kClockFieldNumber; -#endif // !_MSC_VER - -Message::Message() - : ::google::protobuf::MessageLite() { - SharedCtor(); -} - -void Message::InitAsDefaultInstance() { -} - -Message::Message(const Message& from) - : ::google::protobuf::MessageLite() { - SharedCtor(); - MergeFrom(from); -} - -void Message::SharedCtor() { - _cached_size_ = 0; - context_id_ = 0; - function_ = 187; - type_ = 0; - expect_response_ = false; - ret_ = 0; - arg0_ = 0; - arg1_ = 0; - arg2_ = 0; - arg3_ = 0; - arg4_ = 0; - arg5_ = 0; - arg6_ = 0; - arg7_ = 0; - arg8_ = 0; - data_ = const_cast< ::std::string*>(&_default_data_); - data_type_ = 0; - pixel_format_ = 0; - pixel_type_ = 0; - image_width_ = 0; - image_height_ = 0; - time_ = 0; - prop_ = 0; - clock_ = 0; - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -Message::~Message() { - SharedDtor(); -} - -void Message::SharedDtor() { - if (data_ != &_default_data_) { - delete data_; - } - if (this != default_instance_) { - } -} - -void Message::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const Message& Message::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_debugger_5fmessage_2eproto(); return *default_instance_; -} - -Message* Message::default_instance_ = NULL; - -Message* Message::New() const { - return new Message; -} - -void Message::Clear() { - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - context_id_ = 0; - function_ = 187; - type_ = 0; - expect_response_ = false; - ret_ = 0; - arg0_ = 0; - arg1_ = 0; - arg2_ = 0; - } - if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) { - arg3_ = 0; - arg4_ = 0; - arg5_ = 0; - arg6_ = 0; - arg7_ = 0; - arg8_ = 0; - if (_has_bit(14)) { - if (data_ != &_default_data_) { - data_->clear(); - } - } - data_type_ = 0; - } - if (_has_bits_[16 / 32] & (0xffu << (16 % 32))) { - pixel_format_ = 0; - pixel_type_ = 0; - image_width_ = 0; - image_height_ = 0; - time_ = 0; - prop_ = 0; - clock_ = 0; - } - ::memset(_has_bits_, 0, sizeof(_has_bits_)); -} - -bool Message::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!(EXPRESSION)) return false - ::google::protobuf::uint32 tag; - while ((tag = input->ReadTag()) != 0) { - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // required int32 context_id = 1; - case 1: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &context_id_))); - _set_bit(0); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(16)) goto parse_function; - break; - } - - // required .com.android.glesv2debugger.Message.Function function = 2 [default = NEG]; - case 2: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_function: - int value; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - if (::com::android::glesv2debugger::Message_Function_IsValid(value)) { - set_function(static_cast< ::com::android::glesv2debugger::Message_Function >(value)); - } - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(24)) goto parse_type; - break; - } - - // required .com.android.glesv2debugger.Message.Type type = 3; - case 3: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_type: - int value; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - if (::com::android::glesv2debugger::Message_Type_IsValid(value)) { - set_type(static_cast< ::com::android::glesv2debugger::Message_Type >(value)); - } - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(32)) goto parse_expect_response; - break; - } - - // required bool expect_response = 4; - case 4: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_expect_response: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &expect_response_))); - _set_bit(3); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(40)) goto parse_ret; - break; - } - - // optional int32 ret = 5; - case 5: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_ret: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &ret_))); - _set_bit(4); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(48)) goto parse_arg0; - break; - } - - // optional int32 arg0 = 6; - case 6: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_arg0: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &arg0_))); - _set_bit(5); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(56)) goto parse_arg1; - break; - } - - // optional int32 arg1 = 7; - case 7: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_arg1: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &arg1_))); - _set_bit(6); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(64)) goto parse_arg2; - break; - } - - // optional int32 arg2 = 8; - case 8: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_arg2: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &arg2_))); - _set_bit(7); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(72)) goto parse_arg3; - break; - } - - // optional int32 arg3 = 9; - case 9: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_arg3: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &arg3_))); - _set_bit(8); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(82)) goto parse_data; - break; - } - - // optional bytes data = 10; - case 10: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED) { - parse_data: - DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( - input, this->mutable_data())); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(93)) goto parse_time; - break; - } - - // optional float time = 11; - case 11: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_time: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( - input, &time_))); - _set_bit(20); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(128)) goto parse_arg4; - break; - } - - // optional int32 arg4 = 16; - case 16: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_arg4: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &arg4_))); - _set_bit(9); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(136)) goto parse_arg5; - break; - } - - // optional int32 arg5 = 17; - case 17: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_arg5: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &arg5_))); - _set_bit(10); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(144)) goto parse_arg6; - break; - } - - // optional int32 arg6 = 18; - case 18: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_arg6: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &arg6_))); - _set_bit(11); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(152)) goto parse_arg7; - break; - } - - // optional int32 arg7 = 19; - case 19: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_arg7: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &arg7_))); - _set_bit(12); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(160)) goto parse_arg8; - break; - } - - // optional int32 arg8 = 20; - case 20: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_arg8: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &arg8_))); - _set_bit(13); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(168)) goto parse_prop; - break; - } - - // optional .com.android.glesv2debugger.Message.Prop prop = 21; - case 21: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_prop: - int value; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - if (::com::android::glesv2debugger::Message_Prop_IsValid(value)) { - set_prop(static_cast< ::com::android::glesv2debugger::Message_Prop >(value)); - } - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(181)) goto parse_clock; - break; - } - - // optional float clock = 22; - case 22: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_FIXED32) { - parse_clock: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>( - input, &clock_))); - _set_bit(22); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(184)) goto parse_data_type; - break; - } - - // optional .com.android.glesv2debugger.Message.DataType data_type = 23; - case 23: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_data_type: - int value; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - if (::com::android::glesv2debugger::Message_DataType_IsValid(value)) { - set_data_type(static_cast< ::com::android::glesv2debugger::Message_DataType >(value)); - } - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(192)) goto parse_pixel_format; - break; - } - - // optional int32 pixel_format = 24; - case 24: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_pixel_format: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &pixel_format_))); - _set_bit(16); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(200)) goto parse_pixel_type; - break; - } - - // optional int32 pixel_type = 25; - case 25: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_pixel_type: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &pixel_type_))); - _set_bit(17); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(208)) goto parse_image_width; - break; - } - - // optional int32 image_width = 26; - case 26: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_image_width: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &image_width_))); - _set_bit(18); - } else { - goto handle_uninterpreted; - } - if (input->ExpectTag(216)) goto parse_image_height; - break; - } - - // optional int32 image_height = 27; - case 27: { - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { - parse_image_height: - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &image_height_))); - _set_bit(19); - } else { - goto handle_uninterpreted; - } - if (input->ExpectAtEnd()) return true; - break; - } - - default: { - handle_uninterpreted: - if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - return true; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); - break; - } - } - } - return true; -#undef DO_ -} - -void Message::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // required int32 context_id = 1; - if (_has_bit(0)) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->context_id(), output); - } - - // required .com.android.glesv2debugger.Message.Function function = 2 [default = NEG]; - if (_has_bit(1)) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( - 2, this->function(), output); - } - - // required .com.android.glesv2debugger.Message.Type type = 3; - if (_has_bit(2)) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( - 3, this->type(), output); - } - - // required bool expect_response = 4; - if (_has_bit(3)) { - ::google::protobuf::internal::WireFormatLite::WriteBool(4, this->expect_response(), output); - } - - // optional int32 ret = 5; - if (_has_bit(4)) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(5, this->ret(), output); - } - - // optional int32 arg0 = 6; - if (_has_bit(5)) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->arg0(), output); - } - - // optional int32 arg1 = 7; - if (_has_bit(6)) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->arg1(), output); - } - - // optional int32 arg2 = 8; - if (_has_bit(7)) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(8, this->arg2(), output); - } - - // optional int32 arg3 = 9; - if (_has_bit(8)) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(9, this->arg3(), output); - } - - // optional bytes data = 10; - if (_has_bit(14)) { - ::google::protobuf::internal::WireFormatLite::WriteBytes( - 10, this->data(), output); - } - - // optional float time = 11; - if (_has_bit(20)) { - ::google::protobuf::internal::WireFormatLite::WriteFloat(11, this->time(), output); - } - - // optional int32 arg4 = 16; - if (_has_bit(9)) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(16, this->arg4(), output); - } - - // optional int32 arg5 = 17; - if (_has_bit(10)) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(17, this->arg5(), output); - } - - // optional int32 arg6 = 18; - if (_has_bit(11)) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(18, this->arg6(), output); - } - - // optional int32 arg7 = 19; - if (_has_bit(12)) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(19, this->arg7(), output); - } - - // optional int32 arg8 = 20; - if (_has_bit(13)) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(20, this->arg8(), output); - } - - // optional .com.android.glesv2debugger.Message.Prop prop = 21; - if (_has_bit(21)) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( - 21, this->prop(), output); - } - - // optional float clock = 22; - if (_has_bit(22)) { - ::google::protobuf::internal::WireFormatLite::WriteFloat(22, this->clock(), output); - } - - // optional .com.android.glesv2debugger.Message.DataType data_type = 23; - if (_has_bit(15)) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( - 23, this->data_type(), output); - } - - // optional int32 pixel_format = 24; - if (_has_bit(16)) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(24, this->pixel_format(), output); - } - - // optional int32 pixel_type = 25; - if (_has_bit(17)) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(25, this->pixel_type(), output); - } - - // optional int32 image_width = 26; - if (_has_bit(18)) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(26, this->image_width(), output); - } - - // optional int32 image_height = 27; - if (_has_bit(19)) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(27, this->image_height(), output); - } - -} - -int Message::ByteSize() const { - int total_size = 0; - - if (_has_bits_[0 / 32] & (0xffu << (0 % 32))) { - // required int32 context_id = 1; - if (has_context_id()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->context_id()); - } - - // required .com.android.glesv2debugger.Message.Function function = 2 [default = NEG]; - if (has_function()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->function()); - } - - // required .com.android.glesv2debugger.Message.Type type = 3; - if (has_type()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->type()); - } - - // required bool expect_response = 4; - if (has_expect_response()) { - total_size += 1 + 1; - } - - // optional int32 ret = 5; - if (has_ret()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->ret()); - } - - // optional int32 arg0 = 6; - if (has_arg0()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->arg0()); - } - - // optional int32 arg1 = 7; - if (has_arg1()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->arg1()); - } - - // optional int32 arg2 = 8; - if (has_arg2()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->arg2()); - } - - } - if (_has_bits_[8 / 32] & (0xffu << (8 % 32))) { - // optional int32 arg3 = 9; - if (has_arg3()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->arg3()); - } - - // optional int32 arg4 = 16; - if (has_arg4()) { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->arg4()); - } - - // optional int32 arg5 = 17; - if (has_arg5()) { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->arg5()); - } - - // optional int32 arg6 = 18; - if (has_arg6()) { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->arg6()); - } - - // optional int32 arg7 = 19; - if (has_arg7()) { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->arg7()); - } - - // optional int32 arg8 = 20; - if (has_arg8()) { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->arg8()); - } - - // optional bytes data = 10; - if (has_data()) { - total_size += 1 + - ::google::protobuf::internal::WireFormatLite::BytesSize( - this->data()); - } - - // optional .com.android.glesv2debugger.Message.DataType data_type = 23; - if (has_data_type()) { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->data_type()); - } - - } - if (_has_bits_[16 / 32] & (0xffu << (16 % 32))) { - // optional int32 pixel_format = 24; - if (has_pixel_format()) { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->pixel_format()); - } - - // optional int32 pixel_type = 25; - if (has_pixel_type()) { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->pixel_type()); - } - - // optional int32 image_width = 26; - if (has_image_width()) { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->image_width()); - } - - // optional int32 image_height = 27; - if (has_image_height()) { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->image_height()); - } - - // optional float time = 11; - if (has_time()) { - total_size += 1 + 4; - } - - // optional .com.android.glesv2debugger.Message.Prop prop = 21; - if (has_prop()) { - total_size += 2 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->prop()); - } - - // optional float clock = 22; - if (has_clock()) { - total_size += 2 + 4; - } - - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void Message::CheckTypeAndMergeFrom( - const ::google::protobuf::MessageLite& from) { - MergeFrom(*::google::protobuf::down_cast<const Message*>(&from)); -} - -void Message::MergeFrom(const Message& from) { - GOOGLE_CHECK_NE(&from, this); - if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { - if (from._has_bit(0)) { - set_context_id(from.context_id()); - } - if (from._has_bit(1)) { - set_function(from.function()); - } - if (from._has_bit(2)) { - set_type(from.type()); - } - if (from._has_bit(3)) { - set_expect_response(from.expect_response()); - } - if (from._has_bit(4)) { - set_ret(from.ret()); - } - if (from._has_bit(5)) { - set_arg0(from.arg0()); - } - if (from._has_bit(6)) { - set_arg1(from.arg1()); - } - if (from._has_bit(7)) { - set_arg2(from.arg2()); - } - } - if (from._has_bits_[8 / 32] & (0xffu << (8 % 32))) { - if (from._has_bit(8)) { - set_arg3(from.arg3()); - } - if (from._has_bit(9)) { - set_arg4(from.arg4()); - } - if (from._has_bit(10)) { - set_arg5(from.arg5()); - } - if (from._has_bit(11)) { - set_arg6(from.arg6()); - } - if (from._has_bit(12)) { - set_arg7(from.arg7()); - } - if (from._has_bit(13)) { - set_arg8(from.arg8()); - } - if (from._has_bit(14)) { - set_data(from.data()); - } - if (from._has_bit(15)) { - set_data_type(from.data_type()); - } - } - if (from._has_bits_[16 / 32] & (0xffu << (16 % 32))) { - if (from._has_bit(16)) { - set_pixel_format(from.pixel_format()); - } - if (from._has_bit(17)) { - set_pixel_type(from.pixel_type()); - } - if (from._has_bit(18)) { - set_image_width(from.image_width()); - } - if (from._has_bit(19)) { - set_image_height(from.image_height()); - } - if (from._has_bit(20)) { - set_time(from.time()); - } - if (from._has_bit(21)) { - set_prop(from.prop()); - } - if (from._has_bit(22)) { - set_clock(from.clock()); - } - } -} - -void Message::CopyFrom(const Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool Message::IsInitialized() const { - if ((_has_bits_[0] & 0x0000000f) != 0x0000000f) return false; - - return true; -} - -void Message::Swap(Message* other) { - if (other != this) { - std::swap(context_id_, other->context_id_); - std::swap(function_, other->function_); - std::swap(type_, other->type_); - std::swap(expect_response_, other->expect_response_); - std::swap(ret_, other->ret_); - std::swap(arg0_, other->arg0_); - std::swap(arg1_, other->arg1_); - std::swap(arg2_, other->arg2_); - std::swap(arg3_, other->arg3_); - std::swap(arg4_, other->arg4_); - std::swap(arg5_, other->arg5_); - std::swap(arg6_, other->arg6_); - std::swap(arg7_, other->arg7_); - std::swap(arg8_, other->arg8_); - std::swap(data_, other->data_); - std::swap(data_type_, other->data_type_); - std::swap(pixel_format_, other->pixel_format_); - std::swap(pixel_type_, other->pixel_type_); - std::swap(image_width_, other->image_width_); - std::swap(image_height_, other->image_height_); - std::swap(time_, other->time_); - std::swap(prop_, other->prop_); - std::swap(clock_, other->clock_); - std::swap(_has_bits_[0], other->_has_bits_[0]); - std::swap(_cached_size_, other->_cached_size_); - } -} - -::std::string Message::GetTypeName() const { - return "com.android.glesv2debugger.Message"; -} - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace glesv2debugger -} // namespace android -} // namespace com - -// @@protoc_insertion_point(global_scope) diff --git a/opengl/libs/GLES2_dbg/src/debugger_message.pb.h b/opengl/libs/GLES2_dbg/src/debugger_message.pb.h deleted file mode 100644 index 5c94664..0000000 --- a/opengl/libs/GLES2_dbg/src/debugger_message.pb.h +++ /dev/null @@ -1,1187 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: debugger_message.proto - -#ifndef PROTOBUF_debugger_5fmessage_2eproto__INCLUDED -#define PROTOBUF_debugger_5fmessage_2eproto__INCLUDED - -#include <string> - -#include <google/protobuf/stubs/common.h> - -#if GOOGLE_PROTOBUF_VERSION < 2003000 -#error This file was generated by a newer version of protoc which is -#error incompatible with your Protocol Buffer headers. Please update -#error your headers. -#endif -#if 2003000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION -#error This file was generated by an older version of protoc which is -#error incompatible with your Protocol Buffer headers. Please -#error regenerate this file with a newer version of protoc. -#endif - -#include <google/protobuf/generated_message_util.h> -#include <google/protobuf/repeated_field.h> -#include <google/protobuf/extension_set.h> -// @@protoc_insertion_point(includes) - -namespace com { -namespace android { -namespace glesv2debugger { - -// Internal implementation detail -- do not call these. -void protobuf_AddDesc_debugger_5fmessage_2eproto(); -void protobuf_AssignDesc_debugger_5fmessage_2eproto(); -void protobuf_ShutdownFile_debugger_5fmessage_2eproto(); - -class Message; - -enum Message_Function { - Message_Function_glActiveTexture = 0, - Message_Function_glAttachShader = 1, - Message_Function_glBindAttribLocation = 2, - Message_Function_glBindBuffer = 3, - Message_Function_glBindFramebuffer = 4, - Message_Function_glBindRenderbuffer = 5, - Message_Function_glBindTexture = 6, - Message_Function_glBlendColor = 7, - Message_Function_glBlendEquation = 8, - Message_Function_glBlendEquationSeparate = 9, - Message_Function_glBlendFunc = 10, - Message_Function_glBlendFuncSeparate = 11, - Message_Function_glBufferData = 12, - Message_Function_glBufferSubData = 13, - Message_Function_glCheckFramebufferStatus = 14, - Message_Function_glClear = 15, - Message_Function_glClearColor = 16, - Message_Function_glClearDepthf = 17, - Message_Function_glClearStencil = 18, - Message_Function_glColorMask = 19, - Message_Function_glCompileShader = 20, - Message_Function_glCompressedTexImage2D = 21, - Message_Function_glCompressedTexSubImage2D = 22, - Message_Function_glCopyTexImage2D = 23, - Message_Function_glCopyTexSubImage2D = 24, - Message_Function_glCreateProgram = 25, - Message_Function_glCreateShader = 26, - Message_Function_glCullFace = 27, - Message_Function_glDeleteBuffers = 28, - Message_Function_glDeleteFramebuffers = 29, - Message_Function_glDeleteProgram = 30, - Message_Function_glDeleteRenderbuffers = 31, - Message_Function_glDeleteShader = 32, - Message_Function_glDeleteTextures = 33, - Message_Function_glDepthFunc = 34, - Message_Function_glDepthMask = 35, - Message_Function_glDepthRangef = 36, - Message_Function_glDetachShader = 37, - Message_Function_glDisable = 38, - Message_Function_glDisableVertexAttribArray = 39, - Message_Function_glDrawArrays = 40, - Message_Function_glDrawElements = 41, - Message_Function_glEnable = 42, - Message_Function_glEnableVertexAttribArray = 43, - Message_Function_glFinish = 44, - Message_Function_glFlush = 45, - Message_Function_glFramebufferRenderbuffer = 46, - Message_Function_glFramebufferTexture2D = 47, - Message_Function_glFrontFace = 48, - Message_Function_glGenBuffers = 49, - Message_Function_glGenerateMipmap = 50, - Message_Function_glGenFramebuffers = 51, - Message_Function_glGenRenderbuffers = 52, - Message_Function_glGenTextures = 53, - Message_Function_glGetActiveAttrib = 54, - Message_Function_glGetActiveUniform = 55, - Message_Function_glGetAttachedShaders = 56, - Message_Function_glGetAttribLocation = 57, - Message_Function_glGetBooleanv = 58, - Message_Function_glGetBufferParameteriv = 59, - Message_Function_glGetError = 60, - Message_Function_glGetFloatv = 61, - Message_Function_glGetFramebufferAttachmentParameteriv = 62, - Message_Function_glGetIntegerv = 63, - Message_Function_glGetProgramiv = 64, - Message_Function_glGetProgramInfoLog = 65, - Message_Function_glGetRenderbufferParameteriv = 66, - Message_Function_glGetShaderiv = 67, - Message_Function_glGetShaderInfoLog = 68, - Message_Function_glGetShaderPrecisionFormat = 69, - Message_Function_glGetShaderSource = 70, - Message_Function_glGetString = 71, - Message_Function_glGetTexParameterfv = 72, - Message_Function_glGetTexParameteriv = 73, - Message_Function_glGetUniformfv = 74, - Message_Function_glGetUniformiv = 75, - Message_Function_glGetUniformLocation = 76, - Message_Function_glGetVertexAttribfv = 77, - Message_Function_glGetVertexAttribiv = 78, - Message_Function_glGetVertexAttribPointerv = 79, - Message_Function_glHint = 80, - Message_Function_glIsBuffer = 81, - Message_Function_glIsEnabled = 82, - Message_Function_glIsFramebuffer = 83, - Message_Function_glIsProgram = 84, - Message_Function_glIsRenderbuffer = 85, - Message_Function_glIsShader = 86, - Message_Function_glIsTexture = 87, - Message_Function_glLineWidth = 88, - Message_Function_glLinkProgram = 89, - Message_Function_glPixelStorei = 90, - Message_Function_glPolygonOffset = 91, - Message_Function_glReadPixels = 92, - Message_Function_glReleaseShaderCompiler = 93, - Message_Function_glRenderbufferStorage = 94, - Message_Function_glSampleCoverage = 95, - Message_Function_glScissor = 96, - Message_Function_glShaderBinary = 97, - Message_Function_glShaderSource = 98, - Message_Function_glStencilFunc = 99, - Message_Function_glStencilFuncSeparate = 100, - Message_Function_glStencilMask = 101, - Message_Function_glStencilMaskSeparate = 102, - Message_Function_glStencilOp = 103, - Message_Function_glStencilOpSeparate = 104, - Message_Function_glTexImage2D = 105, - Message_Function_glTexParameterf = 106, - Message_Function_glTexParameterfv = 107, - Message_Function_glTexParameteri = 108, - Message_Function_glTexParameteriv = 109, - Message_Function_glTexSubImage2D = 110, - Message_Function_glUniform1f = 111, - Message_Function_glUniform1fv = 112, - Message_Function_glUniform1i = 113, - Message_Function_glUniform1iv = 114, - Message_Function_glUniform2f = 115, - Message_Function_glUniform2fv = 116, - Message_Function_glUniform2i = 117, - Message_Function_glUniform2iv = 118, - Message_Function_glUniform3f = 119, - Message_Function_glUniform3fv = 120, - Message_Function_glUniform3i = 121, - Message_Function_glUniform3iv = 122, - Message_Function_glUniform4f = 123, - Message_Function_glUniform4fv = 124, - Message_Function_glUniform4i = 125, - Message_Function_glUniform4iv = 126, - Message_Function_glUniformMatrix2fv = 127, - Message_Function_glUniformMatrix3fv = 128, - Message_Function_glUniformMatrix4fv = 129, - Message_Function_glUseProgram = 130, - Message_Function_glValidateProgram = 131, - Message_Function_glVertexAttrib1f = 132, - Message_Function_glVertexAttrib1fv = 133, - Message_Function_glVertexAttrib2f = 134, - Message_Function_glVertexAttrib2fv = 135, - Message_Function_glVertexAttrib3f = 136, - Message_Function_glVertexAttrib3fv = 137, - Message_Function_glVertexAttrib4f = 138, - Message_Function_glVertexAttrib4fv = 139, - Message_Function_glVertexAttribPointer = 140, - Message_Function_glViewport = 141, - Message_Function_eglGetDisplay = 142, - Message_Function_eglInitialize = 143, - Message_Function_eglTerminate = 144, - Message_Function_eglGetConfigs = 145, - Message_Function_eglChooseConfig = 146, - Message_Function_eglGetConfigAttrib = 147, - Message_Function_eglCreateWindowSurface = 148, - Message_Function_eglCreatePixmapSurface = 149, - Message_Function_eglCreatePbufferSurface = 150, - Message_Function_eglDestroySurface = 151, - Message_Function_eglQuerySurface = 152, - Message_Function_eglCreateContext = 153, - Message_Function_eglDestroyContext = 154, - Message_Function_eglMakeCurrent = 155, - Message_Function_eglGetCurrentContext = 156, - Message_Function_eglGetCurrentSurface = 157, - Message_Function_eglGetCurrentDisplay = 158, - Message_Function_eglQueryContext = 159, - Message_Function_eglWaitGL = 160, - Message_Function_eglWaitNative = 161, - Message_Function_eglSwapBuffers = 162, - Message_Function_eglCopyBuffers = 163, - Message_Function_eglGetError = 164, - Message_Function_eglQueryString = 165, - Message_Function_eglGetProcAddress = 166, - Message_Function_eglSurfaceAttrib = 167, - Message_Function_eglBindTexImage = 168, - Message_Function_eglReleaseTexImage = 169, - Message_Function_eglSwapInterval = 170, - Message_Function_eglBindAPI = 171, - Message_Function_eglQueryAPI = 172, - Message_Function_eglWaitClient = 173, - Message_Function_eglReleaseThread = 174, - Message_Function_eglCreatePbufferFromClientBuffer = 175, - Message_Function_eglLockSurfaceKHR = 176, - Message_Function_eglUnlockSurfaceKHR = 177, - Message_Function_eglCreateImageKHR = 178, - Message_Function_eglDestroyImageKHR = 179, - Message_Function_eglCreateSyncKHR = 180, - Message_Function_eglDestroySyncKHR = 181, - Message_Function_eglClientWaitSyncKHR = 182, - Message_Function_eglGetSyncAttribKHR = 183, - Message_Function_eglSetSwapRectangleANDROID = 184, - Message_Function_eglGetRenderBufferANDROID = 185, - Message_Function_ACK = 186, - Message_Function_NEG = 187, - Message_Function_CONTINUE = 188, - Message_Function_SKIP = 189, - Message_Function_SETPROP = 190 -}; -bool Message_Function_IsValid(int value); -const Message_Function Message_Function_Function_MIN = Message_Function_glActiveTexture; -const Message_Function Message_Function_Function_MAX = Message_Function_SETPROP; -const int Message_Function_Function_ARRAYSIZE = Message_Function_Function_MAX + 1; - -enum Message_Type { - Message_Type_BeforeCall = 0, - Message_Type_AfterCall = 1, - Message_Type_AfterGeneratedCall = 2, - Message_Type_Response = 3, - Message_Type_CompleteCall = 4 -}; -bool Message_Type_IsValid(int value); -const Message_Type Message_Type_Type_MIN = Message_Type_BeforeCall; -const Message_Type Message_Type_Type_MAX = Message_Type_CompleteCall; -const int Message_Type_Type_ARRAYSIZE = Message_Type_Type_MAX + 1; - -enum Message_DataType { - Message_DataType_ReferencedImage = 0, - Message_DataType_NonreferencedImage = 1 -}; -bool Message_DataType_IsValid(int value); -const Message_DataType Message_DataType_DataType_MIN = Message_DataType_ReferencedImage; -const Message_DataType Message_DataType_DataType_MAX = Message_DataType_NonreferencedImage; -const int Message_DataType_DataType_ARRAYSIZE = Message_DataType_DataType_MAX + 1; - -enum Message_Prop { - Message_Prop_CaptureDraw = 0, - Message_Prop_TimeMode = 1, - Message_Prop_ExpectResponse = 2, - Message_Prop_CaptureSwap = 3, - Message_Prop_GLConstant = 4 -}; -bool Message_Prop_IsValid(int value); -const Message_Prop Message_Prop_Prop_MIN = Message_Prop_CaptureDraw; -const Message_Prop Message_Prop_Prop_MAX = Message_Prop_GLConstant; -const int Message_Prop_Prop_ARRAYSIZE = Message_Prop_Prop_MAX + 1; - -// =================================================================== - -class Message : public ::google::protobuf::MessageLite { - public: - Message(); - virtual ~Message(); - - Message(const Message& from); - - inline Message& operator=(const Message& from) { - CopyFrom(from); - return *this; - } - - static const Message& default_instance(); - - void Swap(Message* other); - - // implements Message ---------------------------------------------- - - Message* New() const; - void CheckTypeAndMergeFrom(const ::google::protobuf::MessageLite& from); - void CopyFrom(const Message& from); - void MergeFrom(const Message& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - int GetCachedSize() const { return _cached_size_; } - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - public: - - ::std::string GetTypeName() const; - - // nested types ---------------------------------------------------- - - typedef Message_Function Function; - static const Function glActiveTexture = Message_Function_glActiveTexture; - static const Function glAttachShader = Message_Function_glAttachShader; - static const Function glBindAttribLocation = Message_Function_glBindAttribLocation; - static const Function glBindBuffer = Message_Function_glBindBuffer; - static const Function glBindFramebuffer = Message_Function_glBindFramebuffer; - static const Function glBindRenderbuffer = Message_Function_glBindRenderbuffer; - static const Function glBindTexture = Message_Function_glBindTexture; - static const Function glBlendColor = Message_Function_glBlendColor; - static const Function glBlendEquation = Message_Function_glBlendEquation; - static const Function glBlendEquationSeparate = Message_Function_glBlendEquationSeparate; - static const Function glBlendFunc = Message_Function_glBlendFunc; - static const Function glBlendFuncSeparate = Message_Function_glBlendFuncSeparate; - static const Function glBufferData = Message_Function_glBufferData; - static const Function glBufferSubData = Message_Function_glBufferSubData; - static const Function glCheckFramebufferStatus = Message_Function_glCheckFramebufferStatus; - static const Function glClear = Message_Function_glClear; - static const Function glClearColor = Message_Function_glClearColor; - static const Function glClearDepthf = Message_Function_glClearDepthf; - static const Function glClearStencil = Message_Function_glClearStencil; - static const Function glColorMask = Message_Function_glColorMask; - static const Function glCompileShader = Message_Function_glCompileShader; - static const Function glCompressedTexImage2D = Message_Function_glCompressedTexImage2D; - static const Function glCompressedTexSubImage2D = Message_Function_glCompressedTexSubImage2D; - static const Function glCopyTexImage2D = Message_Function_glCopyTexImage2D; - static const Function glCopyTexSubImage2D = Message_Function_glCopyTexSubImage2D; - static const Function glCreateProgram = Message_Function_glCreateProgram; - static const Function glCreateShader = Message_Function_glCreateShader; - static const Function glCullFace = Message_Function_glCullFace; - static const Function glDeleteBuffers = Message_Function_glDeleteBuffers; - static const Function glDeleteFramebuffers = Message_Function_glDeleteFramebuffers; - static const Function glDeleteProgram = Message_Function_glDeleteProgram; - static const Function glDeleteRenderbuffers = Message_Function_glDeleteRenderbuffers; - static const Function glDeleteShader = Message_Function_glDeleteShader; - static const Function glDeleteTextures = Message_Function_glDeleteTextures; - static const Function glDepthFunc = Message_Function_glDepthFunc; - static const Function glDepthMask = Message_Function_glDepthMask; - static const Function glDepthRangef = Message_Function_glDepthRangef; - static const Function glDetachShader = Message_Function_glDetachShader; - static const Function glDisable = Message_Function_glDisable; - static const Function glDisableVertexAttribArray = Message_Function_glDisableVertexAttribArray; - static const Function glDrawArrays = Message_Function_glDrawArrays; - static const Function glDrawElements = Message_Function_glDrawElements; - static const Function glEnable = Message_Function_glEnable; - static const Function glEnableVertexAttribArray = Message_Function_glEnableVertexAttribArray; - static const Function glFinish = Message_Function_glFinish; - static const Function glFlush = Message_Function_glFlush; - static const Function glFramebufferRenderbuffer = Message_Function_glFramebufferRenderbuffer; - static const Function glFramebufferTexture2D = Message_Function_glFramebufferTexture2D; - static const Function glFrontFace = Message_Function_glFrontFace; - static const Function glGenBuffers = Message_Function_glGenBuffers; - static const Function glGenerateMipmap = Message_Function_glGenerateMipmap; - static const Function glGenFramebuffers = Message_Function_glGenFramebuffers; - static const Function glGenRenderbuffers = Message_Function_glGenRenderbuffers; - static const Function glGenTextures = Message_Function_glGenTextures; - static const Function glGetActiveAttrib = Message_Function_glGetActiveAttrib; - static const Function glGetActiveUniform = Message_Function_glGetActiveUniform; - static const Function glGetAttachedShaders = Message_Function_glGetAttachedShaders; - static const Function glGetAttribLocation = Message_Function_glGetAttribLocation; - static const Function glGetBooleanv = Message_Function_glGetBooleanv; - static const Function glGetBufferParameteriv = Message_Function_glGetBufferParameteriv; - static const Function glGetError = Message_Function_glGetError; - static const Function glGetFloatv = Message_Function_glGetFloatv; - static const Function glGetFramebufferAttachmentParameteriv = Message_Function_glGetFramebufferAttachmentParameteriv; - static const Function glGetIntegerv = Message_Function_glGetIntegerv; - static const Function glGetProgramiv = Message_Function_glGetProgramiv; - static const Function glGetProgramInfoLog = Message_Function_glGetProgramInfoLog; - static const Function glGetRenderbufferParameteriv = Message_Function_glGetRenderbufferParameteriv; - static const Function glGetShaderiv = Message_Function_glGetShaderiv; - static const Function glGetShaderInfoLog = Message_Function_glGetShaderInfoLog; - static const Function glGetShaderPrecisionFormat = Message_Function_glGetShaderPrecisionFormat; - static const Function glGetShaderSource = Message_Function_glGetShaderSource; - static const Function glGetString = Message_Function_glGetString; - static const Function glGetTexParameterfv = Message_Function_glGetTexParameterfv; - static const Function glGetTexParameteriv = Message_Function_glGetTexParameteriv; - static const Function glGetUniformfv = Message_Function_glGetUniformfv; - static const Function glGetUniformiv = Message_Function_glGetUniformiv; - static const Function glGetUniformLocation = Message_Function_glGetUniformLocation; - static const Function glGetVertexAttribfv = Message_Function_glGetVertexAttribfv; - static const Function glGetVertexAttribiv = Message_Function_glGetVertexAttribiv; - static const Function glGetVertexAttribPointerv = Message_Function_glGetVertexAttribPointerv; - static const Function glHint = Message_Function_glHint; - static const Function glIsBuffer = Message_Function_glIsBuffer; - static const Function glIsEnabled = Message_Function_glIsEnabled; - static const Function glIsFramebuffer = Message_Function_glIsFramebuffer; - static const Function glIsProgram = Message_Function_glIsProgram; - static const Function glIsRenderbuffer = Message_Function_glIsRenderbuffer; - static const Function glIsShader = Message_Function_glIsShader; - static const Function glIsTexture = Message_Function_glIsTexture; - static const Function glLineWidth = Message_Function_glLineWidth; - static const Function glLinkProgram = Message_Function_glLinkProgram; - static const Function glPixelStorei = Message_Function_glPixelStorei; - static const Function glPolygonOffset = Message_Function_glPolygonOffset; - static const Function glReadPixels = Message_Function_glReadPixels; - static const Function glReleaseShaderCompiler = Message_Function_glReleaseShaderCompiler; - static const Function glRenderbufferStorage = Message_Function_glRenderbufferStorage; - static const Function glSampleCoverage = Message_Function_glSampleCoverage; - static const Function glScissor = Message_Function_glScissor; - static const Function glShaderBinary = Message_Function_glShaderBinary; - static const Function glShaderSource = Message_Function_glShaderSource; - static const Function glStencilFunc = Message_Function_glStencilFunc; - static const Function glStencilFuncSeparate = Message_Function_glStencilFuncSeparate; - static const Function glStencilMask = Message_Function_glStencilMask; - static const Function glStencilMaskSeparate = Message_Function_glStencilMaskSeparate; - static const Function glStencilOp = Message_Function_glStencilOp; - static const Function glStencilOpSeparate = Message_Function_glStencilOpSeparate; - static const Function glTexImage2D = Message_Function_glTexImage2D; - static const Function glTexParameterf = Message_Function_glTexParameterf; - static const Function glTexParameterfv = Message_Function_glTexParameterfv; - static const Function glTexParameteri = Message_Function_glTexParameteri; - static const Function glTexParameteriv = Message_Function_glTexParameteriv; - static const Function glTexSubImage2D = Message_Function_glTexSubImage2D; - static const Function glUniform1f = Message_Function_glUniform1f; - static const Function glUniform1fv = Message_Function_glUniform1fv; - static const Function glUniform1i = Message_Function_glUniform1i; - static const Function glUniform1iv = Message_Function_glUniform1iv; - static const Function glUniform2f = Message_Function_glUniform2f; - static const Function glUniform2fv = Message_Function_glUniform2fv; - static const Function glUniform2i = Message_Function_glUniform2i; - static const Function glUniform2iv = Message_Function_glUniform2iv; - static const Function glUniform3f = Message_Function_glUniform3f; - static const Function glUniform3fv = Message_Function_glUniform3fv; - static const Function glUniform3i = Message_Function_glUniform3i; - static const Function glUniform3iv = Message_Function_glUniform3iv; - static const Function glUniform4f = Message_Function_glUniform4f; - static const Function glUniform4fv = Message_Function_glUniform4fv; - static const Function glUniform4i = Message_Function_glUniform4i; - static const Function glUniform4iv = Message_Function_glUniform4iv; - static const Function glUniformMatrix2fv = Message_Function_glUniformMatrix2fv; - static const Function glUniformMatrix3fv = Message_Function_glUniformMatrix3fv; - static const Function glUniformMatrix4fv = Message_Function_glUniformMatrix4fv; - static const Function glUseProgram = Message_Function_glUseProgram; - static const Function glValidateProgram = Message_Function_glValidateProgram; - static const Function glVertexAttrib1f = Message_Function_glVertexAttrib1f; - static const Function glVertexAttrib1fv = Message_Function_glVertexAttrib1fv; - static const Function glVertexAttrib2f = Message_Function_glVertexAttrib2f; - static const Function glVertexAttrib2fv = Message_Function_glVertexAttrib2fv; - static const Function glVertexAttrib3f = Message_Function_glVertexAttrib3f; - static const Function glVertexAttrib3fv = Message_Function_glVertexAttrib3fv; - static const Function glVertexAttrib4f = Message_Function_glVertexAttrib4f; - static const Function glVertexAttrib4fv = Message_Function_glVertexAttrib4fv; - static const Function glVertexAttribPointer = Message_Function_glVertexAttribPointer; - static const Function glViewport = Message_Function_glViewport; - static const Function eglGetDisplay = Message_Function_eglGetDisplay; - static const Function eglInitialize = Message_Function_eglInitialize; - static const Function eglTerminate = Message_Function_eglTerminate; - static const Function eglGetConfigs = Message_Function_eglGetConfigs; - static const Function eglChooseConfig = Message_Function_eglChooseConfig; - static const Function eglGetConfigAttrib = Message_Function_eglGetConfigAttrib; - static const Function eglCreateWindowSurface = Message_Function_eglCreateWindowSurface; - static const Function eglCreatePixmapSurface = Message_Function_eglCreatePixmapSurface; - static const Function eglCreatePbufferSurface = Message_Function_eglCreatePbufferSurface; - static const Function eglDestroySurface = Message_Function_eglDestroySurface; - static const Function eglQuerySurface = Message_Function_eglQuerySurface; - static const Function eglCreateContext = Message_Function_eglCreateContext; - static const Function eglDestroyContext = Message_Function_eglDestroyContext; - static const Function eglMakeCurrent = Message_Function_eglMakeCurrent; - static const Function eglGetCurrentContext = Message_Function_eglGetCurrentContext; - static const Function eglGetCurrentSurface = Message_Function_eglGetCurrentSurface; - static const Function eglGetCurrentDisplay = Message_Function_eglGetCurrentDisplay; - static const Function eglQueryContext = Message_Function_eglQueryContext; - static const Function eglWaitGL = Message_Function_eglWaitGL; - static const Function eglWaitNative = Message_Function_eglWaitNative; - static const Function eglSwapBuffers = Message_Function_eglSwapBuffers; - static const Function eglCopyBuffers = Message_Function_eglCopyBuffers; - static const Function eglGetError = Message_Function_eglGetError; - static const Function eglQueryString = Message_Function_eglQueryString; - static const Function eglGetProcAddress = Message_Function_eglGetProcAddress; - static const Function eglSurfaceAttrib = Message_Function_eglSurfaceAttrib; - static const Function eglBindTexImage = Message_Function_eglBindTexImage; - static const Function eglReleaseTexImage = Message_Function_eglReleaseTexImage; - static const Function eglSwapInterval = Message_Function_eglSwapInterval; - static const Function eglBindAPI = Message_Function_eglBindAPI; - static const Function eglQueryAPI = Message_Function_eglQueryAPI; - static const Function eglWaitClient = Message_Function_eglWaitClient; - static const Function eglReleaseThread = Message_Function_eglReleaseThread; - static const Function eglCreatePbufferFromClientBuffer = Message_Function_eglCreatePbufferFromClientBuffer; - static const Function eglLockSurfaceKHR = Message_Function_eglLockSurfaceKHR; - static const Function eglUnlockSurfaceKHR = Message_Function_eglUnlockSurfaceKHR; - static const Function eglCreateImageKHR = Message_Function_eglCreateImageKHR; - static const Function eglDestroyImageKHR = Message_Function_eglDestroyImageKHR; - static const Function eglCreateSyncKHR = Message_Function_eglCreateSyncKHR; - static const Function eglDestroySyncKHR = Message_Function_eglDestroySyncKHR; - static const Function eglClientWaitSyncKHR = Message_Function_eglClientWaitSyncKHR; - static const Function eglGetSyncAttribKHR = Message_Function_eglGetSyncAttribKHR; - static const Function eglSetSwapRectangleANDROID = Message_Function_eglSetSwapRectangleANDROID; - static const Function eglGetRenderBufferANDROID = Message_Function_eglGetRenderBufferANDROID; - static const Function ACK = Message_Function_ACK; - static const Function NEG = Message_Function_NEG; - static const Function CONTINUE = Message_Function_CONTINUE; - static const Function SKIP = Message_Function_SKIP; - static const Function SETPROP = Message_Function_SETPROP; - static inline bool Function_IsValid(int value) { - return Message_Function_IsValid(value); - } - static const Function Function_MIN = - Message_Function_Function_MIN; - static const Function Function_MAX = - Message_Function_Function_MAX; - static const int Function_ARRAYSIZE = - Message_Function_Function_ARRAYSIZE; - - typedef Message_Type Type; - static const Type BeforeCall = Message_Type_BeforeCall; - static const Type AfterCall = Message_Type_AfterCall; - static const Type AfterGeneratedCall = Message_Type_AfterGeneratedCall; - static const Type Response = Message_Type_Response; - static const Type CompleteCall = Message_Type_CompleteCall; - static inline bool Type_IsValid(int value) { - return Message_Type_IsValid(value); - } - static const Type Type_MIN = - Message_Type_Type_MIN; - static const Type Type_MAX = - Message_Type_Type_MAX; - static const int Type_ARRAYSIZE = - Message_Type_Type_ARRAYSIZE; - - typedef Message_DataType DataType; - static const DataType ReferencedImage = Message_DataType_ReferencedImage; - static const DataType NonreferencedImage = Message_DataType_NonreferencedImage; - static inline bool DataType_IsValid(int value) { - return Message_DataType_IsValid(value); - } - static const DataType DataType_MIN = - Message_DataType_DataType_MIN; - static const DataType DataType_MAX = - Message_DataType_DataType_MAX; - static const int DataType_ARRAYSIZE = - Message_DataType_DataType_ARRAYSIZE; - - typedef Message_Prop Prop; - static const Prop CaptureDraw = Message_Prop_CaptureDraw; - static const Prop TimeMode = Message_Prop_TimeMode; - static const Prop ExpectResponse = Message_Prop_ExpectResponse; - static const Prop CaptureSwap = Message_Prop_CaptureSwap; - static const Prop GLConstant = Message_Prop_GLConstant; - static inline bool Prop_IsValid(int value) { - return Message_Prop_IsValid(value); - } - static const Prop Prop_MIN = - Message_Prop_Prop_MIN; - static const Prop Prop_MAX = - Message_Prop_Prop_MAX; - static const int Prop_ARRAYSIZE = - Message_Prop_Prop_ARRAYSIZE; - - // accessors ------------------------------------------------------- - - // required int32 context_id = 1; - inline bool has_context_id() const; - inline void clear_context_id(); - static const int kContextIdFieldNumber = 1; - inline ::google::protobuf::int32 context_id() const; - inline void set_context_id(::google::protobuf::int32 value); - - // required .com.android.glesv2debugger.Message.Function function = 2 [default = NEG]; - inline bool has_function() const; - inline void clear_function(); - static const int kFunctionFieldNumber = 2; - inline ::com::android::glesv2debugger::Message_Function function() const; - inline void set_function(::com::android::glesv2debugger::Message_Function value); - - // required .com.android.glesv2debugger.Message.Type type = 3; - inline bool has_type() const; - inline void clear_type(); - static const int kTypeFieldNumber = 3; - inline ::com::android::glesv2debugger::Message_Type type() const; - inline void set_type(::com::android::glesv2debugger::Message_Type value); - - // required bool expect_response = 4; - inline bool has_expect_response() const; - inline void clear_expect_response(); - static const int kExpectResponseFieldNumber = 4; - inline bool expect_response() const; - inline void set_expect_response(bool value); - - // optional int32 ret = 5; - inline bool has_ret() const; - inline void clear_ret(); - static const int kRetFieldNumber = 5; - inline ::google::protobuf::int32 ret() const; - inline void set_ret(::google::protobuf::int32 value); - - // optional int32 arg0 = 6; - inline bool has_arg0() const; - inline void clear_arg0(); - static const int kArg0FieldNumber = 6; - inline ::google::protobuf::int32 arg0() const; - inline void set_arg0(::google::protobuf::int32 value); - - // optional int32 arg1 = 7; - inline bool has_arg1() const; - inline void clear_arg1(); - static const int kArg1FieldNumber = 7; - inline ::google::protobuf::int32 arg1() const; - inline void set_arg1(::google::protobuf::int32 value); - - // optional int32 arg2 = 8; - inline bool has_arg2() const; - inline void clear_arg2(); - static const int kArg2FieldNumber = 8; - inline ::google::protobuf::int32 arg2() const; - inline void set_arg2(::google::protobuf::int32 value); - - // optional int32 arg3 = 9; - inline bool has_arg3() const; - inline void clear_arg3(); - static const int kArg3FieldNumber = 9; - inline ::google::protobuf::int32 arg3() const; - inline void set_arg3(::google::protobuf::int32 value); - - // optional int32 arg4 = 16; - inline bool has_arg4() const; - inline void clear_arg4(); - static const int kArg4FieldNumber = 16; - inline ::google::protobuf::int32 arg4() const; - inline void set_arg4(::google::protobuf::int32 value); - - // optional int32 arg5 = 17; - inline bool has_arg5() const; - inline void clear_arg5(); - static const int kArg5FieldNumber = 17; - inline ::google::protobuf::int32 arg5() const; - inline void set_arg5(::google::protobuf::int32 value); - - // optional int32 arg6 = 18; - inline bool has_arg6() const; - inline void clear_arg6(); - static const int kArg6FieldNumber = 18; - inline ::google::protobuf::int32 arg6() const; - inline void set_arg6(::google::protobuf::int32 value); - - // optional int32 arg7 = 19; - inline bool has_arg7() const; - inline void clear_arg7(); - static const int kArg7FieldNumber = 19; - inline ::google::protobuf::int32 arg7() const; - inline void set_arg7(::google::protobuf::int32 value); - - // optional int32 arg8 = 20; - inline bool has_arg8() const; - inline void clear_arg8(); - static const int kArg8FieldNumber = 20; - inline ::google::protobuf::int32 arg8() const; - inline void set_arg8(::google::protobuf::int32 value); - - // optional bytes data = 10; - inline bool has_data() const; - inline void clear_data(); - static const int kDataFieldNumber = 10; - inline const ::std::string& data() const; - inline void set_data(const ::std::string& value); - inline void set_data(const char* value); - inline void set_data(const void* value, size_t size); - inline ::std::string* mutable_data(); - - // optional .com.android.glesv2debugger.Message.DataType data_type = 23; - inline bool has_data_type() const; - inline void clear_data_type(); - static const int kDataTypeFieldNumber = 23; - inline ::com::android::glesv2debugger::Message_DataType data_type() const; - inline void set_data_type(::com::android::glesv2debugger::Message_DataType value); - - // optional int32 pixel_format = 24; - inline bool has_pixel_format() const; - inline void clear_pixel_format(); - static const int kPixelFormatFieldNumber = 24; - inline ::google::protobuf::int32 pixel_format() const; - inline void set_pixel_format(::google::protobuf::int32 value); - - // optional int32 pixel_type = 25; - inline bool has_pixel_type() const; - inline void clear_pixel_type(); - static const int kPixelTypeFieldNumber = 25; - inline ::google::protobuf::int32 pixel_type() const; - inline void set_pixel_type(::google::protobuf::int32 value); - - // optional int32 image_width = 26; - inline bool has_image_width() const; - inline void clear_image_width(); - static const int kImageWidthFieldNumber = 26; - inline ::google::protobuf::int32 image_width() const; - inline void set_image_width(::google::protobuf::int32 value); - - // optional int32 image_height = 27; - inline bool has_image_height() const; - inline void clear_image_height(); - static const int kImageHeightFieldNumber = 27; - inline ::google::protobuf::int32 image_height() const; - inline void set_image_height(::google::protobuf::int32 value); - - // optional float time = 11; - inline bool has_time() const; - inline void clear_time(); - static const int kTimeFieldNumber = 11; - inline float time() const; - inline void set_time(float value); - - // optional .com.android.glesv2debugger.Message.Prop prop = 21; - inline bool has_prop() const; - inline void clear_prop(); - static const int kPropFieldNumber = 21; - inline ::com::android::glesv2debugger::Message_Prop prop() const; - inline void set_prop(::com::android::glesv2debugger::Message_Prop value); - - // optional float clock = 22; - inline bool has_clock() const; - inline void clear_clock(); - static const int kClockFieldNumber = 22; - inline float clock() const; - inline void set_clock(float value); - - // @@protoc_insertion_point(class_scope:com.android.glesv2debugger.Message) - private: - mutable int _cached_size_; - - ::google::protobuf::int32 context_id_; - int function_; - int type_; - bool expect_response_; - ::google::protobuf::int32 ret_; - ::google::protobuf::int32 arg0_; - ::google::protobuf::int32 arg1_; - ::google::protobuf::int32 arg2_; - ::google::protobuf::int32 arg3_; - ::google::protobuf::int32 arg4_; - ::google::protobuf::int32 arg5_; - ::google::protobuf::int32 arg6_; - ::google::protobuf::int32 arg7_; - ::google::protobuf::int32 arg8_; - ::std::string* data_; - static const ::std::string _default_data_; - int data_type_; - ::google::protobuf::int32 pixel_format_; - ::google::protobuf::int32 pixel_type_; - ::google::protobuf::int32 image_width_; - ::google::protobuf::int32 image_height_; - float time_; - int prop_; - float clock_; - friend void protobuf_AddDesc_debugger_5fmessage_2eproto(); - friend void protobuf_AssignDesc_debugger_5fmessage_2eproto(); - friend void protobuf_ShutdownFile_debugger_5fmessage_2eproto(); - - ::google::protobuf::uint32 _has_bits_[(23 + 31) / 32]; - - // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? - inline bool _has_bit(int index) const { - return (_has_bits_[index / 32] & (1u << (index % 32))) != 0; - } - inline void _set_bit(int index) { - _has_bits_[index / 32] |= (1u << (index % 32)); - } - inline void _clear_bit(int index) { - _has_bits_[index / 32] &= ~(1u << (index % 32)); - } - - void InitAsDefaultInstance(); - static Message* default_instance_; -}; -// =================================================================== - - -// =================================================================== - -// Message - -// required int32 context_id = 1; -inline bool Message::has_context_id() const { - return _has_bit(0); -} -inline void Message::clear_context_id() { - context_id_ = 0; - _clear_bit(0); -} -inline ::google::protobuf::int32 Message::context_id() const { - return context_id_; -} -inline void Message::set_context_id(::google::protobuf::int32 value) { - _set_bit(0); - context_id_ = value; -} - -// required .com.android.glesv2debugger.Message.Function function = 2 [default = NEG]; -inline bool Message::has_function() const { - return _has_bit(1); -} -inline void Message::clear_function() { - function_ = 187; - _clear_bit(1); -} -inline ::com::android::glesv2debugger::Message_Function Message::function() const { - return static_cast< ::com::android::glesv2debugger::Message_Function >(function_); -} -inline void Message::set_function(::com::android::glesv2debugger::Message_Function value) { - GOOGLE_DCHECK(::com::android::glesv2debugger::Message_Function_IsValid(value)); - _set_bit(1); - function_ = value; -} - -// required .com.android.glesv2debugger.Message.Type type = 3; -inline bool Message::has_type() const { - return _has_bit(2); -} -inline void Message::clear_type() { - type_ = 0; - _clear_bit(2); -} -inline ::com::android::glesv2debugger::Message_Type Message::type() const { - return static_cast< ::com::android::glesv2debugger::Message_Type >(type_); -} -inline void Message::set_type(::com::android::glesv2debugger::Message_Type value) { - GOOGLE_DCHECK(::com::android::glesv2debugger::Message_Type_IsValid(value)); - _set_bit(2); - type_ = value; -} - -// required bool expect_response = 4; -inline bool Message::has_expect_response() const { - return _has_bit(3); -} -inline void Message::clear_expect_response() { - expect_response_ = false; - _clear_bit(3); -} -inline bool Message::expect_response() const { - return expect_response_; -} -inline void Message::set_expect_response(bool value) { - _set_bit(3); - expect_response_ = value; -} - -// optional int32 ret = 5; -inline bool Message::has_ret() const { - return _has_bit(4); -} -inline void Message::clear_ret() { - ret_ = 0; - _clear_bit(4); -} -inline ::google::protobuf::int32 Message::ret() const { - return ret_; -} -inline void Message::set_ret(::google::protobuf::int32 value) { - _set_bit(4); - ret_ = value; -} - -// optional int32 arg0 = 6; -inline bool Message::has_arg0() const { - return _has_bit(5); -} -inline void Message::clear_arg0() { - arg0_ = 0; - _clear_bit(5); -} -inline ::google::protobuf::int32 Message::arg0() const { - return arg0_; -} -inline void Message::set_arg0(::google::protobuf::int32 value) { - _set_bit(5); - arg0_ = value; -} - -// optional int32 arg1 = 7; -inline bool Message::has_arg1() const { - return _has_bit(6); -} -inline void Message::clear_arg1() { - arg1_ = 0; - _clear_bit(6); -} -inline ::google::protobuf::int32 Message::arg1() const { - return arg1_; -} -inline void Message::set_arg1(::google::protobuf::int32 value) { - _set_bit(6); - arg1_ = value; -} - -// optional int32 arg2 = 8; -inline bool Message::has_arg2() const { - return _has_bit(7); -} -inline void Message::clear_arg2() { - arg2_ = 0; - _clear_bit(7); -} -inline ::google::protobuf::int32 Message::arg2() const { - return arg2_; -} -inline void Message::set_arg2(::google::protobuf::int32 value) { - _set_bit(7); - arg2_ = value; -} - -// optional int32 arg3 = 9; -inline bool Message::has_arg3() const { - return _has_bit(8); -} -inline void Message::clear_arg3() { - arg3_ = 0; - _clear_bit(8); -} -inline ::google::protobuf::int32 Message::arg3() const { - return arg3_; -} -inline void Message::set_arg3(::google::protobuf::int32 value) { - _set_bit(8); - arg3_ = value; -} - -// optional int32 arg4 = 16; -inline bool Message::has_arg4() const { - return _has_bit(9); -} -inline void Message::clear_arg4() { - arg4_ = 0; - _clear_bit(9); -} -inline ::google::protobuf::int32 Message::arg4() const { - return arg4_; -} -inline void Message::set_arg4(::google::protobuf::int32 value) { - _set_bit(9); - arg4_ = value; -} - -// optional int32 arg5 = 17; -inline bool Message::has_arg5() const { - return _has_bit(10); -} -inline void Message::clear_arg5() { - arg5_ = 0; - _clear_bit(10); -} -inline ::google::protobuf::int32 Message::arg5() const { - return arg5_; -} -inline void Message::set_arg5(::google::protobuf::int32 value) { - _set_bit(10); - arg5_ = value; -} - -// optional int32 arg6 = 18; -inline bool Message::has_arg6() const { - return _has_bit(11); -} -inline void Message::clear_arg6() { - arg6_ = 0; - _clear_bit(11); -} -inline ::google::protobuf::int32 Message::arg6() const { - return arg6_; -} -inline void Message::set_arg6(::google::protobuf::int32 value) { - _set_bit(11); - arg6_ = value; -} - -// optional int32 arg7 = 19; -inline bool Message::has_arg7() const { - return _has_bit(12); -} -inline void Message::clear_arg7() { - arg7_ = 0; - _clear_bit(12); -} -inline ::google::protobuf::int32 Message::arg7() const { - return arg7_; -} -inline void Message::set_arg7(::google::protobuf::int32 value) { - _set_bit(12); - arg7_ = value; -} - -// optional int32 arg8 = 20; -inline bool Message::has_arg8() const { - return _has_bit(13); -} -inline void Message::clear_arg8() { - arg8_ = 0; - _clear_bit(13); -} -inline ::google::protobuf::int32 Message::arg8() const { - return arg8_; -} -inline void Message::set_arg8(::google::protobuf::int32 value) { - _set_bit(13); - arg8_ = value; -} - -// optional bytes data = 10; -inline bool Message::has_data() const { - return _has_bit(14); -} -inline void Message::clear_data() { - if (data_ != &_default_data_) { - data_->clear(); - } - _clear_bit(14); -} -inline const ::std::string& Message::data() const { - return *data_; -} -inline void Message::set_data(const ::std::string& value) { - _set_bit(14); - if (data_ == &_default_data_) { - data_ = new ::std::string; - } - data_->assign(value); -} -inline void Message::set_data(const char* value) { - _set_bit(14); - if (data_ == &_default_data_) { - data_ = new ::std::string; - } - data_->assign(value); -} -inline void Message::set_data(const void* value, size_t size) { - _set_bit(14); - if (data_ == &_default_data_) { - data_ = new ::std::string; - } - data_->assign(reinterpret_cast<const char*>(value), size); -} -inline ::std::string* Message::mutable_data() { - _set_bit(14); - if (data_ == &_default_data_) { - data_ = new ::std::string; - } - return data_; -} - -// optional .com.android.glesv2debugger.Message.DataType data_type = 23; -inline bool Message::has_data_type() const { - return _has_bit(15); -} -inline void Message::clear_data_type() { - data_type_ = 0; - _clear_bit(15); -} -inline ::com::android::glesv2debugger::Message_DataType Message::data_type() const { - return static_cast< ::com::android::glesv2debugger::Message_DataType >(data_type_); -} -inline void Message::set_data_type(::com::android::glesv2debugger::Message_DataType value) { - GOOGLE_DCHECK(::com::android::glesv2debugger::Message_DataType_IsValid(value)); - _set_bit(15); - data_type_ = value; -} - -// optional int32 pixel_format = 24; -inline bool Message::has_pixel_format() const { - return _has_bit(16); -} -inline void Message::clear_pixel_format() { - pixel_format_ = 0; - _clear_bit(16); -} -inline ::google::protobuf::int32 Message::pixel_format() const { - return pixel_format_; -} -inline void Message::set_pixel_format(::google::protobuf::int32 value) { - _set_bit(16); - pixel_format_ = value; -} - -// optional int32 pixel_type = 25; -inline bool Message::has_pixel_type() const { - return _has_bit(17); -} -inline void Message::clear_pixel_type() { - pixel_type_ = 0; - _clear_bit(17); -} -inline ::google::protobuf::int32 Message::pixel_type() const { - return pixel_type_; -} -inline void Message::set_pixel_type(::google::protobuf::int32 value) { - _set_bit(17); - pixel_type_ = value; -} - -// optional int32 image_width = 26; -inline bool Message::has_image_width() const { - return _has_bit(18); -} -inline void Message::clear_image_width() { - image_width_ = 0; - _clear_bit(18); -} -inline ::google::protobuf::int32 Message::image_width() const { - return image_width_; -} -inline void Message::set_image_width(::google::protobuf::int32 value) { - _set_bit(18); - image_width_ = value; -} - -// optional int32 image_height = 27; -inline bool Message::has_image_height() const { - return _has_bit(19); -} -inline void Message::clear_image_height() { - image_height_ = 0; - _clear_bit(19); -} -inline ::google::protobuf::int32 Message::image_height() const { - return image_height_; -} -inline void Message::set_image_height(::google::protobuf::int32 value) { - _set_bit(19); - image_height_ = value; -} - -// optional float time = 11; -inline bool Message::has_time() const { - return _has_bit(20); -} -inline void Message::clear_time() { - time_ = 0; - _clear_bit(20); -} -inline float Message::time() const { - return time_; -} -inline void Message::set_time(float value) { - _set_bit(20); - time_ = value; -} - -// optional .com.android.glesv2debugger.Message.Prop prop = 21; -inline bool Message::has_prop() const { - return _has_bit(21); -} -inline void Message::clear_prop() { - prop_ = 0; - _clear_bit(21); -} -inline ::com::android::glesv2debugger::Message_Prop Message::prop() const { - return static_cast< ::com::android::glesv2debugger::Message_Prop >(prop_); -} -inline void Message::set_prop(::com::android::glesv2debugger::Message_Prop value) { - GOOGLE_DCHECK(::com::android::glesv2debugger::Message_Prop_IsValid(value)); - _set_bit(21); - prop_ = value; -} - -// optional float clock = 22; -inline bool Message::has_clock() const { - return _has_bit(22); -} -inline void Message::clear_clock() { - clock_ = 0; - _clear_bit(22); -} -inline float Message::clock() const { - return clock_; -} -inline void Message::set_clock(float value) { - _set_bit(22); - clock_ = value; -} - - -// @@protoc_insertion_point(namespace_scope) - -} // namespace glesv2debugger -} // namespace android -} // namespace com - -// @@protoc_insertion_point(global_scope) - -#endif // PROTOBUF_debugger_5fmessage_2eproto__INCLUDED diff --git a/opengl/libs/GLES2_dbg/src/egl.cpp b/opengl/libs/GLES2_dbg/src/egl.cpp deleted file mode 100644 index bbea3bd..0000000 --- a/opengl/libs/GLES2_dbg/src/egl.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - ** Copyright 2011, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#include "header.h" - -EGLBoolean Debug_eglSwapBuffers(EGLDisplay dpy, EGLSurface draw) -{ - DbgContext * const dbg = getDbgContextThreadSpecific(); - glesv2debugger::Message msg; - struct : public FunctionCall { - EGLDisplay dpy; - EGLSurface draw; - - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - msg.set_time(-1); - return reinterpret_cast<const int *>(true); - } - } caller; - caller.dpy = dpy; - caller.draw = draw; - - msg.set_arg0(reinterpret_cast<int>(dpy)); - msg.set_arg1(reinterpret_cast<int>(draw)); - if (dbg->captureSwap > 0) { - dbg->captureSwap--; - int viewport[4] = {}; - dbg->hooks->gl.glGetIntegerv(GL_VIEWPORT, viewport); - void * pixels = dbg->GetReadPixelsBuffer(viewport[2] * viewport[3] * - dbg->readBytesPerPixel); - dbg->hooks->gl.glReadPixels(viewport[0], viewport[1], viewport[2], - viewport[3], GL_RGBA, GL_UNSIGNED_BYTE, pixels); - dbg->CompressReadPixelBuffer(msg.mutable_data()); - msg.set_data_type(msg.ReferencedImage); - msg.set_pixel_format(GL_RGBA); - msg.set_pixel_type(GL_UNSIGNED_BYTE); - msg.set_image_width(viewport[2]); - msg.set_image_height(viewport[3]); - } - int * ret = MessageLoop(caller, msg, glesv2debugger::Message_Function_eglSwapBuffers); - return static_cast<EGLBoolean>(reinterpret_cast<int>(ret)); -} diff --git a/opengl/libs/GLES2_dbg/src/header.h b/opengl/libs/GLES2_dbg/src/header.h deleted file mode 100644 index 49f3847..0000000 --- a/opengl/libs/GLES2_dbg/src/header.h +++ /dev/null @@ -1,178 +0,0 @@ -/* - ** Copyright 2011, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#ifndef ANDROID_GLES2_DBG_HEADER_H -#define ANDROID_GLES2_DBG_HEADER_H - -#include <stdlib.h> -#include <ctype.h> -#include <string.h> -#include <errno.h> - -#include <GLES2/gl2.h> -#include <GLES2/gl2ext.h> - -#include <cutils/log.h> -#include <utils/Timers.h> - -#include "hooks.h" - -#include "glesv2dbg.h" - -#define GL_ENTRY(_r, _api, ...) _r Debug_##_api ( __VA_ARGS__ ); -#include "glesv2dbg_functions.h" - -#include "debugger_message.pb.h" - -using namespace android; -using namespace com::android; - -#ifndef __location__ -#define __HIERALLOC_STRING_0__(s) #s -#define __HIERALLOC_STRING_1__(s) __HIERALLOC_STRING_0__(s) -#define __HIERALLOC_STRING_2__ __HIERALLOC_STRING_1__(__LINE__) -#define __location__ __FILE__ ":" __HIERALLOC_STRING_2__ -#endif - -#undef assert -#define assert(expr) if (!(expr)) { LOGD("\n*\n*\n* assert: %s at %s \n*\n*", #expr, __location__); int * x = 0; *x = 5; } -//#undef LOGD -//#define LOGD(...) - -namespace android -{ - -struct GLFunctionBitfield { - unsigned char field [24]; // 8 * 24 = 192 - - void Bit(const glesv2debugger::Message_Function function, bool bit) { - const unsigned byte = function / 8, mask = 1 << (function % 8); - if (bit) - field[byte] |= mask; - else - field[byte] &= ~mask; - } - - bool Bit(const glesv2debugger::Message_Function function) const { - const unsigned byte = function / 8, mask = 1 << (function % 8); - return field[byte] & mask; - } -}; - -struct DbgContext { - static const unsigned int LZF_CHUNK_SIZE = 256 * 1024; - -private: - char * lzf_buf; // malloc / free; for lzf chunk compression and other uses - - // used as buffer and reference frame for ReadPixels; malloc/free - unsigned * lzf_ref [2]; - unsigned lzf_readIndex; // 0 or 1 - unsigned lzf_refSize, lzf_refBufSize; // bytes - -public: - const unsigned int version; // 0 is GLES1, 1 is GLES2 - const gl_hooks_t * const hooks; - const unsigned int MAX_VERTEX_ATTRIBS; - const unsigned int readBytesPerPixel; - - unsigned int captureSwap; // number of eglSwapBuffers to glReadPixels - unsigned int captureDraw; // number of glDrawArrays/Elements to glReadPixels - - GLFunctionBitfield expectResponse; - - struct VertexAttrib { - GLenum type; // element data type - unsigned size; // number of data per element - unsigned stride; // calculated number of bytes between elements - const void * ptr; - unsigned elemSize; // calculated number of bytes per element - GLuint buffer; // buffer name - GLboolean normalized : 1; - GLboolean enabled : 1; - VertexAttrib() : type(0), size(0), stride(0), ptr(NULL), elemSize(0), - buffer(0), normalized(0), enabled(0) {} - } * vertexAttribs; - bool hasNonVBOAttribs; // whether any enabled vertexAttrib is user pointer - - struct VBO { - const GLuint name; - const GLenum target; - VBO * next; - void * data; // malloc/free - unsigned size; // in bytes - VBO(const GLuint name, const GLenum target, VBO * head) : name(name), - target(target), next(head), data(NULL), size(0) {} - } * indexBuffers; // linked list of all index buffers - VBO * indexBuffer; // currently bound index buffer - - GLuint program; - unsigned maxAttrib; // number of slots used by program - - DbgContext(const unsigned version, const gl_hooks_t * const hooks, - const unsigned MAX_VERTEX_ATTRIBS); - ~DbgContext(); - - void Fetch(const unsigned index, std::string * const data) const; - void Compress(const void * in_data, unsigned in_len, std::string * const outStr); - static unsigned char * Decompress(const void * in, const unsigned int inLen, - unsigned int * const outLen); // malloc/free - void * GetReadPixelsBuffer(const unsigned size); - bool IsReadPixelBuffer(const void * const ptr) { - return ptr == lzf_ref[lzf_readIndex]; - } - void CompressReadPixelBuffer(std::string * const outStr); - char * GetBuffer(); // allocates lzf_buf if NULL - unsigned int GetBufferSize(); // allocates lzf_buf if NULL - - void glUseProgram(GLuint program); - void glEnableVertexAttribArray(GLuint index); - void glDisableVertexAttribArray(GLuint index); - void glVertexAttribPointer(GLuint indx, GLint size, GLenum type, - GLboolean normalized, GLsizei stride, const GLvoid* ptr); - void glBindBuffer(GLenum target, GLuint buffer); - void glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage); - void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data); - void glDeleteBuffers(GLsizei n, const GLuint *buffers); -}; - -DbgContext * getDbgContextThreadSpecific(); - -struct FunctionCall { - virtual const int * operator()(gl_hooks_t::gl_t const * const _c, - glesv2debugger::Message & msg) = 0; - virtual ~FunctionCall() {} -}; - -// move these into DbgContext as static -extern int timeMode; // SYSTEM_TIME_ - -extern int clientSock, serverSock; - -unsigned GetBytesPerPixel(const GLenum format, const GLenum type); - -// every Debug_gl* function calls this to send message to client and possibly receive commands -int * MessageLoop(FunctionCall & functionCall, glesv2debugger::Message & msg, - const glesv2debugger::Message_Function function); - -void Receive(glesv2debugger::Message & cmd); -float Send(const glesv2debugger::Message & msg, glesv2debugger::Message & cmd); -void SetProp(DbgContext * const dbg, const glesv2debugger::Message & cmd); -const int * GenerateCall(DbgContext * const dbg, const glesv2debugger::Message & cmd, - glesv2debugger::Message & msg, const int * const prevRet); -}; // namespace android { - -#endif // #ifndef ANDROID_GLES2_DBG_HEADER_H diff --git a/opengl/libs/GLES2_dbg/src/server.cpp b/opengl/libs/GLES2_dbg/src/server.cpp deleted file mode 100644 index 0c711bf..0000000 --- a/opengl/libs/GLES2_dbg/src/server.cpp +++ /dev/null @@ -1,312 +0,0 @@ -/* - ** Copyright 2011, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#include <sys/ioctl.h> -#include <unistd.h> -#include <sys/socket.h> -#include <fcntl.h> -#include <netinet/in.h> -#include <arpa/inet.h> -#include <pthread.h> - -#include "header.h" - -namespace android -{ - -int serverSock = -1, clientSock = -1; -FILE * file = NULL; -unsigned int MAX_FILE_SIZE = 0; -int timeMode = SYSTEM_TIME_THREAD; - -static void Die(const char * msg) -{ - LOGD("\n*\n*\n* GLESv2_dbg: Die: %s \n*\n*", msg); - StopDebugServer(); - exit(1); -} - -void StartDebugServer(const unsigned short port, const bool forceUseFile, - const unsigned int maxFileSize, const char * const filePath) -{ - MAX_FILE_SIZE = maxFileSize; - - LOGD("GLESv2_dbg: StartDebugServer"); - if (serverSock >= 0 || file) - return; - - LOGD("GLESv2_dbg: StartDebugServer create socket"); - struct sockaddr_in server = {}, client = {}; - - /* Create the TCP socket */ - if (forceUseFile || (serverSock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) { - file = fopen(filePath, "wb"); - if (!file) - Die("Failed to create socket and file"); - else - return; - } - /* Construct the server sockaddr_in structure */ - server.sin_family = AF_INET; /* Internet/IP */ - server.sin_addr.s_addr = htonl(INADDR_LOOPBACK); /* Incoming addr */ - server.sin_port = htons(port); /* server port */ - - /* Bind the server socket */ - socklen_t sizeofSockaddr_in = sizeof(sockaddr_in); - if (bind(serverSock, (struct sockaddr *) &server, - sizeof(server)) < 0) { - Die("Failed to bind the server socket"); - } - /* Listen on the server socket */ - if (listen(serverSock, 1) < 0) { - Die("Failed to listen on server socket"); - } - - LOGD("server started on %d \n", server.sin_port); - - - /* Wait for client connection */ - if ((clientSock = - accept(serverSock, (struct sockaddr *) &client, - &sizeofSockaddr_in)) < 0) { - Die("Failed to accept client connection"); - } - - LOGD("Client connected: %s\n", inet_ntoa(client.sin_addr)); -// fcntl(clientSock, F_SETFL, O_NONBLOCK); -} - -void StopDebugServer() -{ - LOGD("GLESv2_dbg: StopDebugServer"); - if (clientSock > 0) { - close(clientSock); - clientSock = -1; - } - if (serverSock > 0) { - close(serverSock); - serverSock = -1; - } - if (file) { - fclose(file); - file = NULL; - } -} - -void Receive(glesv2debugger::Message & cmd) -{ - if (clientSock < 0) - return; - unsigned len = 0; - int received = recv(clientSock, &len, 4, MSG_WAITALL); - if (received < 0) - Die("Failed to receive response length"); - else if (4 != received) { - LOGD("received %dB: %.8X", received, len); - Die("Received length mismatch, expected 4"); - } - static void * buffer = NULL; - static unsigned bufferSize = 0; - if (bufferSize < len) { - buffer = realloc(buffer, len); - assert(buffer); - bufferSize = len; - } - received = recv(clientSock, buffer, len, MSG_WAITALL); - if (received < 0) - Die("Failed to receive response"); - else if (len != received) - Die("Received length mismatch"); - cmd.Clear(); - cmd.ParseFromArray(buffer, len); -} - -bool TryReceive(glesv2debugger::Message & cmd) -{ - if (clientSock < 0) - return false; - fd_set readSet; - FD_ZERO(&readSet); - FD_SET(clientSock, &readSet); - timeval timeout; - timeout.tv_sec = timeout.tv_usec = 0; - - int rc = select(clientSock + 1, &readSet, NULL, NULL, &timeout); - if (rc < 0) - Die("failed to select clientSock"); - - bool received = false; - if (FD_ISSET(clientSock, &readSet)) { - LOGD("TryReceive: avaiable for read"); - Receive(cmd); - return true; - } - return false; -} - -float Send(const glesv2debugger::Message & msg, glesv2debugger::Message & cmd) -{ - // TODO: use per DbgContext send/receive buffer and async socket - // instead of mutex and blocking io; watch out for large messages - static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; - struct Autolock { - Autolock() { - pthread_mutex_lock(&mutex); - } - ~Autolock() { - pthread_mutex_unlock(&mutex); - } - } autolock; - - if (msg.function() != glesv2debugger::Message_Function_ACK) - assert(msg.has_context_id() && msg.context_id() != 0); - static std::string str; - msg.SerializeToString(&str); - const uint32_t len = str.length(); - if (clientSock < 0) { - if (file) { - fwrite(&len, sizeof(len), 1, file); - fwrite(str.data(), len, 1, file); - if (ftell(file) >= MAX_FILE_SIZE) { - fclose(file); - Die("MAX_FILE_SIZE reached"); - } - } - return 0; - } - int sent = -1; - sent = send(clientSock, &len, sizeof(len), 0); - if (sent != sizeof(len)) { - LOGD("actual sent=%d expected=%d clientSock=%d", sent, sizeof(len), clientSock); - Die("Failed to send message length"); - } - nsecs_t c0 = systemTime(timeMode); - sent = send(clientSock, str.data(), str.length(), 0); - float t = (float)ns2ms(systemTime(timeMode) - c0); - if (sent != str.length()) { - LOGD("actual sent=%d expected=%d clientSock=%d", sent, str.length(), clientSock); - Die("Failed to send message"); - } - // TODO: factor Receive & TryReceive out and into MessageLoop, or add control argument. - // mean while, if server is sending a SETPROP then don't try to receive, - // because server will not be processing received command - if (msg.function() == msg.SETPROP) - return t; - // try to receive commands even though not expecting response, - // since client can send SETPROP and other commands anytime - if (!msg.expect_response()) { - if (TryReceive(cmd)) { - if (glesv2debugger::Message_Function_SETPROP == cmd.function()) - LOGD("Send: TryReceived SETPROP"); - else - LOGD("Send: TryReceived %u", cmd.function()); - } - } else - Receive(cmd); - return t; -} - -void SetProp(DbgContext * const dbg, const glesv2debugger::Message & cmd) -{ - switch (cmd.prop()) { - case glesv2debugger::Message_Prop_CaptureDraw: - LOGD("SetProp Message_Prop_CaptureDraw %d", cmd.arg0()); - dbg->captureDraw = cmd.arg0(); - break; - case glesv2debugger::Message_Prop_TimeMode: - LOGD("SetProp Message_Prop_TimeMode %d", cmd.arg0()); - timeMode = cmd.arg0(); - break; - case glesv2debugger::Message_Prop_ExpectResponse: - LOGD("SetProp Message_Prop_ExpectResponse %d=%d", cmd.arg0(), cmd.arg1()); - dbg->expectResponse.Bit((glesv2debugger::Message_Function)cmd.arg0(), cmd.arg1()); - break; - case glesv2debugger::Message_Prop_CaptureSwap: - LOGD("SetProp CaptureSwap %d", cmd.arg0()); - dbg->captureSwap = cmd.arg0(); - break; - default: - assert(0); - } -} - -int * MessageLoop(FunctionCall & functionCall, glesv2debugger::Message & msg, - const glesv2debugger::Message_Function function) -{ - DbgContext * const dbg = getDbgContextThreadSpecific(); - const int * ret = 0; - glesv2debugger::Message cmd; - msg.set_context_id(reinterpret_cast<int>(dbg)); - msg.set_type(glesv2debugger::Message_Type_BeforeCall); - bool expectResponse = dbg->expectResponse.Bit(function); - msg.set_expect_response(expectResponse); - msg.set_function(function); - - // when not exectResponse, set cmd to CONTINUE then SKIP - // cmd will be overwritten by received command - cmd.set_function(glesv2debugger::Message_Function_CONTINUE); - cmd.set_expect_response(expectResponse); - glesv2debugger::Message_Function oldCmd = cmd.function(); - Send(msg, cmd); - expectResponse = cmd.expect_response(); - while (true) { - msg.Clear(); - nsecs_t c0 = systemTime(timeMode); - switch (cmd.function()) { - case glesv2debugger::Message_Function_CONTINUE: - ret = functionCall(&dbg->hooks->gl, msg); - while (GLenum error = dbg->hooks->gl.glGetError()) - LOGD("Function=%u glGetError() = 0x%.4X", function, error); - if (!msg.has_time()) // some has output data copy, so time inside call - msg.set_time((systemTime(timeMode) - c0) * 1e-6f); - msg.set_context_id(reinterpret_cast<int>(dbg)); - msg.set_function(function); - msg.set_type(glesv2debugger::Message_Type_AfterCall); - msg.set_expect_response(expectResponse); - if (!expectResponse) { - cmd.set_function(glesv2debugger::Message_Function_SKIP); - cmd.set_expect_response(false); - } - oldCmd = cmd.function(); - Send(msg, cmd); - expectResponse = cmd.expect_response(); - break; - case glesv2debugger::Message_Function_SKIP: - return const_cast<int *>(ret); - case glesv2debugger::Message_Function_SETPROP: - SetProp(dbg, cmd); - expectResponse = cmd.expect_response(); - if (!expectResponse) // SETPROP is "out of band" - cmd.set_function(oldCmd); - else - Receive(cmd); - break; - default: - ret = GenerateCall(dbg, cmd, msg, ret); - msg.set_expect_response(expectResponse); - if (!expectResponse) { - cmd.set_function(cmd.SKIP); - cmd.set_expect_response(expectResponse); - } - oldCmd = cmd.function(); - Send(msg, cmd); - expectResponse = cmd.expect_response(); - break; - } - } - return 0; -} -}; // namespace android { diff --git a/opengl/libs/GLES2_dbg/src/vertex.cpp b/opengl/libs/GLES2_dbg/src/vertex.cpp deleted file mode 100644 index 28a2420..0000000 --- a/opengl/libs/GLES2_dbg/src/vertex.cpp +++ /dev/null @@ -1,214 +0,0 @@ -/* - ** Copyright 2011, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#include "header.h" - -namespace android -{ -bool capture; // capture after each glDraw* -} - -void Debug_glDrawArrays(GLenum mode, GLint first, GLsizei count) -{ - DbgContext * const dbg = getDbgContextThreadSpecific(); - glesv2debugger::Message msg, cmd; - msg.set_context_id(reinterpret_cast<int>(dbg)); - msg.set_type(glesv2debugger::Message_Type_BeforeCall); - bool expectResponse = dbg->expectResponse.Bit(glesv2debugger::Message_Function_glDrawArrays); - msg.set_expect_response(expectResponse); - msg.set_function(glesv2debugger::Message_Function_glDrawArrays); - msg.set_arg0(mode); - msg.set_arg1(first); - msg.set_arg2(count); - - msg.set_arg7(dbg->maxAttrib); // indicate capturing vertex data - if (dbg->hasNonVBOAttribs) { - std::string * const data = msg.mutable_data(); - for (unsigned i = 0; i < count; i++) - dbg->Fetch(i + first, data); - } - - void * pixels = NULL; - int viewport[4] = {}; - cmd.set_function(glesv2debugger::Message_Function_CONTINUE); - cmd.set_expect_response(expectResponse); - glesv2debugger::Message_Function oldCmd = cmd.function(); - Send(msg, cmd); - expectResponse = cmd.expect_response(); - while (true) { - msg.Clear(); - nsecs_t c0 = systemTime(timeMode); - switch (cmd.function()) { - case glesv2debugger::Message_Function_CONTINUE: - dbg->hooks->gl.glDrawArrays(mode, first, count); - msg.set_time((systemTime(timeMode) - c0) * 1e-6f); - msg.set_context_id(reinterpret_cast<int>(dbg)); - msg.set_function(glesv2debugger::Message_Function_glDrawArrays); - msg.set_type(glesv2debugger::Message_Type_AfterCall); - msg.set_expect_response(expectResponse); - if (!expectResponse) { - cmd.set_function(glesv2debugger::Message_Function_SKIP); - cmd.set_expect_response(false); - } - oldCmd = cmd.function(); - Send(msg, cmd); - expectResponse = cmd.expect_response(); - // TODO: pack glReadPixels data with vertex data instead of - // relying on sperate call for transport, this would allow - // auto generated message loop using EXTEND_Debug macro - if (dbg->captureDraw > 0) { - dbg->captureDraw--; - dbg->hooks->gl.glGetIntegerv(GL_VIEWPORT, viewport); -// LOGD("glDrawArrays CAPTURE: x=%d y=%d width=%d height=%d format=0x%.4X type=0x%.4X", -// viewport[0], viewport[1], viewport[2], viewport[3], readFormat, readType); - pixels = dbg->GetReadPixelsBuffer(viewport[2] * viewport[3] * - dbg->readBytesPerPixel); - Debug_glReadPixels(viewport[0], viewport[1], viewport[2], viewport[3], - GL_RGBA, GL_UNSIGNED_BYTE, pixels); - } - break; - case glesv2debugger::Message_Function_SKIP: - return; - case glesv2debugger::Message_Function_SETPROP: - SetProp(dbg, cmd); - expectResponse = cmd.expect_response(); - if (!expectResponse) // SETPROP is "out of band" - cmd.set_function(oldCmd); - else - Receive(cmd); - break; - default: - GenerateCall(dbg, cmd, msg, NULL); - msg.set_expect_response(expectResponse); - if (!expectResponse) { - cmd.set_function(cmd.SKIP); - cmd.set_expect_response(expectResponse); - } - oldCmd = cmd.function(); - Send(msg, cmd); - expectResponse = cmd.expect_response(); - break; - } - } -} - -template<typename T> -static inline void FetchIndexed(const unsigned count, const T * indices, - std::string * const data, const DbgContext * const ctx) -{ - for (unsigned i = 0; i < count; i++) { - if (!ctx->indexBuffer) - data->append((const char *)(indices + i), sizeof(*indices)); - if (ctx->hasNonVBOAttribs) - ctx->Fetch(indices[i], data); - } -} - -void Debug_glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices) -{ - DbgContext * const dbg = getDbgContextThreadSpecific(); - glesv2debugger::Message msg, cmd; - msg.set_context_id(reinterpret_cast<int>(dbg)); - msg.set_type(glesv2debugger::Message_Type_BeforeCall); - bool expectResponse = dbg->expectResponse.Bit(glesv2debugger::Message_Function_glDrawElements); - msg.set_expect_response(expectResponse); - msg.set_function(glesv2debugger::Message_Function_glDrawElements); - msg.set_arg0(mode); - msg.set_arg1(count); - msg.set_arg2(type); - msg.set_arg3(reinterpret_cast<int>(indices)); - - msg.set_arg7(dbg->maxAttrib); // indicate capturing vertex data - std::string * const data = msg.mutable_data(); - if (GL_UNSIGNED_BYTE == type) { - if (dbg->indexBuffer) { - FetchIndexed(count, (unsigned char *)dbg->indexBuffer->data + - (unsigned long)indices, data, dbg); - } else { - FetchIndexed(count, (unsigned char *)indices, data, dbg); - } - } else if (GL_UNSIGNED_SHORT == type) { - if (dbg->indexBuffer) { - FetchIndexed(count, (unsigned short *)((char *)dbg->indexBuffer->data + - (unsigned long)indices), data, dbg); - } else { - FetchIndexed(count, (unsigned short *)indices, data, dbg); - } - } else { - assert(0); - } - - void * pixels = NULL; - int viewport[4] = {}; - cmd.set_function(glesv2debugger::Message_Function_CONTINUE); - cmd.set_expect_response(expectResponse); - glesv2debugger::Message_Function oldCmd = cmd.function(); - Send(msg, cmd); - expectResponse = cmd.expect_response(); - while (true) { - msg.Clear(); - nsecs_t c0 = systemTime(timeMode); - switch (cmd.function()) { - case glesv2debugger::Message_Function_CONTINUE: - dbg->hooks->gl.glDrawElements(mode, count, type, indices); - msg.set_time((systemTime(timeMode) - c0) * 1e-6f); - msg.set_context_id(reinterpret_cast<int>(dbg)); - msg.set_function(glesv2debugger::Message_Function_glDrawElements); - msg.set_type(glesv2debugger::Message_Type_AfterCall); - msg.set_expect_response(expectResponse); - if (!expectResponse) { - cmd.set_function(glesv2debugger::Message_Function_SKIP); - cmd.set_expect_response(false); - } - oldCmd = cmd.function(); - Send(msg, cmd); - expectResponse = cmd.expect_response(); - // TODO: pack glReadPixels data with vertex data instead of - // relying on separate call for transport, this would allow - // auto generated message loop using EXTEND_Debug macro - if (dbg->captureDraw > 0) { - dbg->captureDraw--; - dbg->hooks->gl.glGetIntegerv(GL_VIEWPORT, viewport); - pixels = dbg->GetReadPixelsBuffer(viewport[2] * viewport[3] * - dbg->readBytesPerPixel); - Debug_glReadPixels(viewport[0], viewport[1], viewport[2], viewport[3], - GL_RGBA, GL_UNSIGNED_BYTE, pixels); - } - break; - case glesv2debugger::Message_Function_SKIP: - return; - case glesv2debugger::Message_Function_SETPROP: - SetProp(dbg, cmd); - expectResponse = cmd.expect_response(); - if (!expectResponse) // SETPROP is "out of band" - cmd.set_function(oldCmd); - else - Receive(cmd); - break; - default: - GenerateCall(dbg, cmd, msg, NULL); - msg.set_expect_response(expectResponse); - if (!expectResponse) { - cmd.set_function(cmd.SKIP); - cmd.set_expect_response(expectResponse); - } - oldCmd = cmd.function(); - Send(msg, cmd); - expectResponse = cmd.expect_response(); - break; - } - } -} diff --git a/opengl/libs/GLES2_dbg/test/Android.mk b/opengl/libs/GLES2_dbg/test/Android.mk deleted file mode 100644 index 8708d43..0000000 --- a/opengl/libs/GLES2_dbg/test/Android.mk +++ /dev/null @@ -1,37 +0,0 @@ -LOCAL_PATH:= $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_C_INCLUDES := \ - $(LOCAL_PATH) \ - $(LOCAL_PATH)/../src \ - $(LOCAL_PATH)/../../ \ - external/gtest/include \ - external/stlport/stlport \ - external/protobuf/src \ - bionic \ - external \ -# - -LOCAL_SRC_FILES:= \ - test_main.cpp \ - test_server.cpp \ - test_socket.cpp \ -# - -LOCAL_SHARED_LIBRARIES := libcutils libutils libGLESv2_dbg libstlport -LOCAL_STATIC_LIBRARIES := libgtest libprotobuf-cpp-2.3.0-lite liblzf -LOCAL_MODULE_TAGS := tests -LOCAL_MODULE:= libGLESv2_dbg_test - -ifeq ($(ARCH_ARM_HAVE_TLS_REGISTER),true) - LOCAL_CFLAGS += -DHAVE_ARM_TLS_REGISTER -endif -LOCAL_C_INCLUDES += bionic/libc/private - -LOCAL_CFLAGS += -DLOG_TAG=\"libEGL\" -LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES -LOCAL_CFLAGS += -fvisibility=hidden - -include $(BUILD_EXECUTABLE) - diff --git a/opengl/libs/GLES2_dbg/test/test_main.cpp b/opengl/libs/GLES2_dbg/test/test_main.cpp deleted file mode 100644 index 183bf8e..0000000 --- a/opengl/libs/GLES2_dbg/test/test_main.cpp +++ /dev/null @@ -1,234 +0,0 @@ -/* - ** Copyright 2011, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#include "header.h" -#include "gtest/gtest.h" -#include "hooks.h" - -namespace -{ - -// The fixture for testing class Foo. -class DbgContextTest : public ::testing::Test -{ -protected: - android::DbgContext dbg; - gl_hooks_t hooks; - - DbgContextTest() - : dbg(1, &hooks, 32) { - // You can do set-up work for each test here. - hooks.gl.glGetError = GetError; - } - - static GLenum GetError() { - return GL_NO_ERROR; - } - - virtual ~DbgContextTest() { - // You can do clean-up work that doesn't throw exceptions here. - } - - // If the constructor and destructor are not enough for setting up - // and cleaning up each test, you can define the following methods: - - virtual void SetUp() { - // Code here will be called immediately after the constructor (right - // before each test). - } - - virtual void TearDown() { - // Code here will be called immediately after each test (right - // before the destructor). - } -}; - -TEST_F(DbgContextTest, GetReadPixelBuffer) -{ - const unsigned int bufferSize = 512; - // test that it's allocating two buffers and swapping them - void * const buffer0 = dbg.GetReadPixelsBuffer(bufferSize); - ASSERT_NE((void *)NULL, buffer0); - for (unsigned int i = 0; i < bufferSize / sizeof(unsigned int); i++) { - EXPECT_EQ(0, ((unsigned int *)buffer0)[i]) - << "GetReadPixelsBuffer should allocate and zero"; - ((unsigned int *)buffer0)[i] = i * 13; - } - - void * const buffer1 = dbg.GetReadPixelsBuffer(bufferSize); - ASSERT_NE((void *)NULL, buffer1); - EXPECT_NE(buffer0, buffer1); - for (unsigned int i = 0; i < bufferSize / sizeof(unsigned int); i++) { - EXPECT_EQ(0, ((unsigned int *)buffer1)[i]) - << "GetReadPixelsBuffer should allocate and zero"; - ((unsigned int *)buffer1)[i] = i * 17; - } - - void * const buffer2 = dbg.GetReadPixelsBuffer(bufferSize); - EXPECT_EQ(buffer2, buffer0); - for (unsigned int i = 0; i < bufferSize / sizeof(unsigned int); i++) - EXPECT_EQ(i * 13, ((unsigned int *)buffer2)[i]) - << "GetReadPixelsBuffer should swap buffers"; - - void * const buffer3 = dbg.GetReadPixelsBuffer(bufferSize); - EXPECT_EQ(buffer3, buffer1); - for (unsigned int i = 0; i < bufferSize / sizeof(unsigned int); i++) - EXPECT_EQ(i * 17, ((unsigned int *)buffer3)[i]) - << "GetReadPixelsBuffer should swap buffers"; - - void * const buffer4 = dbg.GetReadPixelsBuffer(bufferSize); - EXPECT_NE(buffer3, buffer4); - EXPECT_EQ(buffer0, buffer2); - EXPECT_EQ(buffer1, buffer3); - EXPECT_EQ(buffer2, buffer4); - - // it reallocs as necessary; 0 size may result in NULL - for (unsigned int i = 0; i < 42; i++) { - void * const buffer = dbg.GetReadPixelsBuffer(((i & 7)) << 20); - EXPECT_NE((void *)NULL, buffer) - << "should be able to get a variety of reasonable sizes"; - EXPECT_TRUE(dbg.IsReadPixelBuffer(buffer)); - } -} - -TEST_F(DbgContextTest, CompressReadPixelBuffer) -{ - const unsigned int bufferSize = dbg.LZF_CHUNK_SIZE * 4 + 33; - std::string out; - unsigned char * buffer = (unsigned char *)dbg.GetReadPixelsBuffer(bufferSize); - for (unsigned int i = 0; i < bufferSize; i++) - buffer[i] = i * 13; - dbg.CompressReadPixelBuffer(&out); - uint32_t decompSize = 0; - ASSERT_LT(12, out.length()); // at least written chunk header - ASSERT_EQ(bufferSize, *(uint32_t *)out.data()) - << "total decompressed size should be as requested in GetReadPixelsBuffer"; - for (unsigned int i = 4; i < out.length();) { - const uint32_t outSize = *(uint32_t *)(out.data() + i); - i += 4; - const uint32_t inSize = *(uint32_t *)(out.data() + i); - i += 4; - if (inSize == 0) - i += outSize; // chunk not compressed - else - i += inSize; // skip the actual compressed chunk - decompSize += outSize; - } - ASSERT_EQ(bufferSize, decompSize); - decompSize = 0; - - unsigned char * decomp = dbg.Decompress(out.data(), out.length(), &decompSize); - ASSERT_EQ(decompSize, bufferSize); - for (unsigned int i = 0; i < bufferSize; i++) - EXPECT_EQ((unsigned char)(i * 13), decomp[i]) << "xor with 0 ref is identity"; - free(decomp); - - buffer = (unsigned char *)dbg.GetReadPixelsBuffer(bufferSize); - for (unsigned int i = 0; i < bufferSize; i++) - buffer[i] = i * 13; - out.clear(); - dbg.CompressReadPixelBuffer(&out); - decompSize = 0; - decomp = dbg.Decompress(out.data(), out.length(), &decompSize); - ASSERT_EQ(decompSize, bufferSize); - for (unsigned int i = 0; i < bufferSize; i++) - EXPECT_EQ(0, decomp[i]) << "xor with same ref is 0"; - free(decomp); - - buffer = (unsigned char *)dbg.GetReadPixelsBuffer(bufferSize); - for (unsigned int i = 0; i < bufferSize; i++) - buffer[i] = i * 19; - out.clear(); - dbg.CompressReadPixelBuffer(&out); - decompSize = 0; - decomp = dbg.Decompress(out.data(), out.length(), &decompSize); - ASSERT_EQ(decompSize, bufferSize); - for (unsigned int i = 0; i < bufferSize; i++) - EXPECT_EQ((unsigned char)(i * 13) ^ (unsigned char)(i * 19), decomp[i]) - << "xor ref"; - free(decomp); -} - -TEST_F(DbgContextTest, UseProgram) -{ - static const GLuint _program = 74568; - static const struct Attribute { - const char * name; - GLint location; - GLint size; - GLenum type; - } _attributes [] = { - {"aaa", 2, 2, GL_FLOAT_VEC2}, - {"bb", 6, 2, GL_FLOAT_MAT2}, - {"c", 1, 1, GL_FLOAT}, - }; - static const unsigned int _attributeCount = sizeof(_attributes) / sizeof(*_attributes); - struct GL { - static void GetProgramiv(GLuint program, GLenum pname, GLint* params) { - EXPECT_EQ(_program, program); - ASSERT_NE((GLint *)NULL, params); - switch (pname) { - case GL_ACTIVE_ATTRIBUTES: - *params = _attributeCount; - return; - case GL_ACTIVE_ATTRIBUTE_MAX_LENGTH: - *params = 4; // includes NULL terminator - return; - default: - ADD_FAILURE() << "not handled pname: " << pname; - } - } - - static GLint GetAttribLocation(GLuint program, const GLchar* name) { - EXPECT_EQ(_program, program); - for (unsigned int i = 0; i < _attributeCount; i++) - if (!strcmp(name, _attributes[i].name)) - return _attributes[i].location; - ADD_FAILURE() << "unknown attribute name: " << name; - return -1; - } - - static void GetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, - GLsizei* length, GLint* size, GLenum* type, GLchar* name) { - EXPECT_EQ(_program, program); - ASSERT_LT(index, _attributeCount); - const Attribute & att = _attributes[index]; - ASSERT_GE(bufsize, strlen(att.name) + 1); - ASSERT_NE((GLint *)NULL, size); - ASSERT_NE((GLenum *)NULL, type); - ASSERT_NE((GLchar *)NULL, name); - strcpy(name, att.name); - if (length) - *length = strlen(name) + 1; - *size = att.size; - *type = att.type; - } - }; - hooks.gl.glGetProgramiv = GL::GetProgramiv; - hooks.gl.glGetAttribLocation = GL::GetAttribLocation; - hooks.gl.glGetActiveAttrib = GL::GetActiveAttrib; - dbg.glUseProgram(_program); - EXPECT_EQ(10, dbg.maxAttrib); - dbg.glUseProgram(0); - EXPECT_EQ(0, dbg.maxAttrib); -} -} // namespace - -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - return RUN_ALL_TESTS(); -} diff --git a/opengl/libs/GLES2_dbg/test/test_server.cpp b/opengl/libs/GLES2_dbg/test/test_server.cpp deleted file mode 100644 index 0ab87b0..0000000 --- a/opengl/libs/GLES2_dbg/test/test_server.cpp +++ /dev/null @@ -1,245 +0,0 @@ -/* - ** Copyright 2011, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#include "header.h" -#include "gtest/gtest.h" -#include "hooks.h" - -namespace android -{ -extern FILE * file; -extern unsigned int MAX_FILE_SIZE; -}; - -// tmpfile fails, so need to manually make a writable file first -static const char * filePath = "/data/local/tmp/dump.gles2dbg"; - -class ServerFileTest : public ::testing::Test -{ -protected: - ServerFileTest() { } - - virtual ~ServerFileTest() { } - - virtual void SetUp() { - MAX_FILE_SIZE = 8 << 20; - ASSERT_EQ((FILE *)NULL, file); - file = fopen("/data/local/tmp/dump.gles2dbg", "wb+"); - ASSERT_NE((FILE *)NULL, file) << "make sure file is writable: " - << filePath; - } - - virtual void TearDown() { - ASSERT_NE((FILE *)NULL, file); - fclose(file); - file = NULL; - } - - void Read(glesv2debugger::Message & msg) const { - msg.Clear(); - uint32_t len = 0; - ASSERT_EQ(sizeof(len), fread(&len, 1, sizeof(len), file)); - ASSERT_GT(len, 0u); - char * buffer = new char [len]; - ASSERT_EQ(len, fread(buffer, 1, len, file)); - msg.ParseFromArray(buffer, len); - delete buffer; - } - - void CheckNoAvailable() { - const long pos = ftell(file); - fseek(file, 0, SEEK_END); - EXPECT_EQ(pos, ftell(file)) << "check no available"; - } -}; - -TEST_F(ServerFileTest, Send) -{ - glesv2debugger::Message msg, cmd, read; - msg.set_context_id(1); - msg.set_function(msg.glFinish); - msg.set_expect_response(false); - msg.set_type(msg.BeforeCall); - rewind(file); - android::Send(msg, cmd); - rewind(file); - Read(read); - EXPECT_EQ(msg.context_id(), read.context_id()); - EXPECT_EQ(msg.function(), read.function()); - EXPECT_EQ(msg.expect_response(), read.expect_response()); - EXPECT_EQ(msg.type(), read.type()); -} - -TEST_F(ServerFileTest, CreateDbgContext) -{ - gl_hooks_t hooks; - struct Constant { - GLenum pname; - GLint param; - }; - static const Constant constants [] = { - {GL_MAX_VERTEX_ATTRIBS, 16}, - {GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, 32}, - {GL_IMPLEMENTATION_COLOR_READ_FORMAT, GL_RGBA}, - {GL_IMPLEMENTATION_COLOR_READ_TYPE, GL_UNSIGNED_BYTE}, - }; - struct HookMock { - static void GetIntegerv(GLenum pname, GLint* params) { - ASSERT_TRUE(params != NULL); - for (unsigned int i = 0; i < sizeof(constants) / sizeof(*constants); i++) - if (pname == constants[i].pname) { - *params = constants[i].param; - return; - } - FAIL() << "GetIntegerv unknown pname: " << pname; - } - static GLenum GetError() { - return GL_NO_ERROR; - } - }; - hooks.gl.glGetError = HookMock::GetError; - hooks.gl.glGetIntegerv = HookMock::GetIntegerv; - DbgContext * const dbg = CreateDbgContext(1, &hooks); - ASSERT_TRUE(dbg != NULL); - EXPECT_TRUE(dbg->vertexAttribs != NULL); - - rewind(file); - glesv2debugger::Message read; - for (unsigned int i = 0; i < 2; i++) { - Read(read); - EXPECT_EQ(reinterpret_cast<int>(dbg), read.context_id()); - EXPECT_FALSE(read.expect_response()); - EXPECT_EQ(read.Response, read.type()); - EXPECT_EQ(read.SETPROP, read.function()); - EXPECT_EQ(read.GLConstant, read.prop()); - GLint expectedConstant = 0; - HookMock::GetIntegerv(read.arg0(), &expectedConstant); - EXPECT_EQ(expectedConstant, read.arg1()); - } - CheckNoAvailable(); - dbgReleaseThread(); -} - -void * glNoop() -{ - return 0; -} - -class ServerFileContextTest : public ServerFileTest -{ -protected: - DbgContext* dbg; - gl_hooks_t hooks; - - ServerFileContextTest() { } - - virtual ~ServerFileContextTest() { } - - virtual void SetUp() { - ServerFileTest::SetUp(); - - dbg = new DbgContext(1, &hooks, 32); - ASSERT_NE((void *)NULL, dbg); - for (unsigned int i = 0; i < sizeof(hooks) / sizeof(void *); i++) - ((void **)&hooks)[i] = reinterpret_cast<void *>(glNoop); - } - - virtual void TearDown() { - ServerFileTest::TearDown(); - } -}; - -TEST_F(ServerFileContextTest, MessageLoop) -{ - static const int arg0 = 45; - static const float arg7 = -87.2331f; - static const int arg8 = -3; - static const int * ret = reinterpret_cast<int *>(870); - - struct Caller : public FunctionCall { - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - msg.set_arg0(arg0); - msg.set_arg7((int &)arg7); - msg.set_arg8(arg8); - return ret; - } - } caller; - const int contextId = reinterpret_cast<int>(dbg); - glesv2debugger::Message msg, read; - - EXPECT_EQ(ret, MessageLoop(caller, msg, msg.glFinish)); - - rewind(file); - Read(read); - EXPECT_EQ(contextId, read.context_id()); - EXPECT_EQ(read.glFinish, read.function()); - EXPECT_EQ(false, read.expect_response()); - EXPECT_EQ(read.BeforeCall, read.type()); - - Read(read); - EXPECT_EQ(contextId, read.context_id()); - EXPECT_EQ(read.glFinish, read.function()); - EXPECT_EQ(false, read.expect_response()); - EXPECT_EQ(read.AfterCall, read.type()); - EXPECT_TRUE(read.has_time()); - EXPECT_EQ(arg0, read.arg0()); - const int readArg7 = read.arg7(); - EXPECT_EQ(arg7, (float &)readArg7); - EXPECT_EQ(arg8, read.arg8()); - - const long pos = ftell(file); - fseek(file, 0, SEEK_END); - EXPECT_EQ(pos, ftell(file)) - << "should only write the BeforeCall and AfterCall messages"; -} - -TEST_F(ServerFileContextTest, DisableEnableVertexAttribArray) -{ - Debug_glEnableVertexAttribArray(dbg->MAX_VERTEX_ATTRIBS + 2); // should just ignore invalid index - - glesv2debugger::Message read; - rewind(file); - Read(read); - EXPECT_EQ(read.glEnableVertexAttribArray, read.function()); - EXPECT_EQ(dbg->MAX_VERTEX_ATTRIBS + 2, read.arg0()); - Read(read); - - rewind(file); - Debug_glDisableVertexAttribArray(dbg->MAX_VERTEX_ATTRIBS + 4); // should just ignore invalid index - rewind(file); - Read(read); - Read(read); - - for (unsigned int i = 0; i < dbg->MAX_VERTEX_ATTRIBS; i += 5) { - rewind(file); - Debug_glEnableVertexAttribArray(i); - EXPECT_TRUE(dbg->vertexAttribs[i].enabled); - rewind(file); - Read(read); - EXPECT_EQ(read.glEnableVertexAttribArray, read.function()); - EXPECT_EQ(i, read.arg0()); - Read(read); - - rewind(file); - Debug_glDisableVertexAttribArray(i); - EXPECT_FALSE(dbg->vertexAttribs[i].enabled); - rewind(file); - Read(read); - EXPECT_EQ(read.glDisableVertexAttribArray, read.function()); - EXPECT_EQ(i, read.arg0()); - Read(read); - } -} diff --git a/opengl/libs/GLES2_dbg/test/test_socket.cpp b/opengl/libs/GLES2_dbg/test/test_socket.cpp deleted file mode 100644 index 9f815e2..0000000 --- a/opengl/libs/GLES2_dbg/test/test_socket.cpp +++ /dev/null @@ -1,468 +0,0 @@ -/* - ** Copyright 2011, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#include <sys/socket.h> -#include <sys/ioctl.h> - -#include "header.h" -#include "gtest/gtest.h" -#include "hooks.h" - -namespace android -{ -extern int serverSock, clientSock; -}; - -void * glNoop(); - -class SocketContextTest : public ::testing::Test -{ -protected: - DbgContext* dbg; - gl_hooks_t hooks; - int sock; - char * buffer; - unsigned int bufferSize; - - SocketContextTest() : sock(-1) { - } - - virtual ~SocketContextTest() { - } - - virtual void SetUp() { - dbg = new DbgContext(1, &hooks, 32); - ASSERT_TRUE(dbg != NULL); - for (unsigned int i = 0; i < sizeof(hooks) / sizeof(void *); i++) - ((void **)&hooks)[i] = (void *)glNoop; - - int socks[2] = {-1, -1}; - ASSERT_EQ(0, socketpair(AF_UNIX, SOCK_STREAM, 0, socks)); - clientSock = socks[0]; - sock = socks[1]; - - bufferSize = 128; - buffer = new char [128]; - ASSERT_NE((char *)NULL, buffer); - } - - virtual void TearDown() { - close(sock); - close(clientSock); - clientSock = -1; - delete buffer; - } - - void Write(glesv2debugger::Message & msg) const { - msg.set_context_id((int)dbg); - msg.set_type(msg.Response); - ASSERT_TRUE(msg.has_context_id()); - ASSERT_TRUE(msg.has_function()); - ASSERT_TRUE(msg.has_type()); - ASSERT_TRUE(msg.has_expect_response()); - static std::string str; - msg.SerializeToString(&str); - const uint32_t len = str.length(); - ASSERT_EQ(sizeof(len), send(sock, &len, sizeof(len), 0)); - ASSERT_EQ(str.length(), send(sock, str.data(), str.length(), 0)); - } - - void Read(glesv2debugger::Message & msg) { - int available = 0; - ASSERT_EQ(0, ioctl(sock, FIONREAD, &available)); - ASSERT_GT(available, 0); - uint32_t len = 0; - ASSERT_EQ(sizeof(len), recv(sock, &len, sizeof(len), 0)); - if (len > bufferSize) { - bufferSize = len; - buffer = new char[bufferSize]; - ASSERT_TRUE(buffer != NULL); - } - ASSERT_EQ(len, recv(sock, buffer, len, 0)); - msg.Clear(); - msg.ParseFromArray(buffer, len); - ASSERT_TRUE(msg.has_context_id()); - ASSERT_TRUE(msg.has_function()); - ASSERT_TRUE(msg.has_type()); - ASSERT_TRUE(msg.has_expect_response()); - } - - void CheckNoAvailable() { - int available = 0; - ASSERT_EQ(0, ioctl(sock, FIONREAD, &available)); - ASSERT_EQ(available, 0); - } -}; - -TEST_F(SocketContextTest, MessageLoopSkip) -{ - static const int arg0 = 45; - static const float arg7 = -87.2331f; - static const int arg8 = -3; - static const int * ret = (int *)870; - - struct Caller : public FunctionCall { - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - msg.set_arg0(arg0); - msg.set_arg7((int &)arg7); - msg.set_arg8(arg8); - return ret; - } - } caller; - glesv2debugger::Message msg, read, cmd; - dbg->expectResponse.Bit(msg.glFinish, true); - - cmd.set_function(cmd.SKIP); - cmd.set_expect_response(false); - Write(cmd); - - EXPECT_NE(ret, MessageLoop(caller, msg, msg.glFinish)); - - Read(read); - EXPECT_EQ(read.glFinish, read.function()); - EXPECT_EQ(read.BeforeCall, read.type()); - EXPECT_NE(arg0, read.arg0()); - EXPECT_NE((int &)arg7, read.arg7()); - EXPECT_NE(arg8, read.arg8()); - - CheckNoAvailable(); -} - -TEST_F(SocketContextTest, MessageLoopContinue) -{ - static const int arg0 = GL_FRAGMENT_SHADER; - static const int ret = -342; - struct Caller : public FunctionCall { - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - msg.set_ret(ret); - return (int *)ret; - } - } caller; - glesv2debugger::Message msg, read, cmd; - dbg->expectResponse.Bit(msg.glCreateShader, true); - - cmd.set_function(cmd.CONTINUE); - cmd.set_expect_response(false); // MessageLoop should automatically skip after continue - Write(cmd); - - msg.set_arg0(arg0); - EXPECT_EQ((int *)ret, MessageLoop(caller, msg, msg.glCreateShader)); - - Read(read); - EXPECT_EQ(read.glCreateShader, read.function()); - EXPECT_EQ(read.BeforeCall, read.type()); - EXPECT_EQ(arg0, read.arg0()); - - Read(read); - EXPECT_EQ(read.glCreateShader, read.function()); - EXPECT_EQ(read.AfterCall, read.type()); - EXPECT_EQ(ret, read.ret()); - - CheckNoAvailable(); -} - -TEST_F(SocketContextTest, MessageLoopGenerateCall) -{ - static const int ret = -342; - static unsigned int createShader, createProgram; - createShader = 0; - createProgram = 0; - struct Caller : public FunctionCall { - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - const int r = (int)_c->glCreateProgram(); - msg.set_ret(r); - return (int *)r; - } - static GLuint CreateShader(const GLenum type) { - createShader++; - return type; - } - static GLuint CreateProgram() { - createProgram++; - return ret; - } - } caller; - glesv2debugger::Message msg, read, cmd; - hooks.gl.glCreateShader = caller.CreateShader; - hooks.gl.glCreateProgram = caller.CreateProgram; - dbg->expectResponse.Bit(msg.glCreateProgram, true); - - cmd.set_function(cmd.glCreateShader); - cmd.set_arg0(GL_FRAGMENT_SHADER); - cmd.set_expect_response(true); - Write(cmd); - - cmd.Clear(); - cmd.set_function(cmd.CONTINUE); - cmd.set_expect_response(true); - Write(cmd); - - cmd.set_function(cmd.glCreateShader); - cmd.set_arg0(GL_VERTEX_SHADER); - cmd.set_expect_response(false); // MessageLoop should automatically skip afterwards - Write(cmd); - - EXPECT_EQ((int *)ret, MessageLoop(caller, msg, msg.glCreateProgram)); - - Read(read); - EXPECT_EQ(read.glCreateProgram, read.function()); - EXPECT_EQ(read.BeforeCall, read.type()); - - Read(read); - EXPECT_EQ(read.glCreateShader, read.function()); - EXPECT_EQ(read.AfterGeneratedCall, read.type()); - EXPECT_EQ(GL_FRAGMENT_SHADER, read.ret()); - - Read(read); - EXPECT_EQ(read.glCreateProgram, read.function()); - EXPECT_EQ(read.AfterCall, read.type()); - EXPECT_EQ(ret, read.ret()); - - Read(read); - EXPECT_EQ(read.glCreateShader, read.function()); - EXPECT_EQ(read.AfterGeneratedCall, read.type()); - EXPECT_EQ(GL_VERTEX_SHADER, read.ret()); - - EXPECT_EQ(2, createShader); - EXPECT_EQ(1, createProgram); - - CheckNoAvailable(); -} - -TEST_F(SocketContextTest, MessageLoopSetProp) -{ - static const int ret = -342; - static unsigned int createShader, createProgram; - createShader = 0; - createProgram = 0; - struct Caller : public FunctionCall { - const int * operator()(gl_hooks_t::gl_t const * const _c, glesv2debugger::Message & msg) { - const int r = (int)_c->glCreateProgram(); - msg.set_ret(r); - return (int *)r; - } - static GLuint CreateShader(const GLenum type) { - createShader++; - return type; - } - static GLuint CreateProgram() { - createProgram++; - return ret; - } - } caller; - glesv2debugger::Message msg, read, cmd; - hooks.gl.glCreateShader = caller.CreateShader; - hooks.gl.glCreateProgram = caller.CreateProgram; - dbg->expectResponse.Bit(msg.glCreateProgram, false); - - cmd.set_function(cmd.SETPROP); - cmd.set_prop(cmd.ExpectResponse); - cmd.set_arg0(cmd.glCreateProgram); - cmd.set_arg1(true); - cmd.set_expect_response(true); - Write(cmd); - - cmd.Clear(); - cmd.set_function(cmd.glCreateShader); - cmd.set_arg0(GL_FRAGMENT_SHADER); - cmd.set_expect_response(true); - Write(cmd); - - cmd.set_function(cmd.SETPROP); - cmd.set_prop(cmd.CaptureDraw); - cmd.set_arg0(819); - cmd.set_expect_response(true); - Write(cmd); - - cmd.Clear(); - cmd.set_function(cmd.CONTINUE); - cmd.set_expect_response(true); - Write(cmd); - - cmd.set_function(cmd.glCreateShader); - cmd.set_arg0(GL_VERTEX_SHADER); - cmd.set_expect_response(false); // MessageLoop should automatically skip afterwards - Write(cmd); - - EXPECT_EQ((int *)ret, MessageLoop(caller, msg, msg.glCreateProgram)); - - EXPECT_TRUE(dbg->expectResponse.Bit(msg.glCreateProgram)); - EXPECT_EQ(819, dbg->captureDraw); - - Read(read); - EXPECT_EQ(read.glCreateProgram, read.function()); - EXPECT_EQ(read.BeforeCall, read.type()); - - Read(read); - EXPECT_EQ(read.glCreateShader, read.function()); - EXPECT_EQ(read.AfterGeneratedCall, read.type()); - EXPECT_EQ(GL_FRAGMENT_SHADER, read.ret()); - - Read(read); - EXPECT_EQ(read.glCreateProgram, read.function()); - EXPECT_EQ(read.AfterCall, read.type()); - EXPECT_EQ(ret, read.ret()); - - Read(read); - EXPECT_EQ(read.glCreateShader, read.function()); - EXPECT_EQ(read.AfterGeneratedCall, read.type()); - EXPECT_EQ(GL_VERTEX_SHADER, read.ret()); - - EXPECT_EQ(2, createShader); - EXPECT_EQ(1, createProgram); - - CheckNoAvailable(); -} - -TEST_F(SocketContextTest, TexImage2D) -{ - static const GLenum _target = GL_TEXTURE_2D; - static const GLint _level = 1, _internalformat = GL_RGBA; - static const GLsizei _width = 2, _height = 2; - static const GLint _border = 333; - static const GLenum _format = GL_RGB, _type = GL_UNSIGNED_SHORT_5_6_5; - static const short _pixels [_width * _height] = {11, 22, 33, 44}; - static unsigned int texImage2D; - texImage2D = 0; - - struct Caller { - static void TexImage2D(GLenum target, GLint level, GLint internalformat, - GLsizei width, GLsizei height, GLint border, - GLenum format, GLenum type, const GLvoid* pixels) { - EXPECT_EQ(_target, target); - EXPECT_EQ(_level, level); - EXPECT_EQ(_internalformat, internalformat); - EXPECT_EQ(_width, width); - EXPECT_EQ(_height, height); - EXPECT_EQ(_border, border); - EXPECT_EQ(_format, format); - EXPECT_EQ(_type, type); - EXPECT_EQ(0, memcmp(_pixels, pixels, sizeof(_pixels))); - texImage2D++; - } - } caller; - glesv2debugger::Message msg, read, cmd; - hooks.gl.glTexImage2D = caller.TexImage2D; - dbg->expectResponse.Bit(msg.glTexImage2D, false); - - Debug_glTexImage2D(_target, _level, _internalformat, _width, _height, _border, - _format, _type, _pixels); - EXPECT_EQ(1, texImage2D); - - Read(read); - EXPECT_EQ(read.glTexImage2D, read.function()); - EXPECT_EQ(read.BeforeCall, read.type()); - EXPECT_EQ(_target, read.arg0()); - EXPECT_EQ(_level, read.arg1()); - EXPECT_EQ(_internalformat, read.arg2()); - EXPECT_EQ(_width, read.arg3()); - EXPECT_EQ(_height, read.arg4()); - EXPECT_EQ(_border, read.arg5()); - EXPECT_EQ(_format, read.arg6()); - EXPECT_EQ(_type, read.arg7()); - - EXPECT_TRUE(read.has_data()); - uint32_t dataLen = 0; - const unsigned char * data = dbg->Decompress(read.data().data(), - read.data().length(), &dataLen); - EXPECT_EQ(sizeof(_pixels), dataLen); - if (sizeof(_pixels) == dataLen) - EXPECT_EQ(0, memcmp(_pixels, data, sizeof(_pixels))); - - Read(read); - EXPECT_EQ(read.glTexImage2D, read.function()); - EXPECT_EQ(read.AfterCall, read.type()); - - CheckNoAvailable(); -} - -TEST_F(SocketContextTest, CopyTexImage2D) -{ - static const GLenum _target = GL_TEXTURE_2D; - static const GLint _level = 1, _internalformat = GL_RGBA; - static const GLint _x = 9, _y = 99; - static const GLsizei _width = 2, _height = 3; - static const GLint _border = 333; - static const int _pixels [_width * _height] = {11, 22, 33, 44, 55, 66}; - static unsigned int copyTexImage2D, readPixels; - copyTexImage2D = 0, readPixels = 0; - - struct Caller { - static void CopyTexImage2D(GLenum target, GLint level, GLenum internalformat, - GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { - EXPECT_EQ(_target, target); - EXPECT_EQ(_level, level); - EXPECT_EQ(_internalformat, internalformat); - EXPECT_EQ(_x, x); - EXPECT_EQ(_y, y); - EXPECT_EQ(_width, width); - EXPECT_EQ(_height, height); - EXPECT_EQ(_border, border); - copyTexImage2D++; - } - static void ReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, - GLenum format, GLenum type, GLvoid* pixels) { - EXPECT_EQ(_x, x); - EXPECT_EQ(_y, y); - EXPECT_EQ(_width, width); - EXPECT_EQ(_height, height); - EXPECT_EQ(GL_RGBA, format); - EXPECT_EQ(GL_UNSIGNED_BYTE, type); - ASSERT_TRUE(pixels != NULL); - memcpy(pixels, _pixels, sizeof(_pixels)); - readPixels++; - } - } caller; - glesv2debugger::Message msg, read, cmd; - hooks.gl.glCopyTexImage2D = caller.CopyTexImage2D; - hooks.gl.glReadPixels = caller.ReadPixels; - dbg->expectResponse.Bit(msg.glCopyTexImage2D, false); - - Debug_glCopyTexImage2D(_target, _level, _internalformat, _x, _y, _width, _height, - _border); - ASSERT_EQ(1, copyTexImage2D); - ASSERT_EQ(1, readPixels); - - Read(read); - EXPECT_EQ(read.glCopyTexImage2D, read.function()); - EXPECT_EQ(read.BeforeCall, read.type()); - EXPECT_EQ(_target, read.arg0()); - EXPECT_EQ(_level, read.arg1()); - EXPECT_EQ(_internalformat, read.arg2()); - EXPECT_EQ(_x, read.arg3()); - EXPECT_EQ(_y, read.arg4()); - EXPECT_EQ(_width, read.arg5()); - EXPECT_EQ(_height, read.arg6()); - EXPECT_EQ(_border, read.arg7()); - - EXPECT_TRUE(read.has_data()); - EXPECT_EQ(read.ReferencedImage, read.data_type()); - EXPECT_EQ(GL_RGBA, read.pixel_format()); - EXPECT_EQ(GL_UNSIGNED_BYTE, read.pixel_type()); - uint32_t dataLen = 0; - unsigned char * const data = dbg->Decompress(read.data().data(), - read.data().length(), &dataLen); - ASSERT_EQ(sizeof(_pixels), dataLen); - for (unsigned i = 0; i < sizeof(_pixels) / sizeof(*_pixels); i++) - EXPECT_EQ(_pixels[i], ((const int *)data)[i]) << "xor with 0 ref is identity"; - free(data); - - Read(read); - EXPECT_EQ(read.glCopyTexImage2D, read.function()); - EXPECT_EQ(read.AfterCall, read.type()); - - CheckNoAvailable(); -} diff --git a/opengl/libs/GLES_CM/gl.cpp b/opengl/libs/GLES_CM/gl.cpp deleted file mode 100644 index ee29f12..0000000 --- a/opengl/libs/GLES_CM/gl.cpp +++ /dev/null @@ -1,191 +0,0 @@ -/* - ** Copyright 2007, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#include <ctype.h> -#include <string.h> -#include <errno.h> - -#include <sys/ioctl.h> - -#include <GLES/gl.h> -#include <GLES/glext.h> - -#include <cutils/log.h> -#include <cutils/properties.h> - -#include "hooks.h" -#include "egl_impl.h" - -using namespace android; - -// set this to 1 for crude GL debugging -#define CHECK_FOR_GL_ERRORS 0 - -// ---------------------------------------------------------------------------- -// extensions for the framework -// ---------------------------------------------------------------------------- - -extern "C" { -GL_API void GL_APIENTRY glColorPointerBounds(GLint size, GLenum type, GLsizei stride, - const GLvoid *ptr, GLsizei count); -GL_API void GL_APIENTRY glNormalPointerBounds(GLenum type, GLsizei stride, - const GLvoid *pointer, GLsizei count); -GL_API void GL_APIENTRY glTexCoordPointerBounds(GLint size, GLenum type, - GLsizei stride, const GLvoid *pointer, GLsizei count); -GL_API void GL_APIENTRY glVertexPointerBounds(GLint size, GLenum type, - GLsizei stride, const GLvoid *pointer, GLsizei count); -GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type, - GLsizei stride, const GLvoid *pointer, GLsizei count); -GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type, - GLsizei stride, const GLvoid *pointer, GLsizei count); -GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type, - GLsizei stride, const GLvoid *pointer, GLsizei count); -} - -void glColorPointerBounds(GLint size, GLenum type, GLsizei stride, - const GLvoid *ptr, GLsizei count) { - glColorPointer(size, type, stride, ptr); -} -void glNormalPointerBounds(GLenum type, GLsizei stride, - const GLvoid *pointer, GLsizei count) { - glNormalPointer(type, stride, pointer); -} -void glTexCoordPointerBounds(GLint size, GLenum type, - GLsizei stride, const GLvoid *pointer, GLsizei count) { - glTexCoordPointer(size, type, stride, pointer); -} -void glVertexPointerBounds(GLint size, GLenum type, - GLsizei stride, const GLvoid *pointer, GLsizei count) { - glVertexPointer(size, type, stride, pointer); -} - -void GL_APIENTRY glPointSizePointerOESBounds(GLenum type, - GLsizei stride, const GLvoid *pointer, GLsizei count) { - glPointSizePointerOES(type, stride, pointer); -} - -GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type, - GLsizei stride, const GLvoid *pointer, GLsizei count) { - glMatrixIndexPointerOES(size, type, stride, pointer); -} - -GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type, - GLsizei stride, const GLvoid *pointer, GLsizei count) { - glWeightPointerOES(size, type, stride, pointer); -} - -// ---------------------------------------------------------------------------- -// Actual GL entry-points -// ---------------------------------------------------------------------------- - -#undef API_ENTRY -#undef CALL_GL_API -#undef CALL_GL_API_RETURN - -#if USE_FAST_TLS_KEY && !CHECK_FOR_GL_ERRORS - - #ifdef HAVE_ARM_TLS_REGISTER - #define GET_TLS(reg) \ - "mrc p15, 0, " #reg ", c13, c0, 3 \n" - #else - #define GET_TLS(reg) \ - "mov " #reg ", #0xFFFF0FFF \n" \ - "ldr " #reg ", [" #reg ", #-15] \n" - #endif - - #define API_ENTRY(_api) __attribute__((naked)) _api - - #define CALL_GL_API(_api, ...) \ - asm volatile( \ - GET_TLS(r12) \ - "ldr r12, [r12, %[tls]] \n" \ - "cmp r12, #0 \n" \ - "ldrne pc, [r12, %[api]] \n" \ - "mov r0, #0 \n" \ - "bx lr \n" \ - : \ - : [tls] "J"(TLS_SLOT_OPENGL_API*4), \ - [api] "J"(__builtin_offsetof(gl_hooks_t, gl._api)) \ - : \ - ); - - #define CALL_GL_API_RETURN(_api, ...) \ - CALL_GL_API(_api, __VA_ARGS__) \ - return 0; // placate gcc's warnings. never reached. - -#else - - #if CHECK_FOR_GL_ERRORS - - #define CHECK_GL_ERRORS(_api) \ - do { GLint err = glGetError(); \ - LOGE_IF(err != GL_NO_ERROR, "%s failed (0x%04X)", #_api, err); \ - } while(false); - - #else - - #define CHECK_GL_ERRORS(_api) do { } while(false); - - #endif - - - #define API_ENTRY(_api) _api - - #define CALL_GL_API(_api, ...) \ - gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \ - _c->_api(__VA_ARGS__); \ - CHECK_GL_ERRORS(_api) - - #define CALL_GL_API_RETURN(_api, ...) \ - gl_hooks_t::gl_t const * const _c = &getGlThreadSpecific()->gl; \ - return _c->_api(__VA_ARGS__) - -#endif - - -extern "C" { -#include "gl_api.in" -#include "glext_api.in" -} - -#undef API_ENTRY -#undef CALL_GL_API -#undef CALL_GL_API_RETURN - - -/* - * These GL calls are special because they need to EGL to retrieve some - * informations before they can execute. - */ - -extern "C" void __glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image); -extern "C" void __glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image); - - -void glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image) -{ - GLeglImageOES implImage = - (GLeglImageOES)egl_get_image_for_current_context((EGLImageKHR)image); - __glEGLImageTargetTexture2DOES(target, implImage); -} - -void glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image) -{ - GLeglImageOES implImage = - (GLeglImageOES)egl_get_image_for_current_context((EGLImageKHR)image); - __glEGLImageTargetRenderbufferStorageOES(target, implImage); -} - diff --git a/opengl/libs/GLES_CM/gl_api.in b/opengl/libs/GLES_CM/gl_api.in deleted file mode 100644 index 7f20c4f..0000000 --- a/opengl/libs/GLES_CM/gl_api.in +++ /dev/null @@ -1,435 +0,0 @@ -void API_ENTRY(glAlphaFunc)(GLenum func, GLclampf ref) { - CALL_GL_API(glAlphaFunc, func, ref); -} -void API_ENTRY(glClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { - CALL_GL_API(glClearColor, red, green, blue, alpha); -} -void API_ENTRY(glClearDepthf)(GLclampf depth) { - CALL_GL_API(glClearDepthf, depth); -} -void API_ENTRY(glClipPlanef)(GLenum plane, const GLfloat *equation) { - CALL_GL_API(glClipPlanef, plane, equation); -} -void API_ENTRY(glColor4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { - CALL_GL_API(glColor4f, red, green, blue, alpha); -} -void API_ENTRY(glDepthRangef)(GLclampf zNear, GLclampf zFar) { - CALL_GL_API(glDepthRangef, zNear, zFar); -} -void API_ENTRY(glFogf)(GLenum pname, GLfloat param) { - CALL_GL_API(glFogf, pname, param); -} -void API_ENTRY(glFogfv)(GLenum pname, const GLfloat *params) { - CALL_GL_API(glFogfv, pname, params); -} -void API_ENTRY(glFrustumf)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) { - CALL_GL_API(glFrustumf, left, right, bottom, top, zNear, zFar); -} -void API_ENTRY(glGetClipPlanef)(GLenum pname, GLfloat eqn[4]) { - CALL_GL_API(glGetClipPlanef, pname, eqn); -} -void API_ENTRY(glGetFloatv)(GLenum pname, GLfloat *params) { - CALL_GL_API(glGetFloatv, pname, params); -} -void API_ENTRY(glGetLightfv)(GLenum light, GLenum pname, GLfloat *params) { - CALL_GL_API(glGetLightfv, light, pname, params); -} -void API_ENTRY(glGetMaterialfv)(GLenum face, GLenum pname, GLfloat *params) { - CALL_GL_API(glGetMaterialfv, face, pname, params); -} -void API_ENTRY(glGetTexEnvfv)(GLenum env, GLenum pname, GLfloat *params) { - CALL_GL_API(glGetTexEnvfv, env, pname, params); -} -void API_ENTRY(glGetTexParameterfv)(GLenum target, GLenum pname, GLfloat *params) { - CALL_GL_API(glGetTexParameterfv, target, pname, params); -} -void API_ENTRY(glLightModelf)(GLenum pname, GLfloat param) { - CALL_GL_API(glLightModelf, pname, param); -} -void API_ENTRY(glLightModelfv)(GLenum pname, const GLfloat *params) { - CALL_GL_API(glLightModelfv, pname, params); -} -void API_ENTRY(glLightf)(GLenum light, GLenum pname, GLfloat param) { - CALL_GL_API(glLightf, light, pname, param); -} -void API_ENTRY(glLightfv)(GLenum light, GLenum pname, const GLfloat *params) { - CALL_GL_API(glLightfv, light, pname, params); -} -void API_ENTRY(glLineWidth)(GLfloat width) { - CALL_GL_API(glLineWidth, width); -} -void API_ENTRY(glLoadMatrixf)(const GLfloat *m) { - CALL_GL_API(glLoadMatrixf, m); -} -void API_ENTRY(glMaterialf)(GLenum face, GLenum pname, GLfloat param) { - CALL_GL_API(glMaterialf, face, pname, param); -} -void API_ENTRY(glMaterialfv)(GLenum face, GLenum pname, const GLfloat *params) { - CALL_GL_API(glMaterialfv, face, pname, params); -} -void API_ENTRY(glMultMatrixf)(const GLfloat *m) { - CALL_GL_API(glMultMatrixf, m); -} -void API_ENTRY(glMultiTexCoord4f)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) { - CALL_GL_API(glMultiTexCoord4f, target, s, t, r, q); -} -void API_ENTRY(glNormal3f)(GLfloat nx, GLfloat ny, GLfloat nz) { - CALL_GL_API(glNormal3f, nx, ny, nz); -} -void API_ENTRY(glOrthof)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) { - CALL_GL_API(glOrthof, left, right, bottom, top, zNear, zFar); -} -void API_ENTRY(glPointParameterf)(GLenum pname, GLfloat param) { - CALL_GL_API(glPointParameterf, pname, param); -} -void API_ENTRY(glPointParameterfv)(GLenum pname, const GLfloat *params) { - CALL_GL_API(glPointParameterfv, pname, params); -} -void API_ENTRY(glPointSize)(GLfloat size) { - CALL_GL_API(glPointSize, size); -} -void API_ENTRY(glPolygonOffset)(GLfloat factor, GLfloat units) { - CALL_GL_API(glPolygonOffset, factor, units); -} -void API_ENTRY(glRotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) { - CALL_GL_API(glRotatef, angle, x, y, z); -} -void API_ENTRY(glScalef)(GLfloat x, GLfloat y, GLfloat z) { - CALL_GL_API(glScalef, x, y, z); -} -void API_ENTRY(glTexEnvf)(GLenum target, GLenum pname, GLfloat param) { - CALL_GL_API(glTexEnvf, target, pname, param); -} -void API_ENTRY(glTexEnvfv)(GLenum target, GLenum pname, const GLfloat *params) { - CALL_GL_API(glTexEnvfv, target, pname, params); -} -void API_ENTRY(glTexParameterf)(GLenum target, GLenum pname, GLfloat param) { - CALL_GL_API(glTexParameterf, target, pname, param); -} -void API_ENTRY(glTexParameterfv)(GLenum target, GLenum pname, const GLfloat *params) { - CALL_GL_API(glTexParameterfv, target, pname, params); -} -void API_ENTRY(glTranslatef)(GLfloat x, GLfloat y, GLfloat z) { - CALL_GL_API(glTranslatef, x, y, z); -} -void API_ENTRY(glActiveTexture)(GLenum texture) { - CALL_GL_API(glActiveTexture, texture); -} -void API_ENTRY(glAlphaFuncx)(GLenum func, GLclampx ref) { - CALL_GL_API(glAlphaFuncx, func, ref); -} -void API_ENTRY(glBindBuffer)(GLenum target, GLuint buffer) { - CALL_GL_API(glBindBuffer, target, buffer); -} -void API_ENTRY(glBindTexture)(GLenum target, GLuint texture) { - CALL_GL_API(glBindTexture, target, texture); -} -void API_ENTRY(glBlendFunc)(GLenum sfactor, GLenum dfactor) { - CALL_GL_API(glBlendFunc, sfactor, dfactor); -} -void API_ENTRY(glBufferData)(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage) { - CALL_GL_API(glBufferData, target, size, data, usage); -} -void API_ENTRY(glBufferSubData)(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data) { - CALL_GL_API(glBufferSubData, target, offset, size, data); -} -void API_ENTRY(glClear)(GLbitfield mask) { - CALL_GL_API(glClear, mask); -} -void API_ENTRY(glClearColorx)(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) { - CALL_GL_API(glClearColorx, red, green, blue, alpha); -} -void API_ENTRY(glClearDepthx)(GLclampx depth) { - CALL_GL_API(glClearDepthx, depth); -} -void API_ENTRY(glClearStencil)(GLint s) { - CALL_GL_API(glClearStencil, s); -} -void API_ENTRY(glClientActiveTexture)(GLenum texture) { - CALL_GL_API(glClientActiveTexture, texture); -} -void API_ENTRY(glClipPlanex)(GLenum plane, const GLfixed *equation) { - CALL_GL_API(glClipPlanex, plane, equation); -} -void API_ENTRY(glColor4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) { - CALL_GL_API(glColor4ub, red, green, blue, alpha); -} -void API_ENTRY(glColor4x)(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) { - CALL_GL_API(glColor4x, red, green, blue, alpha); -} -void API_ENTRY(glColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) { - CALL_GL_API(glColorMask, red, green, blue, alpha); -} -void API_ENTRY(glColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) { - CALL_GL_API(glColorPointer, size, type, stride, pointer); -} -void API_ENTRY(glCompressedTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) { - CALL_GL_API(glCompressedTexImage2D, target, level, internalformat, width, height, border, imageSize, data); -} -void API_ENTRY(glCompressedTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data) { - CALL_GL_API(glCompressedTexSubImage2D, target, level, xoffset, yoffset, width, height, format, imageSize, data); -} -void API_ENTRY(glCopyTexImage2D)(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) { - CALL_GL_API(glCopyTexImage2D, target, level, internalformat, x, y, width, height, border); -} -void API_ENTRY(glCopyTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) { - CALL_GL_API(glCopyTexSubImage2D, target, level, xoffset, yoffset, x, y, width, height); -} -void API_ENTRY(glCullFace)(GLenum mode) { - CALL_GL_API(glCullFace, mode); -} -void API_ENTRY(glDeleteBuffers)(GLsizei n, const GLuint *buffers) { - CALL_GL_API(glDeleteBuffers, n, buffers); -} -void API_ENTRY(glDeleteTextures)(GLsizei n, const GLuint *textures) { - CALL_GL_API(glDeleteTextures, n, textures); -} -void API_ENTRY(glDepthFunc)(GLenum func) { - CALL_GL_API(glDepthFunc, func); -} -void API_ENTRY(glDepthMask)(GLboolean flag) { - CALL_GL_API(glDepthMask, flag); -} -void API_ENTRY(glDepthRangex)(GLclampx zNear, GLclampx zFar) { - CALL_GL_API(glDepthRangex, zNear, zFar); -} -void API_ENTRY(glDisable)(GLenum cap) { - CALL_GL_API(glDisable, cap); -} -void API_ENTRY(glDisableClientState)(GLenum array) { - CALL_GL_API(glDisableClientState, array); -} -void API_ENTRY(glDrawArrays)(GLenum mode, GLint first, GLsizei count) { - CALL_GL_API(glDrawArrays, mode, first, count); -} -void API_ENTRY(glDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) { - CALL_GL_API(glDrawElements, mode, count, type, indices); -} -void API_ENTRY(glEnable)(GLenum cap) { - CALL_GL_API(glEnable, cap); -} -void API_ENTRY(glEnableClientState)(GLenum array) { - CALL_GL_API(glEnableClientState, array); -} -void API_ENTRY(glFinish)(void) { - CALL_GL_API(glFinish); -} -void API_ENTRY(glFlush)(void) { - CALL_GL_API(glFlush); -} -void API_ENTRY(glFogx)(GLenum pname, GLfixed param) { - CALL_GL_API(glFogx, pname, param); -} -void API_ENTRY(glFogxv)(GLenum pname, const GLfixed *params) { - CALL_GL_API(glFogxv, pname, params); -} -void API_ENTRY(glFrontFace)(GLenum mode) { - CALL_GL_API(glFrontFace, mode); -} -void API_ENTRY(glFrustumx)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) { - CALL_GL_API(glFrustumx, left, right, bottom, top, zNear, zFar); -} -void API_ENTRY(glGetBooleanv)(GLenum pname, GLboolean *params) { - CALL_GL_API(glGetBooleanv, pname, params); -} -void API_ENTRY(glGetBufferParameteriv)(GLenum target, GLenum pname, GLint *params) { - CALL_GL_API(glGetBufferParameteriv, target, pname, params); -} -void API_ENTRY(glGetClipPlanex)(GLenum pname, GLfixed eqn[4]) { - CALL_GL_API(glGetClipPlanex, pname, eqn); -} -void API_ENTRY(glGenBuffers)(GLsizei n, GLuint *buffers) { - CALL_GL_API(glGenBuffers, n, buffers); -} -void API_ENTRY(glGenTextures)(GLsizei n, GLuint *textures) { - CALL_GL_API(glGenTextures, n, textures); -} -GLenum API_ENTRY(glGetError)(void) { - CALL_GL_API_RETURN(glGetError); -} -void API_ENTRY(glGetFixedv)(GLenum pname, GLfixed *params) { - CALL_GL_API(glGetFixedv, pname, params); -} -void API_ENTRY(glGetIntegerv)(GLenum pname, GLint *params) { - CALL_GL_API(glGetIntegerv, pname, params); -} -void API_ENTRY(glGetLightxv)(GLenum light, GLenum pname, GLfixed *params) { - CALL_GL_API(glGetLightxv, light, pname, params); -} -void API_ENTRY(glGetMaterialxv)(GLenum face, GLenum pname, GLfixed *params) { - CALL_GL_API(glGetMaterialxv, face, pname, params); -} -void API_ENTRY(glGetPointerv)(GLenum pname, GLvoid **params) { - CALL_GL_API(glGetPointerv, pname, params); -} -const GLubyte * API_ENTRY(glGetString)(GLenum name) { - CALL_GL_API_RETURN(glGetString, name); -} -void API_ENTRY(glGetTexEnviv)(GLenum env, GLenum pname, GLint *params) { - CALL_GL_API(glGetTexEnviv, env, pname, params); -} -void API_ENTRY(glGetTexEnvxv)(GLenum env, GLenum pname, GLfixed *params) { - CALL_GL_API(glGetTexEnvxv, env, pname, params); -} -void API_ENTRY(glGetTexParameteriv)(GLenum target, GLenum pname, GLint *params) { - CALL_GL_API(glGetTexParameteriv, target, pname, params); -} -void API_ENTRY(glGetTexParameterxv)(GLenum target, GLenum pname, GLfixed *params) { - CALL_GL_API(glGetTexParameterxv, target, pname, params); -} -void API_ENTRY(glHint)(GLenum target, GLenum mode) { - CALL_GL_API(glHint, target, mode); -} -GLboolean API_ENTRY(glIsBuffer)(GLuint buffer) { - CALL_GL_API_RETURN(glIsBuffer, buffer); -} -GLboolean API_ENTRY(glIsEnabled)(GLenum cap) { - CALL_GL_API_RETURN(glIsEnabled, cap); -} -GLboolean API_ENTRY(glIsTexture)(GLuint texture) { - CALL_GL_API_RETURN(glIsTexture, texture); -} -void API_ENTRY(glLightModelx)(GLenum pname, GLfixed param) { - CALL_GL_API(glLightModelx, pname, param); -} -void API_ENTRY(glLightModelxv)(GLenum pname, const GLfixed *params) { - CALL_GL_API(glLightModelxv, pname, params); -} -void API_ENTRY(glLightx)(GLenum light, GLenum pname, GLfixed param) { - CALL_GL_API(glLightx, light, pname, param); -} -void API_ENTRY(glLightxv)(GLenum light, GLenum pname, const GLfixed *params) { - CALL_GL_API(glLightxv, light, pname, params); -} -void API_ENTRY(glLineWidthx)(GLfixed width) { - CALL_GL_API(glLineWidthx, width); -} -void API_ENTRY(glLoadIdentity)(void) { - CALL_GL_API(glLoadIdentity); -} -void API_ENTRY(glLoadMatrixx)(const GLfixed *m) { - CALL_GL_API(glLoadMatrixx, m); -} -void API_ENTRY(glLogicOp)(GLenum opcode) { - CALL_GL_API(glLogicOp, opcode); -} -void API_ENTRY(glMaterialx)(GLenum face, GLenum pname, GLfixed param) { - CALL_GL_API(glMaterialx, face, pname, param); -} -void API_ENTRY(glMaterialxv)(GLenum face, GLenum pname, const GLfixed *params) { - CALL_GL_API(glMaterialxv, face, pname, params); -} -void API_ENTRY(glMatrixMode)(GLenum mode) { - CALL_GL_API(glMatrixMode, mode); -} -void API_ENTRY(glMultMatrixx)(const GLfixed *m) { - CALL_GL_API(glMultMatrixx, m); -} -void API_ENTRY(glMultiTexCoord4x)(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) { - CALL_GL_API(glMultiTexCoord4x, target, s, t, r, q); -} -void API_ENTRY(glNormal3x)(GLfixed nx, GLfixed ny, GLfixed nz) { - CALL_GL_API(glNormal3x, nx, ny, nz); -} -void API_ENTRY(glNormalPointer)(GLenum type, GLsizei stride, const GLvoid *pointer) { - CALL_GL_API(glNormalPointer, type, stride, pointer); -} -void API_ENTRY(glOrthox)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) { - CALL_GL_API(glOrthox, left, right, bottom, top, zNear, zFar); -} -void API_ENTRY(glPixelStorei)(GLenum pname, GLint param) { - CALL_GL_API(glPixelStorei, pname, param); -} -void API_ENTRY(glPointParameterx)(GLenum pname, GLfixed param) { - CALL_GL_API(glPointParameterx, pname, param); -} -void API_ENTRY(glPointParameterxv)(GLenum pname, const GLfixed *params) { - CALL_GL_API(glPointParameterxv, pname, params); -} -void API_ENTRY(glPointSizex)(GLfixed size) { - CALL_GL_API(glPointSizex, size); -} -void API_ENTRY(glPolygonOffsetx)(GLfixed factor, GLfixed units) { - CALL_GL_API(glPolygonOffsetx, factor, units); -} -void API_ENTRY(glPopMatrix)(void) { - CALL_GL_API(glPopMatrix); -} -void API_ENTRY(glPushMatrix)(void) { - CALL_GL_API(glPushMatrix); -} -void API_ENTRY(glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) { - CALL_GL_API(glReadPixels, x, y, width, height, format, type, pixels); -} -void API_ENTRY(glRotatex)(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) { - CALL_GL_API(glRotatex, angle, x, y, z); -} -void API_ENTRY(glSampleCoverage)(GLclampf value, GLboolean invert) { - CALL_GL_API(glSampleCoverage, value, invert); -} -void API_ENTRY(glSampleCoveragex)(GLclampx value, GLboolean invert) { - CALL_GL_API(glSampleCoveragex, value, invert); -} -void API_ENTRY(glScalex)(GLfixed x, GLfixed y, GLfixed z) { - CALL_GL_API(glScalex, x, y, z); -} -void API_ENTRY(glScissor)(GLint x, GLint y, GLsizei width, GLsizei height) { - CALL_GL_API(glScissor, x, y, width, height); -} -void API_ENTRY(glShadeModel)(GLenum mode) { - CALL_GL_API(glShadeModel, mode); -} -void API_ENTRY(glStencilFunc)(GLenum func, GLint ref, GLuint mask) { - CALL_GL_API(glStencilFunc, func, ref, mask); -} -void API_ENTRY(glStencilMask)(GLuint mask) { - CALL_GL_API(glStencilMask, mask); -} -void API_ENTRY(glStencilOp)(GLenum fail, GLenum zfail, GLenum zpass) { - CALL_GL_API(glStencilOp, fail, zfail, zpass); -} -void API_ENTRY(glTexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) { - CALL_GL_API(glTexCoordPointer, size, type, stride, pointer); -} -void API_ENTRY(glTexEnvi)(GLenum target, GLenum pname, GLint param) { - CALL_GL_API(glTexEnvi, target, pname, param); -} -void API_ENTRY(glTexEnvx)(GLenum target, GLenum pname, GLfixed param) { - CALL_GL_API(glTexEnvx, target, pname, param); -} -void API_ENTRY(glTexEnviv)(GLenum target, GLenum pname, const GLint *params) { - CALL_GL_API(glTexEnviv, target, pname, params); -} -void API_ENTRY(glTexEnvxv)(GLenum target, GLenum pname, const GLfixed *params) { - CALL_GL_API(glTexEnvxv, target, pname, params); -} -void API_ENTRY(glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) { - CALL_GL_API(glTexImage2D, target, level, internalformat, width, height, border, format, type, pixels); -} -void API_ENTRY(glTexParameteri)(GLenum target, GLenum pname, GLint param) { - CALL_GL_API(glTexParameteri, target, pname, param); -} -void API_ENTRY(glTexParameterx)(GLenum target, GLenum pname, GLfixed param) { - CALL_GL_API(glTexParameterx, target, pname, param); -} -void API_ENTRY(glTexParameteriv)(GLenum target, GLenum pname, const GLint *params) { - CALL_GL_API(glTexParameteriv, target, pname, params); -} -void API_ENTRY(glTexParameterxv)(GLenum target, GLenum pname, const GLfixed *params) { - CALL_GL_API(glTexParameterxv, target, pname, params); -} -void API_ENTRY(glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) { - CALL_GL_API(glTexSubImage2D, target, level, xoffset, yoffset, width, height, format, type, pixels); -} -void API_ENTRY(glTranslatex)(GLfixed x, GLfixed y, GLfixed z) { - CALL_GL_API(glTranslatex, x, y, z); -} -void API_ENTRY(glVertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) { - CALL_GL_API(glVertexPointer, size, type, stride, pointer); -} -void API_ENTRY(glViewport)(GLint x, GLint y, GLsizei width, GLsizei height) { - CALL_GL_API(glViewport, x, y, width, height); -} -void API_ENTRY(glPointSizePointerOES)(GLenum type, GLsizei stride, const GLvoid *pointer) { - CALL_GL_API(glPointSizePointerOES, type, stride, pointer); -} diff --git a/opengl/libs/GLES_CM/glext_api.in b/opengl/libs/GLES_CM/glext_api.in deleted file mode 100644 index 5393fa6..0000000 --- a/opengl/libs/GLES_CM/glext_api.in +++ /dev/null @@ -1,378 +0,0 @@ -void API_ENTRY(glBlendEquationSeparateOES)(GLenum modeRGB, GLenum modeAlpha) { - CALL_GL_API(glBlendEquationSeparateOES, modeRGB, modeAlpha); -} -void API_ENTRY(glBlendFuncSeparateOES)(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) { - CALL_GL_API(glBlendFuncSeparateOES, srcRGB, dstRGB, srcAlpha, dstAlpha); -} -void API_ENTRY(glBlendEquationOES)(GLenum mode) { - CALL_GL_API(glBlendEquationOES, mode); -} -void API_ENTRY(glDrawTexsOES)(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height) { - CALL_GL_API(glDrawTexsOES, x, y, z, width, height); -} -void API_ENTRY(glDrawTexiOES)(GLint x, GLint y, GLint z, GLint width, GLint height) { - CALL_GL_API(glDrawTexiOES, x, y, z, width, height); -} -void API_ENTRY(glDrawTexxOES)(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height) { - CALL_GL_API(glDrawTexxOES, x, y, z, width, height); -} -void API_ENTRY(glDrawTexsvOES)(const GLshort *coords) { - CALL_GL_API(glDrawTexsvOES, coords); -} -void API_ENTRY(glDrawTexivOES)(const GLint *coords) { - CALL_GL_API(glDrawTexivOES, coords); -} -void API_ENTRY(glDrawTexxvOES)(const GLfixed *coords) { - CALL_GL_API(glDrawTexxvOES, coords); -} -void API_ENTRY(glDrawTexfOES)(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) { - CALL_GL_API(glDrawTexfOES, x, y, z, width, height); -} -void API_ENTRY(glDrawTexfvOES)(const GLfloat *coords) { - CALL_GL_API(glDrawTexfvOES, coords); -} -void API_ENTRY(__glEGLImageTargetTexture2DOES)(GLenum target, GLeglImageOES image) { - CALL_GL_API(glEGLImageTargetTexture2DOES, target, image); -} -void API_ENTRY(__glEGLImageTargetRenderbufferStorageOES)(GLenum target, GLeglImageOES image) { - CALL_GL_API(glEGLImageTargetRenderbufferStorageOES, target, image); -} -void API_ENTRY(glAlphaFuncxOES)(GLenum func, GLclampx ref) { - CALL_GL_API(glAlphaFuncxOES, func, ref); -} -void API_ENTRY(glClearColorxOES)(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) { - CALL_GL_API(glClearColorxOES, red, green, blue, alpha); -} -void API_ENTRY(glClearDepthxOES)(GLclampx depth) { - CALL_GL_API(glClearDepthxOES, depth); -} -void API_ENTRY(glClipPlanexOES)(GLenum plane, const GLfixed *equation) { - CALL_GL_API(glClipPlanexOES, plane, equation); -} -void API_ENTRY(glColor4xOES)(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) { - CALL_GL_API(glColor4xOES, red, green, blue, alpha); -} -void API_ENTRY(glDepthRangexOES)(GLclampx zNear, GLclampx zFar) { - CALL_GL_API(glDepthRangexOES, zNear, zFar); -} -void API_ENTRY(glFogxOES)(GLenum pname, GLfixed param) { - CALL_GL_API(glFogxOES, pname, param); -} -void API_ENTRY(glFogxvOES)(GLenum pname, const GLfixed *params) { - CALL_GL_API(glFogxvOES, pname, params); -} -void API_ENTRY(glFrustumxOES)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) { - CALL_GL_API(glFrustumxOES, left, right, bottom, top, zNear, zFar); -} -void API_ENTRY(glGetClipPlanexOES)(GLenum pname, GLfixed eqn[4]) { - CALL_GL_API(glGetClipPlanexOES, pname, eqn); -} -void API_ENTRY(glGetFixedvOES)(GLenum pname, GLfixed *params) { - CALL_GL_API(glGetFixedvOES, pname, params); -} -void API_ENTRY(glGetLightxvOES)(GLenum light, GLenum pname, GLfixed *params) { - CALL_GL_API(glGetLightxvOES, light, pname, params); -} -void API_ENTRY(glGetMaterialxvOES)(GLenum face, GLenum pname, GLfixed *params) { - CALL_GL_API(glGetMaterialxvOES, face, pname, params); -} -void API_ENTRY(glGetTexEnvxvOES)(GLenum env, GLenum pname, GLfixed *params) { - CALL_GL_API(glGetTexEnvxvOES, env, pname, params); -} -void API_ENTRY(glGetTexParameterxvOES)(GLenum target, GLenum pname, GLfixed *params) { - CALL_GL_API(glGetTexParameterxvOES, target, pname, params); -} -void API_ENTRY(glLightModelxOES)(GLenum pname, GLfixed param) { - CALL_GL_API(glLightModelxOES, pname, param); -} -void API_ENTRY(glLightModelxvOES)(GLenum pname, const GLfixed *params) { - CALL_GL_API(glLightModelxvOES, pname, params); -} -void API_ENTRY(glLightxOES)(GLenum light, GLenum pname, GLfixed param) { - CALL_GL_API(glLightxOES, light, pname, param); -} -void API_ENTRY(glLightxvOES)(GLenum light, GLenum pname, const GLfixed *params) { - CALL_GL_API(glLightxvOES, light, pname, params); -} -void API_ENTRY(glLineWidthxOES)(GLfixed width) { - CALL_GL_API(glLineWidthxOES, width); -} -void API_ENTRY(glLoadMatrixxOES)(const GLfixed *m) { - CALL_GL_API(glLoadMatrixxOES, m); -} -void API_ENTRY(glMaterialxOES)(GLenum face, GLenum pname, GLfixed param) { - CALL_GL_API(glMaterialxOES, face, pname, param); -} -void API_ENTRY(glMaterialxvOES)(GLenum face, GLenum pname, const GLfixed *params) { - CALL_GL_API(glMaterialxvOES, face, pname, params); -} -void API_ENTRY(glMultMatrixxOES)(const GLfixed *m) { - CALL_GL_API(glMultMatrixxOES, m); -} -void API_ENTRY(glMultiTexCoord4xOES)(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) { - CALL_GL_API(glMultiTexCoord4xOES, target, s, t, r, q); -} -void API_ENTRY(glNormal3xOES)(GLfixed nx, GLfixed ny, GLfixed nz) { - CALL_GL_API(glNormal3xOES, nx, ny, nz); -} -void API_ENTRY(glOrthoxOES)(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) { - CALL_GL_API(glOrthoxOES, left, right, bottom, top, zNear, zFar); -} -void API_ENTRY(glPointParameterxOES)(GLenum pname, GLfixed param) { - CALL_GL_API(glPointParameterxOES, pname, param); -} -void API_ENTRY(glPointParameterxvOES)(GLenum pname, const GLfixed *params) { - CALL_GL_API(glPointParameterxvOES, pname, params); -} -void API_ENTRY(glPointSizexOES)(GLfixed size) { - CALL_GL_API(glPointSizexOES, size); -} -void API_ENTRY(glPolygonOffsetxOES)(GLfixed factor, GLfixed units) { - CALL_GL_API(glPolygonOffsetxOES, factor, units); -} -void API_ENTRY(glRotatexOES)(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) { - CALL_GL_API(glRotatexOES, angle, x, y, z); -} -void API_ENTRY(glSampleCoveragexOES)(GLclampx value, GLboolean invert) { - CALL_GL_API(glSampleCoveragexOES, value, invert); -} -void API_ENTRY(glScalexOES)(GLfixed x, GLfixed y, GLfixed z) { - CALL_GL_API(glScalexOES, x, y, z); -} -void API_ENTRY(glTexEnvxOES)(GLenum target, GLenum pname, GLfixed param) { - CALL_GL_API(glTexEnvxOES, target, pname, param); -} -void API_ENTRY(glTexEnvxvOES)(GLenum target, GLenum pname, const GLfixed *params) { - CALL_GL_API(glTexEnvxvOES, target, pname, params); -} -void API_ENTRY(glTexParameterxOES)(GLenum target, GLenum pname, GLfixed param) { - CALL_GL_API(glTexParameterxOES, target, pname, param); -} -void API_ENTRY(glTexParameterxvOES)(GLenum target, GLenum pname, const GLfixed *params) { - CALL_GL_API(glTexParameterxvOES, target, pname, params); -} -void API_ENTRY(glTranslatexOES)(GLfixed x, GLfixed y, GLfixed z) { - CALL_GL_API(glTranslatexOES, x, y, z); -} -GLboolean API_ENTRY(glIsRenderbufferOES)(GLuint renderbuffer) { - CALL_GL_API_RETURN(glIsRenderbufferOES, renderbuffer); -} -void API_ENTRY(glBindRenderbufferOES)(GLenum target, GLuint renderbuffer) { - CALL_GL_API(glBindRenderbufferOES, target, renderbuffer); -} -void API_ENTRY(glDeleteRenderbuffersOES)(GLsizei n, const GLuint* renderbuffers) { - CALL_GL_API(glDeleteRenderbuffersOES, n, renderbuffers); -} -void API_ENTRY(glGenRenderbuffersOES)(GLsizei n, GLuint* renderbuffers) { - CALL_GL_API(glGenRenderbuffersOES, n, renderbuffers); -} -void API_ENTRY(glRenderbufferStorageOES)(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) { - CALL_GL_API(glRenderbufferStorageOES, target, internalformat, width, height); -} -void API_ENTRY(glGetRenderbufferParameterivOES)(GLenum target, GLenum pname, GLint* params) { - CALL_GL_API(glGetRenderbufferParameterivOES, target, pname, params); -} -GLboolean API_ENTRY(glIsFramebufferOES)(GLuint framebuffer) { - CALL_GL_API_RETURN(glIsFramebufferOES, framebuffer); -} -void API_ENTRY(glBindFramebufferOES)(GLenum target, GLuint framebuffer) { - CALL_GL_API(glBindFramebufferOES, target, framebuffer); -} -void API_ENTRY(glDeleteFramebuffersOES)(GLsizei n, const GLuint* framebuffers) { - CALL_GL_API(glDeleteFramebuffersOES, n, framebuffers); -} -void API_ENTRY(glGenFramebuffersOES)(GLsizei n, GLuint* framebuffers) { - CALL_GL_API(glGenFramebuffersOES, n, framebuffers); -} -GLenum API_ENTRY(glCheckFramebufferStatusOES)(GLenum target) { - CALL_GL_API_RETURN(glCheckFramebufferStatusOES, target); -} -void API_ENTRY(glFramebufferRenderbufferOES)(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) { - CALL_GL_API(glFramebufferRenderbufferOES, target, attachment, renderbuffertarget, renderbuffer); -} -void API_ENTRY(glFramebufferTexture2DOES)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) { - CALL_GL_API(glFramebufferTexture2DOES, target, attachment, textarget, texture, level); -} -void API_ENTRY(glGetFramebufferAttachmentParameterivOES)(GLenum target, GLenum attachment, GLenum pname, GLint* params) { - CALL_GL_API(glGetFramebufferAttachmentParameterivOES, target, attachment, pname, params); -} -void API_ENTRY(glGenerateMipmapOES)(GLenum target) { - CALL_GL_API(glGenerateMipmapOES, target); -} -void* API_ENTRY(glMapBufferOES)(GLenum target, GLenum access) { - CALL_GL_API_RETURN(glMapBufferOES, target, access); -} -GLboolean API_ENTRY(glUnmapBufferOES)(GLenum target) { - CALL_GL_API_RETURN(glUnmapBufferOES, target); -} -void API_ENTRY(glGetBufferPointervOES)(GLenum target, GLenum pname, GLvoid ** params) { - CALL_GL_API(glGetBufferPointervOES, target, pname, params); -} -void API_ENTRY(glCurrentPaletteMatrixOES)(GLuint matrixpaletteindex) { - CALL_GL_API(glCurrentPaletteMatrixOES, matrixpaletteindex); -} -void API_ENTRY(glLoadPaletteFromModelViewMatrixOES)(void) { - CALL_GL_API(glLoadPaletteFromModelViewMatrixOES); -} -void API_ENTRY(glMatrixIndexPointerOES)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) { - CALL_GL_API(glMatrixIndexPointerOES, size, type, stride, pointer); -} -void API_ENTRY(glWeightPointerOES)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) { - CALL_GL_API(glWeightPointerOES, size, type, stride, pointer); -} -GLbitfield API_ENTRY(glQueryMatrixxOES)(GLfixed mantissa[16], GLint exponent[16]) { - CALL_GL_API_RETURN(glQueryMatrixxOES, mantissa, exponent); -} -void API_ENTRY(glDepthRangefOES)(GLclampf zNear, GLclampf zFar) { - CALL_GL_API(glDepthRangefOES, zNear, zFar); -} -void API_ENTRY(glFrustumfOES)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) { - CALL_GL_API(glFrustumfOES, left, right, bottom, top, zNear, zFar); -} -void API_ENTRY(glOrthofOES)(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) { - CALL_GL_API(glOrthofOES, left, right, bottom, top, zNear, zFar); -} -void API_ENTRY(glClipPlanefOES)(GLenum plane, const GLfloat *equation) { - CALL_GL_API(glClipPlanefOES, plane, equation); -} -void API_ENTRY(glGetClipPlanefOES)(GLenum pname, GLfloat eqn[4]) { - CALL_GL_API(glGetClipPlanefOES, pname, eqn); -} -void API_ENTRY(glClearDepthfOES)(GLclampf depth) { - CALL_GL_API(glClearDepthfOES, depth); -} -void API_ENTRY(glTexGenfOES)(GLenum coord, GLenum pname, GLfloat param) { - CALL_GL_API(glTexGenfOES, coord, pname, param); -} -void API_ENTRY(glTexGenfvOES)(GLenum coord, GLenum pname, const GLfloat *params) { - CALL_GL_API(glTexGenfvOES, coord, pname, params); -} -void API_ENTRY(glTexGeniOES)(GLenum coord, GLenum pname, GLint param) { - CALL_GL_API(glTexGeniOES, coord, pname, param); -} -void API_ENTRY(glTexGenivOES)(GLenum coord, GLenum pname, const GLint *params) { - CALL_GL_API(glTexGenivOES, coord, pname, params); -} -void API_ENTRY(glTexGenxOES)(GLenum coord, GLenum pname, GLfixed param) { - CALL_GL_API(glTexGenxOES, coord, pname, param); -} -void API_ENTRY(glTexGenxvOES)(GLenum coord, GLenum pname, const GLfixed *params) { - CALL_GL_API(glTexGenxvOES, coord, pname, params); -} -void API_ENTRY(glGetTexGenfvOES)(GLenum coord, GLenum pname, GLfloat *params) { - CALL_GL_API(glGetTexGenfvOES, coord, pname, params); -} -void API_ENTRY(glGetTexGenivOES)(GLenum coord, GLenum pname, GLint *params) { - CALL_GL_API(glGetTexGenivOES, coord, pname, params); -} -void API_ENTRY(glGetTexGenxvOES)(GLenum coord, GLenum pname, GLfixed *params) { - CALL_GL_API(glGetTexGenxvOES, coord, pname, params); -} -void API_ENTRY(glBindVertexArrayOES)(GLuint array) { - CALL_GL_API(glBindVertexArrayOES, array); -} -void API_ENTRY(glDeleteVertexArraysOES)(GLsizei n, const GLuint *arrays) { - CALL_GL_API(glDeleteVertexArraysOES, n, arrays); -} -void API_ENTRY(glGenVertexArraysOES)(GLsizei n, GLuint *arrays) { - CALL_GL_API(glGenVertexArraysOES, n, arrays); -} -GLboolean API_ENTRY(glIsVertexArrayOES)(GLuint array) { - CALL_GL_API_RETURN(glIsVertexArrayOES, array); -} -void API_ENTRY(glDiscardFramebufferEXT)(GLenum target, GLsizei numAttachments, const GLenum *attachments) { - CALL_GL_API(glDiscardFramebufferEXT, target, numAttachments, attachments); -} -void API_ENTRY(glMultiDrawArraysEXT)(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount) { - CALL_GL_API(glMultiDrawArraysEXT, mode, first, count, primcount); -} -void API_ENTRY(glMultiDrawElementsEXT)(GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount) { - CALL_GL_API(glMultiDrawElementsEXT, mode, count, type, indices, primcount); -} -void API_ENTRY(glClipPlanefIMG)(GLenum p, const GLfloat *eqn) { - CALL_GL_API(glClipPlanefIMG, p, eqn); -} -void API_ENTRY(glClipPlanexIMG)(GLenum p, const GLfixed *eqn) { - CALL_GL_API(glClipPlanexIMG, p, eqn); -} -void API_ENTRY(glRenderbufferStorageMultisampleIMG)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { - CALL_GL_API(glRenderbufferStorageMultisampleIMG, target, samples, internalformat, width, height); -} -void API_ENTRY(glFramebufferTexture2DMultisampleIMG)(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) { - CALL_GL_API(glFramebufferTexture2DMultisampleIMG, target, attachment, textarget, texture, level, samples); -} -void API_ENTRY(glDeleteFencesNV)(GLsizei n, const GLuint *fences) { - CALL_GL_API(glDeleteFencesNV, n, fences); -} -void API_ENTRY(glGenFencesNV)(GLsizei n, GLuint *fences) { - CALL_GL_API(glGenFencesNV, n, fences); -} -GLboolean API_ENTRY(glIsFenceNV)(GLuint fence) { - CALL_GL_API_RETURN(glIsFenceNV, fence); -} -GLboolean API_ENTRY(glTestFenceNV)(GLuint fence) { - CALL_GL_API_RETURN(glTestFenceNV, fence); -} -void API_ENTRY(glGetFenceivNV)(GLuint fence, GLenum pname, GLint *params) { - CALL_GL_API(glGetFenceivNV, fence, pname, params); -} -void API_ENTRY(glFinishFenceNV)(GLuint fence) { - CALL_GL_API(glFinishFenceNV, fence); -} -void API_ENTRY(glSetFenceNV)(GLuint fence, GLenum condition) { - CALL_GL_API(glSetFenceNV, fence, condition); -} -void API_ENTRY(glGetDriverControlsQCOM)(GLint *num, GLsizei size, GLuint *driverControls) { - CALL_GL_API(glGetDriverControlsQCOM, num, size, driverControls); -} -void API_ENTRY(glGetDriverControlStringQCOM)(GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString) { - CALL_GL_API(glGetDriverControlStringQCOM, driverControl, bufSize, length, driverControlString); -} -void API_ENTRY(glEnableDriverControlQCOM)(GLuint driverControl) { - CALL_GL_API(glEnableDriverControlQCOM, driverControl); -} -void API_ENTRY(glDisableDriverControlQCOM)(GLuint driverControl) { - CALL_GL_API(glDisableDriverControlQCOM, driverControl); -} -void API_ENTRY(glExtGetTexturesQCOM)(GLuint *textures, GLint maxTextures, GLint *numTextures) { - CALL_GL_API(glExtGetTexturesQCOM, textures, maxTextures, numTextures); -} -void API_ENTRY(glExtGetBuffersQCOM)(GLuint *buffers, GLint maxBuffers, GLint *numBuffers) { - CALL_GL_API(glExtGetBuffersQCOM, buffers, maxBuffers, numBuffers); -} -void API_ENTRY(glExtGetRenderbuffersQCOM)(GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers) { - CALL_GL_API(glExtGetRenderbuffersQCOM, renderbuffers, maxRenderbuffers, numRenderbuffers); -} -void API_ENTRY(glExtGetFramebuffersQCOM)(GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers) { - CALL_GL_API(glExtGetFramebuffersQCOM, framebuffers, maxFramebuffers, numFramebuffers); -} -void API_ENTRY(glExtGetTexLevelParameterivQCOM)(GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params) { - CALL_GL_API(glExtGetTexLevelParameterivQCOM, texture, face, level, pname, params); -} -void API_ENTRY(glExtTexObjectStateOverrideiQCOM)(GLenum target, GLenum pname, GLint param) { - CALL_GL_API(glExtTexObjectStateOverrideiQCOM, target, pname, param); -} -void API_ENTRY(glExtGetTexSubImageQCOM)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels) { - CALL_GL_API(glExtGetTexSubImageQCOM, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels); -} -void API_ENTRY(glExtGetBufferPointervQCOM)(GLenum target, GLvoid **params) { - CALL_GL_API(glExtGetBufferPointervQCOM, target, params); -} -void API_ENTRY(glExtGetShadersQCOM)(GLuint *shaders, GLint maxShaders, GLint *numShaders) { - CALL_GL_API(glExtGetShadersQCOM, shaders, maxShaders, numShaders); -} -void API_ENTRY(glExtGetProgramsQCOM)(GLuint *programs, GLint maxPrograms, GLint *numPrograms) { - CALL_GL_API(glExtGetProgramsQCOM, programs, maxPrograms, numPrograms); -} -GLboolean API_ENTRY(glExtIsProgramBinaryQCOM)(GLuint program) { - CALL_GL_API_RETURN(glExtIsProgramBinaryQCOM, program); -} -void API_ENTRY(glExtGetProgramBinarySourceQCOM)(GLuint program, GLenum shadertype, GLchar *source, GLint *length) { - CALL_GL_API(glExtGetProgramBinarySourceQCOM, program, shadertype, source, length); -} -void API_ENTRY(glStartTilingQCOM)(GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask) { - CALL_GL_API(glStartTilingQCOM, x, y, width, height, preserveMask); -} -void API_ENTRY(glEndTilingQCOM)(GLbitfield preserveMask) { - CALL_GL_API(glEndTilingQCOM, preserveMask); -} diff --git a/opengl/libs/debug.in b/opengl/libs/debug.in deleted file mode 100644 index 882b2da..0000000 --- a/opengl/libs/debug.in +++ /dev/null @@ -1,235 +0,0 @@ -// the following functions are not defined in GLESv2_dbg -TRACE_GL_VOID(glAlphaFunc, (GLenum func, GLclampf ref), (func, ref), 2, "GLenum", func, "GLclampf", ref) -TRACE_GL_VOID(glAlphaFuncx, (GLenum func, GLclampx ref), (func, ref), 2, "GLenum", func, "GLclampx", ref) -TRACE_GL_VOID(glAlphaFuncxOES, (GLenum func, GLclampx ref), (func, ref), 2, "GLenum", func, "GLclampx", ref) -TRACE_GL_VOID(glBeginPerfMonitorAMD, (GLuint monitor), (monitor), 1, "GLuint", monitor) -TRACE_GL_VOID(glBindFramebufferOES, (GLenum target, GLuint framebuffer), (target, framebuffer), 2, "GLenum", target, "GLuint", framebuffer) -TRACE_GL_VOID(glBindRenderbufferOES, (GLenum target, GLuint renderbuffer), (target, renderbuffer), 2, "GLenum", target, "GLuint", renderbuffer) -TRACE_GL_VOID(glBindVertexArrayOES, (GLuint array), (array), 1, "GLuint", array) -TRACE_GL_VOID(glBlendEquationOES, (GLenum mode), (mode), 1, "GLenum", mode) -TRACE_GL_VOID(glBlendEquationSeparateOES, (GLenum modeRGB, GLenum modeAlpha), (modeRGB, modeAlpha), 2, "GLenum", modeRGB, "GLenum", modeAlpha) -TRACE_GL_VOID(glBlendFuncSeparateOES, (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha), (srcRGB, dstRGB, srcAlpha, dstAlpha), 4, "GLenum", srcRGB, "GLenum", dstRGB, "GLenum", srcAlpha, "GLenum", dstAlpha) -TRACE_GL(GLenum, glCheckFramebufferStatusOES, (GLenum target), (target), 1, "GLenum", target) -TRACE_GL_VOID(glClearColorx, (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha), (red, green, blue, alpha), 4, "GLclampx", red, "GLclampx", green, "GLclampx", blue, "GLclampx", alpha) -TRACE_GL_VOID(glClearColorxOES, (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha), (red, green, blue, alpha), 4, "GLclampx", red, "GLclampx", green, "GLclampx", blue, "GLclampx", alpha) -TRACE_GL_VOID(glClearDepthfOES, (GLclampf depth), (depth), 1, "GLclampf", depth) -TRACE_GL_VOID(glClearDepthx, (GLclampx depth), (depth), 1, "GLclampx", depth) -TRACE_GL_VOID(glClearDepthxOES, (GLclampx depth), (depth), 1, "GLclampx", depth) -TRACE_GL_VOID(glClientActiveTexture, (GLenum texture), (texture), 1, "GLenum", texture) -TRACE_GL_VOID(glClipPlanef, (GLenum plane, const GLfloat *equation), (plane, equation), 2, "GLenum", plane, "const GLfloat *", equation) -TRACE_GL_VOID(glClipPlanefIMG, (GLenum p, const GLfloat *eqn), (p, eqn), 2, "GLenum", p, "const GLfloat *", eqn) -TRACE_GL_VOID(glClipPlanefOES, (GLenum plane, const GLfloat *equation), (plane, equation), 2, "GLenum", plane, "const GLfloat *", equation) -TRACE_GL_VOID(glClipPlanex, (GLenum plane, const GLfixed *equation), (plane, equation), 2, "GLenum", plane, "const GLfixed *", equation) -TRACE_GL_VOID(glClipPlanexIMG, (GLenum p, const GLfixed *eqn), (p, eqn), 2, "GLenum", p, "const GLfixed *", eqn) -TRACE_GL_VOID(glClipPlanexOES, (GLenum plane, const GLfixed *equation), (plane, equation), 2, "GLenum", plane, "const GLfixed *", equation) -TRACE_GL_VOID(glColor4f, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha), (red, green, blue, alpha), 4, "GLfloat", red, "GLfloat", green, "GLfloat", blue, "GLfloat", alpha) -TRACE_GL_VOID(glColor4ub, (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha), (red, green, blue, alpha), 4, "GLubyte", red, "GLubyte", green, "GLubyte", blue, "GLubyte", alpha) -TRACE_GL_VOID(glColor4x, (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha), (red, green, blue, alpha), 4, "GLfixed", red, "GLfixed", green, "GLfixed", blue, "GLfixed", alpha) -TRACE_GL_VOID(glColor4xOES, (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha), (red, green, blue, alpha), 4, "GLfixed", red, "GLfixed", green, "GLfixed", blue, "GLfixed", alpha) -TRACE_GL_VOID(glColorPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer) -TRACE_GL_VOID(glCompressedTexImage3DOES, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data), (target, level, internalformat, width, height, depth, border, imageSize, data), 9, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLint", border, "GLsizei", imageSize, "const GLvoid*", data) -TRACE_GL_VOID(glCompressedTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLsizei", imageSize, "const GLvoid*", data) -TRACE_GL_VOID(glCopyTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height), (target, level, xoffset, yoffset, zoffset, x, y, width, height), 9, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height) -TRACE_GL_VOID(glCoverageMaskNV, (GLboolean mask), (mask), 1, "GLboolean", mask) -TRACE_GL_VOID(glCoverageOperationNV, (GLenum operation), (operation), 1, "GLenum", operation) -TRACE_GL_VOID(glCurrentPaletteMatrixOES, (GLuint matrixpaletteindex), (matrixpaletteindex), 1, "GLuint", matrixpaletteindex) -TRACE_GL_VOID(glDeleteFencesNV, (GLsizei n, const GLuint *fences), (n, fences), 2, "GLsizei", n, "const GLuint *", fences) -TRACE_GL_VOID(glDeleteFramebuffersOES, (GLsizei n, const GLuint* framebuffers), (n, framebuffers), 2, "GLsizei", n, "const GLuint*", framebuffers) -TRACE_GL_VOID(glDeletePerfMonitorsAMD, (GLsizei n, GLuint *monitors), (n, monitors), 2, "GLsizei", n, "GLuint *", monitors) -TRACE_GL_VOID(glDeleteRenderbuffersOES, (GLsizei n, const GLuint* renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "const GLuint*", renderbuffers) -TRACE_GL_VOID(glDeleteVertexArraysOES, (GLsizei n, const GLuint *arrays), (n, arrays), 2, "GLsizei", n, "const GLuint *", arrays) -TRACE_GL_VOID(glDepthRangefOES, (GLclampf zNear, GLclampf zFar), (zNear, zFar), 2, "GLclampf", zNear, "GLclampf", zFar) -TRACE_GL_VOID(glDepthRangex, (GLclampx zNear, GLclampx zFar), (zNear, zFar), 2, "GLclampx", zNear, "GLclampx", zFar) -TRACE_GL_VOID(glDepthRangexOES, (GLclampx zNear, GLclampx zFar), (zNear, zFar), 2, "GLclampx", zNear, "GLclampx", zFar) -TRACE_GL_VOID(glDisableClientState, (GLenum array), (array), 1, "GLenum", array) -TRACE_GL_VOID(glDisableDriverControlQCOM, (GLuint driverControl), (driverControl), 1, "GLuint", driverControl) -TRACE_GL_VOID(glDiscardFramebufferEXT, (GLenum target, GLsizei numAttachments, const GLenum *attachments), (target, numAttachments, attachments), 3, "GLenum", target, "GLsizei", numAttachments, "const GLenum *", attachments) -TRACE_GL_VOID(glDrawTexfOES, (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height), (x, y, z, width, height), 5, "GLfloat", x, "GLfloat", y, "GLfloat", z, "GLfloat", width, "GLfloat", height) -TRACE_GL_VOID(glDrawTexfvOES, (const GLfloat *coords), (coords), 1, "const GLfloat *", coords) -TRACE_GL_VOID(glDrawTexiOES, (GLint x, GLint y, GLint z, GLint width, GLint height), (x, y, z, width, height), 5, "GLint", x, "GLint", y, "GLint", z, "GLint", width, "GLint", height) -TRACE_GL_VOID(glDrawTexivOES, (const GLint *coords), (coords), 1, "const GLint *", coords) -TRACE_GL_VOID(glDrawTexsOES, (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height), (x, y, z, width, height), 5, "GLshort", x, "GLshort", y, "GLshort", z, "GLshort", width, "GLshort", height) -TRACE_GL_VOID(glDrawTexsvOES, (const GLshort *coords), (coords), 1, "const GLshort *", coords) -TRACE_GL_VOID(glDrawTexxOES, (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height), (x, y, z, width, height), 5, "GLfixed", x, "GLfixed", y, "GLfixed", z, "GLfixed", width, "GLfixed", height) -TRACE_GL_VOID(glDrawTexxvOES, (const GLfixed *coords), (coords), 1, "const GLfixed *", coords) -TRACE_GL_VOID(glEGLImageTargetRenderbufferStorageOES, (GLenum target, GLeglImageOES image), (target, image), 2, "GLenum", target, "GLeglImageOES", image) -TRACE_GL_VOID(glEGLImageTargetTexture2DOES, (GLenum target, GLeglImageOES image), (target, image), 2, "GLenum", target, "GLeglImageOES", image) -TRACE_GL_VOID(glEnableClientState, (GLenum array), (array), 1, "GLenum", array) -TRACE_GL_VOID(glEnableDriverControlQCOM, (GLuint driverControl), (driverControl), 1, "GLuint", driverControl) -TRACE_GL_VOID(glEndPerfMonitorAMD, (GLuint monitor), (monitor), 1, "GLuint", monitor) -TRACE_GL_VOID(glEndTilingQCOM, (GLbitfield preserveMask), (preserveMask), 1, "GLbitfield", preserveMask) -TRACE_GL_VOID(glExtGetBufferPointervQCOM, (GLenum target, GLvoid **params), (target, params), 2, "GLenum", target, "GLvoid **", params) -TRACE_GL_VOID(glExtGetBuffersQCOM, (GLuint *buffers, GLint maxBuffers, GLint *numBuffers), (buffers, maxBuffers, numBuffers), 3, "GLuint *", buffers, "GLint", maxBuffers, "GLint *", numBuffers) -TRACE_GL_VOID(glExtGetFramebuffersQCOM, (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers), (framebuffers, maxFramebuffers, numFramebuffers), 3, "GLuint *", framebuffers, "GLint", maxFramebuffers, "GLint *", numFramebuffers) -TRACE_GL_VOID(glExtGetProgramBinarySourceQCOM, (GLuint program, GLenum shadertype, GLchar *source, GLint *length), (program, shadertype, source, length), 4, "GLuint", program, "GLenum", shadertype, "GLchar *", source, "GLint *", length) -TRACE_GL_VOID(glExtGetProgramsQCOM, (GLuint *programs, GLint maxPrograms, GLint *numPrograms), (programs, maxPrograms, numPrograms), 3, "GLuint *", programs, "GLint", maxPrograms, "GLint *", numPrograms) -TRACE_GL_VOID(glExtGetRenderbuffersQCOM, (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers), (renderbuffers, maxRenderbuffers, numRenderbuffers), 3, "GLuint *", renderbuffers, "GLint", maxRenderbuffers, "GLint *", numRenderbuffers) -TRACE_GL_VOID(glExtGetShadersQCOM, (GLuint *shaders, GLint maxShaders, GLint *numShaders), (shaders, maxShaders, numShaders), 3, "GLuint *", shaders, "GLint", maxShaders, "GLint *", numShaders) -TRACE_GL_VOID(glExtGetTexLevelParameterivQCOM, (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params), (texture, face, level, pname, params), 5, "GLuint", texture, "GLenum", face, "GLint", level, "GLenum", pname, "GLint *", params) -TRACE_GL_VOID(glExtGetTexSubImageQCOM, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLenum", type, "GLvoid *", texels) -TRACE_GL_VOID(glExtGetTexturesQCOM, (GLuint *textures, GLint maxTextures, GLint *numTextures), (textures, maxTextures, numTextures), 3, "GLuint *", textures, "GLint", maxTextures, "GLint *", numTextures) -TRACE_GL(GLboolean, glExtIsProgramBinaryQCOM, (GLuint program), (program), 1, "GLuint", program) -TRACE_GL_VOID(glExtTexObjectStateOverrideiQCOM, (GLenum target, GLenum pname, GLint param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLint", param) -TRACE_GL_VOID(glFinishFenceNV, (GLuint fence), (fence), 1, "GLuint", fence) -TRACE_GL_VOID(glFogf, (GLenum pname, GLfloat param), (pname, param), 2, "GLenum", pname, "GLfloat", param) -TRACE_GL_VOID(glFogfv, (GLenum pname, const GLfloat *params), (pname, params), 2, "GLenum", pname, "const GLfloat *", params) -TRACE_GL_VOID(glFogx, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glFogxOES, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glFogxv, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glFogxvOES, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glFramebufferRenderbufferOES, (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer), (target, attachment, renderbuffertarget, renderbuffer), 4, "GLenum", target, "GLenum", attachment, "GLenum", renderbuffertarget, "GLuint", renderbuffer) -TRACE_GL_VOID(glFramebufferTexture2DMultisampleIMG, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples), (target, attachment, textarget, texture, level, samples), 6, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level, "GLsizei", samples) -TRACE_GL_VOID(glFramebufferTexture2DOES, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level), (target, attachment, textarget, texture, level), 5, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level) -TRACE_GL_VOID(glFramebufferTexture3DOES, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset), (target, attachment, textarget, texture, level, zoffset), 6, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level, "GLint", zoffset) -TRACE_GL_VOID(glFrustumf, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar) -TRACE_GL_VOID(glFrustumfOES, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar) -TRACE_GL_VOID(glFrustumx, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar) -TRACE_GL_VOID(glFrustumxOES, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar) -TRACE_GL_VOID(glGenFencesNV, (GLsizei n, GLuint *fences), (n, fences), 2, "GLsizei", n, "GLuint *", fences) -TRACE_GL_VOID(glGenFramebuffersOES, (GLsizei n, GLuint* framebuffers), (n, framebuffers), 2, "GLsizei", n, "GLuint*", framebuffers) -TRACE_GL_VOID(glGenPerfMonitorsAMD, (GLsizei n, GLuint *monitors), (n, monitors), 2, "GLsizei", n, "GLuint *", monitors) -TRACE_GL_VOID(glGenRenderbuffersOES, (GLsizei n, GLuint* renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "GLuint*", renderbuffers) -TRACE_GL_VOID(glGenVertexArraysOES, (GLsizei n, GLuint *arrays), (n, arrays), 2, "GLsizei", n, "GLuint *", arrays) -TRACE_GL_VOID(glGenerateMipmapOES, (GLenum target), (target), 1, "GLenum", target) -TRACE_GL_VOID(glGetBufferPointervOES, (GLenum target, GLenum pname, GLvoid ** params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLvoid **", params) -TRACE_GL_VOID(glGetClipPlanef, (GLenum pname, GLfloat eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfloat", eqn) -TRACE_GL_VOID(glGetClipPlanefOES, (GLenum pname, GLfloat eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfloat", eqn) -TRACE_GL_VOID(glGetClipPlanex, (GLenum pname, GLfixed eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfixed", eqn) -TRACE_GL_VOID(glGetClipPlanexOES, (GLenum pname, GLfixed eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfixed", eqn) -TRACE_GL_VOID(glGetDriverControlStringQCOM, (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString), (driverControl, bufSize, length, driverControlString), 4, "GLuint", driverControl, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", driverControlString) -TRACE_GL_VOID(glGetDriverControlsQCOM, (GLint *num, GLsizei size, GLuint *driverControls), (num, size, driverControls), 3, "GLint *", num, "GLsizei", size, "GLuint *", driverControls) -TRACE_GL_VOID(glGetFenceivNV, (GLuint fence, GLenum pname, GLint *params), (fence, pname, params), 3, "GLuint", fence, "GLenum", pname, "GLint *", params) -TRACE_GL_VOID(glGetFixedv, (GLenum pname, GLfixed *params), (pname, params), 2, "GLenum", pname, "GLfixed *", params) -TRACE_GL_VOID(glGetFixedvOES, (GLenum pname, GLfixed *params), (pname, params), 2, "GLenum", pname, "GLfixed *", params) -TRACE_GL_VOID(glGetFramebufferAttachmentParameterivOES, (GLenum target, GLenum attachment, GLenum pname, GLint* params), (target, attachment, pname, params), 4, "GLenum", target, "GLenum", attachment, "GLenum", pname, "GLint*", params) -TRACE_GL_VOID(glGetLightfv, (GLenum light, GLenum pname, GLfloat *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfloat *", params) -TRACE_GL_VOID(glGetLightxv, (GLenum light, GLenum pname, GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfixed *", params) -TRACE_GL_VOID(glGetLightxvOES, (GLenum light, GLenum pname, GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfixed *", params) -TRACE_GL_VOID(glGetMaterialfv, (GLenum face, GLenum pname, GLfloat *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfloat *", params) -TRACE_GL_VOID(glGetMaterialxv, (GLenum face, GLenum pname, GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfixed *", params) -TRACE_GL_VOID(glGetMaterialxvOES, (GLenum face, GLenum pname, GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfixed *", params) -TRACE_GL_VOID(glGetPerfMonitorCounterDataAMD, (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten), (monitor, pname, dataSize, data, bytesWritten), 5, "GLuint", monitor, "GLenum", pname, "GLsizei", dataSize, "GLuint *", data, "GLint *", bytesWritten) -TRACE_GL_VOID(glGetPerfMonitorCounterInfoAMD, (GLuint group, GLuint counter, GLenum pname, GLvoid *data), (group, counter, pname, data), 4, "GLuint", group, "GLuint", counter, "GLenum", pname, "GLvoid *", data) -TRACE_GL_VOID(glGetPerfMonitorCounterStringAMD, (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString), (group, counter, bufSize, length, counterString), 5, "GLuint", group, "GLuint", counter, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", counterString) -TRACE_GL_VOID(glGetPerfMonitorCountersAMD, (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters), (group, numCounters, maxActiveCounters, counterSize, counters), 5, "GLuint", group, "GLint *", numCounters, "GLint *", maxActiveCounters, "GLsizei", counterSize, "GLuint *", counters) -TRACE_GL_VOID(glGetPerfMonitorGroupStringAMD, (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString), (group, bufSize, length, groupString), 4, "GLuint", group, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", groupString) -TRACE_GL_VOID(glGetPerfMonitorGroupsAMD, (GLint *numGroups, GLsizei groupsSize, GLuint *groups), (numGroups, groupsSize, groups), 3, "GLint *", numGroups, "GLsizei", groupsSize, "GLuint *", groups) -TRACE_GL_VOID(glGetPointerv, (GLenum pname, GLvoid **params), (pname, params), 2, "GLenum", pname, "GLvoid **", params) -TRACE_GL_VOID(glGetProgramBinaryOES, (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary), (program, bufSize, length, binaryFormat, binary), 5, "GLuint", program, "GLsizei", bufSize, "GLsizei *", length, "GLenum *", binaryFormat, "GLvoid *", binary) -TRACE_GL_VOID(glGetRenderbufferParameterivOES, (GLenum target, GLenum pname, GLint* params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint*", params) -TRACE_GL_VOID(glGetTexEnvfv, (GLenum env, GLenum pname, GLfloat *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLfloat *", params) -TRACE_GL_VOID(glGetTexEnviv, (GLenum env, GLenum pname, GLint *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLint *", params) -TRACE_GL_VOID(glGetTexEnvxv, (GLenum env, GLenum pname, GLfixed *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLfixed *", params) -TRACE_GL_VOID(glGetTexEnvxvOES, (GLenum env, GLenum pname, GLfixed *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLfixed *", params) -TRACE_GL_VOID(glGetTexGenfvOES, (GLenum coord, GLenum pname, GLfloat *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "GLfloat *", params) -TRACE_GL_VOID(glGetTexGenivOES, (GLenum coord, GLenum pname, GLint *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "GLint *", params) -TRACE_GL_VOID(glGetTexGenxvOES, (GLenum coord, GLenum pname, GLfixed *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "GLfixed *", params) -TRACE_GL_VOID(glGetTexParameterxv, (GLenum target, GLenum pname, GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLfixed *", params) -TRACE_GL_VOID(glGetTexParameterxvOES, (GLenum target, GLenum pname, GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLfixed *", params) -TRACE_GL(GLboolean, glIsFenceNV, (GLuint fence), (fence), 1, "GLuint", fence) -TRACE_GL(GLboolean, glIsFramebufferOES, (GLuint framebuffer), (framebuffer), 1, "GLuint", framebuffer) -TRACE_GL(GLboolean, glIsRenderbufferOES, (GLuint renderbuffer), (renderbuffer), 1, "GLuint", renderbuffer) -TRACE_GL(GLboolean, glIsVertexArrayOES, (GLuint array), (array), 1, "GLuint", array) -TRACE_GL_VOID(glLightModelf, (GLenum pname, GLfloat param), (pname, param), 2, "GLenum", pname, "GLfloat", param) -TRACE_GL_VOID(glLightModelfv, (GLenum pname, const GLfloat *params), (pname, params), 2, "GLenum", pname, "const GLfloat *", params) -TRACE_GL_VOID(glLightModelx, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glLightModelxOES, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glLightModelxv, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glLightModelxvOES, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glLightf, (GLenum light, GLenum pname, GLfloat param), (light, pname, param), 3, "GLenum", light, "GLenum", pname, "GLfloat", param) -TRACE_GL_VOID(glLightfv, (GLenum light, GLenum pname, const GLfloat *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "const GLfloat *", params) -TRACE_GL_VOID(glLightx, (GLenum light, GLenum pname, GLfixed param), (light, pname, param), 3, "GLenum", light, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glLightxOES, (GLenum light, GLenum pname, GLfixed param), (light, pname, param), 3, "GLenum", light, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glLightxv, (GLenum light, GLenum pname, const GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glLightxvOES, (GLenum light, GLenum pname, const GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glLineWidthx, (GLfixed width), (width), 1, "GLfixed", width) -TRACE_GL_VOID(glLineWidthxOES, (GLfixed width), (width), 1, "GLfixed", width) -TRACE_GL_VOID(glLoadIdentity, (void), (), 0) -TRACE_GL_VOID(glLoadMatrixf, (const GLfloat *m), (m), 1, "const GLfloat *", m) -TRACE_GL_VOID(glLoadMatrixx, (const GLfixed *m), (m), 1, "const GLfixed *", m) -TRACE_GL_VOID(glLoadMatrixxOES, (const GLfixed *m), (m), 1, "const GLfixed *", m) -TRACE_GL_VOID(glLoadPaletteFromModelViewMatrixOES, (void), (), 0) -TRACE_GL_VOID(glLogicOp, (GLenum opcode), (opcode), 1, "GLenum", opcode) -TRACE_GL(void*, glMapBufferOES, (GLenum target, GLenum access), (target, access), 2, "GLenum", target, "GLenum", access) -TRACE_GL_VOID(glMaterialf, (GLenum face, GLenum pname, GLfloat param), (face, pname, param), 3, "GLenum", face, "GLenum", pname, "GLfloat", param) -TRACE_GL_VOID(glMaterialfv, (GLenum face, GLenum pname, const GLfloat *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "const GLfloat *", params) -TRACE_GL_VOID(glMaterialx, (GLenum face, GLenum pname, GLfixed param), (face, pname, param), 3, "GLenum", face, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glMaterialxOES, (GLenum face, GLenum pname, GLfixed param), (face, pname, param), 3, "GLenum", face, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glMaterialxv, (GLenum face, GLenum pname, const GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glMaterialxvOES, (GLenum face, GLenum pname, const GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glMatrixIndexPointerOES, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer) -TRACE_GL_VOID(glMatrixMode, (GLenum mode), (mode), 1, "GLenum", mode) -TRACE_GL_VOID(glMultMatrixf, (const GLfloat *m), (m), 1, "const GLfloat *", m) -TRACE_GL_VOID(glMultMatrixx, (const GLfixed *m), (m), 1, "const GLfixed *", m) -TRACE_GL_VOID(glMultMatrixxOES, (const GLfixed *m), (m), 1, "const GLfixed *", m) -TRACE_GL_VOID(glMultiDrawArraysEXT, (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount), (mode, first, count, primcount), 4, "GLenum", mode, "GLint *", first, "GLsizei *", count, "GLsizei", primcount) -TRACE_GL_VOID(glMultiDrawElementsEXT, (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount), (mode, count, type, indices, primcount), 5, "GLenum", mode, "const GLsizei *", count, "GLenum", type, "const GLvoid* *", indices, "GLsizei", primcount) -TRACE_GL_VOID(glMultiTexCoord4f, (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q), (target, s, t, r, q), 5, "GLenum", target, "GLfloat", s, "GLfloat", t, "GLfloat", r, "GLfloat", q) -TRACE_GL_VOID(glMultiTexCoord4x, (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q), (target, s, t, r, q), 5, "GLenum", target, "GLfixed", s, "GLfixed", t, "GLfixed", r, "GLfixed", q) -TRACE_GL_VOID(glMultiTexCoord4xOES, (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q), (target, s, t, r, q), 5, "GLenum", target, "GLfixed", s, "GLfixed", t, "GLfixed", r, "GLfixed", q) -TRACE_GL_VOID(glNormal3f, (GLfloat nx, GLfloat ny, GLfloat nz), (nx, ny, nz), 3, "GLfloat", nx, "GLfloat", ny, "GLfloat", nz) -TRACE_GL_VOID(glNormal3x, (GLfixed nx, GLfixed ny, GLfixed nz), (nx, ny, nz), 3, "GLfixed", nx, "GLfixed", ny, "GLfixed", nz) -TRACE_GL_VOID(glNormal3xOES, (GLfixed nx, GLfixed ny, GLfixed nz), (nx, ny, nz), 3, "GLfixed", nx, "GLfixed", ny, "GLfixed", nz) -TRACE_GL_VOID(glNormalPointer, (GLenum type, GLsizei stride, const GLvoid *pointer), (type, stride, pointer), 3, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer) -TRACE_GL_VOID(glOrthof, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar) -TRACE_GL_VOID(glOrthofOES, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar) -TRACE_GL_VOID(glOrthox, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar) -TRACE_GL_VOID(glOrthoxOES, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar) -TRACE_GL_VOID(glPointParameterf, (GLenum pname, GLfloat param), (pname, param), 2, "GLenum", pname, "GLfloat", param) -TRACE_GL_VOID(glPointParameterfv, (GLenum pname, const GLfloat *params), (pname, params), 2, "GLenum", pname, "const GLfloat *", params) -TRACE_GL_VOID(glPointParameterx, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glPointParameterxOES, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glPointParameterxv, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glPointParameterxvOES, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glPointSize, (GLfloat size), (size), 1, "GLfloat", size) -TRACE_GL_VOID(glPointSizePointerOES, (GLenum type, GLsizei stride, const GLvoid *pointer), (type, stride, pointer), 3, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer) -TRACE_GL_VOID(glPointSizex, (GLfixed size), (size), 1, "GLfixed", size) -TRACE_GL_VOID(glPointSizexOES, (GLfixed size), (size), 1, "GLfixed", size) -TRACE_GL_VOID(glPolygonOffsetx, (GLfixed factor, GLfixed units), (factor, units), 2, "GLfixed", factor, "GLfixed", units) -TRACE_GL_VOID(glPolygonOffsetxOES, (GLfixed factor, GLfixed units), (factor, units), 2, "GLfixed", factor, "GLfixed", units) -TRACE_GL_VOID(glPopMatrix, (void), (), 0) -TRACE_GL_VOID(glProgramBinaryOES, (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length), (program, binaryFormat, binary, length), 4, "GLuint", program, "GLenum", binaryFormat, "const GLvoid *", binary, "GLint", length) -TRACE_GL_VOID(glPushMatrix, (void), (), 0) -TRACE_GL(GLbitfield, glQueryMatrixxOES, (GLfixed mantissa[16], GLint exponent[16]), (mantissa, exponent), 2, "GLfixed", mantissa, "GLint", exponent) -TRACE_GL_VOID(glRenderbufferStorageMultisampleIMG, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height), (target, samples, internalformat, width, height), 5, "GLenum", target, "GLsizei", samples, "GLenum", internalformat, "GLsizei", width, "GLsizei", height) -TRACE_GL_VOID(glRenderbufferStorageOES, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height), (target, internalformat, width, height), 4, "GLenum", target, "GLenum", internalformat, "GLsizei", width, "GLsizei", height) -TRACE_GL_VOID(glRotatef, (GLfloat angle, GLfloat x, GLfloat y, GLfloat z), (angle, x, y, z), 4, "GLfloat", angle, "GLfloat", x, "GLfloat", y, "GLfloat", z) -TRACE_GL_VOID(glRotatex, (GLfixed angle, GLfixed x, GLfixed y, GLfixed z), (angle, x, y, z), 4, "GLfixed", angle, "GLfixed", x, "GLfixed", y, "GLfixed", z) -TRACE_GL_VOID(glRotatexOES, (GLfixed angle, GLfixed x, GLfixed y, GLfixed z), (angle, x, y, z), 4, "GLfixed", angle, "GLfixed", x, "GLfixed", y, "GLfixed", z) -TRACE_GL_VOID(glSampleCoveragex, (GLclampx value, GLboolean invert), (value, invert), 2, "GLclampx", value, "GLboolean", invert) -TRACE_GL_VOID(glSampleCoveragexOES, (GLclampx value, GLboolean invert), (value, invert), 2, "GLclampx", value, "GLboolean", invert) -TRACE_GL_VOID(glScalef, (GLfloat x, GLfloat y, GLfloat z), (x, y, z), 3, "GLfloat", x, "GLfloat", y, "GLfloat", z) -TRACE_GL_VOID(glScalex, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z) -TRACE_GL_VOID(glScalexOES, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z) -TRACE_GL_VOID(glSelectPerfMonitorCountersAMD, (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList), (monitor, enable, group, numCounters, countersList), 5, "GLuint", monitor, "GLboolean", enable, "GLuint", group, "GLint", numCounters, "GLuint *", countersList) -TRACE_GL_VOID(glSetFenceNV, (GLuint fence, GLenum condition), (fence, condition), 2, "GLuint", fence, "GLenum", condition) -TRACE_GL_VOID(glShadeModel, (GLenum mode), (mode), 1, "GLenum", mode) -TRACE_GL_VOID(glStartTilingQCOM, (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask), (x, y, width, height, preserveMask), 5, "GLuint", x, "GLuint", y, "GLuint", width, "GLuint", height, "GLbitfield", preserveMask) -TRACE_GL(GLboolean, glTestFenceNV, (GLuint fence), (fence), 1, "GLuint", fence) -TRACE_GL_VOID(glTexCoordPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer) -TRACE_GL_VOID(glTexEnvf, (GLenum target, GLenum pname, GLfloat param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfloat", param) -TRACE_GL_VOID(glTexEnvfv, (GLenum target, GLenum pname, const GLfloat *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfloat *", params) -TRACE_GL_VOID(glTexEnvi, (GLenum target, GLenum pname, GLint param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLint", param) -TRACE_GL_VOID(glTexEnviv, (GLenum target, GLenum pname, const GLint *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLint *", params) -TRACE_GL_VOID(glTexEnvx, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glTexEnvxOES, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glTexEnvxv, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glTexEnvxvOES, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glTexGenfOES, (GLenum coord, GLenum pname, GLfloat param), (coord, pname, param), 3, "GLenum", coord, "GLenum", pname, "GLfloat", param) -TRACE_GL_VOID(glTexGenfvOES, (GLenum coord, GLenum pname, const GLfloat *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "const GLfloat *", params) -TRACE_GL_VOID(glTexGeniOES, (GLenum coord, GLenum pname, GLint param), (coord, pname, param), 3, "GLenum", coord, "GLenum", pname, "GLint", param) -TRACE_GL_VOID(glTexGenivOES, (GLenum coord, GLenum pname, const GLint *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "const GLint *", params) -TRACE_GL_VOID(glTexGenxOES, (GLenum coord, GLenum pname, GLfixed param), (coord, pname, param), 3, "GLenum", coord, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glTexGenxvOES, (GLenum coord, GLenum pname, const GLfixed *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glTexImage3DOES, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels), (target, level, internalformat, width, height, depth, border, format, type, pixels), 10, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLint", border, "GLenum", format, "GLenum", type, "const GLvoid*", pixels) -TRACE_GL_VOID(glTexParameterx, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glTexParameterxOES, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glTexParameterxv, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glTexParameterxvOES, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLenum", type, "const GLvoid*", pixels) -TRACE_GL_VOID(glTranslatef, (GLfloat x, GLfloat y, GLfloat z), (x, y, z), 3, "GLfloat", x, "GLfloat", y, "GLfloat", z) -TRACE_GL_VOID(glTranslatex, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z) -TRACE_GL_VOID(glTranslatexOES, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z) -TRACE_GL(GLboolean, glUnmapBufferOES, (GLenum target), (target), 1, "GLenum", target) -TRACE_GL_VOID(glVertexPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer) -TRACE_GL_VOID(glWeightPointerOES, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer) diff --git a/opengl/libs/egl_impl.h b/opengl/libs/egl_impl.h deleted file mode 100644 index a809316..0000000 --- a/opengl/libs/egl_impl.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - ** Copyright 2007, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#ifndef ANDROID_EGL_IMPL_H -#define ANDROID_EGL_IMPL_H - -#include <ctype.h> - -#include <EGL/egl.h> -#include <EGL/eglext.h> -#include <EGL/eglplatform.h> - -#include "hooks.h" - -// ---------------------------------------------------------------------------- -namespace android { -// ---------------------------------------------------------------------------- - -EGLAPI EGLImageKHR egl_get_image_for_current_context(EGLImageKHR image); - -// ---------------------------------------------------------------------------- -}; // namespace android -// ---------------------------------------------------------------------------- - -#endif /* ANDROID_EGL_IMPL_H */ diff --git a/opengl/libs/entries.in b/opengl/libs/entries.in deleted file mode 100644 index 61acb5f..0000000 --- a/opengl/libs/entries.in +++ /dev/null @@ -1,376 +0,0 @@ -GL_ENTRY(void, glActiveTexture, GLenum texture) -GL_ENTRY(void, glAlphaFunc, GLenum func, GLclampf ref) -GL_ENTRY(void, glAlphaFuncx, GLenum func, GLclampx ref) -GL_ENTRY(void, glAlphaFuncxOES, GLenum func, GLclampx ref) -GL_ENTRY(void, glAttachShader, GLuint program, GLuint shader) -GL_ENTRY(void, glBeginPerfMonitorAMD, GLuint monitor) -GL_ENTRY(void, glBindAttribLocation, GLuint program, GLuint index, const GLchar* name) -GL_ENTRY(void, glBindBuffer, GLenum target, GLuint buffer) -GL_ENTRY(void, glBindFramebuffer, GLenum target, GLuint framebuffer) -GL_ENTRY(void, glBindFramebufferOES, GLenum target, GLuint framebuffer) -GL_ENTRY(void, glBindRenderbuffer, GLenum target, GLuint renderbuffer) -GL_ENTRY(void, glBindRenderbufferOES, GLenum target, GLuint renderbuffer) -GL_ENTRY(void, glBindTexture, GLenum target, GLuint texture) -GL_ENTRY(void, glBindVertexArrayOES, GLuint array) -GL_ENTRY(void, glBlendColor, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -GL_ENTRY(void, glBlendEquation, GLenum mode ) -GL_ENTRY(void, glBlendEquationOES, GLenum mode) -GL_ENTRY(void, glBlendEquationSeparate, GLenum modeRGB, GLenum modeAlpha) -GL_ENTRY(void, glBlendEquationSeparateOES, GLenum modeRGB, GLenum modeAlpha) -GL_ENTRY(void, glBlendFunc, GLenum sfactor, GLenum dfactor) -GL_ENTRY(void, glBlendFuncSeparate, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) -GL_ENTRY(void, glBlendFuncSeparateOES, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) -GL_ENTRY(void, glBufferData, GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage) -GL_ENTRY(void, glBufferSubData, GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data) -GL_ENTRY(GLenum, glCheckFramebufferStatus, GLenum target) -GL_ENTRY(GLenum, glCheckFramebufferStatusOES, GLenum target) -GL_ENTRY(void, glClear, GLbitfield mask) -GL_ENTRY(void, glClearColor, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -GL_ENTRY(void, glClearColorx, GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) -GL_ENTRY(void, glClearColorxOES, GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) -GL_ENTRY(void, glClearDepthf, GLclampf depth) -GL_ENTRY(void, glClearDepthfOES, GLclampf depth) -GL_ENTRY(void, glClearDepthx, GLclampx depth) -GL_ENTRY(void, glClearDepthxOES, GLclampx depth) -GL_ENTRY(void, glClearStencil, GLint s) -GL_ENTRY(void, glClientActiveTexture, GLenum texture) -GL_ENTRY(void, glClipPlanef, GLenum plane, const GLfloat *equation) -GL_ENTRY(void, glClipPlanefIMG, GLenum p, const GLfloat *eqn) -GL_ENTRY(void, glClipPlanefOES, GLenum plane, const GLfloat *equation) -GL_ENTRY(void, glClipPlanex, GLenum plane, const GLfixed *equation) -GL_ENTRY(void, glClipPlanexIMG, GLenum p, const GLfixed *eqn) -GL_ENTRY(void, glClipPlanexOES, GLenum plane, const GLfixed *equation) -GL_ENTRY(void, glColor4f, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -GL_ENTRY(void, glColor4ub, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) -GL_ENTRY(void, glColor4x, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) -GL_ENTRY(void, glColor4xOES, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) -GL_ENTRY(void, glColorMask, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) -GL_ENTRY(void, glColorPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -GL_ENTRY(void, glCompileShader, GLuint shader) -GL_ENTRY(void, glCompressedTexImage2D, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) -GL_ENTRY(void, glCompressedTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data) -GL_ENTRY(void, glCompressedTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data) -GL_ENTRY(void, glCompressedTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data) -GL_ENTRY(void, glCopyTexImage2D, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) -GL_ENTRY(void, glCopyTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) -GL_ENTRY(void, glCopyTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) -GL_ENTRY(void, glCoverageMaskNV, GLboolean mask) -GL_ENTRY(void, glCoverageOperationNV, GLenum operation) -GL_ENTRY(GLuint, glCreateProgram, void) -GL_ENTRY(GLuint, glCreateShader, GLenum type) -GL_ENTRY(void, glCullFace, GLenum mode) -GL_ENTRY(void, glCurrentPaletteMatrixOES, GLuint matrixpaletteindex) -GL_ENTRY(void, glDeleteBuffers, GLsizei n, const GLuint *buffers) -GL_ENTRY(void, glDeleteFencesNV, GLsizei n, const GLuint *fences) -GL_ENTRY(void, glDeleteFramebuffers, GLsizei n, const GLuint* framebuffers) -GL_ENTRY(void, glDeleteFramebuffersOES, GLsizei n, const GLuint* framebuffers) -GL_ENTRY(void, glDeletePerfMonitorsAMD, GLsizei n, GLuint *monitors) -GL_ENTRY(void, glDeleteProgram, GLuint program) -GL_ENTRY(void, glDeleteRenderbuffers, GLsizei n, const GLuint* renderbuffers) -GL_ENTRY(void, glDeleteRenderbuffersOES, GLsizei n, const GLuint* renderbuffers) -GL_ENTRY(void, glDeleteShader, GLuint shader) -GL_ENTRY(void, glDeleteTextures, GLsizei n, const GLuint *textures) -GL_ENTRY(void, glDeleteVertexArraysOES, GLsizei n, const GLuint *arrays) -GL_ENTRY(void, glDepthFunc, GLenum func) -GL_ENTRY(void, glDepthMask, GLboolean flag) -GL_ENTRY(void, glDepthRangef, GLclampf zNear, GLclampf zFar) -GL_ENTRY(void, glDepthRangefOES, GLclampf zNear, GLclampf zFar) -GL_ENTRY(void, glDepthRangex, GLclampx zNear, GLclampx zFar) -GL_ENTRY(void, glDepthRangexOES, GLclampx zNear, GLclampx zFar) -GL_ENTRY(void, glDetachShader, GLuint program, GLuint shader) -GL_ENTRY(void, glDisable, GLenum cap) -GL_ENTRY(void, glDisableClientState, GLenum array) -GL_ENTRY(void, glDisableDriverControlQCOM, GLuint driverControl) -GL_ENTRY(void, glDisableVertexAttribArray, GLuint index) -GL_ENTRY(void, glDiscardFramebufferEXT, GLenum target, GLsizei numAttachments, const GLenum *attachments) -GL_ENTRY(void, glDrawArrays, GLenum mode, GLint first, GLsizei count) -GL_ENTRY(void, glDrawElements, GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) -GL_ENTRY(void, glDrawTexfOES, GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) -GL_ENTRY(void, glDrawTexfvOES, const GLfloat *coords) -GL_ENTRY(void, glDrawTexiOES, GLint x, GLint y, GLint z, GLint width, GLint height) -GL_ENTRY(void, glDrawTexivOES, const GLint *coords) -GL_ENTRY(void, glDrawTexsOES, GLshort x, GLshort y, GLshort z, GLshort width, GLshort height) -GL_ENTRY(void, glDrawTexsvOES, const GLshort *coords) -GL_ENTRY(void, glDrawTexxOES, GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height) -GL_ENTRY(void, glDrawTexxvOES, const GLfixed *coords) -GL_ENTRY(void, glEGLImageTargetRenderbufferStorageOES, GLenum target, GLeglImageOES image) -GL_ENTRY(void, glEGLImageTargetTexture2DOES, GLenum target, GLeglImageOES image) -GL_ENTRY(void, glEnable, GLenum cap) -GL_ENTRY(void, glEnableClientState, GLenum array) -GL_ENTRY(void, glEnableDriverControlQCOM, GLuint driverControl) -GL_ENTRY(void, glEnableVertexAttribArray, GLuint index) -GL_ENTRY(void, glEndPerfMonitorAMD, GLuint monitor) -GL_ENTRY(void, glEndTilingQCOM, GLbitfield preserveMask) -GL_ENTRY(void, glExtGetBufferPointervQCOM, GLenum target, GLvoid **params) -GL_ENTRY(void, glExtGetBuffersQCOM, GLuint *buffers, GLint maxBuffers, GLint *numBuffers) -GL_ENTRY(void, glExtGetFramebuffersQCOM, GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers) -GL_ENTRY(void, glExtGetProgramBinarySourceQCOM, GLuint program, GLenum shadertype, GLchar *source, GLint *length) -GL_ENTRY(void, glExtGetProgramsQCOM, GLuint *programs, GLint maxPrograms, GLint *numPrograms) -GL_ENTRY(void, glExtGetRenderbuffersQCOM, GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers) -GL_ENTRY(void, glExtGetShadersQCOM, GLuint *shaders, GLint maxShaders, GLint *numShaders) -GL_ENTRY(void, glExtGetTexLevelParameterivQCOM, GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params) -GL_ENTRY(void, glExtGetTexSubImageQCOM, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels) -GL_ENTRY(void, glExtGetTexturesQCOM, GLuint *textures, GLint maxTextures, GLint *numTextures) -GL_ENTRY(GLboolean, glExtIsProgramBinaryQCOM, GLuint program) -GL_ENTRY(void, glExtTexObjectStateOverrideiQCOM, GLenum target, GLenum pname, GLint param) -GL_ENTRY(void, glFinish, void) -GL_ENTRY(void, glFinishFenceNV, GLuint fence) -GL_ENTRY(void, glFlush, void) -GL_ENTRY(void, glFogf, GLenum pname, GLfloat param) -GL_ENTRY(void, glFogfv, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glFogx, GLenum pname, GLfixed param) -GL_ENTRY(void, glFogxOES, GLenum pname, GLfixed param) -GL_ENTRY(void, glFogxv, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glFogxvOES, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glFramebufferRenderbuffer, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) -GL_ENTRY(void, glFramebufferRenderbufferOES, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) -GL_ENTRY(void, glFramebufferTexture2D, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) -GL_ENTRY(void, glFramebufferTexture2DMultisampleIMG, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) -GL_ENTRY(void, glFramebufferTexture2DOES, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) -GL_ENTRY(void, glFramebufferTexture3DOES, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) -GL_ENTRY(void, glFrontFace, GLenum mode) -GL_ENTRY(void, glFrustumf, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) -GL_ENTRY(void, glFrustumfOES, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) -GL_ENTRY(void, glFrustumx, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) -GL_ENTRY(void, glFrustumxOES, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) -GL_ENTRY(void, glGenBuffers, GLsizei n, GLuint *buffers) -GL_ENTRY(void, glGenFencesNV, GLsizei n, GLuint *fences) -GL_ENTRY(void, glGenFramebuffers, GLsizei n, GLuint* framebuffers) -GL_ENTRY(void, glGenFramebuffersOES, GLsizei n, GLuint* framebuffers) -GL_ENTRY(void, glGenPerfMonitorsAMD, GLsizei n, GLuint *monitors) -GL_ENTRY(void, glGenRenderbuffers, GLsizei n, GLuint* renderbuffers) -GL_ENTRY(void, glGenRenderbuffersOES, GLsizei n, GLuint* renderbuffers) -GL_ENTRY(void, glGenTextures, GLsizei n, GLuint *textures) -GL_ENTRY(void, glGenVertexArraysOES, GLsizei n, GLuint *arrays) -GL_ENTRY(void, glGenerateMipmap, GLenum target) -GL_ENTRY(void, glGenerateMipmapOES, GLenum target) -GL_ENTRY(void, glGetActiveAttrib, GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) -GL_ENTRY(void, glGetActiveUniform, GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) -GL_ENTRY(void, glGetAttachedShaders, GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) -GL_ENTRY(int, glGetAttribLocation, GLuint program, const GLchar* name) -GL_ENTRY(void, glGetBooleanv, GLenum pname, GLboolean *params) -GL_ENTRY(void, glGetBufferParameteriv, GLenum target, GLenum pname, GLint *params) -GL_ENTRY(void, glGetBufferPointervOES, GLenum target, GLenum pname, GLvoid ** params) -GL_ENTRY(void, glGetClipPlanef, GLenum pname, GLfloat eqn[4]) -GL_ENTRY(void, glGetClipPlanefOES, GLenum pname, GLfloat eqn[4]) -GL_ENTRY(void, glGetClipPlanex, GLenum pname, GLfixed eqn[4]) -GL_ENTRY(void, glGetClipPlanexOES, GLenum pname, GLfixed eqn[4]) -GL_ENTRY(void, glGetDriverControlStringQCOM, GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString) -GL_ENTRY(void, glGetDriverControlsQCOM, GLint *num, GLsizei size, GLuint *driverControls) -GL_ENTRY(GLenum, glGetError, void) -GL_ENTRY(void, glGetFenceivNV, GLuint fence, GLenum pname, GLint *params) -GL_ENTRY(void, glGetFixedv, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetFixedvOES, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetFloatv, GLenum pname, GLfloat *params) -GL_ENTRY(void, glGetFramebufferAttachmentParameteriv, GLenum target, GLenum attachment, GLenum pname, GLint* params) -GL_ENTRY(void, glGetFramebufferAttachmentParameterivOES, GLenum target, GLenum attachment, GLenum pname, GLint* params) -GL_ENTRY(void, glGetIntegerv, GLenum pname, GLint *params) -GL_ENTRY(void, glGetLightfv, GLenum light, GLenum pname, GLfloat *params) -GL_ENTRY(void, glGetLightxv, GLenum light, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetLightxvOES, GLenum light, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetMaterialfv, GLenum face, GLenum pname, GLfloat *params) -GL_ENTRY(void, glGetMaterialxv, GLenum face, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetMaterialxvOES, GLenum face, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetPerfMonitorCounterDataAMD, GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten) -GL_ENTRY(void, glGetPerfMonitorCounterInfoAMD, GLuint group, GLuint counter, GLenum pname, GLvoid *data) -GL_ENTRY(void, glGetPerfMonitorCounterStringAMD, GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString) -GL_ENTRY(void, glGetPerfMonitorCountersAMD, GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters) -GL_ENTRY(void, glGetPerfMonitorGroupStringAMD, GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString) -GL_ENTRY(void, glGetPerfMonitorGroupsAMD, GLint *numGroups, GLsizei groupsSize, GLuint *groups) -GL_ENTRY(void, glGetPointerv, GLenum pname, GLvoid **params) -GL_ENTRY(void, glGetProgramBinaryOES, GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary) -GL_ENTRY(void, glGetProgramInfoLog, GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog) -GL_ENTRY(void, glGetProgramiv, GLuint program, GLenum pname, GLint* params) -GL_ENTRY(void, glGetRenderbufferParameteriv, GLenum target, GLenum pname, GLint* params) -GL_ENTRY(void, glGetRenderbufferParameterivOES, GLenum target, GLenum pname, GLint* params) -GL_ENTRY(void, glGetShaderInfoLog, GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog) -GL_ENTRY(void, glGetShaderPrecisionFormat, GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) -GL_ENTRY(void, glGetShaderSource, GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) -GL_ENTRY(void, glGetShaderiv, GLuint shader, GLenum pname, GLint* params) -GL_ENTRY(const GLubyte *, glGetString, GLenum name) -GL_ENTRY(void, glGetTexEnvfv, GLenum env, GLenum pname, GLfloat *params) -GL_ENTRY(void, glGetTexEnviv, GLenum env, GLenum pname, GLint *params) -GL_ENTRY(void, glGetTexEnvxv, GLenum env, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetTexEnvxvOES, GLenum env, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetTexGenfvOES, GLenum coord, GLenum pname, GLfloat *params) -GL_ENTRY(void, glGetTexGenivOES, GLenum coord, GLenum pname, GLint *params) -GL_ENTRY(void, glGetTexGenxvOES, GLenum coord, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetTexParameterfv, GLenum target, GLenum pname, GLfloat *params) -GL_ENTRY(void, glGetTexParameteriv, GLenum target, GLenum pname, GLint *params) -GL_ENTRY(void, glGetTexParameterxv, GLenum target, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetTexParameterxvOES, GLenum target, GLenum pname, GLfixed *params) -GL_ENTRY(int, glGetUniformLocation, GLuint program, const GLchar* name) -GL_ENTRY(void, glGetUniformfv, GLuint program, GLint location, GLfloat* params) -GL_ENTRY(void, glGetUniformiv, GLuint program, GLint location, GLint* params) -GL_ENTRY(void, glGetVertexAttribPointerv, GLuint index, GLenum pname, GLvoid** pointer) -GL_ENTRY(void, glGetVertexAttribfv, GLuint index, GLenum pname, GLfloat* params) -GL_ENTRY(void, glGetVertexAttribiv, GLuint index, GLenum pname, GLint* params) -GL_ENTRY(void, glHint, GLenum target, GLenum mode) -GL_ENTRY(GLboolean, glIsBuffer, GLuint buffer) -GL_ENTRY(GLboolean, glIsEnabled, GLenum cap) -GL_ENTRY(GLboolean, glIsFenceNV, GLuint fence) -GL_ENTRY(GLboolean, glIsFramebuffer, GLuint framebuffer) -GL_ENTRY(GLboolean, glIsFramebufferOES, GLuint framebuffer) -GL_ENTRY(GLboolean, glIsProgram, GLuint program) -GL_ENTRY(GLboolean, glIsRenderbuffer, GLuint renderbuffer) -GL_ENTRY(GLboolean, glIsRenderbufferOES, GLuint renderbuffer) -GL_ENTRY(GLboolean, glIsShader, GLuint shader) -GL_ENTRY(GLboolean, glIsTexture, GLuint texture) -GL_ENTRY(GLboolean, glIsVertexArrayOES, GLuint array) -GL_ENTRY(void, glLightModelf, GLenum pname, GLfloat param) -GL_ENTRY(void, glLightModelfv, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glLightModelx, GLenum pname, GLfixed param) -GL_ENTRY(void, glLightModelxOES, GLenum pname, GLfixed param) -GL_ENTRY(void, glLightModelxv, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glLightModelxvOES, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glLightf, GLenum light, GLenum pname, GLfloat param) -GL_ENTRY(void, glLightfv, GLenum light, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glLightx, GLenum light, GLenum pname, GLfixed param) -GL_ENTRY(void, glLightxOES, GLenum light, GLenum pname, GLfixed param) -GL_ENTRY(void, glLightxv, GLenum light, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glLightxvOES, GLenum light, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glLineWidth, GLfloat width) -GL_ENTRY(void, glLineWidthx, GLfixed width) -GL_ENTRY(void, glLineWidthxOES, GLfixed width) -GL_ENTRY(void, glLinkProgram, GLuint program) -GL_ENTRY(void, glLoadIdentity, void) -GL_ENTRY(void, glLoadMatrixf, const GLfloat *m) -GL_ENTRY(void, glLoadMatrixx, const GLfixed *m) -GL_ENTRY(void, glLoadMatrixxOES, const GLfixed *m) -GL_ENTRY(void, glLoadPaletteFromModelViewMatrixOES, void) -GL_ENTRY(void, glLogicOp, GLenum opcode) -GL_ENTRY(void*, glMapBufferOES, GLenum target, GLenum access) -GL_ENTRY(void, glMaterialf, GLenum face, GLenum pname, GLfloat param) -GL_ENTRY(void, glMaterialfv, GLenum face, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glMaterialx, GLenum face, GLenum pname, GLfixed param) -GL_ENTRY(void, glMaterialxOES, GLenum face, GLenum pname, GLfixed param) -GL_ENTRY(void, glMaterialxv, GLenum face, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glMaterialxvOES, GLenum face, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glMatrixIndexPointerOES, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -GL_ENTRY(void, glMatrixMode, GLenum mode) -GL_ENTRY(void, glMultMatrixf, const GLfloat *m) -GL_ENTRY(void, glMultMatrixx, const GLfixed *m) -GL_ENTRY(void, glMultMatrixxOES, const GLfixed *m) -GL_ENTRY(void, glMultiDrawArraysEXT, GLenum mode, GLint *first, GLsizei *count, GLsizei primcount) -GL_ENTRY(void, glMultiDrawElementsEXT, GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount) -GL_ENTRY(void, glMultiTexCoord4f, GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) -GL_ENTRY(void, glMultiTexCoord4x, GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) -GL_ENTRY(void, glMultiTexCoord4xOES, GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) -GL_ENTRY(void, glNormal3f, GLfloat nx, GLfloat ny, GLfloat nz) -GL_ENTRY(void, glNormal3x, GLfixed nx, GLfixed ny, GLfixed nz) -GL_ENTRY(void, glNormal3xOES, GLfixed nx, GLfixed ny, GLfixed nz) -GL_ENTRY(void, glNormalPointer, GLenum type, GLsizei stride, const GLvoid *pointer) -GL_ENTRY(void, glOrthof, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) -GL_ENTRY(void, glOrthofOES, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) -GL_ENTRY(void, glOrthox, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) -GL_ENTRY(void, glOrthoxOES, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) -GL_ENTRY(void, glPixelStorei, GLenum pname, GLint param) -GL_ENTRY(void, glPointParameterf, GLenum pname, GLfloat param) -GL_ENTRY(void, glPointParameterfv, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glPointParameterx, GLenum pname, GLfixed param) -GL_ENTRY(void, glPointParameterxOES, GLenum pname, GLfixed param) -GL_ENTRY(void, glPointParameterxv, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glPointParameterxvOES, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glPointSize, GLfloat size) -GL_ENTRY(void, glPointSizePointerOES, GLenum type, GLsizei stride, const GLvoid *pointer) -GL_ENTRY(void, glPointSizex, GLfixed size) -GL_ENTRY(void, glPointSizexOES, GLfixed size) -GL_ENTRY(void, glPolygonOffset, GLfloat factor, GLfloat units) -GL_ENTRY(void, glPolygonOffsetx, GLfixed factor, GLfixed units) -GL_ENTRY(void, glPolygonOffsetxOES, GLfixed factor, GLfixed units) -GL_ENTRY(void, glPopMatrix, void) -GL_ENTRY(void, glProgramBinaryOES, GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length) -GL_ENTRY(void, glPushMatrix, void) -GL_ENTRY(GLbitfield, glQueryMatrixxOES, GLfixed mantissa[16], GLint exponent[16]) -GL_ENTRY(void, glReadPixels, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) -GL_ENTRY(void, glReleaseShaderCompiler, void) -GL_ENTRY(void, glRenderbufferStorage, GLenum target, GLenum internalformat, GLsizei width, GLsizei height) -GL_ENTRY(void, glRenderbufferStorageMultisampleIMG, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) -GL_ENTRY(void, glRenderbufferStorageOES, GLenum target, GLenum internalformat, GLsizei width, GLsizei height) -GL_ENTRY(void, glRotatef, GLfloat angle, GLfloat x, GLfloat y, GLfloat z) -GL_ENTRY(void, glRotatex, GLfixed angle, GLfixed x, GLfixed y, GLfixed z) -GL_ENTRY(void, glRotatexOES, GLfixed angle, GLfixed x, GLfixed y, GLfixed z) -GL_ENTRY(void, glSampleCoverage, GLclampf value, GLboolean invert) -GL_ENTRY(void, glSampleCoveragex, GLclampx value, GLboolean invert) -GL_ENTRY(void, glSampleCoveragexOES, GLclampx value, GLboolean invert) -GL_ENTRY(void, glScalef, GLfloat x, GLfloat y, GLfloat z) -GL_ENTRY(void, glScalex, GLfixed x, GLfixed y, GLfixed z) -GL_ENTRY(void, glScalexOES, GLfixed x, GLfixed y, GLfixed z) -GL_ENTRY(void, glScissor, GLint x, GLint y, GLsizei width, GLsizei height) -GL_ENTRY(void, glSelectPerfMonitorCountersAMD, GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList) -GL_ENTRY(void, glSetFenceNV, GLuint fence, GLenum condition) -GL_ENTRY(void, glShadeModel, GLenum mode) -GL_ENTRY(void, glShaderBinary, GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length) -GL_ENTRY(void, glShaderSource, GLuint shader, GLsizei count, const GLchar** string, const GLint* length) -GL_ENTRY(void, glStartTilingQCOM, GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask) -GL_ENTRY(void, glStencilFunc, GLenum func, GLint ref, GLuint mask) -GL_ENTRY(void, glStencilFuncSeparate, GLenum face, GLenum func, GLint ref, GLuint mask) -GL_ENTRY(void, glStencilMask, GLuint mask) -GL_ENTRY(void, glStencilMaskSeparate, GLenum face, GLuint mask) -GL_ENTRY(void, glStencilOp, GLenum fail, GLenum zfail, GLenum zpass) -GL_ENTRY(void, glStencilOpSeparate, GLenum face, GLenum fail, GLenum zfail, GLenum zpass) -GL_ENTRY(GLboolean, glTestFenceNV, GLuint fence) -GL_ENTRY(void, glTexCoordPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -GL_ENTRY(void, glTexEnvf, GLenum target, GLenum pname, GLfloat param) -GL_ENTRY(void, glTexEnvfv, GLenum target, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glTexEnvi, GLenum target, GLenum pname, GLint param) -GL_ENTRY(void, glTexEnviv, GLenum target, GLenum pname, const GLint *params) -GL_ENTRY(void, glTexEnvx, GLenum target, GLenum pname, GLfixed param) -GL_ENTRY(void, glTexEnvxOES, GLenum target, GLenum pname, GLfixed param) -GL_ENTRY(void, glTexEnvxv, GLenum target, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glTexEnvxvOES, GLenum target, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glTexGenfOES, GLenum coord, GLenum pname, GLfloat param) -GL_ENTRY(void, glTexGenfvOES, GLenum coord, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glTexGeniOES, GLenum coord, GLenum pname, GLint param) -GL_ENTRY(void, glTexGenivOES, GLenum coord, GLenum pname, const GLint *params) -GL_ENTRY(void, glTexGenxOES, GLenum coord, GLenum pname, GLfixed param) -GL_ENTRY(void, glTexGenxvOES, GLenum coord, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glTexImage2D, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) -GL_ENTRY(void, glTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels) -GL_ENTRY(void, glTexParameterf, GLenum target, GLenum pname, GLfloat param) -GL_ENTRY(void, glTexParameterfv, GLenum target, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glTexParameteri, GLenum target, GLenum pname, GLint param) -GL_ENTRY(void, glTexParameteriv, GLenum target, GLenum pname, const GLint *params) -GL_ENTRY(void, glTexParameterx, GLenum target, GLenum pname, GLfixed param) -GL_ENTRY(void, glTexParameterxOES, GLenum target, GLenum pname, GLfixed param) -GL_ENTRY(void, glTexParameterxv, GLenum target, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glTexParameterxvOES, GLenum target, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) -GL_ENTRY(void, glTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels) -GL_ENTRY(void, glTranslatef, GLfloat x, GLfloat y, GLfloat z) -GL_ENTRY(void, glTranslatex, GLfixed x, GLfixed y, GLfixed z) -GL_ENTRY(void, glTranslatexOES, GLfixed x, GLfixed y, GLfixed z) -GL_ENTRY(void, glUniform1f, GLint location, GLfloat x) -GL_ENTRY(void, glUniform1fv, GLint location, GLsizei count, const GLfloat* v) -GL_ENTRY(void, glUniform1i, GLint location, GLint x) -GL_ENTRY(void, glUniform1iv, GLint location, GLsizei count, const GLint* v) -GL_ENTRY(void, glUniform2f, GLint location, GLfloat x, GLfloat y) -GL_ENTRY(void, glUniform2fv, GLint location, GLsizei count, const GLfloat* v) -GL_ENTRY(void, glUniform2i, GLint location, GLint x, GLint y) -GL_ENTRY(void, glUniform2iv, GLint location, GLsizei count, const GLint* v) -GL_ENTRY(void, glUniform3f, GLint location, GLfloat x, GLfloat y, GLfloat z) -GL_ENTRY(void, glUniform3fv, GLint location, GLsizei count, const GLfloat* v) -GL_ENTRY(void, glUniform3i, GLint location, GLint x, GLint y, GLint z) -GL_ENTRY(void, glUniform3iv, GLint location, GLsizei count, const GLint* v) -GL_ENTRY(void, glUniform4f, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -GL_ENTRY(void, glUniform4fv, GLint location, GLsizei count, const GLfloat* v) -GL_ENTRY(void, glUniform4i, GLint location, GLint x, GLint y, GLint z, GLint w) -GL_ENTRY(void, glUniform4iv, GLint location, GLsizei count, const GLint* v) -GL_ENTRY(void, glUniformMatrix2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -GL_ENTRY(void, glUniformMatrix3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -GL_ENTRY(void, glUniformMatrix4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -GL_ENTRY(GLboolean, glUnmapBufferOES, GLenum target) -GL_ENTRY(void, glUseProgram, GLuint program) -GL_ENTRY(void, glValidateProgram, GLuint program) -GL_ENTRY(void, glVertexAttrib1f, GLuint indx, GLfloat x) -GL_ENTRY(void, glVertexAttrib1fv, GLuint indx, const GLfloat* values) -GL_ENTRY(void, glVertexAttrib2f, GLuint indx, GLfloat x, GLfloat y) -GL_ENTRY(void, glVertexAttrib2fv, GLuint indx, const GLfloat* values) -GL_ENTRY(void, glVertexAttrib3f, GLuint indx, GLfloat x, GLfloat y, GLfloat z) -GL_ENTRY(void, glVertexAttrib3fv, GLuint indx, const GLfloat* values) -GL_ENTRY(void, glVertexAttrib4f, GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -GL_ENTRY(void, glVertexAttrib4fv, GLuint indx, const GLfloat* values) -GL_ENTRY(void, glVertexAttribPointer, GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr) -GL_ENTRY(void, glVertexPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -GL_ENTRY(void, glViewport, GLint x, GLint y, GLsizei width, GLsizei height) -GL_ENTRY(void, glWeightPointerOES, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) diff --git a/opengl/libs/enums.in b/opengl/libs/enums.in deleted file mode 100644 index f9752c2..0000000 --- a/opengl/libs/enums.in +++ /dev/null @@ -1,594 +0,0 @@ -GL_ENUM(0x0000,GL_POINTS) -GL_ENUM(0x0001,GL_LINES) -GL_ENUM(0x0002,GL_LINE_LOOP) -GL_ENUM(0x0003,GL_LINE_STRIP) -GL_ENUM(0x0004,GL_TRIANGLES) -GL_ENUM(0x0005,GL_TRIANGLE_STRIP) -GL_ENUM(0x0006,GL_TRIANGLE_FAN) -GL_ENUM(0x0104,GL_ADD) -GL_ENUM(0x0200,GL_NEVER) -GL_ENUM(0x0201,GL_LESS) -GL_ENUM(0x0202,GL_EQUAL) -GL_ENUM(0x0203,GL_LEQUAL) -GL_ENUM(0x0204,GL_GREATER) -GL_ENUM(0x0205,GL_NOTEQUAL) -GL_ENUM(0x0206,GL_GEQUAL) -GL_ENUM(0x0207,GL_ALWAYS) -GL_ENUM(0x0300,GL_SRC_COLOR) -GL_ENUM(0x0301,GL_ONE_MINUS_SRC_COLOR) -GL_ENUM(0x0302,GL_SRC_ALPHA) -GL_ENUM(0x0303,GL_ONE_MINUS_SRC_ALPHA) -GL_ENUM(0x0304,GL_DST_ALPHA) -GL_ENUM(0x0305,GL_ONE_MINUS_DST_ALPHA) -GL_ENUM(0x0306,GL_DST_COLOR) -GL_ENUM(0x0307,GL_ONE_MINUS_DST_COLOR) -GL_ENUM(0x0308,GL_SRC_ALPHA_SATURATE) -GL_ENUM(0x0404,GL_FRONT) -GL_ENUM(0x0405,GL_BACK) -GL_ENUM(0x0408,GL_FRONT_AND_BACK) -GL_ENUM(0x0500,GL_INVALID_ENUM) -GL_ENUM(0x0501,GL_INVALID_VALUE) -GL_ENUM(0x0502,GL_INVALID_OPERATION) -GL_ENUM(0x0503,GL_STACK_OVERFLOW) -GL_ENUM(0x0504,GL_STACK_UNDERFLOW) -GL_ENUM(0x0505,GL_OUT_OF_MEMORY) -GL_ENUM(0x0506,GL_INVALID_FRAMEBUFFER_OPERATION_OES) -GL_ENUM(0x0800,GL_EXP) -GL_ENUM(0x0801,GL_EXP2) -GL_ENUM(0x0900,GL_CW) -GL_ENUM(0x0901,GL_CCW) -GL_ENUM(0x0B00,GL_CURRENT_COLOR) -GL_ENUM(0x0B02,GL_CURRENT_NORMAL) -GL_ENUM(0x0B03,GL_CURRENT_TEXTURE_COORDS) -GL_ENUM(0x0B10,GL_POINT_SMOOTH) -GL_ENUM(0x0B11,GL_POINT_SIZE) -GL_ENUM(0x0B12,GL_SMOOTH_POINT_SIZE_RANGE) -GL_ENUM(0x0B20,GL_LINE_SMOOTH) -GL_ENUM(0x0B21,GL_LINE_WIDTH) -GL_ENUM(0x0B22,GL_SMOOTH_LINE_WIDTH_RANGE) -GL_ENUM(0x0B44,GL_CULL_FACE) -GL_ENUM(0x0B45,GL_CULL_FACE_MODE) -GL_ENUM(0x0B46,GL_FRONT_FACE) -GL_ENUM(0x0B50,GL_LIGHTING) -GL_ENUM(0x0B52,GL_LIGHT_MODEL_TWO_SIDE) -GL_ENUM(0x0B53,GL_LIGHT_MODEL_AMBIENT) -GL_ENUM(0x0B54,GL_SHADE_MODEL) -GL_ENUM(0x0B57,GL_COLOR_MATERIAL) -GL_ENUM(0x0B60,GL_FOG) -GL_ENUM(0x0B62,GL_FOG_DENSITY) -GL_ENUM(0x0B63,GL_FOG_START) -GL_ENUM(0x0B64,GL_FOG_END) -GL_ENUM(0x0B65,GL_FOG_MODE) -GL_ENUM(0x0B66,GL_FOG_COLOR) -GL_ENUM(0x0B70,GL_DEPTH_RANGE) -GL_ENUM(0x0B71,GL_DEPTH_TEST) -GL_ENUM(0x0B72,GL_DEPTH_WRITEMASK) -GL_ENUM(0x0B73,GL_DEPTH_CLEAR_VALUE) -GL_ENUM(0x0B74,GL_DEPTH_FUNC) -GL_ENUM(0x0B90,GL_STENCIL_TEST) -GL_ENUM(0x0B91,GL_STENCIL_CLEAR_VALUE) -GL_ENUM(0x0B92,GL_STENCIL_FUNC) -GL_ENUM(0x0B93,GL_STENCIL_VALUE_MASK) -GL_ENUM(0x0B94,GL_STENCIL_FAIL) -GL_ENUM(0x0B95,GL_STENCIL_PASS_DEPTH_FAIL) -GL_ENUM(0x0B96,GL_STENCIL_PASS_DEPTH_PASS) -GL_ENUM(0x0B97,GL_STENCIL_REF) -GL_ENUM(0x0B98,GL_STENCIL_WRITEMASK) -GL_ENUM(0x0BA0,GL_MATRIX_MODE) -GL_ENUM(0x0BA1,GL_NORMALIZE) -GL_ENUM(0x0BA2,GL_VIEWPORT) -GL_ENUM(0x0BA3,GL_MODELVIEW_STACK_DEPTH) -GL_ENUM(0x0BA4,GL_PROJECTION_STACK_DEPTH) -GL_ENUM(0x0BA5,GL_TEXTURE_STACK_DEPTH) -GL_ENUM(0x0BA6,GL_MODELVIEW_MATRIX) -GL_ENUM(0x0BA7,GL_PROJECTION_MATRIX) -GL_ENUM(0x0BA8,GL_TEXTURE_MATRIX) -GL_ENUM(0x0BC0,GL_ALPHA_TEST) -GL_ENUM(0x0BC1,GL_ALPHA_TEST_FUNC) -GL_ENUM(0x0BC2,GL_ALPHA_TEST_REF) -GL_ENUM(0x0BD0,GL_DITHER) -GL_ENUM(0x0BE0,GL_BLEND_DST) -GL_ENUM(0x0BE1,GL_BLEND_SRC) -GL_ENUM(0x0BE2,GL_BLEND) -GL_ENUM(0x0BF0,GL_LOGIC_OP_MODE) -GL_ENUM(0x0BF2,GL_COLOR_LOGIC_OP) -GL_ENUM(0x0C10,GL_SCISSOR_BOX) -GL_ENUM(0x0C11,GL_SCISSOR_TEST) -GL_ENUM(0x0C22,GL_COLOR_CLEAR_VALUE) -GL_ENUM(0x0C23,GL_COLOR_WRITEMASK) -GL_ENUM(0x0C50,GL_PERSPECTIVE_CORRECTION_HINT) -GL_ENUM(0x0C51,GL_POINT_SMOOTH_HINT) -GL_ENUM(0x0C52,GL_LINE_SMOOTH_HINT) -GL_ENUM(0x0C54,GL_FOG_HINT) -GL_ENUM(0x0CF5,GL_UNPACK_ALIGNMENT) -GL_ENUM(0x0D05,GL_PACK_ALIGNMENT) -GL_ENUM(0x0D1C,GL_ALPHA_SCALE) -GL_ENUM(0x0D31,GL_MAX_LIGHTS) -GL_ENUM(0x0D32,GL_MAX_CLIP_PLANES) -GL_ENUM(0x0D33,GL_MAX_TEXTURE_SIZE) -GL_ENUM(0x0D36,GL_MAX_MODELVIEW_STACK_DEPTH) -GL_ENUM(0x0D38,GL_MAX_PROJECTION_STACK_DEPTH) -GL_ENUM(0x0D39,GL_MAX_TEXTURE_STACK_DEPTH) -GL_ENUM(0x0D3A,GL_MAX_VIEWPORT_DIMS) -GL_ENUM(0x0D50,GL_SUBPIXEL_BITS) -GL_ENUM(0x0D52,GL_RED_BITS) -GL_ENUM(0x0D53,GL_GREEN_BITS) -GL_ENUM(0x0D54,GL_BLUE_BITS) -GL_ENUM(0x0D55,GL_ALPHA_BITS) -GL_ENUM(0x0D56,GL_DEPTH_BITS) -GL_ENUM(0x0D57,GL_STENCIL_BITS) -GL_ENUM(0x0DE1,GL_TEXTURE_2D) -GL_ENUM(0x1100,GL_DONT_CARE) -GL_ENUM(0x1101,GL_FASTEST) -GL_ENUM(0x1102,GL_NICEST) -GL_ENUM(0x1200,GL_AMBIENT) -GL_ENUM(0x1201,GL_DIFFUSE) -GL_ENUM(0x1202,GL_SPECULAR) -GL_ENUM(0x1203,GL_POSITION) -GL_ENUM(0x1204,GL_SPOT_DIRECTION) -GL_ENUM(0x1205,GL_SPOT_EXPONENT) -GL_ENUM(0x1206,GL_SPOT_CUTOFF) -GL_ENUM(0x1207,GL_CONSTANT_ATTENUATION) -GL_ENUM(0x1208,GL_LINEAR_ATTENUATION) -GL_ENUM(0x1209,GL_QUADRATIC_ATTENUATION) -GL_ENUM(0x1400,GL_BYTE) -GL_ENUM(0x1401,GL_UNSIGNED_BYTE) -GL_ENUM(0x1402,GL_SHORT) -GL_ENUM(0x1403,GL_UNSIGNED_SHORT) -GL_ENUM(0x1404,GL_INT) -GL_ENUM(0x1405,GL_UNSIGNED_INT) -GL_ENUM(0x1406,GL_FLOAT) -GL_ENUM(0x140C,GL_FIXED) -GL_ENUM(0x1500,GL_CLEAR) -GL_ENUM(0x1501,GL_AND) -GL_ENUM(0x1502,GL_AND_REVERSE) -GL_ENUM(0x1503,GL_COPY) -GL_ENUM(0x1504,GL_AND_INVERTED) -GL_ENUM(0x1505,GL_NOOP) -GL_ENUM(0x1506,GL_XOR) -GL_ENUM(0x1507,GL_OR) -GL_ENUM(0x1508,GL_NOR) -GL_ENUM(0x1509,GL_EQUIV) -GL_ENUM(0x150A,GL_INVERT) -GL_ENUM(0x150B,GL_OR_REVERSE) -GL_ENUM(0x150C,GL_COPY_INVERTED) -GL_ENUM(0x150D,GL_OR_INVERTED) -GL_ENUM(0x150E,GL_NAND) -GL_ENUM(0x150F,GL_SET) -GL_ENUM(0x1600,GL_EMISSION) -GL_ENUM(0x1601,GL_SHININESS) -GL_ENUM(0x1602,GL_AMBIENT_AND_DIFFUSE) -GL_ENUM(0x1700,GL_MODELVIEW) -GL_ENUM(0x1701,GL_PROJECTION) -GL_ENUM(0x1702,GL_TEXTURE) -GL_ENUM(0x1800,GL_COLOR_EXT) -GL_ENUM(0x1801,GL_DEPTH_EXT) -GL_ENUM(0x1802,GL_STENCIL_EXT) -GL_ENUM(0x1901,GL_STENCIL_INDEX) -GL_ENUM(0x1902,GL_DEPTH_COMPONENT) -GL_ENUM(0x1906,GL_ALPHA) -GL_ENUM(0x1907,GL_RGB) -GL_ENUM(0x1908,GL_RGBA) -GL_ENUM(0x1909,GL_LUMINANCE) -GL_ENUM(0x190A,GL_LUMINANCE_ALPHA) -GL_ENUM(0x1D00,GL_FLAT) -GL_ENUM(0x1D01,GL_SMOOTH) -GL_ENUM(0x1E00,GL_KEEP) -GL_ENUM(0x1E01,GL_REPLACE) -GL_ENUM(0x1E02,GL_INCR) -GL_ENUM(0x1E03,GL_DECR) -GL_ENUM(0x1F00,GL_VENDOR) -GL_ENUM(0x1F01,GL_RENDERER) -GL_ENUM(0x1F02,GL_VERSION) -GL_ENUM(0x1F03,GL_EXTENSIONS) -GL_ENUM(0x2100,GL_MODULATE) -GL_ENUM(0x2101,GL_DECAL) -GL_ENUM(0x2200,GL_TEXTURE_ENV_MODE) -GL_ENUM(0x2201,GL_TEXTURE_ENV_COLOR) -GL_ENUM(0x2300,GL_TEXTURE_ENV) -GL_ENUM(0x2500,GL_TEXTURE_GEN_MODE_OES) -GL_ENUM(0x2600,GL_NEAREST) -GL_ENUM(0x2601,GL_LINEAR) -GL_ENUM(0x2700,GL_NEAREST_MIPMAP_NEAREST) -GL_ENUM(0x2701,GL_LINEAR_MIPMAP_NEAREST) -GL_ENUM(0x2702,GL_NEAREST_MIPMAP_LINEAR) -GL_ENUM(0x2703,GL_LINEAR_MIPMAP_LINEAR) -GL_ENUM(0x2800,GL_TEXTURE_MAG_FILTER) -GL_ENUM(0x2801,GL_TEXTURE_MIN_FILTER) -GL_ENUM(0x2802,GL_TEXTURE_WRAP_S) -GL_ENUM(0x2803,GL_TEXTURE_WRAP_T) -GL_ENUM(0x2901,GL_REPEAT) -GL_ENUM(0x2A00,GL_POLYGON_OFFSET_UNITS) -GL_ENUM(0x3000,GL_CLIP_PLANE0) -GL_ENUM(0x3001,GL_CLIP_PLANE1) -GL_ENUM(0x3002,GL_CLIP_PLANE2) -GL_ENUM(0x3003,GL_CLIP_PLANE3) -GL_ENUM(0x3004,GL_CLIP_PLANE4) -GL_ENUM(0x3005,GL_CLIP_PLANE5) -GL_ENUM(0x4000,GL_LIGHT0) -GL_ENUM(0x4001,GL_LIGHT1) -GL_ENUM(0x4002,GL_LIGHT2) -GL_ENUM(0x4003,GL_LIGHT3) -GL_ENUM(0x4004,GL_LIGHT4) -GL_ENUM(0x4005,GL_LIGHT5) -GL_ENUM(0x4006,GL_LIGHT6) -GL_ENUM(0x4007,GL_LIGHT7) -GL_ENUM(0x8000,GL_COVERAGE_BUFFER_BIT_NV) -GL_ENUM(0x8001,GL_CONSTANT_COLOR) -GL_ENUM(0x8002,GL_ONE_MINUS_CONSTANT_COLOR) -GL_ENUM(0x8003,GL_CONSTANT_ALPHA) -GL_ENUM(0x8004,GL_ONE_MINUS_CONSTANT_ALPHA) -GL_ENUM(0x8005,GL_BLEND_COLOR) -GL_ENUM(0x8006,GL_FUNC_ADD_OES) -GL_ENUM(0x8007,GL_MIN_EXT) -GL_ENUM(0x8008,GL_MAX_EXT) -GL_ENUM(0x8009,GL_BLEND_EQUATION_RGB_OES) -GL_ENUM(0x800A,GL_FUNC_SUBTRACT_OES) -GL_ENUM(0x800B,GL_FUNC_REVERSE_SUBTRACT_OES) -GL_ENUM(0x8033,GL_UNSIGNED_SHORT_4_4_4_4) -GL_ENUM(0x8034,GL_UNSIGNED_SHORT_5_5_5_1) -GL_ENUM(0x8037,GL_POLYGON_OFFSET_FILL) -GL_ENUM(0x8038,GL_POLYGON_OFFSET_FACTOR) -GL_ENUM(0x803A,GL_RESCALE_NORMAL) -GL_ENUM(0x8051,GL_RGB8_OES) -GL_ENUM(0x8056,GL_RGBA4_OES) -GL_ENUM(0x8057,GL_RGB5_A1_OES) -GL_ENUM(0x8058,GL_RGBA8_OES) -GL_ENUM(0x8069,GL_TEXTURE_BINDING_2D) -GL_ENUM(0x806A,GL_TEXTURE_BINDING_3D_OES) -GL_ENUM(0x806F,GL_TEXTURE_3D_OES) -GL_ENUM(0x8072,GL_TEXTURE_WRAP_R_OES) -GL_ENUM(0x8073,GL_MAX_3D_TEXTURE_SIZE_OES) -GL_ENUM(0x8074,GL_VERTEX_ARRAY) -GL_ENUM(0x8075,GL_NORMAL_ARRAY) -GL_ENUM(0x8076,GL_COLOR_ARRAY) -GL_ENUM(0x8078,GL_TEXTURE_COORD_ARRAY) -GL_ENUM(0x807A,GL_VERTEX_ARRAY_SIZE) -GL_ENUM(0x807B,GL_VERTEX_ARRAY_TYPE) -GL_ENUM(0x807C,GL_VERTEX_ARRAY_STRIDE) -GL_ENUM(0x807E,GL_NORMAL_ARRAY_TYPE) -GL_ENUM(0x807F,GL_NORMAL_ARRAY_STRIDE) -GL_ENUM(0x8081,GL_COLOR_ARRAY_SIZE) -GL_ENUM(0x8082,GL_COLOR_ARRAY_TYPE) -GL_ENUM(0x8083,GL_COLOR_ARRAY_STRIDE) -GL_ENUM(0x8088,GL_TEXTURE_COORD_ARRAY_SIZE) -GL_ENUM(0x8089,GL_TEXTURE_COORD_ARRAY_TYPE) -GL_ENUM(0x808A,GL_TEXTURE_COORD_ARRAY_STRIDE) -GL_ENUM(0x808E,GL_VERTEX_ARRAY_POINTER) -GL_ENUM(0x808F,GL_NORMAL_ARRAY_POINTER) -GL_ENUM(0x8090,GL_COLOR_ARRAY_POINTER) -GL_ENUM(0x8092,GL_TEXTURE_COORD_ARRAY_POINTER) -GL_ENUM(0x809D,GL_MULTISAMPLE) -GL_ENUM(0x809E,GL_SAMPLE_ALPHA_TO_COVERAGE) -GL_ENUM(0x809F,GL_SAMPLE_ALPHA_TO_ONE) -GL_ENUM(0x80A0,GL_SAMPLE_COVERAGE) -GL_ENUM(0x80A8,GL_SAMPLE_BUFFERS) -GL_ENUM(0x80A9,GL_SAMPLES) -GL_ENUM(0x80AA,GL_SAMPLE_COVERAGE_VALUE) -GL_ENUM(0x80AB,GL_SAMPLE_COVERAGE_INVERT) -GL_ENUM(0x80C8,GL_BLEND_DST_RGB_OES) -GL_ENUM(0x80C9,GL_BLEND_SRC_RGB_OES) -GL_ENUM(0x80CA,GL_BLEND_DST_ALPHA_OES) -GL_ENUM(0x80CB,GL_BLEND_SRC_ALPHA_OES) -GL_ENUM(0x80E1,GL_BGRA_EXT) -GL_ENUM(0x8126,GL_POINT_SIZE_MIN) -GL_ENUM(0x8127,GL_POINT_SIZE_MAX) -GL_ENUM(0x8128,GL_POINT_FADE_THRESHOLD_SIZE) -GL_ENUM(0x8129,GL_POINT_DISTANCE_ATTENUATION) -GL_ENUM(0x812F,GL_CLAMP_TO_EDGE) -GL_ENUM(0x8191,GL_GENERATE_MIPMAP) -GL_ENUM(0x8192,GL_GENERATE_MIPMAP_HINT) -GL_ENUM(0x81A5,GL_DEPTH_COMPONENT16_OES) -GL_ENUM(0x81A6,GL_DEPTH_COMPONENT24_OES) -GL_ENUM(0x81A7,GL_DEPTH_COMPONENT32_OES) -GL_ENUM(0x8363,GL_UNSIGNED_SHORT_5_6_5) -GL_ENUM(0x8365,GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT) -GL_ENUM(0x8366,GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT) -GL_ENUM(0x8368,GL_UNSIGNED_INT_2_10_10_10_REV_EXT) -GL_ENUM(0x8370,GL_MIRRORED_REPEAT_OES) -GL_ENUM(0x83F0,GL_COMPRESSED_RGB_S3TC_DXT1_EXT) -GL_ENUM(0x83F1,GL_COMPRESSED_RGBA_S3TC_DXT1_EXT) -GL_ENUM(0x846D,GL_ALIASED_POINT_SIZE_RANGE) -GL_ENUM(0x846E,GL_ALIASED_LINE_WIDTH_RANGE) -GL_ENUM(0x84C0,GL_TEXTURE0) -GL_ENUM(0x84C1,GL_TEXTURE1) -GL_ENUM(0x84C2,GL_TEXTURE2) -GL_ENUM(0x84C3,GL_TEXTURE3) -GL_ENUM(0x84C4,GL_TEXTURE4) -GL_ENUM(0x84C5,GL_TEXTURE5) -GL_ENUM(0x84C6,GL_TEXTURE6) -GL_ENUM(0x84C7,GL_TEXTURE7) -GL_ENUM(0x84C8,GL_TEXTURE8) -GL_ENUM(0x84C9,GL_TEXTURE9) -GL_ENUM(0x84CA,GL_TEXTURE10) -GL_ENUM(0x84CB,GL_TEXTURE11) -GL_ENUM(0x84CC,GL_TEXTURE12) -GL_ENUM(0x84CD,GL_TEXTURE13) -GL_ENUM(0x84CE,GL_TEXTURE14) -GL_ENUM(0x84CF,GL_TEXTURE15) -GL_ENUM(0x84D0,GL_TEXTURE16) -GL_ENUM(0x84D1,GL_TEXTURE17) -GL_ENUM(0x84D2,GL_TEXTURE18) -GL_ENUM(0x84D3,GL_TEXTURE19) -GL_ENUM(0x84D4,GL_TEXTURE20) -GL_ENUM(0x84D5,GL_TEXTURE21) -GL_ENUM(0x84D6,GL_TEXTURE22) -GL_ENUM(0x84D7,GL_TEXTURE23) -GL_ENUM(0x84D8,GL_TEXTURE24) -GL_ENUM(0x84D9,GL_TEXTURE25) -GL_ENUM(0x84DA,GL_TEXTURE26) -GL_ENUM(0x84DB,GL_TEXTURE27) -GL_ENUM(0x84DC,GL_TEXTURE28) -GL_ENUM(0x84DD,GL_TEXTURE29) -GL_ENUM(0x84DE,GL_TEXTURE30) -GL_ENUM(0x84DF,GL_TEXTURE31) -GL_ENUM(0x84E0,GL_ACTIVE_TEXTURE) -GL_ENUM(0x84E1,GL_CLIENT_ACTIVE_TEXTURE) -GL_ENUM(0x84E2,GL_MAX_TEXTURE_UNITS) -GL_ENUM(0x84E7,GL_SUBTRACT) -GL_ENUM(0x84E8,GL_MAX_RENDERBUFFER_SIZE_OES) -GL_ENUM(0x84F2,GL_ALL_COMPLETED_NV) -GL_ENUM(0x84F3,GL_FENCE_STATUS_NV) -GL_ENUM(0x84F4,GL_FENCE_CONDITION_NV) -GL_ENUM(0x84F9,GL_DEPTH_STENCIL_OES) -GL_ENUM(0x84FA,GL_UNSIGNED_INT_24_8_OES) -GL_ENUM(0x84FD,GL_MAX_TEXTURE_LOD_BIAS_EXT) -GL_ENUM(0x84FE,GL_TEXTURE_MAX_ANISOTROPY_EXT) -GL_ENUM(0x84FF,GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT) -GL_ENUM(0x8500,GL_TEXTURE_FILTER_CONTROL_EXT) -GL_ENUM(0x8501,GL_TEXTURE_LOD_BIAS_EXT) -GL_ENUM(0x8507,GL_INCR_WRAP_OES) -GL_ENUM(0x8508,GL_DECR_WRAP_OES) -GL_ENUM(0x8511,GL_NORMAL_MAP_OES) -GL_ENUM(0x8512,GL_REFLECTION_MAP_OES) -GL_ENUM(0x8513,GL_TEXTURE_CUBE_MAP_OES) -GL_ENUM(0x8514,GL_TEXTURE_BINDING_CUBE_MAP_OES) -GL_ENUM(0x8515,GL_TEXTURE_CUBE_MAP_POSITIVE_X_OES) -GL_ENUM(0x8516,GL_TEXTURE_CUBE_MAP_NEGATIVE_X_OES) -GL_ENUM(0x8517,GL_TEXTURE_CUBE_MAP_POSITIVE_Y_OES) -GL_ENUM(0x8518,GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_OES) -GL_ENUM(0x8519,GL_TEXTURE_CUBE_MAP_POSITIVE_Z_OES) -GL_ENUM(0x851A,GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_OES) -GL_ENUM(0x851C,GL_MAX_CUBE_MAP_TEXTURE_SIZE_OES) -GL_ENUM(0x8570,GL_COMBINE) -GL_ENUM(0x8571,GL_COMBINE_RGB) -GL_ENUM(0x8572,GL_COMBINE_ALPHA) -GL_ENUM(0x8573,GL_RGB_SCALE) -GL_ENUM(0x8574,GL_ADD_SIGNED) -GL_ENUM(0x8575,GL_INTERPOLATE) -GL_ENUM(0x8576,GL_CONSTANT) -GL_ENUM(0x8577,GL_PRIMARY_COLOR) -GL_ENUM(0x8578,GL_PREVIOUS) -GL_ENUM(0x8580,GL_SRC0_RGB) -GL_ENUM(0x8581,GL_SRC1_RGB) -GL_ENUM(0x8582,GL_SRC2_RGB) -GL_ENUM(0x8588,GL_SRC0_ALPHA) -GL_ENUM(0x8589,GL_SRC1_ALPHA) -GL_ENUM(0x858A,GL_SRC2_ALPHA) -GL_ENUM(0x8590,GL_OPERAND0_RGB) -GL_ENUM(0x8591,GL_OPERAND1_RGB) -GL_ENUM(0x8592,GL_OPERAND2_RGB) -GL_ENUM(0x8598,GL_OPERAND0_ALPHA) -GL_ENUM(0x8599,GL_OPERAND1_ALPHA) -GL_ENUM(0x859A,GL_OPERAND2_ALPHA) -GL_ENUM(0x85B5,GL_VERTEX_ARRAY_BINDING_OES) -GL_ENUM(0x8622,GL_VERTEX_ATTRIB_ARRAY_ENABLED) -GL_ENUM(0x8623,GL_VERTEX_ATTRIB_ARRAY_SIZE) -GL_ENUM(0x8624,GL_VERTEX_ATTRIB_ARRAY_STRIDE) -GL_ENUM(0x8625,GL_VERTEX_ATTRIB_ARRAY_TYPE) -GL_ENUM(0x8626,GL_CURRENT_VERTEX_ATTRIB) -GL_ENUM(0x8645,GL_VERTEX_ATTRIB_ARRAY_POINTER) -GL_ENUM(0x86A2,GL_NUM_COMPRESSED_TEXTURE_FORMATS) -GL_ENUM(0x86A3,GL_COMPRESSED_TEXTURE_FORMATS) -GL_ENUM(0x86A4,GL_MAX_VERTEX_UNITS_OES) -GL_ENUM(0x86A9,GL_WEIGHT_ARRAY_TYPE_OES) -GL_ENUM(0x86AA,GL_WEIGHT_ARRAY_STRIDE_OES) -GL_ENUM(0x86AB,GL_WEIGHT_ARRAY_SIZE_OES) -GL_ENUM(0x86AC,GL_WEIGHT_ARRAY_POINTER_OES) -GL_ENUM(0x86AD,GL_WEIGHT_ARRAY_OES) -GL_ENUM(0x86AE,GL_DOT3_RGB) -GL_ENUM(0x86AF,GL_DOT3_RGBA) -GL_ENUM(0x8740,GL_Z400_BINARY_AMD) -GL_ENUM(0x8741,GL_PROGRAM_BINARY_LENGTH_OES) -GL_ENUM(0x8764,GL_BUFFER_SIZE) -GL_ENUM(0x8765,GL_BUFFER_USAGE) -GL_ENUM(0x87EE,GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD) -GL_ENUM(0x87F9,GL_3DC_X_AMD) -GL_ENUM(0x87FA,GL_3DC_XY_AMD) -GL_ENUM(0x87FE,GL_NUM_PROGRAM_BINARY_FORMATS_OES) -GL_ENUM(0x87FF,GL_PROGRAM_BINARY_FORMATS_OES) -GL_ENUM(0x8800,GL_STENCIL_BACK_FUNC) -GL_ENUM(0x8801,GL_STENCIL_BACK_FAIL) -GL_ENUM(0x8802,GL_STENCIL_BACK_PASS_DEPTH_FAIL) -GL_ENUM(0x8803,GL_STENCIL_BACK_PASS_DEPTH_PASS) -GL_ENUM(0x8823,GL_WRITEONLY_RENDERING_QCOM) -GL_ENUM(0x883D,GL_BLEND_EQUATION_ALPHA_OES) -GL_ENUM(0x8840,GL_MATRIX_PALETTE_OES) -GL_ENUM(0x8842,GL_MAX_PALETTE_MATRICES_OES) -GL_ENUM(0x8843,GL_CURRENT_PALETTE_MATRIX_OES) -GL_ENUM(0x8844,GL_MATRIX_INDEX_ARRAY_OES) -GL_ENUM(0x8846,GL_MATRIX_INDEX_ARRAY_SIZE_OES) -GL_ENUM(0x8847,GL_MATRIX_INDEX_ARRAY_TYPE_OES) -GL_ENUM(0x8848,GL_MATRIX_INDEX_ARRAY_STRIDE_OES) -GL_ENUM(0x8849,GL_MATRIX_INDEX_ARRAY_POINTER_OES) -GL_ENUM(0x8861,GL_POINT_SPRITE_OES) -GL_ENUM(0x8862,GL_COORD_REPLACE_OES) -GL_ENUM(0x8869,GL_MAX_VERTEX_ATTRIBS) -GL_ENUM(0x886A,GL_VERTEX_ATTRIB_ARRAY_NORMALIZED) -GL_ENUM(0x8872,GL_MAX_TEXTURE_IMAGE_UNITS) -GL_ENUM(0x8892,GL_ARRAY_BUFFER) -GL_ENUM(0x8893,GL_ELEMENT_ARRAY_BUFFER) -GL_ENUM(0x8894,GL_ARRAY_BUFFER_BINDING) -GL_ENUM(0x8895,GL_ELEMENT_ARRAY_BUFFER_BINDING) -GL_ENUM(0x8896,GL_VERTEX_ARRAY_BUFFER_BINDING) -GL_ENUM(0x8897,GL_NORMAL_ARRAY_BUFFER_BINDING) -GL_ENUM(0x8898,GL_COLOR_ARRAY_BUFFER_BINDING) -GL_ENUM(0x889A,GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING) -GL_ENUM(0x889E,GL_WEIGHT_ARRAY_BUFFER_BINDING_OES) -GL_ENUM(0x889F,GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING) -GL_ENUM(0x88B9,GL_WRITE_ONLY_OES) -GL_ENUM(0x88BB,GL_BUFFER_ACCESS_OES) -GL_ENUM(0x88BC,GL_BUFFER_MAPPED_OES) -GL_ENUM(0x88BD,GL_BUFFER_MAP_POINTER_OES) -GL_ENUM(0x88E0,GL_STREAM_DRAW) -GL_ENUM(0x88E4,GL_STATIC_DRAW) -GL_ENUM(0x88E8,GL_DYNAMIC_DRAW) -GL_ENUM(0x88F0,GL_DEPTH24_STENCIL8_OES) -GL_ENUM(0x898A,GL_POINT_SIZE_ARRAY_TYPE_OES) -GL_ENUM(0x898B,GL_POINT_SIZE_ARRAY_STRIDE_OES) -GL_ENUM(0x898C,GL_POINT_SIZE_ARRAY_POINTER_OES) -GL_ENUM(0x898D,GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES) -GL_ENUM(0x898E,GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES) -GL_ENUM(0x898F,GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES) -GL_ENUM(0x8B30,GL_FRAGMENT_SHADER) -GL_ENUM(0x8B31,GL_VERTEX_SHADER) -GL_ENUM(0x8B4C,GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS) -GL_ENUM(0x8B4D,GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS) -GL_ENUM(0x8B4F,GL_SHADER_TYPE) -GL_ENUM(0x8B50,GL_FLOAT_VEC2) -GL_ENUM(0x8B51,GL_FLOAT_VEC3) -GL_ENUM(0x8B52,GL_FLOAT_VEC4) -GL_ENUM(0x8B53,GL_INT_VEC2) -GL_ENUM(0x8B54,GL_INT_VEC3) -GL_ENUM(0x8B55,GL_INT_VEC4) -GL_ENUM(0x8B56,GL_BOOL) -GL_ENUM(0x8B57,GL_BOOL_VEC2) -GL_ENUM(0x8B58,GL_BOOL_VEC3) -GL_ENUM(0x8B59,GL_BOOL_VEC4) -GL_ENUM(0x8B5A,GL_FLOAT_MAT2) -GL_ENUM(0x8B5B,GL_FLOAT_MAT3) -GL_ENUM(0x8B5C,GL_FLOAT_MAT4) -GL_ENUM(0x8B5E,GL_SAMPLER_2D) -GL_ENUM(0x8B5F,GL_SAMPLER_3D_OES) -GL_ENUM(0x8B60,GL_SAMPLER_CUBE) -GL_ENUM(0x8B80,GL_DELETE_STATUS) -GL_ENUM(0x8B81,GL_COMPILE_STATUS) -GL_ENUM(0x8B82,GL_LINK_STATUS) -GL_ENUM(0x8B83,GL_VALIDATE_STATUS) -GL_ENUM(0x8B84,GL_INFO_LOG_LENGTH) -GL_ENUM(0x8B85,GL_ATTACHED_SHADERS) -GL_ENUM(0x8B86,GL_ACTIVE_UNIFORMS) -GL_ENUM(0x8B87,GL_ACTIVE_UNIFORM_MAX_LENGTH) -GL_ENUM(0x8B88,GL_SHADER_SOURCE_LENGTH) -GL_ENUM(0x8B89,GL_ACTIVE_ATTRIBUTES) -GL_ENUM(0x8B8A,GL_ACTIVE_ATTRIBUTE_MAX_LENGTH) -GL_ENUM(0x8B8B,GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES) -GL_ENUM(0x8B8C,GL_SHADING_LANGUAGE_VERSION) -GL_ENUM(0x8B8D,GL_CURRENT_PROGRAM) -GL_ENUM(0x8B90,GL_PALETTE4_RGB8_OES) -GL_ENUM(0x8B91,GL_PALETTE4_RGBA8_OES) -GL_ENUM(0x8B92,GL_PALETTE4_R5_G6_B5_OES) -GL_ENUM(0x8B93,GL_PALETTE4_RGBA4_OES) -GL_ENUM(0x8B94,GL_PALETTE4_RGB5_A1_OES) -GL_ENUM(0x8B95,GL_PALETTE8_RGB8_OES) -GL_ENUM(0x8B96,GL_PALETTE8_RGBA8_OES) -GL_ENUM(0x8B97,GL_PALETTE8_R5_G6_B5_OES) -GL_ENUM(0x8B98,GL_PALETTE8_RGBA4_OES) -GL_ENUM(0x8B99,GL_PALETTE8_RGB5_A1_OES) -GL_ENUM(0x8B9A,GL_IMPLEMENTATION_COLOR_READ_TYPE_OES) -GL_ENUM(0x8B9B,GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES) -GL_ENUM(0x8B9C,GL_POINT_SIZE_ARRAY_OES) -GL_ENUM(0x8B9D,GL_TEXTURE_CROP_RECT_OES) -GL_ENUM(0x8B9E,GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES) -GL_ENUM(0x8B9F,GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES) -GL_ENUM(0x8BC0,GL_COUNTER_TYPE_AMD) -GL_ENUM(0x8BC1,GL_COUNTER_RANGE_AMD) -GL_ENUM(0x8BC2,GL_UNSIGNED_INT64_AMD) -GL_ENUM(0x8BC3,GL_PERCENTAGE_AMD) -GL_ENUM(0x8BC4,GL_PERFMON_RESULT_AVAILABLE_AMD) -GL_ENUM(0x8BC5,GL_PERFMON_RESULT_SIZE_AMD) -GL_ENUM(0x8BC6,GL_PERFMON_RESULT_AMD) -GL_ENUM(0x8BD2,GL_TEXTURE_WIDTH_QCOM) -GL_ENUM(0x8BD3,GL_TEXTURE_HEIGHT_QCOM) -GL_ENUM(0x8BD4,GL_TEXTURE_DEPTH_QCOM) -GL_ENUM(0x8BD5,GL_TEXTURE_INTERNAL_FORMAT_QCOM) -GL_ENUM(0x8BD6,GL_TEXTURE_FORMAT_QCOM) -GL_ENUM(0x8BD7,GL_TEXTURE_TYPE_QCOM) -GL_ENUM(0x8BD8,GL_TEXTURE_IMAGE_VALID_QCOM) -GL_ENUM(0x8BD9,GL_TEXTURE_NUM_LEVELS_QCOM) -GL_ENUM(0x8BDA,GL_TEXTURE_TARGET_QCOM) -GL_ENUM(0x8BDB,GL_TEXTURE_OBJECT_VALID_QCOM) -GL_ENUM(0x8BDC,GL_STATE_RESTORE) -GL_ENUM(0x8C00,GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG) -GL_ENUM(0x8C01,GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG) -GL_ENUM(0x8C02,GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG) -GL_ENUM(0x8C03,GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG) -GL_ENUM(0x8C04,GL_MODULATE_COLOR_IMG) -GL_ENUM(0x8C05,GL_RECIP_ADD_SIGNED_ALPHA_IMG) -GL_ENUM(0x8C06,GL_TEXTURE_ALPHA_MODULATE_IMG) -GL_ENUM(0x8C07,GL_FACTOR_ALPHA_MODULATE_IMG) -GL_ENUM(0x8C08,GL_FRAGMENT_ALPHA_MODULATE_IMG) -GL_ENUM(0x8C09,GL_ADD_BLEND_IMG) -GL_ENUM(0x8C0A,GL_SGX_BINARY_IMG) -GL_ENUM(0x8C92,GL_ATC_RGB_AMD) -GL_ENUM(0x8C93,GL_ATC_RGBA_EXPLICIT_ALPHA_AMD) -GL_ENUM(0x8CA3,GL_STENCIL_BACK_REF) -GL_ENUM(0x8CA4,GL_STENCIL_BACK_VALUE_MASK) -GL_ENUM(0x8CA5,GL_STENCIL_BACK_WRITEMASK) -GL_ENUM(0x8CA6,GL_FRAMEBUFFER_BINDING_OES) -GL_ENUM(0x8CA7,GL_RENDERBUFFER_BINDING_OES) -GL_ENUM(0x8CD0,GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES) -GL_ENUM(0x8CD1,GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES) -GL_ENUM(0x8CD2,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES) -GL_ENUM(0x8CD3,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES) -GL_ENUM(0x8CD4,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES) -GL_ENUM(0x8CD5,GL_FRAMEBUFFER_COMPLETE_OES) -GL_ENUM(0x8CD6,GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES) -GL_ENUM(0x8CD7,GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES) -GL_ENUM(0x8CD9,GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES) -GL_ENUM(0x8CDA,GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES) -GL_ENUM(0x8CDD,GL_FRAMEBUFFER_UNSUPPORTED_OES) -GL_ENUM(0x8CE0,GL_COLOR_ATTACHMENT0_OES) -GL_ENUM(0x8D00,GL_DEPTH_ATTACHMENT_OES) -GL_ENUM(0x8D20,GL_STENCIL_ATTACHMENT_OES) -GL_ENUM(0x8D40,GL_FRAMEBUFFER_OES) -GL_ENUM(0x8D41,GL_RENDERBUFFER_OES) -GL_ENUM(0x8D42,GL_RENDERBUFFER_WIDTH_OES) -GL_ENUM(0x8D43,GL_RENDERBUFFER_HEIGHT_OES) -GL_ENUM(0x8D44,GL_RENDERBUFFER_INTERNAL_FORMAT_OES) -GL_ENUM(0x8D46,GL_STENCIL_INDEX1_OES) -GL_ENUM(0x8D47,GL_STENCIL_INDEX4_OES) -GL_ENUM(0x8D48,GL_STENCIL_INDEX8_OES) -GL_ENUM(0x8D50,GL_RENDERBUFFER_RED_SIZE_OES) -GL_ENUM(0x8D51,GL_RENDERBUFFER_GREEN_SIZE_OES) -GL_ENUM(0x8D52,GL_RENDERBUFFER_BLUE_SIZE_OES) -GL_ENUM(0x8D53,GL_RENDERBUFFER_ALPHA_SIZE_OES) -GL_ENUM(0x8D54,GL_RENDERBUFFER_DEPTH_SIZE_OES) -GL_ENUM(0x8D55,GL_RENDERBUFFER_STENCIL_SIZE_OES) -GL_ENUM(0x8D60,GL_TEXTURE_GEN_STR_OES) -GL_ENUM(0x8D61,GL_HALF_FLOAT_OES) -GL_ENUM(0x8D62,GL_RGB565_OES) -GL_ENUM(0x8D64,GL_ETC1_RGB8_OES) -GL_ENUM(0x8D65,GL_TEXTURE_EXTERNAL_OES) -GL_ENUM(0x8D66,GL_SAMPLER_EXTERNAL_OES) -GL_ENUM(0x8D67,GL_TEXTURE_BINDING_EXTERNAL_OES) -GL_ENUM(0x8D68,GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES) -GL_ENUM(0x8DF0,GL_LOW_FLOAT) -GL_ENUM(0x8DF1,GL_MEDIUM_FLOAT) -GL_ENUM(0x8DF2,GL_HIGH_FLOAT) -GL_ENUM(0x8DF3,GL_LOW_INT) -GL_ENUM(0x8DF4,GL_MEDIUM_INT) -GL_ENUM(0x8DF5,GL_HIGH_INT) -GL_ENUM(0x8DF6,GL_UNSIGNED_INT_10_10_10_2_OES) -GL_ENUM(0x8DF7,GL_INT_10_10_10_2_OES) -GL_ENUM(0x8DF8,GL_SHADER_BINARY_FORMATS) -GL_ENUM(0x8DF9,GL_NUM_SHADER_BINARY_FORMATS) -GL_ENUM(0x8DFA,GL_SHADER_COMPILER) -GL_ENUM(0x8DFB,GL_MAX_VERTEX_UNIFORM_VECTORS) -GL_ENUM(0x8DFC,GL_MAX_VARYING_VECTORS) -GL_ENUM(0x8DFD,GL_MAX_FRAGMENT_UNIFORM_VECTORS) -GL_ENUM(0x8E2C,GL_DEPTH_COMPONENT16_NONLINEAR_NV) -GL_ENUM(0x8ED0,GL_COVERAGE_COMPONENT_NV) -GL_ENUM(0x8ED1,GL_COVERAGE_COMPONENT4_NV) -GL_ENUM(0x8ED2,GL_COVERAGE_ATTACHMENT_NV) -GL_ENUM(0x8ED3,GL_COVERAGE_BUFFERS_NV) -GL_ENUM(0x8ED4,GL_COVERAGE_SAMPLES_NV) -GL_ENUM(0x8ED5,GL_COVERAGE_ALL_FRAGMENTS_NV) -GL_ENUM(0x8ED6,GL_COVERAGE_EDGE_FRAGMENTS_NV) -GL_ENUM(0x8ED7,GL_COVERAGE_AUTOMATIC_NV) -GL_ENUM(0x8FA0,GL_PERFMON_GLOBAL_MODE_QCOM) -GL_ENUM(0x9130,GL_SGX_PROGRAM_BINARY_IMG) -GL_ENUM(0x9133,GL_RENDERBUFFER_SAMPLES_IMG) -GL_ENUM(0x9134,GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG) -GL_ENUM(0x9135,GL_MAX_SAMPLES_IMG) -GL_ENUM(0x9136,GL_TEXTURE_SAMPLES_IMG) diff --git a/opengl/libs/glesv2dbg.h b/opengl/libs/glesv2dbg.h deleted file mode 100644 index 44bc288..0000000 --- a/opengl/libs/glesv2dbg.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - ** Copyright 2011, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#ifndef _GLESV2_DBG_H_ -#define _GLESV2_DBG_H_ - -#include <pthread.h> - -namespace android -{ -struct DbgContext; - -DbgContext* CreateDbgContext(const unsigned version, const gl_hooks_t * const hooks); - -void dbgReleaseThread(); - -// create and bind socket if haven't already, if failed to create socket or -// forceUseFile, then open /data/local/tmp/dump.gles2dbg, exit when size reached -void StartDebugServer(const unsigned short port, const bool forceUseFile, - const unsigned int maxFileSize, const char * const filePath); -void StopDebugServer(); // close socket if open - -}; // namespace android - -#endif // #ifndef _GLESV2_DBG_H_ diff --git a/opengl/libs/glesv2dbg_functions.h b/opengl/libs/glesv2dbg_functions.h deleted file mode 100644 index 2d70032..0000000 --- a/opengl/libs/glesv2dbg_functions.h +++ /dev/null @@ -1,381 +0,0 @@ -extern "C" -{ -GL_ENTRY(void, glActiveTexture, GLenum texture) -GL_ENTRY(void, glAlphaFunc, GLenum func, GLclampf ref) -GL_ENTRY(void, glAlphaFuncx, GLenum func, GLclampx ref) -GL_ENTRY(void, glAlphaFuncxOES, GLenum func, GLclampx ref) -GL_ENTRY(void, glAttachShader, GLuint program, GLuint shader) -GL_ENTRY(void, glBeginPerfMonitorAMD, GLuint monitor) -GL_ENTRY(void, glBindAttribLocation, GLuint program, GLuint index, const GLchar* name) -GL_ENTRY(void, glBindBuffer, GLenum target, GLuint buffer) -GL_ENTRY(void, glBindFramebuffer, GLenum target, GLuint framebuffer) -GL_ENTRY(void, glBindFramebufferOES, GLenum target, GLuint framebuffer) -GL_ENTRY(void, glBindRenderbuffer, GLenum target, GLuint renderbuffer) -GL_ENTRY(void, glBindRenderbufferOES, GLenum target, GLuint renderbuffer) -GL_ENTRY(void, glBindTexture, GLenum target, GLuint texture) -GL_ENTRY(void, glBindVertexArrayOES, GLuint array) -GL_ENTRY(void, glBlendColor, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -GL_ENTRY(void, glBlendEquation, GLenum mode ) -GL_ENTRY(void, glBlendEquationOES, GLenum mode) -GL_ENTRY(void, glBlendEquationSeparate, GLenum modeRGB, GLenum modeAlpha) -GL_ENTRY(void, glBlendEquationSeparateOES, GLenum modeRGB, GLenum modeAlpha) -GL_ENTRY(void, glBlendFunc, GLenum sfactor, GLenum dfactor) -GL_ENTRY(void, glBlendFuncSeparate, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) -GL_ENTRY(void, glBlendFuncSeparateOES, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) -GL_ENTRY(void, glBufferData, GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage) -GL_ENTRY(void, glBufferSubData, GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data) -GL_ENTRY(GLenum, glCheckFramebufferStatus, GLenum target) -GL_ENTRY(GLenum, glCheckFramebufferStatusOES, GLenum target) -GL_ENTRY(void, glClear, GLbitfield mask) -GL_ENTRY(void, glClearColor, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -GL_ENTRY(void, glClearColorx, GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) -GL_ENTRY(void, glClearColorxOES, GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) -GL_ENTRY(void, glClearDepthf, GLclampf depth) -GL_ENTRY(void, glClearDepthfOES, GLclampf depth) -GL_ENTRY(void, glClearDepthx, GLclampx depth) -GL_ENTRY(void, glClearDepthxOES, GLclampx depth) -GL_ENTRY(void, glClearStencil, GLint s) -GL_ENTRY(void, glClientActiveTexture, GLenum texture) -GL_ENTRY(void, glClipPlanef, GLenum plane, const GLfloat *equation) -GL_ENTRY(void, glClipPlanefIMG, GLenum p, const GLfloat *eqn) -GL_ENTRY(void, glClipPlanefOES, GLenum plane, const GLfloat *equation) -GL_ENTRY(void, glClipPlanex, GLenum plane, const GLfixed *equation) -GL_ENTRY(void, glClipPlanexIMG, GLenum p, const GLfixed *eqn) -GL_ENTRY(void, glClipPlanexOES, GLenum plane, const GLfixed *equation) -GL_ENTRY(void, glColor4f, GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) -GL_ENTRY(void, glColor4ub, GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) -GL_ENTRY(void, glColor4x, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) -GL_ENTRY(void, glColor4xOES, GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) -GL_ENTRY(void, glColorMask, GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) -GL_ENTRY(void, glColorPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -GL_ENTRY(void, glCompileShader, GLuint shader) -GL_ENTRY(void, glCompressedTexImage2D, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) -GL_ENTRY(void, glCompressedTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data) -GL_ENTRY(void, glCompressedTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data) -GL_ENTRY(void, glCompressedTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data) -GL_ENTRY(void, glCopyTexImage2D, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) -GL_ENTRY(void, glCopyTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) -GL_ENTRY(void, glCopyTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) -GL_ENTRY(void, glCoverageMaskNV, GLboolean mask) -GL_ENTRY(void, glCoverageOperationNV, GLenum operation) -GL_ENTRY(GLuint, glCreateProgram, void) -GL_ENTRY(GLuint, glCreateShader, GLenum type) -GL_ENTRY(void, glCullFace, GLenum mode) -GL_ENTRY(void, glCurrentPaletteMatrixOES, GLuint matrixpaletteindex) -GL_ENTRY(void, glDeleteBuffers, GLsizei n, const GLuint *buffers) -GL_ENTRY(void, glDeleteFencesNV, GLsizei n, const GLuint *fences) -GL_ENTRY(void, glDeleteFramebuffers, GLsizei n, const GLuint* framebuffers) -GL_ENTRY(void, glDeleteFramebuffersOES, GLsizei n, const GLuint* framebuffers) -GL_ENTRY(void, glDeletePerfMonitorsAMD, GLsizei n, GLuint *monitors) -GL_ENTRY(void, glDeleteProgram, GLuint program) -GL_ENTRY(void, glDeleteRenderbuffers, GLsizei n, const GLuint* renderbuffers) -GL_ENTRY(void, glDeleteRenderbuffersOES, GLsizei n, const GLuint* renderbuffers) -GL_ENTRY(void, glDeleteShader, GLuint shader) -GL_ENTRY(void, glDeleteTextures, GLsizei n, const GLuint *textures) -GL_ENTRY(void, glDeleteVertexArraysOES, GLsizei n, const GLuint *arrays) -GL_ENTRY(void, glDepthFunc, GLenum func) -GL_ENTRY(void, glDepthMask, GLboolean flag) -GL_ENTRY(void, glDepthRangef, GLclampf zNear, GLclampf zFar) -GL_ENTRY(void, glDepthRangefOES, GLclampf zNear, GLclampf zFar) -GL_ENTRY(void, glDepthRangex, GLclampx zNear, GLclampx zFar) -GL_ENTRY(void, glDepthRangexOES, GLclampx zNear, GLclampx zFar) -GL_ENTRY(void, glDetachShader, GLuint program, GLuint shader) -GL_ENTRY(void, glDisable, GLenum cap) -GL_ENTRY(void, glDisableClientState, GLenum array) -GL_ENTRY(void, glDisableDriverControlQCOM, GLuint driverControl) -GL_ENTRY(void, glDisableVertexAttribArray, GLuint index) -GL_ENTRY(void, glDiscardFramebufferEXT, GLenum target, GLsizei numAttachments, const GLenum *attachments) -GL_ENTRY(void, glDrawArrays, GLenum mode, GLint first, GLsizei count) -GL_ENTRY(void, glDrawElements, GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) -GL_ENTRY(void, glDrawTexfOES, GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) -GL_ENTRY(void, glDrawTexfvOES, const GLfloat *coords) -GL_ENTRY(void, glDrawTexiOES, GLint x, GLint y, GLint z, GLint width, GLint height) -GL_ENTRY(void, glDrawTexivOES, const GLint *coords) -GL_ENTRY(void, glDrawTexsOES, GLshort x, GLshort y, GLshort z, GLshort width, GLshort height) -GL_ENTRY(void, glDrawTexsvOES, const GLshort *coords) -GL_ENTRY(void, glDrawTexxOES, GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height) -GL_ENTRY(void, glDrawTexxvOES, const GLfixed *coords) -GL_ENTRY(void, glEGLImageTargetRenderbufferStorageOES, GLenum target, GLeglImageOES image) -GL_ENTRY(void, glEGLImageTargetTexture2DOES, GLenum target, GLeglImageOES image) -GL_ENTRY(void, glEnable, GLenum cap) -GL_ENTRY(void, glEnableClientState, GLenum array) -GL_ENTRY(void, glEnableDriverControlQCOM, GLuint driverControl) -GL_ENTRY(void, glEnableVertexAttribArray, GLuint index) -GL_ENTRY(void, glEndPerfMonitorAMD, GLuint monitor) -GL_ENTRY(void, glEndTilingQCOM, GLbitfield preserveMask) -GL_ENTRY(void, glExtGetBufferPointervQCOM, GLenum target, GLvoid **params) -GL_ENTRY(void, glExtGetBuffersQCOM, GLuint *buffers, GLint maxBuffers, GLint *numBuffers) -GL_ENTRY(void, glExtGetFramebuffersQCOM, GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers) -GL_ENTRY(void, glExtGetProgramBinarySourceQCOM, GLuint program, GLenum shadertype, GLchar *source, GLint *length) -GL_ENTRY(void, glExtGetProgramsQCOM, GLuint *programs, GLint maxPrograms, GLint *numPrograms) -GL_ENTRY(void, glExtGetRenderbuffersQCOM, GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers) -GL_ENTRY(void, glExtGetShadersQCOM, GLuint *shaders, GLint maxShaders, GLint *numShaders) -GL_ENTRY(void, glExtGetTexLevelParameterivQCOM, GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params) -GL_ENTRY(void, glExtGetTexSubImageQCOM, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels) -GL_ENTRY(void, glExtGetTexturesQCOM, GLuint *textures, GLint maxTextures, GLint *numTextures) -GL_ENTRY(GLboolean, glExtIsProgramBinaryQCOM, GLuint program) -GL_ENTRY(void, glExtTexObjectStateOverrideiQCOM, GLenum target, GLenum pname, GLint param) -GL_ENTRY(void, glFinish, void) -GL_ENTRY(void, glFinishFenceNV, GLuint fence) -GL_ENTRY(void, glFlush, void) -GL_ENTRY(void, glFogf, GLenum pname, GLfloat param) -GL_ENTRY(void, glFogfv, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glFogx, GLenum pname, GLfixed param) -GL_ENTRY(void, glFogxOES, GLenum pname, GLfixed param) -GL_ENTRY(void, glFogxv, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glFogxvOES, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glFramebufferRenderbuffer, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) -GL_ENTRY(void, glFramebufferRenderbufferOES, GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) -GL_ENTRY(void, glFramebufferTexture2D, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) -GL_ENTRY(void, glFramebufferTexture2DMultisampleIMG, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) -GL_ENTRY(void, glFramebufferTexture2DOES, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) -GL_ENTRY(void, glFramebufferTexture3DOES, GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset) -GL_ENTRY(void, glFrontFace, GLenum mode) -GL_ENTRY(void, glFrustumf, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) -GL_ENTRY(void, glFrustumfOES, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) -GL_ENTRY(void, glFrustumx, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) -GL_ENTRY(void, glFrustumxOES, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) -GL_ENTRY(void, glGenBuffers, GLsizei n, GLuint *buffers) -GL_ENTRY(void, glGenFencesNV, GLsizei n, GLuint *fences) -GL_ENTRY(void, glGenFramebuffers, GLsizei n, GLuint* framebuffers) -GL_ENTRY(void, glGenFramebuffersOES, GLsizei n, GLuint* framebuffers) -GL_ENTRY(void, glGenPerfMonitorsAMD, GLsizei n, GLuint *monitors) -GL_ENTRY(void, glGenRenderbuffers, GLsizei n, GLuint* renderbuffers) -GL_ENTRY(void, glGenRenderbuffersOES, GLsizei n, GLuint* renderbuffers) -GL_ENTRY(void, glGenTextures, GLsizei n, GLuint *textures) -GL_ENTRY(void, glGenVertexArraysOES, GLsizei n, GLuint *arrays) -GL_ENTRY(void, glGenerateMipmap, GLenum target) -GL_ENTRY(void, glGenerateMipmapOES, GLenum target) -GL_ENTRY(void, glGetActiveAttrib, GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) -GL_ENTRY(void, glGetActiveUniform, GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name) -GL_ENTRY(void, glGetAttachedShaders, GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) -GL_ENTRY(int, glGetAttribLocation, GLuint program, const GLchar* name) -GL_ENTRY(void, glGetBooleanv, GLenum pname, GLboolean *params) -GL_ENTRY(void, glGetBufferParameteriv, GLenum target, GLenum pname, GLint *params) -GL_ENTRY(void, glGetBufferPointervOES, GLenum target, GLenum pname, GLvoid ** params) -GL_ENTRY(void, glGetClipPlanef, GLenum pname, GLfloat eqn[4]) -GL_ENTRY(void, glGetClipPlanefOES, GLenum pname, GLfloat eqn[4]) -GL_ENTRY(void, glGetClipPlanex, GLenum pname, GLfixed eqn[4]) -GL_ENTRY(void, glGetClipPlanexOES, GLenum pname, GLfixed eqn[4]) -GL_ENTRY(void, glGetDriverControlStringQCOM, GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString) -GL_ENTRY(void, glGetDriverControlsQCOM, GLint *num, GLsizei size, GLuint *driverControls) -GL_ENTRY(GLenum, glGetError, void) -GL_ENTRY(void, glGetFenceivNV, GLuint fence, GLenum pname, GLint *params) -GL_ENTRY(void, glGetFixedv, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetFixedvOES, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetFloatv, GLenum pname, GLfloat *params) -GL_ENTRY(void, glGetFramebufferAttachmentParameteriv, GLenum target, GLenum attachment, GLenum pname, GLint* params) -GL_ENTRY(void, glGetFramebufferAttachmentParameterivOES, GLenum target, GLenum attachment, GLenum pname, GLint* params) -GL_ENTRY(void, glGetIntegerv, GLenum pname, GLint *params) -GL_ENTRY(void, glGetLightfv, GLenum light, GLenum pname, GLfloat *params) -GL_ENTRY(void, glGetLightxv, GLenum light, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetLightxvOES, GLenum light, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetMaterialfv, GLenum face, GLenum pname, GLfloat *params) -GL_ENTRY(void, glGetMaterialxv, GLenum face, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetMaterialxvOES, GLenum face, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetPerfMonitorCounterDataAMD, GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten) -GL_ENTRY(void, glGetPerfMonitorCounterInfoAMD, GLuint group, GLuint counter, GLenum pname, GLvoid *data) -GL_ENTRY(void, glGetPerfMonitorCounterStringAMD, GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString) -GL_ENTRY(void, glGetPerfMonitorCountersAMD, GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters) -GL_ENTRY(void, glGetPerfMonitorGroupStringAMD, GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString) -GL_ENTRY(void, glGetPerfMonitorGroupsAMD, GLint *numGroups, GLsizei groupsSize, GLuint *groups) -GL_ENTRY(void, glGetPointerv, GLenum pname, GLvoid **params) -GL_ENTRY(void, glGetProgramBinaryOES, GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary) -GL_ENTRY(void, glGetProgramInfoLog, GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog) -GL_ENTRY(void, glGetProgramiv, GLuint program, GLenum pname, GLint* params) -GL_ENTRY(void, glGetRenderbufferParameteriv, GLenum target, GLenum pname, GLint* params) -GL_ENTRY(void, glGetRenderbufferParameterivOES, GLenum target, GLenum pname, GLint* params) -GL_ENTRY(void, glGetShaderInfoLog, GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog) -GL_ENTRY(void, glGetShaderPrecisionFormat, GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision) -GL_ENTRY(void, glGetShaderSource, GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source) -GL_ENTRY(void, glGetShaderiv, GLuint shader, GLenum pname, GLint* params) -GL_ENTRY(const GLubyte *, glGetString, GLenum name) -GL_ENTRY(void, glGetTexEnvfv, GLenum env, GLenum pname, GLfloat *params) -GL_ENTRY(void, glGetTexEnviv, GLenum env, GLenum pname, GLint *params) -GL_ENTRY(void, glGetTexEnvxv, GLenum env, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetTexEnvxvOES, GLenum env, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetTexGenfvOES, GLenum coord, GLenum pname, GLfloat *params) -GL_ENTRY(void, glGetTexGenivOES, GLenum coord, GLenum pname, GLint *params) -GL_ENTRY(void, glGetTexGenxvOES, GLenum coord, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetTexParameterfv, GLenum target, GLenum pname, GLfloat *params) -GL_ENTRY(void, glGetTexParameteriv, GLenum target, GLenum pname, GLint *params) -GL_ENTRY(void, glGetTexParameterxv, GLenum target, GLenum pname, GLfixed *params) -GL_ENTRY(void, glGetTexParameterxvOES, GLenum target, GLenum pname, GLfixed *params) -GL_ENTRY(int, glGetUniformLocation, GLuint program, const GLchar* name) -GL_ENTRY(void, glGetUniformfv, GLuint program, GLint location, GLfloat* params) -GL_ENTRY(void, glGetUniformiv, GLuint program, GLint location, GLint* params) -GL_ENTRY(void, glGetVertexAttribPointerv, GLuint index, GLenum pname, GLvoid** pointer) -GL_ENTRY(void, glGetVertexAttribfv, GLuint index, GLenum pname, GLfloat* params) -GL_ENTRY(void, glGetVertexAttribiv, GLuint index, GLenum pname, GLint* params) -GL_ENTRY(void, glHint, GLenum target, GLenum mode) -GL_ENTRY(GLboolean, glIsBuffer, GLuint buffer) -GL_ENTRY(GLboolean, glIsEnabled, GLenum cap) -GL_ENTRY(GLboolean, glIsFenceNV, GLuint fence) -GL_ENTRY(GLboolean, glIsFramebuffer, GLuint framebuffer) -GL_ENTRY(GLboolean, glIsFramebufferOES, GLuint framebuffer) -GL_ENTRY(GLboolean, glIsProgram, GLuint program) -GL_ENTRY(GLboolean, glIsRenderbuffer, GLuint renderbuffer) -GL_ENTRY(GLboolean, glIsRenderbufferOES, GLuint renderbuffer) -GL_ENTRY(GLboolean, glIsShader, GLuint shader) -GL_ENTRY(GLboolean, glIsTexture, GLuint texture) -GL_ENTRY(GLboolean, glIsVertexArrayOES, GLuint array) -GL_ENTRY(void, glLightModelf, GLenum pname, GLfloat param) -GL_ENTRY(void, glLightModelfv, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glLightModelx, GLenum pname, GLfixed param) -GL_ENTRY(void, glLightModelxOES, GLenum pname, GLfixed param) -GL_ENTRY(void, glLightModelxv, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glLightModelxvOES, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glLightf, GLenum light, GLenum pname, GLfloat param) -GL_ENTRY(void, glLightfv, GLenum light, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glLightx, GLenum light, GLenum pname, GLfixed param) -GL_ENTRY(void, glLightxOES, GLenum light, GLenum pname, GLfixed param) -GL_ENTRY(void, glLightxv, GLenum light, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glLightxvOES, GLenum light, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glLineWidth, GLfloat width) -GL_ENTRY(void, glLineWidthx, GLfixed width) -GL_ENTRY(void, glLineWidthxOES, GLfixed width) -GL_ENTRY(void, glLinkProgram, GLuint program) -GL_ENTRY(void, glLoadIdentity, void) -GL_ENTRY(void, glLoadMatrixf, const GLfloat *m) -GL_ENTRY(void, glLoadMatrixx, const GLfixed *m) -GL_ENTRY(void, glLoadMatrixxOES, const GLfixed *m) -GL_ENTRY(void, glLoadPaletteFromModelViewMatrixOES, void) -GL_ENTRY(void, glLogicOp, GLenum opcode) -GL_ENTRY(void*, glMapBufferOES, GLenum target, GLenum access) -GL_ENTRY(void, glMaterialf, GLenum face, GLenum pname, GLfloat param) -GL_ENTRY(void, glMaterialfv, GLenum face, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glMaterialx, GLenum face, GLenum pname, GLfixed param) -GL_ENTRY(void, glMaterialxOES, GLenum face, GLenum pname, GLfixed param) -GL_ENTRY(void, glMaterialxv, GLenum face, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glMaterialxvOES, GLenum face, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glMatrixIndexPointerOES, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -GL_ENTRY(void, glMatrixMode, GLenum mode) -GL_ENTRY(void, glMultMatrixf, const GLfloat *m) -GL_ENTRY(void, glMultMatrixx, const GLfixed *m) -GL_ENTRY(void, glMultMatrixxOES, const GLfixed *m) -GL_ENTRY(void, glMultiDrawArraysEXT, GLenum mode, GLint *first, GLsizei *count, GLsizei primcount) -GL_ENTRY(void, glMultiDrawElementsEXT, GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount) -GL_ENTRY(void, glMultiTexCoord4f, GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) -GL_ENTRY(void, glMultiTexCoord4x, GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) -GL_ENTRY(void, glMultiTexCoord4xOES, GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) -GL_ENTRY(void, glNormal3f, GLfloat nx, GLfloat ny, GLfloat nz) -GL_ENTRY(void, glNormal3x, GLfixed nx, GLfixed ny, GLfixed nz) -GL_ENTRY(void, glNormal3xOES, GLfixed nx, GLfixed ny, GLfixed nz) -GL_ENTRY(void, glNormalPointer, GLenum type, GLsizei stride, const GLvoid *pointer) -GL_ENTRY(void, glOrthof, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) -GL_ENTRY(void, glOrthofOES, GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) -GL_ENTRY(void, glOrthox, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) -GL_ENTRY(void, glOrthoxOES, GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) -GL_ENTRY(void, glPixelStorei, GLenum pname, GLint param) -GL_ENTRY(void, glPointParameterf, GLenum pname, GLfloat param) -GL_ENTRY(void, glPointParameterfv, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glPointParameterx, GLenum pname, GLfixed param) -GL_ENTRY(void, glPointParameterxOES, GLenum pname, GLfixed param) -GL_ENTRY(void, glPointParameterxv, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glPointParameterxvOES, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glPointSize, GLfloat size) -GL_ENTRY(void, glPointSizePointerOES, GLenum type, GLsizei stride, const GLvoid *pointer) -GL_ENTRY(void, glPointSizex, GLfixed size) -GL_ENTRY(void, glPointSizexOES, GLfixed size) -GL_ENTRY(void, glPolygonOffset, GLfloat factor, GLfloat units) -GL_ENTRY(void, glPolygonOffsetx, GLfixed factor, GLfixed units) -GL_ENTRY(void, glPolygonOffsetxOES, GLfixed factor, GLfixed units) -GL_ENTRY(void, glPopMatrix, void) -GL_ENTRY(void, glProgramBinaryOES, GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length) -GL_ENTRY(void, glPushMatrix, void) -GL_ENTRY(GLbitfield, glQueryMatrixxOES, GLfixed mantissa[16], GLint exponent[16]) -GL_ENTRY(void, glReadPixels, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) -GL_ENTRY(void, glReleaseShaderCompiler, void) -GL_ENTRY(void, glRenderbufferStorage, GLenum target, GLenum internalformat, GLsizei width, GLsizei height) -GL_ENTRY(void, glRenderbufferStorageMultisampleIMG, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) -GL_ENTRY(void, glRenderbufferStorageOES, GLenum target, GLenum internalformat, GLsizei width, GLsizei height) -GL_ENTRY(void, glRotatef, GLfloat angle, GLfloat x, GLfloat y, GLfloat z) -GL_ENTRY(void, glRotatex, GLfixed angle, GLfixed x, GLfixed y, GLfixed z) -GL_ENTRY(void, glRotatexOES, GLfixed angle, GLfixed x, GLfixed y, GLfixed z) -GL_ENTRY(void, glSampleCoverage, GLclampf value, GLboolean invert) -GL_ENTRY(void, glSampleCoveragex, GLclampx value, GLboolean invert) -GL_ENTRY(void, glSampleCoveragexOES, GLclampx value, GLboolean invert) -GL_ENTRY(void, glScalef, GLfloat x, GLfloat y, GLfloat z) -GL_ENTRY(void, glScalex, GLfixed x, GLfixed y, GLfixed z) -GL_ENTRY(void, glScalexOES, GLfixed x, GLfixed y, GLfixed z) -GL_ENTRY(void, glScissor, GLint x, GLint y, GLsizei width, GLsizei height) -GL_ENTRY(void, glSelectPerfMonitorCountersAMD, GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList) -GL_ENTRY(void, glSetFenceNV, GLuint fence, GLenum condition) -GL_ENTRY(void, glShadeModel, GLenum mode) -GL_ENTRY(void, glShaderBinary, GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length) -GL_ENTRY(void, glShaderSource, GLuint shader, GLsizei count, const GLchar** string, const GLint* length) -GL_ENTRY(void, glStartTilingQCOM, GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask) -GL_ENTRY(void, glStencilFunc, GLenum func, GLint ref, GLuint mask) -GL_ENTRY(void, glStencilFuncSeparate, GLenum face, GLenum func, GLint ref, GLuint mask) -GL_ENTRY(void, glStencilMask, GLuint mask) -GL_ENTRY(void, glStencilMaskSeparate, GLenum face, GLuint mask) -GL_ENTRY(void, glStencilOp, GLenum fail, GLenum zfail, GLenum zpass) -GL_ENTRY(void, glStencilOpSeparate, GLenum face, GLenum fail, GLenum zfail, GLenum zpass) -GL_ENTRY(GLboolean, glTestFenceNV, GLuint fence) -GL_ENTRY(void, glTexCoordPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -GL_ENTRY(void, glTexEnvf, GLenum target, GLenum pname, GLfloat param) -GL_ENTRY(void, glTexEnvfv, GLenum target, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glTexEnvi, GLenum target, GLenum pname, GLint param) -GL_ENTRY(void, glTexEnviv, GLenum target, GLenum pname, const GLint *params) -GL_ENTRY(void, glTexEnvx, GLenum target, GLenum pname, GLfixed param) -GL_ENTRY(void, glTexEnvxOES, GLenum target, GLenum pname, GLfixed param) -GL_ENTRY(void, glTexEnvxv, GLenum target, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glTexEnvxvOES, GLenum target, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glTexGenfOES, GLenum coord, GLenum pname, GLfloat param) -GL_ENTRY(void, glTexGenfvOES, GLenum coord, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glTexGeniOES, GLenum coord, GLenum pname, GLint param) -GL_ENTRY(void, glTexGenivOES, GLenum coord, GLenum pname, const GLint *params) -GL_ENTRY(void, glTexGenxOES, GLenum coord, GLenum pname, GLfixed param) -GL_ENTRY(void, glTexGenxvOES, GLenum coord, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glTexImage2D, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) -GL_ENTRY(void, glTexImage3DOES, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels) -GL_ENTRY(void, glTexParameterf, GLenum target, GLenum pname, GLfloat param) -GL_ENTRY(void, glTexParameterfv, GLenum target, GLenum pname, const GLfloat *params) -GL_ENTRY(void, glTexParameteri, GLenum target, GLenum pname, GLint param) -GL_ENTRY(void, glTexParameteriv, GLenum target, GLenum pname, const GLint *params) -GL_ENTRY(void, glTexParameterx, GLenum target, GLenum pname, GLfixed param) -GL_ENTRY(void, glTexParameterxOES, GLenum target, GLenum pname, GLfixed param) -GL_ENTRY(void, glTexParameterxv, GLenum target, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glTexParameterxvOES, GLenum target, GLenum pname, const GLfixed *params) -GL_ENTRY(void, glTexSubImage2D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) -GL_ENTRY(void, glTexSubImage3DOES, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels) -GL_ENTRY(void, glTranslatef, GLfloat x, GLfloat y, GLfloat z) -GL_ENTRY(void, glTranslatex, GLfixed x, GLfixed y, GLfixed z) -GL_ENTRY(void, glTranslatexOES, GLfixed x, GLfixed y, GLfixed z) -GL_ENTRY(void, glUniform1f, GLint location, GLfloat x) -GL_ENTRY(void, glUniform1fv, GLint location, GLsizei count, const GLfloat* v) -GL_ENTRY(void, glUniform1i, GLint location, GLint x) -GL_ENTRY(void, glUniform1iv, GLint location, GLsizei count, const GLint* v) -GL_ENTRY(void, glUniform2f, GLint location, GLfloat x, GLfloat y) -GL_ENTRY(void, glUniform2fv, GLint location, GLsizei count, const GLfloat* v) -GL_ENTRY(void, glUniform2i, GLint location, GLint x, GLint y) -GL_ENTRY(void, glUniform2iv, GLint location, GLsizei count, const GLint* v) -GL_ENTRY(void, glUniform3f, GLint location, GLfloat x, GLfloat y, GLfloat z) -GL_ENTRY(void, glUniform3fv, GLint location, GLsizei count, const GLfloat* v) -GL_ENTRY(void, glUniform3i, GLint location, GLint x, GLint y, GLint z) -GL_ENTRY(void, glUniform3iv, GLint location, GLsizei count, const GLint* v) -GL_ENTRY(void, glUniform4f, GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -GL_ENTRY(void, glUniform4fv, GLint location, GLsizei count, const GLfloat* v) -GL_ENTRY(void, glUniform4i, GLint location, GLint x, GLint y, GLint z, GLint w) -GL_ENTRY(void, glUniform4iv, GLint location, GLsizei count, const GLint* v) -GL_ENTRY(void, glUniformMatrix2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -GL_ENTRY(void, glUniformMatrix3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -GL_ENTRY(void, glUniformMatrix4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) -GL_ENTRY(GLboolean, glUnmapBufferOES, GLenum target) -GL_ENTRY(void, glUseProgram, GLuint program) -GL_ENTRY(void, glValidateProgram, GLuint program) -GL_ENTRY(void, glVertexAttrib1f, GLuint indx, GLfloat x) -GL_ENTRY(void, glVertexAttrib1fv, GLuint indx, const GLfloat* values) -GL_ENTRY(void, glVertexAttrib2f, GLuint indx, GLfloat x, GLfloat y) -GL_ENTRY(void, glVertexAttrib2fv, GLuint indx, const GLfloat* values) -GL_ENTRY(void, glVertexAttrib3f, GLuint indx, GLfloat x, GLfloat y, GLfloat z) -GL_ENTRY(void, glVertexAttrib3fv, GLuint indx, const GLfloat* values) -GL_ENTRY(void, glVertexAttrib4f, GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -GL_ENTRY(void, glVertexAttrib4fv, GLuint indx, const GLfloat* values) -GL_ENTRY(void, glVertexAttribPointer, GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr) -GL_ENTRY(void, glVertexPointer, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -GL_ENTRY(void, glViewport, GLint x, GLint y, GLsizei width, GLsizei height) -GL_ENTRY(void, glWeightPointerOES, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) - - -} diff --git a/opengl/libs/hooks.h b/opengl/libs/hooks.h deleted file mode 100644 index 7ac88cd..0000000 --- a/opengl/libs/hooks.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - ** Copyright 2007, The Android Open Source Project - ** - ** Licensed under the Apache License, Version 2.0 (the "License"); - ** you may not use this file except in compliance with the License. - ** You may obtain a copy of the License at - ** - ** http://www.apache.org/licenses/LICENSE-2.0 - ** - ** Unless required by applicable law or agreed to in writing, software - ** distributed under the License is distributed on an "AS IS" BASIS, - ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - ** See the License for the specific language governing permissions and - ** limitations under the License. - */ - -#ifndef ANDROID_GLES_CM_HOOKS_H -#define ANDROID_GLES_CM_HOOKS_H - -#include <ctype.h> -#include <string.h> -#include <errno.h> - -#include <pthread.h> - -#include <EGL/egl.h> -#include <EGL/eglext.h> -#include <GLES/gl.h> -#include <GLES/glext.h> -#include <GLES2/gl2.h> -#include <GLES2/gl2ext.h> - -#if !defined(__arm__) -#define USE_SLOW_BINDING 1 -#else -#define USE_SLOW_BINDING 0 -#endif -#undef NELEM -#define NELEM(x) (sizeof(x)/sizeof(*(x))) -#define MAX_NUMBER_OF_GL_EXTENSIONS 64 - - -#if defined(HAVE_ANDROID_OS) && !USE_SLOW_BINDING && __OPTIMIZE__ -#define USE_FAST_TLS_KEY 1 -#else -#define USE_FAST_TLS_KEY 0 -#endif - -#if USE_FAST_TLS_KEY -# include <bionic_tls.h> /* special private C library header */ -#endif - -// ---------------------------------------------------------------------------- -namespace android { -// ---------------------------------------------------------------------------- - -// GL / EGL hooks - -#undef GL_ENTRY -#undef EGL_ENTRY -#define GL_ENTRY(_r, _api, ...) _r (*_api)(__VA_ARGS__); -#define EGL_ENTRY(_r, _api, ...) _r (*_api)(__VA_ARGS__); - -struct egl_t { - #include "EGL/egl_entries.in" -}; - -struct gl_hooks_t { - struct gl_t { - #include "entries.in" - } gl; - struct gl_ext_t { - __eglMustCastToProperFunctionPointerType extensions[MAX_NUMBER_OF_GL_EXTENSIONS]; - } ext; -}; -#undef GL_ENTRY -#undef EGL_ENTRY - -EGLAPI void setGlThreadSpecific(gl_hooks_t const *value); -EGLAPI gl_hooks_t const* getGlThreadSpecific(); - -// ---------------------------------------------------------------------------- -}; // namespace android -// ---------------------------------------------------------------------------- - -#endif /* ANDROID_GLES_CM_HOOKS_H */ diff --git a/opengl/libs/tools/genfiles b/opengl/libs/tools/genfiles deleted file mode 100755 index 50bbf08..0000000 --- a/opengl/libs/tools/genfiles +++ /dev/null @@ -1,44 +0,0 @@ -#! /bin/sh -# -# Copyright (C) 2008 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -./glapigen ../../include/GLES/gl.h > ../GLES_CM/gl_api.in -./glapigen ../../include/GLES/glext.h > ../GLES_CM/glext_api.in -./glapigen ../../include/GLES2/gl2.h > ../GLES2/gl2_api.in -./glapigen ../../include/GLES2/gl2ext.h > ../GLES2/gl2ext_api.in - -./glentrygen ../../include/GLES/gl.h > /tmp/gl_entries.in -./glentrygen ../../include/GLES/glext.h > /tmp/glext_entries.in -./glentrygen ../../include/GLES2/gl2.h > /tmp/gl2_entries.in -./glentrygen ../../include/GLES2/gl2ext.h > /tmp/gl2ext_entries.in - -cat /tmp/gl_entries.in \ - /tmp/glext_entries.in \ - /tmp/gl2_entries.in \ - /tmp/gl2ext_entries.in \ - | sort -t, -k2 \ - | awk -F, '!_[$2]++' \ - > ../entries.in - -./gltracegen ../entries.in >../trace.in - -cat ../../include/GLES/gl.h \ - ../../include/GLES/glext.h \ - ../../include/GLES2/gl2.h \ - ../../include/GLES2/gl2ext.h \ - | ./glenumsgen \ - | sort \ - > ../enums.in - diff --git a/opengl/libs/tools/glapigen b/opengl/libs/tools/glapigen deleted file mode 100755 index bd8dda3..0000000 --- a/opengl/libs/tools/glapigen +++ /dev/null @@ -1,79 +0,0 @@ -#! /usr/bin/perl -# -# Copyright (C) 2008 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -use strict; - -sub rtrim($) -{ - my $string = shift; - $string =~ s/\s+$//; - return $string; -} - -while (my $line = <>) { - next if $line =~ /^\//; - next if $line =~ /^#/; - next if $line =~ /^\s*$/; - if ($line !~ /^GL_API(CALL)?\s+(.+)\s+GL_APIENTRY\s+([\w]+)\s*\(([^\)]+)\);/) { - next; - } - my $type = rtrim($2); - my $name = $3; - my $args = $4; - - #printf("%s", $line); - - my $prefix = ""; - if ($name eq "glEGLImageTargetTexture2DOES") { - $prefix = "__"; - } - if ($name eq "glEGLImageTargetRenderbufferStorageOES") { - $prefix = "__"; - } - - printf("%s API_ENTRY(%s%s)(%s)", $type, $prefix, $name, $args); - - printf(" {\n"); - if ($type eq "void") { - printf(" CALL_GL_API(%s", $name); - } else { - printf(" CALL_GL_API_RETURN(%s", $name); - } - my @args = split ',', $args; - my $len = scalar(@args); - for (my $num = 0; $num < $len; $num++) { - if ($args[$num] ne "void") { - print ", "; - # - # extract the name from the parameter - # type name - # const type *name - # type *name - # type name[4] - # - if ($args[$num] =~ /(\S+\s)+\**\s*([\w]+)/) { - printf("%s", $2); - } - } - } - printf(");\n"); - printf("}\n"); -} - - - - - diff --git a/opengl/libs/tools/glentrygen b/opengl/libs/tools/glentrygen deleted file mode 100755 index 170f041..0000000 --- a/opengl/libs/tools/glentrygen +++ /dev/null @@ -1,38 +0,0 @@ -#! /usr/bin/perl -# -# Copyright (C) 2008 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -use strict; - -sub rtrim($) -{ - my $string = shift; - $string =~ s/\s+$//; - return $string; -} - -while (my $line = <>) { - next if $line =~ /^\//; - next if $line =~ /^#/; - next if $line =~ /^\s*$/; - if ($line !~ /^GL_API(CALL)?\s+(.+)\s+GL_APIENTRY\s+([\w]+)\s*\(([^\)]+)\);/) { - next; - } - my $type = rtrim($2); - my $name = $3; - my $args = $4; - - printf("GL_ENTRY(%s, %s, %s)\n", $type, $name, $args); -} diff --git a/opengl/libs/tools/glenumsgen b/opengl/libs/tools/glenumsgen deleted file mode 100755 index 2ae5fbf..0000000 --- a/opengl/libs/tools/glenumsgen +++ /dev/null @@ -1,38 +0,0 @@ -#! /usr/bin/perl -# -# Copyright (C) 2010 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -use strict; - -my %enumHash = (); - -while (my $line = <STDIN>) { - next if $line =~ /^\//; - # Skip bitfield definitions. - next if $line =~ /_BIT(\d+_|\s+)/; - if ($line !~ /^#define\s+(\S+)\s+(0x\S+)/) { - next; - } - my $enumName = $1; - my $enumValue = $2; - next if exists($enumHash { $enumValue }); - $enumHash { $enumValue } = $enumName; - printf("GL_ENUM(%s,%s)\n", $enumValue, $enumName); -} - - - - - diff --git a/opengl/libs/tools/gltracegen b/opengl/libs/tools/gltracegen deleted file mode 100755 index da42653..0000000 --- a/opengl/libs/tools/gltracegen +++ /dev/null @@ -1,95 +0,0 @@ -#! /usr/bin/perl -# -# Copyright (C) 2010 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -use strict; - -sub rtrim($) -{ - my $string = shift; - $string =~ s/\s+$//; - return $string; -} - -while (my $line = <>) { - next if $line =~ /^\//; - next if $line =~ /^#/; - next if $line =~ /^\s*$/; - if ($line !~ /^GL_ENTRY\(([^,]+), ([^,]+), ([^\)]+)\)/) { - next; - } - my $type = $1; - my $name = $2; - my $args = $3; - - my @args = split ',', $args; - my $len = scalar(@args); - my $nonVoidArgLen = 0; - for (my $num = 0; $num < $len; $num++) { - if ($args[$num] ne "void") { - $nonVoidArgLen++; - } - } - if ($type eq "void") { - printf("TRACE_GL_VOID("); - } else { - printf("TRACE_GL(%s, ", $type); - } - - printf("%s, (%s), (", $name, $args); - for (my $num = 0; $num < $len; $num++) { - if ($args[$num] ne "void") { - if ($num > 0) { - print ", "; - } - # - # extract the name from the parameter - # type name - # const type *name - # type *name - # type name[4] - # - if ($args[$num] =~ /(\S+\s)+\**\s*([\w]+)/) { - printf("%s", $2); - } - } - } - printf("), %d", $nonVoidArgLen); - for (my $num = 0; $num < $len; $num++) { - if ($args[$num] ne "void") { - # - # extract the name from the parameter - # type name - # const type *name - # type *name - # type name[4] - # - my $arg = $args[$num]; - if ($arg =~ /(\S+\s)+\**\s*([\w]+)/) { - my $name = $2; - if ($arg =~ /((const )*(\S+\s)+\**)\s*([\w]+)/) { - my $type = rtrim($1); - printf(", \"%s\", %s", $type, $name); - } - } - } - } - printf(")\n"); -} - - - - - diff --git a/opengl/libs/trace.in b/opengl/libs/trace.in deleted file mode 100644 index 3d492af..0000000 --- a/opengl/libs/trace.in +++ /dev/null @@ -1,376 +0,0 @@ -TRACE_GL_VOID(glActiveTexture, (GLenum texture), (texture), 1, "GLenum", texture) -TRACE_GL_VOID(glAlphaFunc, (GLenum func, GLclampf ref), (func, ref), 2, "GLenum", func, "GLclampf", ref) -TRACE_GL_VOID(glAlphaFuncx, (GLenum func, GLclampx ref), (func, ref), 2, "GLenum", func, "GLclampx", ref) -TRACE_GL_VOID(glAlphaFuncxOES, (GLenum func, GLclampx ref), (func, ref), 2, "GLenum", func, "GLclampx", ref) -TRACE_GL_VOID(glAttachShader, (GLuint program, GLuint shader), (program, shader), 2, "GLuint", program, "GLuint", shader) -TRACE_GL_VOID(glBeginPerfMonitorAMD, (GLuint monitor), (monitor), 1, "GLuint", monitor) -TRACE_GL_VOID(glBindAttribLocation, (GLuint program, GLuint index, const GLchar* name), (program, index, name), 3, "GLuint", program, "GLuint", index, "const GLchar*", name) -TRACE_GL_VOID(glBindBuffer, (GLenum target, GLuint buffer), (target, buffer), 2, "GLenum", target, "GLuint", buffer) -TRACE_GL_VOID(glBindFramebuffer, (GLenum target, GLuint framebuffer), (target, framebuffer), 2, "GLenum", target, "GLuint", framebuffer) -TRACE_GL_VOID(glBindFramebufferOES, (GLenum target, GLuint framebuffer), (target, framebuffer), 2, "GLenum", target, "GLuint", framebuffer) -TRACE_GL_VOID(glBindRenderbuffer, (GLenum target, GLuint renderbuffer), (target, renderbuffer), 2, "GLenum", target, "GLuint", renderbuffer) -TRACE_GL_VOID(glBindRenderbufferOES, (GLenum target, GLuint renderbuffer), (target, renderbuffer), 2, "GLenum", target, "GLuint", renderbuffer) -TRACE_GL_VOID(glBindTexture, (GLenum target, GLuint texture), (target, texture), 2, "GLenum", target, "GLuint", texture) -TRACE_GL_VOID(glBindVertexArrayOES, (GLuint array), (array), 1, "GLuint", array) -TRACE_GL_VOID(glBlendColor, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha), (red, green, blue, alpha), 4, "GLclampf", red, "GLclampf", green, "GLclampf", blue, "GLclampf", alpha) -TRACE_GL_VOID(glBlendEquation, ( GLenum mode ), (mode), 1, "GLenum", mode) -TRACE_GL_VOID(glBlendEquationOES, (GLenum mode), (mode), 1, "GLenum", mode) -TRACE_GL_VOID(glBlendEquationSeparate, (GLenum modeRGB, GLenum modeAlpha), (modeRGB, modeAlpha), 2, "GLenum", modeRGB, "GLenum", modeAlpha) -TRACE_GL_VOID(glBlendEquationSeparateOES, (GLenum modeRGB, GLenum modeAlpha), (modeRGB, modeAlpha), 2, "GLenum", modeRGB, "GLenum", modeAlpha) -TRACE_GL_VOID(glBlendFunc, (GLenum sfactor, GLenum dfactor), (sfactor, dfactor), 2, "GLenum", sfactor, "GLenum", dfactor) -TRACE_GL_VOID(glBlendFuncSeparate, (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha), (srcRGB, dstRGB, srcAlpha, dstAlpha), 4, "GLenum", srcRGB, "GLenum", dstRGB, "GLenum", srcAlpha, "GLenum", dstAlpha) -TRACE_GL_VOID(glBlendFuncSeparateOES, (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha), (srcRGB, dstRGB, srcAlpha, dstAlpha), 4, "GLenum", srcRGB, "GLenum", dstRGB, "GLenum", srcAlpha, "GLenum", dstAlpha) -TRACE_GL_VOID(glBufferData, (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage), (target, size, data, usage), 4, "GLenum", target, "GLsizeiptr", size, "const GLvoid *", data, "GLenum", usage) -TRACE_GL_VOID(glBufferSubData, (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data), (target, offset, size, data), 4, "GLenum", target, "GLintptr", offset, "GLsizeiptr", size, "const GLvoid *", data) -TRACE_GL(GLenum, glCheckFramebufferStatus, (GLenum target), (target), 1, "GLenum", target) -TRACE_GL(GLenum, glCheckFramebufferStatusOES, (GLenum target), (target), 1, "GLenum", target) -TRACE_GL_VOID(glClear, (GLbitfield mask), (mask), 1, "GLbitfield", mask) -TRACE_GL_VOID(glClearColor, (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha), (red, green, blue, alpha), 4, "GLclampf", red, "GLclampf", green, "GLclampf", blue, "GLclampf", alpha) -TRACE_GL_VOID(glClearColorx, (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha), (red, green, blue, alpha), 4, "GLclampx", red, "GLclampx", green, "GLclampx", blue, "GLclampx", alpha) -TRACE_GL_VOID(glClearColorxOES, (GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha), (red, green, blue, alpha), 4, "GLclampx", red, "GLclampx", green, "GLclampx", blue, "GLclampx", alpha) -TRACE_GL_VOID(glClearDepthf, (GLclampf depth), (depth), 1, "GLclampf", depth) -TRACE_GL_VOID(glClearDepthfOES, (GLclampf depth), (depth), 1, "GLclampf", depth) -TRACE_GL_VOID(glClearDepthx, (GLclampx depth), (depth), 1, "GLclampx", depth) -TRACE_GL_VOID(glClearDepthxOES, (GLclampx depth), (depth), 1, "GLclampx", depth) -TRACE_GL_VOID(glClearStencil, (GLint s), (s), 1, "GLint", s) -TRACE_GL_VOID(glClientActiveTexture, (GLenum texture), (texture), 1, "GLenum", texture) -TRACE_GL_VOID(glClipPlanef, (GLenum plane, const GLfloat *equation), (plane, equation), 2, "GLenum", plane, "const GLfloat *", equation) -TRACE_GL_VOID(glClipPlanefIMG, (GLenum p, const GLfloat *eqn), (p, eqn), 2, "GLenum", p, "const GLfloat *", eqn) -TRACE_GL_VOID(glClipPlanefOES, (GLenum plane, const GLfloat *equation), (plane, equation), 2, "GLenum", plane, "const GLfloat *", equation) -TRACE_GL_VOID(glClipPlanex, (GLenum plane, const GLfixed *equation), (plane, equation), 2, "GLenum", plane, "const GLfixed *", equation) -TRACE_GL_VOID(glClipPlanexIMG, (GLenum p, const GLfixed *eqn), (p, eqn), 2, "GLenum", p, "const GLfixed *", eqn) -TRACE_GL_VOID(glClipPlanexOES, (GLenum plane, const GLfixed *equation), (plane, equation), 2, "GLenum", plane, "const GLfixed *", equation) -TRACE_GL_VOID(glColor4f, (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha), (red, green, blue, alpha), 4, "GLfloat", red, "GLfloat", green, "GLfloat", blue, "GLfloat", alpha) -TRACE_GL_VOID(glColor4ub, (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha), (red, green, blue, alpha), 4, "GLubyte", red, "GLubyte", green, "GLubyte", blue, "GLubyte", alpha) -TRACE_GL_VOID(glColor4x, (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha), (red, green, blue, alpha), 4, "GLfixed", red, "GLfixed", green, "GLfixed", blue, "GLfixed", alpha) -TRACE_GL_VOID(glColor4xOES, (GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha), (red, green, blue, alpha), 4, "GLfixed", red, "GLfixed", green, "GLfixed", blue, "GLfixed", alpha) -TRACE_GL_VOID(glColorMask, (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha), (red, green, blue, alpha), 4, "GLboolean", red, "GLboolean", green, "GLboolean", blue, "GLboolean", alpha) -TRACE_GL_VOID(glColorPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer) -TRACE_GL_VOID(glCompileShader, (GLuint shader), (shader), 1, "GLuint", shader) -TRACE_GL_VOID(glCompressedTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data), (target, level, internalformat, width, height, border, imageSize, data), 8, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLint", border, "GLsizei", imageSize, "const GLvoid *", data) -TRACE_GL_VOID(glCompressedTexImage3DOES, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data), (target, level, internalformat, width, height, depth, border, imageSize, data), 9, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLint", border, "GLsizei", imageSize, "const GLvoid*", data) -TRACE_GL_VOID(glCompressedTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data), (target, level, xoffset, yoffset, width, height, format, imageSize, data), 9, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLsizei", width, "GLsizei", height, "GLenum", format, "GLsizei", imageSize, "const GLvoid *", data) -TRACE_GL_VOID(glCompressedTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLsizei", imageSize, "const GLvoid*", data) -TRACE_GL_VOID(glCopyTexImage2D, (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border), (target, level, internalformat, x, y, width, height, border), 8, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height, "GLint", border) -TRACE_GL_VOID(glCopyTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height), (target, level, xoffset, yoffset, x, y, width, height), 8, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height) -TRACE_GL_VOID(glCopyTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height), (target, level, xoffset, yoffset, zoffset, x, y, width, height), 9, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height) -TRACE_GL_VOID(glCoverageMaskNV, (GLboolean mask), (mask), 1, "GLboolean", mask) -TRACE_GL_VOID(glCoverageOperationNV, (GLenum operation), (operation), 1, "GLenum", operation) -TRACE_GL(GLuint, glCreateProgram, (void), (), 0) -TRACE_GL(GLuint, glCreateShader, (GLenum type), (type), 1, "GLenum", type) -TRACE_GL_VOID(glCullFace, (GLenum mode), (mode), 1, "GLenum", mode) -TRACE_GL_VOID(glCurrentPaletteMatrixOES, (GLuint matrixpaletteindex), (matrixpaletteindex), 1, "GLuint", matrixpaletteindex) -TRACE_GL_VOID(glDeleteBuffers, (GLsizei n, const GLuint *buffers), (n, buffers), 2, "GLsizei", n, "const GLuint *", buffers) -TRACE_GL_VOID(glDeleteFencesNV, (GLsizei n, const GLuint *fences), (n, fences), 2, "GLsizei", n, "const GLuint *", fences) -TRACE_GL_VOID(glDeleteFramebuffers, (GLsizei n, const GLuint* framebuffers), (n, framebuffers), 2, "GLsizei", n, "const GLuint*", framebuffers) -TRACE_GL_VOID(glDeleteFramebuffersOES, (GLsizei n, const GLuint* framebuffers), (n, framebuffers), 2, "GLsizei", n, "const GLuint*", framebuffers) -TRACE_GL_VOID(glDeletePerfMonitorsAMD, (GLsizei n, GLuint *monitors), (n, monitors), 2, "GLsizei", n, "GLuint *", monitors) -TRACE_GL_VOID(glDeleteProgram, (GLuint program), (program), 1, "GLuint", program) -TRACE_GL_VOID(glDeleteRenderbuffers, (GLsizei n, const GLuint* renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "const GLuint*", renderbuffers) -TRACE_GL_VOID(glDeleteRenderbuffersOES, (GLsizei n, const GLuint* renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "const GLuint*", renderbuffers) -TRACE_GL_VOID(glDeleteShader, (GLuint shader), (shader), 1, "GLuint", shader) -TRACE_GL_VOID(glDeleteTextures, (GLsizei n, const GLuint *textures), (n, textures), 2, "GLsizei", n, "const GLuint *", textures) -TRACE_GL_VOID(glDeleteVertexArraysOES, (GLsizei n, const GLuint *arrays), (n, arrays), 2, "GLsizei", n, "const GLuint *", arrays) -TRACE_GL_VOID(glDepthFunc, (GLenum func), (func), 1, "GLenum", func) -TRACE_GL_VOID(glDepthMask, (GLboolean flag), (flag), 1, "GLboolean", flag) -TRACE_GL_VOID(glDepthRangef, (GLclampf zNear, GLclampf zFar), (zNear, zFar), 2, "GLclampf", zNear, "GLclampf", zFar) -TRACE_GL_VOID(glDepthRangefOES, (GLclampf zNear, GLclampf zFar), (zNear, zFar), 2, "GLclampf", zNear, "GLclampf", zFar) -TRACE_GL_VOID(glDepthRangex, (GLclampx zNear, GLclampx zFar), (zNear, zFar), 2, "GLclampx", zNear, "GLclampx", zFar) -TRACE_GL_VOID(glDepthRangexOES, (GLclampx zNear, GLclampx zFar), (zNear, zFar), 2, "GLclampx", zNear, "GLclampx", zFar) -TRACE_GL_VOID(glDetachShader, (GLuint program, GLuint shader), (program, shader), 2, "GLuint", program, "GLuint", shader) -TRACE_GL_VOID(glDisable, (GLenum cap), (cap), 1, "GLenum", cap) -TRACE_GL_VOID(glDisableClientState, (GLenum array), (array), 1, "GLenum", array) -TRACE_GL_VOID(glDisableDriverControlQCOM, (GLuint driverControl), (driverControl), 1, "GLuint", driverControl) -TRACE_GL_VOID(glDisableVertexAttribArray, (GLuint index), (index), 1, "GLuint", index) -TRACE_GL_VOID(glDiscardFramebufferEXT, (GLenum target, GLsizei numAttachments, const GLenum *attachments), (target, numAttachments, attachments), 3, "GLenum", target, "GLsizei", numAttachments, "const GLenum *", attachments) -TRACE_GL_VOID(glDrawArrays, (GLenum mode, GLint first, GLsizei count), (mode, first, count), 3, "GLenum", mode, "GLint", first, "GLsizei", count) -TRACE_GL_VOID(glDrawElements, (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices), (mode, count, type, indices), 4, "GLenum", mode, "GLsizei", count, "GLenum", type, "const GLvoid *", indices) -TRACE_GL_VOID(glDrawTexfOES, (GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height), (x, y, z, width, height), 5, "GLfloat", x, "GLfloat", y, "GLfloat", z, "GLfloat", width, "GLfloat", height) -TRACE_GL_VOID(glDrawTexfvOES, (const GLfloat *coords), (coords), 1, "const GLfloat *", coords) -TRACE_GL_VOID(glDrawTexiOES, (GLint x, GLint y, GLint z, GLint width, GLint height), (x, y, z, width, height), 5, "GLint", x, "GLint", y, "GLint", z, "GLint", width, "GLint", height) -TRACE_GL_VOID(glDrawTexivOES, (const GLint *coords), (coords), 1, "const GLint *", coords) -TRACE_GL_VOID(glDrawTexsOES, (GLshort x, GLshort y, GLshort z, GLshort width, GLshort height), (x, y, z, width, height), 5, "GLshort", x, "GLshort", y, "GLshort", z, "GLshort", width, "GLshort", height) -TRACE_GL_VOID(glDrawTexsvOES, (const GLshort *coords), (coords), 1, "const GLshort *", coords) -TRACE_GL_VOID(glDrawTexxOES, (GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height), (x, y, z, width, height), 5, "GLfixed", x, "GLfixed", y, "GLfixed", z, "GLfixed", width, "GLfixed", height) -TRACE_GL_VOID(glDrawTexxvOES, (const GLfixed *coords), (coords), 1, "const GLfixed *", coords) -TRACE_GL_VOID(glEGLImageTargetRenderbufferStorageOES, (GLenum target, GLeglImageOES image), (target, image), 2, "GLenum", target, "GLeglImageOES", image) -TRACE_GL_VOID(glEGLImageTargetTexture2DOES, (GLenum target, GLeglImageOES image), (target, image), 2, "GLenum", target, "GLeglImageOES", image) -TRACE_GL_VOID(glEnable, (GLenum cap), (cap), 1, "GLenum", cap) -TRACE_GL_VOID(glEnableClientState, (GLenum array), (array), 1, "GLenum", array) -TRACE_GL_VOID(glEnableDriverControlQCOM, (GLuint driverControl), (driverControl), 1, "GLuint", driverControl) -TRACE_GL_VOID(glEnableVertexAttribArray, (GLuint index), (index), 1, "GLuint", index) -TRACE_GL_VOID(glEndPerfMonitorAMD, (GLuint monitor), (monitor), 1, "GLuint", monitor) -TRACE_GL_VOID(glEndTilingQCOM, (GLbitfield preserveMask), (preserveMask), 1, "GLbitfield", preserveMask) -TRACE_GL_VOID(glExtGetBufferPointervQCOM, (GLenum target, GLvoid **params), (target, params), 2, "GLenum", target, "GLvoid **", params) -TRACE_GL_VOID(glExtGetBuffersQCOM, (GLuint *buffers, GLint maxBuffers, GLint *numBuffers), (buffers, maxBuffers, numBuffers), 3, "GLuint *", buffers, "GLint", maxBuffers, "GLint *", numBuffers) -TRACE_GL_VOID(glExtGetFramebuffersQCOM, (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers), (framebuffers, maxFramebuffers, numFramebuffers), 3, "GLuint *", framebuffers, "GLint", maxFramebuffers, "GLint *", numFramebuffers) -TRACE_GL_VOID(glExtGetProgramBinarySourceQCOM, (GLuint program, GLenum shadertype, GLchar *source, GLint *length), (program, shadertype, source, length), 4, "GLuint", program, "GLenum", shadertype, "GLchar *", source, "GLint *", length) -TRACE_GL_VOID(glExtGetProgramsQCOM, (GLuint *programs, GLint maxPrograms, GLint *numPrograms), (programs, maxPrograms, numPrograms), 3, "GLuint *", programs, "GLint", maxPrograms, "GLint *", numPrograms) -TRACE_GL_VOID(glExtGetRenderbuffersQCOM, (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers), (renderbuffers, maxRenderbuffers, numRenderbuffers), 3, "GLuint *", renderbuffers, "GLint", maxRenderbuffers, "GLint *", numRenderbuffers) -TRACE_GL_VOID(glExtGetShadersQCOM, (GLuint *shaders, GLint maxShaders, GLint *numShaders), (shaders, maxShaders, numShaders), 3, "GLuint *", shaders, "GLint", maxShaders, "GLint *", numShaders) -TRACE_GL_VOID(glExtGetTexLevelParameterivQCOM, (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params), (texture, face, level, pname, params), 5, "GLuint", texture, "GLenum", face, "GLint", level, "GLenum", pname, "GLint *", params) -TRACE_GL_VOID(glExtGetTexSubImageQCOM, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLenum", type, "GLvoid *", texels) -TRACE_GL_VOID(glExtGetTexturesQCOM, (GLuint *textures, GLint maxTextures, GLint *numTextures), (textures, maxTextures, numTextures), 3, "GLuint *", textures, "GLint", maxTextures, "GLint *", numTextures) -TRACE_GL(GLboolean, glExtIsProgramBinaryQCOM, (GLuint program), (program), 1, "GLuint", program) -TRACE_GL_VOID(glExtTexObjectStateOverrideiQCOM, (GLenum target, GLenum pname, GLint param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLint", param) -TRACE_GL_VOID(glFinish, (void), (), 0) -TRACE_GL_VOID(glFinishFenceNV, (GLuint fence), (fence), 1, "GLuint", fence) -TRACE_GL_VOID(glFlush, (void), (), 0) -TRACE_GL_VOID(glFogf, (GLenum pname, GLfloat param), (pname, param), 2, "GLenum", pname, "GLfloat", param) -TRACE_GL_VOID(glFogfv, (GLenum pname, const GLfloat *params), (pname, params), 2, "GLenum", pname, "const GLfloat *", params) -TRACE_GL_VOID(glFogx, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glFogxOES, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glFogxv, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glFogxvOES, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glFramebufferRenderbuffer, (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer), (target, attachment, renderbuffertarget, renderbuffer), 4, "GLenum", target, "GLenum", attachment, "GLenum", renderbuffertarget, "GLuint", renderbuffer) -TRACE_GL_VOID(glFramebufferRenderbufferOES, (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer), (target, attachment, renderbuffertarget, renderbuffer), 4, "GLenum", target, "GLenum", attachment, "GLenum", renderbuffertarget, "GLuint", renderbuffer) -TRACE_GL_VOID(glFramebufferTexture2D, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level), (target, attachment, textarget, texture, level), 5, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level) -TRACE_GL_VOID(glFramebufferTexture2DMultisampleIMG, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples), (target, attachment, textarget, texture, level, samples), 6, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level, "GLsizei", samples) -TRACE_GL_VOID(glFramebufferTexture2DOES, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level), (target, attachment, textarget, texture, level), 5, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level) -TRACE_GL_VOID(glFramebufferTexture3DOES, (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset), (target, attachment, textarget, texture, level, zoffset), 6, "GLenum", target, "GLenum", attachment, "GLenum", textarget, "GLuint", texture, "GLint", level, "GLint", zoffset) -TRACE_GL_VOID(glFrontFace, (GLenum mode), (mode), 1, "GLenum", mode) -TRACE_GL_VOID(glFrustumf, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar) -TRACE_GL_VOID(glFrustumfOES, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar) -TRACE_GL_VOID(glFrustumx, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar) -TRACE_GL_VOID(glFrustumxOES, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar) -TRACE_GL_VOID(glGenBuffers, (GLsizei n, GLuint *buffers), (n, buffers), 2, "GLsizei", n, "GLuint *", buffers) -TRACE_GL_VOID(glGenFencesNV, (GLsizei n, GLuint *fences), (n, fences), 2, "GLsizei", n, "GLuint *", fences) -TRACE_GL_VOID(glGenFramebuffers, (GLsizei n, GLuint* framebuffers), (n, framebuffers), 2, "GLsizei", n, "GLuint*", framebuffers) -TRACE_GL_VOID(glGenFramebuffersOES, (GLsizei n, GLuint* framebuffers), (n, framebuffers), 2, "GLsizei", n, "GLuint*", framebuffers) -TRACE_GL_VOID(glGenPerfMonitorsAMD, (GLsizei n, GLuint *monitors), (n, monitors), 2, "GLsizei", n, "GLuint *", monitors) -TRACE_GL_VOID(glGenRenderbuffers, (GLsizei n, GLuint* renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "GLuint*", renderbuffers) -TRACE_GL_VOID(glGenRenderbuffersOES, (GLsizei n, GLuint* renderbuffers), (n, renderbuffers), 2, "GLsizei", n, "GLuint*", renderbuffers) -TRACE_GL_VOID(glGenTextures, (GLsizei n, GLuint *textures), (n, textures), 2, "GLsizei", n, "GLuint *", textures) -TRACE_GL_VOID(glGenVertexArraysOES, (GLsizei n, GLuint *arrays), (n, arrays), 2, "GLsizei", n, "GLuint *", arrays) -TRACE_GL_VOID(glGenerateMipmap, (GLenum target), (target), 1, "GLenum", target) -TRACE_GL_VOID(glGenerateMipmapOES, (GLenum target), (target), 1, "GLenum", target) -TRACE_GL_VOID(glGetActiveAttrib, (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name), (program, index, bufsize, length, size, type, name), 7, "GLuint", program, "GLuint", index, "GLsizei", bufsize, "GLsizei*", length, "GLint*", size, "GLenum*", type, "GLchar*", name) -TRACE_GL_VOID(glGetActiveUniform, (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name), (program, index, bufsize, length, size, type, name), 7, "GLuint", program, "GLuint", index, "GLsizei", bufsize, "GLsizei*", length, "GLint*", size, "GLenum*", type, "GLchar*", name) -TRACE_GL_VOID(glGetAttachedShaders, (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders), (program, maxcount, count, shaders), 4, "GLuint", program, "GLsizei", maxcount, "GLsizei*", count, "GLuint*", shaders) -TRACE_GL(int, glGetAttribLocation, (GLuint program, const GLchar* name), (program, name), 2, "GLuint", program, "const GLchar*", name) -TRACE_GL_VOID(glGetBooleanv, (GLenum pname, GLboolean *params), (pname, params), 2, "GLenum", pname, "GLboolean *", params) -TRACE_GL_VOID(glGetBufferParameteriv, (GLenum target, GLenum pname, GLint *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint *", params) -TRACE_GL_VOID(glGetBufferPointervOES, (GLenum target, GLenum pname, GLvoid ** params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLvoid **", params) -TRACE_GL_VOID(glGetClipPlanef, (GLenum pname, GLfloat eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfloat", eqn) -TRACE_GL_VOID(glGetClipPlanefOES, (GLenum pname, GLfloat eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfloat", eqn) -TRACE_GL_VOID(glGetClipPlanex, (GLenum pname, GLfixed eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfixed", eqn) -TRACE_GL_VOID(glGetClipPlanexOES, (GLenum pname, GLfixed eqn[4]), (pname, eqn), 2, "GLenum", pname, "GLfixed", eqn) -TRACE_GL_VOID(glGetDriverControlStringQCOM, (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString), (driverControl, bufSize, length, driverControlString), 4, "GLuint", driverControl, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", driverControlString) -TRACE_GL_VOID(glGetDriverControlsQCOM, (GLint *num, GLsizei size, GLuint *driverControls), (num, size, driverControls), 3, "GLint *", num, "GLsizei", size, "GLuint *", driverControls) -TRACE_GL(GLenum, glGetError, (void), (), 0) -TRACE_GL_VOID(glGetFenceivNV, (GLuint fence, GLenum pname, GLint *params), (fence, pname, params), 3, "GLuint", fence, "GLenum", pname, "GLint *", params) -TRACE_GL_VOID(glGetFixedv, (GLenum pname, GLfixed *params), (pname, params), 2, "GLenum", pname, "GLfixed *", params) -TRACE_GL_VOID(glGetFixedvOES, (GLenum pname, GLfixed *params), (pname, params), 2, "GLenum", pname, "GLfixed *", params) -TRACE_GL_VOID(glGetFloatv, (GLenum pname, GLfloat *params), (pname, params), 2, "GLenum", pname, "GLfloat *", params) -TRACE_GL_VOID(glGetFramebufferAttachmentParameteriv, (GLenum target, GLenum attachment, GLenum pname, GLint* params), (target, attachment, pname, params), 4, "GLenum", target, "GLenum", attachment, "GLenum", pname, "GLint*", params) -TRACE_GL_VOID(glGetFramebufferAttachmentParameterivOES, (GLenum target, GLenum attachment, GLenum pname, GLint* params), (target, attachment, pname, params), 4, "GLenum", target, "GLenum", attachment, "GLenum", pname, "GLint*", params) -TRACE_GL_VOID(glGetIntegerv, (GLenum pname, GLint *params), (pname, params), 2, "GLenum", pname, "GLint *", params) -TRACE_GL_VOID(glGetLightfv, (GLenum light, GLenum pname, GLfloat *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfloat *", params) -TRACE_GL_VOID(glGetLightxv, (GLenum light, GLenum pname, GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfixed *", params) -TRACE_GL_VOID(glGetLightxvOES, (GLenum light, GLenum pname, GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "GLfixed *", params) -TRACE_GL_VOID(glGetMaterialfv, (GLenum face, GLenum pname, GLfloat *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfloat *", params) -TRACE_GL_VOID(glGetMaterialxv, (GLenum face, GLenum pname, GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfixed *", params) -TRACE_GL_VOID(glGetMaterialxvOES, (GLenum face, GLenum pname, GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "GLfixed *", params) -TRACE_GL_VOID(glGetPerfMonitorCounterDataAMD, (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten), (monitor, pname, dataSize, data, bytesWritten), 5, "GLuint", monitor, "GLenum", pname, "GLsizei", dataSize, "GLuint *", data, "GLint *", bytesWritten) -TRACE_GL_VOID(glGetPerfMonitorCounterInfoAMD, (GLuint group, GLuint counter, GLenum pname, GLvoid *data), (group, counter, pname, data), 4, "GLuint", group, "GLuint", counter, "GLenum", pname, "GLvoid *", data) -TRACE_GL_VOID(glGetPerfMonitorCounterStringAMD, (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString), (group, counter, bufSize, length, counterString), 5, "GLuint", group, "GLuint", counter, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", counterString) -TRACE_GL_VOID(glGetPerfMonitorCountersAMD, (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters), (group, numCounters, maxActiveCounters, counterSize, counters), 5, "GLuint", group, "GLint *", numCounters, "GLint *", maxActiveCounters, "GLsizei", counterSize, "GLuint *", counters) -TRACE_GL_VOID(glGetPerfMonitorGroupStringAMD, (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString), (group, bufSize, length, groupString), 4, "GLuint", group, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", groupString) -TRACE_GL_VOID(glGetPerfMonitorGroupsAMD, (GLint *numGroups, GLsizei groupsSize, GLuint *groups), (numGroups, groupsSize, groups), 3, "GLint *", numGroups, "GLsizei", groupsSize, "GLuint *", groups) -TRACE_GL_VOID(glGetPointerv, (GLenum pname, GLvoid **params), (pname, params), 2, "GLenum", pname, "GLvoid **", params) -TRACE_GL_VOID(glGetProgramBinaryOES, (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary), (program, bufSize, length, binaryFormat, binary), 5, "GLuint", program, "GLsizei", bufSize, "GLsizei *", length, "GLenum *", binaryFormat, "GLvoid *", binary) -TRACE_GL_VOID(glGetProgramInfoLog, (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog), (program, bufsize, length, infolog), 4, "GLuint", program, "GLsizei", bufsize, "GLsizei*", length, "GLchar*", infolog) -TRACE_GL_VOID(glGetProgramiv, (GLuint program, GLenum pname, GLint* params), (program, pname, params), 3, "GLuint", program, "GLenum", pname, "GLint*", params) -TRACE_GL_VOID(glGetRenderbufferParameteriv, (GLenum target, GLenum pname, GLint* params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint*", params) -TRACE_GL_VOID(glGetRenderbufferParameterivOES, (GLenum target, GLenum pname, GLint* params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint*", params) -TRACE_GL_VOID(glGetShaderInfoLog, (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog), (shader, bufsize, length, infolog), 4, "GLuint", shader, "GLsizei", bufsize, "GLsizei*", length, "GLchar*", infolog) -TRACE_GL_VOID(glGetShaderPrecisionFormat, (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision), (shadertype, precisiontype, range, precision), 4, "GLenum", shadertype, "GLenum", precisiontype, "GLint*", range, "GLint*", precision) -TRACE_GL_VOID(glGetShaderSource, (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source), (shader, bufsize, length, source), 4, "GLuint", shader, "GLsizei", bufsize, "GLsizei*", length, "GLchar*", source) -TRACE_GL_VOID(glGetShaderiv, (GLuint shader, GLenum pname, GLint* params), (shader, pname, params), 3, "GLuint", shader, "GLenum", pname, "GLint*", params) -TRACE_GL(const GLubyte *, glGetString, (GLenum name), (name), 1, "GLenum", name) -TRACE_GL_VOID(glGetTexEnvfv, (GLenum env, GLenum pname, GLfloat *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLfloat *", params) -TRACE_GL_VOID(glGetTexEnviv, (GLenum env, GLenum pname, GLint *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLint *", params) -TRACE_GL_VOID(glGetTexEnvxv, (GLenum env, GLenum pname, GLfixed *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLfixed *", params) -TRACE_GL_VOID(glGetTexEnvxvOES, (GLenum env, GLenum pname, GLfixed *params), (env, pname, params), 3, "GLenum", env, "GLenum", pname, "GLfixed *", params) -TRACE_GL_VOID(glGetTexGenfvOES, (GLenum coord, GLenum pname, GLfloat *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "GLfloat *", params) -TRACE_GL_VOID(glGetTexGenivOES, (GLenum coord, GLenum pname, GLint *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "GLint *", params) -TRACE_GL_VOID(glGetTexGenxvOES, (GLenum coord, GLenum pname, GLfixed *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "GLfixed *", params) -TRACE_GL_VOID(glGetTexParameterfv, (GLenum target, GLenum pname, GLfloat *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLfloat *", params) -TRACE_GL_VOID(glGetTexParameteriv, (GLenum target, GLenum pname, GLint *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint *", params) -TRACE_GL_VOID(glGetTexParameterxv, (GLenum target, GLenum pname, GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLfixed *", params) -TRACE_GL_VOID(glGetTexParameterxvOES, (GLenum target, GLenum pname, GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLfixed *", params) -TRACE_GL(int, glGetUniformLocation, (GLuint program, const GLchar* name), (program, name), 2, "GLuint", program, "const GLchar*", name) -TRACE_GL_VOID(glGetUniformfv, (GLuint program, GLint location, GLfloat* params), (program, location, params), 3, "GLuint", program, "GLint", location, "GLfloat*", params) -TRACE_GL_VOID(glGetUniformiv, (GLuint program, GLint location, GLint* params), (program, location, params), 3, "GLuint", program, "GLint", location, "GLint*", params) -TRACE_GL_VOID(glGetVertexAttribPointerv, (GLuint index, GLenum pname, GLvoid** pointer), (index, pname, pointer), 3, "GLuint", index, "GLenum", pname, "GLvoid**", pointer) -TRACE_GL_VOID(glGetVertexAttribfv, (GLuint index, GLenum pname, GLfloat* params), (index, pname, params), 3, "GLuint", index, "GLenum", pname, "GLfloat*", params) -TRACE_GL_VOID(glGetVertexAttribiv, (GLuint index, GLenum pname, GLint* params), (index, pname, params), 3, "GLuint", index, "GLenum", pname, "GLint*", params) -TRACE_GL_VOID(glHint, (GLenum target, GLenum mode), (target, mode), 2, "GLenum", target, "GLenum", mode) -TRACE_GL(GLboolean, glIsBuffer, (GLuint buffer), (buffer), 1, "GLuint", buffer) -TRACE_GL(GLboolean, glIsEnabled, (GLenum cap), (cap), 1, "GLenum", cap) -TRACE_GL(GLboolean, glIsFenceNV, (GLuint fence), (fence), 1, "GLuint", fence) -TRACE_GL(GLboolean, glIsFramebuffer, (GLuint framebuffer), (framebuffer), 1, "GLuint", framebuffer) -TRACE_GL(GLboolean, glIsFramebufferOES, (GLuint framebuffer), (framebuffer), 1, "GLuint", framebuffer) -TRACE_GL(GLboolean, glIsProgram, (GLuint program), (program), 1, "GLuint", program) -TRACE_GL(GLboolean, glIsRenderbuffer, (GLuint renderbuffer), (renderbuffer), 1, "GLuint", renderbuffer) -TRACE_GL(GLboolean, glIsRenderbufferOES, (GLuint renderbuffer), (renderbuffer), 1, "GLuint", renderbuffer) -TRACE_GL(GLboolean, glIsShader, (GLuint shader), (shader), 1, "GLuint", shader) -TRACE_GL(GLboolean, glIsTexture, (GLuint texture), (texture), 1, "GLuint", texture) -TRACE_GL(GLboolean, glIsVertexArrayOES, (GLuint array), (array), 1, "GLuint", array) -TRACE_GL_VOID(glLightModelf, (GLenum pname, GLfloat param), (pname, param), 2, "GLenum", pname, "GLfloat", param) -TRACE_GL_VOID(glLightModelfv, (GLenum pname, const GLfloat *params), (pname, params), 2, "GLenum", pname, "const GLfloat *", params) -TRACE_GL_VOID(glLightModelx, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glLightModelxOES, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glLightModelxv, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glLightModelxvOES, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glLightf, (GLenum light, GLenum pname, GLfloat param), (light, pname, param), 3, "GLenum", light, "GLenum", pname, "GLfloat", param) -TRACE_GL_VOID(glLightfv, (GLenum light, GLenum pname, const GLfloat *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "const GLfloat *", params) -TRACE_GL_VOID(glLightx, (GLenum light, GLenum pname, GLfixed param), (light, pname, param), 3, "GLenum", light, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glLightxOES, (GLenum light, GLenum pname, GLfixed param), (light, pname, param), 3, "GLenum", light, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glLightxv, (GLenum light, GLenum pname, const GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glLightxvOES, (GLenum light, GLenum pname, const GLfixed *params), (light, pname, params), 3, "GLenum", light, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glLineWidth, (GLfloat width), (width), 1, "GLfloat", width) -TRACE_GL_VOID(glLineWidthx, (GLfixed width), (width), 1, "GLfixed", width) -TRACE_GL_VOID(glLineWidthxOES, (GLfixed width), (width), 1, "GLfixed", width) -TRACE_GL_VOID(glLinkProgram, (GLuint program), (program), 1, "GLuint", program) -TRACE_GL_VOID(glLoadIdentity, (void), (), 0) -TRACE_GL_VOID(glLoadMatrixf, (const GLfloat *m), (m), 1, "const GLfloat *", m) -TRACE_GL_VOID(glLoadMatrixx, (const GLfixed *m), (m), 1, "const GLfixed *", m) -TRACE_GL_VOID(glLoadMatrixxOES, (const GLfixed *m), (m), 1, "const GLfixed *", m) -TRACE_GL_VOID(glLoadPaletteFromModelViewMatrixOES, (void), (), 0) -TRACE_GL_VOID(glLogicOp, (GLenum opcode), (opcode), 1, "GLenum", opcode) -TRACE_GL(void*, glMapBufferOES, (GLenum target, GLenum access), (target, access), 2, "GLenum", target, "GLenum", access) -TRACE_GL_VOID(glMaterialf, (GLenum face, GLenum pname, GLfloat param), (face, pname, param), 3, "GLenum", face, "GLenum", pname, "GLfloat", param) -TRACE_GL_VOID(glMaterialfv, (GLenum face, GLenum pname, const GLfloat *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "const GLfloat *", params) -TRACE_GL_VOID(glMaterialx, (GLenum face, GLenum pname, GLfixed param), (face, pname, param), 3, "GLenum", face, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glMaterialxOES, (GLenum face, GLenum pname, GLfixed param), (face, pname, param), 3, "GLenum", face, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glMaterialxv, (GLenum face, GLenum pname, const GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glMaterialxvOES, (GLenum face, GLenum pname, const GLfixed *params), (face, pname, params), 3, "GLenum", face, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glMatrixIndexPointerOES, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer) -TRACE_GL_VOID(glMatrixMode, (GLenum mode), (mode), 1, "GLenum", mode) -TRACE_GL_VOID(glMultMatrixf, (const GLfloat *m), (m), 1, "const GLfloat *", m) -TRACE_GL_VOID(glMultMatrixx, (const GLfixed *m), (m), 1, "const GLfixed *", m) -TRACE_GL_VOID(glMultMatrixxOES, (const GLfixed *m), (m), 1, "const GLfixed *", m) -TRACE_GL_VOID(glMultiDrawArraysEXT, (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount), (mode, first, count, primcount), 4, "GLenum", mode, "GLint *", first, "GLsizei *", count, "GLsizei", primcount) -TRACE_GL_VOID(glMultiDrawElementsEXT, (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount), (mode, count, type, indices, primcount), 5, "GLenum", mode, "const GLsizei *", count, "GLenum", type, "const GLvoid* *", indices, "GLsizei", primcount) -TRACE_GL_VOID(glMultiTexCoord4f, (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q), (target, s, t, r, q), 5, "GLenum", target, "GLfloat", s, "GLfloat", t, "GLfloat", r, "GLfloat", q) -TRACE_GL_VOID(glMultiTexCoord4x, (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q), (target, s, t, r, q), 5, "GLenum", target, "GLfixed", s, "GLfixed", t, "GLfixed", r, "GLfixed", q) -TRACE_GL_VOID(glMultiTexCoord4xOES, (GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q), (target, s, t, r, q), 5, "GLenum", target, "GLfixed", s, "GLfixed", t, "GLfixed", r, "GLfixed", q) -TRACE_GL_VOID(glNormal3f, (GLfloat nx, GLfloat ny, GLfloat nz), (nx, ny, nz), 3, "GLfloat", nx, "GLfloat", ny, "GLfloat", nz) -TRACE_GL_VOID(glNormal3x, (GLfixed nx, GLfixed ny, GLfixed nz), (nx, ny, nz), 3, "GLfixed", nx, "GLfixed", ny, "GLfixed", nz) -TRACE_GL_VOID(glNormal3xOES, (GLfixed nx, GLfixed ny, GLfixed nz), (nx, ny, nz), 3, "GLfixed", nx, "GLfixed", ny, "GLfixed", nz) -TRACE_GL_VOID(glNormalPointer, (GLenum type, GLsizei stride, const GLvoid *pointer), (type, stride, pointer), 3, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer) -TRACE_GL_VOID(glOrthof, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar) -TRACE_GL_VOID(glOrthofOES, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfloat", left, "GLfloat", right, "GLfloat", bottom, "GLfloat", top, "GLfloat", zNear, "GLfloat", zFar) -TRACE_GL_VOID(glOrthox, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar) -TRACE_GL_VOID(glOrthoxOES, (GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar), (left, right, bottom, top, zNear, zFar), 6, "GLfixed", left, "GLfixed", right, "GLfixed", bottom, "GLfixed", top, "GLfixed", zNear, "GLfixed", zFar) -TRACE_GL_VOID(glPixelStorei, (GLenum pname, GLint param), (pname, param), 2, "GLenum", pname, "GLint", param) -TRACE_GL_VOID(glPointParameterf, (GLenum pname, GLfloat param), (pname, param), 2, "GLenum", pname, "GLfloat", param) -TRACE_GL_VOID(glPointParameterfv, (GLenum pname, const GLfloat *params), (pname, params), 2, "GLenum", pname, "const GLfloat *", params) -TRACE_GL_VOID(glPointParameterx, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glPointParameterxOES, (GLenum pname, GLfixed param), (pname, param), 2, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glPointParameterxv, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glPointParameterxvOES, (GLenum pname, const GLfixed *params), (pname, params), 2, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glPointSize, (GLfloat size), (size), 1, "GLfloat", size) -TRACE_GL_VOID(glPointSizePointerOES, (GLenum type, GLsizei stride, const GLvoid *pointer), (type, stride, pointer), 3, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer) -TRACE_GL_VOID(glPointSizex, (GLfixed size), (size), 1, "GLfixed", size) -TRACE_GL_VOID(glPointSizexOES, (GLfixed size), (size), 1, "GLfixed", size) -TRACE_GL_VOID(glPolygonOffset, (GLfloat factor, GLfloat units), (factor, units), 2, "GLfloat", factor, "GLfloat", units) -TRACE_GL_VOID(glPolygonOffsetx, (GLfixed factor, GLfixed units), (factor, units), 2, "GLfixed", factor, "GLfixed", units) -TRACE_GL_VOID(glPolygonOffsetxOES, (GLfixed factor, GLfixed units), (factor, units), 2, "GLfixed", factor, "GLfixed", units) -TRACE_GL_VOID(glPopMatrix, (void), (), 0) -TRACE_GL_VOID(glProgramBinaryOES, (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length), (program, binaryFormat, binary, length), 4, "GLuint", program, "GLenum", binaryFormat, "const GLvoid *", binary, "GLint", length) -TRACE_GL_VOID(glPushMatrix, (void), (), 0) -TRACE_GL(GLbitfield, glQueryMatrixxOES, (GLfixed mantissa[16], GLint exponent[16]), (mantissa, exponent), 2, "GLfixed", mantissa, "GLint", exponent) -TRACE_GL_VOID(glReadPixels, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels), (x, y, width, height, format, type, pixels), 7, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height, "GLenum", format, "GLenum", type, "GLvoid *", pixels) -TRACE_GL_VOID(glReleaseShaderCompiler, (void), (), 0) -TRACE_GL_VOID(glRenderbufferStorage, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height), (target, internalformat, width, height), 4, "GLenum", target, "GLenum", internalformat, "GLsizei", width, "GLsizei", height) -TRACE_GL_VOID(glRenderbufferStorageMultisampleIMG, (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height), (target, samples, internalformat, width, height), 5, "GLenum", target, "GLsizei", samples, "GLenum", internalformat, "GLsizei", width, "GLsizei", height) -TRACE_GL_VOID(glRenderbufferStorageOES, (GLenum target, GLenum internalformat, GLsizei width, GLsizei height), (target, internalformat, width, height), 4, "GLenum", target, "GLenum", internalformat, "GLsizei", width, "GLsizei", height) -TRACE_GL_VOID(glRotatef, (GLfloat angle, GLfloat x, GLfloat y, GLfloat z), (angle, x, y, z), 4, "GLfloat", angle, "GLfloat", x, "GLfloat", y, "GLfloat", z) -TRACE_GL_VOID(glRotatex, (GLfixed angle, GLfixed x, GLfixed y, GLfixed z), (angle, x, y, z), 4, "GLfixed", angle, "GLfixed", x, "GLfixed", y, "GLfixed", z) -TRACE_GL_VOID(glRotatexOES, (GLfixed angle, GLfixed x, GLfixed y, GLfixed z), (angle, x, y, z), 4, "GLfixed", angle, "GLfixed", x, "GLfixed", y, "GLfixed", z) -TRACE_GL_VOID(glSampleCoverage, (GLclampf value, GLboolean invert), (value, invert), 2, "GLclampf", value, "GLboolean", invert) -TRACE_GL_VOID(glSampleCoveragex, (GLclampx value, GLboolean invert), (value, invert), 2, "GLclampx", value, "GLboolean", invert) -TRACE_GL_VOID(glSampleCoveragexOES, (GLclampx value, GLboolean invert), (value, invert), 2, "GLclampx", value, "GLboolean", invert) -TRACE_GL_VOID(glScalef, (GLfloat x, GLfloat y, GLfloat z), (x, y, z), 3, "GLfloat", x, "GLfloat", y, "GLfloat", z) -TRACE_GL_VOID(glScalex, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z) -TRACE_GL_VOID(glScalexOES, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z) -TRACE_GL_VOID(glScissor, (GLint x, GLint y, GLsizei width, GLsizei height), (x, y, width, height), 4, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height) -TRACE_GL_VOID(glSelectPerfMonitorCountersAMD, (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList), (monitor, enable, group, numCounters, countersList), 5, "GLuint", monitor, "GLboolean", enable, "GLuint", group, "GLint", numCounters, "GLuint *", countersList) -TRACE_GL_VOID(glSetFenceNV, (GLuint fence, GLenum condition), (fence, condition), 2, "GLuint", fence, "GLenum", condition) -TRACE_GL_VOID(glShadeModel, (GLenum mode), (mode), 1, "GLenum", mode) -TRACE_GL_VOID(glShaderBinary, (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length), (n, shaders, binaryformat, binary, length), 5, "GLsizei", n, "const GLuint*", shaders, "GLenum", binaryformat, "const GLvoid*", binary, "GLsizei", length) -TRACE_GL_VOID(glShaderSource, (GLuint shader, GLsizei count, const GLchar** string, const GLint* length), (shader, count, string, length), 4, "GLuint", shader, "GLsizei", count, "const GLchar**", string, "const GLint*", length) -TRACE_GL_VOID(glStartTilingQCOM, (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask), (x, y, width, height, preserveMask), 5, "GLuint", x, "GLuint", y, "GLuint", width, "GLuint", height, "GLbitfield", preserveMask) -TRACE_GL_VOID(glStencilFunc, (GLenum func, GLint ref, GLuint mask), (func, ref, mask), 3, "GLenum", func, "GLint", ref, "GLuint", mask) -TRACE_GL_VOID(glStencilFuncSeparate, (GLenum face, GLenum func, GLint ref, GLuint mask), (face, func, ref, mask), 4, "GLenum", face, "GLenum", func, "GLint", ref, "GLuint", mask) -TRACE_GL_VOID(glStencilMask, (GLuint mask), (mask), 1, "GLuint", mask) -TRACE_GL_VOID(glStencilMaskSeparate, (GLenum face, GLuint mask), (face, mask), 2, "GLenum", face, "GLuint", mask) -TRACE_GL_VOID(glStencilOp, (GLenum fail, GLenum zfail, GLenum zpass), (fail, zfail, zpass), 3, "GLenum", fail, "GLenum", zfail, "GLenum", zpass) -TRACE_GL_VOID(glStencilOpSeparate, (GLenum face, GLenum fail, GLenum zfail, GLenum zpass), (face, fail, zfail, zpass), 4, "GLenum", face, "GLenum", fail, "GLenum", zfail, "GLenum", zpass) -TRACE_GL(GLboolean, glTestFenceNV, (GLuint fence), (fence), 1, "GLuint", fence) -TRACE_GL_VOID(glTexCoordPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer) -TRACE_GL_VOID(glTexEnvf, (GLenum target, GLenum pname, GLfloat param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfloat", param) -TRACE_GL_VOID(glTexEnvfv, (GLenum target, GLenum pname, const GLfloat *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfloat *", params) -TRACE_GL_VOID(glTexEnvi, (GLenum target, GLenum pname, GLint param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLint", param) -TRACE_GL_VOID(glTexEnviv, (GLenum target, GLenum pname, const GLint *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLint *", params) -TRACE_GL_VOID(glTexEnvx, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glTexEnvxOES, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glTexEnvxv, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glTexEnvxvOES, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glTexGenfOES, (GLenum coord, GLenum pname, GLfloat param), (coord, pname, param), 3, "GLenum", coord, "GLenum", pname, "GLfloat", param) -TRACE_GL_VOID(glTexGenfvOES, (GLenum coord, GLenum pname, const GLfloat *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "const GLfloat *", params) -TRACE_GL_VOID(glTexGeniOES, (GLenum coord, GLenum pname, GLint param), (coord, pname, param), 3, "GLenum", coord, "GLenum", pname, "GLint", param) -TRACE_GL_VOID(glTexGenivOES, (GLenum coord, GLenum pname, const GLint *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "const GLint *", params) -TRACE_GL_VOID(glTexGenxOES, (GLenum coord, GLenum pname, GLfixed param), (coord, pname, param), 3, "GLenum", coord, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glTexGenxvOES, (GLenum coord, GLenum pname, const GLfixed *params), (coord, pname, params), 3, "GLenum", coord, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glTexImage2D, (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels), (target, level, internalformat, width, height, border, format, type, pixels), 9, "GLenum", target, "GLint", level, "GLint", internalformat, "GLsizei", width, "GLsizei", height, "GLint", border, "GLenum", format, "GLenum", type, "const GLvoid *", pixels) -TRACE_GL_VOID(glTexImage3DOES, (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels), (target, level, internalformat, width, height, depth, border, format, type, pixels), 10, "GLenum", target, "GLint", level, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLint", border, "GLenum", format, "GLenum", type, "const GLvoid*", pixels) -TRACE_GL_VOID(glTexParameterf, (GLenum target, GLenum pname, GLfloat param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfloat", param) -TRACE_GL_VOID(glTexParameterfv, (GLenum target, GLenum pname, const GLfloat *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfloat *", params) -TRACE_GL_VOID(glTexParameteri, (GLenum target, GLenum pname, GLint param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLint", param) -TRACE_GL_VOID(glTexParameteriv, (GLenum target, GLenum pname, const GLint *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLint *", params) -TRACE_GL_VOID(glTexParameterx, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glTexParameterxOES, (GLenum target, GLenum pname, GLfixed param), (target, pname, param), 3, "GLenum", target, "GLenum", pname, "GLfixed", param) -TRACE_GL_VOID(glTexParameterxv, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glTexParameterxvOES, (GLenum target, GLenum pname, const GLfixed *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "const GLfixed *", params) -TRACE_GL_VOID(glTexSubImage2D, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels), (target, level, xoffset, yoffset, width, height, format, type, pixels), 9, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLsizei", width, "GLsizei", height, "GLenum", format, "GLenum", type, "const GLvoid *", pixels) -TRACE_GL_VOID(glTexSubImage3DOES, (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels), (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels), 11, "GLenum", target, "GLint", level, "GLint", xoffset, "GLint", yoffset, "GLint", zoffset, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "GLenum", format, "GLenum", type, "const GLvoid*", pixels) -TRACE_GL_VOID(glTranslatef, (GLfloat x, GLfloat y, GLfloat z), (x, y, z), 3, "GLfloat", x, "GLfloat", y, "GLfloat", z) -TRACE_GL_VOID(glTranslatex, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z) -TRACE_GL_VOID(glTranslatexOES, (GLfixed x, GLfixed y, GLfixed z), (x, y, z), 3, "GLfixed", x, "GLfixed", y, "GLfixed", z) -TRACE_GL_VOID(glUniform1f, (GLint location, GLfloat x), (location, x), 2, "GLint", location, "GLfloat", x) -TRACE_GL_VOID(glUniform1fv, (GLint location, GLsizei count, const GLfloat* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLfloat*", v) -TRACE_GL_VOID(glUniform1i, (GLint location, GLint x), (location, x), 2, "GLint", location, "GLint", x) -TRACE_GL_VOID(glUniform1iv, (GLint location, GLsizei count, const GLint* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLint*", v) -TRACE_GL_VOID(glUniform2f, (GLint location, GLfloat x, GLfloat y), (location, x, y), 3, "GLint", location, "GLfloat", x, "GLfloat", y) -TRACE_GL_VOID(glUniform2fv, (GLint location, GLsizei count, const GLfloat* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLfloat*", v) -TRACE_GL_VOID(glUniform2i, (GLint location, GLint x, GLint y), (location, x, y), 3, "GLint", location, "GLint", x, "GLint", y) -TRACE_GL_VOID(glUniform2iv, (GLint location, GLsizei count, const GLint* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLint*", v) -TRACE_GL_VOID(glUniform3f, (GLint location, GLfloat x, GLfloat y, GLfloat z), (location, x, y, z), 4, "GLint", location, "GLfloat", x, "GLfloat", y, "GLfloat", z) -TRACE_GL_VOID(glUniform3fv, (GLint location, GLsizei count, const GLfloat* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLfloat*", v) -TRACE_GL_VOID(glUniform3i, (GLint location, GLint x, GLint y, GLint z), (location, x, y, z), 4, "GLint", location, "GLint", x, "GLint", y, "GLint", z) -TRACE_GL_VOID(glUniform3iv, (GLint location, GLsizei count, const GLint* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLint*", v) -TRACE_GL_VOID(glUniform4f, (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w), (location, x, y, z, w), 5, "GLint", location, "GLfloat", x, "GLfloat", y, "GLfloat", z, "GLfloat", w) -TRACE_GL_VOID(glUniform4fv, (GLint location, GLsizei count, const GLfloat* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLfloat*", v) -TRACE_GL_VOID(glUniform4i, (GLint location, GLint x, GLint y, GLint z, GLint w), (location, x, y, z, w), 5, "GLint", location, "GLint", x, "GLint", y, "GLint", z, "GLint", w) -TRACE_GL_VOID(glUniform4iv, (GLint location, GLsizei count, const GLint* v), (location, count, v), 3, "GLint", location, "GLsizei", count, "const GLint*", v) -TRACE_GL_VOID(glUniformMatrix2fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat*", value) -TRACE_GL_VOID(glUniformMatrix3fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat*", value) -TRACE_GL_VOID(glUniformMatrix4fv, (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value), (location, count, transpose, value), 4, "GLint", location, "GLsizei", count, "GLboolean", transpose, "const GLfloat*", value) -TRACE_GL(GLboolean, glUnmapBufferOES, (GLenum target), (target), 1, "GLenum", target) -TRACE_GL_VOID(glUseProgram, (GLuint program), (program), 1, "GLuint", program) -TRACE_GL_VOID(glValidateProgram, (GLuint program), (program), 1, "GLuint", program) -TRACE_GL_VOID(glVertexAttrib1f, (GLuint indx, GLfloat x), (indx, x), 2, "GLuint", indx, "GLfloat", x) -TRACE_GL_VOID(glVertexAttrib1fv, (GLuint indx, const GLfloat* values), (indx, values), 2, "GLuint", indx, "const GLfloat*", values) -TRACE_GL_VOID(glVertexAttrib2f, (GLuint indx, GLfloat x, GLfloat y), (indx, x, y), 3, "GLuint", indx, "GLfloat", x, "GLfloat", y) -TRACE_GL_VOID(glVertexAttrib2fv, (GLuint indx, const GLfloat* values), (indx, values), 2, "GLuint", indx, "const GLfloat*", values) -TRACE_GL_VOID(glVertexAttrib3f, (GLuint indx, GLfloat x, GLfloat y, GLfloat z), (indx, x, y, z), 4, "GLuint", indx, "GLfloat", x, "GLfloat", y, "GLfloat", z) -TRACE_GL_VOID(glVertexAttrib3fv, (GLuint indx, const GLfloat* values), (indx, values), 2, "GLuint", indx, "const GLfloat*", values) -TRACE_GL_VOID(glVertexAttrib4f, (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w), (indx, x, y, z, w), 5, "GLuint", indx, "GLfloat", x, "GLfloat", y, "GLfloat", z, "GLfloat", w) -TRACE_GL_VOID(glVertexAttrib4fv, (GLuint indx, const GLfloat* values), (indx, values), 2, "GLuint", indx, "const GLfloat*", values) -TRACE_GL_VOID(glVertexAttribPointer, (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr), (indx, size, type, normalized, stride, ptr), 6, "GLuint", indx, "GLint", size, "GLenum", type, "GLboolean", normalized, "GLsizei", stride, "const GLvoid*", ptr) -TRACE_GL_VOID(glVertexPointer, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer) -TRACE_GL_VOID(glViewport, (GLint x, GLint y, GLsizei width, GLsizei height), (x, y, width, height), 4, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height) -TRACE_GL_VOID(glWeightPointerOES, (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer), (size, type, stride, pointer), 4, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid *", pointer) |
