diff options
Diffstat (limited to 'opengl')
130 files changed, 11108 insertions, 1234 deletions
diff --git a/opengl/include/EGL/eglext.h b/opengl/include/EGL/eglext.h index 8578874..6c505ed 100644 --- a/opengl/include/EGL/eglext.h +++ b/opengl/include/EGL/eglext.h @@ -6,7 +6,7 @@ extern "C" { #endif /* -** Copyright (c) 2007-2010 The Khronos Group Inc. +** Copyright (c) 2007-2013 The Khronos Group Inc. ** ** Permission is hereby granted, free of charge, to any person obtaining a ** copy of this software and/or associated documentation files (the @@ -34,8 +34,8 @@ extern "C" { /* Header file version number */ /* Current version at http://www.khronos.org/registry/egl/ */ -/* $Revision: 11249 $ on $Date: 2010-05-05 09:54:28 -0700 (Wed, 05 May 2010) $ */ -#define EGL_EGLEXT_VERSION 5 +/* $Revision: 20690 $ on $Date: 2013-02-22 17:15:05 -0800 (Fri, 22 Feb 2013) $ */ +#define EGL_EGLEXT_VERSION 15 #ifndef EGL_KHR_config_attribs #define EGL_KHR_config_attribs 1 @@ -120,6 +120,7 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGL #define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */ #endif +#if KHRONOS_SUPPORT_INT64 /* EGLTimeKHR requires 64-bit uint support */ #ifndef EGL_KHR_reusable_sync #define EGL_KHR_reusable_sync 1 @@ -149,6 +150,7 @@ typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSy typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); #endif +#endif #ifndef EGL_KHR_image_base #define EGL_KHR_image_base 1 @@ -169,19 +171,25 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EG #define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103 #endif +#ifndef EGL_KHR_lock_surface2 +#define EGL_KHR_lock_surface2 1 +#define EGL_BITMAP_PIXEL_SIZE_KHR 0x3110 +#endif + #ifndef EGL_NV_coverage_sample #define EGL_NV_coverage_sample 1 -#define EGL_COVERAGE_BUFFERS_NV 0x30E0 -#define EGL_COVERAGE_SAMPLES_NV 0x30E1 +#define EGL_COVERAGE_BUFFERS_NV 0x30E0 +#define EGL_COVERAGE_SAMPLES_NV 0x30E1 #endif #ifndef EGL_NV_depth_nonlinear #define EGL_NV_depth_nonlinear 1 -#define EGL_DEPTH_ENCODING_NV 0x30E2 +#define EGL_DEPTH_ENCODING_NV 0x30E2 #define EGL_DEPTH_ENCODING_NONE_NV 0 -#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3 +#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3 #endif +#if KHRONOS_SUPPORT_INT64 /* EGLTimeNV requires 64-bit uint support */ #ifndef EGL_NV_sync #define EGL_NV_sync 1 #define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6 @@ -198,14 +206,14 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EG #define EGL_SYNC_FENCE_NV 0x30EF #define EGL_NO_SYNC_NV ((EGLSyncNV)0) typedef void* EGLSyncNV; -typedef unsigned long long EGLTimeNV; +typedef khronos_utime_nanoseconds_t EGLTimeNV; #ifdef EGL_EGLEXT_PROTOTYPES -EGLSyncNV eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); -EGLBoolean eglDestroySyncNV (EGLSyncNV sync); -EGLBoolean eglFenceNV (EGLSyncNV sync); -EGLint eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); -EGLBoolean eglSignalSyncNV (EGLSyncNV sync, EGLenum mode); -EGLBoolean eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value); +EGLAPI EGLSyncNV EGLAPIENTRY eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncNV (EGLSyncNV sync); +EGLAPI EGLBoolean EGLAPIENTRY eglFenceNV (EGLSyncNV sync); +EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); +EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncNV (EGLSyncNV sync, EGLenum mode); +EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value); #endif /* EGL_EGLEXT_PROTOTYPES */ typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync); @@ -214,7 +222,9 @@ typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode); typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value); #endif +#endif +#if KHRONOS_SUPPORT_INT64 /* Dependent on EGL_KHR_reusable_sync which requires 64-bit uint support */ #ifndef EGL_KHR_fence_sync #define EGL_KHR_fence_sync 1 /* Reuses most tokens and entry points from EGL_KHR_reusable_sync */ @@ -222,97 +232,344 @@ typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGL #define EGL_SYNC_CONDITION_KHR 0x30F8 #define EGL_SYNC_FENCE_KHR 0x30F9 #endif +#endif -#ifndef EGL_ANDROID_image_native_buffer -#define EGL_ANDROID_image_native_buffer 1 -struct ANativeWindowBuffer; -#define EGL_NATIVE_BUFFER_ANDROID 0x3140 /* eglCreateImageKHR target */ +#ifndef EGL_HI_clientpixmap +#define EGL_HI_clientpixmap 1 + +/* Surface Attribute */ +#define EGL_CLIENT_PIXMAP_POINTER_HI 0x8F74 +/* + * Structure representing a client pixmap + * (pixmap's data is in client-space memory). + */ +struct EGLClientPixmapHI +{ + void* pData; + EGLint iWidth; + EGLint iHeight; + EGLint iStride; +}; +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI(EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap); +#endif /* EGL_HI_clientpixmap */ + +#ifndef EGL_HI_colorformats +#define EGL_HI_colorformats 1 +/* Config Attribute */ +#define EGL_COLOR_FORMAT_HI 0x8F70 +/* Color Formats */ +#define EGL_COLOR_RGB_HI 0x8F71 +#define EGL_COLOR_RGBA_HI 0x8F72 +#define EGL_COLOR_ARGB_HI 0x8F73 +#endif /* EGL_HI_colorformats */ + +#ifndef EGL_MESA_drm_image +#define EGL_MESA_drm_image 1 +#define EGL_DRM_BUFFER_FORMAT_MESA 0x31D0 /* CreateDRMImageMESA attribute */ +#define EGL_DRM_BUFFER_USE_MESA 0x31D1 /* CreateDRMImageMESA attribute */ +#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2 /* EGL_IMAGE_FORMAT_MESA attribute value */ +#define EGL_DRM_BUFFER_MESA 0x31D3 /* eglCreateImageKHR target */ +#define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4 +#define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x00000001 /* EGL_DRM_BUFFER_USE_MESA bits */ +#define EGL_DRM_BUFFER_USE_SHARE_MESA 0x00000002 /* EGL_DRM_BUFFER_USE_MESA bits */ +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA (EGLDisplay dpy, const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); #endif -#ifndef EGL_ANDROID_recordable -#define EGL_ANDROID_recordable 1 -#define EGL_RECORDABLE_ANDROID 0x3142 /* EGLConfig attribute */ +#ifndef EGL_NV_post_sub_buffer +#define EGL_NV_post_sub_buffer 1 +#define EGL_POST_SUB_BUFFER_SUPPORTED_NV 0x30BE +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLBoolean (EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height); #endif -/* EGL_EXT_create_context_robustness - */ -#ifndef EGL_EXT_create_context_robustness -#define EGL_EXT_create_context_robustness 1 -#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF -#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138 -#define EGL_NO_RESET_NOTIFICATION_EXT 0x31BE -#define EGL_LOSE_CONTEXT_ON_RESET_EXT 0x31BF +#ifndef EGL_ANGLE_query_surface_pointer +#define EGL_ANGLE_query_surface_pointer 1 +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLBoolean eglQuerySurfacePointerANGLE(EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value); +#endif +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value); #endif -/* EGL_NV_system_time - */ +#ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle +#define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1 +#define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200 +#endif + +#ifndef EGL_NV_coverage_sample_resolve +#define EGL_NV_coverage_sample_resolve 1 +#define EGL_COVERAGE_SAMPLE_RESOLVE_NV 0x3131 +#define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV 0x3132 +#define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV 0x3133 +#endif + +#if KHRONOS_SUPPORT_INT64 /* EGLuint64NV requires 64-bit uint support */ #ifndef EGL_NV_system_time #define EGL_NV_system_time 1 -typedef khronos_int64_t EGLint64NV; -typedef khronos_uint64_t EGLuint64NV; +typedef khronos_utime_nanoseconds_t EGLuint64NV; #ifdef EGL_EGLEXT_PROTOTYPES EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV(void); EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV(void); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC) (void); +typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC) (void); #endif -typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC)(void); -typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC)(void); #endif -/* EGL_ANDROID_blob_cache - */ +#if KHRONOS_SUPPORT_INT64 /* EGLuint64KHR requires 64-bit uint support */ +#ifndef EGL_KHR_stream +#define EGL_KHR_stream 1 +typedef void* EGLStreamKHR; +typedef khronos_uint64_t EGLuint64KHR; +#define EGL_NO_STREAM_KHR ((EGLStreamKHR)0) +#define EGL_CONSUMER_LATENCY_USEC_KHR 0x3210 +#define EGL_PRODUCER_FRAME_KHR 0x3212 +#define EGL_CONSUMER_FRAME_KHR 0x3213 +#define EGL_STREAM_STATE_KHR 0x3214 +#define EGL_STREAM_STATE_CREATED_KHR 0x3215 +#define EGL_STREAM_STATE_CONNECTING_KHR 0x3216 +#define EGL_STREAM_STATE_EMPTY_KHR 0x3217 +#define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 0x3218 +#define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 0x3219 +#define EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A +#define EGL_BAD_STREAM_KHR 0x321B +#define EGL_BAD_STATE_KHR 0x321C +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR(EGLDisplay dpy, const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroyStreamKHR(EGLDisplay dpy, EGLStreamKHR stream); +EGLAPI EGLBoolean EGLAPIENTRY eglStreamAttribKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC)(EGLDisplay dpy, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value); +#endif +#endif + +#ifdef EGL_KHR_stream /* Requires KHR_stream extension */ +#ifndef EGL_KHR_stream_consumer_gltexture +#define EGL_KHR_stream_consumer_gltexture 1 +#define EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR 0x321E +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR(EGLDisplay dpy, EGLStreamKHR stream); +EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR(EGLDisplay dpy, EGLStreamKHR stream); +EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR(EGLDisplay dpy, EGLStreamKHR stream); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream); +#endif +#endif + +#ifdef EGL_KHR_stream /* Requires KHR_stream extension */ +#ifndef EGL_KHR_stream_producer_eglsurface +#define EGL_KHR_stream_producer_eglsurface 1 +#define EGL_STREAM_BIT_KHR 0x0800 +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLSurface EGLAPIENTRY eglCreateStreamProducerSurfaceKHR(EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC)(EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list); +#endif +#endif + +#ifdef EGL_KHR_stream /* Requires KHR_stream extension */ +#ifndef EGL_KHR_stream_producer_aldatalocator +#define EGL_KHR_stream_producer_aldatalocator 1 +#endif +#endif + +#ifdef EGL_KHR_stream /* Requires KHR_stream extension */ +#ifndef EGL_KHR_stream_fifo +#define EGL_KHR_stream_fifo 1 +/* reuse EGLTimeKHR */ +#define EGL_STREAM_FIFO_LENGTH_KHR 0x31FC +#define EGL_STREAM_TIME_NOW_KHR 0x31FD +#define EGL_STREAM_TIME_CONSUMER_KHR 0x31FE +#define EGL_STREAM_TIME_PRODUCER_KHR 0x31FF +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value); +#endif +#endif + +#ifndef EGL_EXT_create_context_robustness +#define EGL_EXT_create_context_robustness 1 +#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF +#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138 +#define EGL_NO_RESET_NOTIFICATION_EXT 0x31BE +#define EGL_LOSE_CONTEXT_ON_RESET_EXT 0x31BF +#endif + +#ifndef EGL_ANGLE_d3d_share_handle_client_buffer +#define EGL_ANGLE_d3d_share_handle_client_buffer 1 +/* reuse EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE */ +#endif + +#ifndef EGL_KHR_create_context +#define EGL_KHR_create_context 1 +#define EGL_CONTEXT_MAJOR_VERSION_KHR EGL_CONTEXT_CLIENT_VERSION +#define EGL_CONTEXT_MINOR_VERSION_KHR 0x30FB +#define EGL_CONTEXT_FLAGS_KHR 0x30FC +#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD +#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31BD +#define EGL_NO_RESET_NOTIFICATION_KHR 0x31BE +#define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31BF +#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001 +#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002 +#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004 +#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001 +#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002 +#define EGL_OPENGL_ES3_BIT_KHR 0x00000040 +#endif + +#ifndef EGL_KHR_surfaceless_context +#define EGL_KHR_surfaceless_context 1 +/* No tokens/entry points, just relaxes an error condition */ +#endif + +#ifdef EGL_KHR_stream /* Requires KHR_stream extension */ +#ifndef EGL_KHR_stream_cross_process_fd +#define EGL_KHR_stream_cross_process_fd 1 +typedef int EGLNativeFileDescriptorKHR; +#define EGL_NO_FILE_DESCRIPTOR_KHR ((EGLNativeFileDescriptorKHR)(-1)) +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLNativeFileDescriptorKHR EGLAPIENTRY eglGetStreamFileDescriptorKHR(EGLDisplay dpy, EGLStreamKHR stream); +EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR(EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLNativeFileDescriptorKHR (EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC)(EGLDisplay dpy, EGLStreamKHR stream); +typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC)(EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor); +#endif +#endif + +#ifndef EGL_EXT_multiview_window +#define EGL_EXT_multiview_window 1 +#define EGL_MULTIVIEW_VIEW_COUNT_EXT 0x3134 +#endif + +#ifndef EGL_KHR_wait_sync +#define EGL_KHR_wait_sync 1 +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLint EGLAPIENTRY eglWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC)(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); +#endif + +#ifndef EGL_NV_post_convert_rounding +#define EGL_NV_post_convert_rounding 1 +/* No tokens or entry points, just relaxes behavior of SwapBuffers */ +#endif + +#ifndef EGL_NV_native_query +#define EGL_NV_native_query 1 +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeDisplayNV( EGLDisplay dpy, EGLNativeDisplayType* display_id); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeWindowNV( EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType* window); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativePixmapNV( EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType* pixmap); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC)(EGLDisplay dpy, EGLNativeDisplayType *display_id); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEWINDOWNVPROC)(EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEPIXMAPNVPROC)(EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap); +#endif + +#ifndef EGL_NV_3dvision_surface +#define EGL_NV_3dvision_surface 1 +#define EGL_AUTO_STEREO_NV 0x3136 +#endif + +#ifndef EGL_ANDROID_framebuffer_target +#define EGL_ANDROID_framebuffer_target 1 +#define EGL_FRAMEBUFFER_TARGET_ANDROID 0x3147 +#endif + #ifndef EGL_ANDROID_blob_cache #define EGL_ANDROID_blob_cache 1 typedef khronos_ssize_t EGLsizeiANDROID; -typedef void (*EGLSetBlobFuncANDROID) (const void* key, EGLsizeiANDROID keySize, const void* value, EGLsizeiANDROID valueSize); -typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void* key, EGLsizeiANDROID keySize, void* value, EGLsizeiANDROID valueSize); +typedef void (*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize); +typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize); #ifdef EGL_EGLEXT_PROTOTYPES EGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID(EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get); #endif /* EGL_EGLEXT_PROTOTYPES */ -typedef void (EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC) (EGLDisplay dpy, - EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get); +typedef void (EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC)(EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get); #endif -/* EGL_IMG_hibernate_process - */ -#ifndef EGL_IMG_hibernate_process -#define EGL_IMG_hibernate_process 1 -typedef EGLBoolean (EGLAPIENTRYP PFEGLHIBERNATEPROCESSIMGPROC)(void); -typedef EGLBoolean (EGLAPIENTRYP PFEGLAWAKENPROCESSIMGPROC)(void); +#ifndef EGL_ANDROID_image_native_buffer +#define EGL_ANDROID_image_native_buffer 1 +#define EGL_NATIVE_BUFFER_ANDROID 0x3140 #endif -/* EGL_ANDROID_native_fence_sync - */ #ifndef EGL_ANDROID_native_fence_sync #define EGL_ANDROID_native_fence_sync 1 -#define EGL_SYNC_NATIVE_FENCE_ANDROID 0x3144 -#define EGL_SYNC_NATIVE_FENCE_FD_ANDROID 0x3145 -#define EGL_NO_NATIVE_FENCE_FD_ANDROID -1 -#define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146 +#define EGL_SYNC_NATIVE_FENCE_ANDROID 0x3144 +#define EGL_SYNC_NATIVE_FENCE_FD_ANDROID 0x3145 +#define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146 +#define EGL_NO_NATIVE_FENCE_FD_ANDROID -1 #ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID(EGLDisplay dpy, EGLSyncKHR sync); +EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID( EGLDisplay dpy, EGLSyncKHR); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC)(EGLDisplay dpy, EGLSyncKHR); #endif -typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROID) (EGLDisplay dpy, EGLSyncKHR sync); + +#ifndef EGL_ANDROID_recordable +#define EGL_ANDROID_recordable 1 +#define EGL_RECORDABLE_ANDROID 0x3142 #endif -/* EGL_ANDROID_wait_sync - */ -#ifndef EGL_ANDROID_wait_sync -#define EGL_ANDROID_wait_sync -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLint EGLAPIENTRY eglWaitSyncANDROID(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); +#ifndef EGL_EXT_buffer_age +#define EGL_EXT_buffer_age 1 +#define EGL_BUFFER_AGE_EXT 0x313D #endif -typedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCANDROID) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); + +#ifndef EGL_EXT_image_dma_buf_import +#define EGL_EXT_image_dma_buf_import 1 +#define EGL_LINUX_DMA_BUF_EXT 0x3270 +#define EGL_LINUX_DRM_FOURCC_EXT 0x3271 +#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272 +#define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273 +#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274 +#define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275 +#define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276 +#define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277 +#define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278 +#define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279 +#define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A +#define EGL_YUV_COLOR_SPACE_HINT_EXT 0x327B +#define EGL_SAMPLE_RANGE_HINT_EXT 0x327C +#define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D +#define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E +#define EGL_ITU_REC601_EXT 0x327F +#define EGL_ITU_REC709_EXT 0x3280 +#define EGL_ITU_REC2020_EXT 0x3281 +#define EGL_YUV_FULL_RANGE_EXT 0x3282 +#define EGL_YUV_NARROW_RANGE_EXT 0x3283 +#define EGL_YUV_CHROMA_SITING_0_EXT 0x3284 +#define EGL_YUV_CHROMA_SITING_0_5_EXT 0x3285 #endif -/* EGL_ANDROID_framebuffer_target - */ -#ifndef EGL_ANDROID_framebuffer_target -#define EGL_ANDROID_framebuffer_target -#define EGL_FRAMEBUFFER_TARGET_ANDROID 0x3147 +#ifndef EGL_ANDROID_presentation_time +#define EGL_ANDROID_presentation_time 1 +typedef khronos_stime_nanoseconds_t EGLnsecsANDROID; +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLBoolean eglPresentationTimeANDROID(EGLDisplay dpy, EGLSurface sur, EGLnsecsANDROID time); +#else +typedef EGLBoolean (EGLAPIENTRYP PFNEGLPRESENTATIONTIMEANDROID) (EGLDisplay dpy, EGLSurface sur, EGLnsecsANDROID time); +#endif #endif #ifdef __cplusplus } #endif -#endif +#endif /* __eglext_h_ */ diff --git a/opengl/include/EGL/eglplatform.h b/opengl/include/EGL/eglplatform.h index af4d11f..354ac22 100644 --- a/opengl/include/EGL/eglplatform.h +++ b/opengl/include/EGL/eglplatform.h @@ -25,7 +25,7 @@ */ /* Platform-specific types and definitions for egl.h - * $Revision: 9724 $ on $Date: 2009-12-02 02:05:33 -0800 (Wed, 02 Dec 2009) $ + * $Revision: 12306 $ on $Date: 2010-08-25 09:51:28 -0700 (Wed, 25 Aug 2010) $ * * Adopters may modify khrplatform.h and this file to suit their platform. * You are encouraged to submit all modifications to the Khronos group so that @@ -60,6 +60,11 @@ * Windows Device Context. They must be defined in platform-specific * code below. The EGL-prefixed versions of Native*Type are the same * types, renamed in EGL 1.3 so all types in the API start with "EGL". + * + * Khronos STRONGLY RECOMMENDS that you use the default definitions + * provided below, since these changes affect both binary and source + * portability of applications using EGL running on different EGL + * implementations. */ #if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */ diff --git a/opengl/include/GLES2/gl2.h b/opengl/include/GLES2/gl2.h index c139c25..c2d8357 100644 --- a/opengl/include/GLES2/gl2.h +++ b/opengl/include/GLES2/gl2.h @@ -1,7 +1,7 @@ #ifndef __gl2_h_ #define __gl2_h_ -/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */ +/* $Revision: 20555 $ on $Date:: 2013-02-12 14:32:47 -0800 #$ */ #include <GLES2/gl2platform.h> @@ -431,7 +431,6 @@ typedef khronos_ssize_t GLsizeiptr; #define GL_RGB5_A1 0x8057 #define GL_RGB565 0x8D62 #define GL_DEPTH_COMPONENT16 0x81A5 -#define GL_STENCIL_INDEX 0x1901 #define GL_STENCIL_INDEX8 0x8D48 #define GL_RENDERBUFFER_WIDTH 0x8D42 @@ -569,7 +568,7 @@ GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert); GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length); -GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar** string, const GLint* length); +GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length); GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); diff --git a/opengl/include/GLES3/gl3.h b/opengl/include/GLES3/gl3.h new file mode 100644 index 0000000..9c79862 --- /dev/null +++ b/opengl/include/GLES3/gl3.h @@ -0,0 +1,1061 @@ +#ifndef __gl3_h_ +#define __gl3_h_ + +/* + * gl3.h last updated on $Date: 2013-02-12 14:37:24 -0800 (Tue, 12 Feb 2013) $ + */ + +#include <GLES3/gl3platform.h> + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2007-2013 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/*------------------------------------------------------------------------- + * Data type definitions + *-----------------------------------------------------------------------*/ + +/* OpenGL ES 2.0 */ + +typedef void GLvoid; +typedef char GLchar; +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef khronos_int8_t GLbyte; +typedef short GLshort; +typedef int GLint; +typedef int GLsizei; +typedef khronos_uint8_t GLubyte; +typedef unsigned short GLushort; +typedef unsigned int GLuint; +typedef khronos_float_t GLfloat; +typedef khronos_float_t GLclampf; +typedef khronos_int32_t GLfixed; +typedef khronos_intptr_t GLintptr; +typedef khronos_ssize_t GLsizeiptr; + +/* OpenGL ES 3.0 */ + +typedef unsigned short GLhalf; +typedef khronos_int64_t GLint64; +typedef khronos_uint64_t GLuint64; +typedef struct __GLsync *GLsync; + +/*------------------------------------------------------------------------- + * Token definitions + *-----------------------------------------------------------------------*/ + +/* OpenGL ES core versions */ +#define GL_ES_VERSION_3_0 1 +#define GL_ES_VERSION_2_0 1 + +/* OpenGL ES 2.0 */ + +/* ClearBufferMask */ +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_COLOR_BUFFER_BIT 0x00004000 + +/* Boolean */ +#define GL_FALSE 0 +#define GL_TRUE 1 + +/* BeginMode */ +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 + +/* BlendingFactorDest */ +#define GL_ZERO 0 +#define GL_ONE 1 +#define GL_SRC_COLOR 0x0300 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_SRC_ALPHA 0x0302 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_DST_ALPHA 0x0304 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 + +/* BlendingFactorSrc */ +/* GL_ZERO */ +/* GL_ONE */ +#define GL_DST_COLOR 0x0306 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_SRC_ALPHA_SATURATE 0x0308 +/* GL_SRC_ALPHA */ +/* GL_ONE_MINUS_SRC_ALPHA */ +/* GL_DST_ALPHA */ +/* GL_ONE_MINUS_DST_ALPHA */ + +/* BlendEquationSeparate */ +#define GL_FUNC_ADD 0x8006 +#define GL_BLEND_EQUATION 0x8009 +#define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */ +#define GL_BLEND_EQUATION_ALPHA 0x883D + +/* BlendSubtract */ +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B + +/* Separate Blend Functions */ +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_BLEND_COLOR 0x8005 + +/* Buffer Objects */ +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 + +#define GL_STREAM_DRAW 0x88E0 +#define GL_STATIC_DRAW 0x88E4 +#define GL_DYNAMIC_DRAW 0x88E8 + +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 + +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 + +/* CullFaceMode */ +#define GL_FRONT 0x0404 +#define GL_BACK 0x0405 +#define GL_FRONT_AND_BACK 0x0408 + +/* DepthFunction */ +/* GL_NEVER */ +/* GL_LESS */ +/* GL_EQUAL */ +/* GL_LEQUAL */ +/* GL_GREATER */ +/* GL_NOTEQUAL */ +/* GL_GEQUAL */ +/* GL_ALWAYS */ + +/* EnableCap */ +#define GL_TEXTURE_2D 0x0DE1 +#define GL_CULL_FACE 0x0B44 +#define GL_BLEND 0x0BE2 +#define GL_DITHER 0x0BD0 +#define GL_STENCIL_TEST 0x0B90 +#define GL_DEPTH_TEST 0x0B71 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_COVERAGE 0x80A0 + +/* ErrorCode */ +#define GL_NO_ERROR 0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_OUT_OF_MEMORY 0x0505 + +/* FrontFaceDirection */ +#define GL_CW 0x0900 +#define GL_CCW 0x0901 + +/* GetPName */ +#define GL_LINE_WIDTH 0x0B21 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_FRONT_FACE 0x0B46 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +#define GL_VIEWPORT 0x0BA2 +#define GL_SCISSOR_BOX 0x0C10 +/* GL_SCISSOR_TEST */ +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_COLOR_WRITEMASK 0x0C23 +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_ALIGNMENT 0x0D05 +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_RED_BITS 0x0D52 +#define GL_GREEN_BITS 0x0D53 +#define GL_BLUE_BITS 0x0D54 +#define GL_ALPHA_BITS 0x0D55 +#define GL_DEPTH_BITS 0x0D56 +#define GL_STENCIL_BITS 0x0D57 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +/* GL_POLYGON_OFFSET_FILL */ +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB + +/* GetTextureParameter */ +/* GL_TEXTURE_MAG_FILTER */ +/* GL_TEXTURE_MIN_FILTER */ +/* GL_TEXTURE_WRAP_S */ +/* GL_TEXTURE_WRAP_T */ + +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 + +/* HintMode */ +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 + +/* HintTarget */ +#define GL_GENERATE_MIPMAP_HINT 0x8192 + +/* DataType */ +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_SHORT 0x1402 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_INT 0x1404 +#define GL_UNSIGNED_INT 0x1405 +#define GL_FLOAT 0x1406 +#define GL_FIXED 0x140C + +/* PixelFormat */ +#define GL_DEPTH_COMPONENT 0x1902 +#define GL_ALPHA 0x1906 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_LUMINANCE 0x1909 +#define GL_LUMINANCE_ALPHA 0x190A + +/* PixelType */ +/* GL_UNSIGNED_BYTE */ +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 + +/* Shaders */ +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_VERTEX_SHADER 0x8B31 +#define GL_MAX_VERTEX_ATTRIBS 0x8869 +#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB +#define GL_MAX_VARYING_VECTORS 0x8DFC +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD +#define GL_SHADER_TYPE 0x8B4F +#define GL_DELETE_STATUS 0x8B80 +#define GL_LINK_STATUS 0x8B82 +#define GL_VALIDATE_STATUS 0x8B83 +#define GL_ATTACHED_SHADERS 0x8B85 +#define GL_ACTIVE_UNIFORMS 0x8B86 +#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +#define GL_ACTIVE_ATTRIBUTES 0x8B89 +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#define GL_CURRENT_PROGRAM 0x8B8D + +/* StencilFunction */ +#define GL_NEVER 0x0200 +#define GL_LESS 0x0201 +#define GL_EQUAL 0x0202 +#define GL_LEQUAL 0x0203 +#define GL_GREATER 0x0204 +#define GL_NOTEQUAL 0x0205 +#define GL_GEQUAL 0x0206 +#define GL_ALWAYS 0x0207 + +/* StencilOp */ +/* GL_ZERO */ +#define GL_KEEP 0x1E00 +#define GL_REPLACE 0x1E01 +#define GL_INCR 0x1E02 +#define GL_DECR 0x1E03 +#define GL_INVERT 0x150A +#define GL_INCR_WRAP 0x8507 +#define GL_DECR_WRAP 0x8508 + +/* StringName */ +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 + +/* TextureMagFilter */ +#define GL_NEAREST 0x2600 +#define GL_LINEAR 0x2601 + +/* TextureMinFilter */ +/* GL_NEAREST */ +/* GL_LINEAR */ +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 + +/* TextureParameterName */ +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 + +/* TextureTarget */ +/* GL_TEXTURE_2D */ +#define GL_TEXTURE 0x1702 + +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C + +/* TextureUnit */ +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 + +/* TextureWrapMode */ +#define GL_REPEAT 0x2901 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_MIRRORED_REPEAT 0x8370 + +/* Uniform Types */ +#define GL_FLOAT_VEC2 0x8B50 +#define GL_FLOAT_VEC3 0x8B51 +#define GL_FLOAT_VEC4 0x8B52 +#define GL_INT_VEC2 0x8B53 +#define GL_INT_VEC3 0x8B54 +#define GL_INT_VEC4 0x8B55 +#define GL_BOOL 0x8B56 +#define GL_BOOL_VEC2 0x8B57 +#define GL_BOOL_VEC3 0x8B58 +#define GL_BOOL_VEC4 0x8B59 +#define GL_FLOAT_MAT2 0x8B5A +#define GL_FLOAT_MAT3 0x8B5B +#define GL_FLOAT_MAT4 0x8B5C +#define GL_SAMPLER_2D 0x8B5E +#define GL_SAMPLER_CUBE 0x8B60 + +/* Vertex Arrays */ +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F + +/* Read Format */ +#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B + +/* Shader Source */ +#define GL_COMPILE_STATUS 0x8B81 +#define GL_INFO_LOG_LENGTH 0x8B84 +#define GL_SHADER_SOURCE_LENGTH 0x8B88 +#define GL_SHADER_COMPILER 0x8DFA + +/* Shader Binary */ +#define GL_SHADER_BINARY_FORMATS 0x8DF8 +#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 + +/* Shader Precision-Specified Types */ +#define GL_LOW_FLOAT 0x8DF0 +#define GL_MEDIUM_FLOAT 0x8DF1 +#define GL_HIGH_FLOAT 0x8DF2 +#define GL_LOW_INT 0x8DF3 +#define GL_MEDIUM_INT 0x8DF4 +#define GL_HIGH_INT 0x8DF5 + +/* Framebuffer Object. */ +#define GL_FRAMEBUFFER 0x8D40 +#define GL_RENDERBUFFER 0x8D41 + +#define GL_RGBA4 0x8056 +#define GL_RGB5_A1 0x8057 +#define GL_RGB565 0x8D62 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_STENCIL_INDEX8 0x8D48 + +#define GL_RENDERBUFFER_WIDTH 0x8D42 +#define GL_RENDERBUFFER_HEIGHT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 +#define GL_RENDERBUFFER_RED_SIZE 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 + +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 + +#define GL_COLOR_ATTACHMENT0 0x8CE0 +#define GL_DEPTH_ATTACHMENT 0x8D00 +#define GL_STENCIL_ATTACHMENT 0x8D20 + +#define GL_NONE 0 + +#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 +#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD + +#define GL_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_RENDERBUFFER_BINDING 0x8CA7 +#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 + +#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 + +/* OpenGL ES 3.0 */ + +#define GL_READ_BUFFER 0x0C02 +#define GL_UNPACK_ROW_LENGTH 0x0CF2 +#define GL_UNPACK_SKIP_ROWS 0x0CF3 +#define GL_UNPACK_SKIP_PIXELS 0x0CF4 +#define GL_PACK_ROW_LENGTH 0x0D02 +#define GL_PACK_SKIP_ROWS 0x0D03 +#define GL_PACK_SKIP_PIXELS 0x0D04 +#define GL_COLOR 0x1800 +#define GL_DEPTH 0x1801 +#define GL_STENCIL 0x1802 +#define GL_RED 0x1903 +#define GL_RGB8 0x8051 +#define GL_RGBA8 0x8058 +#define GL_RGB10_A2 0x8059 +#define GL_TEXTURE_BINDING_3D 0x806A +#define GL_UNPACK_SKIP_IMAGES 0x806D +#define GL_UNPACK_IMAGE_HEIGHT 0x806E +#define GL_TEXTURE_3D 0x806F +#define GL_TEXTURE_WRAP_R 0x8072 +#define GL_MAX_3D_TEXTURE_SIZE 0x8073 +#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 +#define GL_MAX_ELEMENTS_VERTICES 0x80E8 +#define GL_MAX_ELEMENTS_INDICES 0x80E9 +#define GL_TEXTURE_MIN_LOD 0x813A +#define GL_TEXTURE_MAX_LOD 0x813B +#define GL_TEXTURE_BASE_LEVEL 0x813C +#define GL_TEXTURE_MAX_LEVEL 0x813D +#define GL_MIN 0x8007 +#define GL_MAX 0x8008 +#define GL_DEPTH_COMPONENT24 0x81A6 +#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD +#define GL_TEXTURE_COMPARE_MODE 0x884C +#define GL_TEXTURE_COMPARE_FUNC 0x884D +#define GL_CURRENT_QUERY 0x8865 +#define GL_QUERY_RESULT 0x8866 +#define GL_QUERY_RESULT_AVAILABLE 0x8867 +#define GL_BUFFER_MAPPED 0x88BC +#define GL_BUFFER_MAP_POINTER 0x88BD +#define GL_STREAM_READ 0x88E1 +#define GL_STREAM_COPY 0x88E2 +#define GL_STATIC_READ 0x88E5 +#define GL_STATIC_COPY 0x88E6 +#define GL_DYNAMIC_READ 0x88E9 +#define GL_DYNAMIC_COPY 0x88EA +#define GL_MAX_DRAW_BUFFERS 0x8824 +#define GL_DRAW_BUFFER0 0x8825 +#define GL_DRAW_BUFFER1 0x8826 +#define GL_DRAW_BUFFER2 0x8827 +#define GL_DRAW_BUFFER3 0x8828 +#define GL_DRAW_BUFFER4 0x8829 +#define GL_DRAW_BUFFER5 0x882A +#define GL_DRAW_BUFFER6 0x882B +#define GL_DRAW_BUFFER7 0x882C +#define GL_DRAW_BUFFER8 0x882D +#define GL_DRAW_BUFFER9 0x882E +#define GL_DRAW_BUFFER10 0x882F +#define GL_DRAW_BUFFER11 0x8830 +#define GL_DRAW_BUFFER12 0x8831 +#define GL_DRAW_BUFFER13 0x8832 +#define GL_DRAW_BUFFER14 0x8833 +#define GL_DRAW_BUFFER15 0x8834 +#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 +#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A +#define GL_SAMPLER_3D 0x8B5F +#define GL_SAMPLER_2D_SHADOW 0x8B62 +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B +#define GL_PIXEL_PACK_BUFFER 0x88EB +#define GL_PIXEL_UNPACK_BUFFER 0x88EC +#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED +#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF +#define GL_FLOAT_MAT2x3 0x8B65 +#define GL_FLOAT_MAT2x4 0x8B66 +#define GL_FLOAT_MAT3x2 0x8B67 +#define GL_FLOAT_MAT3x4 0x8B68 +#define GL_FLOAT_MAT4x2 0x8B69 +#define GL_FLOAT_MAT4x3 0x8B6A +#define GL_SRGB 0x8C40 +#define GL_SRGB8 0x8C41 +#define GL_SRGB8_ALPHA8 0x8C43 +#define GL_COMPARE_REF_TO_TEXTURE 0x884E +#define GL_MAJOR_VERSION 0x821B +#define GL_MINOR_VERSION 0x821C +#define GL_NUM_EXTENSIONS 0x821D +#define GL_RGBA32F 0x8814 +#define GL_RGB32F 0x8815 +#define GL_RGBA16F 0x881A +#define GL_RGB16F 0x881B +#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD +#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF +#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 +#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 +#define GL_MAX_VARYING_COMPONENTS 0x8B4B +#define GL_TEXTURE_2D_ARRAY 0x8C1A +#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D +#define GL_R11F_G11F_B10F 0x8C3A +#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B +#define GL_RGB9_E5 0x8C3D +#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E +#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 +#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 +#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 +#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 +#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 +#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 +#define GL_RASTERIZER_DISCARD 0x8C89 +#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A +#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B +#define GL_INTERLEAVED_ATTRIBS 0x8C8C +#define GL_SEPARATE_ATTRIBS 0x8C8D +#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E +#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F +#define GL_RGBA32UI 0x8D70 +#define GL_RGB32UI 0x8D71 +#define GL_RGBA16UI 0x8D76 +#define GL_RGB16UI 0x8D77 +#define GL_RGBA8UI 0x8D7C +#define GL_RGB8UI 0x8D7D +#define GL_RGBA32I 0x8D82 +#define GL_RGB32I 0x8D83 +#define GL_RGBA16I 0x8D88 +#define GL_RGB16I 0x8D89 +#define GL_RGBA8I 0x8D8E +#define GL_RGB8I 0x8D8F +#define GL_RED_INTEGER 0x8D94 +#define GL_RGB_INTEGER 0x8D98 +#define GL_RGBA_INTEGER 0x8D99 +#define GL_SAMPLER_2D_ARRAY 0x8DC1 +#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 +#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 +#define GL_UNSIGNED_INT_VEC2 0x8DC6 +#define GL_UNSIGNED_INT_VEC3 0x8DC7 +#define GL_UNSIGNED_INT_VEC4 0x8DC8 +#define GL_INT_SAMPLER_2D 0x8DCA +#define GL_INT_SAMPLER_3D 0x8DCB +#define GL_INT_SAMPLER_CUBE 0x8DCC +#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF +#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 +#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 +#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 +#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 +#define GL_BUFFER_ACCESS_FLAGS 0x911F +#define GL_BUFFER_MAP_LENGTH 0x9120 +#define GL_BUFFER_MAP_OFFSET 0x9121 +#define GL_DEPTH_COMPONENT32F 0x8CAC +#define GL_DEPTH32F_STENCIL8 0x8CAD +#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD +#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 +#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 +#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 +#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 +#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 +#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 +#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 +#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 +#define GL_FRAMEBUFFER_DEFAULT 0x8218 +#define GL_FRAMEBUFFER_UNDEFINED 0x8219 +#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A +#define GL_DEPTH_STENCIL 0x84F9 +#define GL_UNSIGNED_INT_24_8 0x84FA +#define GL_DEPTH24_STENCIL8 0x88F0 +#define GL_UNSIGNED_NORMALIZED 0x8C17 +#define GL_DRAW_FRAMEBUFFER_BINDING GL_FRAMEBUFFER_BINDING +#define GL_READ_FRAMEBUFFER 0x8CA8 +#define GL_DRAW_FRAMEBUFFER 0x8CA9 +#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA +#define GL_RENDERBUFFER_SAMPLES 0x8CAB +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 +#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF +#define GL_COLOR_ATTACHMENT1 0x8CE1 +#define GL_COLOR_ATTACHMENT2 0x8CE2 +#define GL_COLOR_ATTACHMENT3 0x8CE3 +#define GL_COLOR_ATTACHMENT4 0x8CE4 +#define GL_COLOR_ATTACHMENT5 0x8CE5 +#define GL_COLOR_ATTACHMENT6 0x8CE6 +#define GL_COLOR_ATTACHMENT7 0x8CE7 +#define GL_COLOR_ATTACHMENT8 0x8CE8 +#define GL_COLOR_ATTACHMENT9 0x8CE9 +#define GL_COLOR_ATTACHMENT10 0x8CEA +#define GL_COLOR_ATTACHMENT11 0x8CEB +#define GL_COLOR_ATTACHMENT12 0x8CEC +#define GL_COLOR_ATTACHMENT13 0x8CED +#define GL_COLOR_ATTACHMENT14 0x8CEE +#define GL_COLOR_ATTACHMENT15 0x8CEF +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 +#define GL_MAX_SAMPLES 0x8D57 +#define GL_HALF_FLOAT 0x140B +#define GL_MAP_READ_BIT 0x0001 +#define GL_MAP_WRITE_BIT 0x0002 +#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 +#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 +#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 +#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 +#define GL_RG 0x8227 +#define GL_RG_INTEGER 0x8228 +#define GL_R8 0x8229 +#define GL_RG8 0x822B +#define GL_R16F 0x822D +#define GL_R32F 0x822E +#define GL_RG16F 0x822F +#define GL_RG32F 0x8230 +#define GL_R8I 0x8231 +#define GL_R8UI 0x8232 +#define GL_R16I 0x8233 +#define GL_R16UI 0x8234 +#define GL_R32I 0x8235 +#define GL_R32UI 0x8236 +#define GL_RG8I 0x8237 +#define GL_RG8UI 0x8238 +#define GL_RG16I 0x8239 +#define GL_RG16UI 0x823A +#define GL_RG32I 0x823B +#define GL_RG32UI 0x823C +#define GL_VERTEX_ARRAY_BINDING 0x85B5 +#define GL_R8_SNORM 0x8F94 +#define GL_RG8_SNORM 0x8F95 +#define GL_RGB8_SNORM 0x8F96 +#define GL_RGBA8_SNORM 0x8F97 +#define GL_SIGNED_NORMALIZED 0x8F9C +#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 +#define GL_COPY_READ_BUFFER 0x8F36 +#define GL_COPY_WRITE_BUFFER 0x8F37 +#define GL_COPY_READ_BUFFER_BINDING GL_COPY_READ_BUFFER +#define GL_COPY_WRITE_BUFFER_BINDING GL_COPY_WRITE_BUFFER +#define GL_UNIFORM_BUFFER 0x8A11 +#define GL_UNIFORM_BUFFER_BINDING 0x8A28 +#define GL_UNIFORM_BUFFER_START 0x8A29 +#define GL_UNIFORM_BUFFER_SIZE 0x8A2A +#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B +#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D +#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E +#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F +#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 +#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 +#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 +#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 +#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 +#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 +#define GL_UNIFORM_TYPE 0x8A37 +#define GL_UNIFORM_SIZE 0x8A38 +#define GL_UNIFORM_NAME_LENGTH 0x8A39 +#define GL_UNIFORM_BLOCK_INDEX 0x8A3A +#define GL_UNIFORM_OFFSET 0x8A3B +#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C +#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D +#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E +#define GL_UNIFORM_BLOCK_BINDING 0x8A3F +#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 +#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 +#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 +#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 +#define GL_INVALID_INDEX 0xFFFFFFFFu +#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 +#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 +#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 +#define GL_OBJECT_TYPE 0x9112 +#define GL_SYNC_CONDITION 0x9113 +#define GL_SYNC_STATUS 0x9114 +#define GL_SYNC_FLAGS 0x9115 +#define GL_SYNC_FENCE 0x9116 +#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 +#define GL_UNSIGNALED 0x9118 +#define GL_SIGNALED 0x9119 +#define GL_ALREADY_SIGNALED 0x911A +#define GL_TIMEOUT_EXPIRED 0x911B +#define GL_CONDITION_SATISFIED 0x911C +#define GL_WAIT_FAILED 0x911D +#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 +#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull +#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE +#define GL_ANY_SAMPLES_PASSED 0x8C2F +#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A +#define GL_SAMPLER_BINDING 0x8919 +#define GL_RGB10_A2UI 0x906F +#define GL_TEXTURE_SWIZZLE_R 0x8E42 +#define GL_TEXTURE_SWIZZLE_G 0x8E43 +#define GL_TEXTURE_SWIZZLE_B 0x8E44 +#define GL_TEXTURE_SWIZZLE_A 0x8E45 +#define GL_GREEN 0x1904 +#define GL_BLUE 0x1905 +#define GL_INT_2_10_10_10_REV 0x8D9F +#define GL_TRANSFORM_FEEDBACK 0x8E22 +#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 +#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 +#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 +#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 +#define GL_PROGRAM_BINARY_LENGTH 0x8741 +#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE +#define GL_PROGRAM_BINARY_FORMATS 0x87FF +#define GL_COMPRESSED_R11_EAC 0x9270 +#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 +#define GL_COMPRESSED_RG11_EAC 0x9272 +#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 +#define GL_COMPRESSED_RGB8_ETC2 0x9274 +#define GL_COMPRESSED_SRGB8_ETC2 0x9275 +#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 +#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 +#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 +#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 +#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F +#define GL_MAX_ELEMENT_INDEX 0x8D6B +#define GL_NUM_SAMPLE_COUNTS 0x9380 +#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF + +/*------------------------------------------------------------------------- + * Entrypoint definitions + *-----------------------------------------------------------------------*/ + +/* OpenGL ES 2.0 */ + +GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); +GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); +GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name); +GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); +GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); +GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); +GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); +GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode); +GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); +GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); +GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage); +GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data); +GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); +GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); +GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat depth); +GL_APICALL void GL_APIENTRY glClearStencil (GLint s); +GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); +GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data); +GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data); +GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); +GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); +GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); +GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers); +GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers); +GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); +GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers); +GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); +GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures); +GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); +GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); +GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f); +GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); +GL_APICALL void GL_APIENTRY glDisable (GLenum cap); +GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); +GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); +GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices); +GL_APICALL void GL_APIENTRY glEnable (GLenum cap); +GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); +GL_APICALL void GL_APIENTRY glFinish (void); +GL_APICALL void GL_APIENTRY glFlush (void); +GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); +GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers); +GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); +GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers); +GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers); +GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures); +GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); +GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); +GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders); +GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name); +GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params); +GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params); +GL_APICALL GLenum GL_APIENTRY glGetError (void); +GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params); +GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog); +GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog); +GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); +GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source); +GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name); +GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params); +GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params); +GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params); +GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name); +GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params); +GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer); +GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); +GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); +GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); +GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer); +GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program); +GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); +GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader); +GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture); +GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); +GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); +GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); +GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels); +GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); +GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); +GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length); +GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length); +GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); +GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); +GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass); +GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels); +GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); +GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params); +GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params); +GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels); +GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x); +GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v); +GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x); +GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v); +GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y); +GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v); +GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y); +GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v); +GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z); +GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v); +GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z); +GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v); +GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v); +GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w); +GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v); +GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); +GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); +GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x); +GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values); +GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y); +GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values); +GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z); +GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values); +GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values); +GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr); +GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); + +/* OpenGL ES 3.0 */ + +GL_APICALL void GL_APIENTRY glReadBuffer (GLenum mode); +GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices); +GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels); +GL_APICALL void GL_APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels); +GL_APICALL void GL_APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data); +GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data); +GL_APICALL void GL_APIENTRY glGenQueries (GLsizei n, GLuint* ids); +GL_APICALL void GL_APIENTRY glDeleteQueries (GLsizei n, const GLuint* ids); +GL_APICALL GLboolean GL_APIENTRY glIsQuery (GLuint id); +GL_APICALL void GL_APIENTRY glBeginQuery (GLenum target, GLuint id); +GL_APICALL void GL_APIENTRY glEndQuery (GLenum target); +GL_APICALL void GL_APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint* params); +GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer (GLenum target); +GL_APICALL void GL_APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, GLvoid** params); +GL_APICALL void GL_APIENTRY glDrawBuffers (GLsizei n, const GLenum* bufs); +GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +GL_APICALL void GL_APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +GL_APICALL GLvoid* GL_APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +GL_APICALL void GL_APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); +GL_APICALL void GL_APIENTRY glBindVertexArray (GLuint array); +GL_APICALL void GL_APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint* arrays); +GL_APICALL void GL_APIENTRY glGenVertexArrays (GLsizei n, GLuint* arrays); +GL_APICALL GLboolean GL_APIENTRY glIsVertexArray (GLuint array); +GL_APICALL void GL_APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint* data); +GL_APICALL void GL_APIENTRY glBeginTransformFeedback (GLenum primitiveMode); +GL_APICALL void GL_APIENTRY glEndTransformFeedback (void); +GL_APICALL void GL_APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +GL_APICALL void GL_APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); +GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode); +GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name); +GL_APICALL void GL_APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer); +GL_APICALL void GL_APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint* params); +GL_APICALL void GL_APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); +GL_APICALL void GL_APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +GL_APICALL void GL_APIENTRY glVertexAttribI4iv (GLuint index, const GLint* v); +GL_APICALL void GL_APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint* v); +GL_APICALL void GL_APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint* params); +GL_APICALL GLint GL_APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); +GL_APICALL void GL_APIENTRY glUniform1ui (GLint location, GLuint v0); +GL_APICALL void GL_APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); +GL_APICALL void GL_APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); +GL_APICALL void GL_APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +GL_APICALL void GL_APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint* value); +GL_APICALL void GL_APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint* value); +GL_APICALL void GL_APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint* value); +GL_APICALL void GL_APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint* value); +GL_APICALL void GL_APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint* value); +GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint* value); +GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat* value); +GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +GL_APICALL const GLubyte* GL_APIENTRY glGetStringi (GLenum name, GLuint index); +GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices); +GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params); +GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar* uniformBlockName); +GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName); +GL_APICALL void GL_APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +GL_APICALL void GL_APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instanceCount); +GL_APICALL void GL_APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount); +GL_APICALL GLsync GL_APIENTRY glFenceSync (GLenum condition, GLbitfield flags); +GL_APICALL GLboolean GL_APIENTRY glIsSync (GLsync sync); +GL_APICALL void GL_APIENTRY glDeleteSync (GLsync sync); +GL_APICALL GLenum GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +GL_APICALL void GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); +GL_APICALL void GL_APIENTRY glGetInteger64v (GLenum pname, GLint64* params); +GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values); +GL_APICALL void GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64* data); +GL_APICALL void GL_APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64* params); +GL_APICALL void GL_APIENTRY glGenSamplers (GLsizei count, GLuint* samplers); +GL_APICALL void GL_APIENTRY glDeleteSamplers (GLsizei count, const GLuint* samplers); +GL_APICALL GLboolean GL_APIENTRY glIsSampler (GLuint sampler); +GL_APICALL void GL_APIENTRY glBindSampler (GLuint unit, GLuint sampler); +GL_APICALL void GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint* param); +GL_APICALL void GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); +GL_APICALL void GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat* param); +GL_APICALL void GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat* params); +GL_APICALL void GL_APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); +GL_APICALL void GL_APIENTRY glBindTransformFeedback (GLenum target, GLuint id); +GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint* ids); +GL_APICALL void GL_APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint* ids); +GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedback (GLuint id); +GL_APICALL void GL_APIENTRY glPauseTransformFeedback (void); +GL_APICALL void GL_APIENTRY glResumeTransformFeedback (void); +GL_APICALL void GL_APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary); +GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length); +GL_APICALL void GL_APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); +GL_APICALL void GL_APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum* attachments); +GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/opengl/include/GLES3/gl3ext.h b/opengl/include/GLES3/gl3ext.h new file mode 100644 index 0000000..4d4ea96 --- /dev/null +++ b/opengl/include/GLES3/gl3ext.h @@ -0,0 +1,24 @@ +#ifndef __gl3ext_h_ +#define __gl3ext_h_ + +/* $Revision: 17809 $ on $Date:: 2012-05-14 08:03:36 -0700 #$ */ + +/* + * This document is licensed under the SGI Free Software B License Version + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . + */ + +/* OpenGL ES 3 Extensions + * + * After an OES extension's interactions with OpenGl ES 3.0 have been documented, + * its tokens and function definitions should be added to this file in a manner + * that does not conflict with gl2ext.h or gl3.h. + * + * Tokens and function definitions for extensions that have become standard + * features in OpenGL ES 3.0 will not be added to this file. + * + * Applications using OpenGL-ES-2-only extensions should include gl2ext.h + */ + +#endif /* __gl3ext_h_ */ + diff --git a/opengl/include/GLES3/gl3platform.h b/opengl/include/GLES3/gl3platform.h new file mode 100644 index 0000000..1bd1a85 --- /dev/null +++ b/opengl/include/GLES3/gl3platform.h @@ -0,0 +1,30 @@ +#ifndef __gl3platform_h_ +#define __gl3platform_h_ + +/* $Revision: 18437 $ on $Date:: 2012-07-08 23:31:39 -0700 #$ */ + +/* + * This document is licensed under the SGI Free Software B License Version + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . + */ + +/* Platform-specific types and definitions for OpenGL ES 3.X gl3.h + * + * Adopters may modify khrplatform.h and this file to suit their platform. + * You are encouraged to submit all modifications to the Khronos group so that + * they can be included in future versions of this file. Please submit changes + * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) + * by filing a bug against product "OpenGL-ES" component "Registry". + */ + +#include <KHR/khrplatform.h> + +#ifndef GL_APICALL +#define GL_APICALL KHRONOS_APICALL +#endif + +#ifndef GL_APIENTRY +#define GL_APIENTRY KHRONOS_APIENTRY +#endif + +#endif /* __gl3platform_h_ */ diff --git a/opengl/include/KHR/khrplatform.h b/opengl/include/KHR/khrplatform.h index 1660bd7..153bbbd 100644 --- a/opengl/include/KHR/khrplatform.h +++ b/opengl/include/KHR/khrplatform.h @@ -24,9 +24,10 @@ ** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. */ -/* Platform-specific types and definitions. - * $Revision: 7244 $ on $Date: 2009-01-20 17:06:59 -0800 (Tue, 20 Jan 2009) $ - * +/* Khronos platform-specific types and definitions. + * + * $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $ + * * Adopters may modify this file to suit their platform. Adopters are * encouraged to submit platform specific modifications to the Khronos * group so that they can be included in future versions of this file. @@ -37,19 +38,19 @@ * A predefined template which fills in some of the bug fields can be * reached using http://tinyurl.com/khrplatform-h-bugreport, but you * must create a Bugzilla login first. - * + * * * See the Implementer's Guidelines for information about where this file - * should be located on your system. + * should be located on your system and for more details of its use: * http://www.khronos.org/registry/implementers_guide.pdf * - * * This file should be included as * #include <KHR/khrplatform.h> - * by the Khronos API header file that uses its types and defines. + * by Khronos client API header files that use its types and defines. + * + * The types in khrplatform.h should only be used to define API-specific types. * - * The types in this file should only be used to define API-specific types. - * Types defined in this file: + * Types defined in khrplatform.h: * khronos_int8_t signed 8 bit * khronos_uint8_t unsigned 8 bit * khronos_int16_t signed 16 bit @@ -67,16 +68,25 @@ * khronos_utime_nanoseconds_t unsigned time interval or absolute time in * nanoseconds * khronos_stime_nanoseconds_t signed time interval in nanoseconds + * khronos_boolean_enum_t enumerated boolean type. This should + * only be used as a base type when a client API's boolean type is + * an enum. Client APIs which use an integer or other type for + * booleans cannot use this as the base type for their boolean. * - * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. - * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. - * + * Tokens defined in khrplatform.h: * - * Macros defined in this file: + * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. + * + * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. + * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. + * + * Calling convention macros defined in this file: * KHRONOS_APICALL * KHRONOS_APIENTRY * KHRONOS_APIATTRIBUTES + * * These may be used in function prototypes as: + * * KHRONOS_APICALL void KHRONOS_APIENTRY funcname( * int arg1, * int arg2) KHRONOS_APIATTRIBUTES; @@ -228,16 +238,34 @@ typedef float khronos_float_t; #if KHRONOS_SUPPORT_INT64 /* Time types * - * These types can be used to represent a time interval in nanoseconds or - * an absolute Unadjusted System Time. Unadjusted System Time is the number - * of nanoseconds since some arbitrary system event (e.g. since the last - * time the system booted). The Unadjusted System Time is an unsigned - * 64 bit value that wraps back to 0 every 584 years. Time intervals + * These types can be used to represent a time interval in nanoseconds or + * an absolute Unadjusted System Time. Unadjusted System Time is the number + * of nanoseconds since some arbitrary system event (e.g. since the last + * time the system booted). The Unadjusted System Time is an unsigned + * 64 bit value that wraps back to 0 every 584 years. Time intervals * may be either signed or unsigned. */ typedef khronos_uint64_t khronos_utime_nanoseconds_t; typedef khronos_int64_t khronos_stime_nanoseconds_t; #endif +/* + * Dummy value used to pad enum types to 32 bits. + */ +#ifndef KHRONOS_MAX_ENUM +#define KHRONOS_MAX_ENUM 0x7FFFFFFF +#endif + +/* + * Enumerated boolean type + * + * Values other than zero should be considered to be true. Therefore + * comparisons should not be made against KHRONOS_TRUE. + */ +typedef enum { + KHRONOS_FALSE = 0, + KHRONOS_TRUE = 1, + KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM +} khronos_boolean_enum_t; #endif /* __khrplatform_h_ */ diff --git a/opengl/include/MODULE_LICENSE_MIT b/opengl/include/MODULE_LICENSE_MIT new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/opengl/include/MODULE_LICENSE_MIT diff --git a/opengl/libagl/Android.mk b/opengl/libagl/Android.mk index 9b8d3fe..9886bf0 100644 --- a/opengl/libagl/Android.mk +++ b/opengl/libagl/Android.mk @@ -26,7 +26,7 @@ LOCAL_CFLAGS += -DLOG_TAG=\"libagl\" LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES -DEGL_EGLEXT_PROTOTYPES LOCAL_CFLAGS += -fvisibility=hidden -LOCAL_SHARED_LIBRARIES := libcutils libhardware libutils libpixelflinger libETC1 libui +LOCAL_SHARED_LIBRARIES := libcutils libhardware libutils liblog libpixelflinger libETC1 libui LOCAL_LDLIBS := -lpthread -ldl ifeq ($(TARGET_ARCH),arm) diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp index 172ef95..0ed5727 100644 --- a/opengl/libagl/egl.cpp +++ b/opengl/libagl/egl.cpp @@ -147,6 +147,7 @@ struct egl_surface_t EGLDisplay dpy; EGLConfig config; EGLContext ctx; + bool zombie; egl_surface_t(EGLDisplay dpy, EGLConfig config, int32_t depthFormat); virtual ~egl_surface_t(); @@ -173,7 +174,7 @@ protected: egl_surface_t::egl_surface_t(EGLDisplay dpy, EGLConfig config, int32_t depthFormat) - : magic(MAGIC), dpy(dpy), config(config), ctx(0) + : magic(MAGIC), dpy(dpy), config(config), ctx(0), zombie(false) { depth.version = sizeof(GGLSurface); depth.data = 0; @@ -419,9 +420,8 @@ void egl_window_surface_v2_t::disconnect() bits = NULL; unlock(buffer); } - // enqueue the last frame - nativeWindow->queueBuffer(nativeWindow, buffer, -1); if (buffer) { + nativeWindow->cancelBuffer(nativeWindow, buffer, -1); buffer->common.decRef(&buffer->common); buffer = 0; } @@ -1580,11 +1580,12 @@ EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface eglSurface) if (surface->dpy != dpy) return setError(EGL_BAD_DISPLAY, EGL_FALSE); if (surface->ctx) { - // FIXME: this surface is current check what the spec says + // defer disconnect/delete until no longer current + surface->zombie = true; + } else { surface->disconnect(); - surface->ctx = 0; + delete surface; } - delete surface; } return EGL_TRUE; } @@ -1736,6 +1737,9 @@ EGLBoolean eglMakeCurrent( EGLDisplay dpy, EGLSurface draw, if (c->draw) { egl_surface_t* s = reinterpret_cast<egl_surface_t*>(c->draw); s->disconnect(); + s->ctx = EGL_NO_CONTEXT; + if (s->zombie) + delete s; } if (c->read) { // FIXME: unlock/disconnect the read surface too @@ -1777,8 +1781,10 @@ EGLBoolean eglMakeCurrent( EGLDisplay dpy, EGLSurface draw, egl_surface_t* r = (egl_surface_t*)c->read; if (d) { c->draw = 0; - d->ctx = EGL_NO_CONTEXT; d->disconnect(); + d->ctx = EGL_NO_CONTEXT; + if (d->zombie) + delete d; } if (r) { c->read = 0; diff --git a/opengl/libs/Android.mk b/opengl/libs/Android.mk index d025ae8..b4756dd 100644 --- a/opengl/libs/Android.mk +++ b/opengl/libs/Android.mk @@ -4,6 +4,20 @@ LOCAL_PATH:= $(call my-dir) # Build META EGL library # +egl.cfg_config_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) +egl.cfg_config_module := $(LOCAL_MODULE) +endif + include $(CLEAR_VARS) LOCAL_SRC_FILES:= \ @@ -18,7 +32,7 @@ LOCAL_SRC_FILES:= \ EGL/Loader.cpp \ # -LOCAL_SHARED_LIBRARIES += libcutils libutils libGLES_trace +LOCAL_SHARED_LIBRARIES += libcutils libutils liblog libGLES_trace LOCAL_LDLIBS := -lpthread -ldl LOCAL_MODULE:= libEGL LOCAL_LDFLAGS += -Wl,--exclude-libs=ALL @@ -56,24 +70,10 @@ 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 +LOCAL_REQUIRED_MODULES := $(egl.cfg_config_module) +egl.cfg_config_module := -endif +include $(BUILD_SHARED_LIBRARY) ############################################################################### # Build the wrapper OpenGL ES 1.x library @@ -85,7 +85,7 @@ LOCAL_SRC_FILES:= \ GLES_CM/gl.cpp.arm \ # -LOCAL_SHARED_LIBRARIES += libcutils libEGL +LOCAL_SHARED_LIBRARIES += libcutils liblog libEGL LOCAL_LDLIBS := -lpthread -ldl LOCAL_MODULE:= libGLESv1_CM @@ -110,7 +110,7 @@ LOCAL_SRC_FILES:= \ GLES2/gl2.cpp.arm \ # -LOCAL_SHARED_LIBRARIES += libcutils libutils libEGL +LOCAL_SHARED_LIBRARIES += libcutils libutils liblog libEGL LOCAL_LDLIBS := -lpthread -ldl LOCAL_MODULE:= libGLESv2 @@ -124,6 +124,20 @@ LOCAL_CFLAGS += -fvisibility=hidden include $(BUILD_SHARED_LIBRARY) +# Symlink libGLESv3.so -> libGLESv2.so +# Platform modules should link against libGLESv2.so (-lGLESv2), but NDK apps +# will be linked against libGLESv3.so. +LIBGLESV2 := $(LOCAL_INSTALLED_MODULE) +LIBGLESV3 := $(subst libGLESv2,libGLESv3,$(LIBGLESV2)) +$(LIBGLESV3): $(LIBGLESV2) + @echo "Symlink: $@ -> $(notdir $<)" + @mkdir -p $(dir $@) + $(hide) ln -sf $(notdir $<) $@ +ALL_MODULES.$(LOCAL_MODULE).INSTALLED := \ + $(ALL_MODULES.$(LOCAL_MODULE).INSTALLED) $(LIBGLESV3) +LIBGLESV2 := +LIBGLESV3 := + ############################################################################### # Build the ETC1 host static library # diff --git a/opengl/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp index 9ee3686..00bfa5a 100644 --- a/opengl/libs/EGL/Loader.cpp +++ b/opengl/libs/EGL/Loader.cpp @@ -27,9 +27,9 @@ #include <EGL/egl.h> +#include "../glestrace.h" + #include "egldefs.h" -#include "glestrace.h" -#include "hooks.h" #include "Loader.h" // ---------------------------------------------------------------------------- diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp index 0d4bed5..6ac8724 100644 --- a/opengl/libs/EGL/egl.cpp +++ b/opengl/libs/EGL/egl.cpp @@ -1,16 +1,16 @@ -/* +/* ** 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 + ** 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 + ** 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 + ** 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. */ @@ -23,8 +23,6 @@ #include <EGL/egl.h> #include <EGL/eglext.h> -#include <GLES/gl.h> -#include <GLES/glext.h> #include <cutils/log.h> #include <cutils/atomic.h> @@ -34,11 +32,11 @@ #include <utils/CallStack.h> #include <utils/String8.h> -#include "egldefs.h" -#include "egl_impl.h" +#include "../egl_impl.h" +#include "../glestrace.h" + #include "egl_tls.h" -#include "glestrace.h" -#include "hooks.h" +#include "egldefs.h" #include "Loader.h" #include "egl_display.h" @@ -84,13 +82,20 @@ static int sEGLApplicationTraceLevel; static bool sEGLSystraceEnabled; static bool sEGLGetErrorEnabled; -int gEGLDebugLevel; -static int sEGLApplicationDebugLevel; +static volatile int sEGLDebugLevel; extern gl_hooks_t gHooksTrace; extern gl_hooks_t gHooksSystrace; extern gl_hooks_t gHooksErrorTrace; +int getEGLDebugLevel() { + return sEGLDebugLevel; +} + +void setEGLDebugLevel(int level) { + sEGLDebugLevel = level; +} + static inline void setGlTraceThreadSpecific(gl_hooks_t const *value) { pthread_setspecific(gGLTraceKey, value); } @@ -122,36 +127,36 @@ void initEglTraceLevel() { } void initEglDebugLevel() { - int propertyLevel = 0; - char value[PROPERTY_VALUE_MAX]; - - // check system property only on userdebug or eng builds - property_get("ro.debuggable", value, "0"); - if (value[0] == '0') - return; + if (getEGLDebugLevel() == 0) { + char value[PROPERTY_VALUE_MAX]; - property_get("debug.egl.debug_proc", value, ""); - if (strlen(value) > 0) { - 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 (!strncmp(value, cmdline, strlen(value))) { - // set EGL debug if the "debug.egl.debug_proc" property - // matches the prefix of this application's command line - propertyLevel = 1; + // check system property only on userdebug or eng builds + property_get("ro.debuggable", value, "0"); + if (value[0] == '0') + return; + + property_get("debug.egl.debug_proc", value, ""); + if (strlen(value) > 0) { + FILE * file = fopen("/proc/self/cmdline", "r"); + if (file) { + char cmdline[256]; + if (fgets(cmdline, sizeof(cmdline), file)) { + if (!strncmp(value, cmdline, strlen(value))) { + // set EGL debug if the "debug.egl.debug_proc" property + // matches the prefix of this application's command line + setEGLDebugLevel(1); + } } + fclose(file); } - fclose(file); } } - gEGLDebugLevel = propertyLevel || sEGLApplicationDebugLevel; - if (gEGLDebugLevel > 0) { - GLTrace_start(); + if (getEGLDebugLevel() > 0) { + if (GLTrace_start() < 0) { + ALOGE("Error starting Tracer for OpenGL ES. Disabling.."); + setEGLDebugLevel(0); + } } } @@ -165,10 +170,11 @@ void setGLHooksThreadSpecific(gl_hooks_t const *value) { } else if (sEGLTraceLevel > 0) { setGlTraceThreadSpecific(value); setGlThreadSpecific(&gHooksTrace); - } else if (gEGLDebugLevel > 0 && value != &gHooksNoContext) { + } else if (getEGLDebugLevel() > 0 && value != &gHooksNoContext) { setGlTraceThreadSpecific(value); setGlThreadSpecific(GLTrace_getGLHooks()); } else { + setGlTraceThreadSpecific(NULL); setGlThreadSpecific(value); } } @@ -186,9 +192,12 @@ void setGLTraceLevel(int level) { * Global entry point to allow applications to modify their own debug level. * Debugging is enabled if either the application requested it, or if the system property * matches the application's name. + * Note that this only sets the debug level. The value is read and used either in + * initEglDebugLevel() if the application hasn't initialized its display yet, or when + * eglSwapBuffers() is called next. */ void EGLAPI setGLDebugLevel(int level) { - sEGLApplicationDebugLevel = level; + setEGLDebugLevel(level); } #else @@ -213,15 +222,13 @@ static int gl_no_context() { char value[PROPERTY_VALUE_MAX]; property_get("debug.egl.callstack", value, "0"); if (atoi(value)) { - CallStack stack; - stack.update(); - stack.dump(); + CallStack stack(LOG_TAG); } } return 0; } -static void early_egl_init(void) +static void early_egl_init(void) { #if !USE_FAST_TLS_KEY pthread_key_create(&gGLWrapperKey, NULL); @@ -229,12 +236,11 @@ static void early_egl_init(void) #if EGL_TRACE pthread_key_create(&gGLTraceKey, NULL); initEglTraceLevel(); - initEglDebugLevel(); #endif uint32_t addr = (uint32_t)((void*)gl_no_context); android_memset32( - (uint32_t*)(void*)&gHooksNoContext, - addr, + (uint32_t*)(void*)&gHooksNoContext, + addr, sizeof(gHooksNoContext)); setGLHooksThreadSpecific(&gHooksNoContext); @@ -381,7 +387,7 @@ gl_hooks_t const* getGlThreadSpecific() { #define EGL_ENTRY(_r, _api, ...) #_api, char const * const gl_names[] = { - #include "entries.in" + #include "../entries.in" NULL }; diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp index 065faf2..74d3973 100644 --- a/opengl/libs/EGL/eglApi.cpp +++ b/opengl/libs/EGL/eglApi.cpp @@ -1,16 +1,16 @@ -/* +/* ** 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 + ** 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 + ** 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 + ** 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. */ @@ -25,8 +25,6 @@ #include <EGL/egl.h> #include <EGL/eglext.h> -#include <GLES/gl.h> -#include <GLES/glext.h> #include <cutils/log.h> #include <cutils/atomic.h> @@ -39,13 +37,11 @@ #include <utils/String8.h> #include <utils/Trace.h> -#include "egl_impl.h" -#include "egl_tls.h" -#include "glestrace.h" -#include "hooks.h" +#include "../egl_impl.h" +#include "../glestrace.h" +#include "../hooks.h" #include "egl_display.h" -#include "egl_impl.h" #include "egl_object.h" #include "egl_tls.h" #include "egldefs.h" @@ -54,28 +50,107 @@ using namespace android; // ---------------------------------------------------------------------------- -#define EGL_VERSION_HW_ANDROID 0x3143 +namespace android { struct extention_map_t { const char* name; __eglMustCastToProperFunctionPointerType address; }; -static const extention_map_t sExtentionMap[] = { +/* + * This is the list of EGL extensions 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: gExtensionString MUST have a single space as the last character. + */ +extern char const * const gExtensionString = + "EGL_KHR_image " // mandatory + "EGL_KHR_image_base " // mandatory + "EGL_KHR_image_pixmap " + "EGL_KHR_lock_surface " + "EGL_KHR_gl_texture_2D_image " + "EGL_KHR_gl_texture_cubemap_image " + "EGL_KHR_gl_renderbuffer_image " + "EGL_KHR_reusable_sync " + "EGL_KHR_fence_sync " + "EGL_KHR_create_context " + "EGL_EXT_create_context_robustness " + "EGL_NV_system_time " + "EGL_ANDROID_image_native_buffer " // mandatory + "EGL_KHR_wait_sync " // strongly recommended + "EGL_ANDROID_presentation_time " + ; + +// extensions not exposed to applications but used by the ANDROID system +// "EGL_ANDROID_blob_cache " // strongly recommended +// "EGL_IMG_hibernate_process " // optional +// "EGL_ANDROID_native_fence_sync " // strongly recommended +// "EGL_ANDROID_framebuffer_target " // mandatory for HWC 1.1 +// "EGL_ANDROID_recordable " // mandatory + + +/* + * EGL Extensions entry-points exposed to 3rd party applications + * (keep in sync with gExtensionString above) + * + */ +static const extention_map_t sExtensionMap[] = { + // EGL_KHR_lock_surface { "eglLockSurfaceKHR", (__eglMustCastToProperFunctionPointerType)&eglLockSurfaceKHR }, { "eglUnlockSurfaceKHR", (__eglMustCastToProperFunctionPointerType)&eglUnlockSurfaceKHR }, + + // EGL_KHR_image, EGL_KHR_image_base { "eglCreateImageKHR", (__eglMustCastToProperFunctionPointerType)&eglCreateImageKHR }, { "eglDestroyImageKHR", (__eglMustCastToProperFunctionPointerType)&eglDestroyImageKHR }, + + // EGL_KHR_reusable_sync, EGL_KHR_fence_sync + { "eglCreateSyncKHR", + (__eglMustCastToProperFunctionPointerType)&eglCreateSyncKHR }, + { "eglDestroySyncKHR", + (__eglMustCastToProperFunctionPointerType)&eglDestroySyncKHR }, + { "eglClientWaitSyncKHR", + (__eglMustCastToProperFunctionPointerType)&eglClientWaitSyncKHR }, + { "eglSignalSyncKHR", + (__eglMustCastToProperFunctionPointerType)&eglSignalSyncKHR }, + { "eglGetSyncAttribKHR", + (__eglMustCastToProperFunctionPointerType)&eglGetSyncAttribKHR }, + + // EGL_NV_system_time { "eglGetSystemTimeFrequencyNV", (__eglMustCastToProperFunctionPointerType)&eglGetSystemTimeFrequencyNV }, { "eglGetSystemTimeNV", (__eglMustCastToProperFunctionPointerType)&eglGetSystemTimeNV }, + + // EGL_KHR_wait_sync + { "eglWaitSyncKHR", + (__eglMustCastToProperFunctionPointerType)&eglWaitSyncKHR }, + + // EGL_ANDROID_presentation_time + { "eglPresentationTimeANDROID", + (__eglMustCastToProperFunctionPointerType)&eglPresentationTimeANDROID }, }; +/* + * These extensions entry-points should not be exposed to applications. + * They're used internally by the Android EGL layer. + */ +#define FILTER_EXTENSIONS(procname) \ + (!strcmp((procname), "eglSetBlobCacheFuncsANDROID") || \ + !strcmp((procname), "eglHibernateProcessIMG") || \ + !strcmp((procname), "eglAwakenProcessIMG") || \ + !strcmp((procname), "eglDupNativeFenceFDANDROID")) + + + // accesses protected by sExtensionMapMutex static DefaultKeyedVector<String8, __eglMustCastToProperFunctionPointerType> sGLExtentionMap; static int sGLExtentionSlot = 0; @@ -93,14 +168,16 @@ static void(*findProcAddress(const char* name, // ---------------------------------------------------------------------------- -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 int getEGLDebugLevel(); +extern void setEGLDebugLevel(int level); extern gl_hooks_t gHooksTrace; + } // namespace android; + // ---------------------------------------------------------------------------- static inline void clearError() { egl_tls_t::clearError(); } @@ -153,7 +230,7 @@ EGLBoolean eglTerminate(EGLDisplay dpy) if (!dp) return setError(EGL_BAD_DISPLAY, EGL_FALSE); EGLBoolean res = dp->terminate(); - + return res; } @@ -234,7 +311,7 @@ EGLBoolean eglChooseConfig( EGLDisplay dpy, const EGLint *attrib_list, if (attribRendererable && attribRendererable[1] == EGL_OPENGL_ES2_BIT && (!attribCaveat || attribCaveat[1] != EGL_NONE)) { - + // Insert 2 extra attributes to force-enable MSAA 4x EGLint aaAttribs[attribCount + 4]; aaAttribs[0] = EGL_SAMPLE_BUFFERS; @@ -271,7 +348,7 @@ EGLBoolean eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, egl_connection_t* cnx = NULL; const egl_display_ptr dp = validate_display_connection(dpy, cnx); if (!dp) return EGL_FALSE; - + return cnx->egl.eglGetConfigAttrib( dp->disp.dpy, config, attribute, value); } @@ -370,7 +447,7 @@ EGLSurface eglCreatePbufferSurface( EGLDisplay dpy, EGLConfig config, } return EGL_NO_SURFACE; } - + EGLBoolean eglDestroySurface(EGLDisplay dpy, EGLSurface surface) { clearError(); @@ -456,7 +533,7 @@ EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config, if (attr == EGL_CONTEXT_CLIENT_VERSION) { if (value == 1) { version = egl_connection_t::GLESv1_INDEX; - } else if (value == 2) { + } else if (value == 2 || value == 3) { version = egl_connection_t::GLESv2_INDEX; } } @@ -465,7 +542,7 @@ EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config, egl_context_t* c = new egl_context_t(dpy, context, config, cnx, version); #if EGL_TRACE - if (gEGLDebugLevel > 0) + if (getEGLDebugLevel() > 0) GLTrace_eglCreateContext(version, c); #endif return c; @@ -491,7 +568,7 @@ EGLBoolean eglDestroyContext(EGLDisplay dpy, EGLContext ctx) ContextRef _c(dp.get(), 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.dpy, c->context); if (result == EGL_TRUE) { @@ -539,7 +616,7 @@ EGLBoolean eglMakeCurrent( EGLDisplay dpy, EGLSurface draw, // 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; @@ -578,7 +655,7 @@ EGLBoolean eglMakeCurrent( EGLDisplay dpy, EGLSurface draw, setGLHooksThreadSpecific(c->cnx->hooks[c->version]); egl_tls_t::setContext(ctx); #if EGL_TRACE - if (gEGLDebugLevel > 0) + if (getEGLDebugLevel() > 0) GLTrace_eglMakeCurrent(c->version, c->cnx->hooks[c->version], ctx); #endif _c.acquire(); @@ -637,7 +714,7 @@ EGLSurface eglGetCurrentSurface(EGLint readdraw) if (!c) return setError(EGL_BAD_CONTEXT, EGL_NO_SURFACE); switch (readdraw) { case EGL_READ: return c->read; - case EGL_DRAW: return c->draw; + case EGL_DRAW: return c->draw; default: return setError(EGL_BAD_PARAMETER, EGL_NO_SURFACE); } } @@ -708,18 +785,12 @@ __eglMustCastToProperFunctionPointerType eglGetProcAddress(const char *procname) return NULL; } - // These extensions should not be exposed to applications. They're used - // internally by the Android EGL layer. - if (!strcmp(procname, "eglSetBlobCacheFuncsANDROID") || - !strcmp(procname, "eglDupNativeFenceFDANDROID") || - !strcmp(procname, "eglWaitSyncANDROID") || - !strcmp(procname, "eglHibernateProcessIMG") || - !strcmp(procname, "eglAwakenProcessIMG")) { + if (FILTER_EXTENSIONS(procname)) { return NULL; } __eglMustCastToProperFunctionPointerType addr; - addr = findProcAddress(procname, sExtentionMap, NELEM(sExtentionMap)); + addr = findProcAddress(procname, sExtensionMap, NELEM(sExtensionMap)); if (addr) return addr; @@ -861,12 +932,42 @@ EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface draw) return setError(EGL_BAD_SURFACE, EGL_FALSE); #if EGL_TRACE - if (gEGLDebugLevel > 0) + gl_hooks_t const *trace_hooks = getGLTraceThreadSpecific(); + if (getEGLDebugLevel() > 0) { + if (trace_hooks == NULL) { + if (GLTrace_start() < 0) { + ALOGE("Disabling Tracer for OpenGL ES"); + setEGLDebugLevel(0); + } else { + // switch over to the trace version of hooks + EGLContext ctx = egl_tls_t::getContext(); + egl_context_t * const c = get_context(ctx); + if (c) { + setGLHooksThreadSpecific(c->cnx->hooks[c->version]); + GLTrace_eglMakeCurrent(c->version, c->cnx->hooks[c->version], ctx); + } + } + } + GLTrace_eglSwapBuffers(dpy, draw); + } else if (trace_hooks != NULL) { + // tracing is now disabled, so switch back to the non trace version + EGLContext ctx = egl_tls_t::getContext(); + egl_context_t * const c = get_context(ctx); + if (c) setGLHooksThreadSpecific(c->cnx->hooks[c->version]); + GLTrace_stop(); + } #endif egl_surface_t const * const s = get_surface(draw); + if (CC_UNLIKELY(dp->traceGpuCompletion)) { + EGLSyncKHR sync = eglCreateSyncKHR(dpy, EGL_SYNC_FENCE_KHR, NULL); + if (sync != EGL_NO_SYNC_KHR) { + FrameCompletionThread::queueSync(sync); + } + } + if (CC_UNLIKELY(dp->finishOnSwap)) { uint32_t pixel; egl_context_t * const c = get_context( egl_tls_t::getContext() ); @@ -877,19 +978,7 @@ EGLBoolean eglSwapBuffers(EGLDisplay dpy, EGLSurface draw) } } - EGLBoolean result = s->cnx->egl.eglSwapBuffers(dp->disp.dpy, s->surface); - - if (CC_UNLIKELY(dp->traceGpuCompletion)) { - EGLSyncKHR sync = EGL_NO_SYNC_KHR; - { - sync = eglCreateSyncKHR(dpy, EGL_SYNC_FENCE_KHR, NULL); - } - if (sync != EGL_NO_SYNC_KHR) { - FrameCompletionThread::queueSync(sync); - } - } - - return result; + return s->cnx->egl.eglSwapBuffers(dp->disp.dpy, s->surface); } EGLBoolean eglCopyBuffers( EGLDisplay dpy, EGLSurface surface, @@ -924,12 +1013,29 @@ const char* eglQueryString(EGLDisplay dpy, EGLint name) return dp->getExtensionString(); case EGL_CLIENT_APIS: return dp->getClientApiString(); - case EGL_VERSION_HW_ANDROID: - return dp->disp.queryString.version; } return setError(EGL_BAD_PARAMETER, (const char *)0); } +EGLAPI const char* eglQueryStringImplementationANDROID(EGLDisplay dpy, EGLint name) +{ + clearError(); + + const egl_display_ptr dp = validate_display(dpy); + if (!dp) return (const char *) NULL; + + switch (name) { + case EGL_VENDOR: + return dp->disp.queryString.vendor; + case EGL_VERSION: + return dp->disp.queryString.version; + case EGL_EXTENSIONS: + return dp->disp.queryString.extensions; + case EGL_CLIENT_APIS: + return dp->disp.queryString.clientApi; + } + return setError(EGL_BAD_PARAMETER, (const char *)0); +} // ---------------------------------------------------------------------------- // EGL 1.1 @@ -1081,7 +1187,7 @@ EGLBoolean eglReleaseThread(void) egl_tls_t::clearTLS(); #if EGL_TRACE - if (gEGLDebugLevel > 0) + if (getEGLDebugLevel() > 0) GLTrace_eglReleaseThread(); #endif return EGL_TRUE; @@ -1217,6 +1323,21 @@ EGLBoolean eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync) return result; } +EGLBoolean eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode) { + clearError(); + + const egl_display_ptr dp = validate_display(dpy); + if (!dp) return EGL_FALSE; + + EGLBoolean result = EGL_FALSE; + egl_connection_t* const cnx = &gEGLImpl; + if (cnx->dso && cnx->egl.eglSignalSyncKHR) { + result = cnx->egl.eglSignalSyncKHR( + dp->disp.dpy, sync, mode); + } + return result; +} + EGLint eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout) { @@ -1252,6 +1373,22 @@ EGLBoolean eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, } // ---------------------------------------------------------------------------- +// EGL_EGLEXT_VERSION 15 +// ---------------------------------------------------------------------------- + +EGLint eglWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags) { + clearError(); + const egl_display_ptr dp = validate_display(dpy); + if (!dp) return EGL_FALSE; + EGLint result = EGL_FALSE; + egl_connection_t* const cnx = &gEGLImpl; + if (cnx->dso && cnx->egl.eglWaitSyncKHR) { + result = cnx->egl.eglWaitSyncKHR(dp->disp.dpy, sync, flags); + } + return result; +} + +// ---------------------------------------------------------------------------- // ANDROID extensions // ---------------------------------------------------------------------------- @@ -1270,19 +1407,26 @@ EGLint eglDupNativeFenceFDANDROID(EGLDisplay dpy, EGLSyncKHR sync) return result; } -EGLint eglWaitSyncANDROID(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags) +EGLBoolean eglPresentationTimeANDROID(EGLDisplay dpy, EGLSurface surface, + EGLnsecsANDROID time) { clearError(); const egl_display_ptr dp = validate_display(dpy); - if (!dp) return EGL_NO_NATIVE_FENCE_FD_ANDROID; + if (!dp) { + return EGL_FALSE; + } - EGLint result = EGL_FALSE; - egl_connection_t* const cnx = &gEGLImpl; - if (cnx->dso && cnx->egl.eglWaitSyncANDROID) { - result = cnx->egl.eglWaitSyncANDROID(dp->disp.dpy, sync, flags); + SurfaceRef _s(dp.get(), surface); + if (!_s.get()) { + setError(EGL_BAD_SURFACE, EGL_FALSE); + return EGL_FALSE; } - return result; + + egl_surface_t const * const s = get_surface(surface); + native_window_set_buffers_timestamp(s->win.get(), time); + + return EGL_TRUE; } // ---------------------------------------------------------------------------- diff --git a/opengl/libs/EGL/egl_cache.cpp b/opengl/libs/EGL/egl_cache.cpp index 72655df..03397a9 100644 --- a/opengl/libs/EGL/egl_cache.cpp +++ b/opengl/libs/EGL/egl_cache.cpp @@ -14,9 +14,10 @@ ** limitations under the License. */ +#include "../egl_impl.h" + #include "egl_cache.h" #include "egl_display.h" -#include "egl_impl.h" #include "egldefs.h" #include <fcntl.h> diff --git a/opengl/libs/EGL/egl_display.cpp b/opengl/libs/EGL/egl_display.cpp index 7ca9e40..1955904 100644 --- a/opengl/libs/EGL/egl_display.cpp +++ b/opengl/libs/EGL/egl_display.cpp @@ -18,11 +18,12 @@ #include <string.h> +#include "../egl_impl.h" + #include "egl_cache.h" #include "egl_display.h" #include "egl_object.h" #include "egl_tls.h" -#include "egl_impl.h" #include "Loader.h" #include <cutils/properties.h> @@ -34,35 +35,7 @@ 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_EXT_create_context_robustness " - "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_framebuffer_target " // mandatory for HWC 1.1 -// "EGL_ANDROID_blob_cache " // strongly recommended -// "EGL_ANDROID_native_fence_sync " // strongly recommended -// "EGL_IMG_hibernate_process " // optional +extern char const * const gExtensionString; extern void initEglTraceLevel(); extern void initEglDebugLevel(); @@ -211,7 +184,7 @@ EGLBoolean egl_display_t::initialize(EGLint *major, EGLint *minor) { mClientApiString.setTo(sClientApiString); // we only add extensions that exist in the implementation - char const* start = sExtensionString; + char const* start = gExtensionString; char const* end; do { // find the space separating this extension for the next one diff --git a/opengl/libs/EGL/egl_display.h b/opengl/libs/EGL/egl_display.h index 7bb09a3..754085c 100644 --- a/opengl/libs/EGL/egl_display.h +++ b/opengl/libs/EGL/egl_display.h @@ -1,16 +1,16 @@ -/* +/* ** 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 + ** 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 + ** 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 + ** 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. */ @@ -24,8 +24,6 @@ #include <EGL/egl.h> #include <EGL/eglext.h> -#include <GLES/gl.h> -#include <GLES/glext.h> #include <cutils/compiler.h> #include <utils/SortedVector.h> @@ -33,7 +31,7 @@ #include <utils/String8.h> #include "egldefs.h" -#include "hooks.h" +#include "../hooks.h" // ---------------------------------------------------------------------------- namespace android { diff --git a/opengl/libs/EGL/egl_entries.in b/opengl/libs/EGL/egl_entries.in index 2ffd417..70d0e52 100644 --- a/opengl/libs/EGL/egl_entries.in +++ b/opengl/libs/EGL/egl_entries.in @@ -56,14 +56,30 @@ EGL_ENTRY(EGLBoolean, eglDestroyImageKHR, EGLDisplay, EGLImageKHR) 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, eglSignalSyncKHR, EGLDisplay, EGLSyncKHR, EGLenum) EGL_ENTRY(EGLBoolean, eglGetSyncAttribKHR, EGLDisplay, EGLSyncKHR, EGLint, EGLint *) +/* EGL_EGLEXT_VERSION 15 */ + +// EGL_ENTRY(EGLStreamKHR, eglCreateStreamKHR, EGLDisplay, const EGLint *) +// EGL_ENTRY(EGLBoolean, eglDestroyStreamKHR, EGLDisplay, EGLStreamKHR) +// EGL_ENTRY(EGLBoolean, eglStreamAttribKHR, EGLDisplay, EGLStreamKHR, EGLenum, EGLint) +// EGL_ENTRY(EGLBoolean, eglQueryStreamKHR, EGLDisplay, EGLStreamKHR, EGLenum, EGLint *) +// EGL_ENTRY(EGLBoolean, eglQueryStreamu64KHR, EGLDisplay, EGLStreamKHR, EGLenum, EGLuint64KHR *) +// EGL_ENTRY(EGLBoolean, eglStreamConsumerGLTextureExternalKHR, EGLDisplay, EGLStreamKHR) +// EGL_ENTRY(EGLBoolean, eglStreamConsumerAcquireKHR, EGLDisplay, EGLStreamKHR) +// EGL_ENTRY(EGLBoolean, eglStreamConsumerReleaseKHR, EGLDisplay, EGLStreamKHR) +// EGL_ENTRY(EGLSurface, eglCreateStreamProducerSurfaceKHR, EGLDisplay, EGLConfig, EGLStreamKHR, const EGLint *) +// EGL_ENTRY(EGLBoolean, eglQueryStreamTimeKHR, EGLDisplay, EGLStreamKHR, EGLenum, EGLTimeKHR*) +// EGL_ENTRY(EGLNativeFileDescriptorKHR, eglGetStreamFileDescriptorKHR, EGLDisplay, EGLStreamKHR) +// EGL_ENTRY(EGLStreamKHR, eglCreateStreamFromFileDescriptorKHR, EGLDisplay, EGLNativeFileDescriptorKHR) +EGL_ENTRY(EGLint, eglWaitSyncKHR, EGLDisplay, EGLSyncKHR, EGLint) + /* ANDROID extensions */ EGL_ENTRY(EGLBoolean, eglSetSwapRectangleANDROID, EGLDisplay, EGLSurface, EGLint, EGLint, EGLint, EGLint) EGL_ENTRY(EGLClientBuffer, eglGetRenderBufferANDROID, EGLDisplay, EGLSurface) EGL_ENTRY(EGLint, eglDupNativeFenceFDANDROID, EGLDisplay, EGLSyncKHR) -EGL_ENTRY(EGLint, eglWaitSyncANDROID, EGLDisplay, EGLSyncKHR, EGLint) /* NVIDIA extensions */ diff --git a/opengl/libs/EGL/egl_object.cpp b/opengl/libs/EGL/egl_object.cpp index aaa5e72..d3ee76d 100644 --- a/opengl/libs/EGL/egl_object.cpp +++ b/opengl/libs/EGL/egl_object.cpp @@ -1,16 +1,16 @@ -/* +/* ** 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 + ** 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 + ** 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 + ** 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. */ @@ -20,8 +20,6 @@ #include <EGL/egl.h> #include <EGL/eglext.h> -#include <GLES/gl.h> -#include <GLES/glext.h> #include <utils/threads.h> diff --git a/opengl/libs/EGL/egl_object.h b/opengl/libs/EGL/egl_object.h index 2a08424..518fdec 100644 --- a/opengl/libs/EGL/egl_object.h +++ b/opengl/libs/EGL/egl_object.h @@ -1,16 +1,16 @@ -/* +/* ** 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 + ** 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 + ** 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 + ** 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. */ @@ -24,8 +24,6 @@ #include <EGL/egl.h> #include <EGL/eglext.h> -#include <GLES/gl.h> -#include <GLES/glext.h> #include <utils/threads.h> #include <utils/String8.h> diff --git a/opengl/libs/EGL/egl_tls.cpp b/opengl/libs/EGL/egl_tls.cpp index 41cfae1..52312a2 100644 --- a/opengl/libs/EGL/egl_tls.cpp +++ b/opengl/libs/EGL/egl_tls.cpp @@ -78,9 +78,7 @@ void egl_tls_t::setErrorEtcImpl( char value[PROPERTY_VALUE_MAX]; property_get("debug.egl.callstack", value, "0"); if (atoi(value)) { - CallStack stack; - stack.update(); - stack.dump(); + CallStack stack(LOG_TAG); } } tls->error = error; diff --git a/opengl/libs/EGL/egl_tls.h b/opengl/libs/EGL/egl_tls.h index 2442ca0..56c5dba 100644 --- a/opengl/libs/EGL/egl_tls.h +++ b/opengl/libs/EGL/egl_tls.h @@ -22,7 +22,6 @@ #include <EGL/egl.h> #include "egldefs.h" -#include "hooks.h" // ---------------------------------------------------------------------------- namespace android { diff --git a/opengl/libs/EGL/egldefs.h b/opengl/libs/EGL/egldefs.h index c900c1c..1cfe561 100644 --- a/opengl/libs/EGL/egldefs.h +++ b/opengl/libs/EGL/egldefs.h @@ -17,7 +17,7 @@ #ifndef ANDROID_EGLDEFS_H #define ANDROID_EGLDEFS_H -#include "hooks.h" +#include "../hooks.h" #define VERSION_MAJOR 1 #define VERSION_MINOR 4 diff --git a/opengl/libs/EGL/getProcAddress.cpp b/opengl/libs/EGL/getProcAddress.cpp index d23da7a..c160aa0 100644 --- a/opengl/libs/EGL/getProcAddress.cpp +++ b/opengl/libs/EGL/getProcAddress.cpp @@ -21,7 +21,6 @@ #include <cutils/log.h> #include "egldefs.h" -#include "hooks.h" // ---------------------------------------------------------------------------- namespace android { @@ -64,9 +63,9 @@ namespace android { #define API_ENTRY(_api) __attribute__((noinline)) _api #define CALL_GL_EXTENSION_API(_api, ...) \ - register unsigned int t0 asm("t0"); \ - register unsigned int fn asm("t1"); \ - register unsigned int tls asm("v1"); \ + register unsigned int _t0 asm("t0"); \ + register unsigned int _fn asm("t1"); \ + register unsigned int _tls asm("v1"); \ asm volatile( \ ".set push\n\t" \ ".set noreorder\n\t" \ @@ -81,9 +80,9 @@ namespace android { "j %[fn]\n\t" \ " nop\n\t" \ ".set pop\n\t" \ - : [fn] "=c"(fn), \ - [tls] "=&r"(tls), \ - [t0] "=&r"(t0) \ + : [fn] "=c"(_fn), \ + [tls] "=&r"(_tls), \ + [t0] "=&r"(_t0) \ : [OPENGL_API] "I"(TLS_SLOT_OPENGL_API*4), \ [API] "I"(__builtin_offsetof(gl_hooks_t, \ ext.extensions[_api])) \ diff --git a/opengl/libs/EGL/trace.cpp b/opengl/libs/EGL/trace.cpp index a51b086..bac6ba8 100644 --- a/opengl/libs/EGL/trace.cpp +++ b/opengl/libs/EGL/trace.cpp @@ -21,8 +21,6 @@ #include <EGL/egl.h> #include <EGL/eglext.h> -#include <GLES/gl.h> -#include <GLES/glext.h> #include <cutils/log.h> @@ -39,7 +37,8 @@ namespace android { // ---------------------------------------------------------------------------- struct GLenumString { - GLenum e; + // The GL_TIMEOUT_IGNORED "enum" doesn't fit in a GLenum, so use GLuint64 + GLuint64 e; const char* s; }; diff --git a/opengl/libs/GLES2/gl2.cpp b/opengl/libs/GLES2/gl2.cpp index fb890fc..fad2176 100644 --- a/opengl/libs/GLES2/gl2.cpp +++ b/opengl/libs/GLES2/gl2.cpp @@ -1,16 +1,16 @@ -/* +/* ** 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 + ** 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 + ** 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 + ** 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. */ @@ -20,14 +20,15 @@ #include <sys/ioctl.h> -#include <GLES2/gl2.h> +#include <GLES3/gl3.h> +#include <GLES3/gl3ext.h> #include <GLES2/gl2ext.h> #include <cutils/log.h> #include <cutils/properties.h> -#include "hooks.h" -#include "egl_impl.h" +#include "../hooks.h" +#include "../egl_impl.h" using namespace android; @@ -66,10 +67,10 @@ using namespace android; #define API_ENTRY(_api) __attribute__((noinline)) _api #define CALL_GL_API(_api, ...) \ - register unsigned int t0 asm("t0"); \ - register unsigned int fn asm("t1"); \ - register unsigned int tls asm("v1"); \ - register unsigned int v0 asm("v0"); \ + register unsigned int _t0 asm("t0"); \ + register unsigned int _fn asm("t1"); \ + register unsigned int _tls asm("v1"); \ + register unsigned int _v0 asm("v0"); \ asm volatile( \ ".set push\n\t" \ ".set noreorder\n\t" \ @@ -84,10 +85,10 @@ using namespace android; "j %[fn]\n\t" \ " move %[v0], $0\n\t" \ ".set pop\n\t" \ - : [fn] "=c"(fn), \ - [tls] "=&r"(tls), \ - [t0] "=&r"(t0), \ - [v0] "=&r"(v0) \ + : [fn] "=c"(_fn), \ + [tls] "=&r"(_tls), \ + [t0] "=&r"(_t0), \ + [v0] "=&r"(_v0) \ : [OPENGL_API] "I"(TLS_SLOT_OPENGL_API*4), \ [API] "I"(__builtin_offsetof(gl_hooks_t, gl._api)) \ : \ @@ -119,8 +120,9 @@ using namespace android; extern "C" { -#include "gl2_api.in" +#include "gl3_api.in" #include "gl2ext_api.in" +#include "gl3ext_api.in" } #undef API_ENTRY diff --git a/opengl/libs/GLES2/gl2_api.in b/opengl/libs/GLES2/gl2_api.in index cccf46c..89c8b8d 100644 --- a/opengl/libs/GLES2/gl2_api.in +++ b/opengl/libs/GLES2/gl2_api.in @@ -292,7 +292,7 @@ void API_ENTRY(glScissor)(GLint x, GLint y, GLsizei width, GLsizei 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) { +void API_ENTRY(glShaderSource)(GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length) { CALL_GL_API(glShaderSource, shader, count, string, length); } void API_ENTRY(glStencilFunc)(GLenum func, GLint ref, GLuint mask) { diff --git a/opengl/libs/GLES2/gl3_api.in b/opengl/libs/GLES2/gl3_api.in new file mode 100644 index 0000000..76f4e23 --- /dev/null +++ b/opengl/libs/GLES2/gl3_api.in @@ -0,0 +1,738 @@ +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)(GLfloat red, GLfloat green, GLfloat blue, GLfloat 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)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { + CALL_GL_API(glClearColor, red, green, blue, alpha); +} +void API_ENTRY(glClearDepthf)(GLfloat 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)(GLfloat n, GLfloat f) { + CALL_GL_API(glDepthRangef, n, f); +} +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); +} +GLint 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); +} +GLint 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)(GLfloat 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* const* 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); +} +void API_ENTRY(glReadBuffer)(GLenum mode) { + CALL_GL_API(glReadBuffer, mode); +} +void API_ENTRY(glDrawRangeElements)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices) { + CALL_GL_API(glDrawRangeElements, mode, start, end, count, type, indices); +} +void API_ENTRY(glTexImage3D)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels) { + CALL_GL_API(glTexImage3D, target, level, internalformat, width, height, depth, border, format, type, pixels); +} +void API_ENTRY(glTexSubImage3D)(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(glTexSubImage3D, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); +} +void API_ENTRY(glCopyTexSubImage3D)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) { + CALL_GL_API(glCopyTexSubImage3D, target, level, xoffset, yoffset, zoffset, x, y, width, height); +} +void API_ENTRY(glCompressedTexImage3D)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data) { + CALL_GL_API(glCompressedTexImage3D, target, level, internalformat, width, height, depth, border, imageSize, data); +} +void API_ENTRY(glCompressedTexSubImage3D)(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(glCompressedTexSubImage3D, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); +} +void API_ENTRY(glGenQueries)(GLsizei n, GLuint* ids) { + CALL_GL_API(glGenQueries, n, ids); +} +void API_ENTRY(glDeleteQueries)(GLsizei n, const GLuint* ids) { + CALL_GL_API(glDeleteQueries, n, ids); +} +GLboolean API_ENTRY(glIsQuery)(GLuint id) { + CALL_GL_API_RETURN(glIsQuery, id); +} +void API_ENTRY(glBeginQuery)(GLenum target, GLuint id) { + CALL_GL_API(glBeginQuery, target, id); +} +void API_ENTRY(glEndQuery)(GLenum target) { + CALL_GL_API(glEndQuery, target); +} +void API_ENTRY(glGetQueryiv)(GLenum target, GLenum pname, GLint* params) { + CALL_GL_API(glGetQueryiv, target, pname, params); +} +void API_ENTRY(glGetQueryObjectuiv)(GLuint id, GLenum pname, GLuint* params) { + CALL_GL_API(glGetQueryObjectuiv, id, pname, params); +} +GLboolean API_ENTRY(glUnmapBuffer)(GLenum target) { + CALL_GL_API_RETURN(glUnmapBuffer, target); +} +void API_ENTRY(glGetBufferPointerv)(GLenum target, GLenum pname, GLvoid** params) { + CALL_GL_API(glGetBufferPointerv, target, pname, params); +} +void API_ENTRY(glDrawBuffers)(GLsizei n, const GLenum* bufs) { + CALL_GL_API(glDrawBuffers, n, bufs); +} +void API_ENTRY(glUniformMatrix2x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { + CALL_GL_API(glUniformMatrix2x3fv, location, count, transpose, value); +} +void API_ENTRY(glUniformMatrix3x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { + CALL_GL_API(glUniformMatrix3x2fv, location, count, transpose, value); +} +void API_ENTRY(glUniformMatrix2x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { + CALL_GL_API(glUniformMatrix2x4fv, location, count, transpose, value); +} +void API_ENTRY(glUniformMatrix4x2fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { + CALL_GL_API(glUniformMatrix4x2fv, location, count, transpose, value); +} +void API_ENTRY(glUniformMatrix3x4fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { + CALL_GL_API(glUniformMatrix3x4fv, location, count, transpose, value); +} +void API_ENTRY(glUniformMatrix4x3fv)(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { + CALL_GL_API(glUniformMatrix4x3fv, location, count, transpose, value); +} +void API_ENTRY(glBlitFramebuffer)(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { + CALL_GL_API(glBlitFramebuffer, srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); +} +void API_ENTRY(glRenderbufferStorageMultisample)(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { + CALL_GL_API(glRenderbufferStorageMultisample, target, samples, internalformat, width, height); +} +void API_ENTRY(glFramebufferTextureLayer)(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) { + CALL_GL_API(glFramebufferTextureLayer, target, attachment, texture, level, layer); +} +GLvoid* API_ENTRY(glMapBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) { + CALL_GL_API_RETURN(glMapBufferRange, target, offset, length, access); +} +void API_ENTRY(glFlushMappedBufferRange)(GLenum target, GLintptr offset, GLsizeiptr length) { + CALL_GL_API(glFlushMappedBufferRange, target, offset, length); +} +void API_ENTRY(glBindVertexArray)(GLuint array) { + CALL_GL_API(glBindVertexArray, array); +} +void API_ENTRY(glDeleteVertexArrays)(GLsizei n, const GLuint* arrays) { + CALL_GL_API(glDeleteVertexArrays, n, arrays); +} +void API_ENTRY(glGenVertexArrays)(GLsizei n, GLuint* arrays) { + CALL_GL_API(glGenVertexArrays, n, arrays); +} +GLboolean API_ENTRY(glIsVertexArray)(GLuint array) { + CALL_GL_API_RETURN(glIsVertexArray, array); +} +void API_ENTRY(glGetIntegeri_v)(GLenum target, GLuint index, GLint* data) { + CALL_GL_API(glGetIntegeri_v, target, index, data); +} +void API_ENTRY(glBeginTransformFeedback)(GLenum primitiveMode) { + CALL_GL_API(glBeginTransformFeedback, primitiveMode); +} +void API_ENTRY(glEndTransformFeedback)(void) { + CALL_GL_API(glEndTransformFeedback); +} +void API_ENTRY(glBindBufferRange)(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) { + CALL_GL_API(glBindBufferRange, target, index, buffer, offset, size); +} +void API_ENTRY(glBindBufferBase)(GLenum target, GLuint index, GLuint buffer) { + CALL_GL_API(glBindBufferBase, target, index, buffer); +} +void API_ENTRY(glTransformFeedbackVaryings)(GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode) { + CALL_GL_API(glTransformFeedbackVaryings, program, count, varyings, bufferMode); +} +void API_ENTRY(glGetTransformFeedbackVarying)(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name) { + CALL_GL_API(glGetTransformFeedbackVarying, program, index, bufSize, length, size, type, name); +} +void API_ENTRY(glVertexAttribIPointer)(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer) { + CALL_GL_API(glVertexAttribIPointer, index, size, type, stride, pointer); +} +void API_ENTRY(glGetVertexAttribIiv)(GLuint index, GLenum pname, GLint* params) { + CALL_GL_API(glGetVertexAttribIiv, index, pname, params); +} +void API_ENTRY(glGetVertexAttribIuiv)(GLuint index, GLenum pname, GLuint* params) { + CALL_GL_API(glGetVertexAttribIuiv, index, pname, params); +} +void API_ENTRY(glVertexAttribI4i)(GLuint index, GLint x, GLint y, GLint z, GLint w) { + CALL_GL_API(glVertexAttribI4i, index, x, y, z, w); +} +void API_ENTRY(glVertexAttribI4ui)(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) { + CALL_GL_API(glVertexAttribI4ui, index, x, y, z, w); +} +void API_ENTRY(glVertexAttribI4iv)(GLuint index, const GLint* v) { + CALL_GL_API(glVertexAttribI4iv, index, v); +} +void API_ENTRY(glVertexAttribI4uiv)(GLuint index, const GLuint* v) { + CALL_GL_API(glVertexAttribI4uiv, index, v); +} +void API_ENTRY(glGetUniformuiv)(GLuint program, GLint location, GLuint* params) { + CALL_GL_API(glGetUniformuiv, program, location, params); +} +GLint API_ENTRY(glGetFragDataLocation)(GLuint program, const GLchar *name) { + CALL_GL_API_RETURN(glGetFragDataLocation, program, name); +} +void API_ENTRY(glUniform1ui)(GLint location, GLuint v0) { + CALL_GL_API(glUniform1ui, location, v0); +} +void API_ENTRY(glUniform2ui)(GLint location, GLuint v0, GLuint v1) { + CALL_GL_API(glUniform2ui, location, v0, v1); +} +void API_ENTRY(glUniform3ui)(GLint location, GLuint v0, GLuint v1, GLuint v2) { + CALL_GL_API(glUniform3ui, location, v0, v1, v2); +} +void API_ENTRY(glUniform4ui)(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) { + CALL_GL_API(glUniform4ui, location, v0, v1, v2, v3); +} +void API_ENTRY(glUniform1uiv)(GLint location, GLsizei count, const GLuint* value) { + CALL_GL_API(glUniform1uiv, location, count, value); +} +void API_ENTRY(glUniform2uiv)(GLint location, GLsizei count, const GLuint* value) { + CALL_GL_API(glUniform2uiv, location, count, value); +} +void API_ENTRY(glUniform3uiv)(GLint location, GLsizei count, const GLuint* value) { + CALL_GL_API(glUniform3uiv, location, count, value); +} +void API_ENTRY(glUniform4uiv)(GLint location, GLsizei count, const GLuint* value) { + CALL_GL_API(glUniform4uiv, location, count, value); +} +void API_ENTRY(glClearBufferiv)(GLenum buffer, GLint drawbuffer, const GLint* value) { + CALL_GL_API(glClearBufferiv, buffer, drawbuffer, value); +} +void API_ENTRY(glClearBufferuiv)(GLenum buffer, GLint drawbuffer, const GLuint* value) { + CALL_GL_API(glClearBufferuiv, buffer, drawbuffer, value); +} +void API_ENTRY(glClearBufferfv)(GLenum buffer, GLint drawbuffer, const GLfloat* value) { + CALL_GL_API(glClearBufferfv, buffer, drawbuffer, value); +} +void API_ENTRY(glClearBufferfi)(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) { + CALL_GL_API(glClearBufferfi, buffer, drawbuffer, depth, stencil); +} +const GLubyte* API_ENTRY(glGetStringi)(GLenum name, GLuint index) { + CALL_GL_API_RETURN(glGetStringi, name, index); +} +void API_ENTRY(glCopyBufferSubData)(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) { + CALL_GL_API(glCopyBufferSubData, readTarget, writeTarget, readOffset, writeOffset, size); +} +void API_ENTRY(glGetUniformIndices)(GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices) { + CALL_GL_API(glGetUniformIndices, program, uniformCount, uniformNames, uniformIndices); +} +void API_ENTRY(glGetActiveUniformsiv)(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params) { + CALL_GL_API(glGetActiveUniformsiv, program, uniformCount, uniformIndices, pname, params); +} +GLuint API_ENTRY(glGetUniformBlockIndex)(GLuint program, const GLchar* uniformBlockName) { + CALL_GL_API_RETURN(glGetUniformBlockIndex, program, uniformBlockName); +} +void API_ENTRY(glGetActiveUniformBlockiv)(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params) { + CALL_GL_API(glGetActiveUniformBlockiv, program, uniformBlockIndex, pname, params); +} +void API_ENTRY(glGetActiveUniformBlockName)(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName) { + CALL_GL_API(glGetActiveUniformBlockName, program, uniformBlockIndex, bufSize, length, uniformBlockName); +} +void API_ENTRY(glUniformBlockBinding)(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) { + CALL_GL_API(glUniformBlockBinding, program, uniformBlockIndex, uniformBlockBinding); +} +void API_ENTRY(glDrawArraysInstanced)(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount) { + CALL_GL_API(glDrawArraysInstanced, mode, first, count, instanceCount); +} +void API_ENTRY(glDrawElementsInstanced)(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount) { + CALL_GL_API(glDrawElementsInstanced, mode, count, type, indices, instanceCount); +} +GLsync API_ENTRY(glFenceSync)(GLenum condition, GLbitfield flags) { + CALL_GL_API_RETURN(glFenceSync, condition, flags); +} +GLboolean API_ENTRY(glIsSync)(GLsync sync) { + CALL_GL_API_RETURN(glIsSync, sync); +} +void API_ENTRY(glDeleteSync)(GLsync sync) { + CALL_GL_API(glDeleteSync, sync); +} +GLenum API_ENTRY(glClientWaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout) { + CALL_GL_API_RETURN(glClientWaitSync, sync, flags, timeout); +} +void API_ENTRY(glWaitSync)(GLsync sync, GLbitfield flags, GLuint64 timeout) { + CALL_GL_API(glWaitSync, sync, flags, timeout); +} +void API_ENTRY(glGetInteger64v)(GLenum pname, GLint64* params) { + CALL_GL_API(glGetInteger64v, pname, params); +} +void API_ENTRY(glGetSynciv)(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values) { + CALL_GL_API(glGetSynciv, sync, pname, bufSize, length, values); +} +void API_ENTRY(glGetInteger64i_v)(GLenum target, GLuint index, GLint64* data) { + CALL_GL_API(glGetInteger64i_v, target, index, data); +} +void API_ENTRY(glGetBufferParameteri64v)(GLenum target, GLenum pname, GLint64* params) { + CALL_GL_API(glGetBufferParameteri64v, target, pname, params); +} +void API_ENTRY(glGenSamplers)(GLsizei count, GLuint* samplers) { + CALL_GL_API(glGenSamplers, count, samplers); +} +void API_ENTRY(glDeleteSamplers)(GLsizei count, const GLuint* samplers) { + CALL_GL_API(glDeleteSamplers, count, samplers); +} +GLboolean API_ENTRY(glIsSampler)(GLuint sampler) { + CALL_GL_API_RETURN(glIsSampler, sampler); +} +void API_ENTRY(glBindSampler)(GLuint unit, GLuint sampler) { + CALL_GL_API(glBindSampler, unit, sampler); +} +void API_ENTRY(glSamplerParameteri)(GLuint sampler, GLenum pname, GLint param) { + CALL_GL_API(glSamplerParameteri, sampler, pname, param); +} +void API_ENTRY(glSamplerParameteriv)(GLuint sampler, GLenum pname, const GLint* param) { + CALL_GL_API(glSamplerParameteriv, sampler, pname, param); +} +void API_ENTRY(glSamplerParameterf)(GLuint sampler, GLenum pname, GLfloat param) { + CALL_GL_API(glSamplerParameterf, sampler, pname, param); +} +void API_ENTRY(glSamplerParameterfv)(GLuint sampler, GLenum pname, const GLfloat* param) { + CALL_GL_API(glSamplerParameterfv, sampler, pname, param); +} +void API_ENTRY(glGetSamplerParameteriv)(GLuint sampler, GLenum pname, GLint* params) { + CALL_GL_API(glGetSamplerParameteriv, sampler, pname, params); +} +void API_ENTRY(glGetSamplerParameterfv)(GLuint sampler, GLenum pname, GLfloat* params) { + CALL_GL_API(glGetSamplerParameterfv, sampler, pname, params); +} +void API_ENTRY(glVertexAttribDivisor)(GLuint index, GLuint divisor) { + CALL_GL_API(glVertexAttribDivisor, index, divisor); +} +void API_ENTRY(glBindTransformFeedback)(GLenum target, GLuint id) { + CALL_GL_API(glBindTransformFeedback, target, id); +} +void API_ENTRY(glDeleteTransformFeedbacks)(GLsizei n, const GLuint* ids) { + CALL_GL_API(glDeleteTransformFeedbacks, n, ids); +} +void API_ENTRY(glGenTransformFeedbacks)(GLsizei n, GLuint* ids) { + CALL_GL_API(glGenTransformFeedbacks, n, ids); +} +GLboolean API_ENTRY(glIsTransformFeedback)(GLuint id) { + CALL_GL_API_RETURN(glIsTransformFeedback, id); +} +void API_ENTRY(glPauseTransformFeedback)(void) { + CALL_GL_API(glPauseTransformFeedback); +} +void API_ENTRY(glResumeTransformFeedback)(void) { + CALL_GL_API(glResumeTransformFeedback); +} +void API_ENTRY(glGetProgramBinary)(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary) { + CALL_GL_API(glGetProgramBinary, program, bufSize, length, binaryFormat, binary); +} +void API_ENTRY(glProgramBinary)(GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length) { + CALL_GL_API(glProgramBinary, program, binaryFormat, binary, length); +} +void API_ENTRY(glProgramParameteri)(GLuint program, GLenum pname, GLint value) { + CALL_GL_API(glProgramParameteri, program, pname, value); +} +void API_ENTRY(glInvalidateFramebuffer)(GLenum target, GLsizei numAttachments, const GLenum* attachments) { + CALL_GL_API(glInvalidateFramebuffer, target, numAttachments, attachments); +} +void API_ENTRY(glInvalidateSubFramebuffer)(GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height) { + CALL_GL_API(glInvalidateSubFramebuffer, target, numAttachments, attachments, x, y, width, height); +} +void API_ENTRY(glTexStorage2D)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { + CALL_GL_API(glTexStorage2D, target, levels, internalformat, width, height); +} +void API_ENTRY(glTexStorage3D)(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { + CALL_GL_API(glTexStorage3D, target, levels, internalformat, width, height, depth); +} +void API_ENTRY(glGetInternalformativ)(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params) { + CALL_GL_API(glGetInternalformativ, target, internalformat, pname, bufSize, params); +} diff --git a/opengl/libs/GLES2/gl3ext_api.in b/opengl/libs/GLES2/gl3ext_api.in new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/opengl/libs/GLES2/gl3ext_api.in diff --git a/opengl/libs/GLES_CM/gl.cpp b/opengl/libs/GLES_CM/gl.cpp index bd08942..a5bbdc6 100644 --- a/opengl/libs/GLES_CM/gl.cpp +++ b/opengl/libs/GLES_CM/gl.cpp @@ -26,8 +26,8 @@ #include <cutils/log.h> #include <cutils/properties.h> -#include "hooks.h" -#include "egl_impl.h" +#include "../hooks.h" +#include "../egl_impl.h" using namespace android; @@ -122,10 +122,10 @@ GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type, #define API_ENTRY(_api) __attribute__((noinline)) _api #define CALL_GL_API(_api, ...) \ - register unsigned int t0 asm("t0"); \ - register unsigned int fn asm("t1"); \ - register unsigned int tls asm("v1"); \ - register unsigned int v0 asm("v0"); \ + register unsigned int _t0 asm("t0"); \ + register unsigned int _fn asm("t1"); \ + register unsigned int _tls asm("v1"); \ + register unsigned int _v0 asm("v0"); \ asm volatile( \ ".set push\n\t" \ ".set noreorder\n\t" \ @@ -140,10 +140,10 @@ GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type, "j %[fn]\n\t" \ " move %[v0], $0\n\t" \ ".set pop\n\t" \ - : [fn] "=c"(fn), \ - [tls] "=&r"(tls), \ - [t0] "=&r"(t0), \ - [v0] "=&r"(v0) \ + : [fn] "=c"(_fn), \ + [tls] "=&r"(_tls), \ + [t0] "=&r"(_t0), \ + [v0] "=&r"(_v0) \ : [OPENGL_API] "I"(TLS_SLOT_OPENGL_API*4), \ [API] "I"(__builtin_offsetof(gl_hooks_t, gl._api)) \ : \ diff --git a/opengl/libs/GLES_trace/Android.mk b/opengl/libs/GLES_trace/Android.mk index 9dec020..846932d 100644 --- a/opengl/libs/GLES_trace/Android.mk +++ b/opengl/libs/GLES_trace/Android.mk @@ -22,7 +22,7 @@ LOCAL_C_INCLUDES := \ LOCAL_CFLAGS := -DGOOGLE_PROTOBUF_NO_RTTI LOCAL_STATIC_LIBRARIES := libprotobuf-cpp-2.3.0-lite liblzf -LOCAL_SHARED_LIBRARIES := libcutils libutils libstlport +LOCAL_SHARED_LIBRARIES := libcutils libutils liblog libstlport LOCAL_CFLAGS += -DLOG_TAG=\"libGLES_trace\" diff --git a/opengl/libs/GLES_trace/DESIGN.txt b/opengl/libs/GLES_trace/DESIGN.txt index a189e1d..72a2e15 100644 --- a/opengl/libs/GLES_trace/DESIGN.txt +++ b/opengl/libs/GLES_trace/DESIGN.txt @@ -9,9 +9,6 @@ Code Runtime Behavior: control whether tracing should be enabled for a certain process. If tracing is enabled, this calls GLTrace_start() to start the trace server. - Note that initEglTraceLevel() is also called from early_egl_init(), but that happens in the - context of the zygote, so that invocation has no effect. - egl_display_t::initialize() then calls setGLHooksThreadSpecific() where we set the thread specific gl_hooks structure to point to the trace implementation. From this point on, every GLES call is redirected to the trace implementation. @@ -30,6 +27,37 @@ Code Runtime Behavior: to explore if a more graceful method of stopping the application, or detaching tracing from the application is required. + +Enabling tracing while the application is running: + + In order to allow tracing of an already running application, we allow DdmServer to enable + OpenGL tracing. In such a case, the application already has its GL hooks set up to point to the + real GL implementation, and we need to switch them to point to the trace implementation. + + This is achieved by checking whether tracing should be enabled at every eglSwap call. + (Note: We were already checking for tracing at every eglSwap, the only change now is that + the tracing could actually be ON/OFF at runtime - earlier it was set once and never changed). + + If eglSwap detects that tracing should be enabled now, then it performs the following steps: + - switch the gl hooks to point to the trace implementation. + - call trace eglMakeCurrent to indicate that there is now a new context that is current. + - continue on with tracing the eglSwap call. + This switches the hooks to point to the trace implementation only for the current context. + But the other contexts have their gl hooks updated when they perform eglMakeCurrent. + + The GLTrace version of eglMakeCurrent now has to be updated to allow switching to a context + it may not know of. In such a case, it creates a context matching the version that it is now + switching to. + +Disabling tracing: + + We disable tracing under two conditions: + - stop tracing request from DdmServer + - gltrace transport gets disconnected from the host. + In either case, both actions simply disable the tracing flag. The current context gets its + gl hooks restored in the next eglSwap, and the other traced contexts get their gl hooks + restored when they perform a eglMakeCurrent. + Code Structure: glestrace.h declares all the hooks exposed by libglestrace. These are used by EGL/egl.cpp and diff --git a/opengl/libs/GLES_trace/gltrace.proto b/opengl/libs/GLES_trace/gltrace.proto index bbf3554..f8f4938 100644 --- a/opengl/libs/GLES_trace/gltrace.proto +++ b/opengl/libs/GLES_trace/gltrace.proto @@ -399,6 +399,110 @@ message GLMessage { glVertexPointer = 373; glViewport = 374; glWeightPointerOES = 375; + glReadBuffer = 376; + glDrawRangeElements = 377; + glTexImage3D = 378; + glTexSubImage3D = 379; + glCopyTexSubImage3D = 380; + glCompressedTexImage3D = 381; + glCompressedTexSubImage3D = 382; + glGenQueries = 383; + glDeleteQueries = 384; + glIsQuery = 385; + glBeginQuery = 386; + glEndQuery = 387; + glGetQueryiv = 388; + glGetQueryObjectuiv = 389; + glUnmapBuffer = 390; + glGetBufferPointerv = 391; + glDrawBuffers = 392; + glUniformMatrix2x3fv = 393; + glUniformMatrix3x2fv = 394; + glUniformMatrix2x4fv = 395; + glUniformMatrix4x2fv = 396; + glUniformMatrix3x4fv = 397; + glUniformMatrix4x3fv = 398; + glBlitFramebuffer = 399; + glRenderbufferStorageMultisample = 400; + glFramebufferTextureLayer = 401; + glMapBufferRange = 402; + glFlushMappedBufferRange = 403; + glBindVertexArray = 404; + glDeleteVertexArrays = 405; + glGenVertexArrays = 406; + glIsVertexArray = 407; + glGetIntegeri_v = 408; + glBeginTransformFeedback = 409; + glEndTransformFeedback = 410; + glBindBufferRange = 411; + glBindBufferBase = 412; + glTransformFeedbackVaryings = 413; + glGetTransformFeedbackVarying = 414; + glVertexAttribIPointer = 415; + glGetVertexAttribIiv = 416; + glGetVertexAttribIuiv = 417; + glVertexAttribI4i = 418; + glVertexAttribI4ui = 419; + glVertexAttribI4iv = 420; + glVertexAttribI4uiv = 421; + glGetUniformuiv = 422; + glGetFragDataLocation = 423; + glUniform1ui = 424; + glUniform2ui = 425; + glUniform3ui = 426; + glUniform4ui = 427; + glUniform1uiv = 428; + glUniform2uiv = 429; + glUniform3uiv = 430; + glUniform4uiv = 431; + glClearBufferiv = 432; + glClearBufferuiv = 433; + glClearBufferfv = 434; + glClearBufferfi = 435; + glGetStringi = 436; + glCopyBufferSubData = 437; + glGetUniformIndices = 438; + glGetActiveUniformsiv = 439; + glGetUniformBlockIndex = 440; + glGetActiveUniformBlockiv = 441; + glGetActiveUniformBlockName = 442; + glUniformBlockBinding = 443; + glDrawArraysInstanced = 444; + glDrawElementsInstanced = 445; + glFenceSync = 446; + glIsSync = 447; + glDeleteSync = 448; + glClientWaitSync = 449; + glWaitSync = 450; + glGetInteger64v = 451; + glGetSynciv = 452; + glGetInteger64i_v = 453; + glGetBufferParameteri64v = 454; + glGenSamplers = 455; + glDeleteSamplers = 456; + glIsSampler = 457; + glBindSampler = 458; + glSamplerParameteri = 459; + glSamplerParameteriv = 460; + glSamplerParameterf = 461; + glSamplerParameterfv = 462; + glGetSamplerParameteriv = 463; + glGetSamplerParameterfv = 464; + glVertexAttribDivisor = 465; + glBindTransformFeedback = 466; + glDeleteTransformFeedbacks = 467; + glGenTransformFeedbacks = 468; + glIsTransformFeedback = 469; + glPauseTransformFeedback = 470; + glResumeTransformFeedback = 471; + glGetProgramBinary = 472; + glProgramBinary = 473; + glProgramParameteri = 474; + glInvalidateFramebuffer = 475; + glInvalidateSubFramebuffer = 476; + glTexStorage2D = 477; + glTexStorage3D = 478; + glGetInternalformativ = 479; glActiveShaderProgramEXT = 502; glAlphaFuncQCOM = 503; @@ -523,6 +627,7 @@ message GLMessage { FLOAT = 5; // GLfloat, GLclampf BOOL = 6; // GLboolean ENUM = 7; // GLenum + INT64 = 8; // GLint64, GLuint64 }; required Type type = 1 [default = VOID]; @@ -533,6 +638,7 @@ message GLMessage { repeated bytes charValue = 5; repeated bytes rawBytes = 6; repeated bool boolValue = 7; + repeated int64 int64Value = 8; } message FrameBuffer { diff --git a/opengl/libs/GLES_trace/src/gltrace.pb.cpp b/opengl/libs/GLES_trace/src/gltrace.pb.cpp index d587c49..ed9a457 100644 --- a/opengl/libs/GLES_trace/src/gltrace.pb.cpp +++ b/opengl/libs/GLES_trace/src/gltrace.pb.cpp @@ -419,6 +419,110 @@ bool GLMessage_Function_IsValid(int value) { case 373: case 374: case 375: + case 376: + case 377: + case 378: + case 379: + case 380: + case 381: + case 382: + case 383: + case 384: + case 385: + case 386: + case 387: + case 388: + case 389: + case 390: + case 391: + case 392: + case 393: + case 394: + case 395: + case 396: + case 397: + case 398: + case 399: + case 400: + case 401: + case 402: + case 403: + case 404: + case 405: + case 406: + case 407: + case 408: + case 409: + case 410: + case 411: + case 412: + case 413: + case 414: + case 415: + case 416: + case 417: + case 418: + case 419: + case 420: + case 421: + case 422: + case 423: + case 424: + case 425: + case 426: + case 427: + case 428: + case 429: + case 430: + case 431: + case 432: + case 433: + case 434: + case 435: + case 436: + case 437: + case 438: + case 439: + case 440: + case 441: + case 442: + case 443: + case 444: + case 445: + case 446: + case 447: + case 448: + case 449: + case 450: + case 451: + case 452: + case 453: + case 454: + case 455: + case 456: + case 457: + case 458: + case 459: + case 460: + case 461: + case 462: + case 463: + case 464: + case 465: + case 466: + case 467: + case 468: + case 469: + case 470: + case 471: + case 472: + case 473: + case 474: + case 475: + case 476: + case 477: + case 478: + case 479: case 502: case 503: case 504: @@ -910,6 +1014,110 @@ const GLMessage_Function GLMessage::glVertexAttribPointer; const GLMessage_Function GLMessage::glVertexPointer; const GLMessage_Function GLMessage::glViewport; const GLMessage_Function GLMessage::glWeightPointerOES; +const GLMessage_Function GLMessage::glReadBuffer; +const GLMessage_Function GLMessage::glDrawRangeElements; +const GLMessage_Function GLMessage::glTexImage3D; +const GLMessage_Function GLMessage::glTexSubImage3D; +const GLMessage_Function GLMessage::glCopyTexSubImage3D; +const GLMessage_Function GLMessage::glCompressedTexImage3D; +const GLMessage_Function GLMessage::glCompressedTexSubImage3D; +const GLMessage_Function GLMessage::glGenQueries; +const GLMessage_Function GLMessage::glDeleteQueries; +const GLMessage_Function GLMessage::glIsQuery; +const GLMessage_Function GLMessage::glBeginQuery; +const GLMessage_Function GLMessage::glEndQuery; +const GLMessage_Function GLMessage::glGetQueryiv; +const GLMessage_Function GLMessage::glGetQueryObjectuiv; +const GLMessage_Function GLMessage::glUnmapBuffer; +const GLMessage_Function GLMessage::glGetBufferPointerv; +const GLMessage_Function GLMessage::glDrawBuffers; +const GLMessage_Function GLMessage::glUniformMatrix2x3fv; +const GLMessage_Function GLMessage::glUniformMatrix3x2fv; +const GLMessage_Function GLMessage::glUniformMatrix2x4fv; +const GLMessage_Function GLMessage::glUniformMatrix4x2fv; +const GLMessage_Function GLMessage::glUniformMatrix3x4fv; +const GLMessage_Function GLMessage::glUniformMatrix4x3fv; +const GLMessage_Function GLMessage::glBlitFramebuffer; +const GLMessage_Function GLMessage::glRenderbufferStorageMultisample; +const GLMessage_Function GLMessage::glFramebufferTextureLayer; +const GLMessage_Function GLMessage::glMapBufferRange; +const GLMessage_Function GLMessage::glFlushMappedBufferRange; +const GLMessage_Function GLMessage::glBindVertexArray; +const GLMessage_Function GLMessage::glDeleteVertexArrays; +const GLMessage_Function GLMessage::glGenVertexArrays; +const GLMessage_Function GLMessage::glIsVertexArray; +const GLMessage_Function GLMessage::glGetIntegeri_v; +const GLMessage_Function GLMessage::glBeginTransformFeedback; +const GLMessage_Function GLMessage::glEndTransformFeedback; +const GLMessage_Function GLMessage::glBindBufferRange; +const GLMessage_Function GLMessage::glBindBufferBase; +const GLMessage_Function GLMessage::glTransformFeedbackVaryings; +const GLMessage_Function GLMessage::glGetTransformFeedbackVarying; +const GLMessage_Function GLMessage::glVertexAttribIPointer; +const GLMessage_Function GLMessage::glGetVertexAttribIiv; +const GLMessage_Function GLMessage::glGetVertexAttribIuiv; +const GLMessage_Function GLMessage::glVertexAttribI4i; +const GLMessage_Function GLMessage::glVertexAttribI4ui; +const GLMessage_Function GLMessage::glVertexAttribI4iv; +const GLMessage_Function GLMessage::glVertexAttribI4uiv; +const GLMessage_Function GLMessage::glGetUniformuiv; +const GLMessage_Function GLMessage::glGetFragDataLocation; +const GLMessage_Function GLMessage::glUniform1ui; +const GLMessage_Function GLMessage::glUniform2ui; +const GLMessage_Function GLMessage::glUniform3ui; +const GLMessage_Function GLMessage::glUniform4ui; +const GLMessage_Function GLMessage::glUniform1uiv; +const GLMessage_Function GLMessage::glUniform2uiv; +const GLMessage_Function GLMessage::glUniform3uiv; +const GLMessage_Function GLMessage::glUniform4uiv; +const GLMessage_Function GLMessage::glClearBufferiv; +const GLMessage_Function GLMessage::glClearBufferuiv; +const GLMessage_Function GLMessage::glClearBufferfv; +const GLMessage_Function GLMessage::glClearBufferfi; +const GLMessage_Function GLMessage::glGetStringi; +const GLMessage_Function GLMessage::glCopyBufferSubData; +const GLMessage_Function GLMessage::glGetUniformIndices; +const GLMessage_Function GLMessage::glGetActiveUniformsiv; +const GLMessage_Function GLMessage::glGetUniformBlockIndex; +const GLMessage_Function GLMessage::glGetActiveUniformBlockiv; +const GLMessage_Function GLMessage::glGetActiveUniformBlockName; +const GLMessage_Function GLMessage::glUniformBlockBinding; +const GLMessage_Function GLMessage::glDrawArraysInstanced; +const GLMessage_Function GLMessage::glDrawElementsInstanced; +const GLMessage_Function GLMessage::glFenceSync; +const GLMessage_Function GLMessage::glIsSync; +const GLMessage_Function GLMessage::glDeleteSync; +const GLMessage_Function GLMessage::glClientWaitSync; +const GLMessage_Function GLMessage::glWaitSync; +const GLMessage_Function GLMessage::glGetInteger64v; +const GLMessage_Function GLMessage::glGetSynciv; +const GLMessage_Function GLMessage::glGetInteger64i_v; +const GLMessage_Function GLMessage::glGetBufferParameteri64v; +const GLMessage_Function GLMessage::glGenSamplers; +const GLMessage_Function GLMessage::glDeleteSamplers; +const GLMessage_Function GLMessage::glIsSampler; +const GLMessage_Function GLMessage::glBindSampler; +const GLMessage_Function GLMessage::glSamplerParameteri; +const GLMessage_Function GLMessage::glSamplerParameteriv; +const GLMessage_Function GLMessage::glSamplerParameterf; +const GLMessage_Function GLMessage::glSamplerParameterfv; +const GLMessage_Function GLMessage::glGetSamplerParameteriv; +const GLMessage_Function GLMessage::glGetSamplerParameterfv; +const GLMessage_Function GLMessage::glVertexAttribDivisor; +const GLMessage_Function GLMessage::glBindTransformFeedback; +const GLMessage_Function GLMessage::glDeleteTransformFeedbacks; +const GLMessage_Function GLMessage::glGenTransformFeedbacks; +const GLMessage_Function GLMessage::glIsTransformFeedback; +const GLMessage_Function GLMessage::glPauseTransformFeedback; +const GLMessage_Function GLMessage::glResumeTransformFeedback; +const GLMessage_Function GLMessage::glGetProgramBinary; +const GLMessage_Function GLMessage::glProgramBinary; +const GLMessage_Function GLMessage::glProgramParameteri; +const GLMessage_Function GLMessage::glInvalidateFramebuffer; +const GLMessage_Function GLMessage::glInvalidateSubFramebuffer; +const GLMessage_Function GLMessage::glTexStorage2D; +const GLMessage_Function GLMessage::glTexStorage3D; +const GLMessage_Function GLMessage::glGetInternalformativ; const GLMessage_Function GLMessage::glActiveShaderProgramEXT; const GLMessage_Function GLMessage::glAlphaFuncQCOM; const GLMessage_Function GLMessage::glBeginQueryEXT; @@ -1032,6 +1240,7 @@ bool GLMessage_DataType_Type_IsValid(int value) { case 5: case 6: case 7: + case 8: return true; default: return false; @@ -1046,6 +1255,7 @@ const GLMessage_DataType_Type GLMessage_DataType::INT; const GLMessage_DataType_Type GLMessage_DataType::FLOAT; const GLMessage_DataType_Type GLMessage_DataType::BOOL; const GLMessage_DataType_Type GLMessage_DataType::ENUM; +const GLMessage_DataType_Type GLMessage_DataType::INT64; const GLMessage_DataType_Type GLMessage_DataType::Type_MIN; const GLMessage_DataType_Type GLMessage_DataType::Type_MAX; const int GLMessage_DataType::Type_ARRAYSIZE; @@ -1058,6 +1268,7 @@ const int GLMessage_DataType::kFloatValueFieldNumber; const int GLMessage_DataType::kCharValueFieldNumber; const int GLMessage_DataType::kRawBytesFieldNumber; const int GLMessage_DataType::kBoolValueFieldNumber; +const int GLMessage_DataType::kInt64ValueFieldNumber; #endif // !_MSC_VER GLMessage_DataType::GLMessage_DataType() @@ -1115,6 +1326,7 @@ void GLMessage_DataType::Clear() { charvalue_.Clear(); rawbytes_.Clear(); boolvalue_.Clear(); + int64value_.Clear(); ::memset(_has_bits_, 0, sizeof(_has_bits_)); } @@ -1250,6 +1462,28 @@ bool GLMessage_DataType::MergePartialFromCodedStream( goto handle_uninterpreted; } if (input->ExpectTag(56)) goto parse_boolValue; + if (input->ExpectTag(64)) goto parse_int64Value; + break; + } + + // repeated int64 int64Value = 8; + case 8: { + if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_VARINT) { + parse_int64Value: + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitive< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + 1, 64, input, this->mutable_int64value()))); + } else if (::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) + == ::google::protobuf::internal::WireFormatLite:: + WIRETYPE_LENGTH_DELIMITED) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitiveNoInline< + ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( + input, this->mutable_int64value()))); + } else { + goto handle_uninterpreted; + } + if (input->ExpectTag(64)) goto parse_int64Value; if (input->ExpectAtEnd()) return true; break; } @@ -1312,6 +1546,12 @@ void GLMessage_DataType::SerializeWithCachedSizes( 7, this->boolvalue(i), output); } + // repeated int64 int64Value = 8; + for (int i = 0; i < this->int64value_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt64( + 8, this->int64value(i), output); + } + } int GLMessage_DataType::ByteSize() const { @@ -1368,6 +1608,16 @@ int GLMessage_DataType::ByteSize() const { total_size += 1 * this->boolvalue_size() + data_size; } + // repeated int64 int64Value = 8; + { + int data_size = 0; + for (int i = 0; i < this->int64value_size(); i++) { + data_size += ::google::protobuf::internal::WireFormatLite:: + Int64Size(this->int64value(i)); + } + total_size += 1 * this->int64value_size() + data_size; + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = total_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); @@ -1386,6 +1636,7 @@ void GLMessage_DataType::MergeFrom(const GLMessage_DataType& from) { charvalue_.MergeFrom(from.charvalue_); rawbytes_.MergeFrom(from.rawbytes_); boolvalue_.MergeFrom(from.boolvalue_); + int64value_.MergeFrom(from.int64value_); if (from._has_bits_[0 / 32] & (0xffu << (0 % 32))) { if (from._has_bit(0)) { set_type(from.type()); @@ -1417,6 +1668,7 @@ void GLMessage_DataType::Swap(GLMessage_DataType* other) { charvalue_.Swap(&other->charvalue_); rawbytes_.Swap(&other->rawbytes_); boolvalue_.Swap(&other->boolvalue_); + int64value_.Swap(&other->int64value_); std::swap(_has_bits_[0], other->_has_bits_[0]); std::swap(_cached_size_, other->_cached_size_); } diff --git a/opengl/libs/GLES_trace/src/gltrace.pb.h b/opengl/libs/GLES_trace/src/gltrace.pb.h index 0901be7..9eae26c 100644 --- a/opengl/libs/GLES_trace/src/gltrace.pb.h +++ b/opengl/libs/GLES_trace/src/gltrace.pb.h @@ -43,11 +43,12 @@ enum GLMessage_DataType_Type { GLMessage_DataType_Type_INT = 4, GLMessage_DataType_Type_FLOAT = 5, GLMessage_DataType_Type_BOOL = 6, - GLMessage_DataType_Type_ENUM = 7 + GLMessage_DataType_Type_ENUM = 7, + GLMessage_DataType_Type_INT64 = 8 }; bool GLMessage_DataType_Type_IsValid(int value); const GLMessage_DataType_Type GLMessage_DataType_Type_Type_MIN = GLMessage_DataType_Type_VOID; -const GLMessage_DataType_Type GLMessage_DataType_Type_Type_MAX = GLMessage_DataType_Type_ENUM; +const GLMessage_DataType_Type GLMessage_DataType_Type_Type_MAX = GLMessage_DataType_Type_INT64; const int GLMessage_DataType_Type_Type_ARRAYSIZE = GLMessage_DataType_Type_Type_MAX + 1; enum GLMessage_Function { @@ -427,6 +428,110 @@ enum GLMessage_Function { GLMessage_Function_glVertexPointer = 373, GLMessage_Function_glViewport = 374, GLMessage_Function_glWeightPointerOES = 375, + GLMessage_Function_glReadBuffer = 376, + GLMessage_Function_glDrawRangeElements = 377, + GLMessage_Function_glTexImage3D = 378, + GLMessage_Function_glTexSubImage3D = 379, + GLMessage_Function_glCopyTexSubImage3D = 380, + GLMessage_Function_glCompressedTexImage3D = 381, + GLMessage_Function_glCompressedTexSubImage3D = 382, + GLMessage_Function_glGenQueries = 383, + GLMessage_Function_glDeleteQueries = 384, + GLMessage_Function_glIsQuery = 385, + GLMessage_Function_glBeginQuery = 386, + GLMessage_Function_glEndQuery = 387, + GLMessage_Function_glGetQueryiv = 388, + GLMessage_Function_glGetQueryObjectuiv = 389, + GLMessage_Function_glUnmapBuffer = 390, + GLMessage_Function_glGetBufferPointerv = 391, + GLMessage_Function_glDrawBuffers = 392, + GLMessage_Function_glUniformMatrix2x3fv = 393, + GLMessage_Function_glUniformMatrix3x2fv = 394, + GLMessage_Function_glUniformMatrix2x4fv = 395, + GLMessage_Function_glUniformMatrix4x2fv = 396, + GLMessage_Function_glUniformMatrix3x4fv = 397, + GLMessage_Function_glUniformMatrix4x3fv = 398, + GLMessage_Function_glBlitFramebuffer = 399, + GLMessage_Function_glRenderbufferStorageMultisample = 400, + GLMessage_Function_glFramebufferTextureLayer = 401, + GLMessage_Function_glMapBufferRange = 402, + GLMessage_Function_glFlushMappedBufferRange = 403, + GLMessage_Function_glBindVertexArray = 404, + GLMessage_Function_glDeleteVertexArrays = 405, + GLMessage_Function_glGenVertexArrays = 406, + GLMessage_Function_glIsVertexArray = 407, + GLMessage_Function_glGetIntegeri_v = 408, + GLMessage_Function_glBeginTransformFeedback = 409, + GLMessage_Function_glEndTransformFeedback = 410, + GLMessage_Function_glBindBufferRange = 411, + GLMessage_Function_glBindBufferBase = 412, + GLMessage_Function_glTransformFeedbackVaryings = 413, + GLMessage_Function_glGetTransformFeedbackVarying = 414, + GLMessage_Function_glVertexAttribIPointer = 415, + GLMessage_Function_glGetVertexAttribIiv = 416, + GLMessage_Function_glGetVertexAttribIuiv = 417, + GLMessage_Function_glVertexAttribI4i = 418, + GLMessage_Function_glVertexAttribI4ui = 419, + GLMessage_Function_glVertexAttribI4iv = 420, + GLMessage_Function_glVertexAttribI4uiv = 421, + GLMessage_Function_glGetUniformuiv = 422, + GLMessage_Function_glGetFragDataLocation = 423, + GLMessage_Function_glUniform1ui = 424, + GLMessage_Function_glUniform2ui = 425, + GLMessage_Function_glUniform3ui = 426, + GLMessage_Function_glUniform4ui = 427, + GLMessage_Function_glUniform1uiv = 428, + GLMessage_Function_glUniform2uiv = 429, + GLMessage_Function_glUniform3uiv = 430, + GLMessage_Function_glUniform4uiv = 431, + GLMessage_Function_glClearBufferiv = 432, + GLMessage_Function_glClearBufferuiv = 433, + GLMessage_Function_glClearBufferfv = 434, + GLMessage_Function_glClearBufferfi = 435, + GLMessage_Function_glGetStringi = 436, + GLMessage_Function_glCopyBufferSubData = 437, + GLMessage_Function_glGetUniformIndices = 438, + GLMessage_Function_glGetActiveUniformsiv = 439, + GLMessage_Function_glGetUniformBlockIndex = 440, + GLMessage_Function_glGetActiveUniformBlockiv = 441, + GLMessage_Function_glGetActiveUniformBlockName = 442, + GLMessage_Function_glUniformBlockBinding = 443, + GLMessage_Function_glDrawArraysInstanced = 444, + GLMessage_Function_glDrawElementsInstanced = 445, + GLMessage_Function_glFenceSync = 446, + GLMessage_Function_glIsSync = 447, + GLMessage_Function_glDeleteSync = 448, + GLMessage_Function_glClientWaitSync = 449, + GLMessage_Function_glWaitSync = 450, + GLMessage_Function_glGetInteger64v = 451, + GLMessage_Function_glGetSynciv = 452, + GLMessage_Function_glGetInteger64i_v = 453, + GLMessage_Function_glGetBufferParameteri64v = 454, + GLMessage_Function_glGenSamplers = 455, + GLMessage_Function_glDeleteSamplers = 456, + GLMessage_Function_glIsSampler = 457, + GLMessage_Function_glBindSampler = 458, + GLMessage_Function_glSamplerParameteri = 459, + GLMessage_Function_glSamplerParameteriv = 460, + GLMessage_Function_glSamplerParameterf = 461, + GLMessage_Function_glSamplerParameterfv = 462, + GLMessage_Function_glGetSamplerParameteriv = 463, + GLMessage_Function_glGetSamplerParameterfv = 464, + GLMessage_Function_glVertexAttribDivisor = 465, + GLMessage_Function_glBindTransformFeedback = 466, + GLMessage_Function_glDeleteTransformFeedbacks = 467, + GLMessage_Function_glGenTransformFeedbacks = 468, + GLMessage_Function_glIsTransformFeedback = 469, + GLMessage_Function_glPauseTransformFeedback = 470, + GLMessage_Function_glResumeTransformFeedback = 471, + GLMessage_Function_glGetProgramBinary = 472, + GLMessage_Function_glProgramBinary = 473, + GLMessage_Function_glProgramParameteri = 474, + GLMessage_Function_glInvalidateFramebuffer = 475, + GLMessage_Function_glInvalidateSubFramebuffer = 476, + GLMessage_Function_glTexStorage2D = 477, + GLMessage_Function_glTexStorage3D = 478, + GLMessage_Function_glGetInternalformativ = 479, GLMessage_Function_glActiveShaderProgramEXT = 502, GLMessage_Function_glAlphaFuncQCOM = 503, GLMessage_Function_glBeginQueryEXT = 504, @@ -593,6 +698,7 @@ class GLMessage_DataType : public ::google::protobuf::MessageLite { static const Type FLOAT = GLMessage_DataType_Type_FLOAT; static const Type BOOL = GLMessage_DataType_Type_BOOL; static const Type ENUM = GLMessage_DataType_Type_ENUM; + static const Type INT64 = GLMessage_DataType_Type_INT64; static inline bool Type_IsValid(int value) { return GLMessage_DataType_Type_IsValid(value); } @@ -687,6 +793,18 @@ class GLMessage_DataType : public ::google::protobuf::MessageLite { inline ::google::protobuf::RepeatedField< bool >* mutable_boolvalue(); + // repeated int64 int64Value = 8; + inline int int64value_size() const; + inline void clear_int64value(); + static const int kInt64ValueFieldNumber = 8; + inline ::google::protobuf::int64 int64value(int index) const; + inline void set_int64value(int index, ::google::protobuf::int64 value); + inline void add_int64value(::google::protobuf::int64 value); + inline const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& + int64value() const; + inline ::google::protobuf::RepeatedField< ::google::protobuf::int64 >* + mutable_int64value(); + // @@protoc_insertion_point(class_scope:android.gltrace.GLMessage.DataType) private: mutable int _cached_size_; @@ -698,11 +816,12 @@ class GLMessage_DataType : public ::google::protobuf::MessageLite { ::google::protobuf::RepeatedPtrField< ::std::string> charvalue_; ::google::protobuf::RepeatedPtrField< ::std::string> rawbytes_; ::google::protobuf::RepeatedField< bool > boolvalue_; + ::google::protobuf::RepeatedField< ::google::protobuf::int64 > int64value_; friend void protobuf_AddDesc_gltrace_2eproto(); friend void protobuf_AssignDesc_gltrace_2eproto(); friend void protobuf_ShutdownFile_gltrace_2eproto(); - ::google::protobuf::uint32 _has_bits_[(7 + 31) / 32]; + ::google::protobuf::uint32 _has_bits_[(8 + 31) / 32]; // WHY DOES & HAVE LOWER PRECEDENCE THAN != !? inline bool _has_bit(int index) const { @@ -1243,6 +1362,110 @@ class GLMessage : public ::google::protobuf::MessageLite { static const Function glVertexPointer = GLMessage_Function_glVertexPointer; static const Function glViewport = GLMessage_Function_glViewport; static const Function glWeightPointerOES = GLMessage_Function_glWeightPointerOES; + static const Function glReadBuffer = GLMessage_Function_glReadBuffer; + static const Function glDrawRangeElements = GLMessage_Function_glDrawRangeElements; + static const Function glTexImage3D = GLMessage_Function_glTexImage3D; + static const Function glTexSubImage3D = GLMessage_Function_glTexSubImage3D; + static const Function glCopyTexSubImage3D = GLMessage_Function_glCopyTexSubImage3D; + static const Function glCompressedTexImage3D = GLMessage_Function_glCompressedTexImage3D; + static const Function glCompressedTexSubImage3D = GLMessage_Function_glCompressedTexSubImage3D; + static const Function glGenQueries = GLMessage_Function_glGenQueries; + static const Function glDeleteQueries = GLMessage_Function_glDeleteQueries; + static const Function glIsQuery = GLMessage_Function_glIsQuery; + static const Function glBeginQuery = GLMessage_Function_glBeginQuery; + static const Function glEndQuery = GLMessage_Function_glEndQuery; + static const Function glGetQueryiv = GLMessage_Function_glGetQueryiv; + static const Function glGetQueryObjectuiv = GLMessage_Function_glGetQueryObjectuiv; + static const Function glUnmapBuffer = GLMessage_Function_glUnmapBuffer; + static const Function glGetBufferPointerv = GLMessage_Function_glGetBufferPointerv; + static const Function glDrawBuffers = GLMessage_Function_glDrawBuffers; + static const Function glUniformMatrix2x3fv = GLMessage_Function_glUniformMatrix2x3fv; + static const Function glUniformMatrix3x2fv = GLMessage_Function_glUniformMatrix3x2fv; + static const Function glUniformMatrix2x4fv = GLMessage_Function_glUniformMatrix2x4fv; + static const Function glUniformMatrix4x2fv = GLMessage_Function_glUniformMatrix4x2fv; + static const Function glUniformMatrix3x4fv = GLMessage_Function_glUniformMatrix3x4fv; + static const Function glUniformMatrix4x3fv = GLMessage_Function_glUniformMatrix4x3fv; + static const Function glBlitFramebuffer = GLMessage_Function_glBlitFramebuffer; + static const Function glRenderbufferStorageMultisample = GLMessage_Function_glRenderbufferStorageMultisample; + static const Function glFramebufferTextureLayer = GLMessage_Function_glFramebufferTextureLayer; + static const Function glMapBufferRange = GLMessage_Function_glMapBufferRange; + static const Function glFlushMappedBufferRange = GLMessage_Function_glFlushMappedBufferRange; + static const Function glBindVertexArray = GLMessage_Function_glBindVertexArray; + static const Function glDeleteVertexArrays = GLMessage_Function_glDeleteVertexArrays; + static const Function glGenVertexArrays = GLMessage_Function_glGenVertexArrays; + static const Function glIsVertexArray = GLMessage_Function_glIsVertexArray; + static const Function glGetIntegeri_v = GLMessage_Function_glGetIntegeri_v; + static const Function glBeginTransformFeedback = GLMessage_Function_glBeginTransformFeedback; + static const Function glEndTransformFeedback = GLMessage_Function_glEndTransformFeedback; + static const Function glBindBufferRange = GLMessage_Function_glBindBufferRange; + static const Function glBindBufferBase = GLMessage_Function_glBindBufferBase; + static const Function glTransformFeedbackVaryings = GLMessage_Function_glTransformFeedbackVaryings; + static const Function glGetTransformFeedbackVarying = GLMessage_Function_glGetTransformFeedbackVarying; + static const Function glVertexAttribIPointer = GLMessage_Function_glVertexAttribIPointer; + static const Function glGetVertexAttribIiv = GLMessage_Function_glGetVertexAttribIiv; + static const Function glGetVertexAttribIuiv = GLMessage_Function_glGetVertexAttribIuiv; + static const Function glVertexAttribI4i = GLMessage_Function_glVertexAttribI4i; + static const Function glVertexAttribI4ui = GLMessage_Function_glVertexAttribI4ui; + static const Function glVertexAttribI4iv = GLMessage_Function_glVertexAttribI4iv; + static const Function glVertexAttribI4uiv = GLMessage_Function_glVertexAttribI4uiv; + static const Function glGetUniformuiv = GLMessage_Function_glGetUniformuiv; + static const Function glGetFragDataLocation = GLMessage_Function_glGetFragDataLocation; + static const Function glUniform1ui = GLMessage_Function_glUniform1ui; + static const Function glUniform2ui = GLMessage_Function_glUniform2ui; + static const Function glUniform3ui = GLMessage_Function_glUniform3ui; + static const Function glUniform4ui = GLMessage_Function_glUniform4ui; + static const Function glUniform1uiv = GLMessage_Function_glUniform1uiv; + static const Function glUniform2uiv = GLMessage_Function_glUniform2uiv; + static const Function glUniform3uiv = GLMessage_Function_glUniform3uiv; + static const Function glUniform4uiv = GLMessage_Function_glUniform4uiv; + static const Function glClearBufferiv = GLMessage_Function_glClearBufferiv; + static const Function glClearBufferuiv = GLMessage_Function_glClearBufferuiv; + static const Function glClearBufferfv = GLMessage_Function_glClearBufferfv; + static const Function glClearBufferfi = GLMessage_Function_glClearBufferfi; + static const Function glGetStringi = GLMessage_Function_glGetStringi; + static const Function glCopyBufferSubData = GLMessage_Function_glCopyBufferSubData; + static const Function glGetUniformIndices = GLMessage_Function_glGetUniformIndices; + static const Function glGetActiveUniformsiv = GLMessage_Function_glGetActiveUniformsiv; + static const Function glGetUniformBlockIndex = GLMessage_Function_glGetUniformBlockIndex; + static const Function glGetActiveUniformBlockiv = GLMessage_Function_glGetActiveUniformBlockiv; + static const Function glGetActiveUniformBlockName = GLMessage_Function_glGetActiveUniformBlockName; + static const Function glUniformBlockBinding = GLMessage_Function_glUniformBlockBinding; + static const Function glDrawArraysInstanced = GLMessage_Function_glDrawArraysInstanced; + static const Function glDrawElementsInstanced = GLMessage_Function_glDrawElementsInstanced; + static const Function glFenceSync = GLMessage_Function_glFenceSync; + static const Function glIsSync = GLMessage_Function_glIsSync; + static const Function glDeleteSync = GLMessage_Function_glDeleteSync; + static const Function glClientWaitSync = GLMessage_Function_glClientWaitSync; + static const Function glWaitSync = GLMessage_Function_glWaitSync; + static const Function glGetInteger64v = GLMessage_Function_glGetInteger64v; + static const Function glGetSynciv = GLMessage_Function_glGetSynciv; + static const Function glGetInteger64i_v = GLMessage_Function_glGetInteger64i_v; + static const Function glGetBufferParameteri64v = GLMessage_Function_glGetBufferParameteri64v; + static const Function glGenSamplers = GLMessage_Function_glGenSamplers; + static const Function glDeleteSamplers = GLMessage_Function_glDeleteSamplers; + static const Function glIsSampler = GLMessage_Function_glIsSampler; + static const Function glBindSampler = GLMessage_Function_glBindSampler; + static const Function glSamplerParameteri = GLMessage_Function_glSamplerParameteri; + static const Function glSamplerParameteriv = GLMessage_Function_glSamplerParameteriv; + static const Function glSamplerParameterf = GLMessage_Function_glSamplerParameterf; + static const Function glSamplerParameterfv = GLMessage_Function_glSamplerParameterfv; + static const Function glGetSamplerParameteriv = GLMessage_Function_glGetSamplerParameteriv; + static const Function glGetSamplerParameterfv = GLMessage_Function_glGetSamplerParameterfv; + static const Function glVertexAttribDivisor = GLMessage_Function_glVertexAttribDivisor; + static const Function glBindTransformFeedback = GLMessage_Function_glBindTransformFeedback; + static const Function glDeleteTransformFeedbacks = GLMessage_Function_glDeleteTransformFeedbacks; + static const Function glGenTransformFeedbacks = GLMessage_Function_glGenTransformFeedbacks; + static const Function glIsTransformFeedback = GLMessage_Function_glIsTransformFeedback; + static const Function glPauseTransformFeedback = GLMessage_Function_glPauseTransformFeedback; + static const Function glResumeTransformFeedback = GLMessage_Function_glResumeTransformFeedback; + static const Function glGetProgramBinary = GLMessage_Function_glGetProgramBinary; + static const Function glProgramBinary = GLMessage_Function_glProgramBinary; + static const Function glProgramParameteri = GLMessage_Function_glProgramParameteri; + static const Function glInvalidateFramebuffer = GLMessage_Function_glInvalidateFramebuffer; + static const Function glInvalidateSubFramebuffer = GLMessage_Function_glInvalidateSubFramebuffer; + static const Function glTexStorage2D = GLMessage_Function_glTexStorage2D; + static const Function glTexStorage3D = GLMessage_Function_glTexStorage3D; + static const Function glGetInternalformativ = GLMessage_Function_glGetInternalformativ; static const Function glActiveShaderProgramEXT = GLMessage_Function_glActiveShaderProgramEXT; static const Function glAlphaFuncQCOM = GLMessage_Function_glAlphaFuncQCOM; static const Function glBeginQueryEXT = GLMessage_Function_glBeginQueryEXT; @@ -1660,6 +1883,31 @@ GLMessage_DataType::mutable_boolvalue() { return &boolvalue_; } +// repeated int64 int64Value = 8; +inline int GLMessage_DataType::int64value_size() const { + return int64value_.size(); +} +inline void GLMessage_DataType::clear_int64value() { + int64value_.Clear(); +} +inline ::google::protobuf::int64 GLMessage_DataType::int64value(int index) const { + return int64value_.Get(index); +} +inline void GLMessage_DataType::set_int64value(int index, ::google::protobuf::int64 value) { + int64value_.Set(index, value); +} +inline void GLMessage_DataType::add_int64value(::google::protobuf::int64 value) { + int64value_.Add(value); +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int64 >& +GLMessage_DataType::int64value() const { + return int64value_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::int64 >* +GLMessage_DataType::mutable_int64value() { + return &int64value_; +} + // ------------------------------------------------------------------- // GLMessage_FrameBuffer diff --git a/opengl/libs/GLES_trace/src/gltrace_api.cpp b/opengl/libs/GLES_trace/src/gltrace_api.cpp index 2ae4b11..2b1a702 100644 --- a/opengl/libs/GLES_trace/src/gltrace_api.cpp +++ b/opengl/libs/GLES_trace/src/gltrace_api.cpp @@ -18,7 +18,7 @@ #include <cutils/log.h> #include <utils/Timers.h> -#include <GLES2/gl2.h> +#include <GLES3/gl3.h> #include "gltrace.pb.h" #include "gltrace_context.h" @@ -28,7 +28,7 @@ namespace android { namespace gltrace { -// Definitions for GL2 APIs +// Definitions for GL3 APIs void GLTrace_glActiveTexture(GLenum texture) { GLMessage glmsg; @@ -269,7 +269,7 @@ void GLTrace_glBindTexture(GLenum target, GLuint texture) { glContext->traceGLMessage(&glmsg); } -void GLTrace_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { +void GLTrace_glBlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { GLMessage glmsg; GLTraceContext *glContext = getGLTraceContext(); @@ -615,7 +615,7 @@ void GLTrace_glClear(GLbitfield mask) { glContext->traceGLMessage(&glmsg); } -void GLTrace_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) { +void GLTrace_glClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { GLMessage glmsg; GLTraceContext *glContext = getGLTraceContext(); @@ -661,7 +661,7 @@ void GLTrace_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf glContext->traceGLMessage(&glmsg); } -void GLTrace_glClearDepthf(GLclampf depth) { +void GLTrace_glClearDepthf(GLfloat depth) { GLMessage glmsg; GLTraceContext *glContext = getGLTraceContext(); @@ -1425,28 +1425,28 @@ void GLTrace_glDepthMask(GLboolean flag) { glContext->traceGLMessage(&glmsg); } -void GLTrace_glDepthRangef(GLclampf zNear, GLclampf zFar) { +void GLTrace_glDepthRangef(GLfloat n, GLfloat f) { GLMessage glmsg; GLTraceContext *glContext = getGLTraceContext(); glmsg.set_function(GLMessage::glDepthRangef); - // copy argument zNear - GLMessage_DataType *arg_zNear = glmsg.add_args(); - arg_zNear->set_isarray(false); - arg_zNear->set_type(GLMessage::DataType::FLOAT); - arg_zNear->add_floatvalue(zNear); + // copy argument n + GLMessage_DataType *arg_n = glmsg.add_args(); + arg_n->set_isarray(false); + arg_n->set_type(GLMessage::DataType::FLOAT); + arg_n->add_floatvalue(n); - // copy argument zFar - GLMessage_DataType *arg_zFar = glmsg.add_args(); - arg_zFar->set_isarray(false); - arg_zFar->set_type(GLMessage::DataType::FLOAT); - arg_zFar->add_floatvalue(zFar); + // copy argument f + GLMessage_DataType *arg_f = glmsg.add_args(); + arg_f->set_isarray(false); + arg_f->set_type(GLMessage::DataType::FLOAT); + arg_f->add_floatvalue(f); // call function nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); - glContext->hooks->gl.glDepthRangef(zNear, zFar); + glContext->hooks->gl.glDepthRangef(n, f); nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); @@ -3705,7 +3705,7 @@ void GLTrace_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei glContext->traceGLMessage(&glmsg); } -void GLTrace_glSampleCoverage(GLclampf value, GLboolean invert) { +void GLTrace_glSampleCoverage(GLfloat value, GLboolean invert) { GLMessage glmsg; GLTraceContext *glContext = getGLTraceContext(); @@ -3839,7 +3839,7 @@ void GLTrace_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryforma glContext->traceGLMessage(&glmsg); } -void GLTrace_glShaderSource(GLuint shader, GLsizei count, const GLchar** string, const GLint* length) { +void GLTrace_glShaderSource(GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length) { GLMessage glmsg; GLTraceContext *glContext = getGLTraceContext(); @@ -5723,6 +5723,4626 @@ void GLTrace_glViewport(GLint x, GLint y, GLsizei width, GLsizei height) { glContext->traceGLMessage(&glmsg); } +void GLTrace_glReadBuffer(GLenum mode) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glReadBuffer); + + // copy argument mode + GLMessage_DataType *arg_mode = glmsg.add_args(); + arg_mode->set_isarray(false); + arg_mode->set_type(GLMessage::DataType::ENUM); + arg_mode->add_intvalue((int)mode); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glReadBuffer(mode); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glDrawRangeElements); + + // copy argument mode + GLMessage_DataType *arg_mode = glmsg.add_args(); + arg_mode->set_isarray(false); + arg_mode->set_type(GLMessage::DataType::ENUM); + arg_mode->add_intvalue((int)mode); + + // copy argument start + GLMessage_DataType *arg_start = glmsg.add_args(); + arg_start->set_isarray(false); + arg_start->set_type(GLMessage::DataType::INT); + arg_start->add_intvalue(start); + + // copy argument end + GLMessage_DataType *arg_end = glmsg.add_args(); + arg_end->set_isarray(false); + arg_end->set_type(GLMessage::DataType::INT); + arg_end->add_intvalue(end); + + // copy argument count + GLMessage_DataType *arg_count = glmsg.add_args(); + arg_count->set_isarray(false); + arg_count->set_type(GLMessage::DataType::INT); + arg_count->add_intvalue(count); + + // copy argument type + GLMessage_DataType *arg_type = glmsg.add_args(); + arg_type->set_isarray(false); + arg_type->set_type(GLMessage::DataType::ENUM); + arg_type->add_intvalue((int)type); + + // copy argument indices + GLMessage_DataType *arg_indices = glmsg.add_args(); + arg_indices->set_isarray(false); + arg_indices->set_type(GLMessage::DataType::INT); + arg_indices->add_intvalue((int)indices); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glDrawRangeElements(mode, start, end, count, type, indices); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) indices, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glTexImage3D); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument level + GLMessage_DataType *arg_level = glmsg.add_args(); + arg_level->set_isarray(false); + arg_level->set_type(GLMessage::DataType::INT); + arg_level->add_intvalue(level); + + // copy argument internalformat + GLMessage_DataType *arg_internalformat = glmsg.add_args(); + arg_internalformat->set_isarray(false); + arg_internalformat->set_type(GLMessage::DataType::INT); + arg_internalformat->add_intvalue(internalformat); + + // copy argument width + GLMessage_DataType *arg_width = glmsg.add_args(); + arg_width->set_isarray(false); + arg_width->set_type(GLMessage::DataType::INT); + arg_width->add_intvalue(width); + + // copy argument height + GLMessage_DataType *arg_height = glmsg.add_args(); + arg_height->set_isarray(false); + arg_height->set_type(GLMessage::DataType::INT); + arg_height->add_intvalue(height); + + // copy argument depth + GLMessage_DataType *arg_depth = glmsg.add_args(); + arg_depth->set_isarray(false); + arg_depth->set_type(GLMessage::DataType::INT); + arg_depth->add_intvalue(depth); + + // copy argument border + GLMessage_DataType *arg_border = glmsg.add_args(); + arg_border->set_isarray(false); + arg_border->set_type(GLMessage::DataType::INT); + arg_border->add_intvalue(border); + + // copy argument format + GLMessage_DataType *arg_format = glmsg.add_args(); + arg_format->set_isarray(false); + arg_format->set_type(GLMessage::DataType::ENUM); + arg_format->add_intvalue((int)format); + + // copy argument type + GLMessage_DataType *arg_type = glmsg.add_args(); + arg_type->set_isarray(false); + arg_type->set_type(GLMessage::DataType::ENUM); + arg_type->add_intvalue((int)type); + + // copy argument pixels + GLMessage_DataType *arg_pixels = glmsg.add_args(); + arg_pixels->set_isarray(false); + arg_pixels->set_type(GLMessage::DataType::INT); + arg_pixels->add_intvalue((int)pixels); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) pixels, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glTexSubImage3D); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument level + GLMessage_DataType *arg_level = glmsg.add_args(); + arg_level->set_isarray(false); + arg_level->set_type(GLMessage::DataType::INT); + arg_level->add_intvalue(level); + + // copy argument xoffset + GLMessage_DataType *arg_xoffset = glmsg.add_args(); + arg_xoffset->set_isarray(false); + arg_xoffset->set_type(GLMessage::DataType::INT); + arg_xoffset->add_intvalue(xoffset); + + // copy argument yoffset + GLMessage_DataType *arg_yoffset = glmsg.add_args(); + arg_yoffset->set_isarray(false); + arg_yoffset->set_type(GLMessage::DataType::INT); + arg_yoffset->add_intvalue(yoffset); + + // copy argument zoffset + GLMessage_DataType *arg_zoffset = glmsg.add_args(); + arg_zoffset->set_isarray(false); + arg_zoffset->set_type(GLMessage::DataType::INT); + arg_zoffset->add_intvalue(zoffset); + + // copy argument width + GLMessage_DataType *arg_width = glmsg.add_args(); + arg_width->set_isarray(false); + arg_width->set_type(GLMessage::DataType::INT); + arg_width->add_intvalue(width); + + // copy argument height + GLMessage_DataType *arg_height = glmsg.add_args(); + arg_height->set_isarray(false); + arg_height->set_type(GLMessage::DataType::INT); + arg_height->add_intvalue(height); + + // copy argument depth + GLMessage_DataType *arg_depth = glmsg.add_args(); + arg_depth->set_isarray(false); + arg_depth->set_type(GLMessage::DataType::INT); + arg_depth->add_intvalue(depth); + + // copy argument format + GLMessage_DataType *arg_format = glmsg.add_args(); + arg_format->set_isarray(false); + arg_format->set_type(GLMessage::DataType::ENUM); + arg_format->add_intvalue((int)format); + + // copy argument type + GLMessage_DataType *arg_type = glmsg.add_args(); + arg_type->set_isarray(false); + arg_type->set_type(GLMessage::DataType::ENUM); + arg_type->add_intvalue((int)type); + + // copy argument pixels + GLMessage_DataType *arg_pixels = glmsg.add_args(); + arg_pixels->set_isarray(false); + arg_pixels->set_type(GLMessage::DataType::INT); + arg_pixels->add_intvalue((int)pixels); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) pixels, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glCopyTexSubImage3D); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument level + GLMessage_DataType *arg_level = glmsg.add_args(); + arg_level->set_isarray(false); + arg_level->set_type(GLMessage::DataType::INT); + arg_level->add_intvalue(level); + + // copy argument xoffset + GLMessage_DataType *arg_xoffset = glmsg.add_args(); + arg_xoffset->set_isarray(false); + arg_xoffset->set_type(GLMessage::DataType::INT); + arg_xoffset->add_intvalue(xoffset); + + // copy argument yoffset + GLMessage_DataType *arg_yoffset = glmsg.add_args(); + arg_yoffset->set_isarray(false); + arg_yoffset->set_type(GLMessage::DataType::INT); + arg_yoffset->add_intvalue(yoffset); + + // copy argument zoffset + GLMessage_DataType *arg_zoffset = glmsg.add_args(); + arg_zoffset->set_isarray(false); + arg_zoffset->set_type(GLMessage::DataType::INT); + arg_zoffset->add_intvalue(zoffset); + + // copy argument x + GLMessage_DataType *arg_x = glmsg.add_args(); + arg_x->set_isarray(false); + arg_x->set_type(GLMessage::DataType::INT); + arg_x->add_intvalue(x); + + // copy argument y + GLMessage_DataType *arg_y = glmsg.add_args(); + arg_y->set_isarray(false); + arg_y->set_type(GLMessage::DataType::INT); + arg_y->add_intvalue(y); + + // copy argument width + GLMessage_DataType *arg_width = glmsg.add_args(); + arg_width->set_isarray(false); + arg_width->set_type(GLMessage::DataType::INT); + arg_width->add_intvalue(width); + + // copy argument height + GLMessage_DataType *arg_height = glmsg.add_args(); + arg_height->set_isarray(false); + arg_height->set_type(GLMessage::DataType::INT); + arg_height->add_intvalue(height); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glCompressedTexImage3D); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument level + GLMessage_DataType *arg_level = glmsg.add_args(); + arg_level->set_isarray(false); + arg_level->set_type(GLMessage::DataType::INT); + arg_level->add_intvalue(level); + + // copy argument internalformat + GLMessage_DataType *arg_internalformat = glmsg.add_args(); + arg_internalformat->set_isarray(false); + arg_internalformat->set_type(GLMessage::DataType::ENUM); + arg_internalformat->add_intvalue((int)internalformat); + + // copy argument width + GLMessage_DataType *arg_width = glmsg.add_args(); + arg_width->set_isarray(false); + arg_width->set_type(GLMessage::DataType::INT); + arg_width->add_intvalue(width); + + // copy argument height + GLMessage_DataType *arg_height = glmsg.add_args(); + arg_height->set_isarray(false); + arg_height->set_type(GLMessage::DataType::INT); + arg_height->add_intvalue(height); + + // copy argument depth + GLMessage_DataType *arg_depth = glmsg.add_args(); + arg_depth->set_isarray(false); + arg_depth->set_type(GLMessage::DataType::INT); + arg_depth->add_intvalue(depth); + + // copy argument border + GLMessage_DataType *arg_border = glmsg.add_args(); + arg_border->set_isarray(false); + arg_border->set_type(GLMessage::DataType::INT); + arg_border->add_intvalue(border); + + // copy argument imageSize + GLMessage_DataType *arg_imageSize = glmsg.add_args(); + arg_imageSize->set_isarray(false); + arg_imageSize->set_type(GLMessage::DataType::INT); + arg_imageSize->add_intvalue(imageSize); + + // copy argument data + GLMessage_DataType *arg_data = glmsg.add_args(); + arg_data->set_isarray(false); + arg_data->set_type(GLMessage::DataType::INT); + arg_data->add_intvalue((int)data); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) data, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glCompressedTexSubImage3D); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument level + GLMessage_DataType *arg_level = glmsg.add_args(); + arg_level->set_isarray(false); + arg_level->set_type(GLMessage::DataType::INT); + arg_level->add_intvalue(level); + + // copy argument xoffset + GLMessage_DataType *arg_xoffset = glmsg.add_args(); + arg_xoffset->set_isarray(false); + arg_xoffset->set_type(GLMessage::DataType::INT); + arg_xoffset->add_intvalue(xoffset); + + // copy argument yoffset + GLMessage_DataType *arg_yoffset = glmsg.add_args(); + arg_yoffset->set_isarray(false); + arg_yoffset->set_type(GLMessage::DataType::INT); + arg_yoffset->add_intvalue(yoffset); + + // copy argument zoffset + GLMessage_DataType *arg_zoffset = glmsg.add_args(); + arg_zoffset->set_isarray(false); + arg_zoffset->set_type(GLMessage::DataType::INT); + arg_zoffset->add_intvalue(zoffset); + + // copy argument width + GLMessage_DataType *arg_width = glmsg.add_args(); + arg_width->set_isarray(false); + arg_width->set_type(GLMessage::DataType::INT); + arg_width->add_intvalue(width); + + // copy argument height + GLMessage_DataType *arg_height = glmsg.add_args(); + arg_height->set_isarray(false); + arg_height->set_type(GLMessage::DataType::INT); + arg_height->add_intvalue(height); + + // copy argument depth + GLMessage_DataType *arg_depth = glmsg.add_args(); + arg_depth->set_isarray(false); + arg_depth->set_type(GLMessage::DataType::INT); + arg_depth->add_intvalue(depth); + + // copy argument format + GLMessage_DataType *arg_format = glmsg.add_args(); + arg_format->set_isarray(false); + arg_format->set_type(GLMessage::DataType::ENUM); + arg_format->add_intvalue((int)format); + + // copy argument imageSize + GLMessage_DataType *arg_imageSize = glmsg.add_args(); + arg_imageSize->set_isarray(false); + arg_imageSize->set_type(GLMessage::DataType::INT); + arg_imageSize->add_intvalue(imageSize); + + // copy argument data + GLMessage_DataType *arg_data = glmsg.add_args(); + arg_data->set_isarray(false); + arg_data->set_type(GLMessage::DataType::INT); + arg_data->add_intvalue((int)data); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) data, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glGenQueries(GLsizei n, GLuint* ids) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGenQueries); + + // copy argument n + GLMessage_DataType *arg_n = glmsg.add_args(); + arg_n->set_isarray(false); + arg_n->set_type(GLMessage::DataType::INT); + arg_n->add_intvalue(n); + + // copy argument ids + GLMessage_DataType *arg_ids = glmsg.add_args(); + arg_ids->set_isarray(false); + arg_ids->set_type(GLMessage::DataType::INT); + arg_ids->add_intvalue((int)ids); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGenQueries(n, ids); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) ids, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glDeleteQueries(GLsizei n, const GLuint* ids) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glDeleteQueries); + + // copy argument n + GLMessage_DataType *arg_n = glmsg.add_args(); + arg_n->set_isarray(false); + arg_n->set_type(GLMessage::DataType::INT); + arg_n->add_intvalue(n); + + // copy argument ids + GLMessage_DataType *arg_ids = glmsg.add_args(); + arg_ids->set_isarray(false); + arg_ids->set_type(GLMessage::DataType::INT); + arg_ids->add_intvalue((int)ids); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glDeleteQueries(n, ids); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) ids, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +GLboolean GLTrace_glIsQuery(GLuint id) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glIsQuery); + + // copy argument id + GLMessage_DataType *arg_id = glmsg.add_args(); + arg_id->set_isarray(false); + arg_id->set_type(GLMessage::DataType::INT); + arg_id->add_intvalue(id); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + GLboolean retValue = glContext->hooks->gl.glIsQuery(id); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + // set return value + GLMessage_DataType *rt = glmsg.mutable_returnvalue(); + rt->set_isarray(false); + rt->set_type(GLMessage::DataType::BOOL); + rt->add_boolvalue(retValue); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); + + return retValue; +} + +void GLTrace_glBeginQuery(GLenum target, GLuint id) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glBeginQuery); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument id + GLMessage_DataType *arg_id = glmsg.add_args(); + arg_id->set_isarray(false); + arg_id->set_type(GLMessage::DataType::INT); + arg_id->add_intvalue(id); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glBeginQuery(target, id); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glEndQuery(GLenum target) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glEndQuery); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glEndQuery(target); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glGetQueryiv(GLenum target, GLenum pname, GLint* params) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetQueryiv); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument pname + GLMessage_DataType *arg_pname = glmsg.add_args(); + arg_pname->set_isarray(false); + arg_pname->set_type(GLMessage::DataType::ENUM); + arg_pname->add_intvalue((int)pname); + + // copy argument params + GLMessage_DataType *arg_params = glmsg.add_args(); + arg_params->set_isarray(false); + arg_params->set_type(GLMessage::DataType::INT); + arg_params->add_intvalue((int)params); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGetQueryiv(target, pname, params); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) params, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetQueryObjectuiv); + + // copy argument id + GLMessage_DataType *arg_id = glmsg.add_args(); + arg_id->set_isarray(false); + arg_id->set_type(GLMessage::DataType::INT); + arg_id->add_intvalue(id); + + // copy argument pname + GLMessage_DataType *arg_pname = glmsg.add_args(); + arg_pname->set_isarray(false); + arg_pname->set_type(GLMessage::DataType::ENUM); + arg_pname->add_intvalue((int)pname); + + // copy argument params + GLMessage_DataType *arg_params = glmsg.add_args(); + arg_params->set_isarray(false); + arg_params->set_type(GLMessage::DataType::INT); + arg_params->add_intvalue((int)params); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGetQueryObjectuiv(id, pname, params); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) params, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +GLboolean GLTrace_glUnmapBuffer(GLenum target) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glUnmapBuffer); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + GLboolean retValue = glContext->hooks->gl.glUnmapBuffer(target); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + // set return value + GLMessage_DataType *rt = glmsg.mutable_returnvalue(); + rt->set_isarray(false); + rt->set_type(GLMessage::DataType::BOOL); + rt->add_boolvalue(retValue); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); + + return retValue; +} + +void GLTrace_glGetBufferPointerv(GLenum target, GLenum pname, GLvoid** params) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetBufferPointerv); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument pname + GLMessage_DataType *arg_pname = glmsg.add_args(); + arg_pname->set_isarray(false); + arg_pname->set_type(GLMessage::DataType::ENUM); + arg_pname->add_intvalue((int)pname); + + // copy argument params + GLMessage_DataType *arg_params = glmsg.add_args(); + arg_params->set_isarray(false); + arg_params->set_type(GLMessage::DataType::INT); + arg_params->add_intvalue((int)params); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGetBufferPointerv(target, pname, params); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) params, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glDrawBuffers(GLsizei n, const GLenum* bufs) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glDrawBuffers); + + // copy argument n + GLMessage_DataType *arg_n = glmsg.add_args(); + arg_n->set_isarray(false); + arg_n->set_type(GLMessage::DataType::INT); + arg_n->add_intvalue(n); + + // copy argument bufs + GLMessage_DataType *arg_bufs = glmsg.add_args(); + arg_bufs->set_isarray(false); + arg_bufs->set_type(GLMessage::DataType::INT); + arg_bufs->add_intvalue((int)bufs); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glDrawBuffers(n, bufs); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) bufs, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glUniformMatrix2x3fv); + + // copy argument location + GLMessage_DataType *arg_location = glmsg.add_args(); + arg_location->set_isarray(false); + arg_location->set_type(GLMessage::DataType::INT); + arg_location->add_intvalue(location); + + // copy argument count + GLMessage_DataType *arg_count = glmsg.add_args(); + arg_count->set_isarray(false); + arg_count->set_type(GLMessage::DataType::INT); + arg_count->add_intvalue(count); + + // copy argument transpose + GLMessage_DataType *arg_transpose = glmsg.add_args(); + arg_transpose->set_isarray(false); + arg_transpose->set_type(GLMessage::DataType::BOOL); + arg_transpose->add_boolvalue(transpose); + + // copy argument value + GLMessage_DataType *arg_value = glmsg.add_args(); + arg_value->set_isarray(false); + arg_value->set_type(GLMessage::DataType::INT); + arg_value->add_intvalue((int)value); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glUniformMatrix2x3fv(location, count, transpose, value); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) value, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glUniformMatrix3x2fv); + + // copy argument location + GLMessage_DataType *arg_location = glmsg.add_args(); + arg_location->set_isarray(false); + arg_location->set_type(GLMessage::DataType::INT); + arg_location->add_intvalue(location); + + // copy argument count + GLMessage_DataType *arg_count = glmsg.add_args(); + arg_count->set_isarray(false); + arg_count->set_type(GLMessage::DataType::INT); + arg_count->add_intvalue(count); + + // copy argument transpose + GLMessage_DataType *arg_transpose = glmsg.add_args(); + arg_transpose->set_isarray(false); + arg_transpose->set_type(GLMessage::DataType::BOOL); + arg_transpose->add_boolvalue(transpose); + + // copy argument value + GLMessage_DataType *arg_value = glmsg.add_args(); + arg_value->set_isarray(false); + arg_value->set_type(GLMessage::DataType::INT); + arg_value->add_intvalue((int)value); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glUniformMatrix3x2fv(location, count, transpose, value); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) value, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glUniformMatrix2x4fv); + + // copy argument location + GLMessage_DataType *arg_location = glmsg.add_args(); + arg_location->set_isarray(false); + arg_location->set_type(GLMessage::DataType::INT); + arg_location->add_intvalue(location); + + // copy argument count + GLMessage_DataType *arg_count = glmsg.add_args(); + arg_count->set_isarray(false); + arg_count->set_type(GLMessage::DataType::INT); + arg_count->add_intvalue(count); + + // copy argument transpose + GLMessage_DataType *arg_transpose = glmsg.add_args(); + arg_transpose->set_isarray(false); + arg_transpose->set_type(GLMessage::DataType::BOOL); + arg_transpose->add_boolvalue(transpose); + + // copy argument value + GLMessage_DataType *arg_value = glmsg.add_args(); + arg_value->set_isarray(false); + arg_value->set_type(GLMessage::DataType::INT); + arg_value->add_intvalue((int)value); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glUniformMatrix2x4fv(location, count, transpose, value); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) value, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glUniformMatrix4x2fv); + + // copy argument location + GLMessage_DataType *arg_location = glmsg.add_args(); + arg_location->set_isarray(false); + arg_location->set_type(GLMessage::DataType::INT); + arg_location->add_intvalue(location); + + // copy argument count + GLMessage_DataType *arg_count = glmsg.add_args(); + arg_count->set_isarray(false); + arg_count->set_type(GLMessage::DataType::INT); + arg_count->add_intvalue(count); + + // copy argument transpose + GLMessage_DataType *arg_transpose = glmsg.add_args(); + arg_transpose->set_isarray(false); + arg_transpose->set_type(GLMessage::DataType::BOOL); + arg_transpose->add_boolvalue(transpose); + + // copy argument value + GLMessage_DataType *arg_value = glmsg.add_args(); + arg_value->set_isarray(false); + arg_value->set_type(GLMessage::DataType::INT); + arg_value->add_intvalue((int)value); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glUniformMatrix4x2fv(location, count, transpose, value); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) value, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glUniformMatrix3x4fv); + + // copy argument location + GLMessage_DataType *arg_location = glmsg.add_args(); + arg_location->set_isarray(false); + arg_location->set_type(GLMessage::DataType::INT); + arg_location->add_intvalue(location); + + // copy argument count + GLMessage_DataType *arg_count = glmsg.add_args(); + arg_count->set_isarray(false); + arg_count->set_type(GLMessage::DataType::INT); + arg_count->add_intvalue(count); + + // copy argument transpose + GLMessage_DataType *arg_transpose = glmsg.add_args(); + arg_transpose->set_isarray(false); + arg_transpose->set_type(GLMessage::DataType::BOOL); + arg_transpose->add_boolvalue(transpose); + + // copy argument value + GLMessage_DataType *arg_value = glmsg.add_args(); + arg_value->set_isarray(false); + arg_value->set_type(GLMessage::DataType::INT); + arg_value->add_intvalue((int)value); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glUniformMatrix3x4fv(location, count, transpose, value); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) value, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glUniformMatrix4x3fv); + + // copy argument location + GLMessage_DataType *arg_location = glmsg.add_args(); + arg_location->set_isarray(false); + arg_location->set_type(GLMessage::DataType::INT); + arg_location->add_intvalue(location); + + // copy argument count + GLMessage_DataType *arg_count = glmsg.add_args(); + arg_count->set_isarray(false); + arg_count->set_type(GLMessage::DataType::INT); + arg_count->add_intvalue(count); + + // copy argument transpose + GLMessage_DataType *arg_transpose = glmsg.add_args(); + arg_transpose->set_isarray(false); + arg_transpose->set_type(GLMessage::DataType::BOOL); + arg_transpose->add_boolvalue(transpose); + + // copy argument value + GLMessage_DataType *arg_value = glmsg.add_args(); + arg_value->set_isarray(false); + arg_value->set_type(GLMessage::DataType::INT); + arg_value->add_intvalue((int)value); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glUniformMatrix4x3fv(location, count, transpose, value); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) value, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glBlitFramebuffer); + + // copy argument srcX0 + GLMessage_DataType *arg_srcX0 = glmsg.add_args(); + arg_srcX0->set_isarray(false); + arg_srcX0->set_type(GLMessage::DataType::INT); + arg_srcX0->add_intvalue(srcX0); + + // copy argument srcY0 + GLMessage_DataType *arg_srcY0 = glmsg.add_args(); + arg_srcY0->set_isarray(false); + arg_srcY0->set_type(GLMessage::DataType::INT); + arg_srcY0->add_intvalue(srcY0); + + // copy argument srcX1 + GLMessage_DataType *arg_srcX1 = glmsg.add_args(); + arg_srcX1->set_isarray(false); + arg_srcX1->set_type(GLMessage::DataType::INT); + arg_srcX1->add_intvalue(srcX1); + + // copy argument srcY1 + GLMessage_DataType *arg_srcY1 = glmsg.add_args(); + arg_srcY1->set_isarray(false); + arg_srcY1->set_type(GLMessage::DataType::INT); + arg_srcY1->add_intvalue(srcY1); + + // copy argument dstX0 + GLMessage_DataType *arg_dstX0 = glmsg.add_args(); + arg_dstX0->set_isarray(false); + arg_dstX0->set_type(GLMessage::DataType::INT); + arg_dstX0->add_intvalue(dstX0); + + // copy argument dstY0 + GLMessage_DataType *arg_dstY0 = glmsg.add_args(); + arg_dstY0->set_isarray(false); + arg_dstY0->set_type(GLMessage::DataType::INT); + arg_dstY0->add_intvalue(dstY0); + + // copy argument dstX1 + GLMessage_DataType *arg_dstX1 = glmsg.add_args(); + arg_dstX1->set_isarray(false); + arg_dstX1->set_type(GLMessage::DataType::INT); + arg_dstX1->add_intvalue(dstX1); + + // copy argument dstY1 + GLMessage_DataType *arg_dstY1 = glmsg.add_args(); + arg_dstY1->set_isarray(false); + arg_dstY1->set_type(GLMessage::DataType::INT); + arg_dstY1->add_intvalue(dstY1); + + // copy argument mask + GLMessage_DataType *arg_mask = glmsg.add_args(); + arg_mask->set_isarray(false); + arg_mask->set_type(GLMessage::DataType::INT); + arg_mask->add_intvalue(mask); + + // copy argument filter + GLMessage_DataType *arg_filter = glmsg.add_args(); + arg_filter->set_isarray(false); + arg_filter->set_type(GLMessage::DataType::ENUM); + arg_filter->add_intvalue((int)filter); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glRenderbufferStorageMultisample); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument samples + GLMessage_DataType *arg_samples = glmsg.add_args(); + arg_samples->set_isarray(false); + arg_samples->set_type(GLMessage::DataType::INT); + arg_samples->add_intvalue(samples); + + // copy argument internalformat + GLMessage_DataType *arg_internalformat = glmsg.add_args(); + arg_internalformat->set_isarray(false); + arg_internalformat->set_type(GLMessage::DataType::ENUM); + arg_internalformat->add_intvalue((int)internalformat); + + // copy argument width + GLMessage_DataType *arg_width = glmsg.add_args(); + arg_width->set_isarray(false); + arg_width->set_type(GLMessage::DataType::INT); + arg_width->add_intvalue(width); + + // copy argument height + GLMessage_DataType *arg_height = glmsg.add_args(); + arg_height->set_isarray(false); + arg_height->set_type(GLMessage::DataType::INT); + arg_height->add_intvalue(height); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glRenderbufferStorageMultisample(target, samples, internalformat, width, height); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glFramebufferTextureLayer); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument attachment + GLMessage_DataType *arg_attachment = glmsg.add_args(); + arg_attachment->set_isarray(false); + arg_attachment->set_type(GLMessage::DataType::ENUM); + arg_attachment->add_intvalue((int)attachment); + + // copy argument texture + GLMessage_DataType *arg_texture = glmsg.add_args(); + arg_texture->set_isarray(false); + arg_texture->set_type(GLMessage::DataType::INT); + arg_texture->add_intvalue(texture); + + // copy argument level + GLMessage_DataType *arg_level = glmsg.add_args(); + arg_level->set_isarray(false); + arg_level->set_type(GLMessage::DataType::INT); + arg_level->add_intvalue(level); + + // copy argument layer + GLMessage_DataType *arg_layer = glmsg.add_args(); + arg_layer->set_isarray(false); + arg_layer->set_type(GLMessage::DataType::INT); + arg_layer->add_intvalue(layer); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glFramebufferTextureLayer(target, attachment, texture, level, layer); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +GLvoid* GLTrace_glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glMapBufferRange); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument offset + GLMessage_DataType *arg_offset = glmsg.add_args(); + arg_offset->set_isarray(false); + arg_offset->set_type(GLMessage::DataType::INT); + arg_offset->add_intvalue(offset); + + // copy argument length + GLMessage_DataType *arg_length = glmsg.add_args(); + arg_length->set_isarray(false); + arg_length->set_type(GLMessage::DataType::INT); + arg_length->add_intvalue(length); + + // copy argument access + GLMessage_DataType *arg_access = glmsg.add_args(); + arg_access->set_isarray(false); + arg_access->set_type(GLMessage::DataType::INT); + arg_access->add_intvalue(access); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + GLvoid* retValue = glContext->hooks->gl.glMapBufferRange(target, offset, length, access); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + // set return value + GLMessage_DataType *rt = glmsg.mutable_returnvalue(); + rt->set_isarray(false); + rt->set_type(GLMessage::DataType::INT); + rt->add_intvalue((int)retValue); + + void *pointerArgs[] = { + (void *) retValue, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); + + return retValue; +} + +void GLTrace_glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glFlushMappedBufferRange); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument offset + GLMessage_DataType *arg_offset = glmsg.add_args(); + arg_offset->set_isarray(false); + arg_offset->set_type(GLMessage::DataType::INT); + arg_offset->add_intvalue(offset); + + // copy argument length + GLMessage_DataType *arg_length = glmsg.add_args(); + arg_length->set_isarray(false); + arg_length->set_type(GLMessage::DataType::INT); + arg_length->add_intvalue(length); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glFlushMappedBufferRange(target, offset, length); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glBindVertexArray(GLuint array) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glBindVertexArray); + + // copy argument array + GLMessage_DataType *arg_array = glmsg.add_args(); + arg_array->set_isarray(false); + arg_array->set_type(GLMessage::DataType::INT); + arg_array->add_intvalue(array); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glBindVertexArray(array); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glDeleteVertexArrays(GLsizei n, const GLuint* arrays) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glDeleteVertexArrays); + + // copy argument n + GLMessage_DataType *arg_n = glmsg.add_args(); + arg_n->set_isarray(false); + arg_n->set_type(GLMessage::DataType::INT); + arg_n->add_intvalue(n); + + // copy argument arrays + GLMessage_DataType *arg_arrays = glmsg.add_args(); + arg_arrays->set_isarray(false); + arg_arrays->set_type(GLMessage::DataType::INT); + arg_arrays->add_intvalue((int)arrays); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glDeleteVertexArrays(n, arrays); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) arrays, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glGenVertexArrays(GLsizei n, GLuint* arrays) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGenVertexArrays); + + // copy argument n + GLMessage_DataType *arg_n = glmsg.add_args(); + arg_n->set_isarray(false); + arg_n->set_type(GLMessage::DataType::INT); + arg_n->add_intvalue(n); + + // copy argument arrays + GLMessage_DataType *arg_arrays = glmsg.add_args(); + arg_arrays->set_isarray(false); + arg_arrays->set_type(GLMessage::DataType::INT); + arg_arrays->add_intvalue((int)arrays); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGenVertexArrays(n, arrays); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) arrays, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +GLboolean GLTrace_glIsVertexArray(GLuint array) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glIsVertexArray); + + // copy argument array + GLMessage_DataType *arg_array = glmsg.add_args(); + arg_array->set_isarray(false); + arg_array->set_type(GLMessage::DataType::INT); + arg_array->add_intvalue(array); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + GLboolean retValue = glContext->hooks->gl.glIsVertexArray(array); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + // set return value + GLMessage_DataType *rt = glmsg.mutable_returnvalue(); + rt->set_isarray(false); + rt->set_type(GLMessage::DataType::BOOL); + rt->add_boolvalue(retValue); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); + + return retValue; +} + +void GLTrace_glGetIntegeri_v(GLenum target, GLuint index, GLint* data) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetIntegeri_v); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument index + GLMessage_DataType *arg_index = glmsg.add_args(); + arg_index->set_isarray(false); + arg_index->set_type(GLMessage::DataType::INT); + arg_index->add_intvalue(index); + + // copy argument data + GLMessage_DataType *arg_data = glmsg.add_args(); + arg_data->set_isarray(false); + arg_data->set_type(GLMessage::DataType::INT); + arg_data->add_intvalue((int)data); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGetIntegeri_v(target, index, data); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) data, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glBeginTransformFeedback(GLenum primitiveMode) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glBeginTransformFeedback); + + // copy argument primitiveMode + GLMessage_DataType *arg_primitiveMode = glmsg.add_args(); + arg_primitiveMode->set_isarray(false); + arg_primitiveMode->set_type(GLMessage::DataType::ENUM); + arg_primitiveMode->add_intvalue((int)primitiveMode); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glBeginTransformFeedback(primitiveMode); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glEndTransformFeedback(void) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glEndTransformFeedback); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glEndTransformFeedback(); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glBindBufferRange); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument index + GLMessage_DataType *arg_index = glmsg.add_args(); + arg_index->set_isarray(false); + arg_index->set_type(GLMessage::DataType::INT); + arg_index->add_intvalue(index); + + // copy argument buffer + GLMessage_DataType *arg_buffer = glmsg.add_args(); + arg_buffer->set_isarray(false); + arg_buffer->set_type(GLMessage::DataType::INT); + arg_buffer->add_intvalue(buffer); + + // copy argument offset + GLMessage_DataType *arg_offset = glmsg.add_args(); + arg_offset->set_isarray(false); + arg_offset->set_type(GLMessage::DataType::INT); + arg_offset->add_intvalue(offset); + + // copy argument size + GLMessage_DataType *arg_size = glmsg.add_args(); + arg_size->set_isarray(false); + arg_size->set_type(GLMessage::DataType::INT); + arg_size->add_intvalue(size); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glBindBufferRange(target, index, buffer, offset, size); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glBindBufferBase(GLenum target, GLuint index, GLuint buffer) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glBindBufferBase); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument index + GLMessage_DataType *arg_index = glmsg.add_args(); + arg_index->set_isarray(false); + arg_index->set_type(GLMessage::DataType::INT); + arg_index->add_intvalue(index); + + // copy argument buffer + GLMessage_DataType *arg_buffer = glmsg.add_args(); + arg_buffer->set_isarray(false); + arg_buffer->set_type(GLMessage::DataType::INT); + arg_buffer->add_intvalue(buffer); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glBindBufferBase(target, index, buffer); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glTransformFeedbackVaryings); + + // copy argument program + GLMessage_DataType *arg_program = glmsg.add_args(); + arg_program->set_isarray(false); + arg_program->set_type(GLMessage::DataType::INT); + arg_program->add_intvalue(program); + + // copy argument count + GLMessage_DataType *arg_count = glmsg.add_args(); + arg_count->set_isarray(false); + arg_count->set_type(GLMessage::DataType::INT); + arg_count->add_intvalue(count); + + // copy argument varyings + GLMessage_DataType *arg_varyings = glmsg.add_args(); + arg_varyings->set_isarray(false); + arg_varyings->set_type(GLMessage::DataType::INT); + arg_varyings->add_intvalue((int)varyings); + + // copy argument bufferMode + GLMessage_DataType *arg_bufferMode = glmsg.add_args(); + arg_bufferMode->set_isarray(false); + arg_bufferMode->set_type(GLMessage::DataType::ENUM); + arg_bufferMode->add_intvalue((int)bufferMode); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glTransformFeedbackVaryings(program, count, varyings, bufferMode); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) varyings, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetTransformFeedbackVarying); + + // copy argument program + GLMessage_DataType *arg_program = glmsg.add_args(); + arg_program->set_isarray(false); + arg_program->set_type(GLMessage::DataType::INT); + arg_program->add_intvalue(program); + + // copy argument index + GLMessage_DataType *arg_index = glmsg.add_args(); + arg_index->set_isarray(false); + arg_index->set_type(GLMessage::DataType::INT); + arg_index->add_intvalue(index); + + // copy argument bufSize + GLMessage_DataType *arg_bufSize = glmsg.add_args(); + arg_bufSize->set_isarray(false); + arg_bufSize->set_type(GLMessage::DataType::INT); + arg_bufSize->add_intvalue(bufSize); + + // copy argument length + GLMessage_DataType *arg_length = glmsg.add_args(); + arg_length->set_isarray(false); + arg_length->set_type(GLMessage::DataType::INT); + arg_length->add_intvalue((int)length); + + // copy argument size + GLMessage_DataType *arg_size = glmsg.add_args(); + arg_size->set_isarray(false); + arg_size->set_type(GLMessage::DataType::INT); + arg_size->add_intvalue((int)size); + + // copy argument type + GLMessage_DataType *arg_type = glmsg.add_args(); + arg_type->set_isarray(false); + arg_type->set_type(GLMessage::DataType::INT); + arg_type->add_intvalue((int)type); + + // copy argument name + GLMessage_DataType *arg_name = glmsg.add_args(); + arg_name->set_isarray(false); + arg_name->set_type(GLMessage::DataType::INT); + arg_name->add_intvalue((int)name); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGetTransformFeedbackVarying(program, index, bufSize, length, size, type, name); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) length, + (void *) size, + (void *) type, + (void *) name, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glVertexAttribIPointer); + + // copy argument index + GLMessage_DataType *arg_index = glmsg.add_args(); + arg_index->set_isarray(false); + arg_index->set_type(GLMessage::DataType::INT); + arg_index->add_intvalue(index); + + // copy argument size + GLMessage_DataType *arg_size = glmsg.add_args(); + arg_size->set_isarray(false); + arg_size->set_type(GLMessage::DataType::INT); + arg_size->add_intvalue(size); + + // copy argument type + GLMessage_DataType *arg_type = glmsg.add_args(); + arg_type->set_isarray(false); + arg_type->set_type(GLMessage::DataType::ENUM); + arg_type->add_intvalue((int)type); + + // copy argument stride + GLMessage_DataType *arg_stride = glmsg.add_args(); + arg_stride->set_isarray(false); + arg_stride->set_type(GLMessage::DataType::INT); + arg_stride->add_intvalue(stride); + + // copy argument pointer + GLMessage_DataType *arg_pointer = glmsg.add_args(); + arg_pointer->set_isarray(false); + arg_pointer->set_type(GLMessage::DataType::INT); + arg_pointer->add_intvalue((int)pointer); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glVertexAttribIPointer(index, size, type, stride, pointer); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) pointer, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glGetVertexAttribIiv(GLuint index, GLenum pname, GLint* params) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetVertexAttribIiv); + + // copy argument index + GLMessage_DataType *arg_index = glmsg.add_args(); + arg_index->set_isarray(false); + arg_index->set_type(GLMessage::DataType::INT); + arg_index->add_intvalue(index); + + // copy argument pname + GLMessage_DataType *arg_pname = glmsg.add_args(); + arg_pname->set_isarray(false); + arg_pname->set_type(GLMessage::DataType::ENUM); + arg_pname->add_intvalue((int)pname); + + // copy argument params + GLMessage_DataType *arg_params = glmsg.add_args(); + arg_params->set_isarray(false); + arg_params->set_type(GLMessage::DataType::INT); + arg_params->add_intvalue((int)params); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGetVertexAttribIiv(index, pname, params); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) params, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetVertexAttribIuiv); + + // copy argument index + GLMessage_DataType *arg_index = glmsg.add_args(); + arg_index->set_isarray(false); + arg_index->set_type(GLMessage::DataType::INT); + arg_index->add_intvalue(index); + + // copy argument pname + GLMessage_DataType *arg_pname = glmsg.add_args(); + arg_pname->set_isarray(false); + arg_pname->set_type(GLMessage::DataType::ENUM); + arg_pname->add_intvalue((int)pname); + + // copy argument params + GLMessage_DataType *arg_params = glmsg.add_args(); + arg_params->set_isarray(false); + arg_params->set_type(GLMessage::DataType::INT); + arg_params->add_intvalue((int)params); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGetVertexAttribIuiv(index, pname, params); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) params, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glVertexAttribI4i); + + // copy argument index + GLMessage_DataType *arg_index = glmsg.add_args(); + arg_index->set_isarray(false); + arg_index->set_type(GLMessage::DataType::INT); + arg_index->add_intvalue(index); + + // copy argument x + GLMessage_DataType *arg_x = glmsg.add_args(); + arg_x->set_isarray(false); + arg_x->set_type(GLMessage::DataType::INT); + arg_x->add_intvalue(x); + + // copy argument y + GLMessage_DataType *arg_y = glmsg.add_args(); + arg_y->set_isarray(false); + arg_y->set_type(GLMessage::DataType::INT); + arg_y->add_intvalue(y); + + // copy argument z + GLMessage_DataType *arg_z = glmsg.add_args(); + arg_z->set_isarray(false); + arg_z->set_type(GLMessage::DataType::INT); + arg_z->add_intvalue(z); + + // copy argument w + GLMessage_DataType *arg_w = glmsg.add_args(); + arg_w->set_isarray(false); + arg_w->set_type(GLMessage::DataType::INT); + arg_w->add_intvalue(w); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glVertexAttribI4i(index, x, y, z, w); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glVertexAttribI4ui); + + // copy argument index + GLMessage_DataType *arg_index = glmsg.add_args(); + arg_index->set_isarray(false); + arg_index->set_type(GLMessage::DataType::INT); + arg_index->add_intvalue(index); + + // copy argument x + GLMessage_DataType *arg_x = glmsg.add_args(); + arg_x->set_isarray(false); + arg_x->set_type(GLMessage::DataType::INT); + arg_x->add_intvalue(x); + + // copy argument y + GLMessage_DataType *arg_y = glmsg.add_args(); + arg_y->set_isarray(false); + arg_y->set_type(GLMessage::DataType::INT); + arg_y->add_intvalue(y); + + // copy argument z + GLMessage_DataType *arg_z = glmsg.add_args(); + arg_z->set_isarray(false); + arg_z->set_type(GLMessage::DataType::INT); + arg_z->add_intvalue(z); + + // copy argument w + GLMessage_DataType *arg_w = glmsg.add_args(); + arg_w->set_isarray(false); + arg_w->set_type(GLMessage::DataType::INT); + arg_w->add_intvalue(w); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glVertexAttribI4ui(index, x, y, z, w); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glVertexAttribI4iv(GLuint index, const GLint* v) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glVertexAttribI4iv); + + // copy argument index + GLMessage_DataType *arg_index = glmsg.add_args(); + arg_index->set_isarray(false); + arg_index->set_type(GLMessage::DataType::INT); + arg_index->add_intvalue(index); + + // copy argument v + GLMessage_DataType *arg_v = glmsg.add_args(); + arg_v->set_isarray(false); + arg_v->set_type(GLMessage::DataType::INT); + arg_v->add_intvalue((int)v); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glVertexAttribI4iv(index, v); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) v, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glVertexAttribI4uiv(GLuint index, const GLuint* v) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glVertexAttribI4uiv); + + // copy argument index + GLMessage_DataType *arg_index = glmsg.add_args(); + arg_index->set_isarray(false); + arg_index->set_type(GLMessage::DataType::INT); + arg_index->add_intvalue(index); + + // copy argument v + GLMessage_DataType *arg_v = glmsg.add_args(); + arg_v->set_isarray(false); + arg_v->set_type(GLMessage::DataType::INT); + arg_v->add_intvalue((int)v); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glVertexAttribI4uiv(index, v); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) v, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glGetUniformuiv(GLuint program, GLint location, GLuint* params) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetUniformuiv); + + // copy argument program + GLMessage_DataType *arg_program = glmsg.add_args(); + arg_program->set_isarray(false); + arg_program->set_type(GLMessage::DataType::INT); + arg_program->add_intvalue(program); + + // copy argument location + GLMessage_DataType *arg_location = glmsg.add_args(); + arg_location->set_isarray(false); + arg_location->set_type(GLMessage::DataType::INT); + arg_location->add_intvalue(location); + + // copy argument params + GLMessage_DataType *arg_params = glmsg.add_args(); + arg_params->set_isarray(false); + arg_params->set_type(GLMessage::DataType::INT); + arg_params->add_intvalue((int)params); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGetUniformuiv(program, location, params); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) params, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +GLint GLTrace_glGetFragDataLocation(GLuint program, const GLchar *name) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetFragDataLocation); + + // copy argument program + GLMessage_DataType *arg_program = glmsg.add_args(); + arg_program->set_isarray(false); + arg_program->set_type(GLMessage::DataType::INT); + arg_program->add_intvalue(program); + + // copy argument name + GLMessage_DataType *arg_name = glmsg.add_args(); + arg_name->set_isarray(false); + arg_name->set_type(GLMessage::DataType::INT); + arg_name->add_intvalue((int)name); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + GLint retValue = glContext->hooks->gl.glGetFragDataLocation(program, name); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + // set return value + GLMessage_DataType *rt = glmsg.mutable_returnvalue(); + rt->set_isarray(false); + rt->set_type(GLMessage::DataType::INT); + rt->add_intvalue(retValue); + + void *pointerArgs[] = { + (void *) name, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); + + return retValue; +} + +void GLTrace_glUniform1ui(GLint location, GLuint v0) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glUniform1ui); + + // copy argument location + GLMessage_DataType *arg_location = glmsg.add_args(); + arg_location->set_isarray(false); + arg_location->set_type(GLMessage::DataType::INT); + arg_location->add_intvalue(location); + + // copy argument v0 + GLMessage_DataType *arg_v0 = glmsg.add_args(); + arg_v0->set_isarray(false); + arg_v0->set_type(GLMessage::DataType::INT); + arg_v0->add_intvalue(v0); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glUniform1ui(location, v0); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glUniform2ui(GLint location, GLuint v0, GLuint v1) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glUniform2ui); + + // copy argument location + GLMessage_DataType *arg_location = glmsg.add_args(); + arg_location->set_isarray(false); + arg_location->set_type(GLMessage::DataType::INT); + arg_location->add_intvalue(location); + + // copy argument v0 + GLMessage_DataType *arg_v0 = glmsg.add_args(); + arg_v0->set_isarray(false); + arg_v0->set_type(GLMessage::DataType::INT); + arg_v0->add_intvalue(v0); + + // copy argument v1 + GLMessage_DataType *arg_v1 = glmsg.add_args(); + arg_v1->set_isarray(false); + arg_v1->set_type(GLMessage::DataType::INT); + arg_v1->add_intvalue(v1); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glUniform2ui(location, v0, v1); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glUniform3ui); + + // copy argument location + GLMessage_DataType *arg_location = glmsg.add_args(); + arg_location->set_isarray(false); + arg_location->set_type(GLMessage::DataType::INT); + arg_location->add_intvalue(location); + + // copy argument v0 + GLMessage_DataType *arg_v0 = glmsg.add_args(); + arg_v0->set_isarray(false); + arg_v0->set_type(GLMessage::DataType::INT); + arg_v0->add_intvalue(v0); + + // copy argument v1 + GLMessage_DataType *arg_v1 = glmsg.add_args(); + arg_v1->set_isarray(false); + arg_v1->set_type(GLMessage::DataType::INT); + arg_v1->add_intvalue(v1); + + // copy argument v2 + GLMessage_DataType *arg_v2 = glmsg.add_args(); + arg_v2->set_isarray(false); + arg_v2->set_type(GLMessage::DataType::INT); + arg_v2->add_intvalue(v2); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glUniform3ui(location, v0, v1, v2); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glUniform4ui); + + // copy argument location + GLMessage_DataType *arg_location = glmsg.add_args(); + arg_location->set_isarray(false); + arg_location->set_type(GLMessage::DataType::INT); + arg_location->add_intvalue(location); + + // copy argument v0 + GLMessage_DataType *arg_v0 = glmsg.add_args(); + arg_v0->set_isarray(false); + arg_v0->set_type(GLMessage::DataType::INT); + arg_v0->add_intvalue(v0); + + // copy argument v1 + GLMessage_DataType *arg_v1 = glmsg.add_args(); + arg_v1->set_isarray(false); + arg_v1->set_type(GLMessage::DataType::INT); + arg_v1->add_intvalue(v1); + + // copy argument v2 + GLMessage_DataType *arg_v2 = glmsg.add_args(); + arg_v2->set_isarray(false); + arg_v2->set_type(GLMessage::DataType::INT); + arg_v2->add_intvalue(v2); + + // copy argument v3 + GLMessage_DataType *arg_v3 = glmsg.add_args(); + arg_v3->set_isarray(false); + arg_v3->set_type(GLMessage::DataType::INT); + arg_v3->add_intvalue(v3); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glUniform4ui(location, v0, v1, v2, v3); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glUniform1uiv(GLint location, GLsizei count, const GLuint* value) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glUniform1uiv); + + // copy argument location + GLMessage_DataType *arg_location = glmsg.add_args(); + arg_location->set_isarray(false); + arg_location->set_type(GLMessage::DataType::INT); + arg_location->add_intvalue(location); + + // copy argument count + GLMessage_DataType *arg_count = glmsg.add_args(); + arg_count->set_isarray(false); + arg_count->set_type(GLMessage::DataType::INT); + arg_count->add_intvalue(count); + + // copy argument value + GLMessage_DataType *arg_value = glmsg.add_args(); + arg_value->set_isarray(false); + arg_value->set_type(GLMessage::DataType::INT); + arg_value->add_intvalue((int)value); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glUniform1uiv(location, count, value); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) value, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glUniform2uiv(GLint location, GLsizei count, const GLuint* value) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glUniform2uiv); + + // copy argument location + GLMessage_DataType *arg_location = glmsg.add_args(); + arg_location->set_isarray(false); + arg_location->set_type(GLMessage::DataType::INT); + arg_location->add_intvalue(location); + + // copy argument count + GLMessage_DataType *arg_count = glmsg.add_args(); + arg_count->set_isarray(false); + arg_count->set_type(GLMessage::DataType::INT); + arg_count->add_intvalue(count); + + // copy argument value + GLMessage_DataType *arg_value = glmsg.add_args(); + arg_value->set_isarray(false); + arg_value->set_type(GLMessage::DataType::INT); + arg_value->add_intvalue((int)value); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glUniform2uiv(location, count, value); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) value, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glUniform3uiv(GLint location, GLsizei count, const GLuint* value) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glUniform3uiv); + + // copy argument location + GLMessage_DataType *arg_location = glmsg.add_args(); + arg_location->set_isarray(false); + arg_location->set_type(GLMessage::DataType::INT); + arg_location->add_intvalue(location); + + // copy argument count + GLMessage_DataType *arg_count = glmsg.add_args(); + arg_count->set_isarray(false); + arg_count->set_type(GLMessage::DataType::INT); + arg_count->add_intvalue(count); + + // copy argument value + GLMessage_DataType *arg_value = glmsg.add_args(); + arg_value->set_isarray(false); + arg_value->set_type(GLMessage::DataType::INT); + arg_value->add_intvalue((int)value); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glUniform3uiv(location, count, value); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) value, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glUniform4uiv(GLint location, GLsizei count, const GLuint* value) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glUniform4uiv); + + // copy argument location + GLMessage_DataType *arg_location = glmsg.add_args(); + arg_location->set_isarray(false); + arg_location->set_type(GLMessage::DataType::INT); + arg_location->add_intvalue(location); + + // copy argument count + GLMessage_DataType *arg_count = glmsg.add_args(); + arg_count->set_isarray(false); + arg_count->set_type(GLMessage::DataType::INT); + arg_count->add_intvalue(count); + + // copy argument value + GLMessage_DataType *arg_value = glmsg.add_args(); + arg_value->set_isarray(false); + arg_value->set_type(GLMessage::DataType::INT); + arg_value->add_intvalue((int)value); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glUniform4uiv(location, count, value); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) value, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint* value) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glClearBufferiv); + + // copy argument buffer + GLMessage_DataType *arg_buffer = glmsg.add_args(); + arg_buffer->set_isarray(false); + arg_buffer->set_type(GLMessage::DataType::ENUM); + arg_buffer->add_intvalue((int)buffer); + + // copy argument drawbuffer + GLMessage_DataType *arg_drawbuffer = glmsg.add_args(); + arg_drawbuffer->set_isarray(false); + arg_drawbuffer->set_type(GLMessage::DataType::INT); + arg_drawbuffer->add_intvalue(drawbuffer); + + // copy argument value + GLMessage_DataType *arg_value = glmsg.add_args(); + arg_value->set_isarray(false); + arg_value->set_type(GLMessage::DataType::INT); + arg_value->add_intvalue((int)value); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glClearBufferiv(buffer, drawbuffer, value); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) value, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint* value) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glClearBufferuiv); + + // copy argument buffer + GLMessage_DataType *arg_buffer = glmsg.add_args(); + arg_buffer->set_isarray(false); + arg_buffer->set_type(GLMessage::DataType::ENUM); + arg_buffer->add_intvalue((int)buffer); + + // copy argument drawbuffer + GLMessage_DataType *arg_drawbuffer = glmsg.add_args(); + arg_drawbuffer->set_isarray(false); + arg_drawbuffer->set_type(GLMessage::DataType::INT); + arg_drawbuffer->add_intvalue(drawbuffer); + + // copy argument value + GLMessage_DataType *arg_value = glmsg.add_args(); + arg_value->set_isarray(false); + arg_value->set_type(GLMessage::DataType::INT); + arg_value->add_intvalue((int)value); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glClearBufferuiv(buffer, drawbuffer, value); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) value, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat* value) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glClearBufferfv); + + // copy argument buffer + GLMessage_DataType *arg_buffer = glmsg.add_args(); + arg_buffer->set_isarray(false); + arg_buffer->set_type(GLMessage::DataType::ENUM); + arg_buffer->add_intvalue((int)buffer); + + // copy argument drawbuffer + GLMessage_DataType *arg_drawbuffer = glmsg.add_args(); + arg_drawbuffer->set_isarray(false); + arg_drawbuffer->set_type(GLMessage::DataType::INT); + arg_drawbuffer->add_intvalue(drawbuffer); + + // copy argument value + GLMessage_DataType *arg_value = glmsg.add_args(); + arg_value->set_isarray(false); + arg_value->set_type(GLMessage::DataType::INT); + arg_value->add_intvalue((int)value); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glClearBufferfv(buffer, drawbuffer, value); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) value, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glClearBufferfi); + + // copy argument buffer + GLMessage_DataType *arg_buffer = glmsg.add_args(); + arg_buffer->set_isarray(false); + arg_buffer->set_type(GLMessage::DataType::ENUM); + arg_buffer->add_intvalue((int)buffer); + + // copy argument drawbuffer + GLMessage_DataType *arg_drawbuffer = glmsg.add_args(); + arg_drawbuffer->set_isarray(false); + arg_drawbuffer->set_type(GLMessage::DataType::INT); + arg_drawbuffer->add_intvalue(drawbuffer); + + // copy argument depth + GLMessage_DataType *arg_depth = glmsg.add_args(); + arg_depth->set_isarray(false); + arg_depth->set_type(GLMessage::DataType::FLOAT); + arg_depth->add_floatvalue(depth); + + // copy argument stencil + GLMessage_DataType *arg_stencil = glmsg.add_args(); + arg_stencil->set_isarray(false); + arg_stencil->set_type(GLMessage::DataType::INT); + arg_stencil->add_intvalue(stencil); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glClearBufferfi(buffer, drawbuffer, depth, stencil); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +const GLubyte* GLTrace_glGetStringi(GLenum name, GLuint index) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetStringi); + + // copy argument name + GLMessage_DataType *arg_name = glmsg.add_args(); + arg_name->set_isarray(false); + arg_name->set_type(GLMessage::DataType::ENUM); + arg_name->add_intvalue((int)name); + + // copy argument index + GLMessage_DataType *arg_index = glmsg.add_args(); + arg_index->set_isarray(false); + arg_index->set_type(GLMessage::DataType::INT); + arg_index->add_intvalue(index); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + const GLubyte* retValue = glContext->hooks->gl.glGetStringi(name, index); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + // set return value + GLMessage_DataType *rt = glmsg.mutable_returnvalue(); + rt->set_isarray(false); + rt->set_type(GLMessage::DataType::INT); + rt->add_intvalue((int)retValue); + + void *pointerArgs[] = { + (void *) retValue, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); + + return retValue; +} + +void GLTrace_glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glCopyBufferSubData); + + // copy argument readTarget + GLMessage_DataType *arg_readTarget = glmsg.add_args(); + arg_readTarget->set_isarray(false); + arg_readTarget->set_type(GLMessage::DataType::ENUM); + arg_readTarget->add_intvalue((int)readTarget); + + // copy argument writeTarget + GLMessage_DataType *arg_writeTarget = glmsg.add_args(); + arg_writeTarget->set_isarray(false); + arg_writeTarget->set_type(GLMessage::DataType::ENUM); + arg_writeTarget->add_intvalue((int)writeTarget); + + // copy argument readOffset + GLMessage_DataType *arg_readOffset = glmsg.add_args(); + arg_readOffset->set_isarray(false); + arg_readOffset->set_type(GLMessage::DataType::INT); + arg_readOffset->add_intvalue(readOffset); + + // copy argument writeOffset + GLMessage_DataType *arg_writeOffset = glmsg.add_args(); + arg_writeOffset->set_isarray(false); + arg_writeOffset->set_type(GLMessage::DataType::INT); + arg_writeOffset->add_intvalue(writeOffset); + + // copy argument size + GLMessage_DataType *arg_size = glmsg.add_args(); + arg_size->set_isarray(false); + arg_size->set_type(GLMessage::DataType::INT); + arg_size->add_intvalue(size); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetUniformIndices); + + // copy argument program + GLMessage_DataType *arg_program = glmsg.add_args(); + arg_program->set_isarray(false); + arg_program->set_type(GLMessage::DataType::INT); + arg_program->add_intvalue(program); + + // copy argument uniformCount + GLMessage_DataType *arg_uniformCount = glmsg.add_args(); + arg_uniformCount->set_isarray(false); + arg_uniformCount->set_type(GLMessage::DataType::INT); + arg_uniformCount->add_intvalue(uniformCount); + + // copy argument uniformNames + GLMessage_DataType *arg_uniformNames = glmsg.add_args(); + arg_uniformNames->set_isarray(false); + arg_uniformNames->set_type(GLMessage::DataType::INT); + arg_uniformNames->add_intvalue((int)uniformNames); + + // copy argument uniformIndices + GLMessage_DataType *arg_uniformIndices = glmsg.add_args(); + arg_uniformIndices->set_isarray(false); + arg_uniformIndices->set_type(GLMessage::DataType::INT); + arg_uniformIndices->add_intvalue((int)uniformIndices); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGetUniformIndices(program, uniformCount, uniformNames, uniformIndices); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) uniformNames, + (void *) uniformIndices, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetActiveUniformsiv); + + // copy argument program + GLMessage_DataType *arg_program = glmsg.add_args(); + arg_program->set_isarray(false); + arg_program->set_type(GLMessage::DataType::INT); + arg_program->add_intvalue(program); + + // copy argument uniformCount + GLMessage_DataType *arg_uniformCount = glmsg.add_args(); + arg_uniformCount->set_isarray(false); + arg_uniformCount->set_type(GLMessage::DataType::INT); + arg_uniformCount->add_intvalue(uniformCount); + + // copy argument uniformIndices + GLMessage_DataType *arg_uniformIndices = glmsg.add_args(); + arg_uniformIndices->set_isarray(false); + arg_uniformIndices->set_type(GLMessage::DataType::INT); + arg_uniformIndices->add_intvalue((int)uniformIndices); + + // copy argument pname + GLMessage_DataType *arg_pname = glmsg.add_args(); + arg_pname->set_isarray(false); + arg_pname->set_type(GLMessage::DataType::ENUM); + arg_pname->add_intvalue((int)pname); + + // copy argument params + GLMessage_DataType *arg_params = glmsg.add_args(); + arg_params->set_isarray(false); + arg_params->set_type(GLMessage::DataType::INT); + arg_params->add_intvalue((int)params); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGetActiveUniformsiv(program, uniformCount, uniformIndices, pname, params); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) uniformIndices, + (void *) params, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +GLuint GLTrace_glGetUniformBlockIndex(GLuint program, const GLchar* uniformBlockName) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetUniformBlockIndex); + + // copy argument program + GLMessage_DataType *arg_program = glmsg.add_args(); + arg_program->set_isarray(false); + arg_program->set_type(GLMessage::DataType::INT); + arg_program->add_intvalue(program); + + // copy argument uniformBlockName + GLMessage_DataType *arg_uniformBlockName = glmsg.add_args(); + arg_uniformBlockName->set_isarray(false); + arg_uniformBlockName->set_type(GLMessage::DataType::INT); + arg_uniformBlockName->add_intvalue((int)uniformBlockName); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + GLuint retValue = glContext->hooks->gl.glGetUniformBlockIndex(program, uniformBlockName); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + // set return value + GLMessage_DataType *rt = glmsg.mutable_returnvalue(); + rt->set_isarray(false); + rt->set_type(GLMessage::DataType::INT); + rt->add_intvalue(retValue); + + void *pointerArgs[] = { + (void *) uniformBlockName, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); + + return retValue; +} + +void GLTrace_glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetActiveUniformBlockiv); + + // copy argument program + GLMessage_DataType *arg_program = glmsg.add_args(); + arg_program->set_isarray(false); + arg_program->set_type(GLMessage::DataType::INT); + arg_program->add_intvalue(program); + + // copy argument uniformBlockIndex + GLMessage_DataType *arg_uniformBlockIndex = glmsg.add_args(); + arg_uniformBlockIndex->set_isarray(false); + arg_uniformBlockIndex->set_type(GLMessage::DataType::INT); + arg_uniformBlockIndex->add_intvalue(uniformBlockIndex); + + // copy argument pname + GLMessage_DataType *arg_pname = glmsg.add_args(); + arg_pname->set_isarray(false); + arg_pname->set_type(GLMessage::DataType::ENUM); + arg_pname->add_intvalue((int)pname); + + // copy argument params + GLMessage_DataType *arg_params = glmsg.add_args(); + arg_params->set_isarray(false); + arg_params->set_type(GLMessage::DataType::INT); + arg_params->add_intvalue((int)params); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) params, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetActiveUniformBlockName); + + // copy argument program + GLMessage_DataType *arg_program = glmsg.add_args(); + arg_program->set_isarray(false); + arg_program->set_type(GLMessage::DataType::INT); + arg_program->add_intvalue(program); + + // copy argument uniformBlockIndex + GLMessage_DataType *arg_uniformBlockIndex = glmsg.add_args(); + arg_uniformBlockIndex->set_isarray(false); + arg_uniformBlockIndex->set_type(GLMessage::DataType::INT); + arg_uniformBlockIndex->add_intvalue(uniformBlockIndex); + + // copy argument bufSize + GLMessage_DataType *arg_bufSize = glmsg.add_args(); + arg_bufSize->set_isarray(false); + arg_bufSize->set_type(GLMessage::DataType::INT); + arg_bufSize->add_intvalue(bufSize); + + // copy argument length + GLMessage_DataType *arg_length = glmsg.add_args(); + arg_length->set_isarray(false); + arg_length->set_type(GLMessage::DataType::INT); + arg_length->add_intvalue((int)length); + + // copy argument uniformBlockName + GLMessage_DataType *arg_uniformBlockName = glmsg.add_args(); + arg_uniformBlockName->set_isarray(false); + arg_uniformBlockName->set_type(GLMessage::DataType::INT); + arg_uniformBlockName->add_intvalue((int)uniformBlockName); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length, uniformBlockName); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) length, + (void *) uniformBlockName, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glUniformBlockBinding); + + // copy argument program + GLMessage_DataType *arg_program = glmsg.add_args(); + arg_program->set_isarray(false); + arg_program->set_type(GLMessage::DataType::INT); + arg_program->add_intvalue(program); + + // copy argument uniformBlockIndex + GLMessage_DataType *arg_uniformBlockIndex = glmsg.add_args(); + arg_uniformBlockIndex->set_isarray(false); + arg_uniformBlockIndex->set_type(GLMessage::DataType::INT); + arg_uniformBlockIndex->add_intvalue(uniformBlockIndex); + + // copy argument uniformBlockBinding + GLMessage_DataType *arg_uniformBlockBinding = glmsg.add_args(); + arg_uniformBlockBinding->set_isarray(false); + arg_uniformBlockBinding->set_type(GLMessage::DataType::INT); + arg_uniformBlockBinding->add_intvalue(uniformBlockBinding); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glDrawArraysInstanced); + + // copy argument mode + GLMessage_DataType *arg_mode = glmsg.add_args(); + arg_mode->set_isarray(false); + arg_mode->set_type(GLMessage::DataType::ENUM); + arg_mode->add_intvalue((int)mode); + + // copy argument first + GLMessage_DataType *arg_first = glmsg.add_args(); + arg_first->set_isarray(false); + arg_first->set_type(GLMessage::DataType::INT); + arg_first->add_intvalue(first); + + // copy argument count + GLMessage_DataType *arg_count = glmsg.add_args(); + arg_count->set_isarray(false); + arg_count->set_type(GLMessage::DataType::INT); + arg_count->add_intvalue(count); + + // copy argument instanceCount + GLMessage_DataType *arg_instanceCount = glmsg.add_args(); + arg_instanceCount->set_isarray(false); + arg_instanceCount->set_type(GLMessage::DataType::INT); + arg_instanceCount->add_intvalue(instanceCount); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glDrawArraysInstanced(mode, first, count, instanceCount); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glDrawElementsInstanced); + + // copy argument mode + GLMessage_DataType *arg_mode = glmsg.add_args(); + arg_mode->set_isarray(false); + arg_mode->set_type(GLMessage::DataType::ENUM); + arg_mode->add_intvalue((int)mode); + + // copy argument count + GLMessage_DataType *arg_count = glmsg.add_args(); + arg_count->set_isarray(false); + arg_count->set_type(GLMessage::DataType::INT); + arg_count->add_intvalue(count); + + // copy argument type + GLMessage_DataType *arg_type = glmsg.add_args(); + arg_type->set_isarray(false); + arg_type->set_type(GLMessage::DataType::ENUM); + arg_type->add_intvalue((int)type); + + // copy argument indices + GLMessage_DataType *arg_indices = glmsg.add_args(); + arg_indices->set_isarray(false); + arg_indices->set_type(GLMessage::DataType::INT); + arg_indices->add_intvalue((int)indices); + + // copy argument instanceCount + GLMessage_DataType *arg_instanceCount = glmsg.add_args(); + arg_instanceCount->set_isarray(false); + arg_instanceCount->set_type(GLMessage::DataType::INT); + arg_instanceCount->add_intvalue(instanceCount); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glDrawElementsInstanced(mode, count, type, indices, instanceCount); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) indices, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +GLsync GLTrace_glFenceSync(GLenum condition, GLbitfield flags) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glFenceSync); + + // copy argument condition + GLMessage_DataType *arg_condition = glmsg.add_args(); + arg_condition->set_isarray(false); + arg_condition->set_type(GLMessage::DataType::ENUM); + arg_condition->add_intvalue((int)condition); + + // copy argument flags + GLMessage_DataType *arg_flags = glmsg.add_args(); + arg_flags->set_isarray(false); + arg_flags->set_type(GLMessage::DataType::INT); + arg_flags->add_intvalue(flags); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + GLsync retValue = glContext->hooks->gl.glFenceSync(condition, flags); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + // set return value + GLMessage_DataType *rt = glmsg.mutable_returnvalue(); + rt->set_isarray(false); + rt->set_type(GLMessage::DataType::INT); + rt->add_intvalue((int)retValue); + + void *pointerArgs[] = { + (void *) retValue, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); + + return retValue; +} + +GLboolean GLTrace_glIsSync(GLsync sync) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glIsSync); + + // copy argument sync + GLMessage_DataType *arg_sync = glmsg.add_args(); + arg_sync->set_isarray(false); + arg_sync->set_type(GLMessage::DataType::INT); + arg_sync->add_intvalue((int)sync); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + GLboolean retValue = glContext->hooks->gl.glIsSync(sync); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + // set return value + GLMessage_DataType *rt = glmsg.mutable_returnvalue(); + rt->set_isarray(false); + rt->set_type(GLMessage::DataType::BOOL); + rt->add_boolvalue(retValue); + + void *pointerArgs[] = { + (void *) sync, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); + + return retValue; +} + +void GLTrace_glDeleteSync(GLsync sync) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glDeleteSync); + + // copy argument sync + GLMessage_DataType *arg_sync = glmsg.add_args(); + arg_sync->set_isarray(false); + arg_sync->set_type(GLMessage::DataType::INT); + arg_sync->add_intvalue((int)sync); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glDeleteSync(sync); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) sync, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +GLenum GLTrace_glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glClientWaitSync); + + // copy argument sync + GLMessage_DataType *arg_sync = glmsg.add_args(); + arg_sync->set_isarray(false); + arg_sync->set_type(GLMessage::DataType::INT); + arg_sync->add_intvalue((int)sync); + + // copy argument flags + GLMessage_DataType *arg_flags = glmsg.add_args(); + arg_flags->set_isarray(false); + arg_flags->set_type(GLMessage::DataType::INT); + arg_flags->add_intvalue(flags); + + // copy argument timeout + GLMessage_DataType *arg_timeout = glmsg.add_args(); + arg_timeout->set_isarray(false); + arg_timeout->set_type(GLMessage::DataType::INT64); + arg_timeout->add_int64value(timeout); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + GLenum retValue = glContext->hooks->gl.glClientWaitSync(sync, flags, timeout); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + // set return value + GLMessage_DataType *rt = glmsg.mutable_returnvalue(); + rt->set_isarray(false); + rt->set_type(GLMessage::DataType::ENUM); + rt->add_intvalue((int)retValue); + + void *pointerArgs[] = { + (void *) sync, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); + + return retValue; +} + +void GLTrace_glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glWaitSync); + + // copy argument sync + GLMessage_DataType *arg_sync = glmsg.add_args(); + arg_sync->set_isarray(false); + arg_sync->set_type(GLMessage::DataType::INT); + arg_sync->add_intvalue((int)sync); + + // copy argument flags + GLMessage_DataType *arg_flags = glmsg.add_args(); + arg_flags->set_isarray(false); + arg_flags->set_type(GLMessage::DataType::INT); + arg_flags->add_intvalue(flags); + + // copy argument timeout + GLMessage_DataType *arg_timeout = glmsg.add_args(); + arg_timeout->set_isarray(false); + arg_timeout->set_type(GLMessage::DataType::INT64); + arg_timeout->add_int64value(timeout); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glWaitSync(sync, flags, timeout); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) sync, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glGetInteger64v(GLenum pname, GLint64* params) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetInteger64v); + + // copy argument pname + GLMessage_DataType *arg_pname = glmsg.add_args(); + arg_pname->set_isarray(false); + arg_pname->set_type(GLMessage::DataType::ENUM); + arg_pname->add_intvalue((int)pname); + + // copy argument params + GLMessage_DataType *arg_params = glmsg.add_args(); + arg_params->set_isarray(false); + arg_params->set_type(GLMessage::DataType::INT); + arg_params->add_intvalue((int)params); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGetInteger64v(pname, params); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) params, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetSynciv); + + // copy argument sync + GLMessage_DataType *arg_sync = glmsg.add_args(); + arg_sync->set_isarray(false); + arg_sync->set_type(GLMessage::DataType::INT); + arg_sync->add_intvalue((int)sync); + + // copy argument pname + GLMessage_DataType *arg_pname = glmsg.add_args(); + arg_pname->set_isarray(false); + arg_pname->set_type(GLMessage::DataType::ENUM); + arg_pname->add_intvalue((int)pname); + + // copy argument bufSize + GLMessage_DataType *arg_bufSize = glmsg.add_args(); + arg_bufSize->set_isarray(false); + arg_bufSize->set_type(GLMessage::DataType::INT); + arg_bufSize->add_intvalue(bufSize); + + // copy argument length + GLMessage_DataType *arg_length = glmsg.add_args(); + arg_length->set_isarray(false); + arg_length->set_type(GLMessage::DataType::INT); + arg_length->add_intvalue((int)length); + + // copy argument values + GLMessage_DataType *arg_values = glmsg.add_args(); + arg_values->set_isarray(false); + arg_values->set_type(GLMessage::DataType::INT); + arg_values->add_intvalue((int)values); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGetSynciv(sync, pname, bufSize, length, values); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) sync, + (void *) length, + (void *) values, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glGetInteger64i_v(GLenum target, GLuint index, GLint64* data) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetInteger64i_v); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument index + GLMessage_DataType *arg_index = glmsg.add_args(); + arg_index->set_isarray(false); + arg_index->set_type(GLMessage::DataType::INT); + arg_index->add_intvalue(index); + + // copy argument data + GLMessage_DataType *arg_data = glmsg.add_args(); + arg_data->set_isarray(false); + arg_data->set_type(GLMessage::DataType::INT); + arg_data->add_intvalue((int)data); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGetInteger64i_v(target, index, data); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) data, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64* params) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetBufferParameteri64v); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument pname + GLMessage_DataType *arg_pname = glmsg.add_args(); + arg_pname->set_isarray(false); + arg_pname->set_type(GLMessage::DataType::ENUM); + arg_pname->add_intvalue((int)pname); + + // copy argument params + GLMessage_DataType *arg_params = glmsg.add_args(); + arg_params->set_isarray(false); + arg_params->set_type(GLMessage::DataType::INT); + arg_params->add_intvalue((int)params); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGetBufferParameteri64v(target, pname, params); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) params, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glGenSamplers(GLsizei count, GLuint* samplers) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGenSamplers); + + // copy argument count + GLMessage_DataType *arg_count = glmsg.add_args(); + arg_count->set_isarray(false); + arg_count->set_type(GLMessage::DataType::INT); + arg_count->add_intvalue(count); + + // copy argument samplers + GLMessage_DataType *arg_samplers = glmsg.add_args(); + arg_samplers->set_isarray(false); + arg_samplers->set_type(GLMessage::DataType::INT); + arg_samplers->add_intvalue((int)samplers); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGenSamplers(count, samplers); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) samplers, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glDeleteSamplers(GLsizei count, const GLuint* samplers) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glDeleteSamplers); + + // copy argument count + GLMessage_DataType *arg_count = glmsg.add_args(); + arg_count->set_isarray(false); + arg_count->set_type(GLMessage::DataType::INT); + arg_count->add_intvalue(count); + + // copy argument samplers + GLMessage_DataType *arg_samplers = glmsg.add_args(); + arg_samplers->set_isarray(false); + arg_samplers->set_type(GLMessage::DataType::INT); + arg_samplers->add_intvalue((int)samplers); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glDeleteSamplers(count, samplers); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) samplers, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +GLboolean GLTrace_glIsSampler(GLuint sampler) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glIsSampler); + + // copy argument sampler + GLMessage_DataType *arg_sampler = glmsg.add_args(); + arg_sampler->set_isarray(false); + arg_sampler->set_type(GLMessage::DataType::INT); + arg_sampler->add_intvalue(sampler); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + GLboolean retValue = glContext->hooks->gl.glIsSampler(sampler); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + // set return value + GLMessage_DataType *rt = glmsg.mutable_returnvalue(); + rt->set_isarray(false); + rt->set_type(GLMessage::DataType::BOOL); + rt->add_boolvalue(retValue); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); + + return retValue; +} + +void GLTrace_glBindSampler(GLuint unit, GLuint sampler) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glBindSampler); + + // copy argument unit + GLMessage_DataType *arg_unit = glmsg.add_args(); + arg_unit->set_isarray(false); + arg_unit->set_type(GLMessage::DataType::INT); + arg_unit->add_intvalue(unit); + + // copy argument sampler + GLMessage_DataType *arg_sampler = glmsg.add_args(); + arg_sampler->set_isarray(false); + arg_sampler->set_type(GLMessage::DataType::INT); + arg_sampler->add_intvalue(sampler); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glBindSampler(unit, sampler); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glSamplerParameteri(GLuint sampler, GLenum pname, GLint param) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glSamplerParameteri); + + // copy argument sampler + GLMessage_DataType *arg_sampler = glmsg.add_args(); + arg_sampler->set_isarray(false); + arg_sampler->set_type(GLMessage::DataType::INT); + arg_sampler->add_intvalue(sampler); + + // copy argument pname + GLMessage_DataType *arg_pname = glmsg.add_args(); + arg_pname->set_isarray(false); + arg_pname->set_type(GLMessage::DataType::ENUM); + arg_pname->add_intvalue((int)pname); + + // copy argument param + GLMessage_DataType *arg_param = glmsg.add_args(); + arg_param->set_isarray(false); + arg_param->set_type(GLMessage::DataType::INT); + arg_param->add_intvalue(param); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glSamplerParameteri(sampler, pname, param); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint* param) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glSamplerParameteriv); + + // copy argument sampler + GLMessage_DataType *arg_sampler = glmsg.add_args(); + arg_sampler->set_isarray(false); + arg_sampler->set_type(GLMessage::DataType::INT); + arg_sampler->add_intvalue(sampler); + + // copy argument pname + GLMessage_DataType *arg_pname = glmsg.add_args(); + arg_pname->set_isarray(false); + arg_pname->set_type(GLMessage::DataType::ENUM); + arg_pname->add_intvalue((int)pname); + + // copy argument param + GLMessage_DataType *arg_param = glmsg.add_args(); + arg_param->set_isarray(false); + arg_param->set_type(GLMessage::DataType::INT); + arg_param->add_intvalue((int)param); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glSamplerParameteriv(sampler, pname, param); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) param, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glSamplerParameterf); + + // copy argument sampler + GLMessage_DataType *arg_sampler = glmsg.add_args(); + arg_sampler->set_isarray(false); + arg_sampler->set_type(GLMessage::DataType::INT); + arg_sampler->add_intvalue(sampler); + + // copy argument pname + GLMessage_DataType *arg_pname = glmsg.add_args(); + arg_pname->set_isarray(false); + arg_pname->set_type(GLMessage::DataType::ENUM); + arg_pname->add_intvalue((int)pname); + + // copy argument param + GLMessage_DataType *arg_param = glmsg.add_args(); + arg_param->set_isarray(false); + arg_param->set_type(GLMessage::DataType::FLOAT); + arg_param->add_floatvalue(param); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glSamplerParameterf(sampler, pname, param); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* param) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glSamplerParameterfv); + + // copy argument sampler + GLMessage_DataType *arg_sampler = glmsg.add_args(); + arg_sampler->set_isarray(false); + arg_sampler->set_type(GLMessage::DataType::INT); + arg_sampler->add_intvalue(sampler); + + // copy argument pname + GLMessage_DataType *arg_pname = glmsg.add_args(); + arg_pname->set_isarray(false); + arg_pname->set_type(GLMessage::DataType::ENUM); + arg_pname->add_intvalue((int)pname); + + // copy argument param + GLMessage_DataType *arg_param = glmsg.add_args(); + arg_param->set_isarray(false); + arg_param->set_type(GLMessage::DataType::INT); + arg_param->add_intvalue((int)param); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glSamplerParameterfv(sampler, pname, param); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) param, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetSamplerParameteriv); + + // copy argument sampler + GLMessage_DataType *arg_sampler = glmsg.add_args(); + arg_sampler->set_isarray(false); + arg_sampler->set_type(GLMessage::DataType::INT); + arg_sampler->add_intvalue(sampler); + + // copy argument pname + GLMessage_DataType *arg_pname = glmsg.add_args(); + arg_pname->set_isarray(false); + arg_pname->set_type(GLMessage::DataType::ENUM); + arg_pname->add_intvalue((int)pname); + + // copy argument params + GLMessage_DataType *arg_params = glmsg.add_args(); + arg_params->set_isarray(false); + arg_params->set_type(GLMessage::DataType::INT); + arg_params->add_intvalue((int)params); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGetSamplerParameteriv(sampler, pname, params); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) params, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetSamplerParameterfv); + + // copy argument sampler + GLMessage_DataType *arg_sampler = glmsg.add_args(); + arg_sampler->set_isarray(false); + arg_sampler->set_type(GLMessage::DataType::INT); + arg_sampler->add_intvalue(sampler); + + // copy argument pname + GLMessage_DataType *arg_pname = glmsg.add_args(); + arg_pname->set_isarray(false); + arg_pname->set_type(GLMessage::DataType::ENUM); + arg_pname->add_intvalue((int)pname); + + // copy argument params + GLMessage_DataType *arg_params = glmsg.add_args(); + arg_params->set_isarray(false); + arg_params->set_type(GLMessage::DataType::INT); + arg_params->add_intvalue((int)params); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGetSamplerParameterfv(sampler, pname, params); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) params, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glVertexAttribDivisor(GLuint index, GLuint divisor) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glVertexAttribDivisor); + + // copy argument index + GLMessage_DataType *arg_index = glmsg.add_args(); + arg_index->set_isarray(false); + arg_index->set_type(GLMessage::DataType::INT); + arg_index->add_intvalue(index); + + // copy argument divisor + GLMessage_DataType *arg_divisor = glmsg.add_args(); + arg_divisor->set_isarray(false); + arg_divisor->set_type(GLMessage::DataType::INT); + arg_divisor->add_intvalue(divisor); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glVertexAttribDivisor(index, divisor); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glBindTransformFeedback(GLenum target, GLuint id) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glBindTransformFeedback); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument id + GLMessage_DataType *arg_id = glmsg.add_args(); + arg_id->set_isarray(false); + arg_id->set_type(GLMessage::DataType::INT); + arg_id->add_intvalue(id); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glBindTransformFeedback(target, id); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glDeleteTransformFeedbacks(GLsizei n, const GLuint* ids) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glDeleteTransformFeedbacks); + + // copy argument n + GLMessage_DataType *arg_n = glmsg.add_args(); + arg_n->set_isarray(false); + arg_n->set_type(GLMessage::DataType::INT); + arg_n->add_intvalue(n); + + // copy argument ids + GLMessage_DataType *arg_ids = glmsg.add_args(); + arg_ids->set_isarray(false); + arg_ids->set_type(GLMessage::DataType::INT); + arg_ids->add_intvalue((int)ids); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glDeleteTransformFeedbacks(n, ids); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) ids, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glGenTransformFeedbacks(GLsizei n, GLuint* ids) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGenTransformFeedbacks); + + // copy argument n + GLMessage_DataType *arg_n = glmsg.add_args(); + arg_n->set_isarray(false); + arg_n->set_type(GLMessage::DataType::INT); + arg_n->add_intvalue(n); + + // copy argument ids + GLMessage_DataType *arg_ids = glmsg.add_args(); + arg_ids->set_isarray(false); + arg_ids->set_type(GLMessage::DataType::INT); + arg_ids->add_intvalue((int)ids); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGenTransformFeedbacks(n, ids); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) ids, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +GLboolean GLTrace_glIsTransformFeedback(GLuint id) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glIsTransformFeedback); + + // copy argument id + GLMessage_DataType *arg_id = glmsg.add_args(); + arg_id->set_isarray(false); + arg_id->set_type(GLMessage::DataType::INT); + arg_id->add_intvalue(id); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + GLboolean retValue = glContext->hooks->gl.glIsTransformFeedback(id); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + // set return value + GLMessage_DataType *rt = glmsg.mutable_returnvalue(); + rt->set_isarray(false); + rt->set_type(GLMessage::DataType::BOOL); + rt->add_boolvalue(retValue); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); + + return retValue; +} + +void GLTrace_glPauseTransformFeedback(void) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glPauseTransformFeedback); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glPauseTransformFeedback(); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glResumeTransformFeedback(void) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glResumeTransformFeedback); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glResumeTransformFeedback(); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetProgramBinary); + + // copy argument program + GLMessage_DataType *arg_program = glmsg.add_args(); + arg_program->set_isarray(false); + arg_program->set_type(GLMessage::DataType::INT); + arg_program->add_intvalue(program); + + // copy argument bufSize + GLMessage_DataType *arg_bufSize = glmsg.add_args(); + arg_bufSize->set_isarray(false); + arg_bufSize->set_type(GLMessage::DataType::INT); + arg_bufSize->add_intvalue(bufSize); + + // copy argument length + GLMessage_DataType *arg_length = glmsg.add_args(); + arg_length->set_isarray(false); + arg_length->set_type(GLMessage::DataType::INT); + arg_length->add_intvalue((int)length); + + // copy argument binaryFormat + GLMessage_DataType *arg_binaryFormat = glmsg.add_args(); + arg_binaryFormat->set_isarray(false); + arg_binaryFormat->set_type(GLMessage::DataType::INT); + arg_binaryFormat->add_intvalue((int)binaryFormat); + + // copy argument binary + GLMessage_DataType *arg_binary = glmsg.add_args(); + arg_binary->set_isarray(false); + arg_binary->set_type(GLMessage::DataType::INT); + arg_binary->add_intvalue((int)binary); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGetProgramBinary(program, bufSize, length, binaryFormat, binary); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) length, + (void *) binaryFormat, + (void *) binary, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glProgramBinary(GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glProgramBinary); + + // copy argument program + GLMessage_DataType *arg_program = glmsg.add_args(); + arg_program->set_isarray(false); + arg_program->set_type(GLMessage::DataType::INT); + arg_program->add_intvalue(program); + + // copy argument binaryFormat + GLMessage_DataType *arg_binaryFormat = glmsg.add_args(); + arg_binaryFormat->set_isarray(false); + arg_binaryFormat->set_type(GLMessage::DataType::ENUM); + arg_binaryFormat->add_intvalue((int)binaryFormat); + + // copy argument binary + GLMessage_DataType *arg_binary = glmsg.add_args(); + arg_binary->set_isarray(false); + arg_binary->set_type(GLMessage::DataType::INT); + arg_binary->add_intvalue((int)binary); + + // copy argument length + GLMessage_DataType *arg_length = glmsg.add_args(); + arg_length->set_isarray(false); + arg_length->set_type(GLMessage::DataType::INT); + arg_length->add_intvalue(length); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glProgramBinary(program, binaryFormat, binary, length); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) binary, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glProgramParameteri(GLuint program, GLenum pname, GLint value) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glProgramParameteri); + + // copy argument program + GLMessage_DataType *arg_program = glmsg.add_args(); + arg_program->set_isarray(false); + arg_program->set_type(GLMessage::DataType::INT); + arg_program->add_intvalue(program); + + // copy argument pname + GLMessage_DataType *arg_pname = glmsg.add_args(); + arg_pname->set_isarray(false); + arg_pname->set_type(GLMessage::DataType::ENUM); + arg_pname->add_intvalue((int)pname); + + // copy argument value + GLMessage_DataType *arg_value = glmsg.add_args(); + arg_value->set_isarray(false); + arg_value->set_type(GLMessage::DataType::INT); + arg_value->add_intvalue(value); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glProgramParameteri(program, pname, value); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glInvalidateFramebuffer); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument numAttachments + GLMessage_DataType *arg_numAttachments = glmsg.add_args(); + arg_numAttachments->set_isarray(false); + arg_numAttachments->set_type(GLMessage::DataType::INT); + arg_numAttachments->add_intvalue(numAttachments); + + // copy argument attachments + GLMessage_DataType *arg_attachments = glmsg.add_args(); + arg_attachments->set_isarray(false); + arg_attachments->set_type(GLMessage::DataType::INT); + arg_attachments->add_intvalue((int)attachments); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glInvalidateFramebuffer(target, numAttachments, attachments); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) attachments, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glInvalidateSubFramebuffer); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument numAttachments + GLMessage_DataType *arg_numAttachments = glmsg.add_args(); + arg_numAttachments->set_isarray(false); + arg_numAttachments->set_type(GLMessage::DataType::INT); + arg_numAttachments->add_intvalue(numAttachments); + + // copy argument attachments + GLMessage_DataType *arg_attachments = glmsg.add_args(); + arg_attachments->set_isarray(false); + arg_attachments->set_type(GLMessage::DataType::INT); + arg_attachments->add_intvalue((int)attachments); + + // copy argument x + GLMessage_DataType *arg_x = glmsg.add_args(); + arg_x->set_isarray(false); + arg_x->set_type(GLMessage::DataType::INT); + arg_x->add_intvalue(x); + + // copy argument y + GLMessage_DataType *arg_y = glmsg.add_args(); + arg_y->set_isarray(false); + arg_y->set_type(GLMessage::DataType::INT); + arg_y->add_intvalue(y); + + // copy argument width + GLMessage_DataType *arg_width = glmsg.add_args(); + arg_width->set_isarray(false); + arg_width->set_type(GLMessage::DataType::INT); + arg_width->add_intvalue(width); + + // copy argument height + GLMessage_DataType *arg_height = glmsg.add_args(); + arg_height->set_isarray(false); + arg_height->set_type(GLMessage::DataType::INT); + arg_height->add_intvalue(height); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glInvalidateSubFramebuffer(target, numAttachments, attachments, x, y, width, height); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) attachments, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glTexStorage2D); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument levels + GLMessage_DataType *arg_levels = glmsg.add_args(); + arg_levels->set_isarray(false); + arg_levels->set_type(GLMessage::DataType::INT); + arg_levels->add_intvalue(levels); + + // copy argument internalformat + GLMessage_DataType *arg_internalformat = glmsg.add_args(); + arg_internalformat->set_isarray(false); + arg_internalformat->set_type(GLMessage::DataType::ENUM); + arg_internalformat->add_intvalue((int)internalformat); + + // copy argument width + GLMessage_DataType *arg_width = glmsg.add_args(); + arg_width->set_isarray(false); + arg_width->set_type(GLMessage::DataType::INT); + arg_width->add_intvalue(width); + + // copy argument height + GLMessage_DataType *arg_height = glmsg.add_args(); + arg_height->set_isarray(false); + arg_height->set_type(GLMessage::DataType::INT); + arg_height->add_intvalue(height); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glTexStorage2D(target, levels, internalformat, width, height); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glTexStorage3D); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument levels + GLMessage_DataType *arg_levels = glmsg.add_args(); + arg_levels->set_isarray(false); + arg_levels->set_type(GLMessage::DataType::INT); + arg_levels->add_intvalue(levels); + + // copy argument internalformat + GLMessage_DataType *arg_internalformat = glmsg.add_args(); + arg_internalformat->set_isarray(false); + arg_internalformat->set_type(GLMessage::DataType::ENUM); + arg_internalformat->add_intvalue((int)internalformat); + + // copy argument width + GLMessage_DataType *arg_width = glmsg.add_args(); + arg_width->set_isarray(false); + arg_width->set_type(GLMessage::DataType::INT); + arg_width->add_intvalue(width); + + // copy argument height + GLMessage_DataType *arg_height = glmsg.add_args(); + arg_height->set_isarray(false); + arg_height->set_type(GLMessage::DataType::INT); + arg_height->add_intvalue(height); + + // copy argument depth + GLMessage_DataType *arg_depth = glmsg.add_args(); + arg_depth->set_isarray(false); + arg_depth->set_type(GLMessage::DataType::INT); + arg_depth->add_intvalue(depth); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glTexStorage3D(target, levels, internalformat, width, height, depth); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + +void GLTrace_glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params) { + GLMessage glmsg; + GLTraceContext *glContext = getGLTraceContext(); + + glmsg.set_function(GLMessage::glGetInternalformativ); + + // copy argument target + GLMessage_DataType *arg_target = glmsg.add_args(); + arg_target->set_isarray(false); + arg_target->set_type(GLMessage::DataType::ENUM); + arg_target->add_intvalue((int)target); + + // copy argument internalformat + GLMessage_DataType *arg_internalformat = glmsg.add_args(); + arg_internalformat->set_isarray(false); + arg_internalformat->set_type(GLMessage::DataType::ENUM); + arg_internalformat->add_intvalue((int)internalformat); + + // copy argument pname + GLMessage_DataType *arg_pname = glmsg.add_args(); + arg_pname->set_isarray(false); + arg_pname->set_type(GLMessage::DataType::ENUM); + arg_pname->add_intvalue((int)pname); + + // copy argument bufSize + GLMessage_DataType *arg_bufSize = glmsg.add_args(); + arg_bufSize->set_isarray(false); + arg_bufSize->set_type(GLMessage::DataType::INT); + arg_bufSize->add_intvalue(bufSize); + + // copy argument params + GLMessage_DataType *arg_params = glmsg.add_args(); + arg_params->set_isarray(false); + arg_params->set_type(GLMessage::DataType::INT); + arg_params->add_intvalue((int)params); + + // call function + nsecs_t wallStartTime = systemTime(SYSTEM_TIME_MONOTONIC); + nsecs_t threadStartTime = systemTime(SYSTEM_TIME_THREAD); + glContext->hooks->gl.glGetInternalformativ(target, internalformat, pname, bufSize, params); + nsecs_t threadEndTime = systemTime(SYSTEM_TIME_THREAD); + nsecs_t wallEndTime = systemTime(SYSTEM_TIME_MONOTONIC); + + void *pointerArgs[] = { + (void *) params, + }; + + fixupGLMessage(glContext, wallStartTime, wallEndTime, + threadStartTime, threadEndTime, + &glmsg, pointerArgs); + glContext->traceGLMessage(&glmsg); +} + // Definitions for GL2Ext APIs diff --git a/opengl/libs/GLES_trace/src/gltrace_api.h b/opengl/libs/GLES_trace/src/gltrace_api.h index 309afcb..3a839dd 100644 --- a/opengl/libs/GLES_trace/src/gltrace_api.h +++ b/opengl/libs/GLES_trace/src/gltrace_api.h @@ -19,7 +19,7 @@ namespace android { namespace gltrace { -// Declarations for GL2 APIs +// Declarations for GL3 APIs void GLTrace_glActiveTexture(GLenum texture); void GLTrace_glAttachShader(GLuint program, GLuint shader); @@ -28,7 +28,7 @@ void GLTrace_glBindBuffer(GLenum target, GLuint buffer); void GLTrace_glBindFramebuffer(GLenum target, GLuint framebuffer); void GLTrace_glBindRenderbuffer(GLenum target, GLuint renderbuffer); void GLTrace_glBindTexture(GLenum target, GLuint texture); -void GLTrace_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +void GLTrace_glBlendColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); void GLTrace_glBlendEquation(GLenum mode); void GLTrace_glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha); void GLTrace_glBlendFunc(GLenum sfactor, GLenum dfactor); @@ -37,8 +37,8 @@ void GLTrace_glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GL void GLTrace_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data); GLenum GLTrace_glCheckFramebufferStatus(GLenum target); void GLTrace_glClear(GLbitfield mask); -void GLTrace_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); -void GLTrace_glClearDepthf(GLclampf depth); +void GLTrace_glClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +void GLTrace_glClearDepthf(GLfloat depth); void GLTrace_glClearStencil(GLint s); void GLTrace_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); void GLTrace_glCompileShader(GLuint shader); @@ -57,7 +57,7 @@ void GLTrace_glDeleteShader(GLuint shader); void GLTrace_glDeleteTextures(GLsizei n, const GLuint* textures); void GLTrace_glDepthFunc(GLenum func); void GLTrace_glDepthMask(GLboolean flag); -void GLTrace_glDepthRangef(GLclampf zNear, GLclampf zFar); +void GLTrace_glDepthRangef(GLfloat n, GLfloat f); void GLTrace_glDetachShader(GLuint program, GLuint shader); void GLTrace_glDisable(GLenum cap); void GLTrace_glDisableVertexAttribArray(GLuint index); @@ -116,10 +116,10 @@ void GLTrace_glPolygonOffset(GLfloat factor, GLfloat units); void GLTrace_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels); void GLTrace_glReleaseShaderCompiler(void); void GLTrace_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height); -void GLTrace_glSampleCoverage(GLclampf value, GLboolean invert); +void GLTrace_glSampleCoverage(GLfloat value, GLboolean invert); void GLTrace_glScissor(GLint x, GLint y, GLsizei width, GLsizei height); void GLTrace_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length); -void GLTrace_glShaderSource(GLuint shader, GLsizei count, const GLchar** string, const GLint* length); +void GLTrace_glShaderSource(GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length); void GLTrace_glStencilFunc(GLenum func, GLint ref, GLuint mask); void GLTrace_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask); void GLTrace_glStencilMask(GLuint mask); @@ -163,6 +163,110 @@ void GLTrace_glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfl void GLTrace_glVertexAttrib4fv(GLuint indx, const GLfloat* values); void GLTrace_glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr); void GLTrace_glViewport(GLint x, GLint y, GLsizei width, GLsizei height); +void GLTrace_glReadBuffer(GLenum mode); +void GLTrace_glDrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices); +void GLTrace_glTexImage3D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels); +void GLTrace_glTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels); +void GLTrace_glCopyTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +void GLTrace_glCompressedTexImage3D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data); +void GLTrace_glCompressedTexSubImage3D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data); +void GLTrace_glGenQueries(GLsizei n, GLuint* ids); +void GLTrace_glDeleteQueries(GLsizei n, const GLuint* ids); +GLboolean GLTrace_glIsQuery(GLuint id); +void GLTrace_glBeginQuery(GLenum target, GLuint id); +void GLTrace_glEndQuery(GLenum target); +void GLTrace_glGetQueryiv(GLenum target, GLenum pname, GLint* params); +void GLTrace_glGetQueryObjectuiv(GLuint id, GLenum pname, GLuint* params); +GLboolean GLTrace_glUnmapBuffer(GLenum target); +void GLTrace_glGetBufferPointerv(GLenum target, GLenum pname, GLvoid** params); +void GLTrace_glDrawBuffers(GLsizei n, const GLenum* bufs); +void GLTrace_glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +void GLTrace_glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +void GLTrace_glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +void GLTrace_glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +void GLTrace_glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +void GLTrace_glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +void GLTrace_glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +void GLTrace_glRenderbufferStorageMultisample(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +void GLTrace_glFramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +GLvoid* GLTrace_glMapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +void GLTrace_glFlushMappedBufferRange(GLenum target, GLintptr offset, GLsizeiptr length); +void GLTrace_glBindVertexArray(GLuint array); +void GLTrace_glDeleteVertexArrays(GLsizei n, const GLuint* arrays); +void GLTrace_glGenVertexArrays(GLsizei n, GLuint* arrays); +GLboolean GLTrace_glIsVertexArray(GLuint array); +void GLTrace_glGetIntegeri_v(GLenum target, GLuint index, GLint* data); +void GLTrace_glBeginTransformFeedback(GLenum primitiveMode); +void GLTrace_glEndTransformFeedback(void); +void GLTrace_glBindBufferRange(GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +void GLTrace_glBindBufferBase(GLenum target, GLuint index, GLuint buffer); +void GLTrace_glTransformFeedbackVaryings(GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode); +void GLTrace_glGetTransformFeedbackVarying(GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name); +void GLTrace_glVertexAttribIPointer(GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer); +void GLTrace_glGetVertexAttribIiv(GLuint index, GLenum pname, GLint* params); +void GLTrace_glGetVertexAttribIuiv(GLuint index, GLenum pname, GLuint* params); +void GLTrace_glVertexAttribI4i(GLuint index, GLint x, GLint y, GLint z, GLint w); +void GLTrace_glVertexAttribI4ui(GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +void GLTrace_glVertexAttribI4iv(GLuint index, const GLint* v); +void GLTrace_glVertexAttribI4uiv(GLuint index, const GLuint* v); +void GLTrace_glGetUniformuiv(GLuint program, GLint location, GLuint* params); +GLint GLTrace_glGetFragDataLocation(GLuint program, const GLchar *name); +void GLTrace_glUniform1ui(GLint location, GLuint v0); +void GLTrace_glUniform2ui(GLint location, GLuint v0, GLuint v1); +void GLTrace_glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2); +void GLTrace_glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +void GLTrace_glUniform1uiv(GLint location, GLsizei count, const GLuint* value); +void GLTrace_glUniform2uiv(GLint location, GLsizei count, const GLuint* value); +void GLTrace_glUniform3uiv(GLint location, GLsizei count, const GLuint* value); +void GLTrace_glUniform4uiv(GLint location, GLsizei count, const GLuint* value); +void GLTrace_glClearBufferiv(GLenum buffer, GLint drawbuffer, const GLint* value); +void GLTrace_glClearBufferuiv(GLenum buffer, GLint drawbuffer, const GLuint* value); +void GLTrace_glClearBufferfv(GLenum buffer, GLint drawbuffer, const GLfloat* value); +void GLTrace_glClearBufferfi(GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +const GLubyte* GLTrace_glGetStringi(GLenum name, GLuint index); +void GLTrace_glCopyBufferSubData(GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); +void GLTrace_glGetUniformIndices(GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices); +void GLTrace_glGetActiveUniformsiv(GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params); +GLuint GLTrace_glGetUniformBlockIndex(GLuint program, const GLchar* uniformBlockName); +void GLTrace_glGetActiveUniformBlockiv(GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params); +void GLTrace_glGetActiveUniformBlockName(GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName); +void GLTrace_glUniformBlockBinding(GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +void GLTrace_glDrawArraysInstanced(GLenum mode, GLint first, GLsizei count, GLsizei instanceCount); +void GLTrace_glDrawElementsInstanced(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount); +GLsync GLTrace_glFenceSync(GLenum condition, GLbitfield flags); +GLboolean GLTrace_glIsSync(GLsync sync); +void GLTrace_glDeleteSync(GLsync sync); +GLenum GLTrace_glClientWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout); +void GLTrace_glWaitSync(GLsync sync, GLbitfield flags, GLuint64 timeout); +void GLTrace_glGetInteger64v(GLenum pname, GLint64* params); +void GLTrace_glGetSynciv(GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values); +void GLTrace_glGetInteger64i_v(GLenum target, GLuint index, GLint64* data); +void GLTrace_glGetBufferParameteri64v(GLenum target, GLenum pname, GLint64* params); +void GLTrace_glGenSamplers(GLsizei count, GLuint* samplers); +void GLTrace_glDeleteSamplers(GLsizei count, const GLuint* samplers); +GLboolean GLTrace_glIsSampler(GLuint sampler); +void GLTrace_glBindSampler(GLuint unit, GLuint sampler); +void GLTrace_glSamplerParameteri(GLuint sampler, GLenum pname, GLint param); +void GLTrace_glSamplerParameteriv(GLuint sampler, GLenum pname, const GLint* param); +void GLTrace_glSamplerParameterf(GLuint sampler, GLenum pname, GLfloat param); +void GLTrace_glSamplerParameterfv(GLuint sampler, GLenum pname, const GLfloat* param); +void GLTrace_glGetSamplerParameteriv(GLuint sampler, GLenum pname, GLint* params); +void GLTrace_glGetSamplerParameterfv(GLuint sampler, GLenum pname, GLfloat* params); +void GLTrace_glVertexAttribDivisor(GLuint index, GLuint divisor); +void GLTrace_glBindTransformFeedback(GLenum target, GLuint id); +void GLTrace_glDeleteTransformFeedbacks(GLsizei n, const GLuint* ids); +void GLTrace_glGenTransformFeedbacks(GLsizei n, GLuint* ids); +GLboolean GLTrace_glIsTransformFeedback(GLuint id); +void GLTrace_glPauseTransformFeedback(void); +void GLTrace_glResumeTransformFeedback(void); +void GLTrace_glGetProgramBinary(GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary); +void GLTrace_glProgramBinary(GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length); +void GLTrace_glProgramParameteri(GLuint program, GLenum pname, GLint value); +void GLTrace_glInvalidateFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments); +void GLTrace_glInvalidateSubFramebuffer(GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height); +void GLTrace_glTexStorage2D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +void GLTrace_glTexStorage3D(GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +void GLTrace_glGetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params); // Declarations for GL2Ext APIs diff --git a/opengl/libs/GLES_trace/src/gltrace_eglapi.cpp b/opengl/libs/GLES_trace/src/gltrace_eglapi.cpp index 9698bf9..512d562 100644 --- a/opengl/libs/GLES_trace/src/gltrace_eglapi.cpp +++ b/opengl/libs/GLES_trace/src/gltrace_eglapi.cpp @@ -33,6 +33,9 @@ using gltrace::GLTraceState; using gltrace::GLTraceContext; using gltrace::TCPStream; +static pthread_mutex_t sGlTraceStateLock = PTHREAD_MUTEX_INITIALIZER; + +static int sGlTraceInProgress; static GLTraceState *sGLTraceState; static pthread_t sReceiveThreadId; @@ -105,33 +108,66 @@ static void *commandReceiveTask(void *arg) { return NULL; } -void GLTrace_start() { - char udsName[PROPERTY_VALUE_MAX]; +/** + * Starts Trace Server and waits for connection from the host. + * Returns -1 in case of connection error, 0 otherwise. + */ +int GLTrace_start() { + int status = 0; + int clientSocket = -1; + TCPStream *stream = NULL; + + pthread_mutex_lock(&sGlTraceStateLock); + if (sGlTraceInProgress) { + goto done; + } + + char udsName[PROPERTY_VALUE_MAX]; property_get("debug.egl.debug_portname", udsName, "gltrace"); - int clientSocket = gltrace::acceptClientConnection(udsName); + clientSocket = gltrace::acceptClientConnection(udsName); if (clientSocket < 0) { - ALOGE("Error creating GLTrace server socket. Quitting application."); - exit(-1); + ALOGE("Error creating GLTrace server socket. Tracing disabled."); + status = -1; + goto done; } + sGlTraceInProgress = 1; + // create communication channel to the host - TCPStream *stream = new TCPStream(clientSocket); + stream = new TCPStream(clientSocket); // initialize tracing state sGLTraceState = new GLTraceState(stream); pthread_create(&sReceiveThreadId, NULL, commandReceiveTask, sGLTraceState); + +done: + pthread_mutex_unlock(&sGlTraceStateLock); + return status; } void GLTrace_stop() { - delete sGLTraceState; - sGLTraceState = NULL; + pthread_mutex_lock(&sGlTraceStateLock); + + if (sGlTraceInProgress) { + sGlTraceInProgress = 0; + delete sGLTraceState; + sGLTraceState = NULL; + } + + pthread_mutex_unlock(&sGlTraceStateLock); } void GLTrace_eglCreateContext(int version, EGLContext c) { + pthread_mutex_lock(&sGlTraceStateLock); + GLTraceState *state = sGLTraceState; + pthread_mutex_unlock(&sGlTraceStateLock); + + if (state == NULL) return; + // update trace state for new EGL context - GLTraceContext *traceContext = sGLTraceState->createTraceContext(version, c); + GLTraceContext *traceContext = state->createTraceContext(version, c); gltrace::setupTraceContextThreadSpecific(traceContext); // trace command through to the host @@ -139,8 +175,19 @@ void GLTrace_eglCreateContext(int version, EGLContext c) { } void GLTrace_eglMakeCurrent(const unsigned version, gl_hooks_t *hooks, EGLContext c) { + pthread_mutex_lock(&sGlTraceStateLock); + GLTraceState *state = sGLTraceState; + pthread_mutex_unlock(&sGlTraceStateLock); + + if (state == NULL) return; + // setup per context state - GLTraceContext *traceContext = sGLTraceState->getTraceContext(c); + GLTraceContext *traceContext = state->getTraceContext(c); + if (traceContext == NULL) { + GLTrace_eglCreateContext(version, c); + traceContext = state->getTraceContext(c); + } + traceContext->hooks = hooks; gltrace::setupTraceContextThreadSpecific(traceContext); diff --git a/opengl/libs/GLES_trace/src/gltrace_fixup.cpp b/opengl/libs/GLES_trace/src/gltrace_fixup.cpp index 36ae314..a6c024b 100644 --- a/opengl/libs/GLES_trace/src/gltrace_fixup.cpp +++ b/opengl/libs/GLES_trace/src/gltrace_fixup.cpp @@ -236,11 +236,9 @@ void fixup_glShaderSource(GLMessage *glmsg, void *pointersToFixup[]) { ::std::string src = ""; for (int i = 0; i < count; i++) { if (lengthp != NULL) - src.append(*stringpp, *lengthp); + src.append(*stringpp++, *lengthp++); else - src.append(*stringpp); // assume null terminated - stringpp++; - lengthp++; + src.append(*stringpp++); // assume null terminated } arg_strpp->add_charvalue(src); diff --git a/opengl/libs/GLES_trace/tools/genapi.py b/opengl/libs/GLES_trace/tools/genapi.py index 24034c1..60686eb 100755 --- a/opengl/libs/GLES_trace/tools/genapi.py +++ b/opengl/libs/GLES_trace/tools/genapi.py @@ -60,6 +60,8 @@ class DataType: return "add_floatvalue(" elif self.name == "bool": return "add_boolvalue(" + elif self.name == "int64": + return "add_int64value(" else: raise ValueError("Unknown value type %s" % self.name) @@ -71,9 +73,10 @@ DataType.BOOL = DataType("bool") DataType.INT = DataType("int") DataType.FLOAT = DataType("float") DataType.POINTER = DataType("pointer") +DataType.INT64 = DataType("int64") # mapping of GL types to protobuf DataType -GL2PROTOBUF_TYPE_MAP = { +GLPROTOBUF_TYPE_MAP = { "GLvoid":DataType.VOID, "void":DataType.VOID, "GLchar":DataType.CHAR, @@ -95,9 +98,14 @@ GL2PROTOBUF_TYPE_MAP = { "GLsizeiptr":DataType.INT, "GLintptr":DataType.INT, "GLeglImageOES":DataType.POINTER, + "GLint64":DataType.INT64, + "GLuint64":DataType.INT64, + "GLsync":DataType.POINTER, } API_SPECS = [ + ('GL3','../GLES2/gl3_api.in'), + ('GL3Ext','../GLES2/gl3ext_api.in'), ('GL2','../GLES2/gl2_api.in'), ('GL2Ext','../GLES2/gl2ext_api.in'), ('GL1','../GLES_CM/gl_api.in'), @@ -126,7 +134,7 @@ HEADER_LICENSE = """/* HEADER_INCLUDES = """ #include <cutils/log.h> #include <utils/Timers.h> -#include <GLES2/gl2.h> +#include <GLES3/gl3.h> #include "gltrace.pb.h" #include "gltrace_context.h" @@ -210,7 +218,7 @@ def getDataTypeFromKw(kw): if kw.count('*') > 0: return DataType.POINTER - return GL2PROTOBUF_TYPE_MAP.get(kw) + return GLPROTOBUF_TYPE_MAP.get(kw) def getNameTypePair(decl): """ Split declaration of a variable to a tuple of (variable name, DataType). @@ -356,7 +364,7 @@ def parseAllSpecs(specs): def removeDuplicates(apis): '''Remove all duplicate function entries. - The input list contains functions declared in GL1 and GL2 APIs. + The input list contains functions declared in GL1, GL2, and GL3 APIs. This will return a list that contains only the first function if there are multiple functions with the same name.''' uniqs = [] @@ -402,7 +410,7 @@ def genSrcs(apis, fname): f.writelines(lines) if __name__ == '__main__': - apis = parseAllSpecs(API_SPECS) # read in all the specfiles - apis = removeDuplicates(apis) # remove duplication of functions common to GL1 and GL2 + apis = parseAllSpecs(API_SPECS) # read in all the specfiles + apis = removeDuplicates(apis) # remove duplication of functions common to multiple versions genHeaders(apis, 'gltrace_api.h') # generate header file genSrcs(apis, 'gltrace_api.cpp') # generate source file diff --git a/opengl/libs/entries.in b/opengl/libs/entries.in index b9a51a4..43c2676 100644 --- a/opengl/libs/entries.in +++ b/opengl/libs/entries.in @@ -6,15 +6,22 @@ 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, glBeginQuery, GLenum target, GLuint id) GL_ENTRY(void, glBeginQueryEXT, GLenum target, GLuint id) +GL_ENTRY(void, glBeginTransformFeedback, GLenum primitiveMode) GL_ENTRY(void, glBindAttribLocation, GLuint program, GLuint index, const GLchar* name) GL_ENTRY(void, glBindBuffer, GLenum target, GLuint buffer) +GL_ENTRY(void, glBindBufferBase, GLenum target, GLuint index, GLuint buffer) +GL_ENTRY(void, glBindBufferRange, GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size) GL_ENTRY(void, glBindFramebuffer, GLenum target, GLuint framebuffer) GL_ENTRY(void, glBindFramebufferOES, GLenum target, GLuint framebuffer) GL_ENTRY(void, glBindProgramPipelineEXT, GLuint pipeline) GL_ENTRY(void, glBindRenderbuffer, GLenum target, GLuint renderbuffer) GL_ENTRY(void, glBindRenderbufferOES, GLenum target, GLuint renderbuffer) +GL_ENTRY(void, glBindSampler, GLuint unit, GLuint sampler) GL_ENTRY(void, glBindTexture, GLenum target, GLuint texture) +GL_ENTRY(void, glBindTransformFeedback, GLenum target, GLuint id) +GL_ENTRY(void, glBindVertexArray, GLuint array) GL_ENTRY(void, glBindVertexArrayOES, GLuint array) GL_ENTRY(void, glBlendColor, GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) GL_ENTRY(void, glBlendEquation, GLenum mode ) @@ -24,12 +31,17 @@ 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, glBlitFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) GL_ENTRY(void, glBlitFramebufferANGLE, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) 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, glClearBufferfi, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil) +GL_ENTRY(void, glClearBufferfv, GLenum buffer, GLint drawbuffer, const GLfloat* value) +GL_ENTRY(void, glClearBufferiv, GLenum buffer, GLint drawbuffer, const GLint* value) +GL_ENTRY(void, glClearBufferuiv, GLenum buffer, GLint drawbuffer, const GLuint* value) 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) @@ -39,6 +51,7 @@ 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(GLenum, glClientWaitSync, GLsync sync, GLbitfield flags, GLuint64 timeout) 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) @@ -53,11 +66,15 @@ GL_ENTRY(void, glColorMask, GLboolean red, GLboolean green, GLboolean blue, GLbo 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, glCompressedTexImage3D, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, 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, glCompressedTexSubImage3D, 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, 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, glCopyBufferSubData, GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size) 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, glCopyTexSubImage3D, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, 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) @@ -73,11 +90,16 @@ 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, glDeleteProgramPipelinesEXT, GLsizei n, const GLuint *pipelines) +GL_ENTRY(void, glDeleteQueries, GLsizei n, const GLuint* ids) GL_ENTRY(void, glDeleteQueriesEXT, GLsizei n, const GLuint *ids) GL_ENTRY(void, glDeleteRenderbuffers, GLsizei n, const GLuint* renderbuffers) GL_ENTRY(void, glDeleteRenderbuffersOES, GLsizei n, const GLuint* renderbuffers) +GL_ENTRY(void, glDeleteSamplers, GLsizei count, const GLuint* samplers) GL_ENTRY(void, glDeleteShader, GLuint shader) +GL_ENTRY(void, glDeleteSync, GLsync sync) GL_ENTRY(void, glDeleteTextures, GLsizei n, const GLuint *textures) +GL_ENTRY(void, glDeleteTransformFeedbacks, GLsizei n, const GLuint* ids) +GL_ENTRY(void, glDeleteVertexArrays, GLsizei n, const GLuint* arrays) GL_ENTRY(void, glDeleteVertexArraysOES, GLsizei n, const GLuint *arrays) GL_ENTRY(void, glDepthFunc, GLenum func) GL_ENTRY(void, glDepthMask, GLboolean flag) @@ -92,8 +114,12 @@ 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, glDrawArraysInstanced, GLenum mode, GLint first, GLsizei count, GLsizei instanceCount) +GL_ENTRY(void, glDrawBuffers, GLsizei n, const GLenum* bufs) GL_ENTRY(void, glDrawBuffersNV, GLsizei n, const GLenum *bufs) GL_ENTRY(void, glDrawElements, GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) +GL_ENTRY(void, glDrawElementsInstanced, GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount) +GL_ENTRY(void, glDrawRangeElements, GLenum mode, GLuint start, GLuint end, 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) @@ -109,8 +135,10 @@ 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, glEndQuery, GLenum target) GL_ENTRY(void, glEndQueryEXT, GLenum target) GL_ENTRY(void, glEndTilingQCOM, GLbitfield preserveMask) +GL_ENTRY(void, glEndTransformFeedback, void) 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) @@ -123,9 +151,11 @@ GL_ENTRY(void, glExtGetTexSubImageQCOM, GLenum target, GLint level, GLint xoffse 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(GLsync, glFenceSync, GLenum condition, GLbitfield flags) GL_ENTRY(void, glFinish, void) GL_ENTRY(void, glFinishFenceNV, GLuint fence) GL_ENTRY(void, glFlush, void) +GL_ENTRY(void, glFlushMappedBufferRange, GLenum target, GLintptr offset, GLsizeiptr length) 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) @@ -139,6 +169,7 @@ GL_ENTRY(void, glFramebufferTexture2DMultisampleEXT, GLenum target, GLenum attac 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, glFramebufferTextureLayer, GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer) 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) @@ -150,19 +181,28 @@ 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, glGenProgramPipelinesEXT, GLsizei n, GLuint *pipelines) +GL_ENTRY(void, glGenQueries, GLsizei n, GLuint* ids) GL_ENTRY(void, glGenQueriesEXT, GLsizei n, GLuint *ids) GL_ENTRY(void, glGenRenderbuffers, GLsizei n, GLuint* renderbuffers) GL_ENTRY(void, glGenRenderbuffersOES, GLsizei n, GLuint* renderbuffers) +GL_ENTRY(void, glGenSamplers, GLsizei count, GLuint* samplers) GL_ENTRY(void, glGenTextures, GLsizei n, GLuint *textures) +GL_ENTRY(void, glGenTransformFeedbacks, GLsizei n, GLuint* ids) +GL_ENTRY(void, glGenVertexArrays, GLsizei n, GLuint* arrays) 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, glGetActiveUniformBlockName, GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName) +GL_ENTRY(void, glGetActiveUniformBlockiv, GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params) +GL_ENTRY(void, glGetActiveUniformsiv, GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params) GL_ENTRY(void, glGetAttachedShaders, GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders) GL_ENTRY(GLint, glGetAttribLocation, GLuint program, const GLchar* name) GL_ENTRY(void, glGetBooleanv, GLenum pname, GLboolean *params) +GL_ENTRY(void, glGetBufferParameteri64v, GLenum target, GLenum pname, GLint64* params) GL_ENTRY(void, glGetBufferParameteriv, GLenum target, GLenum pname, GLint *params) +GL_ENTRY(void, glGetBufferPointerv, GLenum target, GLenum pname, GLvoid** 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]) @@ -175,10 +215,15 @@ 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(GLint, glGetFragDataLocation, GLuint program, const GLchar *name) 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(GLenum, glGetGraphicsResetStatusEXT, void) +GL_ENTRY(void, glGetInteger64i_v, GLenum target, GLuint index, GLint64* data) +GL_ENTRY(void, glGetInteger64v, GLenum pname, GLint64* params) +GL_ENTRY(void, glGetIntegeri_v, GLenum target, GLuint index, GLint* data) GL_ENTRY(void, glGetIntegerv, GLenum pname, GLint *params) +GL_ENTRY(void, glGetInternalformativ, GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, 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) @@ -193,20 +238,27 @@ GL_ENTRY(void, glGetPerfMonitorCountersAMD, GLuint group, GLint *numCounters, GL 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, glGetProgramBinary, GLuint program, GLsizei bufSize, GLsizei* length, GLenum* binaryFormat, GLvoid* binary) 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, glGetProgramPipelineInfoLogEXT, GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog) GL_ENTRY(void, glGetProgramPipelineivEXT, GLuint pipeline, GLenum pname, GLint *params) GL_ENTRY(void, glGetProgramiv, GLuint program, GLenum pname, GLint* params) +GL_ENTRY(void, glGetQueryObjectuiv, GLuint id, GLenum pname, GLuint* params) GL_ENTRY(void, glGetQueryObjectuivEXT, GLuint id, GLenum pname, GLuint *params) +GL_ENTRY(void, glGetQueryiv, GLenum target, GLenum pname, GLint* params) GL_ENTRY(void, glGetQueryivEXT, GLenum target, 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, glGetSamplerParameterfv, GLuint sampler, GLenum pname, GLfloat* params) +GL_ENTRY(void, glGetSamplerParameteriv, GLuint sampler, 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(const GLubyte*, glGetStringi, GLenum name, GLuint index) +GL_ENTRY(void, glGetSynciv, GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values) 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) @@ -218,9 +270,15 @@ 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(void, glGetTransformFeedbackVarying, GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name) +GL_ENTRY(GLuint, glGetUniformBlockIndex, GLuint program, const GLchar* uniformBlockName) +GL_ENTRY(void, glGetUniformIndices, GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices) GL_ENTRY(GLint, 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, glGetUniformuiv, GLuint program, GLint location, GLuint* params) +GL_ENTRY(void, glGetVertexAttribIiv, GLuint index, GLenum pname, GLint* params) +GL_ENTRY(void, glGetVertexAttribIuiv, GLuint index, GLenum pname, GLuint* 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) @@ -228,6 +286,8 @@ GL_ENTRY(void, glGetnUniformfvEXT, GLuint program, GLint location, GLsizei bufSi GL_ENTRY(void, glGetnUniformivEXT, GLuint program, GLint location, GLsizei bufSize, GLint *params) GL_ENTRY(void, glHint, GLenum target, GLenum mode) GL_ENTRY(void, glInsertEventMarkerEXT, GLsizei length, const GLchar *marker) +GL_ENTRY(void, glInvalidateFramebuffer, GLenum target, GLsizei numAttachments, const GLenum* attachments) +GL_ENTRY(void, glInvalidateSubFramebuffer, GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height) GL_ENTRY(GLboolean, glIsBuffer, GLuint buffer) GL_ENTRY(GLboolean, glIsEnabled, GLenum cap) GL_ENTRY(GLboolean, glIsFenceNV, GLuint fence) @@ -235,11 +295,16 @@ GL_ENTRY(GLboolean, glIsFramebuffer, GLuint framebuffer) GL_ENTRY(GLboolean, glIsFramebufferOES, GLuint framebuffer) GL_ENTRY(GLboolean, glIsProgram, GLuint program) GL_ENTRY(GLboolean, glIsProgramPipelineEXT, GLuint pipeline) +GL_ENTRY(GLboolean, glIsQuery, GLuint id) GL_ENTRY(GLboolean, glIsQueryEXT, GLuint id) GL_ENTRY(GLboolean, glIsRenderbuffer, GLuint renderbuffer) GL_ENTRY(GLboolean, glIsRenderbufferOES, GLuint renderbuffer) +GL_ENTRY(GLboolean, glIsSampler, GLuint sampler) GL_ENTRY(GLboolean, glIsShader, GLuint shader) +GL_ENTRY(GLboolean, glIsSync, GLsync sync) GL_ENTRY(GLboolean, glIsTexture, GLuint texture) +GL_ENTRY(GLboolean, glIsTransformFeedback, GLuint id) +GL_ENTRY(GLboolean, glIsVertexArray, GLuint array) GL_ENTRY(GLboolean, glIsVertexArrayOES, GLuint array) GL_ENTRY(void, glLabelObjectEXT, GLenum type, GLuint object, GLsizei length, const GLchar *label) GL_ENTRY(void, glLightModelf, GLenum pname, GLfloat param) @@ -265,6 +330,7 @@ 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(GLvoid*, glMapBufferRange, GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield 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) @@ -289,6 +355,7 @@ GL_ENTRY(void, glOrthof, GLfloat left, GLfloat right, GLfloat bottom, GLfloat to 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, glPauseTransformFeedback, void) 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) @@ -305,7 +372,9 @@ GL_ENTRY(void, glPolygonOffsetx, GLfixed factor, GLfixed units) GL_ENTRY(void, glPolygonOffsetxOES, GLfixed factor, GLfixed units) GL_ENTRY(void, glPopGroupMarkerEXT, void) GL_ENTRY(void, glPopMatrix, void) +GL_ENTRY(void, glProgramBinary, GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length) GL_ENTRY(void, glProgramBinaryOES, GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length) +GL_ENTRY(void, glProgramParameteri, GLuint program, GLenum pname, GLint value) GL_ENTRY(void, glProgramParameteriEXT, GLuint program, GLenum pname, GLint value) GL_ENTRY(void, glProgramUniform1fEXT, GLuint program, GLint location, GLfloat x) GL_ENTRY(void, glProgramUniform1fvEXT, GLuint program, GLint location, GLsizei count, const GLfloat *value) @@ -329,23 +398,30 @@ GL_ENTRY(void, glProgramUniformMatrix4fvEXT, GLuint program, GLint location, GLs GL_ENTRY(void, glPushGroupMarkerEXT, GLsizei length, const GLchar *marker) GL_ENTRY(void, glPushMatrix, void) GL_ENTRY(GLbitfield, glQueryMatrixxOES, GLfixed mantissa[16], GLint exponent[16]) +GL_ENTRY(void, glReadBuffer, GLenum mode) GL_ENTRY(void, glReadBufferNV, GLenum mode) GL_ENTRY(void, glReadPixels, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) GL_ENTRY(void, glReadnPixelsEXT, GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data) GL_ENTRY(void, glReleaseShaderCompiler, void) GL_ENTRY(void, glRenderbufferStorage, GLenum target, GLenum internalformat, GLsizei width, GLsizei height) +GL_ENTRY(void, glRenderbufferStorageMultisample, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) GL_ENTRY(void, glRenderbufferStorageMultisampleANGLE, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) GL_ENTRY(void, glRenderbufferStorageMultisampleAPPLE, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) GL_ENTRY(void, glRenderbufferStorageMultisampleEXT, GLenum target, GLsizei samples, 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, glResolveMultisampleFramebufferAPPLE, void) +GL_ENTRY(void, glResumeTransformFeedback, void) 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, glSamplerParameterf, GLuint sampler, GLenum pname, GLfloat param) +GL_ENTRY(void, glSamplerParameterfv, GLuint sampler, GLenum pname, const GLfloat* param) +GL_ENTRY(void, glSamplerParameteri, GLuint sampler, GLenum pname, GLint param) +GL_ENTRY(void, glSamplerParameteriv, GLuint sampler, GLenum pname, const GLint* param) 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) @@ -354,7 +430,7 @@ GL_ENTRY(void, glSelectPerfMonitorCountersAMD, GLuint monitor, GLboolean enable, 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, glShaderSource, GLuint shader, GLsizei count, const GLchar* const* 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) @@ -379,6 +455,7 @@ 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, glTexImage3D, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, 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) @@ -389,13 +466,17 @@ 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, glTexStorage1DEXT, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) +GL_ENTRY(void, glTexStorage2D, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) GL_ENTRY(void, glTexStorage2DEXT, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) +GL_ENTRY(void, glTexStorage3D, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) GL_ENTRY(void, glTexStorage3DEXT, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) 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, glTexSubImage3D, 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, 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, glTextureStorage1DEXT, GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width) GL_ENTRY(void, glTextureStorage2DEXT, GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height) GL_ENTRY(void, glTextureStorage3DEXT, GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth) +GL_ENTRY(void, glTransformFeedbackVaryings, GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode) 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) @@ -403,21 +484,37 @@ 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, glUniform1ui, GLint location, GLuint v0) +GL_ENTRY(void, glUniform1uiv, GLint location, GLsizei count, const GLuint* value) 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, glUniform2ui, GLint location, GLuint v0, GLuint v1) +GL_ENTRY(void, glUniform2uiv, GLint location, GLsizei count, const GLuint* value) 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, glUniform3ui, GLint location, GLuint v0, GLuint v1, GLuint v2) +GL_ENTRY(void, glUniform3uiv, GLint location, GLsizei count, const GLuint* value) 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, glUniform4ui, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) +GL_ENTRY(void, glUniform4uiv, GLint location, GLsizei count, const GLuint* value) +GL_ENTRY(void, glUniformBlockBinding, GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding) GL_ENTRY(void, glUniformMatrix2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +GL_ENTRY(void, glUniformMatrix2x3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +GL_ENTRY(void, glUniformMatrix2x4fv, 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, glUniformMatrix3x2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +GL_ENTRY(void, glUniformMatrix3x4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) GL_ENTRY(void, glUniformMatrix4fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +GL_ENTRY(void, glUniformMatrix4x2fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +GL_ENTRY(void, glUniformMatrix4x3fv, GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) +GL_ENTRY(GLboolean, glUnmapBuffer, GLenum target) GL_ENTRY(GLboolean, glUnmapBufferOES, GLenum target) GL_ENTRY(void, glUseProgram, GLuint program) GL_ENTRY(void, glUseProgramStagesEXT, GLuint pipeline, GLbitfield stages, GLuint program) @@ -431,7 +528,14 @@ 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, glVertexAttribDivisor, GLuint index, GLuint divisor) +GL_ENTRY(void, glVertexAttribI4i, GLuint index, GLint x, GLint y, GLint z, GLint w) +GL_ENTRY(void, glVertexAttribI4iv, GLuint index, const GLint* v) +GL_ENTRY(void, glVertexAttribI4ui, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w) +GL_ENTRY(void, glVertexAttribI4uiv, GLuint index, const GLuint* v) +GL_ENTRY(void, glVertexAttribIPointer, GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer) 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, glWaitSync, GLsync sync, GLbitfield flags, GLuint64 timeout) 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 index bfbc866..4279574 100644 --- a/opengl/libs/enums.in +++ b/opengl/libs/enums.in @@ -107,6 +107,9 @@ GL_ENUM(0x0CF2,GL_UNPACK_ROW_LENGTH) GL_ENUM(0x0CF3,GL_UNPACK_SKIP_ROWS) GL_ENUM(0x0CF4,GL_UNPACK_SKIP_PIXELS) GL_ENUM(0x0CF5,GL_UNPACK_ALIGNMENT) +GL_ENUM(0x0D02,GL_PACK_ROW_LENGTH) +GL_ENUM(0x0D03,GL_PACK_SKIP_ROWS) +GL_ENUM(0x0D04,GL_PACK_SKIP_PIXELS) GL_ENUM(0x0D05,GL_PACK_ALIGNMENT) GL_ENUM(0x0D1C,GL_ALPHA_SCALE) GL_ENUM(0x0D31,GL_MAX_LIGHTS) @@ -144,6 +147,7 @@ GL_ENUM(0x1403,GL_UNSIGNED_SHORT) GL_ENUM(0x1404,GL_INT) GL_ENUM(0x1405,GL_UNSIGNED_INT) GL_ENUM(0x1406,GL_FLOAT) +GL_ENUM(0x140B,GL_HALF_FLOAT) GL_ENUM(0x140C,GL_FIXED) GL_ENUM(0x1500,GL_CLEAR) GL_ENUM(0x1501,GL_AND) @@ -173,6 +177,8 @@ GL_ENUM(0x1802,GL_STENCIL_EXT) GL_ENUM(0x1901,GL_STENCIL_INDEX) GL_ENUM(0x1902,GL_DEPTH_COMPONENT) GL_ENUM(0x1903,GL_RED_EXT) +GL_ENUM(0x1904,GL_GREEN) +GL_ENUM(0x1905,GL_BLUE) GL_ENUM(0x1906,GL_ALPHA) GL_ENUM(0x1907,GL_RGB) GL_ENUM(0x1908,GL_RGBA) @@ -248,6 +254,8 @@ GL_ENUM(0x8058,GL_RGBA8_OES) GL_ENUM(0x8059,GL_RGB10_A2_EXT) GL_ENUM(0x8069,GL_TEXTURE_BINDING_2D) GL_ENUM(0x806A,GL_TEXTURE_BINDING_3D_OES) +GL_ENUM(0x806D,GL_UNPACK_SKIP_IMAGES) +GL_ENUM(0x806E,GL_UNPACK_IMAGE_HEIGHT) GL_ENUM(0x806F,GL_TEXTURE_3D_OES) GL_ENUM(0x8072,GL_TEXTURE_WRAP_R_OES) GL_ENUM(0x8073,GL_MAX_3D_TEXTURE_SIZE_OES) @@ -283,11 +291,16 @@ 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(0x80E8,GL_MAX_ELEMENTS_VERTICES) +GL_ENUM(0x80E9,GL_MAX_ELEMENTS_INDICES) 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(0x813A,GL_TEXTURE_MIN_LOD) +GL_ENUM(0x813B,GL_TEXTURE_MAX_LOD) +GL_ENUM(0x813C,GL_TEXTURE_BASE_LEVEL) GL_ENUM(0x813D,GL_TEXTURE_MAX_LEVEL_APPLE) GL_ENUM(0x8191,GL_GENERATE_MIPMAP) GL_ENUM(0x8192,GL_GENERATE_MIPMAP_HINT) @@ -296,20 +309,49 @@ GL_ENUM(0x81A6,GL_DEPTH_COMPONENT24_OES) GL_ENUM(0x81A7,GL_DEPTH_COMPONENT32_OES) GL_ENUM(0x8210,GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT) GL_ENUM(0x8211,GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT) +GL_ENUM(0x8212,GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE) +GL_ENUM(0x8213,GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE) +GL_ENUM(0x8214,GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE) +GL_ENUM(0x8215,GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE) +GL_ENUM(0x8216,GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE) +GL_ENUM(0x8217,GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE) +GL_ENUM(0x8218,GL_FRAMEBUFFER_DEFAULT) +GL_ENUM(0x8219,GL_FRAMEBUFFER_UNDEFINED) +GL_ENUM(0x821A,GL_DEPTH_STENCIL_ATTACHMENT) +GL_ENUM(0x821B,GL_MAJOR_VERSION) +GL_ENUM(0x821C,GL_MINOR_VERSION) +GL_ENUM(0x821D,GL_NUM_EXTENSIONS) GL_ENUM(0x8227,GL_RG_EXT) +GL_ENUM(0x8228,GL_RG_INTEGER) GL_ENUM(0x8229,GL_R8_EXT) GL_ENUM(0x822B,GL_RG8_EXT) GL_ENUM(0x822D,GL_R16F_EXT) +GL_ENUM(0x822E,GL_R32F) GL_ENUM(0x822F,GL_RG16F_EXT) +GL_ENUM(0x8230,GL_RG32F) +GL_ENUM(0x8231,GL_R8I) +GL_ENUM(0x8232,GL_R8UI) +GL_ENUM(0x8233,GL_R16I) +GL_ENUM(0x8234,GL_R16UI) +GL_ENUM(0x8235,GL_R32I) +GL_ENUM(0x8236,GL_R32UI) +GL_ENUM(0x8237,GL_RG8I) +GL_ENUM(0x8238,GL_RG8UI) +GL_ENUM(0x8239,GL_RG16I) +GL_ENUM(0x823A,GL_RG16UI) +GL_ENUM(0x823B,GL_RG32I) +GL_ENUM(0x823C,GL_RG32UI) GL_ENUM(0x8252,GL_LOSE_CONTEXT_ON_RESET_EXT) GL_ENUM(0x8253,GL_GUILTY_CONTEXT_RESET_EXT) GL_ENUM(0x8254,GL_INNOCENT_CONTEXT_RESET_EXT) GL_ENUM(0x8255,GL_UNKNOWN_CONTEXT_RESET_EXT) GL_ENUM(0x8256,GL_RESET_NOTIFICATION_STRATEGY_EXT) +GL_ENUM(0x8257,GL_PROGRAM_BINARY_RETRIEVABLE_HINT) GL_ENUM(0x8258,GL_PROGRAM_SEPARABLE_EXT) GL_ENUM(0x8259,GL_ACTIVE_PROGRAM_EXT) GL_ENUM(0x825A,GL_PROGRAM_PIPELINE_BINDING_EXT) GL_ENUM(0x8261,GL_NO_RESET_NOTIFICATION_EXT) +GL_ENUM(0x82DF,GL_TEXTURE_IMMUTABLE_LEVELS) 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) @@ -495,21 +537,69 @@ 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(0x88E1,GL_STREAM_READ) +GL_ENUM(0x88E2,GL_STREAM_COPY) GL_ENUM(0x88E4,GL_STATIC_DRAW) +GL_ENUM(0x88E5,GL_STATIC_READ) +GL_ENUM(0x88E6,GL_STATIC_COPY) GL_ENUM(0x88E8,GL_DYNAMIC_DRAW) +GL_ENUM(0x88E9,GL_DYNAMIC_READ) +GL_ENUM(0x88EA,GL_DYNAMIC_COPY) +GL_ENUM(0x88EB,GL_PIXEL_PACK_BUFFER) +GL_ENUM(0x88EC,GL_PIXEL_UNPACK_BUFFER) +GL_ENUM(0x88ED,GL_PIXEL_PACK_BUFFER_BINDING) +GL_ENUM(0x88EF,GL_PIXEL_UNPACK_BUFFER_BINDING) GL_ENUM(0x88F0,GL_DEPTH24_STENCIL8_OES) +GL_ENUM(0x88FD,GL_VERTEX_ATTRIB_ARRAY_INTEGER) +GL_ENUM(0x88FE,GL_VERTEX_ATTRIB_ARRAY_DIVISOR) +GL_ENUM(0x88FF,GL_MAX_ARRAY_TEXTURE_LAYERS) +GL_ENUM(0x8904,GL_MIN_PROGRAM_TEXEL_OFFSET) +GL_ENUM(0x8905,GL_MAX_PROGRAM_TEXEL_OFFSET) +GL_ENUM(0x8919,GL_SAMPLER_BINDING) 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(0x8A11,GL_UNIFORM_BUFFER) GL_ENUM(0x8A1F,GL_RGB_422_APPLE) +GL_ENUM(0x8A28,GL_UNIFORM_BUFFER_BINDING) +GL_ENUM(0x8A29,GL_UNIFORM_BUFFER_START) +GL_ENUM(0x8A2A,GL_UNIFORM_BUFFER_SIZE) +GL_ENUM(0x8A2B,GL_MAX_VERTEX_UNIFORM_BLOCKS) +GL_ENUM(0x8A2D,GL_MAX_FRAGMENT_UNIFORM_BLOCKS) +GL_ENUM(0x8A2E,GL_MAX_COMBINED_UNIFORM_BLOCKS) +GL_ENUM(0x8A2F,GL_MAX_UNIFORM_BUFFER_BINDINGS) +GL_ENUM(0x8A30,GL_MAX_UNIFORM_BLOCK_SIZE) +GL_ENUM(0x8A31,GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS) +GL_ENUM(0x8A33,GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS) +GL_ENUM(0x8A34,GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT) +GL_ENUM(0x8A35,GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH) +GL_ENUM(0x8A36,GL_ACTIVE_UNIFORM_BLOCKS) +GL_ENUM(0x8A37,GL_UNIFORM_TYPE) +GL_ENUM(0x8A38,GL_UNIFORM_SIZE) +GL_ENUM(0x8A39,GL_UNIFORM_NAME_LENGTH) +GL_ENUM(0x8A3A,GL_UNIFORM_BLOCK_INDEX) +GL_ENUM(0x8A3B,GL_UNIFORM_OFFSET) +GL_ENUM(0x8A3C,GL_UNIFORM_ARRAY_STRIDE) +GL_ENUM(0x8A3D,GL_UNIFORM_MATRIX_STRIDE) +GL_ENUM(0x8A3E,GL_UNIFORM_IS_ROW_MAJOR) +GL_ENUM(0x8A3F,GL_UNIFORM_BLOCK_BINDING) +GL_ENUM(0x8A40,GL_UNIFORM_BLOCK_DATA_SIZE) +GL_ENUM(0x8A41,GL_UNIFORM_BLOCK_NAME_LENGTH) +GL_ENUM(0x8A42,GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS) +GL_ENUM(0x8A43,GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES) +GL_ENUM(0x8A44,GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER) +GL_ENUM(0x8A46,GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER) GL_ENUM(0x8A4F,GL_PROGRAM_PIPELINE_OBJECT_EXT) GL_ENUM(0x8B30,GL_FRAGMENT_SHADER) GL_ENUM(0x8B31,GL_VERTEX_SHADER) GL_ENUM(0x8B40,GL_PROGRAM_OBJECT_EXT) GL_ENUM(0x8B48,GL_SHADER_OBJECT_EXT) +GL_ENUM(0x8B49,GL_MAX_FRAGMENT_UNIFORM_COMPONENTS) +GL_ENUM(0x8B4A,GL_MAX_VERTEX_UNIFORM_COMPONENTS) +GL_ENUM(0x8B4B,GL_MAX_VARYING_COMPONENTS) GL_ENUM(0x8B4C,GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS) GL_ENUM(0x8B4D,GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS) GL_ENUM(0x8B4F,GL_SHADER_TYPE) @@ -530,6 +620,12 @@ GL_ENUM(0x8B5E,GL_SAMPLER_2D) GL_ENUM(0x8B5F,GL_SAMPLER_3D_OES) GL_ENUM(0x8B60,GL_SAMPLER_CUBE) GL_ENUM(0x8B62,GL_SAMPLER_2D_SHADOW_EXT) +GL_ENUM(0x8B65,GL_FLOAT_MAT2x3) +GL_ENUM(0x8B66,GL_FLOAT_MAT2x4) +GL_ENUM(0x8B67,GL_FLOAT_MAT3x2) +GL_ENUM(0x8B68,GL_FLOAT_MAT3x4) +GL_ENUM(0x8B69,GL_FLOAT_MAT4x2) +GL_ENUM(0x8B6A,GL_FLOAT_MAT4x3) GL_ENUM(0x8B80,GL_DELETE_STATUS) GL_ENUM(0x8B81,GL_COMPILE_STATUS) GL_ENUM(0x8B82,GL_LINK_STATUS) @@ -590,10 +686,31 @@ GL_ENUM(0x8C08,GL_FRAGMENT_ALPHA_MODULATE_IMG) GL_ENUM(0x8C09,GL_ADD_BLEND_IMG) GL_ENUM(0x8C0A,GL_SGX_BINARY_IMG) GL_ENUM(0x8C17,GL_UNSIGNED_NORMALIZED_EXT) +GL_ENUM(0x8C1A,GL_TEXTURE_2D_ARRAY) +GL_ENUM(0x8C1D,GL_TEXTURE_BINDING_2D_ARRAY) GL_ENUM(0x8C2F,GL_ANY_SAMPLES_PASSED_EXT) +GL_ENUM(0x8C3A,GL_R11F_G11F_B10F) +GL_ENUM(0x8C3B,GL_UNSIGNED_INT_10F_11F_11F_REV) +GL_ENUM(0x8C3D,GL_RGB9_E5) +GL_ENUM(0x8C3E,GL_UNSIGNED_INT_5_9_9_9_REV) GL_ENUM(0x8C40,GL_SRGB_EXT) +GL_ENUM(0x8C41,GL_SRGB8) GL_ENUM(0x8C42,GL_SRGB_ALPHA_EXT) GL_ENUM(0x8C43,GL_SRGB8_ALPHA8_EXT) +GL_ENUM(0x8C76,GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH) +GL_ENUM(0x8C7F,GL_TRANSFORM_FEEDBACK_BUFFER_MODE) +GL_ENUM(0x8C80,GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS) +GL_ENUM(0x8C83,GL_TRANSFORM_FEEDBACK_VARYINGS) +GL_ENUM(0x8C84,GL_TRANSFORM_FEEDBACK_BUFFER_START) +GL_ENUM(0x8C85,GL_TRANSFORM_FEEDBACK_BUFFER_SIZE) +GL_ENUM(0x8C88,GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN) +GL_ENUM(0x8C89,GL_RASTERIZER_DISCARD) +GL_ENUM(0x8C8A,GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS) +GL_ENUM(0x8C8B,GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS) +GL_ENUM(0x8C8C,GL_INTERLEAVED_ATTRIBS) +GL_ENUM(0x8C8D,GL_SEPARATE_ATTRIBS) +GL_ENUM(0x8C8E,GL_TRANSFORM_FEEDBACK_BUFFER) +GL_ENUM(0x8C8F,GL_TRANSFORM_FEEDBACK_BUFFER_BINDING) GL_ENUM(0x8C92,GL_ATC_RGB_AMD) GL_ENUM(0x8C93,GL_ATC_RGBA_EXPLICIT_ALPHA_AMD) GL_ENUM(0x8CA3,GL_STENCIL_BACK_REF) @@ -605,6 +722,8 @@ GL_ENUM(0x8CA8,GL_READ_FRAMEBUFFER_APPLE) GL_ENUM(0x8CA9,GL_DRAW_FRAMEBUFFER_APPLE) GL_ENUM(0x8CAA,GL_READ_FRAMEBUFFER_BINDING_APPLE) GL_ENUM(0x8CAB,GL_RENDERBUFFER_SAMPLES_APPLE) +GL_ENUM(0x8CAC,GL_DEPTH_COMPONENT32F) +GL_ENUM(0x8CAD,GL_DEPTH32F_STENCIL8) 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) @@ -659,8 +778,41 @@ 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(0x8D69,GL_PRIMITIVE_RESTART_FIXED_INDEX) GL_ENUM(0x8D6A,GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT) +GL_ENUM(0x8D6B,GL_MAX_ELEMENT_INDEX) GL_ENUM(0x8D6C,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT) +GL_ENUM(0x8D70,GL_RGBA32UI) +GL_ENUM(0x8D71,GL_RGB32UI) +GL_ENUM(0x8D76,GL_RGBA16UI) +GL_ENUM(0x8D77,GL_RGB16UI) +GL_ENUM(0x8D7C,GL_RGBA8UI) +GL_ENUM(0x8D7D,GL_RGB8UI) +GL_ENUM(0x8D82,GL_RGBA32I) +GL_ENUM(0x8D83,GL_RGB32I) +GL_ENUM(0x8D88,GL_RGBA16I) +GL_ENUM(0x8D89,GL_RGB16I) +GL_ENUM(0x8D8E,GL_RGBA8I) +GL_ENUM(0x8D8F,GL_RGB8I) +GL_ENUM(0x8D94,GL_RED_INTEGER) +GL_ENUM(0x8D98,GL_RGB_INTEGER) +GL_ENUM(0x8D99,GL_RGBA_INTEGER) +GL_ENUM(0x8D9F,GL_INT_2_10_10_10_REV) +GL_ENUM(0x8DAD,GL_FLOAT_32_UNSIGNED_INT_24_8_REV) +GL_ENUM(0x8DC1,GL_SAMPLER_2D_ARRAY) +GL_ENUM(0x8DC4,GL_SAMPLER_2D_ARRAY_SHADOW) +GL_ENUM(0x8DC5,GL_SAMPLER_CUBE_SHADOW) +GL_ENUM(0x8DC6,GL_UNSIGNED_INT_VEC2) +GL_ENUM(0x8DC7,GL_UNSIGNED_INT_VEC3) +GL_ENUM(0x8DC8,GL_UNSIGNED_INT_VEC4) +GL_ENUM(0x8DCA,GL_INT_SAMPLER_2D) +GL_ENUM(0x8DCB,GL_INT_SAMPLER_3D) +GL_ENUM(0x8DCC,GL_INT_SAMPLER_CUBE) +GL_ENUM(0x8DCF,GL_INT_SAMPLER_2D_ARRAY) +GL_ENUM(0x8DD2,GL_UNSIGNED_INT_SAMPLER_2D) +GL_ENUM(0x8DD3,GL_UNSIGNED_INT_SAMPLER_3D) +GL_ENUM(0x8DD4,GL_UNSIGNED_INT_SAMPLER_CUBE) +GL_ENUM(0x8DD7,GL_UNSIGNED_INT_SAMPLER_2D_ARRAY) GL_ENUM(0x8DF0,GL_LOW_FLOAT) GL_ENUM(0x8DF1,GL_MEDIUM_FLOAT) GL_ENUM(0x8DF2,GL_HIGH_FLOAT) @@ -675,7 +827,15 @@ 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(0x8E22,GL_TRANSFORM_FEEDBACK) +GL_ENUM(0x8E23,GL_TRANSFORM_FEEDBACK_PAUSED) +GL_ENUM(0x8E24,GL_TRANSFORM_FEEDBACK_ACTIVE) +GL_ENUM(0x8E25,GL_TRANSFORM_FEEDBACK_BINDING) GL_ENUM(0x8E2C,GL_DEPTH_COMPONENT16_NONLINEAR_NV) +GL_ENUM(0x8E42,GL_TEXTURE_SWIZZLE_R) +GL_ENUM(0x8E43,GL_TEXTURE_SWIZZLE_G) +GL_ENUM(0x8E44,GL_TEXTURE_SWIZZLE_B) +GL_ENUM(0x8E45,GL_TEXTURE_SWIZZLE_A) GL_ENUM(0x8ED0,GL_COVERAGE_COMPONENT_NV) GL_ENUM(0x8ED1,GL_COVERAGE_COMPONENT4_NV) GL_ENUM(0x8ED2,GL_COVERAGE_ATTACHMENT_NV) @@ -684,10 +844,36 @@ 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(0x8F36,GL_COPY_READ_BUFFER) +GL_ENUM(0x8F37,GL_COPY_WRITE_BUFFER) GL_ENUM(0x8F60,GL_MALI_SHADER_BINARY_ARM) +GL_ENUM(0x8F94,GL_R8_SNORM) +GL_ENUM(0x8F95,GL_RG8_SNORM) +GL_ENUM(0x8F96,GL_RGB8_SNORM) +GL_ENUM(0x8F97,GL_RGBA8_SNORM) +GL_ENUM(0x8F9C,GL_SIGNED_NORMALIZED) GL_ENUM(0x8FA0,GL_PERFMON_GLOBAL_MODE_QCOM) GL_ENUM(0x8FC4,GL_SHADER_BINARY_VIV) +GL_ENUM(0x906F,GL_RGB10_A2UI) GL_ENUM(0x90F3,GL_CONTEXT_ROBUST_ACCESS_EXT) +GL_ENUM(0x9111,GL_MAX_SERVER_WAIT_TIMEOUT) +GL_ENUM(0x9112,GL_OBJECT_TYPE) +GL_ENUM(0x9113,GL_SYNC_CONDITION) +GL_ENUM(0x9114,GL_SYNC_STATUS) +GL_ENUM(0x9115,GL_SYNC_FLAGS) +GL_ENUM(0x9116,GL_SYNC_FENCE) +GL_ENUM(0x9117,GL_SYNC_GPU_COMMANDS_COMPLETE) +GL_ENUM(0x9118,GL_UNSIGNALED) +GL_ENUM(0x9119,GL_SIGNALED) +GL_ENUM(0x911A,GL_ALREADY_SIGNALED) +GL_ENUM(0x911B,GL_TIMEOUT_EXPIRED) +GL_ENUM(0x911C,GL_CONDITION_SATISFIED) +GL_ENUM(0x911D,GL_WAIT_FAILED) +GL_ENUM(0x911F,GL_BUFFER_ACCESS_FLAGS) +GL_ENUM(0x9120,GL_BUFFER_MAP_LENGTH) +GL_ENUM(0x9121,GL_BUFFER_MAP_OFFSET) +GL_ENUM(0x9122,GL_MAX_VERTEX_OUTPUT_COMPONENTS) +GL_ENUM(0x9125,GL_MAX_FRAGMENT_INPUT_COMPONENTS) GL_ENUM(0x912F,GL_TEXTURE_IMMUTABLE_FORMAT_EXT) GL_ENUM(0x9130,GL_SGX_PROGRAM_BINARY_IMG) GL_ENUM(0x9133,GL_RENDERBUFFER_SAMPLES_EXT) @@ -698,5 +884,18 @@ GL_ENUM(0x9151,GL_BUFFER_OBJECT_EXT) GL_ENUM(0x9153,GL_QUERY_OBJECT_EXT) GL_ENUM(0x9154,GL_VERTEX_ARRAY_OBJECT_EXT) GL_ENUM(0x9250,GL_SHADER_BINARY_DMP) +GL_ENUM(0x9270,GL_COMPRESSED_R11_EAC) +GL_ENUM(0x9271,GL_COMPRESSED_SIGNED_R11_EAC) +GL_ENUM(0x9272,GL_COMPRESSED_RG11_EAC) +GL_ENUM(0x9273,GL_COMPRESSED_SIGNED_RG11_EAC) +GL_ENUM(0x9274,GL_COMPRESSED_RGB8_ETC2) +GL_ENUM(0x9275,GL_COMPRESSED_SRGB8_ETC2) +GL_ENUM(0x9276,GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2) +GL_ENUM(0x9277,GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2) +GL_ENUM(0x9278,GL_COMPRESSED_RGBA8_ETC2_EAC) +GL_ENUM(0x9279,GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC) +GL_ENUM(0x9380,GL_NUM_SAMPLE_COUNTS) GL_ENUM(0x93A1,GL_BGRA8_EXT) GL_ENUM(0xFFFFFFFF,GL_ALL_SHADER_BITS_EXT) +GL_ENUM(0xFFFFFFFFFFFFFFFFull,GL_TIMEOUT_IGNORED) +GL_ENUM(0xFFFFFFFFu,GL_INVALID_INDEX) diff --git a/opengl/libs/glestrace.h b/opengl/libs/glestrace.h index a08f97b..868b18d 100644 --- a/opengl/libs/glestrace.h +++ b/opengl/libs/glestrace.h @@ -30,7 +30,7 @@ void GLTrace_eglReleaseThread(); void GLTrace_eglSwapBuffers(void*, void*); /* Start and stop GL Tracing. */ -void GLTrace_start(); +int GLTrace_start(); void GLTrace_stop(); /* Obtain the gl_hooks structure filled with the trace implementation for all GL functions. */ diff --git a/opengl/libs/hooks.h b/opengl/libs/hooks.h index e0ceb60..b2a684c 100644 --- a/opengl/libs/hooks.h +++ b/opengl/libs/hooks.h @@ -1,16 +1,16 @@ -/* +/* ** 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 + ** 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 + ** 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 + ** 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. */ @@ -29,6 +29,8 @@ #include <GLES/glext.h> #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> +#include <GLES3/gl3.h> +#include <GLES3/gl3ext.h> #if !defined(__arm__) && !defined(__mips__) #define USE_SLOW_BINDING 1 diff --git a/opengl/libs/tools/genfiles b/opengl/libs/tools/genfiles index 50bbf08..f92c9ab 100755 --- a/opengl/libs/tools/genfiles +++ b/opengl/libs/tools/genfiles @@ -14,20 +14,34 @@ # See the License for the specific language governing permissions and # limitations under the License. +# Force a specific locale for sorting to avoid irrelevant differences +# in the generated files that could hide real differences. +export LC_ALL=POSIX + ./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 +./glapigen ../../include/GLES3/gl3.h > ../GLES2/gl3_api.in +./glapigen ../../include/GLES3/gl3ext.h > ../GLES2/gl3ext_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 +./glentrygen ../../include/GLES3/gl3.h > /tmp/gl3_entries.in +./glentrygen ../../include/GLES3/gl3ext.h > /tmp/gl3ext_entries.in +# The awk command removes lines with the same function name as an earlier +# line, even if the rest of the line differs. Although signatures of +# functions with the same name should be the same, the different versions +# have some irrelevant whitespace and parameter name differences. cat /tmp/gl_entries.in \ /tmp/glext_entries.in \ /tmp/gl2_entries.in \ /tmp/gl2ext_entries.in \ + /tmp/gl3_entries.in \ + /tmp/gl3ext_entries.in \ | sort -t, -k2 \ | awk -F, '!_[$2]++' \ > ../entries.in @@ -38,6 +52,8 @@ cat ../../include/GLES/gl.h \ ../../include/GLES/glext.h \ ../../include/GLES2/gl2.h \ ../../include/GLES2/gl2ext.h \ + ../../include/GLES3/gl3.h \ + ../../include/GLES3/gl3ext.h \ | ./glenumsgen \ | sort \ > ../enums.in diff --git a/opengl/libs/trace.in b/opengl/libs/trace.in index e89e456..188d81b 100644 --- a/opengl/libs/trace.in +++ b/opengl/libs/trace.in @@ -6,15 +6,22 @@ TRACE_GL_VOID(glAlphaFuncx, (GLenum func, GLclampx ref), (func, ref), 2, "GLenum 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(glBeginQuery, (GLenum target, GLuint id), (target, id), 2, "GLenum", target, "GLuint", id) TRACE_GL_VOID(glBeginQueryEXT, (GLenum target, GLuint id), (target, id), 2, "GLenum", target, "GLuint", id) +TRACE_GL_VOID(glBeginTransformFeedback, (GLenum primitiveMode), (primitiveMode), 1, "GLenum", primitiveMode) 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(glBindBufferBase, (GLenum target, GLuint index, GLuint buffer), (target, index, buffer), 3, "GLenum", target, "GLuint", index, "GLuint", buffer) +TRACE_GL_VOID(glBindBufferRange, (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size), (target, index, buffer, offset, size), 5, "GLenum", target, "GLuint", index, "GLuint", buffer, "GLintptr", offset, "GLsizeiptr", size) 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(glBindProgramPipelineEXT, (GLuint pipeline), (pipeline), 1, "GLuint", pipeline) 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(glBindSampler, (GLuint unit, GLuint sampler), (unit, sampler), 2, "GLuint", unit, "GLuint", sampler) TRACE_GL_VOID(glBindTexture, (GLenum target, GLuint texture), (target, texture), 2, "GLenum", target, "GLuint", texture) +TRACE_GL_VOID(glBindTransformFeedback, (GLenum target, GLuint id), (target, id), 2, "GLenum", target, "GLuint", id) +TRACE_GL_VOID(glBindVertexArray, (GLuint array), (array), 1, "GLuint", array) 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) @@ -24,12 +31,17 @@ TRACE_GL_VOID(glBlendEquationSeparateOES, (GLenum modeRGB, GLenum modeAlpha), (m 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(glBlitFramebuffer, (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter), (srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter), 10, "GLint", srcX0, "GLint", srcY0, "GLint", srcX1, "GLint", srcY1, "GLint", dstX0, "GLint", dstY0, "GLint", dstX1, "GLint", dstY1, "GLbitfield", mask, "GLenum", filter) TRACE_GL_VOID(glBlitFramebufferANGLE, (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter), (srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter), 10, "GLint", srcX0, "GLint", srcY0, "GLint", srcX1, "GLint", srcY1, "GLint", dstX0, "GLint", dstY0, "GLint", dstX1, "GLint", dstY1, "GLbitfield", mask, "GLenum", filter) 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(glClearBufferfi, (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil), (buffer, drawbuffer, depth, stencil), 4, "GLenum", buffer, "GLint", drawbuffer, "GLfloat", depth, "GLint", stencil) +TRACE_GL_VOID(glClearBufferfv, (GLenum buffer, GLint drawbuffer, const GLfloat* value), (buffer, drawbuffer, value), 3, "GLenum", buffer, "GLint", drawbuffer, "const GLfloat*", value) +TRACE_GL_VOID(glClearBufferiv, (GLenum buffer, GLint drawbuffer, const GLint* value), (buffer, drawbuffer, value), 3, "GLenum", buffer, "GLint", drawbuffer, "const GLint*", value) +TRACE_GL_VOID(glClearBufferuiv, (GLenum buffer, GLint drawbuffer, const GLuint* value), (buffer, drawbuffer, value), 3, "GLenum", buffer, "GLint", drawbuffer, "const GLuint*", value) 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) @@ -39,6 +51,7 @@ 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(GLenum, glClientWaitSync, (GLsync sync, GLbitfield flags, GLuint64 timeout), (sync, flags, timeout), 3, "GLsync", sync, "GLbitfield", flags, "GLuint64", timeout) 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) @@ -53,11 +66,15 @@ TRACE_GL_VOID(glColorMask, (GLboolean red, GLboolean green, GLboolean blue, GLbo 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(glCompressedTexImage3D, (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(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(glCompressedTexSubImage3D, (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(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(glCopyBufferSubData, (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size), (readTarget, writeTarget, readOffset, writeOffset, size), 5, "GLenum", readTarget, "GLenum", writeTarget, "GLintptr", readOffset, "GLintptr", writeOffset, "GLsizeiptr", size) 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(glCopyTexSubImage3D, (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(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) @@ -73,11 +90,16 @@ TRACE_GL_VOID(glDeleteFramebuffersOES, (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(glDeleteProgramPipelinesEXT, (GLsizei n, const GLuint *pipelines), (n, pipelines), 2, "GLsizei", n, "const GLuint *", pipelines) +TRACE_GL_VOID(glDeleteQueries, (GLsizei n, const GLuint* ids), (n, ids), 2, "GLsizei", n, "const GLuint*", ids) TRACE_GL_VOID(glDeleteQueriesEXT, (GLsizei n, const GLuint *ids), (n, ids), 2, "GLsizei", n, "const GLuint *", ids) 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(glDeleteSamplers, (GLsizei count, const GLuint* samplers), (count, samplers), 2, "GLsizei", count, "const GLuint*", samplers) TRACE_GL_VOID(glDeleteShader, (GLuint shader), (shader), 1, "GLuint", shader) +TRACE_GL_VOID(glDeleteSync, (GLsync sync), (sync), 1, "GLsync", sync) TRACE_GL_VOID(glDeleteTextures, (GLsizei n, const GLuint *textures), (n, textures), 2, "GLsizei", n, "const GLuint *", textures) +TRACE_GL_VOID(glDeleteTransformFeedbacks, (GLsizei n, const GLuint* ids), (n, ids), 2, "GLsizei", n, "const GLuint*", ids) +TRACE_GL_VOID(glDeleteVertexArrays, (GLsizei n, const GLuint* arrays), (n, arrays), 2, "GLsizei", n, "const GLuint*", arrays) 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) @@ -92,8 +114,12 @@ TRACE_GL_VOID(glDisableDriverControlQCOM, (GLuint driverControl), (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(glDrawArraysInstanced, (GLenum mode, GLint first, GLsizei count, GLsizei instanceCount), (mode, first, count, instanceCount), 4, "GLenum", mode, "GLint", first, "GLsizei", count, "GLsizei", instanceCount) +TRACE_GL_VOID(glDrawBuffers, (GLsizei n, const GLenum* bufs), (n, bufs), 2, "GLsizei", n, "const GLenum*", bufs) TRACE_GL_VOID(glDrawBuffersNV, (GLsizei n, const GLenum *bufs), (n, bufs), 2, "GLsizei", n, "const GLenum *", bufs) 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(glDrawElementsInstanced, (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices, GLsizei instanceCount), (mode, count, type, indices, instanceCount), 5, "GLenum", mode, "GLsizei", count, "GLenum", type, "const GLvoid*", indices, "GLsizei", instanceCount) +TRACE_GL_VOID(glDrawRangeElements, (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid* indices), (mode, start, end, count, type, indices), 6, "GLenum", mode, "GLuint", start, "GLuint", end, "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) @@ -109,8 +135,10 @@ 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(glEndQuery, (GLenum target), (target), 1, "GLenum", target) TRACE_GL_VOID(glEndQueryEXT, (GLenum target), (target), 1, "GLenum", target) TRACE_GL_VOID(glEndTilingQCOM, (GLbitfield preserveMask), (preserveMask), 1, "GLbitfield", preserveMask) +TRACE_GL_VOID(glEndTransformFeedback, (void), (), 0) 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) @@ -123,9 +151,11 @@ TRACE_GL_VOID(glExtGetTexSubImageQCOM, (GLenum target, GLint level, GLint xoffse 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(GLsync, glFenceSync, (GLenum condition, GLbitfield flags), (condition, flags), 2, "GLenum", condition, "GLbitfield", flags) 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(glFlushMappedBufferRange, (GLenum target, GLintptr offset, GLsizeiptr length), (target, offset, length), 3, "GLenum", target, "GLintptr", offset, "GLsizeiptr", length) 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) @@ -139,6 +169,7 @@ TRACE_GL_VOID(glFramebufferTexture2DMultisampleEXT, (GLenum target, GLenum attac 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(glFramebufferTextureLayer, (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer), (target, attachment, texture, level, layer), 5, "GLenum", target, "GLenum", attachment, "GLuint", texture, "GLint", level, "GLint", layer) 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) @@ -150,19 +181,28 @@ TRACE_GL_VOID(glGenFramebuffers, (GLsizei n, GLuint* framebuffers), (n, framebuf 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(glGenProgramPipelinesEXT, (GLsizei n, GLuint *pipelines), (n, pipelines), 2, "GLsizei", n, "GLuint *", pipelines) +TRACE_GL_VOID(glGenQueries, (GLsizei n, GLuint* ids), (n, ids), 2, "GLsizei", n, "GLuint*", ids) TRACE_GL_VOID(glGenQueriesEXT, (GLsizei n, GLuint *ids), (n, ids), 2, "GLsizei", n, "GLuint *", ids) 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(glGenSamplers, (GLsizei count, GLuint* samplers), (count, samplers), 2, "GLsizei", count, "GLuint*", samplers) TRACE_GL_VOID(glGenTextures, (GLsizei n, GLuint *textures), (n, textures), 2, "GLsizei", n, "GLuint *", textures) +TRACE_GL_VOID(glGenTransformFeedbacks, (GLsizei n, GLuint* ids), (n, ids), 2, "GLsizei", n, "GLuint*", ids) +TRACE_GL_VOID(glGenVertexArrays, (GLsizei n, GLuint* arrays), (n, arrays), 2, "GLsizei", n, "GLuint*", arrays) 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(glGetActiveUniformBlockName, (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei* length, GLchar* uniformBlockName), (program, uniformBlockIndex, bufSize, length, uniformBlockName), 5, "GLuint", program, "GLuint", uniformBlockIndex, "GLsizei", bufSize, "GLsizei*", length, "GLchar*", uniformBlockName) +TRACE_GL_VOID(glGetActiveUniformBlockiv, (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint* params), (program, uniformBlockIndex, pname, params), 4, "GLuint", program, "GLuint", uniformBlockIndex, "GLenum", pname, "GLint*", params) +TRACE_GL_VOID(glGetActiveUniformsiv, (GLuint program, GLsizei uniformCount, const GLuint* uniformIndices, GLenum pname, GLint* params), (program, uniformCount, uniformIndices, pname, params), 5, "GLuint", program, "GLsizei", uniformCount, "const GLuint*", uniformIndices, "GLenum", pname, "GLint*", params) 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(GLint, 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(glGetBufferParameteri64v, (GLenum target, GLenum pname, GLint64* params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint64*", params) TRACE_GL_VOID(glGetBufferParameteriv, (GLenum target, GLenum pname, GLint *params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint *", params) +TRACE_GL_VOID(glGetBufferPointerv, (GLenum target, GLenum pname, GLvoid** params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLvoid**", 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) @@ -175,10 +215,15 @@ TRACE_GL_VOID(glGetFenceivNV, (GLuint fence, GLenum pname, GLint *params), (fenc 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(GLint, glGetFragDataLocation, (GLuint program, const GLchar *name), (program, name), 2, "GLuint", program, "const GLchar *", name) 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(GLenum, glGetGraphicsResetStatusEXT, (void), (), 0) +TRACE_GL_VOID(glGetInteger64i_v, (GLenum target, GLuint index, GLint64* data), (target, index, data), 3, "GLenum", target, "GLuint", index, "GLint64*", data) +TRACE_GL_VOID(glGetInteger64v, (GLenum pname, GLint64* params), (pname, params), 2, "GLenum", pname, "GLint64*", params) +TRACE_GL_VOID(glGetIntegeri_v, (GLenum target, GLuint index, GLint* data), (target, index, data), 3, "GLenum", target, "GLuint", index, "GLint*", data) TRACE_GL_VOID(glGetIntegerv, (GLenum pname, GLint *params), (pname, params), 2, "GLenum", pname, "GLint *", params) +TRACE_GL_VOID(glGetInternalformativ, (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint* params), (target, internalformat, pname, bufSize, params), 5, "GLenum", target, "GLenum", internalformat, "GLenum", pname, "GLsizei", bufSize, "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) @@ -193,20 +238,27 @@ TRACE_GL_VOID(glGetPerfMonitorCountersAMD, (GLuint group, GLint *numCounters, GL 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(glGetProgramBinary, (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(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(glGetProgramPipelineInfoLogEXT, (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog), (pipeline, bufSize, length, infoLog), 4, "GLuint", pipeline, "GLsizei", bufSize, "GLsizei *", length, "GLchar *", infoLog) TRACE_GL_VOID(glGetProgramPipelineivEXT, (GLuint pipeline, GLenum pname, GLint *params), (pipeline, pname, params), 3, "GLuint", pipeline, "GLenum", pname, "GLint *", params) TRACE_GL_VOID(glGetProgramiv, (GLuint program, GLenum pname, GLint* params), (program, pname, params), 3, "GLuint", program, "GLenum", pname, "GLint*", params) +TRACE_GL_VOID(glGetQueryObjectuiv, (GLuint id, GLenum pname, GLuint* params), (id, pname, params), 3, "GLuint", id, "GLenum", pname, "GLuint*", params) TRACE_GL_VOID(glGetQueryObjectuivEXT, (GLuint id, GLenum pname, GLuint *params), (id, pname, params), 3, "GLuint", id, "GLenum", pname, "GLuint *", params) +TRACE_GL_VOID(glGetQueryiv, (GLenum target, GLenum pname, GLint* params), (target, pname, params), 3, "GLenum", target, "GLenum", pname, "GLint*", params) TRACE_GL_VOID(glGetQueryivEXT, (GLenum target, GLenum pname, GLint *params), (target, pname, params), 3, "GLenum", target, "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(glGetSamplerParameterfv, (GLuint sampler, GLenum pname, GLfloat* params), (sampler, pname, params), 3, "GLuint", sampler, "GLenum", pname, "GLfloat*", params) +TRACE_GL_VOID(glGetSamplerParameteriv, (GLuint sampler, GLenum pname, GLint* params), (sampler, pname, params), 3, "GLuint", sampler, "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(const GLubyte*, glGetStringi, (GLenum name, GLuint index), (name, index), 2, "GLenum", name, "GLuint", index) +TRACE_GL_VOID(glGetSynciv, (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei* length, GLint* values), (sync, pname, bufSize, length, values), 5, "GLsync", sync, "GLenum", pname, "GLsizei", bufSize, "GLsizei*", length, "GLint*", values) 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) @@ -218,9 +270,15 @@ TRACE_GL_VOID(glGetTexParameterfv, (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_VOID(glGetTransformFeedbackVarying, (GLuint program, GLuint index, GLsizei bufSize, GLsizei* length, GLsizei* size, GLenum* type, GLchar* name), (program, index, bufSize, length, size, type, name), 7, "GLuint", program, "GLuint", index, "GLsizei", bufSize, "GLsizei*", length, "GLsizei*", size, "GLenum*", type, "GLchar*", name) +TRACE_GL(GLuint, glGetUniformBlockIndex, (GLuint program, const GLchar* uniformBlockName), (program, uniformBlockName), 2, "GLuint", program, "const GLchar*", uniformBlockName) +TRACE_GL_VOID(glGetUniformIndices, (GLuint program, GLsizei uniformCount, const GLchar* const* uniformNames, GLuint* uniformIndices), (program, uniformCount, uniformNames, uniformIndices), 4, "GLuint", program, "GLsizei", uniformCount, "const GLchar* const*", uniformNames, "GLuint*", uniformIndices) TRACE_GL(GLint, 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(glGetUniformuiv, (GLuint program, GLint location, GLuint* params), (program, location, params), 3, "GLuint", program, "GLint", location, "GLuint*", params) +TRACE_GL_VOID(glGetVertexAttribIiv, (GLuint index, GLenum pname, GLint* params), (index, pname, params), 3, "GLuint", index, "GLenum", pname, "GLint*", params) +TRACE_GL_VOID(glGetVertexAttribIuiv, (GLuint index, GLenum pname, GLuint* params), (index, pname, params), 3, "GLuint", index, "GLenum", pname, "GLuint*", 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) @@ -228,6 +286,8 @@ TRACE_GL_VOID(glGetnUniformfvEXT, (GLuint program, GLint location, GLsizei bufSi TRACE_GL_VOID(glGetnUniformivEXT, (GLuint program, GLint location, GLsizei bufSize, GLint *params), (program, location, bufSize, params), 4, "GLuint", program, "GLint", location, "GLsizei", bufSize, "GLint *", params) TRACE_GL_VOID(glHint, (GLenum target, GLenum mode), (target, mode), 2, "GLenum", target, "GLenum", mode) TRACE_GL_VOID(glInsertEventMarkerEXT, (GLsizei length, const GLchar *marker), (length, marker), 2, "GLsizei", length, "const GLchar *", marker) +TRACE_GL_VOID(glInvalidateFramebuffer, (GLenum target, GLsizei numAttachments, const GLenum* attachments), (target, numAttachments, attachments), 3, "GLenum", target, "GLsizei", numAttachments, "const GLenum*", attachments) +TRACE_GL_VOID(glInvalidateSubFramebuffer, (GLenum target, GLsizei numAttachments, const GLenum* attachments, GLint x, GLint y, GLsizei width, GLsizei height), (target, numAttachments, attachments, x, y, width, height), 7, "GLenum", target, "GLsizei", numAttachments, "const GLenum*", attachments, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height) 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) @@ -235,11 +295,16 @@ TRACE_GL(GLboolean, glIsFramebuffer, (GLuint framebuffer), (framebuffer), 1, "GL TRACE_GL(GLboolean, glIsFramebufferOES, (GLuint framebuffer), (framebuffer), 1, "GLuint", framebuffer) TRACE_GL(GLboolean, glIsProgram, (GLuint program), (program), 1, "GLuint", program) TRACE_GL(GLboolean, glIsProgramPipelineEXT, (GLuint pipeline), (pipeline), 1, "GLuint", pipeline) +TRACE_GL(GLboolean, glIsQuery, (GLuint id), (id), 1, "GLuint", id) TRACE_GL(GLboolean, glIsQueryEXT, (GLuint id), (id), 1, "GLuint", id) TRACE_GL(GLboolean, glIsRenderbuffer, (GLuint renderbuffer), (renderbuffer), 1, "GLuint", renderbuffer) TRACE_GL(GLboolean, glIsRenderbufferOES, (GLuint renderbuffer), (renderbuffer), 1, "GLuint", renderbuffer) +TRACE_GL(GLboolean, glIsSampler, (GLuint sampler), (sampler), 1, "GLuint", sampler) TRACE_GL(GLboolean, glIsShader, (GLuint shader), (shader), 1, "GLuint", shader) +TRACE_GL(GLboolean, glIsSync, (GLsync sync), (sync), 1, "GLsync", sync) TRACE_GL(GLboolean, glIsTexture, (GLuint texture), (texture), 1, "GLuint", texture) +TRACE_GL(GLboolean, glIsTransformFeedback, (GLuint id), (id), 1, "GLuint", id) +TRACE_GL(GLboolean, glIsVertexArray, (GLuint array), (array), 1, "GLuint", array) TRACE_GL(GLboolean, glIsVertexArrayOES, (GLuint array), (array), 1, "GLuint", array) TRACE_GL_VOID(glLabelObjectEXT, (GLenum type, GLuint object, GLsizei length, const GLchar *label), (type, object, length, label), 4, "GLenum", type, "GLuint", object, "GLsizei", length, "const GLchar *", label) TRACE_GL_VOID(glLightModelf, (GLenum pname, GLfloat param), (pname, param), 2, "GLenum", pname, "GLfloat", param) @@ -265,6 +330,7 @@ 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(GLvoid*, glMapBufferRange, (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access), (target, offset, length, access), 4, "GLenum", target, "GLintptr", offset, "GLsizeiptr", length, "GLbitfield", 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) @@ -289,6 +355,7 @@ TRACE_GL_VOID(glOrthof, (GLfloat left, GLfloat right, GLfloat bottom, GLfloat to 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(glPauseTransformFeedback, (void), (), 0) 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) @@ -305,7 +372,9 @@ TRACE_GL_VOID(glPolygonOffsetx, (GLfixed factor, GLfixed units), (factor, units) TRACE_GL_VOID(glPolygonOffsetxOES, (GLfixed factor, GLfixed units), (factor, units), 2, "GLfixed", factor, "GLfixed", units) TRACE_GL_VOID(glPopGroupMarkerEXT, (void), (), 0) TRACE_GL_VOID(glPopMatrix, (void), (), 0) +TRACE_GL_VOID(glProgramBinary, (GLuint program, GLenum binaryFormat, const GLvoid* binary, GLsizei length), (program, binaryFormat, binary, length), 4, "GLuint", program, "GLenum", binaryFormat, "const GLvoid*", binary, "GLsizei", length) 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(glProgramParameteri, (GLuint program, GLenum pname, GLint value), (program, pname, value), 3, "GLuint", program, "GLenum", pname, "GLint", value) TRACE_GL_VOID(glProgramParameteriEXT, (GLuint program, GLenum pname, GLint value), (program, pname, value), 3, "GLuint", program, "GLenum", pname, "GLint", value) TRACE_GL_VOID(glProgramUniform1fEXT, (GLuint program, GLint location, GLfloat x), (program, location, x), 3, "GLuint", program, "GLint", location, "GLfloat", x) TRACE_GL_VOID(glProgramUniform1fvEXT, (GLuint program, GLint location, GLsizei count, const GLfloat *value), (program, location, count, value), 4, "GLuint", program, "GLint", location, "GLsizei", count, "const GLfloat *", value) @@ -329,23 +398,30 @@ TRACE_GL_VOID(glProgramUniformMatrix4fvEXT, (GLuint program, GLint location, GLs TRACE_GL_VOID(glPushGroupMarkerEXT, (GLsizei length, const GLchar *marker), (length, marker), 2, "GLsizei", length, "const GLchar *", marker) 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(glReadBuffer, (GLenum mode), (mode), 1, "GLenum", mode) TRACE_GL_VOID(glReadBufferNV, (GLenum mode), (mode), 1, "GLenum", mode) 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(glReadnPixelsEXT, (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data), (x, y, width, height, format, type, bufSize, data), 8, "GLint", x, "GLint", y, "GLsizei", width, "GLsizei", height, "GLenum", format, "GLenum", type, "GLsizei", bufSize, "void *", data) 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(glRenderbufferStorageMultisample, (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(glRenderbufferStorageMultisampleANGLE, (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(glRenderbufferStorageMultisampleAPPLE, (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(glRenderbufferStorageMultisampleEXT, (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(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(glResolveMultisampleFramebufferAPPLE, (void), (), 0) +TRACE_GL_VOID(glResumeTransformFeedback, (void), (), 0) 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(glSamplerParameterf, (GLuint sampler, GLenum pname, GLfloat param), (sampler, pname, param), 3, "GLuint", sampler, "GLenum", pname, "GLfloat", param) +TRACE_GL_VOID(glSamplerParameterfv, (GLuint sampler, GLenum pname, const GLfloat* param), (sampler, pname, param), 3, "GLuint", sampler, "GLenum", pname, "const GLfloat*", param) +TRACE_GL_VOID(glSamplerParameteri, (GLuint sampler, GLenum pname, GLint param), (sampler, pname, param), 3, "GLuint", sampler, "GLenum", pname, "GLint", param) +TRACE_GL_VOID(glSamplerParameteriv, (GLuint sampler, GLenum pname, const GLint* param), (sampler, pname, param), 3, "GLuint", sampler, "GLenum", pname, "const GLint*", param) 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) @@ -354,7 +430,7 @@ TRACE_GL_VOID(glSelectPerfMonitorCountersAMD, (GLuint monitor, GLboolean enable, 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(glShaderSource, (GLuint shader, GLsizei count, const GLchar* const* string, const GLint* length), (shader, count, string, length), 4, "GLuint", shader, "GLsizei", count, "const GLchar* const*", 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) @@ -379,6 +455,7 @@ TRACE_GL_VOID(glTexGenivOES, (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(glTexImage3D, (GLenum target, GLint level, GLint 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, "GLint", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth, "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) @@ -389,13 +466,17 @@ TRACE_GL_VOID(glTexParameterxOES, (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(glTexStorage1DEXT, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width), (target, levels, internalformat, width), 4, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width) +TRACE_GL_VOID(glTexStorage2D, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height), (target, levels, internalformat, width, height), 5, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width, "GLsizei", height) TRACE_GL_VOID(glTexStorage2DEXT, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height), (target, levels, internalformat, width, height), 5, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width, "GLsizei", height) +TRACE_GL_VOID(glTexStorage3D, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth), (target, levels, internalformat, width, height, depth), 6, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth) TRACE_GL_VOID(glTexStorage3DEXT, (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth), (target, levels, internalformat, width, height, depth), 6, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth) 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(glTexSubImage3D, (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(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(glTextureStorage1DEXT, (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width), (texture, target, levels, internalformat, width), 5, "GLuint", texture, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width) TRACE_GL_VOID(glTextureStorage2DEXT, (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height), (texture, target, levels, internalformat, width, height), 6, "GLuint", texture, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width, "GLsizei", height) TRACE_GL_VOID(glTextureStorage3DEXT, (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth), (texture, target, levels, internalformat, width, height, depth), 7, "GLuint", texture, "GLenum", target, "GLsizei", levels, "GLenum", internalformat, "GLsizei", width, "GLsizei", height, "GLsizei", depth) +TRACE_GL_VOID(glTransformFeedbackVaryings, (GLuint program, GLsizei count, const GLchar* const* varyings, GLenum bufferMode), (program, count, varyings, bufferMode), 4, "GLuint", program, "GLsizei", count, "const GLchar* const*", varyings, "GLenum", bufferMode) 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) @@ -403,21 +484,37 @@ TRACE_GL_VOID(glUniform1f, (GLint location, GLfloat x), (location, x), 2, "GLint 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(glUniform1ui, (GLint location, GLuint v0), (location, v0), 2, "GLint", location, "GLuint", v0) +TRACE_GL_VOID(glUniform1uiv, (GLint location, GLsizei count, const GLuint* value), (location, count, value), 3, "GLint", location, "GLsizei", count, "const GLuint*", value) 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(glUniform2ui, (GLint location, GLuint v0, GLuint v1), (location, v0, v1), 3, "GLint", location, "GLuint", v0, "GLuint", v1) +TRACE_GL_VOID(glUniform2uiv, (GLint location, GLsizei count, const GLuint* value), (location, count, value), 3, "GLint", location, "GLsizei", count, "const GLuint*", value) 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(glUniform3ui, (GLint location, GLuint v0, GLuint v1, GLuint v2), (location, v0, v1, v2), 4, "GLint", location, "GLuint", v0, "GLuint", v1, "GLuint", v2) +TRACE_GL_VOID(glUniform3uiv, (GLint location, GLsizei count, const GLuint* value), (location, count, value), 3, "GLint", location, "GLsizei", count, "const GLuint*", value) 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(glUniform4ui, (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3), (location, v0, v1, v2, v3), 5, "GLint", location, "GLuint", v0, "GLuint", v1, "GLuint", v2, "GLuint", v3) +TRACE_GL_VOID(glUniform4uiv, (GLint location, GLsizei count, const GLuint* value), (location, count, value), 3, "GLint", location, "GLsizei", count, "const GLuint*", value) +TRACE_GL_VOID(glUniformBlockBinding, (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding), (program, uniformBlockIndex, uniformBlockBinding), 3, "GLuint", program, "GLuint", uniformBlockIndex, "GLuint", uniformBlockBinding) 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(glUniformMatrix2x3fv, (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(glUniformMatrix2x4fv, (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(glUniformMatrix3x2fv, (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(glUniformMatrix3x4fv, (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_VOID(glUniformMatrix4x2fv, (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(glUniformMatrix4x3fv, (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, glUnmapBuffer, (GLenum target), (target), 1, "GLenum", target) TRACE_GL(GLboolean, glUnmapBufferOES, (GLenum target), (target), 1, "GLenum", target) TRACE_GL_VOID(glUseProgram, (GLuint program), (program), 1, "GLuint", program) TRACE_GL_VOID(glUseProgramStagesEXT, (GLuint pipeline, GLbitfield stages, GLuint program), (pipeline, stages, program), 3, "GLuint", pipeline, "GLbitfield", stages, "GLuint", program) @@ -431,7 +528,14 @@ TRACE_GL_VOID(glVertexAttrib3f, (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(glVertexAttribDivisor, (GLuint index, GLuint divisor), (index, divisor), 2, "GLuint", index, "GLuint", divisor) +TRACE_GL_VOID(glVertexAttribI4i, (GLuint index, GLint x, GLint y, GLint z, GLint w), (index, x, y, z, w), 5, "GLuint", index, "GLint", x, "GLint", y, "GLint", z, "GLint", w) +TRACE_GL_VOID(glVertexAttribI4iv, (GLuint index, const GLint* v), (index, v), 2, "GLuint", index, "const GLint*", v) +TRACE_GL_VOID(glVertexAttribI4ui, (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w), (index, x, y, z, w), 5, "GLuint", index, "GLuint", x, "GLuint", y, "GLuint", z, "GLuint", w) +TRACE_GL_VOID(glVertexAttribI4uiv, (GLuint index, const GLuint* v), (index, v), 2, "GLuint", index, "const GLuint*", v) +TRACE_GL_VOID(glVertexAttribIPointer, (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid* pointer), (index, size, type, stride, pointer), 5, "GLuint", index, "GLint", size, "GLenum", type, "GLsizei", stride, "const GLvoid*", pointer) 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(glWaitSync, (GLsync sync, GLbitfield flags, GLuint64 timeout), (sync, flags, timeout), 3, "GLsync", sync, "GLbitfield", flags, "GLuint64", timeout) 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/specs/EGL_ANDROID_blob_cache.txt b/opengl/specs/EGL_ANDROID_blob_cache.txt index 61f45d3..e984694 100644 --- a/opengl/specs/EGL_ANDROID_blob_cache.txt +++ b/opengl/specs/EGL_ANDROID_blob_cache.txt @@ -16,15 +16,15 @@ Contact Status - Draft. + Complete Version - Version 1, April 22, 2011 + Version 3, December 13, 2012 Number - EGL Extension #XXX + EGL Extension #48 Dependencies @@ -88,8 +88,8 @@ New Types New Procedures and Functions void eglSetBlobCacheFuncsANDROID(EGLDisplay dpy, - EGLSetBlobFunc set, - EGLGetBlobFunc get); + EGLSetBlobFuncANDROID set, + EGLGetBlobFuncANDROID get); New Tokens @@ -200,6 +200,9 @@ Issues Revision History +#3 (Jon Leech, December 13, 2012) + - Fix typo in New Functions section & assign extension #. + #2 (Jamie Gennis, April 25, 2011) - Swapped the order of the size and pointer arguments to the get and set functions. diff --git a/opengl/specs/EGL_ANDROID_framebuffer_target.txt b/opengl/specs/EGL_ANDROID_framebuffer_target.txt index 273414c..a15dfa8 100644 --- a/opengl/specs/EGL_ANDROID_framebuffer_target.txt +++ b/opengl/specs/EGL_ANDROID_framebuffer_target.txt @@ -16,7 +16,7 @@ Contact Status - Draft. + Complete Version @@ -24,7 +24,7 @@ Version Number - EGL Extension #XXX + EGL Extension #47 Dependencies diff --git a/opengl/specs/EGL_ANDROID_image_native_buffer.txt b/opengl/specs/EGL_ANDROID_image_native_buffer.txt new file mode 100644 index 0000000..7392d4f --- /dev/null +++ b/opengl/specs/EGL_ANDROID_image_native_buffer.txt @@ -0,0 +1,108 @@ +Name + + ANDROID_image_native_buffer + +Name Strings + + EGL_ANDROID_image_native_buffer + +Contributors + + Mathias Agopian + Jamie Gennis + Jesse Hall + +Contact + + Jesse Hall, Google Inc. (jessehall 'at' google.com) + +Status + + Complete + +Version + + Version 1, November 28, 2012 + +Number + + EGL Extension #49 + +Dependencies + + EGL 1.2 is required. + + EGL_KHR_image_base is required. + + This extension is written against the wording of the EGL 1.2 + Specification. + +Overview + + This extension enables using an Android window buffer (struct + ANativeWindowBuffer) as an EGLImage source. + +New Types + + None. + +New Procedures and Functions + + None. + +New Tokens + + Accepted by the <target> parameter of eglCreateImageKHR: + + EGL_NATIVE_BUFFER_ANDROID 0x3140 + +Changes to Chapter 3 of the EGL 1.2 Specification (EGL Functions and Errors) + + Add to section 2.5.1 "EGLImage Specification" (as defined by the + EGL_KHR_image_base specification), in the description of + eglCreateImageKHR: + + "Values accepted for <target> are listed in Table aaa, below. + + +----------------------------+-----------------------------------------+ + | <target> | Notes | + +----------------------------+-----------------------------------------+ + | EGL_NATIVE_BUFFER_ANDROID | Used for ANativeWindowBuffer objects | + +----------------------------+-----------------------------------------+ + Table aaa. Legal values for eglCreateImageKHR <target> parameter + + ... + + If <target> is EGL_NATIVE_BUFFER_ANDROID, <dpy> must be a valid display, + <ctx> must be EGL_NO_CONTEXT, <buffer> must be a pointer to a valid + ANativeWindowBuffer object (cast into the type EGLClientBuffer), and + attributes other than EGL_IMAGE_PRESERVED_KHR are ignored." + + Add to the list of error conditions for eglCreateImageKHR: + + "* If <target> is EGL_NATIVE_BUFFER_ANDROID and <buffer> is not a + pointer to a valid ANativeWindowBuffer, the error EGL_BAD_PARAMETER + is generated. + + * If <target> is EGL_NATIVE_BUFFER_ANDROID and <ctx> is not + EGL_NO_CONTEXT, the error EGL_BAD_CONTEXT is generated. + + * If <target> is EGL_NATIVE_BUFFER_ANDROID and <buffer> was created + with properties (format, usage, dimensions, etc.) not supported by + the EGL implementation, the error EGL_BAD_PARAMETER is generated." + +Issues + + 1. Should this extension define what combinations of ANativeWindowBuffer + properties implementations are required to support? + + RESOLVED: No. + + The requirements have evolved over time and will continue to change with + future Android releases. The minimum requirements for a given Android + version should be documented by that version. + +Revision History + +#1 (Jesse Hall, November 28, 2012) + - Initial draft. diff --git a/opengl/specs/EGL_ANDROID_native_fence_sync.txt b/opengl/specs/EGL_ANDROID_native_fence_sync.txt index ee05b40..d72edd7 100644 --- a/opengl/specs/EGL_ANDROID_native_fence_sync.txt +++ b/opengl/specs/EGL_ANDROID_native_fence_sync.txt @@ -16,7 +16,7 @@ Contact Status - Draft. + Complete Version @@ -24,7 +24,7 @@ Version Number - EGL Extension #XXX + EGL Extension #50 Dependencies diff --git a/opengl/specs/EGL_ANDROID_presentation_time.txt b/opengl/specs/EGL_ANDROID_presentation_time.txt new file mode 100644 index 0000000..09b3938 --- /dev/null +++ b/opengl/specs/EGL_ANDROID_presentation_time.txt @@ -0,0 +1,121 @@ +Name + + ANDROID_presentation_time + +Name Strings + + EGL_ANDROID_presentation_time + +Contributors + + Jamie Gennis + Andy McFadden + +Contact + + Jamie Gennis, Google Inc. (jgennis 'at' google.com) + +Status + + Draft + +Version + + Version 2, April 1, 2013 + +Number + + EGL Extension #XXX + +Dependencies + + Requires EGL 1.1 + + This extension is written against the wording of the EGL 1.4 Specification + +Overview + + Often when rendering a sequence of images, there is some time at which each + image is intended to be presented to the viewer. This extension allows + this desired presentation time to be specified for each frame rendered to + an EGLSurface, allowing the native window system to use it. + +New Types + + /* + * EGLnsecsANDROID is a signed integer type for representing a time in + * nanoseconds. + */ + #include <khrplatform.h> + typedef khronos_stime_nanoseconds_t EGLnsecsANDROID; + + +New Procedures and Functions + + EGLboolean eglPresentationTimeANDROID( + EGLDisplay dpy, + EGLSurface sur, + EGLnsecsANDROID time); + +New Tokens + + None. + +Changes to Chapter 3 of the EGL 1.2 Specification (EGL Functions and Errors) + + Add a new subsection before Section 3.9.4, page 53 (Posting Errors) + + "3.9.4 Presentation Time + + The function + + EGLboolean eglPresentationTimeANDROID(EGLDisplay dpy, EGLSurface + surface, EGLnsecsANDROID time); + + specifies the time at which the current color buffer of surface should be + presented to the viewer. The time parameter should be a time in + nanoseconds, but the exact meaning of the time depends on the native + window system's use of the presentation time. In situations where + an absolute time is needed such as displaying the color buffer on a + display device, the time should correspond to the system monotonic up-time + clock. For situations in which an absolute time is not needed such as + using the color buffer for video encoding, the presentation time of the + first frame may be arbitrarily chosen and those of subsequent frames + chosen relative to that of the first frame. + + The presentation time may be set multiple times, with each call to + eglPresentationTimeANDROID overriding prior calls. Setting the + presentation time alone does not cause the color buffer to be made + visible, but if the color buffer is subsequently posted to a native window + or copied to a native pixmap then the presentation time of the surface at + that time may be passed along for the native window system to use. + + If the surface presentation time is successfully set, EGL_TRUE is + returned. Otherwise EGL_FALSE is returned and an appropriate error is + set. + +Issues + + 1. How is the presentation time used? + + RESOLVED: The uses of the presentation time are intentionally not specified + in this extension. Some possible uses include Audio/Video synchronization, + video frame timestamps for video encoding, display latency metrics, and + display latency control. + + 2. How can the current value of the clock that should be used for the + presentation time when an absolute time is needed be queried on Android? + + RESOLVED: The current clock value can be queried from the Java + System.nanoTime() method, or from the native clock_gettime function by + passing CLOCK_MONOTONIC as the clock identifier. + +Revision History + +#1 (Jamie Gennis, April 1, 2013) + - Clarified how uses that either do or do not need an absolute time should + be handled. + - Specified the eglPresentationTimeANDROID return value. + +#1 (Jamie Gennis, January 8, 2013) + - Initial draft. diff --git a/opengl/specs/EGL_ANDROID_recordable.txt b/opengl/specs/EGL_ANDROID_recordable.txt index 8dbd26f..d21094e 100644 --- a/opengl/specs/EGL_ANDROID_recordable.txt +++ b/opengl/specs/EGL_ANDROID_recordable.txt @@ -16,15 +16,15 @@ Contact Status - Draft. + Complete Version - Version 1, July 8, 2011 + Version 2, July 15, 2011 Number - EGL Extension #XXX + EGL Extension #51 Dependencies diff --git a/opengl/tests/EGLTest/Android.mk b/opengl/tests/EGLTest/Android.mk index d820875..1a9ee5c 100644 --- a/opengl/tests/EGLTest/Android.mk +++ b/opengl/tests/EGLTest/Android.mk @@ -30,6 +30,9 @@ LOCAL_C_INCLUDES := \ frameworks/native/opengl/libs \ frameworks/native/opengl/libs/EGL \ +# gold in binutils 2.22 will warn about the usage of mktemp +LOCAL_LDFLAGS += -Wl,--no-fatal-warnings + include $(BUILD_EXECUTABLE) # Include subdirectory makefiles diff --git a/opengl/tests/EGLTest/EGL_test.cpp b/opengl/tests/EGLTest/EGL_test.cpp index d511cae..c0daba2 100644 --- a/opengl/tests/EGLTest/EGL_test.cpp +++ b/opengl/tests/EGLTest/EGL_test.cpp @@ -19,7 +19,7 @@ #include <utils/String8.h> #include <EGL/egl.h> -#include <gui/SurfaceTextureClient.h> +#include <gui/Surface.h> #include <gui/DummyConsumer.h> @@ -104,7 +104,7 @@ TEST_F(EGLTest, EGLTerminateSucceedsWithRemainingObjects) { // Create a EGLSurface sp<BufferQueue> bq = new BufferQueue(); bq->consumerConnect(new DummyConsumer()); - sp<SurfaceTextureClient> mSTC = new SurfaceTextureClient(static_cast<sp<ISurfaceTexture> >( bq)); + sp<Surface> mSTC = new Surface(static_cast<sp<IGraphicBufferProducer> >( bq)); sp<ANativeWindow> mANW = mSTC; EGLSurface eglSurface = eglCreateWindowSurface(mEglDisplay, config, diff --git a/opengl/tests/gl2_jni/Android.mk b/opengl/tests/gl2_jni/Android.mk index 25187c9..409bd73 100644 --- a/opengl/tests/gl2_jni/Android.mk +++ b/opengl/tests/gl2_jni/Android.mk @@ -37,6 +37,7 @@ LOCAL_SRC_FILES:= \ LOCAL_SHARED_LIBRARIES := \ libutils \ + liblog \ libEGL \ libGLESv2 diff --git a/opengl/tests/gl2_yuvtex/Android.mk b/opengl/tests/gl2_yuvtex/Android.mk index 7d43759..bb3cc0c 100644 --- a/opengl/tests/gl2_yuvtex/Android.mk +++ b/opengl/tests/gl2_yuvtex/Android.mk @@ -5,9 +5,10 @@ LOCAL_SRC_FILES:= \ gl2_yuvtex.cpp LOCAL_SHARED_LIBRARIES := \ - libcutils \ + libcutils \ libEGL \ libGLESv2 \ + libutils \ libui LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes) diff --git a/opengl/tests/gl_jni/Android.mk b/opengl/tests/gl_jni/Android.mk index 80b4bac..11b4c8b 100644 --- a/opengl/tests/gl_jni/Android.mk +++ b/opengl/tests/gl_jni/Android.mk @@ -37,6 +37,7 @@ LOCAL_SRC_FILES:= \ LOCAL_SHARED_LIBRARIES := \ libutils \ + liblog \ libEGL \ libGLESv1_CM diff --git a/opengl/tests/gl_perf/Android.mk b/opengl/tests/gl_perf/Android.mk index cfca089..b0f825c 100644 --- a/opengl/tests/gl_perf/Android.mk +++ b/opengl/tests/gl_perf/Android.mk @@ -6,7 +6,8 @@ LOCAL_SRC_FILES:= \ filltest.cpp LOCAL_SHARED_LIBRARIES := \ - libcutils \ + libcutils \ + liblog \ libEGL \ libGLESv2 \ libui diff --git a/opengl/tests/gl_perfapp/Android.mk b/opengl/tests/gl_perfapp/Android.mk index 45a5516..854b54f 100644 --- a/opengl/tests/gl_perfapp/Android.mk +++ b/opengl/tests/gl_perfapp/Android.mk @@ -40,6 +40,7 @@ LOCAL_SRC_FILES:= \ LOCAL_SHARED_LIBRARIES := \ libutils \ + liblog \ libEGL \ libGLESv2 diff --git a/opengl/tests/gl_yuvtex/Android.mk b/opengl/tests/gl_yuvtex/Android.mk index 9e5dba0..e0e2c16 100644 --- a/opengl/tests/gl_yuvtex/Android.mk +++ b/opengl/tests/gl_yuvtex/Android.mk @@ -5,9 +5,10 @@ LOCAL_SRC_FILES:= \ gl_yuvtex.cpp LOCAL_SHARED_LIBRARIES := \ - libcutils \ + libcutils \ libEGL \ libGLESv1_CM \ + libutils \ libui LOCAL_C_INCLUDES += $(call include-path-for, opengl-tests-includes) diff --git a/opengl/tests/gldual/Android.mk b/opengl/tests/gldual/Android.mk index 42094c8..1991ed9 100644 --- a/opengl/tests/gldual/Android.mk +++ b/opengl/tests/gldual/Android.mk @@ -37,6 +37,7 @@ LOCAL_SRC_FILES:= \ LOCAL_SHARED_LIBRARIES := \ libutils \ + liblog \ libEGL \ libGLESv2 diff --git a/opengl/tests/hwc/Android.mk b/opengl/tests/hwc/Android.mk index 9eb58b1..2fdfcf8 100644 --- a/opengl/tests/hwc/Android.mk +++ b/opengl/tests/hwc/Android.mk @@ -39,6 +39,8 @@ LOCAL_SHARED_LIBRARIES := \ libcutils \ libEGL \ libGLESv2 \ + libutils \ + liblog \ libui \ libhardware \ @@ -70,6 +72,8 @@ LOCAL_SHARED_LIBRARIES := \ libcutils \ libEGL \ libGLESv2 \ + libutils \ + liblog \ libui \ libhardware \ @@ -99,6 +103,8 @@ LOCAL_SHARED_LIBRARIES := \ libcutils \ libEGL \ libGLESv2 \ + libutils \ + liblog \ libui \ libhardware \ @@ -128,6 +134,8 @@ LOCAL_SHARED_LIBRARIES := \ libcutils \ libEGL \ libGLESv2 \ + libutils \ + liblog \ libui \ libhardware \ diff --git a/opengl/tools/glgen/gen b/opengl/tools/glgen/gen index 3359a22..d236c1e 100755 --- a/opengl/tools/glgen/gen +++ b/opengl/tools/glgen/gen @@ -27,7 +27,7 @@ echo "package android.app; import android.content.pm.IPackageManager; public cla echo "package android.content.pm; public class ApplicationInfo {public int targetSdkVersion;}" > out/android/content/pm/ApplicationInfo.java echo "package android.content.pm; public interface IPackageManager {ApplicationInfo getApplicationInfo(java.lang.String packageName, int flags, java.lang.String userId) throws android.os.RemoteException;}" > out/android/content/pm/IPackageManager.java echo "package android.os; public class Build {public static class VERSION_CODES { public static final int CUPCAKE = 3;}; }" > out/android/os/Build.java -echo "package android.os; public class UserId {public static String myUserId() { return \"\"; } }" > out/android/os/UserId.java +echo "package android.os; public class UserHandle {public static String myUserId() { return \"\"; } }" > out/android/os/UserHandle.java echo "package android.os; public class RemoteException extends Exception {}" > out/android/os/RemoteException.java echo "package android.util; public class Log {public static void w(String a, String b) {} public static void e(String a, String b) {}}" > out/android/util/Log.java @@ -63,14 +63,19 @@ fi popd > /dev/null echo "Generating JSR239-like APIs" -java -classpath src GenerateGL -c specs/jsr239/glspec-1.0 specs/jsr239/glspec-1.0ext specs/jsr239/glspec-1.1 specs/jsr239/glspec-1.1ext specs/jsr239/glspec-1.1extpack specs/jsr239/glspec-checks +java -classpath src GenerateGL -c specs/jsr239/glspec-1.0 \ + specs/jsr239/glspec-1.0ext \ + specs/jsr239/glspec-1.1 \ + specs/jsr239/glspec-1.1ext \ + specs/jsr239/glspec-1.1extpack \ + specs/jsr239/glspec-checks JAVA_RESULT=$? if [ $JAVA_RESULT -ne 0 ]; then echo "Could not run GenerateGL." exit $JAVA_RESULT fi -echo "Generating static OpenGLES 1.1 bindings" +echo "Generating static OpenGLES bindings" java -classpath src GenerateGLES JAVA_RESULT=$? if [ $JAVA_RESULT -ne 0 ]; then @@ -78,7 +83,7 @@ if [ $JAVA_RESULT -ne 0 ]; then exit $JAVA_RESULT fi -echo "Generating static EGL 1.4 bindings" +echo "Generating static EGL bindings" java -classpath src GenerateEGL JAVA_RESULT=$? if [ $JAVA_RESULT -ne 0 ]; then @@ -90,7 +95,20 @@ rm src/*.class pushd out > /dev/null mkdir classes -javac -d classes android/opengl/EGL14.java com/google/android/gles_jni/GLImpl.java javax/microedition/khronos/opengles/GL10.java javax/microedition/khronos/opengles/GL10Ext.java javax/microedition/khronos/opengles/GL11.java javax/microedition/khronos/opengles/GL11Ext.java javax/microedition/khronos/opengles/GL11ExtensionPack.java android/opengl/GLES10.java android/opengl/GLES10Ext.java android/opengl/GLES11.java android/opengl/GLES11Ext.java android/opengl/GLES20.java +javac -d classes android/opengl/EGL14.java \ + android/opengl/EGLExt.java \ + com/google/android/gles_jni/GLImpl.java \ + javax/microedition/khronos/opengles/GL10.java \ + javax/microedition/khronos/opengles/GL10Ext.java \ + javax/microedition/khronos/opengles/GL11.java \ + javax/microedition/khronos/opengles/GL11Ext.java \ + javax/microedition/khronos/opengles/GL11ExtensionPack.java \ + android/opengl/GLES10.java \ + android/opengl/GLES10Ext.java \ + android/opengl/GLES11.java \ + android/opengl/GLES11Ext.java \ + android/opengl/GLES20.java \ + android/opengl/GLES30.java popd > /dev/null JAVA_RESULT=$? if [ $JAVA_RESULT -ne 0 ]; then @@ -137,7 +155,7 @@ do compareGenerated ../../../../base/opengl/java/javax/microedition/khronos/opengles generated/javax/microedition/khronos/opengles $x done -for x in EGL14 GLES10 GLES10Ext GLES11 GLES11Ext GLES20 +for x in EGL14 EGLExt GLES10 GLES10Ext GLES11 GLES11Ext GLES20 GLES30 do compareGenerated ../../../../base/opengl/java/android/opengl generated/android/opengl ${x}.java compareGenerated ../../../../base/core/jni generated/C android_opengl_${x}.cpp diff --git a/opengl/tools/glgen/specs/egl/EGLExt.spec b/opengl/tools/glgen/specs/egl/EGLExt.spec new file mode 100644 index 0000000..e4fc337 --- /dev/null +++ b/opengl/tools/glgen/specs/egl/EGLExt.spec @@ -0,0 +1 @@ +EGLBoolean eglPresentationTimeANDROID ( EGLDisplay dpy, EGLSurface sur, EGLnsecsANDROID time ) diff --git a/opengl/tools/glgen/specs/gles11/GLES20.spec b/opengl/tools/glgen/specs/gles11/GLES20.spec index dda746e..68d146e 100644 --- a/opengl/tools/glgen/specs/gles11/GLES20.spec +++ b/opengl/tools/glgen/specs/gles11/GLES20.spec @@ -1,144 +1,144 @@ -void glActiveTexture ( GLenum texture )
-void glAttachShader ( GLuint program, GLuint shader )
-void glBindAttribLocation ( GLuint program, GLuint index, const char *name )
-void glBindBuffer ( GLenum target, GLuint buffer )
-void glBindFramebuffer ( GLenum target, GLuint framebuffer )
-void glBindRenderbuffer ( GLenum target, GLuint renderbuffer )
-void glBindTexture ( GLenum target, GLuint texture )
-void glBlendColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
-void glBlendEquation ( GLenum mode )
-void glBlendEquationSeparate ( GLenum modeRGB, GLenum modeAlpha )
-void glBlendFunc ( GLenum sfactor, GLenum dfactor )
-void glBlendFuncSeparate ( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha )
-void glBufferData ( GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage )
-void glBufferSubData ( GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data )
-GLenum glCheckFramebufferStatus ( GLenum target )
-void glClear ( GLbitfield mask )
-void glClearColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha )
-void glClearDepthf ( GLclampf depth )
-void glClearStencil ( GLint s )
-void glColorMask ( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha )
-void glCompileShader ( GLuint shader )
-void glCompressedTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data )
-void glCompressedTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data )
-void glCopyTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border )
-void glCopyTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height )
-GLuint glCreateProgram ( void )
-GLuint glCreateShader ( GLenum type )
-void glCullFace ( GLenum mode )
-void glDeleteBuffers ( GLsizei n, const GLuint *buffers )
-void glDeleteFramebuffers ( GLsizei n, const GLuint *framebuffers )
-void glDeleteProgram ( GLuint program )
-void glDeleteRenderbuffers ( GLsizei n, const GLuint *renderbuffers )
-void glDeleteShader ( GLuint shader )
-void glDeleteTextures ( GLsizei n, const GLuint *textures )
-void glDepthFunc ( GLenum func )
-void glDepthMask ( GLboolean flag )
-void glDepthRangef ( GLclampf zNear, GLclampf zFar )
-void glDetachShader ( GLuint program, GLuint shader )
-void glDisable ( GLenum cap )
-void glDisableVertexAttribArray ( GLuint index )
-void glDrawArrays ( GLenum mode, GLint first, GLsizei count )
-void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset )
-void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices )
-void glEnable ( GLenum cap )
-void glEnableVertexAttribArray ( GLuint index )
-void glFinish ( void )
-void glFlush ( void )
-void glFramebufferRenderbuffer ( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer )
-void glFramebufferTexture2D ( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level )
-void glFrontFace ( GLenum mode )
-void glGenBuffers ( GLsizei n, GLuint *buffers )
-void glGenerateMipmap ( GLenum target )
-void glGenFramebuffers ( GLsizei n, GLuint *framebuffers )
-void glGenRenderbuffers ( GLsizei n, GLuint *renderbuffers )
-void glGenTextures ( GLsizei n, GLuint *textures )
-void glGetActiveAttrib ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name )
-void glGetActiveUniform ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name )
-void glGetAttachedShaders ( GLuint program, GLsizei maxcount, GLsizei *count, GLuint *shaders )
-GLint glGetAttribLocation ( GLuint program, const char *name )
-void glGetBooleanv ( GLenum pname, GLboolean *params )
-void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params )
-GLenum glGetError ( void )
-void glGetFloatv ( GLenum pname, GLfloat *params )
-void glGetFramebufferAttachmentParameteriv ( GLenum target, GLenum attachment, GLenum pname, GLint *params )
-void glGetIntegerv ( GLenum pname, GLint *params )
-void glGetProgramiv ( GLuint program, GLenum pname, GLint *params )
-void glGetProgramInfoLog ( GLuint program, GLsizei bufsize, GLsizei *length, char *infolog )
-void glGetRenderbufferParameteriv ( GLenum target, GLenum pname, GLint *params )
-void glGetShaderiv ( GLuint shader, GLenum pname, GLint *params )
-void glGetShaderInfoLog ( GLuint shader, GLsizei bufsize, GLsizei *length, char *infolog )
-void glGetShaderPrecisionFormat ( GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision )
-void glGetShaderSource ( GLuint shader, GLsizei bufsize, GLsizei *length, char *source )
-const GLubyte * glGetString ( GLenum name )
-void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params )
-void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params )
-void glGetUniformfv ( GLuint program, GLint location, GLfloat *params )
-void glGetUniformiv ( GLuint program, GLint location, GLint *params )
-GLint glGetUniformLocation ( GLuint program, const char *name )
-void glGetVertexAttribfv ( GLuint index, GLenum pname, GLfloat *params )
-void glGetVertexAttribiv ( GLuint index, GLenum pname, GLint *params )
-// void glGetVertexAttribPointerv ( GLuint index, GLenum pname, void **pointer )
-void glHint ( GLenum target, GLenum mode )
-GLboolean glIsBuffer ( GLuint buffer )
-GLboolean glIsEnabled ( GLenum cap )
-GLboolean glIsFramebuffer ( GLuint framebuffer )
-GLboolean glIsProgram ( GLuint program )
-GLboolean glIsRenderbuffer ( GLuint renderbuffer )
-GLboolean glIsShader ( GLuint shader )
-GLboolean glIsTexture ( GLuint texture )
-void glLineWidth ( GLfloat width )
-void glLinkProgram ( GLuint program )
-void glPixelStorei ( GLenum pname, GLint param )
-void glPolygonOffset ( GLfloat factor, GLfloat units )
-void glReadPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels )
-void glReleaseShaderCompiler ( void )
-void glRenderbufferStorage ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height )
-void glSampleCoverage ( GLclampf value, GLboolean invert )
-void glScissor ( GLint x, GLint y, GLsizei width, GLsizei height )
-void glShaderBinary ( GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length )
-void glShaderSource ( GLuint shader )
-void glStencilFunc ( GLenum func, GLint ref, GLuint mask )
-void glStencilFuncSeparate ( GLenum face, GLenum func, GLint ref, GLuint mask )
-void glStencilMask ( GLuint mask )
-void glStencilMaskSeparate ( GLenum face, GLuint mask )
-void glStencilOp ( GLenum fail, GLenum zfail, GLenum zpass )
-void glStencilOpSeparate ( GLenum face, GLenum fail, GLenum zfail, GLenum zpass )
-void glTexImage2D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels )
-void glTexParameterf ( GLenum target, GLenum pname, GLfloat param )
-void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params )
-void glTexParameteri ( GLenum target, GLenum pname, GLint param )
-void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params )
-void glTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels )
-void glUniform1f ( GLint location, GLfloat x )
-void glUniform1fv ( GLint location, GLsizei count, const GLfloat *v )
-void glUniform1i ( GLint location, GLint x )
-void glUniform1iv ( GLint location, GLsizei count, const GLint *v )
-void glUniform2f ( GLint location, GLfloat x, GLfloat y )
-void glUniform2fv ( GLint location, GLsizei count, const GLfloat *v )
-void glUniform2i ( GLint location, GLint x, GLint y )
-void glUniform2iv ( GLint location, GLsizei count, const GLint *v )
-void glUniform3f ( GLint location, GLfloat x, GLfloat y, GLfloat z )
-void glUniform3fv ( GLint location, GLsizei count, const GLfloat *v )
-void glUniform3i ( GLint location, GLint x, GLint y, GLint z )
-void glUniform3iv ( GLint location, GLsizei count, const GLint *v )
-void glUniform4f ( GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w )
-void glUniform4fv ( GLint location, GLsizei count, const GLfloat *v )
-void glUniform4i ( GLint location, GLint x, GLint y, GLint z, GLint w )
-void glUniform4iv ( GLint location, GLsizei count, const GLint *v )
-void glUniformMatrix2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
-void glUniformMatrix3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
-void glUniformMatrix4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value )
-void glUseProgram ( GLuint program )
-void glValidateProgram ( GLuint program )
-void glVertexAttrib1f ( GLuint indx, GLfloat x )
-void glVertexAttrib1fv ( GLuint indx, const GLfloat *values )
-void glVertexAttrib2f ( GLuint indx, GLfloat x, GLfloat y )
-void glVertexAttrib2fv ( GLuint indx, const GLfloat *values )
-void glVertexAttrib3f ( GLuint indx, GLfloat x, GLfloat y, GLfloat z )
-void glVertexAttrib3fv ( GLuint indx, const GLfloat *values )
-void glVertexAttrib4f ( GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w )
-void glVertexAttrib4fv ( GLuint indx, const GLfloat *values )
-void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLint offset )
-void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *ptr )
-void glViewport ( GLint x, GLint y, GLsizei width, GLsizei height )
+void glActiveTexture ( GLenum texture ) +void glAttachShader ( GLuint program, GLuint shader ) +void glBindAttribLocation ( GLuint program, GLuint index, const char *name ) +void glBindBuffer ( GLenum target, GLuint buffer ) +void glBindFramebuffer ( GLenum target, GLuint framebuffer ) +void glBindRenderbuffer ( GLenum target, GLuint renderbuffer ) +void glBindTexture ( GLenum target, GLuint texture ) +void glBlendColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) +void glBlendEquation ( GLenum mode ) +void glBlendEquationSeparate ( GLenum modeRGB, GLenum modeAlpha ) +void glBlendFunc ( GLenum sfactor, GLenum dfactor ) +void glBlendFuncSeparate ( GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha ) +void glBufferData ( GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage ) +void glBufferSubData ( GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data ) +GLenum glCheckFramebufferStatus ( GLenum target ) +void glClear ( GLbitfield mask ) +void glClearColor ( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) +void glClearDepthf ( GLclampf depth ) +void glClearStencil ( GLint s ) +void glColorMask ( GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha ) +void glCompileShader ( GLuint shader ) +void glCompressedTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data ) +void glCompressedTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data ) +void glCopyTexImage2D ( GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border ) +void glCopyTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height ) +GLuint glCreateProgram ( void ) +GLuint glCreateShader ( GLenum type ) +void glCullFace ( GLenum mode ) +void glDeleteBuffers ( GLsizei n, const GLuint *buffers ) +void glDeleteFramebuffers ( GLsizei n, const GLuint *framebuffers ) +void glDeleteProgram ( GLuint program ) +void glDeleteRenderbuffers ( GLsizei n, const GLuint *renderbuffers ) +void glDeleteShader ( GLuint shader ) +void glDeleteTextures ( GLsizei n, const GLuint *textures ) +void glDepthFunc ( GLenum func ) +void glDepthMask ( GLboolean flag ) +void glDepthRangef ( GLclampf zNear, GLclampf zFar ) +void glDetachShader ( GLuint program, GLuint shader ) +void glDisable ( GLenum cap ) +void glDisableVertexAttribArray ( GLuint index ) +void glDrawArrays ( GLenum mode, GLint first, GLsizei count ) +void glDrawElements ( GLenum mode, GLsizei count, GLenum type, GLint offset ) +void glDrawElements ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices ) +void glEnable ( GLenum cap ) +void glEnableVertexAttribArray ( GLuint index ) +void glFinish ( void ) +void glFlush ( void ) +void glFramebufferRenderbuffer ( GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer ) +void glFramebufferTexture2D ( GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level ) +void glFrontFace ( GLenum mode ) +void glGenBuffers ( GLsizei n, GLuint *buffers ) +void glGenerateMipmap ( GLenum target ) +void glGenFramebuffers ( GLsizei n, GLuint *framebuffers ) +void glGenRenderbuffers ( GLsizei n, GLuint *renderbuffers ) +void glGenTextures ( GLsizei n, GLuint *textures ) +void glGetActiveAttrib ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) +void glGetActiveUniform ( GLuint program, GLuint index, GLsizei bufsize, GLsizei *length, GLint *size, GLenum *type, char *name ) +void glGetAttachedShaders ( GLuint program, GLsizei maxcount, GLsizei *count, GLuint *shaders ) +GLint glGetAttribLocation ( GLuint program, const char *name ) +void glGetBooleanv ( GLenum pname, GLboolean *params ) +void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) +GLenum glGetError ( void ) +void glGetFloatv ( GLenum pname, GLfloat *params ) +void glGetFramebufferAttachmentParameteriv ( GLenum target, GLenum attachment, GLenum pname, GLint *params ) +void glGetIntegerv ( GLenum pname, GLint *params ) +void glGetProgramiv ( GLuint program, GLenum pname, GLint *params ) +void glGetProgramInfoLog ( GLuint program, GLsizei bufsize, GLsizei *length, char *infolog ) +void glGetRenderbufferParameteriv ( GLenum target, GLenum pname, GLint *params ) +void glGetShaderiv ( GLuint shader, GLenum pname, GLint *params ) +void glGetShaderInfoLog ( GLuint shader, GLsizei bufsize, GLsizei *length, char *infolog ) +void glGetShaderPrecisionFormat ( GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision ) +void glGetShaderSource ( GLuint shader, GLsizei bufsize, GLsizei *length, char *source ) +const GLubyte * glGetString ( GLenum name ) +void glGetTexParameterfv ( GLenum target, GLenum pname, GLfloat *params ) +void glGetTexParameteriv ( GLenum target, GLenum pname, GLint *params ) +void glGetUniformfv ( GLuint program, GLint location, GLfloat *params ) +void glGetUniformiv ( GLuint program, GLint location, GLint *params ) +GLint glGetUniformLocation ( GLuint program, const char *name ) +void glGetVertexAttribfv ( GLuint index, GLenum pname, GLfloat *params ) +void glGetVertexAttribiv ( GLuint index, GLenum pname, GLint *params ) +// void glGetVertexAttribPointerv ( GLuint index, GLenum pname, void **pointer ) +void glHint ( GLenum target, GLenum mode ) +GLboolean glIsBuffer ( GLuint buffer ) +GLboolean glIsEnabled ( GLenum cap ) +GLboolean glIsFramebuffer ( GLuint framebuffer ) +GLboolean glIsProgram ( GLuint program ) +GLboolean glIsRenderbuffer ( GLuint renderbuffer ) +GLboolean glIsShader ( GLuint shader ) +GLboolean glIsTexture ( GLuint texture ) +void glLineWidth ( GLfloat width ) +void glLinkProgram ( GLuint program ) +void glPixelStorei ( GLenum pname, GLint param ) +void glPolygonOffset ( GLfloat factor, GLfloat units ) +void glReadPixels ( GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels ) +void glReleaseShaderCompiler ( void ) +void glRenderbufferStorage ( GLenum target, GLenum internalformat, GLsizei width, GLsizei height ) +void glSampleCoverage ( GLclampf value, GLboolean invert ) +void glScissor ( GLint x, GLint y, GLsizei width, GLsizei height ) +void glShaderBinary ( GLsizei n, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length ) +void glShaderSource ( GLuint shader ) +void glStencilFunc ( GLenum func, GLint ref, GLuint mask ) +void glStencilFuncSeparate ( GLenum face, GLenum func, GLint ref, GLuint mask ) +void glStencilMask ( GLuint mask ) +void glStencilMaskSeparate ( GLenum face, GLuint mask ) +void glStencilOp ( GLenum fail, GLenum zfail, GLenum zpass ) +void glStencilOpSeparate ( GLenum face, GLenum fail, GLenum zfail, GLenum zpass ) +void glTexImage2D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) +void glTexParameterf ( GLenum target, GLenum pname, GLfloat param ) +void glTexParameterfv ( GLenum target, GLenum pname, const GLfloat *params ) +void glTexParameteri ( GLenum target, GLenum pname, GLint param ) +void glTexParameteriv ( GLenum target, GLenum pname, const GLint *params ) +void glTexSubImage2D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels ) +void glUniform1f ( GLint location, GLfloat x ) +void glUniform1fv ( GLint location, GLsizei count, const GLfloat *v ) +void glUniform1i ( GLint location, GLint x ) +void glUniform1iv ( GLint location, GLsizei count, const GLint *v ) +void glUniform2f ( GLint location, GLfloat x, GLfloat y ) +void glUniform2fv ( GLint location, GLsizei count, const GLfloat *v ) +void glUniform2i ( GLint location, GLint x, GLint y ) +void glUniform2iv ( GLint location, GLsizei count, const GLint *v ) +void glUniform3f ( GLint location, GLfloat x, GLfloat y, GLfloat z ) +void glUniform3fv ( GLint location, GLsizei count, const GLfloat *v ) +void glUniform3i ( GLint location, GLint x, GLint y, GLint z ) +void glUniform3iv ( GLint location, GLsizei count, const GLint *v ) +void glUniform4f ( GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) +void glUniform4fv ( GLint location, GLsizei count, const GLfloat *v ) +void glUniform4i ( GLint location, GLint x, GLint y, GLint z, GLint w ) +void glUniform4iv ( GLint location, GLsizei count, const GLint *v ) +void glUniformMatrix2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) +void glUniformMatrix3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) +void glUniformMatrix4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) +void glUseProgram ( GLuint program ) +void glValidateProgram ( GLuint program ) +void glVertexAttrib1f ( GLuint indx, GLfloat x ) +void glVertexAttrib1fv ( GLuint indx, const GLfloat *values ) +void glVertexAttrib2f ( GLuint indx, GLfloat x, GLfloat y ) +void glVertexAttrib2fv ( GLuint indx, const GLfloat *values ) +void glVertexAttrib3f ( GLuint indx, GLfloat x, GLfloat y, GLfloat z ) +void glVertexAttrib3fv ( GLuint indx, const GLfloat *values ) +void glVertexAttrib4f ( GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w ) +void glVertexAttrib4fv ( GLuint indx, const GLfloat *values ) +void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLint offset ) +void glVertexAttribPointer ( GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *ptr ) +void glViewport ( GLint x, GLint y, GLsizei width, GLsizei height ) diff --git a/opengl/tools/glgen/specs/gles11/GLES30.spec b/opengl/tools/glgen/specs/gles11/GLES30.spec new file mode 100644 index 0000000..a426eb0 --- /dev/null +++ b/opengl/tools/glgen/specs/gles11/GLES30.spec @@ -0,0 +1,110 @@ +void glReadBuffer ( GLenum mode ) +void glDrawRangeElements ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices ) +void glDrawRangeElements ( GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, GLsizei offset ) +void glTexImage3D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels ) +void glTexImage3D ( GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, GLsizei offset ) +void glTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels ) +void glTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei offset ) +void glCopyTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height ) +void glCompressedTexImage3D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data ) +void glCompressedTexImage3D ( GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLsizei offset ) +void glCompressedTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data ) +void glCompressedTexSubImage3D ( GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLsizei offset ) +void glGenQueries ( GLsizei n, GLuint *ids ) +void glDeleteQueries ( GLsizei n, const GLuint *ids ) +GLboolean glIsQuery ( GLuint id ) +void glBeginQuery ( GLenum target, GLuint id ) +void glEndQuery ( GLenum target ) +void glGetQueryiv ( GLenum target, GLenum pname, GLint *params ) +void glGetQueryObjectuiv ( GLuint id, GLenum pname, GLuint *params ) +GLboolean glUnmapBuffer ( GLenum target ) +void glGetBufferPointerv ( GLenum target, GLenum pname, GLvoid **params ) +void glDrawBuffers ( GLsizei n, const GLenum *bufs ) +void glUniformMatrix2x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) +void glUniformMatrix3x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) +void glUniformMatrix2x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) +void glUniformMatrix4x2fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) +void glUniformMatrix3x4fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) +void glUniformMatrix4x3fv ( GLint location, GLsizei count, GLboolean transpose, const GLfloat *value ) +void glBlitFramebuffer ( GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter ) +void glRenderbufferStorageMultisample ( GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height ) +void glFramebufferTextureLayer ( GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer ) +GLvoid * glMapBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access ) +void glFlushMappedBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length ) +void glBindVertexArray ( GLuint array ) +void glDeleteVertexArrays ( GLsizei n, const GLuint *arrays ) +void glGenVertexArrays ( GLsizei n, GLuint *arrays ) +GLboolean glIsVertexArray ( GLuint array ) +void glGetIntegeri_v ( GLenum target, GLuint index, GLint *data ) +void glBeginTransformFeedback ( GLenum primitiveMode ) +void glEndTransformFeedback ( void ) +void glBindBufferRange ( GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size ) +void glBindBufferBase ( GLenum target, GLuint index, GLuint buffer ) +void glTransformFeedbackVaryings ( GLuint program, GLsizei count, const GLchar *varyings, GLenum bufferMode ) +void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name ) +void glVertexAttribIPointer ( GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer ) +void glVertexAttribIPointer ( GLuint index, GLint size, GLenum type, GLsizei stride, GLsizei offset ) +void glGetVertexAttribIiv ( GLuint index, GLenum pname, GLint *params ) +void glGetVertexAttribIuiv ( GLuint index, GLenum pname, GLuint *params ) +void glVertexAttribI4i ( GLuint index, GLint x, GLint y, GLint z, GLint w ) +void glVertexAttribI4ui ( GLuint index, GLuint x, GLuint y, GLuint z, GLuint w ) +void glVertexAttribI4iv ( GLuint index, const GLint *v ) +void glVertexAttribI4uiv ( GLuint index, const GLuint *v ) +void glGetUniformuiv ( GLuint program, GLint location, GLuint *params ) +GLint glGetFragDataLocation ( GLuint program, const GLchar *name ) +void glUniform1ui ( GLint location, GLuint v0 ) +void glUniform2ui ( GLint location, GLuint v0, GLuint v1 ) +void glUniform3ui ( GLint location, GLuint v0, GLuint v1, GLuint v2 ) +void glUniform4ui ( GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3 ) +void glUniform1uiv ( GLint location, GLsizei count, const GLuint *value ) +void glUniform2uiv ( GLint location, GLsizei count, const GLuint *value ) +void glUniform3uiv ( GLint location, GLsizei count, const GLuint *value ) +void glUniform4uiv ( GLint location, GLsizei count, const GLuint *value ) +void glClearBufferiv ( GLenum buffer, GLint drawbuffer, const GLint *value ) +void glClearBufferuiv ( GLenum buffer, GLint drawbuffer, const GLuint *value ) +void glClearBufferfv ( GLenum buffer, GLint drawbuffer, const GLfloat *value ) +void glClearBufferfi ( GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil ) +const GLubyte * glGetStringi ( GLenum name, GLuint index ) +void glCopyBufferSubData ( GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size ) +void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices ) +void glGetActiveUniformsiv ( GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params ) +GLuint glGetUniformBlockIndex ( GLuint program, const GLchar *uniformBlockName ) +void glGetActiveUniformBlockiv ( GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params ) +void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName ) +void glUniformBlockBinding ( GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding ) +void glDrawArraysInstanced ( GLenum mode, GLint first, GLsizei count, GLsizei instanceCount ) +void glDrawElementsInstanced ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instanceCount ) +GLsync glFenceSync ( GLenum condition, GLbitfield flags ) +GLboolean glIsSync ( GLsync sync ) +void glDeleteSync ( GLsync sync ) +GLenum glClientWaitSync ( GLsync sync, GLbitfield flags, GLuint64 timeout ) +void glWaitSync ( GLsync sync, GLbitfield flags, GLuint64 timeout ) +void glGetInteger64v ( GLenum pname, GLint64 *params ) +void glGetSynciv ( GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values ) +void glGetInteger64i_v ( GLenum target, GLuint index, GLint64 *data ) +void glGetBufferParameteri64v ( GLenum target, GLenum pname, GLint64 *params ) +void glGenSamplers ( GLsizei count, GLuint *samplers ) +void glDeleteSamplers ( GLsizei count, const GLuint *samplers ) +GLboolean glIsSampler ( GLuint sampler ) +void glBindSampler ( GLuint unit, GLuint sampler ) +void glSamplerParameteri ( GLuint sampler, GLenum pname, GLint param ) +void glSamplerParameteriv ( GLuint sampler, GLenum pname, const GLint *param ) +void glSamplerParameterf ( GLuint sampler, GLenum pname, GLfloat param ) +void glSamplerParameterfv ( GLuint sampler, GLenum pname, const GLfloat *param ) +void glGetSamplerParameteriv ( GLuint sampler, GLenum pname, GLint *params ) +void glGetSamplerParameterfv ( GLuint sampler, GLenum pname, GLfloat *params ) +void glVertexAttribDivisor ( GLuint index, GLuint divisor ) +void glBindTransformFeedback ( GLenum target, GLuint id ) +void glDeleteTransformFeedbacks ( GLsizei n, const GLuint *ids ) +void glGenTransformFeedbacks ( GLsizei n, GLuint *ids ) +GLboolean glIsTransformFeedback ( GLuint id ) +void glPauseTransformFeedback ( void ) +void glResumeTransformFeedback ( void ) +void glGetProgramBinary ( GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary ) +void glProgramBinary ( GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length ) +void glProgramParameteri ( GLuint program, GLenum pname, GLint value ) +void glInvalidateFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments ) +void glInvalidateSubFramebuffer ( GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height ) +void glTexStorage2D ( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height ) +void glTexStorage3D ( GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth ) +void glGetInternalformativ ( GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params ) diff --git a/opengl/tools/glgen/specs/gles11/checks.spec b/opengl/tools/glgen/specs/gles11/checks.spec index f478a32..9eb0070 100644 --- a/opengl/tools/glgen/specs/gles11/checks.spec +++ b/opengl/tools/glgen/specs/gles11/checks.spec @@ -1,42 +1,99 @@ +# Copyright (C) 2013 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. +# + +# +# ifcheck defaults to 1 so we don't explicitly list pnames requiring +# a single value. unknown pnames will be validated against one value, which +# is not perfect but better than nothing. +# + +glBufferData nullAllowed check data size +glBufferSubData check data size +# glCompressedTexImage2D +# glCompressedTexSubImage2D glClipPlanef check eqn 4 glClipPlanex check eqn 4 -glGetClipPlanefOES check eqn 4 -glGetClipPlanexOES check eqn 4 glDeleteBuffers check buffers n +glDeleteFramebuffers check framebuffers n +glDeleteFramebuffersOES check framebuffers n +glDeleteRenderbuffers check renderbuffers n +glDeleteRenderbuffersOES check renderbuffers n glDeleteTextures check textures n glDrawElements check_AIOOBE indices count -glFog ifcheck params 1 pname GL_FOG_MODE,GL_FOG_DENSITY,GL_FOG_START,GL_FOG_END ifcheck params 4 pname GL_FOG_COLOR -glGenBuffers check buffers n -glGenTextures check textures n -glGetClipPlane check eqn 4 -glGetIntegerv ifcheck params 1 pname GL_ALPHA_BITS,GL_ALPHA_TEST_FUNC,GL_ALPHA_TEST_REF,GL_BLEND_DST,GL_BLUE_BITS,GL_COLOR_ARRAY_BUFFER_BINDING,GL_COLOR_ARRAY_SIZE,GL_COLOR_ARRAY_STRIDE,GL_COLOR_ARRAY_TYPE,GL_CULL_FACE,GL_DEPTH_BITS,GL_DEPTH_CLEAR_VALUE,GL_DEPTH_FUNC,GL_DEPTH_WRITEMASK,GL_FOG_DENSITY,GL_FOG_END,GL_FOG_MODE,GL_FOG_START,GL_FRONT_FACE,GL_GREEN_BITS,GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES,GL_IMPLEMENTATION_COLOR_READ_TYPE_OES,GL_LIGHT_MODEL_COLOR_CONTROL,GL_LIGHT_MODEL_LOCAL_VIEWER,GL_LIGHT_MODEL_TWO_SIDE,GL_LINE_SMOOTH_HINT,GL_LINE_WIDTH,GL_LOGIC_OP_MODE,GL_MATRIX_INDEX_ARRAY_BUFFER_BINDING_OES,GL_MATRIX_INDEX_ARRAY_SIZE_OES,GL_MATRIX_INDEX_ARRAY_STRIDE_OES,GL_MATRIX_INDEX_ARRAY_TYPE_OES,GL_MATRIX_MODE,GL_MAX_CLIP_PLANES,GL_MAX_ELEMENTS_INDICES,GL_MAX_ELEMENTS_VERTICES,GL_MAX_LIGHTS,GL_MAX_MODELVIEW_STACK_DEPTH,GL_MAX_PALETTE_MATRICES_OES,GL_MAX_PROJECTION_STACK_DEPTH,GL_MAX_TEXTURE_SIZE,GL_MAX_TEXTURE_STACK_DEPTH,GL_MAX_TEXTURE_UNITS,GL_MAX_VERTEX_UNITS_OES,GL_MODELVIEW_STACK_DEPTH,GL_NORMAL_ARRAY_BUFFER_BINDING,GL_NORMAL_ARRAY_STRIDE,GL_NORMAL_ARRAY_TYPE,GL_NUM_COMPRESSED_TEXTURE_FORMATS,GL_PACK_ALIGNMENT,GL_PERSPECTIVE_CORRECTION_HINT,GL_POINT_SIZE,GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES,GL_POINT_SIZE_ARRAY_STRIDE_OES,GL_POINT_SIZE_ARRAY_TYPE_OES,GL_POINT_SMOOTH_HINT,GL_POLYGON_OFFSET_FACTOR,GL_POLYGON_OFFSET_UNITS,GL_PROJECTION_STACK_DEPTH,GL_RED_BITS,GL_SHADE_MODEL,GL_STENCIL_BITS,GL_STENCIL_CLEAR_VALUE,GL_STENCIL_FAIL,GL_STENCIL_FUNC,GL_STENCIL_PASS_DEPTH_FAIL,GL_STENCIL_PASS_DEPTH_PASS,GL_STENCIL_REF,GL_STENCIL_VALUE_MASK,GL_STENCIL_WRITEMASK,GL_SUBPIXEL_BITS,GL_TEXTURE_BINDING_2D,GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING,GL_TEXTURE_COORD_ARRAY_SIZE,GL_TEXTURE_COORD_ARRAY_STRIDE,GL_TEXTURE_COORD_ARRAY_TYPE,GL_TEXTURE_STACK_DEPTH,GL_UNPACK_ALIGNMENT,GL_VERTEX_ARRAY_BUFFER_BINDING,GL_VERTEX_ARRAY_SIZE,GL_VERTEX_ARRAY_STRIDE,GL_VERTEX_ARRAY_TYPE,GL_WEIGHT_ARRAY_BUFFER_BINDING_OES,GL_WEIGHT_ARRAY_SIZE_OES,GL_WEIGHT_ARRAY_STRIDE_OES,GL_WEIGHT_ARRAY_TYPE_OES ifcheck params 2 pname GL_ALIASED_POINT_SIZE_RANGE,GL_ALIASED_LINE_WIDTH_RANGE,GL_DEPTH_RANGE,GL_MAX_VIEWPORT_DIMS,GL_SMOOTH_LINE_WIDTH_RANGE,GL_SMOOTH_POINT_SIZE_RANGE ifcheck params 4 pname GL_COLOR_CLEAR_VALUE,GL_COLOR_WRITEMASK,GL_FOG_COLOR,GL_LIGHT_MODEL_AMBIENT,GL_SCISSOR_BOX,GL_VIEWPORT ifcheck params 16 pname GL_MODELVIEW_MATRIX,GL_MODELVIEW_MATRIX_FLOAT_AS_INT_BITS_OES,GL_PROJECTION_MATRIX,GL_PROJECTION_MATRIX_FLOAT_AS_INT_BITS_OES,GL_TEXTURE_MATRIX,GL_TEXTURE_MATRIX_FLOAT_AS_INT_BITS_OES ifcheck params getNumCompressedTextureFormats() pname GL_COMPRESSED_TEXTURE_FORMATS -glGetLight ifcheck params 1 pname GL_SPOT_EXPONENT,GL_SPOT_CUTOFF,GL_CONSTANT_ATTENUATION,GL_LINEAR_ATTENUATION,GL_QUADRATIC_ATTENUATION ifcheck params 3 pname GL_SPOT_DIRECTION ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION -glGetMaterial ifcheck params 1 pname GL_SHININESS ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION,GL_AMBIENT_AND_DIFFUSE -glGetTexEnv ifcheck params 1 pname GL_TEXTURE_ENV_MODE,GL_COMBINE_RGB,GL_COMBINE_ALPHA ifcheck params 4 pname GL_TEXTURE_ENV_COLOR -glGetTexParameter check params 1 -glLightModel ifcheck params 1 pname GL_LIGHT_MODEL_TWO_SIDE ifcheck params 4 pname GL_LIGHT_MODEL_AMBIENT -glLight ifcheck params 1 pname GL_SPOT_EXPONENT,GL_SPOT_CUTOFF,GL_CONSTANT_ATTENUATION,GL_LINEAR_ATTENUATION,GL_QUADRATIC_ATTENUATION ifcheck params 3 pname GL_SPOT_DIRECTION ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION -glLoadMatrix check m 16 -glMaterial ifcheck params 1 pname GL_SHININESS ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION,GL_AMBIENT_AND_DIFFUSE -glMultMatrix check m 16 -glPointParameter check params 1 -glTexEnv ifcheck params 1 pname GL_TEXTURE_ENV_MODE,GL_COMBINE_RGB,GL_COMBINE_ALPHA ifcheck params 4 pname GL_TEXTURE_ENV_COLOR -glTexImage2D nullAllowed -glTexSubImage2D nullAllowed -glBufferData nullAllowed check data size -glBufferSubData check data size -glTexParameter check params 1 -glQueryMatrixxOES check mantissa 16 check exponent 16 return -1 glDrawTexfvOES check coords 5 glDrawTexivOES check coords 5 glDrawTexsvOES check coords 5 glDrawTexxvOES check coords 5 -glDeleteFramebuffersOES check framebuffers n -glDeleteRenderbuffersOES check renderbuffers n +glFog ifcheck params 4 pname GL_FOG_COLOR +glGenBuffers check buffers n glGenFramebuffersOES check framebuffers n +glGenFramebuffers check framebuffers n glGenRenderbuffersOES check renderbuffers n +glGenRenderbuffers check renderbuffers n +glGenTextures check textures n +// glGetActiveAttrib +// glGetActiveUniform +glGetAttachedShaders nullAllowed check count 1 check shaders maxcount +// glGetBooleanv glGetBufferParameter check params 1 +glGetClipPlanef check eqn 4 +glGetClipPlanex check eqn 4 +glGetClipPlanefOES check eqn 4 +glGetClipPlanexOES check eqn 4 +// glGetFloatv glGetFramebufferAttachmentParameterivOES check params 1 +// glGetIntegerv +glGetLight ifcheck params 3 pname GL_SPOT_DIRECTION ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION +glGetMaterial ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION,GL_AMBIENT_AND_DIFFUSE +// glGetProgramInfoLog +glGetProgramiv check params 1 +glGetRenderbufferParameteriv check params 1 glGetRenderbufferParameterivOES check params 1 -glGetTexGen ifcheck params 1 pname GL_TEXTURE_GEN_MODE ifcheck params 4 pname GL_OBJECT_PLANE,GL_EYE_PLANE - +// glGetShaderInfoLog +glGetShaderiv check params 1 +glGetShaderPrecisionFormat check range 1 check precision 1 +// glGetShaderSource +// glGetString +glGetTexEnv ifcheck params 4 pname GL_TEXTURE_ENV_COLOR +glGetTexGen ifcheck params 4 pname GL_OBJECT_PLANE,GL_EYE_PLANE +glGetTexParameter check params 1 +glGetUniform check params 1 +glGetVertexAttrib ifcheck params 4 pname GL_CURRENT_VERTEX_ATTRIB +glLight ifcheck params 3 pname GL_SPOT_DIRECTION ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION +glLightModel ifcheck params 4 pname GL_LIGHT_MODEL_AMBIENT +glLoadMatrix check m 16 +glMaterial ifcheck params 4 pname GL_AMBIENT,GL_DIFFUSE,GL_SPECULAR,GL_EMISSION,GL_AMBIENT_AND_DIFFUSE +glMultMatrix check m 16 +glPointParameter check params 1 +glQueryMatrixxOES check mantissa 16 check exponent 16 return -1 +# glReadPixels +glShaderBinary check binary length +// glShaderSource +glTexEnv ifcheck params 4 pname GL_TEXTURE_ENV_COLOR +glTexImage2D nullAllowed +glTexParameter check params 1 +glTexSubImage2D nullAllowed +glUniform1 check v count +glUniform2 check v count*2 +glUniform3 check v count*3 +glUniform4 check v count*4 +glUniformMatrix2 check value count*4 +glUniformMatrix3 check value count*9 +glUniformMatrix4 check value count*16 +glVertexAttrib1 check values 1 +glVertexAttrib2 check values 2 +glVertexAttrib3 check values 3 +glVertexAttrib4 check values 4 +# glVertexAttribPointer diff --git a/opengl/tools/glgen/src/CType.java b/opengl/tools/glgen/src/CType.java index 92950ea..aba98af 100644 --- a/opengl/tools/glgen/src/CType.java +++ b/opengl/tools/glgen/src/CType.java @@ -70,7 +70,8 @@ public class CType { } public boolean isConstCharPointer() { - return isConst && isPointer && baseType.equals("char"); + return isConst && isPointer && + (baseType.equals("char") || baseType.equals("GLchar")); } public boolean isTypedPointer() { diff --git a/opengl/tools/glgen/src/GenerateEGL.java b/opengl/tools/glgen/src/GenerateEGL.java index aaa748c..2ef3970 100644 --- a/opengl/tools/glgen/src/GenerateEGL.java +++ b/opengl/tools/glgen/src/GenerateEGL.java @@ -84,26 +84,26 @@ public class GenerateEGL { ParameterChecker checker = new ParameterChecker(checksReader); - BufferedReader specReader = - new BufferedReader(new FileReader("specs/egl/EGL14.spec")); - - String egljFilename = "android/opengl/EGL14.java"; - String eglcFilename = "android_opengl_EGL14.cpp"; - PrintStream egljStream = - new PrintStream(new FileOutputStream("out/" + egljFilename)); - PrintStream eglcStream = - new PrintStream(new FileOutputStream("out/" + eglcFilename)); - egljStream.println("/*"); - eglcStream.println("/*"); - copy("stubs/egl/EGL14Header.java-if", egljStream); - copy("stubs/egl/EGL14cHeader.cpp", eglcStream); - EGLCodeEmitter emitter = new EGLCodeEmitter( - "android/opengl/EGL14", - checker, egljStream, eglcStream); - emit(emitter, specReader, egljStream, eglcStream); - emitter.emitNativeRegistration("register_android_opengl_jni_EGL14"); - egljStream.println("}"); - egljStream.close(); - eglcStream.close(); + for(String suffix: new String[] {"EGL14", "EGLExt"}) { + BufferedReader specReader = new BufferedReader(new FileReader( + "specs/egl/" + suffix + ".spec")); + String egljFilename = "android/opengl/" + suffix + ".java"; + String eglcFilename = "android_opengl_" + suffix + ".cpp"; + PrintStream egljStream = + new PrintStream(new FileOutputStream("out/" + egljFilename)); + PrintStream eglcStream = + new PrintStream(new FileOutputStream("out/" + eglcFilename)); + copy("stubs/egl/" + suffix + "Header.java-if", egljStream); + copy("stubs/egl/" + suffix + "cHeader.cpp", eglcStream); + EGLCodeEmitter emitter = new EGLCodeEmitter( + "android/opengl/" + suffix, + checker, egljStream, eglcStream); + emit(emitter, specReader, egljStream, eglcStream); + emitter.emitNativeRegistration( + "register_android_opengl_jni_" + suffix); + egljStream.println("}"); + egljStream.close(); + eglcStream.close(); + } } } diff --git a/opengl/tools/glgen/src/GenerateGLES.java b/opengl/tools/glgen/src/GenerateGLES.java index 6468957..c99c45d 100644 --- a/opengl/tools/glgen/src/GenerateGLES.java +++ b/opengl/tools/glgen/src/GenerateGLES.java @@ -42,7 +42,6 @@ public class GenerateGLES { } CFunc cfunc = CFunc.parseCFunc(s); - String fname = cfunc.getName(); String stubRoot = "stubs/gles11/" + fname; String javaPath = stubRoot + ".java"; @@ -85,7 +84,7 @@ public class GenerateGLES { // Generate files for(String suffix: new String[] {"GLES10", "GLES10Ext", - "GLES11", "GLES11Ext", "GLES20"}) + "GLES11", "GLES11Ext", "GLES20", "GLES30"}) { BufferedReader spec11Reader = new BufferedReader(new FileReader("specs/gles11/" @@ -96,10 +95,9 @@ public class GenerateGLES { new PrintStream(new FileOutputStream("out/" + gl11Filename)); PrintStream gl11cStream = new PrintStream(new FileOutputStream("out/" + gl11cFilename)); - gl11Stream.println("/*"); - gl11cStream.println("/*"); copy("stubs/gles11/" + suffix + "Header.java-if", gl11Stream); copy("stubs/gles11/" + suffix + "cHeader.cpp", gl11cStream); + copy("stubs/gles11/common.cpp", gl11cStream); GLESCodeEmitter emitter = new GLESCodeEmitter( "android/opengl/" + suffix, checker, gl11Stream, gl11cStream); diff --git a/opengl/tools/glgen/src/JType.java b/opengl/tools/glgen/src/JType.java index 3f7cb73..b10e7e2 100644 --- a/opengl/tools/glgen/src/JType.java +++ b/opengl/tools/glgen/src/JType.java @@ -46,7 +46,10 @@ public class JType { typeMapping.put(new CType("GLubyte", true, true), new JType("String", false, false)); typeMapping.put(new CType("char", false, true), new JType("byte")); typeMapping.put(new CType("char", true, true), new JType("String", false, false)); + typeMapping.put(new CType("GLchar", true, true), new JType("String", false, false)); typeMapping.put(new CType("int"), new JType("int")); + typeMapping.put(new CType("GLuint64"), new JType("long")); + typeMapping.put(new CType("GLsync"), new JType("long")); // EGL primitive types typeMapping.put(new CType("EGLint"), new JType("int")); @@ -56,6 +59,7 @@ public class JType { typeMapping.put(new CType("EGLNativeWindowType"), new JType("int")); typeMapping.put(new CType("EGLNativeDisplayType"), new JType("int")); typeMapping.put(new CType("EGLClientBuffer"), new JType("int")); + typeMapping.put(new CType("EGLnsecsANDROID"), new JType("long")); // EGL nonprimitive types typeMapping.put(new CType("EGLConfig"), new JType("EGLConfig", true, false)); @@ -79,6 +83,8 @@ public class JType { new JType("java.nio.IntBuffer", true, false)); typeMapping.put(new CType("GLenum", false, true), new JType("java.nio.IntBuffer", true, false)); + typeMapping.put(new CType("GLenum", true, true), + new JType("java.nio.IntBuffer", true, false)); typeMapping.put(new CType("GLfixed", false, true), new JType("java.nio.IntBuffer", true, false)); typeMapping.put(new CType("GLfixed", true, true), @@ -99,6 +105,8 @@ public class JType { new JType("java.nio.IntBuffer", true, false)); typeMapping.put(new CType("GLshort", true, true), new JType("java.nio.ShortBuffer", true, false)); + typeMapping.put(new CType("GLint64", false, true), + new JType("java.nio.LongBuffer", true, false)); // Typed pointers map to arrays + offsets arrayTypeMapping.put(new CType("char", false, true), @@ -106,6 +114,7 @@ public class JType { arrayTypeMapping.put(new CType("GLboolean", false, true), new JType("boolean", false, true)); arrayTypeMapping.put(new CType("GLenum", false, true), new JType("int", false, true)); + arrayTypeMapping.put(new CType("GLenum", true, true), new JType("int", false, true)); arrayTypeMapping.put(new CType("GLfixed", true, true), new JType("int", false, true)); arrayTypeMapping.put(new CType("GLfixed", false, true), new JType("int", false, true)); arrayTypeMapping.put(new CType("GLfloat", false, true), new JType("float", false, true)); @@ -119,6 +128,7 @@ public class JType { arrayTypeMapping.put(new CType("GLuint", true, true), new JType("int", false, true)); arrayTypeMapping.put(new CType("GLintptr"), new JType("int", false, true)); arrayTypeMapping.put(new CType("GLsizeiptr"), new JType("int", false, true)); + arrayTypeMapping.put(new CType("GLint64", false, true), new JType("long", false, true)); //EGL typed pointers map to arrays + offsets arrayTypeMapping.put(new CType("EGLint", false, true), new JType("int", false, true)); diff --git a/opengl/tools/glgen/src/JniCodeEmitter.java b/opengl/tools/glgen/src/JniCodeEmitter.java index 774f40c..d5e2d34 100644 --- a/opengl/tools/glgen/src/JniCodeEmitter.java +++ b/opengl/tools/glgen/src/JniCodeEmitter.java @@ -54,7 +54,7 @@ public class JniCodeEmitter { } else if (baseType.equals("short")) { jniName += "S"; } else if (baseType.equals("long")) { - jniName += "L"; + jniName += "J"; } else if (baseType.equals("byte")) { jniName += "B"; } else if (baseType.equals("String")) { @@ -197,30 +197,30 @@ public class JniCodeEmitter { void printIfcheckPostamble(PrintStream out, boolean isBuffer, boolean emitExceptionCheck, String iii) { - printIfcheckPostamble(out, isBuffer, emitExceptionCheck, - "offset", "_remaining", iii); - } + printIfcheckPostamble(out, isBuffer, emitExceptionCheck, + "offset", "_remaining", iii); + } void printIfcheckPostamble(PrintStream out, boolean isBuffer, boolean emitExceptionCheck, String offset, String remaining, String iii) { - out.println(iii + " default:"); - out.println(iii + " _needed = 0;"); - out.println(iii + " break;"); - out.println(iii + "}"); - - out.println(iii + "if (" + remaining + " < _needed) {"); - out.println(iii + indent + "_exception = 1;"); - out.println(iii + indent + - "_exceptionType = \"java/lang/IllegalArgumentException\";"); - out.println(iii + indent + - "_exceptionMessage = \"" + - (isBuffer ? "remaining()" : "length - " + offset) + - " < needed\";"); - out.println(iii + indent + "goto exit;"); - out.println(iii + "}"); - - needsExit = true; - } + out.println(iii + " default:"); + out.println(iii + " _needed = 1;"); + out.println(iii + " break;"); + out.println(iii + "}"); + + out.println(iii + "if (" + remaining + " < _needed) {"); + out.println(iii + indent + "_exception = 1;"); + out.println(iii + indent + + "_exceptionType = \"java/lang/IllegalArgumentException\";"); + out.println(iii + indent + + "_exceptionMessage = \"" + + (isBuffer ? "remaining()" : "length - " + offset) + + " < needed\";"); + out.println(iii + indent + "goto exit;"); + out.println(iii + "}"); + + needsExit = true; + } boolean isNullAllowed(CFunc cfunc) { String[] checks = mChecker.getChecks(cfunc.getName()); @@ -749,10 +749,20 @@ public class JniCodeEmitter { String outName = "android_" + jfunc.getName(); boolean isPointerFunc = isPointerFunc(jfunc); - boolean isVBOPointerFunc = (outName.endsWith("Pointer") || - outName.endsWith("PointerOES") || - outName.endsWith("DrawElements") || outName.endsWith("VertexAttribPointer")) && - !jfunc.getCFunc().hasPointerArg(); + boolean isPointerOffsetFunc = + (outName.endsWith("Pointer") || outName.endsWith("PointerOES") || + outName.endsWith("glDrawElements") || + outName.endsWith("glDrawRangeElements") || + outName.endsWith("glTexImage2D") || + outName.endsWith("glTexSubImage2D") || + outName.endsWith("glCompressedTexImage2D") || + outName.endsWith("glCompressedTexSubImage2D") || + outName.endsWith("glTexImage3D") || + outName.endsWith("glTexSubImage3D") || + outName.endsWith("glCompressedTexImage3D") || + outName.endsWith("glCompressedTexSubImage3D") || + outName.endsWith("glReadPixels")) + && !jfunc.getCFunc().hasPointerArg(); if (isPointerFunc) { outName += "Bounds"; } @@ -932,8 +942,8 @@ public class JniCodeEmitter { // Emit an _exeption variable if there will be error checks if (emitExceptionCheck) { out.println(indent + "jint _exception = 0;"); - out.println(indent + "const char * _exceptionType;"); - out.println(indent + "const char * _exceptionMessage;"); + out.println(indent + "const char * _exceptionType = NULL;"); + out.println(indent + "const char * _exceptionMessage = NULL;"); } // Emit a single _array or multiple _XXXArray variables @@ -1271,8 +1281,8 @@ public class JniCodeEmitter { } for (int i = 0; i < numArgs; i++) { String typecast; - if (i == numArgs - 1 && isVBOPointerFunc) { - typecast = "(const GLvoid *)"; + if (i == numArgs - 1 && isPointerOffsetFunc) { + typecast = "(GLvoid *)"; } else { typecast = "(" + cfunc.getArgType(i).getDeclaration() + ")"; } @@ -1421,7 +1431,8 @@ public class JniCodeEmitter { "return toEGLHandle(_env, " + baseType + "Class, " + baseType + "Constructor, _returnValue);"); } else { - out.println(indent + "return _returnValue;"); + out.println(indent + "return (" + + getJniType(jfunc.getType()) + ")_returnValue;"); } } diff --git a/opengl/tools/glgen/src/ParameterChecker.java b/opengl/tools/glgen/src/ParameterChecker.java index bff6d86..fbc47fb 100644 --- a/opengl/tools/glgen/src/ParameterChecker.java +++ b/opengl/tools/glgen/src/ParameterChecker.java @@ -22,8 +22,21 @@ public class ParameterChecker { HashMap<String,String[]> map = new HashMap<String,String[]>(); public ParameterChecker(BufferedReader reader) throws Exception { - String s; - while ((s = reader.readLine()) != null) { + String line; + while ((line = reader.readLine()) != null) { + String s = line.trim(); + + // skip empty lines + if (s.isEmpty()) { + continue; + } + + // skip single-line comments + if (s.startsWith("//") || + s.startsWith("#")) { + continue; + } + String[] tokens = s.split("\\s"); map.put(tokens[0], tokens); } diff --git a/opengl/tools/glgen/stubs/egl/EGL14Header.java-if b/opengl/tools/glgen/stubs/egl/EGL14Header.java-if index 0c29d5c..f3bf220 100644 --- a/opengl/tools/glgen/stubs/egl/EGL14Header.java-if +++ b/opengl/tools/glgen/stubs/egl/EGL14Header.java-if @@ -1,4 +1,4 @@ -** +/* ** Copyright 2012, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/opengl/tools/glgen/stubs/egl/EGL14cHeader.cpp b/opengl/tools/glgen/stubs/egl/EGL14cHeader.cpp index 7904ac7..54de1e7 100644 --- a/opengl/tools/glgen/stubs/egl/EGL14cHeader.cpp +++ b/opengl/tools/glgen/stubs/egl/EGL14cHeader.cpp @@ -1,4 +1,4 @@ -** +/* ** Copyright 2012, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); @@ -27,8 +27,8 @@ #include <EGL/egl.h> #include <gui/Surface.h> -#include <gui/SurfaceTexture.h> -#include <gui/SurfaceTextureClient.h> +#include <gui/GLConsumer.h> +#include <gui/Surface.h> #include <ui/ANativeObjectBase.h> diff --git a/opengl/tools/glgen/stubs/egl/EGLExtHeader.java-if b/opengl/tools/glgen/stubs/egl/EGLExtHeader.java-if new file mode 100644 index 0000000..a5a8968 --- /dev/null +++ b/opengl/tools/glgen/stubs/egl/EGLExtHeader.java-if @@ -0,0 +1,36 @@ +/* +** Copyright 2013, 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. +*/ + +// This source file is automatically generated + +package android.opengl; + +/** + * EGL Extensions + */ +public class EGLExt { + + // EGL_KHR_create_context + public static final int EGL_CONTEXT_MAJOR_VERSION_KHR = 0x3098; + public static final int EGL_CONTEXT_MINOR_VERSION_KHR = 0x30FB; + public static final int EGL_CONTEXT_FLAGS_KHR = 0x30FC; + public static final int EGL_OPENGL_ES3_BIT_KHR = 0x0040; + + native private static void _nativeClassInit(); + static { + _nativeClassInit(); + } + diff --git a/opengl/tools/glgen/stubs/egl/EGLExtcHeader.cpp b/opengl/tools/glgen/stubs/egl/EGLExtcHeader.cpp new file mode 100644 index 0000000..5e1ffa1 --- /dev/null +++ b/opengl/tools/glgen/stubs/egl/EGLExtcHeader.cpp @@ -0,0 +1,133 @@ +/* +** Copyright 2013, 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. +*/ + +// This source file is automatically generated + +#include "jni.h" +#include "JNIHelp.h" +#include <android_runtime/AndroidRuntime.h> +#include <android_runtime/android_view_Surface.h> +#include <android_runtime/android_graphics_SurfaceTexture.h> +#include <utils/misc.h> + +#include <assert.h> +#include <EGL/egl.h> +#include <EGL/eglext.h> + +#include <gui/Surface.h> +#include <gui/GLConsumer.h> +#include <gui/Surface.h> + +#include <ui/ANativeObjectBase.h> + +static int initialized = 0; + +static jclass egldisplayClass; +static jclass eglcontextClass; +static jclass eglsurfaceClass; +static jclass eglconfigClass; + +static jmethodID egldisplayGetHandleID; +static jmethodID eglcontextGetHandleID; +static jmethodID eglsurfaceGetHandleID; +static jmethodID eglconfigGetHandleID; + +static jmethodID egldisplayConstructor; +static jmethodID eglcontextConstructor; +static jmethodID eglsurfaceConstructor; +static jmethodID eglconfigConstructor; + +static jobject eglNoContextObject; +static jobject eglNoDisplayObject; +static jobject eglNoSurfaceObject; + + + +/* Cache method IDs each time the class is loaded. */ + +static void +nativeClassInit(JNIEnv *_env, jclass glImplClass) +{ + jclass egldisplayClassLocal = _env->FindClass("android/opengl/EGLDisplay"); + egldisplayClass = (jclass) _env->NewGlobalRef(egldisplayClassLocal); + jclass eglcontextClassLocal = _env->FindClass("android/opengl/EGLContext"); + eglcontextClass = (jclass) _env->NewGlobalRef(eglcontextClassLocal); + jclass eglsurfaceClassLocal = _env->FindClass("android/opengl/EGLSurface"); + eglsurfaceClass = (jclass) _env->NewGlobalRef(eglsurfaceClassLocal); + jclass eglconfigClassLocal = _env->FindClass("android/opengl/EGLConfig"); + eglconfigClass = (jclass) _env->NewGlobalRef(eglconfigClassLocal); + + egldisplayGetHandleID = _env->GetMethodID(egldisplayClass, "getHandle", "()I"); + eglcontextGetHandleID = _env->GetMethodID(eglcontextClass, "getHandle", "()I"); + eglsurfaceGetHandleID = _env->GetMethodID(eglsurfaceClass, "getHandle", "()I"); + eglconfigGetHandleID = _env->GetMethodID(eglconfigClass, "getHandle", "()I"); + + + egldisplayConstructor = _env->GetMethodID(egldisplayClass, "<init>", "(I)V"); + eglcontextConstructor = _env->GetMethodID(eglcontextClass, "<init>", "(I)V"); + eglsurfaceConstructor = _env->GetMethodID(eglsurfaceClass, "<init>", "(I)V"); + eglconfigConstructor = _env->GetMethodID(eglconfigClass, "<init>", "(I)V"); + + jobject localeglNoContextObject = _env->NewObject(eglcontextClass, eglcontextConstructor, (jint)EGL_NO_CONTEXT); + eglNoContextObject = _env->NewGlobalRef(localeglNoContextObject); + jobject localeglNoDisplayObject = _env->NewObject(egldisplayClass, egldisplayConstructor, (jint)EGL_NO_DISPLAY); + eglNoDisplayObject = _env->NewGlobalRef(localeglNoDisplayObject); + jobject localeglNoSurfaceObject = _env->NewObject(eglsurfaceClass, eglsurfaceConstructor, (jint)EGL_NO_SURFACE); + eglNoSurfaceObject = _env->NewGlobalRef(localeglNoSurfaceObject); + + + jclass eglClass = _env->FindClass("android/opengl/EGL14"); + jfieldID noContextFieldID = _env->GetStaticFieldID(eglClass, "EGL_NO_CONTEXT", "Landroid/opengl/EGLContext;"); + _env->SetStaticObjectField(eglClass, noContextFieldID, eglNoContextObject); + + jfieldID noDisplayFieldID = _env->GetStaticFieldID(eglClass, "EGL_NO_DISPLAY", "Landroid/opengl/EGLDisplay;"); + _env->SetStaticObjectField(eglClass, noDisplayFieldID, eglNoDisplayObject); + + jfieldID noSurfaceFieldID = _env->GetStaticFieldID(eglClass, "EGL_NO_SURFACE", "Landroid/opengl/EGLSurface;"); + _env->SetStaticObjectField(eglClass, noSurfaceFieldID, eglNoSurfaceObject); +} + +static void * +fromEGLHandle(JNIEnv *_env, jmethodID mid, jobject obj) { + if (obj == NULL){ + jniThrowException(_env, "java/lang/IllegalArgumentException", + "Object is set to null."); + } + + return (void*) (_env->CallIntMethod(obj, mid)); +} + +static jobject +toEGLHandle(JNIEnv *_env, jclass cls, jmethodID con, void * handle) { + if (cls == eglcontextClass && + (EGLContext)handle == EGL_NO_CONTEXT) { + return eglNoContextObject; + } + + if (cls == egldisplayClass && + (EGLDisplay)handle == EGL_NO_DISPLAY) { + return eglNoDisplayObject; + } + + if (cls == eglsurfaceClass && + (EGLSurface)handle == EGL_NO_SURFACE) { + return eglNoSurfaceObject; + } + + return _env->NewObject(cls, con, (jint)handle); +} + +// -------------------------------------------------------------------------- diff --git a/opengl/tools/glgen/stubs/egl/eglCreateWindowSurface.cpp b/opengl/tools/glgen/stubs/egl/eglCreateWindowSurface.cpp index 610cde5..906cd80 100644 --- a/opengl/tools/glgen/stubs/egl/eglCreateWindowSurface.cpp +++ b/opengl/tools/glgen/stubs/egl/eglCreateWindowSurface.cpp @@ -34,7 +34,7 @@ not_valid_surface: goto exit; } - window = android::android_Surface_getNativeWindow(_env, win); + window = android::android_view_Surface_getNativeWindow(_env, win); if (window == NULL) goto not_valid_surface; @@ -90,7 +90,7 @@ android_eglCreateWindowSurfaceTexture jint _remaining; EGLint *attrib_list = (EGLint *) 0; android::sp<ANativeWindow> window; - android::sp<android::SurfaceTexture> surfaceTexture; + android::sp<android::GLConsumer> glConsumer; if (!attrib_list_ref) { _exception = 1; @@ -111,8 +111,12 @@ not_valid_surface: _exceptionMessage = "Make sure the SurfaceView or associated SurfaceHolder has a valid Surface"; goto exit; } - surfaceTexture = android::SurfaceTexture_getSurfaceTexture(_env, win); - window = new android::SurfaceTextureClient(surfaceTexture); + glConsumer = android::SurfaceTexture_getSurfaceTexture(_env, win); + + if (glConsumer == NULL) + goto not_valid_surface; + + window = new android::Surface(glConsumer->getBufferQueue()); if (window == NULL) goto not_valid_surface; diff --git a/opengl/tools/glgen/stubs/egl/eglCreateWindowSurface.java b/opengl/tools/glgen/stubs/egl/eglCreateWindowSurface.java index e42334e..5d088bd 100644 --- a/opengl/tools/glgen/stubs/egl/eglCreateWindowSurface.java +++ b/opengl/tools/glgen/stubs/egl/eglCreateWindowSurface.java @@ -29,6 +29,8 @@ } else if (win instanceof SurfaceHolder) { SurfaceHolder holder = (SurfaceHolder)win; sur = holder.getSurface(); + } else if (win instanceof Surface) { + sur = (Surface) win; } EGLSurface surface; @@ -40,7 +42,7 @@ } else { throw new java.lang.UnsupportedOperationException( "eglCreateWindowSurface() can only be called with an instance of " + - "SurfaceView, SurfaceTexture or SurfaceHolder at the moment, " + + "Surface, SurfaceView, SurfaceTexture or SurfaceHolder at the moment, " + "this will be fixed later."); } diff --git a/opengl/tools/glgen/stubs/gles11/GLES10ExtHeader.java-if b/opengl/tools/glgen/stubs/gles11/GLES10ExtHeader.java-if index 42891ea..146d883 100644 --- a/opengl/tools/glgen/stubs/gles11/GLES10ExtHeader.java-if +++ b/opengl/tools/glgen/stubs/gles11/GLES10ExtHeader.java-if @@ -1,3 +1,4 @@ +/* ** ** Copyright 2009, The Android Open Source Project ** diff --git a/opengl/tools/glgen/stubs/gles11/GLES10ExtcHeader.cpp b/opengl/tools/glgen/stubs/gles11/GLES10ExtcHeader.cpp index 172c0e7..8a1d5ed 100644 --- a/opengl/tools/glgen/stubs/gles11/GLES10ExtcHeader.cpp +++ b/opengl/tools/glgen/stubs/gles11/GLES10ExtcHeader.cpp @@ -1,3 +1,4 @@ +/* ** ** Copyright 2009, The Android Open Source Project ** @@ -16,84 +17,6 @@ // This source file is automatically generated -#include "jni.h" -#include "JNIHelp.h" -#include <android_runtime/AndroidRuntime.h> -#include <utils/misc.h> - -#include <assert.h> #include <GLES/gl.h> #include <GLES/glext.h> -static int initialized = 0; - -static jclass nioAccessClass; -static jclass bufferClass; -static jmethodID getBasePointerID; -static jmethodID getBaseArrayID; -static jmethodID getBaseArrayOffsetID; -static jfieldID positionID; -static jfieldID limitID; -static jfieldID elementSizeShiftID; - -/* Cache method IDs each time the class is loaded. */ - -static void -nativeClassInit(JNIEnv *_env, jclass glImplClass) -{ - jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess"); - nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal); - - jclass bufferClassLocal = _env->FindClass("java/nio/Buffer"); - bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal); - - getBasePointerID = _env->GetStaticMethodID(nioAccessClass, - "getBasePointer", "(Ljava/nio/Buffer;)J"); - getBaseArrayID = _env->GetStaticMethodID(nioAccessClass, - "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;"); - getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass, - "getBaseArrayOffset", "(Ljava/nio/Buffer;)I"); - - positionID = _env->GetFieldID(bufferClass, "position", "I"); - limitID = _env->GetFieldID(bufferClass, "limit", "I"); - elementSizeShiftID = - _env->GetFieldID(bufferClass, "_elementSizeShift", "I"); -} - - -static void * -getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset) -{ - jint position; - jint limit; - jint elementSizeShift; - jlong pointer; - - position = _env->GetIntField(buffer, positionID); - limit = _env->GetIntField(buffer, limitID); - elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); - *remaining = (limit - position) << elementSizeShift; - pointer = _env->CallStaticLongMethod(nioAccessClass, - getBasePointerID, buffer); - if (pointer != 0L) { - *array = NULL; - return (void *) (jint) pointer; - } - - *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass, - getBaseArrayID, buffer); - *offset = _env->CallStaticIntMethod(nioAccessClass, - getBaseArrayOffsetID, buffer); - - return NULL; -} - - -static void -releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit) -{ - _env->ReleasePrimitiveArrayCritical(array, data, - commit ? 0 : JNI_ABORT); -} - -// -------------------------------------------------------------------------- diff --git a/opengl/tools/glgen/stubs/gles11/GLES10Header.java-if b/opengl/tools/glgen/stubs/gles11/GLES10Header.java-if index 4b2a831..16cab04 100644 --- a/opengl/tools/glgen/stubs/gles11/GLES10Header.java-if +++ b/opengl/tools/glgen/stubs/gles11/GLES10Header.java-if @@ -1,3 +1,4 @@ +/* ** ** Copyright 2009, The Android Open Source Project ** diff --git a/opengl/tools/glgen/stubs/gles11/GLES10cHeader.cpp b/opengl/tools/glgen/stubs/gles11/GLES10cHeader.cpp index 4ef815b..8a1d5ed 100644 --- a/opengl/tools/glgen/stubs/gles11/GLES10cHeader.cpp +++ b/opengl/tools/glgen/stubs/gles11/GLES10cHeader.cpp @@ -1,3 +1,4 @@ +/* ** ** Copyright 2009, The Android Open Source Project ** @@ -16,116 +17,6 @@ // This source file is automatically generated -#include "jni.h" -#include "JNIHelp.h" -#include <android_runtime/AndroidRuntime.h> -#include <utils/misc.h> - -#include <assert.h> #include <GLES/gl.h> #include <GLES/glext.h> -/* special calls implemented in Android's GLES wrapper used to more - * efficiently bound-check passed arrays */ -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); -} - -static int initialized = 0; - -static jclass nioAccessClass; -static jclass bufferClass; -static jmethodID getBasePointerID; -static jmethodID getBaseArrayID; -static jmethodID getBaseArrayOffsetID; -static jfieldID positionID; -static jfieldID limitID; -static jfieldID elementSizeShiftID; - -/* Cache method IDs each time the class is loaded. */ - -static void -nativeClassInit(JNIEnv *_env, jclass glImplClass) -{ - jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess"); - nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal); - - jclass bufferClassLocal = _env->FindClass("java/nio/Buffer"); - bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal); - - getBasePointerID = _env->GetStaticMethodID(nioAccessClass, - "getBasePointer", "(Ljava/nio/Buffer;)J"); - getBaseArrayID = _env->GetStaticMethodID(nioAccessClass, - "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;"); - getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass, - "getBaseArrayOffset", "(Ljava/nio/Buffer;)I"); - - positionID = _env->GetFieldID(bufferClass, "position", "I"); - limitID = _env->GetFieldID(bufferClass, "limit", "I"); - elementSizeShiftID = - _env->GetFieldID(bufferClass, "_elementSizeShift", "I"); -} - -static void * -getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset) -{ - jint position; - jint limit; - jint elementSizeShift; - jlong pointer; - - position = _env->GetIntField(buffer, positionID); - limit = _env->GetIntField(buffer, limitID); - elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); - *remaining = (limit - position) << elementSizeShift; - pointer = _env->CallStaticLongMethod(nioAccessClass, - getBasePointerID, buffer); - if (pointer != 0L) { - *array = NULL; - return (void *) (jint) pointer; - } - - *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass, - getBaseArrayID, buffer); - *offset = _env->CallStaticIntMethod(nioAccessClass, - getBaseArrayOffsetID, buffer); - - return NULL; -} - -static void -releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit) -{ - _env->ReleasePrimitiveArrayCritical(array, data, - commit ? 0 : JNI_ABORT); -} - -static void * -getDirectBufferPointer(JNIEnv *_env, jobject buffer) { - char* buf = (char*) _env->GetDirectBufferAddress(buffer); - if (buf) { - jint position = _env->GetIntField(buffer, positionID); - jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); - buf += position << elementSizeShift; - } else { - jniThrowException(_env, "java/lang/IllegalArgumentException", - "Must use a native order direct Buffer"); - } - return (void*) buf; -} - -static int -getNumCompressedTextureFormats() { - int numCompressedTextureFormats = 0; - glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &numCompressedTextureFormats); - return numCompressedTextureFormats; -} - -// -------------------------------------------------------------------------- diff --git a/opengl/tools/glgen/stubs/gles11/GLES11ExtHeader.java-if b/opengl/tools/glgen/stubs/gles11/GLES11ExtHeader.java-if index 0c5fa04..efaf867 100644 --- a/opengl/tools/glgen/stubs/gles11/GLES11ExtHeader.java-if +++ b/opengl/tools/glgen/stubs/gles11/GLES11ExtHeader.java-if @@ -1,3 +1,4 @@ +/* ** ** Copyright 2009, The Android Open Source Project ** diff --git a/opengl/tools/glgen/stubs/gles11/GLES11ExtcHeader.cpp b/opengl/tools/glgen/stubs/gles11/GLES11ExtcHeader.cpp index 0df95f4..8a1d5ed 100644 --- a/opengl/tools/glgen/stubs/gles11/GLES11ExtcHeader.cpp +++ b/opengl/tools/glgen/stubs/gles11/GLES11ExtcHeader.cpp @@ -1,3 +1,4 @@ +/* ** ** Copyright 2009, The Android Open Source Project ** @@ -16,105 +17,6 @@ // This source file is automatically generated -#include "jni.h" -#include "JNIHelp.h" -#include <android_runtime/AndroidRuntime.h> -#include <utils/misc.h> - -#include <assert.h> #include <GLES/gl.h> #include <GLES/glext.h> -/* special calls implemented in Android's GLES wrapper used to more - * efficiently bound-check passed arrays */ -extern "C" { -GL_API void GL_APIENTRY glMatrixIndexPointerOESBounds(GLint size, GLenum type, GLsizei stride, - const GLvoid *ptr, GLsizei count); -GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type, GLsizei stride, - const GLvoid *ptr, GLsizei count); -} - -static int initialized = 0; - -static jclass nioAccessClass; -static jclass bufferClass; -static jmethodID getBasePointerID; -static jmethodID getBaseArrayID; -static jmethodID getBaseArrayOffsetID; -static jfieldID positionID; -static jfieldID limitID; -static jfieldID elementSizeShiftID; - -/* Cache method IDs each time the class is loaded. */ - -static void -nativeClassInit(JNIEnv *_env, jclass glImplClass) -{ - jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess"); - nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal); - - jclass bufferClassLocal = _env->FindClass("java/nio/Buffer"); - bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal); - - getBasePointerID = _env->GetStaticMethodID(nioAccessClass, - "getBasePointer", "(Ljava/nio/Buffer;)J"); - getBaseArrayID = _env->GetStaticMethodID(nioAccessClass, - "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;"); - getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass, - "getBaseArrayOffset", "(Ljava/nio/Buffer;)I"); - - positionID = _env->GetFieldID(bufferClass, "position", "I"); - limitID = _env->GetFieldID(bufferClass, "limit", "I"); - elementSizeShiftID = - _env->GetFieldID(bufferClass, "_elementSizeShift", "I"); -} - - -static void * -getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset) -{ - jint position; - jint limit; - jint elementSizeShift; - jlong pointer; - - position = _env->GetIntField(buffer, positionID); - limit = _env->GetIntField(buffer, limitID); - elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); - *remaining = (limit - position) << elementSizeShift; - pointer = _env->CallStaticLongMethod(nioAccessClass, - getBasePointerID, buffer); - if (pointer != 0L) { - *array = NULL; - return (void *) (jint) pointer; - } - - *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass, - getBaseArrayID, buffer); - *offset = _env->CallStaticIntMethod(nioAccessClass, - getBaseArrayOffsetID, buffer); - return NULL; -} - - -static void -releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit) -{ - _env->ReleasePrimitiveArrayCritical(array, data, - commit ? 0 : JNI_ABORT); -} - -static void * -getDirectBufferPointer(JNIEnv *_env, jobject buffer) { - char* buf = (char*) _env->GetDirectBufferAddress(buffer); - if (buf) { - jint position = _env->GetIntField(buffer, positionID); - jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); - buf += position << elementSizeShift; - } else { - jniThrowException(_env, "java/lang/IllegalArgumentException", - "Must use a native order direct Buffer"); - } - return (void*) buf; -} -// -------------------------------------------------------------------------- diff --git a/opengl/tools/glgen/stubs/gles11/GLES11Header.java-if b/opengl/tools/glgen/stubs/gles11/GLES11Header.java-if index 81572d2..e63d470 100644 --- a/opengl/tools/glgen/stubs/gles11/GLES11Header.java-if +++ b/opengl/tools/glgen/stubs/gles11/GLES11Header.java-if @@ -1,3 +1,4 @@ +/* ** ** Copyright 2009, The Android Open Source Project ** diff --git a/opengl/tools/glgen/stubs/gles11/GLES11cHeader.cpp b/opengl/tools/glgen/stubs/gles11/GLES11cHeader.cpp index dd860d5..8a1d5ed 100644 --- a/opengl/tools/glgen/stubs/gles11/GLES11cHeader.cpp +++ b/opengl/tools/glgen/stubs/gles11/GLES11cHeader.cpp @@ -1,3 +1,4 @@ +/* ** ** Copyright 2009, The Android Open Source Project ** @@ -16,105 +17,6 @@ // This source file is automatically generated -#include "jni.h" -#include "JNIHelp.h" -#include <android_runtime/AndroidRuntime.h> -#include <utils/misc.h> - -#include <assert.h> #include <GLES/gl.h> #include <GLES/glext.h> -/* special calls implemented in Android's GLES wrapper used to more - * efficiently bound-check passed arrays */ -extern "C" { -GL_API void GL_APIENTRY glPointSizePointerOESBounds(GLenum type, GLsizei stride, - const GLvoid *ptr, GLsizei count); -} - -static int initialized = 0; - -static jclass nioAccessClass; -static jclass bufferClass; -static jmethodID getBasePointerID; -static jmethodID getBaseArrayID; -static jmethodID getBaseArrayOffsetID; -static jfieldID positionID; -static jfieldID limitID; -static jfieldID elementSizeShiftID; - -/* Cache method IDs each time the class is loaded. */ - -static void -nativeClassInit(JNIEnv *_env, jclass glImplClass) -{ - jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess"); - nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal); - - jclass bufferClassLocal = _env->FindClass("java/nio/Buffer"); - bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal); - - getBasePointerID = _env->GetStaticMethodID(nioAccessClass, - "getBasePointer", "(Ljava/nio/Buffer;)J"); - getBaseArrayID = _env->GetStaticMethodID(nioAccessClass, - "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;"); - getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass, - "getBaseArrayOffset", "(Ljava/nio/Buffer;)I"); - - positionID = _env->GetFieldID(bufferClass, "position", "I"); - limitID = _env->GetFieldID(bufferClass, "limit", "I"); - elementSizeShiftID = - _env->GetFieldID(bufferClass, "_elementSizeShift", "I"); -} - - -static void * -getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset) -{ - jint position; - jint limit; - jint elementSizeShift; - jlong pointer; - - position = _env->GetIntField(buffer, positionID); - limit = _env->GetIntField(buffer, limitID); - elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); - *remaining = (limit - position) << elementSizeShift; - pointer = _env->CallStaticLongMethod(nioAccessClass, - getBasePointerID, buffer); - if (pointer != 0L) { - *array = NULL; - return (void *) (jint) pointer; - } - - *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass, - getBaseArrayID, buffer); - *offset = _env->CallStaticIntMethod(nioAccessClass, - getBaseArrayOffsetID, buffer); - - return NULL; -} - - -static void -releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit) -{ - _env->ReleasePrimitiveArrayCritical(array, data, - commit ? 0 : JNI_ABORT); -} - -static void * -getDirectBufferPointer(JNIEnv *_env, jobject buffer) { - char* buf = (char*) _env->GetDirectBufferAddress(buffer); - if (buf) { - jint position = _env->GetIntField(buffer, positionID); - jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); - buf += position << elementSizeShift; - } else { - jniThrowException(_env, "java/lang/IllegalArgumentException", - "Must use a native order direct Buffer"); - } - return (void*) buf; -} - -// -------------------------------------------------------------------------- diff --git a/opengl/tools/glgen/stubs/gles11/GLES20Header.java-if b/opengl/tools/glgen/stubs/gles11/GLES20Header.java-if index b615e0a..9ce6728 100644 --- a/opengl/tools/glgen/stubs/gles11/GLES20Header.java-if +++ b/opengl/tools/glgen/stubs/gles11/GLES20Header.java-if @@ -1,3 +1,4 @@ +/* ** ** Copyright 2009, The Android Open Source Project ** @@ -295,6 +296,10 @@ public class GLES20 { public static final int GL_RGB5_A1 = 0x8057; public static final int GL_RGB565 = 0x8D62; public static final int GL_DEPTH_COMPONENT16 = 0x81A5; + // GL_STENCIL_INDEX does not appear in gl2.h or gl2ext.h, and there is no + // token with value 0x1901. + // + @Deprecated public static final int GL_STENCIL_INDEX = 0x1901; public static final int GL_STENCIL_INDEX8 = 0x8D48; public static final int GL_RENDERBUFFER_WIDTH = 0x8D42; @@ -326,5 +331,5 @@ public class GLES20 { native private static void _nativeClassInit(); static { - _nativeClassInit(); + _nativeClassInit(); } diff --git a/opengl/tools/glgen/stubs/gles11/GLES20cHeader.cpp b/opengl/tools/glgen/stubs/gles11/GLES20cHeader.cpp index 996f441..2389563 100644 --- a/opengl/tools/glgen/stubs/gles11/GLES20cHeader.cpp +++ b/opengl/tools/glgen/stubs/gles11/GLES20cHeader.cpp @@ -1,3 +1,4 @@ +/* ** ** Copyright 2009, The Android Open Source Project ** @@ -16,110 +17,6 @@ // This source file is automatically generated -#include "jni.h" -#include "JNIHelp.h" -#include <android_runtime/AndroidRuntime.h> -#include <utils/misc.h> - -#include <assert.h> #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> -static int initialized = 0; - -static jclass nioAccessClass; -static jclass bufferClass; -static jmethodID getBasePointerID; -static jmethodID getBaseArrayID; -static jmethodID getBaseArrayOffsetID; -static jfieldID positionID; -static jfieldID limitID; -static jfieldID elementSizeShiftID; - -/* Cache method IDs each time the class is loaded. */ - -static void -nativeClassInit(JNIEnv *_env, jclass glImplClass) -{ - jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess"); - nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal); - - jclass bufferClassLocal = _env->FindClass("java/nio/Buffer"); - bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal); - - getBasePointerID = _env->GetStaticMethodID(nioAccessClass, - "getBasePointer", "(Ljava/nio/Buffer;)J"); - getBaseArrayID = _env->GetStaticMethodID(nioAccessClass, - "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;"); - getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass, - "getBaseArrayOffset", "(Ljava/nio/Buffer;)I"); - - positionID = _env->GetFieldID(bufferClass, "position", "I"); - limitID = _env->GetFieldID(bufferClass, "limit", "I"); - elementSizeShiftID = - _env->GetFieldID(bufferClass, "_elementSizeShift", "I"); -} - - -static void * -getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset) -{ - jint position; - jint limit; - jint elementSizeShift; - jlong pointer; - - position = _env->GetIntField(buffer, positionID); - limit = _env->GetIntField(buffer, limitID); - elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); - *remaining = (limit - position) << elementSizeShift; - pointer = _env->CallStaticLongMethod(nioAccessClass, - getBasePointerID, buffer); - if (pointer != 0L) { - *array = NULL; - return (void *) (jint) pointer; - } - - *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass, - getBaseArrayID, buffer); - *offset = _env->CallStaticIntMethod(nioAccessClass, - getBaseArrayOffsetID, buffer); - - return NULL; -} - - -static void -releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit) -{ - _env->ReleasePrimitiveArrayCritical(array, data, - commit ? 0 : JNI_ABORT); -} - -static void * -getDirectBufferPointer(JNIEnv *_env, jobject buffer) { - char* buf = (char*) _env->GetDirectBufferAddress(buffer); - if (buf) { - jint position = _env->GetIntField(buffer, positionID); - jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); - buf += position << elementSizeShift; - } else { - jniThrowException(_env, "java/lang/IllegalArgumentException", - "Must use a native order direct Buffer"); - } - return (void*) buf; -} - -static int -getNumCompressedTextureFormats() { - int numCompressedTextureFormats = 0; - glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &numCompressedTextureFormats); - return numCompressedTextureFormats; -} - -static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type, - GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) { - glVertexAttribPointer(indx, size, type, normalized, stride, pointer); -} - -// -------------------------------------------------------------------------- diff --git a/opengl/tools/glgen/stubs/gles11/GLES30Header.java-if b/opengl/tools/glgen/stubs/gles11/GLES30Header.java-if new file mode 100644 index 0000000..747dbd3 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/GLES30Header.java-if @@ -0,0 +1,337 @@ +/* +** +** Copyright 2013, 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. +*/ + +// This source file is automatically generated + +package android.opengl; + +/** OpenGL ES 3.0 + */ +public class GLES30 extends GLES20 { + public static final int GL_READ_BUFFER = 0x0C02; + public static final int GL_UNPACK_ROW_LENGTH = 0x0CF2; + public static final int GL_UNPACK_SKIP_ROWS = 0x0CF3; + public static final int GL_UNPACK_SKIP_PIXELS = 0x0CF4; + public static final int GL_PACK_ROW_LENGTH = 0x0D02; + public static final int GL_PACK_SKIP_ROWS = 0x0D03; + public static final int GL_PACK_SKIP_PIXELS = 0x0D04; + public static final int GL_COLOR = 0x1800; + public static final int GL_DEPTH = 0x1801; + public static final int GL_STENCIL = 0x1802; + public static final int GL_RED = 0x1903; + public static final int GL_RGB8 = 0x8051; + public static final int GL_RGBA8 = 0x8058; + public static final int GL_RGB10_A2 = 0x8059; + public static final int GL_TEXTURE_BINDING_3D = 0x806A; + public static final int GL_UNPACK_SKIP_IMAGES = 0x806D; + public static final int GL_UNPACK_IMAGE_HEIGHT = 0x806E; + public static final int GL_TEXTURE_3D = 0x806F; + public static final int GL_TEXTURE_WRAP_R = 0x8072; + public static final int GL_MAX_3D_TEXTURE_SIZE = 0x8073; + public static final int GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368; + public static final int GL_MAX_ELEMENTS_VERTICES = 0x80E8; + public static final int GL_MAX_ELEMENTS_INDICES = 0x80E9; + public static final int GL_TEXTURE_MIN_LOD = 0x813A; + public static final int GL_TEXTURE_MAX_LOD = 0x813B; + public static final int GL_TEXTURE_BASE_LEVEL = 0x813C; + public static final int GL_TEXTURE_MAX_LEVEL = 0x813D; + public static final int GL_MIN = 0x8007; + public static final int GL_MAX = 0x8008; + public static final int GL_DEPTH_COMPONENT24 = 0x81A6; + public static final int GL_MAX_TEXTURE_LOD_BIAS = 0x84FD; + public static final int GL_TEXTURE_COMPARE_MODE = 0x884C; + public static final int GL_TEXTURE_COMPARE_FUNC = 0x884D; + public static final int GL_CURRENT_QUERY = 0x8865; + public static final int GL_QUERY_RESULT = 0x8866; + public static final int GL_QUERY_RESULT_AVAILABLE = 0x8867; + public static final int GL_BUFFER_MAPPED = 0x88BC; + public static final int GL_BUFFER_MAP_POINTER = 0x88BD; + public static final int GL_STREAM_READ = 0x88E1; + public static final int GL_STREAM_COPY = 0x88E2; + public static final int GL_STATIC_READ = 0x88E5; + public static final int GL_STATIC_COPY = 0x88E6; + public static final int GL_DYNAMIC_READ = 0x88E9; + public static final int GL_DYNAMIC_COPY = 0x88EA; + public static final int GL_MAX_DRAW_BUFFERS = 0x8824; + public static final int GL_DRAW_BUFFER0 = 0x8825; + public static final int GL_DRAW_BUFFER1 = 0x8826; + public static final int GL_DRAW_BUFFER2 = 0x8827; + public static final int GL_DRAW_BUFFER3 = 0x8828; + public static final int GL_DRAW_BUFFER4 = 0x8829; + public static final int GL_DRAW_BUFFER5 = 0x882A; + public static final int GL_DRAW_BUFFER6 = 0x882B; + public static final int GL_DRAW_BUFFER7 = 0x882C; + public static final int GL_DRAW_BUFFER8 = 0x882D; + public static final int GL_DRAW_BUFFER9 = 0x882E; + public static final int GL_DRAW_BUFFER10 = 0x882F; + public static final int GL_DRAW_BUFFER11 = 0x8830; + public static final int GL_DRAW_BUFFER12 = 0x8831; + public static final int GL_DRAW_BUFFER13 = 0x8832; + public static final int GL_DRAW_BUFFER14 = 0x8833; + public static final int GL_DRAW_BUFFER15 = 0x8834; + public static final int GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49; + public static final int GL_MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A; + public static final int GL_SAMPLER_3D = 0x8B5F; + public static final int GL_SAMPLER_2D_SHADOW = 0x8B62; + public static final int GL_FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B; + public static final int GL_PIXEL_PACK_BUFFER = 0x88EB; + public static final int GL_PIXEL_UNPACK_BUFFER = 0x88EC; + public static final int GL_PIXEL_PACK_BUFFER_BINDING = 0x88ED; + public static final int GL_PIXEL_UNPACK_BUFFER_BINDING = 0x88EF; + public static final int GL_FLOAT_MAT2x3 = 0x8B65; + public static final int GL_FLOAT_MAT2x4 = 0x8B66; + public static final int GL_FLOAT_MAT3x2 = 0x8B67; + public static final int GL_FLOAT_MAT3x4 = 0x8B68; + public static final int GL_FLOAT_MAT4x2 = 0x8B69; + public static final int GL_FLOAT_MAT4x3 = 0x8B6A; + public static final int GL_SRGB = 0x8C40; + public static final int GL_SRGB8 = 0x8C41; + public static final int GL_SRGB8_ALPHA8 = 0x8C43; + public static final int GL_COMPARE_REF_TO_TEXTURE = 0x884E; + public static final int GL_MAJOR_VERSION = 0x821B; + public static final int GL_MINOR_VERSION = 0x821C; + public static final int GL_NUM_EXTENSIONS = 0x821D; + public static final int GL_RGBA32F = 0x8814; + public static final int GL_RGB32F = 0x8815; + public static final int GL_RGBA16F = 0x881A; + public static final int GL_RGB16F = 0x881B; + public static final int GL_VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD; + public static final int GL_MAX_ARRAY_TEXTURE_LAYERS = 0x88FF; + public static final int GL_MIN_PROGRAM_TEXEL_OFFSET = 0x8904; + public static final int GL_MAX_PROGRAM_TEXEL_OFFSET = 0x8905; + public static final int GL_MAX_VARYING_COMPONENTS = 0x8B4B; + public static final int GL_TEXTURE_2D_ARRAY = 0x8C1A; + public static final int GL_TEXTURE_BINDING_2D_ARRAY = 0x8C1D; + public static final int GL_R11F_G11F_B10F = 0x8C3A; + public static final int GL_UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B; + public static final int GL_RGB9_E5 = 0x8C3D; + public static final int GL_UNSIGNED_INT_5_9_9_9_REV = 0x8C3E; + public static final int GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = 0x8C76; + public static final int GL_TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F; + public static final int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80; + public static final int GL_TRANSFORM_FEEDBACK_VARYINGS = 0x8C83; + public static final int GL_TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84; + public static final int GL_TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85; + public static final int GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88; + public static final int GL_RASTERIZER_DISCARD = 0x8C89; + public static final int GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A; + public static final int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B; + public static final int GL_INTERLEAVED_ATTRIBS = 0x8C8C; + public static final int GL_SEPARATE_ATTRIBS = 0x8C8D; + public static final int GL_TRANSFORM_FEEDBACK_BUFFER = 0x8C8E; + public static final int GL_TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F; + public static final int GL_RGBA32UI = 0x8D70; + public static final int GL_RGB32UI = 0x8D71; + public static final int GL_RGBA16UI = 0x8D76; + public static final int GL_RGB16UI = 0x8D77; + public static final int GL_RGBA8UI = 0x8D7C; + public static final int GL_RGB8UI = 0x8D7D; + public static final int GL_RGBA32I = 0x8D82; + public static final int GL_RGB32I = 0x8D83; + public static final int GL_RGBA16I = 0x8D88; + public static final int GL_RGB16I = 0x8D89; + public static final int GL_RGBA8I = 0x8D8E; + public static final int GL_RGB8I = 0x8D8F; + public static final int GL_RED_INTEGER = 0x8D94; + public static final int GL_RGB_INTEGER = 0x8D98; + public static final int GL_RGBA_INTEGER = 0x8D99; + public static final int GL_SAMPLER_2D_ARRAY = 0x8DC1; + public static final int GL_SAMPLER_2D_ARRAY_SHADOW = 0x8DC4; + public static final int GL_SAMPLER_CUBE_SHADOW = 0x8DC5; + public static final int GL_UNSIGNED_INT_VEC2 = 0x8DC6; + public static final int GL_UNSIGNED_INT_VEC3 = 0x8DC7; + public static final int GL_UNSIGNED_INT_VEC4 = 0x8DC8; + public static final int GL_INT_SAMPLER_2D = 0x8DCA; + public static final int GL_INT_SAMPLER_3D = 0x8DCB; + public static final int GL_INT_SAMPLER_CUBE = 0x8DCC; + public static final int GL_INT_SAMPLER_2D_ARRAY = 0x8DCF; + public static final int GL_UNSIGNED_INT_SAMPLER_2D = 0x8DD2; + public static final int GL_UNSIGNED_INT_SAMPLER_3D = 0x8DD3; + public static final int GL_UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4; + public static final int GL_UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7; + public static final int GL_BUFFER_ACCESS_FLAGS = 0x911F; + public static final int GL_BUFFER_MAP_LENGTH = 0x9120; + public static final int GL_BUFFER_MAP_OFFSET = 0x9121; + public static final int GL_DEPTH_COMPONENT32F = 0x8CAC; + public static final int GL_DEPTH32F_STENCIL8 = 0x8CAD; + public static final int GL_FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD; + public static final int GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210; + public static final int GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211; + public static final int GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212; + public static final int GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213; + public static final int GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214; + public static final int GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215; + public static final int GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216; + public static final int GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217; + public static final int GL_FRAMEBUFFER_DEFAULT = 0x8218; + public static final int GL_FRAMEBUFFER_UNDEFINED = 0x8219; + public static final int GL_DEPTH_STENCIL_ATTACHMENT = 0x821A; + public static final int GL_DEPTH_STENCIL = 0x84F9; + public static final int GL_UNSIGNED_INT_24_8 = 0x84FA; + public static final int GL_DEPTH24_STENCIL8 = 0x88F0; + public static final int GL_UNSIGNED_NORMALIZED = 0x8C17; + public static final int GL_DRAW_FRAMEBUFFER_BINDING = GL_FRAMEBUFFER_BINDING; + public static final int GL_READ_FRAMEBUFFER = 0x8CA8; + public static final int GL_DRAW_FRAMEBUFFER = 0x8CA9; + public static final int GL_READ_FRAMEBUFFER_BINDING = 0x8CAA; + public static final int GL_RENDERBUFFER_SAMPLES = 0x8CAB; + public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4; + public static final int GL_MAX_COLOR_ATTACHMENTS = 0x8CDF; + public static final int GL_COLOR_ATTACHMENT1 = 0x8CE1; + public static final int GL_COLOR_ATTACHMENT2 = 0x8CE2; + public static final int GL_COLOR_ATTACHMENT3 = 0x8CE3; + public static final int GL_COLOR_ATTACHMENT4 = 0x8CE4; + public static final int GL_COLOR_ATTACHMENT5 = 0x8CE5; + public static final int GL_COLOR_ATTACHMENT6 = 0x8CE6; + public static final int GL_COLOR_ATTACHMENT7 = 0x8CE7; + public static final int GL_COLOR_ATTACHMENT8 = 0x8CE8; + public static final int GL_COLOR_ATTACHMENT9 = 0x8CE9; + public static final int GL_COLOR_ATTACHMENT10 = 0x8CEA; + public static final int GL_COLOR_ATTACHMENT11 = 0x8CEB; + public static final int GL_COLOR_ATTACHMENT12 = 0x8CEC; + public static final int GL_COLOR_ATTACHMENT13 = 0x8CED; + public static final int GL_COLOR_ATTACHMENT14 = 0x8CEE; + public static final int GL_COLOR_ATTACHMENT15 = 0x8CEF; + public static final int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56; + public static final int GL_MAX_SAMPLES = 0x8D57; + public static final int GL_HALF_FLOAT = 0x140B; + public static final int GL_MAP_READ_BIT = 0x0001; + public static final int GL_MAP_WRITE_BIT = 0x0002; + public static final int GL_MAP_INVALIDATE_RANGE_BIT = 0x0004; + public static final int GL_MAP_INVALIDATE_BUFFER_BIT = 0x0008; + public static final int GL_MAP_FLUSH_EXPLICIT_BIT = 0x0010; + public static final int GL_MAP_UNSYNCHRONIZED_BIT = 0x0020; + public static final int GL_RG = 0x8227; + public static final int GL_RG_INTEGER = 0x8228; + public static final int GL_R8 = 0x8229; + public static final int GL_RG8 = 0x822B; + public static final int GL_R16F = 0x822D; + public static final int GL_R32F = 0x822E; + public static final int GL_RG16F = 0x822F; + public static final int GL_RG32F = 0x8230; + public static final int GL_R8I = 0x8231; + public static final int GL_R8UI = 0x8232; + public static final int GL_R16I = 0x8233; + public static final int GL_R16UI = 0x8234; + public static final int GL_R32I = 0x8235; + public static final int GL_R32UI = 0x8236; + public static final int GL_RG8I = 0x8237; + public static final int GL_RG8UI = 0x8238; + public static final int GL_RG16I = 0x8239; + public static final int GL_RG16UI = 0x823A; + public static final int GL_RG32I = 0x823B; + public static final int GL_RG32UI = 0x823C; + public static final int GL_VERTEX_ARRAY_BINDING = 0x85B5; + public static final int GL_R8_SNORM = 0x8F94; + public static final int GL_RG8_SNORM = 0x8F95; + public static final int GL_RGB8_SNORM = 0x8F96; + public static final int GL_RGBA8_SNORM = 0x8F97; + public static final int GL_SIGNED_NORMALIZED = 0x8F9C; + public static final int GL_PRIMITIVE_RESTART_FIXED_INDEX = 0x8D69; + public static final int GL_COPY_READ_BUFFER = 0x8F36; + public static final int GL_COPY_WRITE_BUFFER = 0x8F37; + public static final int GL_COPY_READ_BUFFER_BINDING = GL_COPY_READ_BUFFER; + public static final int GL_COPY_WRITE_BUFFER_BINDING = GL_COPY_WRITE_BUFFER; + public static final int GL_UNIFORM_BUFFER = 0x8A11; + public static final int GL_UNIFORM_BUFFER_BINDING = 0x8A28; + public static final int GL_UNIFORM_BUFFER_START = 0x8A29; + public static final int GL_UNIFORM_BUFFER_SIZE = 0x8A2A; + public static final int GL_MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B; + public static final int GL_MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D; + public static final int GL_MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E; + public static final int GL_MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F; + public static final int GL_MAX_UNIFORM_BLOCK_SIZE = 0x8A30; + public static final int GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31; + public static final int GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33; + public static final int GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34; + public static final int GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = 0x8A35; + public static final int GL_ACTIVE_UNIFORM_BLOCKS = 0x8A36; + public static final int GL_UNIFORM_TYPE = 0x8A37; + public static final int GL_UNIFORM_SIZE = 0x8A38; + public static final int GL_UNIFORM_NAME_LENGTH = 0x8A39; + public static final int GL_UNIFORM_BLOCK_INDEX = 0x8A3A; + public static final int GL_UNIFORM_OFFSET = 0x8A3B; + public static final int GL_UNIFORM_ARRAY_STRIDE = 0x8A3C; + public static final int GL_UNIFORM_MATRIX_STRIDE = 0x8A3D; + public static final int GL_UNIFORM_IS_ROW_MAJOR = 0x8A3E; + public static final int GL_UNIFORM_BLOCK_BINDING = 0x8A3F; + public static final int GL_UNIFORM_BLOCK_DATA_SIZE = 0x8A40; + public static final int GL_UNIFORM_BLOCK_NAME_LENGTH = 0x8A41; + public static final int GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42; + public static final int GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43; + public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44; + public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46; + // GL_INVALID_INDEX is defined as 0xFFFFFFFFu in C. + public static final int GL_INVALID_INDEX = -1; + public static final int GL_MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122; + public static final int GL_MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125; + public static final int GL_MAX_SERVER_WAIT_TIMEOUT = 0x9111; + public static final int GL_OBJECT_TYPE = 0x9112; + public static final int GL_SYNC_CONDITION = 0x9113; + public static final int GL_SYNC_STATUS = 0x9114; + public static final int GL_SYNC_FLAGS = 0x9115; + public static final int GL_SYNC_FENCE = 0x9116; + public static final int GL_SYNC_GPU_COMMANDS_COMPLETE = 0x9117; + public static final int GL_UNSIGNALED = 0x9118; + public static final int GL_SIGNALED = 0x9119; + public static final int GL_ALREADY_SIGNALED = 0x911A; + public static final int GL_TIMEOUT_EXPIRED = 0x911B; + public static final int GL_CONDITION_SATISFIED = 0x911C; + public static final int GL_WAIT_FAILED = 0x911D; + public static final int GL_SYNC_FLUSH_COMMANDS_BIT = 0x00000001; + // GL_TIMEOUT_IGNORED is defined as 0xFFFFFFFFFFFFFFFFull in C. + public static final long GL_TIMEOUT_IGNORED = -1; + public static final int GL_VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE; + public static final int GL_ANY_SAMPLES_PASSED = 0x8C2F; + public static final int GL_ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A; + public static final int GL_SAMPLER_BINDING = 0x8919; + public static final int GL_RGB10_A2UI = 0x906F; + public static final int GL_TEXTURE_SWIZZLE_R = 0x8E42; + public static final int GL_TEXTURE_SWIZZLE_G = 0x8E43; + public static final int GL_TEXTURE_SWIZZLE_B = 0x8E44; + public static final int GL_TEXTURE_SWIZZLE_A = 0x8E45; + public static final int GL_GREEN = 0x1904; + public static final int GL_BLUE = 0x1905; + public static final int GL_INT_2_10_10_10_REV = 0x8D9F; + public static final int GL_TRANSFORM_FEEDBACK = 0x8E22; + public static final int GL_TRANSFORM_FEEDBACK_PAUSED = 0x8E23; + public static final int GL_TRANSFORM_FEEDBACK_ACTIVE = 0x8E24; + public static final int GL_TRANSFORM_FEEDBACK_BINDING = 0x8E25; + public static final int GL_PROGRAM_BINARY_RETRIEVABLE_HINT = 0x8257; + public static final int GL_PROGRAM_BINARY_LENGTH = 0x8741; + public static final int GL_NUM_PROGRAM_BINARY_FORMATS = 0x87FE; + public static final int GL_PROGRAM_BINARY_FORMATS = 0x87FF; + public static final int GL_COMPRESSED_R11_EAC = 0x9270; + public static final int GL_COMPRESSED_SIGNED_R11_EAC = 0x9271; + public static final int GL_COMPRESSED_RG11_EAC = 0x9272; + public static final int GL_COMPRESSED_SIGNED_RG11_EAC = 0x9273; + public static final int GL_COMPRESSED_RGB8_ETC2 = 0x9274; + public static final int GL_COMPRESSED_SRGB8_ETC2 = 0x9275; + public static final int GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276; + public static final int GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277; + public static final int GL_COMPRESSED_RGBA8_ETC2_EAC = 0x9278; + public static final int GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279; + public static final int GL_TEXTURE_IMMUTABLE_FORMAT = 0x912F; + public static final int GL_MAX_ELEMENT_INDEX = 0x8D6B; + public static final int GL_NUM_SAMPLE_COUNTS = 0x9380; + public static final int GL_TEXTURE_IMMUTABLE_LEVELS = 0x82DF; + + native private static void _nativeClassInit(); + static { + _nativeClassInit(); + } + diff --git a/opengl/tools/glgen/stubs/gles11/GLES30cHeader.cpp b/opengl/tools/glgen/stubs/gles11/GLES30cHeader.cpp new file mode 100644 index 0000000..f5ec455 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/GLES30cHeader.cpp @@ -0,0 +1,22 @@ +/* +** +** Copyright 2013, 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. +*/ + +// This source file is automatically generated + +#include <GLES3/gl3.h> +#include <GLES3/gl3ext.h> + diff --git a/opengl/tools/glgen/stubs/gles11/common.cpp b/opengl/tools/glgen/stubs/gles11/common.cpp new file mode 100644 index 0000000..579d573 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/common.cpp @@ -0,0 +1,303 @@ +#include "jni.h" +#include "JNIHelp.h" +#include <android_runtime/AndroidRuntime.h> +#include <utils/misc.h> +#include <assert.h> + +static int initialized = 0; + +static jclass nioAccessClass; +static jclass bufferClass; +static jmethodID getBasePointerID; +static jmethodID getBaseArrayID; +static jmethodID getBaseArrayOffsetID; +static jfieldID positionID; +static jfieldID limitID; +static jfieldID elementSizeShiftID; + + +/* special calls implemented in Android's GLES wrapper used to more + * efficiently bound-check passed arrays */ +extern "C" { +#ifdef GL_VERSION_ES_CM_1_1 +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); +#endif +#ifdef GL_ES_VERSION_2_0 +static void glVertexAttribPointerBounds(GLuint indx, GLint size, GLenum type, + GLboolean normalized, GLsizei stride, const GLvoid *pointer, GLsizei count) { + glVertexAttribPointer(indx, size, type, normalized, stride, pointer); +} +#endif +#ifdef GL_ES_VERSION_3_0 +static void glVertexAttribIPointerBounds(GLuint indx, GLint size, GLenum type, + GLsizei stride, const GLvoid *pointer, GLsizei count) { + glVertexAttribIPointer(indx, size, type, stride, pointer); +} +#endif +} + +/* Cache method IDs each time the class is loaded. */ + +static void +nativeClassInit(JNIEnv *_env, jclass glImplClass) +{ + jclass nioAccessClassLocal = _env->FindClass("java/nio/NIOAccess"); + nioAccessClass = (jclass) _env->NewGlobalRef(nioAccessClassLocal); + + jclass bufferClassLocal = _env->FindClass("java/nio/Buffer"); + bufferClass = (jclass) _env->NewGlobalRef(bufferClassLocal); + + getBasePointerID = _env->GetStaticMethodID(nioAccessClass, + "getBasePointer", "(Ljava/nio/Buffer;)J"); + getBaseArrayID = _env->GetStaticMethodID(nioAccessClass, + "getBaseArray", "(Ljava/nio/Buffer;)Ljava/lang/Object;"); + getBaseArrayOffsetID = _env->GetStaticMethodID(nioAccessClass, + "getBaseArrayOffset", "(Ljava/nio/Buffer;)I"); + + positionID = _env->GetFieldID(bufferClass, "position", "I"); + limitID = _env->GetFieldID(bufferClass, "limit", "I"); + elementSizeShiftID = + _env->GetFieldID(bufferClass, "_elementSizeShift", "I"); +} + +static void * +getPointer(JNIEnv *_env, jobject buffer, jarray *array, jint *remaining, jint *offset) +{ + jint position; + jint limit; + jint elementSizeShift; + jlong pointer; + + position = _env->GetIntField(buffer, positionID); + limit = _env->GetIntField(buffer, limitID); + elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); + *remaining = (limit - position) << elementSizeShift; + pointer = _env->CallStaticLongMethod(nioAccessClass, + getBasePointerID, buffer); + if (pointer != 0L) { + *array = NULL; + return (void *) (jint) pointer; + } + + *array = (jarray) _env->CallStaticObjectMethod(nioAccessClass, + getBaseArrayID, buffer); + *offset = _env->CallStaticIntMethod(nioAccessClass, + getBaseArrayOffsetID, buffer); + + return NULL; +} + +static void +releasePointer(JNIEnv *_env, jarray array, void *data, jboolean commit) +{ + _env->ReleasePrimitiveArrayCritical(array, data, + commit ? 0 : JNI_ABORT); +} + +static void * +getDirectBufferPointer(JNIEnv *_env, jobject buffer) { + char* buf = (char*) _env->GetDirectBufferAddress(buffer); + if (buf) { + jint position = _env->GetIntField(buffer, positionID); + jint elementSizeShift = _env->GetIntField(buffer, elementSizeShiftID); + buf += position << elementSizeShift; + } else { + jniThrowException(_env, "java/lang/IllegalArgumentException", + "Must use a native order direct Buffer"); + } + return (void*) buf; +} + +// -------------------------------------------------------------------------- + +/* + * returns the number of values glGet returns for a given pname. + * + * The code below is written such that pnames requiring only one values + * are the default (and are not explicitely tested for). This makes the + * checking code much shorter/readable/efficient. + * + * This means that unknown pnames (e.g.: extensions) will default to 1. If + * that unknown pname needs more than 1 value, then the validation check + * is incomplete and the app may crash if it passed the wrong number params. + */ +static int getNeededCount(GLint pname) { + int needed = 1; +#ifdef GL_ES_VERSION_2_0 + // GLES 2.x pnames + switch (pname) { + case GL_ALIASED_LINE_WIDTH_RANGE: + case GL_ALIASED_POINT_SIZE_RANGE: + needed = 2; + break; + + case GL_BLEND_COLOR: + case GL_COLOR_CLEAR_VALUE: + case GL_COLOR_WRITEMASK: + case GL_SCISSOR_BOX: + case GL_VIEWPORT: + needed = 4; + break; + + case GL_COMPRESSED_TEXTURE_FORMATS: + glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed); + break; + + case GL_SHADER_BINARY_FORMATS: + glGetIntegerv(GL_NUM_SHADER_BINARY_FORMATS, &needed); + break; + } +#endif + +#ifdef GL_VERSION_ES_CM_1_1 + // GLES 1.x pnames + switch (pname) { + case GL_ALIASED_LINE_WIDTH_RANGE: + case GL_ALIASED_POINT_SIZE_RANGE: + case GL_DEPTH_RANGE: + case GL_SMOOTH_LINE_WIDTH_RANGE: + case GL_SMOOTH_POINT_SIZE_RANGE: + needed = 2; + break; + + case GL_CURRENT_NORMAL: + case GL_POINT_DISTANCE_ATTENUATION: + needed = 3; + break; + + case GL_COLOR_CLEAR_VALUE: + case GL_COLOR_WRITEMASK: + case GL_CURRENT_COLOR: + case GL_CURRENT_TEXTURE_COORDS: + case GL_FOG_COLOR: + case GL_LIGHT_MODEL_AMBIENT: + case GL_SCISSOR_BOX: + case GL_VIEWPORT: + needed = 4; + break; + + case GL_MODELVIEW_MATRIX: + case GL_PROJECTION_MATRIX: + case GL_TEXTURE_MATRIX: + needed = 16; + break; + + case GL_COMPRESSED_TEXTURE_FORMATS: + glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS, &needed); + break; + } +#endif + return needed; +} + +template <typename JTYPEARRAY, typename CTYPE, void GET(GLenum, CTYPE*)> +static void +get + (JNIEnv *_env, jobject _this, jint pname, JTYPEARRAY params_ref, jint offset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; + CTYPE *params_base = (CTYPE *) 0; + jint _remaining; + CTYPE *params = (CTYPE *) 0; + int _needed = 0; + + if (!params_ref) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "params == null"; + goto exit; + } + if (offset < 0) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "offset < 0"; + goto exit; + } + _remaining = _env->GetArrayLength(params_ref) - offset; + _needed = getNeededCount(pname); + // if we didn't find this pname, we just assume the user passed + // an array of the right size -- this might happen with extensions + // or if we forget an enum here. + if (_remaining < _needed) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length - offset < needed"; + goto exit; + } + params_base = (CTYPE *) + _env->GetPrimitiveArrayCritical(params_ref, (jboolean *)0); + params = params_base + offset; + + GET( + (GLenum)pname, + (CTYPE *)params + ); + +exit: + if (params_base) { + _env->ReleasePrimitiveArrayCritical(params_ref, params_base, + _exception ? JNI_ABORT: 0); + } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } +} + + +template <typename CTYPE, void GET(GLenum, CTYPE*)> +static void +getarray + (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; + jarray _array = (jarray) 0; + jint _bufferOffset = (jint) 0; + jint _remaining; + CTYPE *params = (CTYPE *) 0; + int _needed = 0; + + params = (CTYPE *)getPointer(_env, params_buf, &_array, &_remaining, &_bufferOffset); + _needed = getNeededCount(pname); + // if we didn't find this pname, we just assume the user passed + // an array of the right size -- this might happen with extensions + // or if we forget an enum here. + if (_needed>0 && _remaining < _needed) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "remaining() < needed"; + goto exit; + } + if (params == NULL) { + char * _paramsBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); + params = (CTYPE *) (_paramsBase + _bufferOffset); + } + GET( + (GLenum)pname, + (CTYPE *)params + ); + +exit: + if (_array) { + releasePointer(_env, _array, params, _exception ? JNI_FALSE : JNI_TRUE); + } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } +} + +// -------------------------------------------------------------------------- diff --git a/opengl/tools/glgen/stubs/gles11/glDrawElementsInstanced.cpp b/opengl/tools/glgen/stubs/gles11/glDrawElementsInstanced.cpp new file mode 100644 index 0000000..41df486 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glDrawElementsInstanced.cpp @@ -0,0 +1,39 @@ +/* void glDrawElementsInstanced ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instanceCount ) */ +static void +android_glDrawElementsInstanced__IIILjava_nio_Buffer_2I + (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jobject indices_buf, jint instanceCount) { + jarray _array = (jarray) 0; + jint _bufferOffset = (jint) 0; + jint _remaining; + GLvoid *indices = (GLvoid *) 0; + + indices = (GLvoid *)getPointer(_env, indices_buf, &_array, &_remaining, &_bufferOffset); + if (indices == NULL) { + char * _indicesBase = (char *)_env->GetPrimitiveArrayCritical(_array, (jboolean *) 0); + indices = (GLvoid *) (_indicesBase + _bufferOffset); + } + glDrawElementsInstanced( + (GLenum)mode, + (GLsizei)count, + (GLenum)type, + (GLvoid *)indices, + (GLsizei)instanceCount + ); + if (_array) { + releasePointer(_env, _array, indices, JNI_FALSE); + } +} + +/* void glDrawElementsInstanced ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instanceCount ) */ +static void +android_glDrawElementsInstanced__IIIII + (JNIEnv *_env, jobject _this, jint mode, jint count, jint type, jint indicesOffset, jint instanceCount) { + glDrawElementsInstanced( + (GLenum)mode, + (GLsizei)count, + (GLenum)type, + (GLvoid *)indicesOffset, + (GLsizei)instanceCount + ); +} + diff --git a/opengl/tools/glgen/stubs/gles11/glDrawElementsInstanced.java b/opengl/tools/glgen/stubs/gles11/glDrawElementsInstanced.java new file mode 100644 index 0000000..53651ce --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glDrawElementsInstanced.java @@ -0,0 +1,20 @@ + // C function void glDrawElementsInstanced ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instanceCount ) + + public static native void glDrawElementsInstanced( + int mode, + int count, + int type, + java.nio.Buffer indices, + int instanceCount + ); + + // C function void glDrawElementsInstanced ( GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instanceCount ) + + public static native void glDrawElementsInstanced( + int mode, + int count, + int type, + int indicesOffset, + int instanceCount + ); + diff --git a/opengl/tools/glgen/stubs/gles11/glDrawElementsInstanced.nativeReg b/opengl/tools/glgen/stubs/gles11/glDrawElementsInstanced.nativeReg new file mode 100644 index 0000000..3b7424c --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glDrawElementsInstanced.nativeReg @@ -0,0 +1,2 @@ +{"glDrawElementsInstanced", "(IIILjava/nio/Buffer;I)V", (void *) android_glDrawElementsInstanced__IIILjava_nio_Buffer_2I }, +{"glDrawElementsInstanced", "(IIIII)V", (void *) android_glDrawElementsInstanced__IIIII }, diff --git a/opengl/tools/glgen/stubs/gles11/glGetActiveUniformBlockName.cpp b/opengl/tools/glgen/stubs/gles11/glGetActiveUniformBlockName.cpp new file mode 100644 index 0000000..bb6ae7c --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetActiveUniformBlockName.cpp @@ -0,0 +1,127 @@ +/* void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName ) */ +static void +android_glGetActiveUniformBlockName_III_3II_3BI + (JNIEnv* _env, jobject _this, jint program, jint uniformBlockIndex, int bufSize, jintArray length_ref, jint lengthOffset, jbyteArray name_ref, jint nameOffset) { + jint _exception = 0; + const char* _exceptionType; + const char* _exceptionMessage; + GLsizei* _length_base = (GLsizei*)0; + jint _lengthRemaining; + GLsizei* _length = (GLsizei*)0; + GLchar* _name_base = (GLchar*)0; + jint _nameRemaining; + GLchar* _name = (GLchar*)0; + + if (!length_ref) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length == null"; + goto exit; + } + if (lengthOffset < 0) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "lengthOffset < 0"; + goto exit; + } + _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset; + _length_base = (GLsizei*)_env->GetPrimitiveArrayCritical( + length_ref, (jboolean*)0); + _length = _length_base + lengthOffset; + + if (!name_ref) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "uniformBlockName == null"; + goto exit; + } + if (nameOffset < 0) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "uniformBlockNameOffset < 0"; + goto exit; + } + _nameRemaining = _env->GetArrayLength(name_ref) - nameOffset; + _name_base = (GLchar*)_env->GetPrimitiveArrayCritical( + name_ref, (jboolean*)0); + _name = _name_base + nameOffset; + + glGetActiveUniformBlockName( + (GLuint)program, + (GLuint)uniformBlockIndex, + (GLsizei)bufSize, + (GLsizei*)_length, + (GLchar*)_name + ); + +exit: + if (_name_base) { + _env->ReleasePrimitiveArrayCritical(name_ref, _name_base, + _exception ? JNI_ABORT: 0); + } + if (_length_base) { + _env->ReleasePrimitiveArrayCritical(length_ref, _length_base, + _exception ? JNI_ABORT: 0); + } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } +} + +/* void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName ) */ +static void +android_glGetActiveUniformBlockName_IILjava_nio_Buffer_2Ljava_nio_Buffer_2 + (JNIEnv* _env, jobject _this, jint program, jint uniformBlockIndex, jobject length_buf, jobject uniformBlockName_buf) { + jint _exception = 0; + const char* _exceptionType; + const char* _exceptionMessage; + jarray _lengthArray = (jarray)0; + jint _lengthBufferOffset = (jint)0; + GLsizei* _length = (GLsizei*)0; + jint _lengthRemaining; + jarray _nameArray = (jarray)0; + jint _nameBufferOffset = (jint)0; + GLchar* _name = (GLchar*)0; + jint _nameRemaining; + + _length = (GLsizei*)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset); + if (_length == NULL) { + GLsizei* _lengthBase = (GLsizei*)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean*)0); + _length = (GLsizei*)(_lengthBase + _lengthBufferOffset); + } + + _name = (GLchar*)getPointer(_env, uniformBlockName_buf, &_nameArray, &_nameRemaining, &_nameBufferOffset); + if (_name == NULL) { + GLchar* _nameBase = (GLchar*)_env->GetPrimitiveArrayCritical(_nameArray, (jboolean*)0); + _name = (GLchar*)(_nameBase + _nameBufferOffset); + } + + glGetActiveUniformBlockName( + (GLuint)program, + (GLuint)uniformBlockIndex, + (GLsizei)_nameRemaining, + _length, _name + ); + if (_nameArray) { + releasePointer(_env, _nameArray, _name, JNI_TRUE); + } + if (_lengthArray) { + releasePointer(_env, _lengthArray, _length, JNI_TRUE); + } +} + +/* void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName ) */ +static jstring +android_glGetActiveUniformBlockName_II + (JNIEnv *_env, jobject _this, jint program, jint uniformBlockIndex) { + GLint len = 0; + glGetActiveUniformBlockiv((GLuint)program, (GLuint)uniformBlockIndex, + GL_UNIFORM_BLOCK_NAME_LENGTH, &len); + GLchar* name = (GLchar*)malloc(len); + glGetActiveUniformBlockName((GLuint)program, (GLuint)uniformBlockIndex, + len, NULL, name); + jstring result = _env->NewStringUTF(name); + free(name); + return result; +} + diff --git a/opengl/tools/glgen/stubs/gles11/glGetActiveUniformBlockName.java b/opengl/tools/glgen/stubs/gles11/glGetActiveUniformBlockName.java new file mode 100644 index 0000000..3d9ed0f --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetActiveUniformBlockName.java @@ -0,0 +1,28 @@ + // C function void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName ) + + public static native void glGetActiveUniformBlockName( + int program, + int uniformBlockIndex, + int bufSize, + int[] length, + int lengthOffset, + byte[] uniformBlockName, + int uniformBlockNameOffset + ); + + // C function void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName ) + + public static native void glGetActiveUniformBlockName( + int program, + int uniformBlockIndex, + java.nio.Buffer length, + java.nio.Buffer uniformBlockName + ); + + // C function void glGetActiveUniformBlockName ( GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName ) + + public static native String glGetActiveUniformBlockName( + int program, + int uniformBlockIndex + ); + diff --git a/opengl/tools/glgen/stubs/gles11/glGetActiveUniformBlockName.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetActiveUniformBlockName.nativeReg new file mode 100644 index 0000000..fb37689 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetActiveUniformBlockName.nativeReg @@ -0,0 +1,3 @@ +{"glGetActiveUniformBlockName", "(III[II[BI)V", (void *) android_glGetActiveUniformBlockName_III_3II_3BI }, +{"glGetActiveUniformBlockName", "(IILjava/nio/Buffer;Ljava/nio/Buffer;)V", (void *) android_glGetActiveUniformBlockName_IILjava_nio_Buffer_2Ljava_nio_Buffer_2 }, +{"glGetActiveUniformBlockName", "(II)Ljava/lang/String;", (void *) android_glGetActiveUniformBlockName_II },
\ No newline at end of file diff --git a/opengl/tools/glgen/stubs/gles11/glGetBooleanv.cpp b/opengl/tools/glgen/stubs/gles11/glGetBooleanv.cpp new file mode 100644 index 0000000..00c52af --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetBooleanv.cpp @@ -0,0 +1,13 @@ +/* void glGetBooleanv ( GLenum pname, GLboolean *params ) */ +static void +android_glGetBooleanv__I_3ZI + (JNIEnv *_env, jobject _this, jint pname, jbooleanArray params_ref, jint offset) { + get<jbooleanArray, GLboolean, glGetBooleanv>(_env, _this, pname, params_ref, offset); +} + +/* void glGetBooleanv ( GLenum pname, GLboolean *params ) */ +static void +android_glGetBooleanv__ILjava_nio_IntBuffer_2 + (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { + getarray<GLboolean, glGetBooleanv>(_env, _this, pname, params_buf); +} diff --git a/opengl/tools/glgen/stubs/gles11/glGetBooleanv.java b/opengl/tools/glgen/stubs/gles11/glGetBooleanv.java new file mode 100644 index 0000000..3ec9b24 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetBooleanv.java @@ -0,0 +1,15 @@ + // C function void glGetBooleanv ( GLenum pname, GLboolean *params ) + + public static native void glGetBooleanv( + int pname, + boolean[] params, + int offset + ); + + // C function void glGetBooleanv ( GLenum pname, GLboolean *params ) + + public static native void glGetBooleanv( + int pname, + java.nio.IntBuffer params + ); + diff --git a/opengl/tools/glgen/stubs/gles11/glGetBooleanv.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetBooleanv.nativeReg new file mode 100644 index 0000000..d0bc8b8 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetBooleanv.nativeReg @@ -0,0 +1,2 @@ +{"glGetBooleanv", "(I[ZI)V", (void *) android_glGetBooleanv__I_3ZI }, +{"glGetBooleanv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetBooleanv__ILjava_nio_IntBuffer_2 }, diff --git a/opengl/tools/glgen/stubs/gles11/glGetBufferPointerv.cpp b/opengl/tools/glgen/stubs/gles11/glGetBufferPointerv.cpp new file mode 100644 index 0000000..7016c4b --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetBufferPointerv.cpp @@ -0,0 +1,11 @@ +/* void glGetBufferPointerv ( GLenum target, GLenum pname, GLvoid** params ) */ +static jobject +android_glGetBufferPointerv__II + (JNIEnv *_env, jobject _this, jint target, jint pname) { + GLint64 _mapLength; + GLvoid* _p; + glGetBufferParameteri64v((GLenum)target, GL_BUFFER_MAP_LENGTH, &_mapLength); + glGetBufferPointerv((GLenum)target, (GLenum)pname, &_p); + return _env->NewDirectByteBuffer(_p, _mapLength); +} + diff --git a/opengl/tools/glgen/stubs/gles11/glGetBufferPointerv.java b/opengl/tools/glgen/stubs/gles11/glGetBufferPointerv.java new file mode 100644 index 0000000..c966e11 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetBufferPointerv.java @@ -0,0 +1,7 @@ + // C function void glGetBufferPointerv ( GLenum target, GLenum pname, GLvoid** params ) + + public static native java.nio.Buffer glGetBufferPointerv( + int target, + int pname + ); + diff --git a/opengl/tools/glgen/stubs/gles11/glGetBufferPointerv.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetBufferPointerv.nativeReg new file mode 100644 index 0000000..7886451 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetBufferPointerv.nativeReg @@ -0,0 +1 @@ +{"glGetBufferPointerv", "(II)Ljava/nio/Buffer;", (void *) android_glGetBufferPointerv__II },
\ No newline at end of file diff --git a/opengl/tools/glgen/stubs/gles11/glGetFloatv.cpp b/opengl/tools/glgen/stubs/gles11/glGetFloatv.cpp new file mode 100644 index 0000000..71c399d --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetFloatv.cpp @@ -0,0 +1,13 @@ +/* void glGetFloatv ( GLenum pname, GLfloat *params ) */ +static void +android_glGetFloatv__I_3FI + (JNIEnv *_env, jobject _this, jint pname, jfloatArray params_ref, jint offset) { + get<jfloatArray, GLfloat, glGetFloatv>(_env, _this, pname, params_ref, offset); +} + +/* void glGetFloatv ( GLenum pname, GLfloat *params ) */ +static void +android_glGetFloatv__ILjava_nio_FloatBuffer_2 + (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { + getarray<GLfloat, glGetFloatv>(_env, _this, pname, params_buf); +} diff --git a/opengl/tools/glgen/stubs/gles11/glGetFloatv.java b/opengl/tools/glgen/stubs/gles11/glGetFloatv.java new file mode 100644 index 0000000..53b5c01 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetFloatv.java @@ -0,0 +1,15 @@ + // C function void glGetFloatv ( GLenum pname, GLfloat *params ) + + public static native void glGetFloatv( + int pname, + float[] params, + int offset + ); + + // C function void glGetFloatv ( GLenum pname, GLfloat *params ) + + public static native void glGetFloatv( + int pname, + java.nio.FloatBuffer params + ); + diff --git a/opengl/tools/glgen/stubs/gles11/glGetFloatv.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetFloatv.nativeReg new file mode 100644 index 0000000..93058c6 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetFloatv.nativeReg @@ -0,0 +1,2 @@ +{"glGetFloatv", "(I[FI)V", (void *) android_glGetFloatv__I_3FI }, +{"glGetFloatv", "(ILjava/nio/FloatBuffer;)V", (void *) android_glGetFloatv__ILjava_nio_FloatBuffer_2 }, diff --git a/opengl/tools/glgen/stubs/gles11/glGetIntegerv.cpp b/opengl/tools/glgen/stubs/gles11/glGetIntegerv.cpp new file mode 100644 index 0000000..9000ece --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetIntegerv.cpp @@ -0,0 +1,14 @@ +/* void glGetIntegerv ( GLenum pname, GLint *params ) */ +static void +android_glGetIntegerv__I_3II + (JNIEnv *_env, jobject _this, jint pname, jintArray params_ref, jint offset) { + get<jintArray, GLint, glGetIntegerv>(_env, _this, pname, params_ref, offset); +} + +/* void glGetIntegerv ( GLenum pname, GLint *params ) */ +static void +android_glGetIntegerv__ILjava_nio_IntBuffer_2 + (JNIEnv *_env, jobject _this, jint pname, jobject params_buf) { + getarray<GLint, glGetIntegerv>(_env, _this, pname, params_buf); +} + diff --git a/opengl/tools/glgen/stubs/gles11/glGetIntegerv.java b/opengl/tools/glgen/stubs/gles11/glGetIntegerv.java new file mode 100644 index 0000000..e8b42c9 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetIntegerv.java @@ -0,0 +1,15 @@ + // C function void glGetIntegerv ( GLenum pname, GLint *params ) + + public static native void glGetIntegerv( + int pname, + int[] params, + int offset + ); + + // C function void glGetIntegerv ( GLenum pname, GLint *params ) + + public static native void glGetIntegerv( + int pname, + java.nio.IntBuffer params + ); + diff --git a/opengl/tools/glgen/stubs/gles11/glGetIntegerv.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetIntegerv.nativeReg new file mode 100644 index 0000000..c39cd92 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetIntegerv.nativeReg @@ -0,0 +1,2 @@ +{"glGetIntegerv", "(I[II)V", (void *) android_glGetIntegerv__I_3II }, +{"glGetIntegerv", "(ILjava/nio/IntBuffer;)V", (void *) android_glGetIntegerv__ILjava_nio_IntBuffer_2 }, diff --git a/opengl/tools/glgen/stubs/gles11/glGetProgramInfoLog.java b/opengl/tools/glgen/stubs/gles11/glGetProgramInfoLog.java index 762df39..da0a1fd 100644 --- a/opengl/tools/glgen/stubs/gles11/glGetProgramInfoLog.java +++ b/opengl/tools/glgen/stubs/gles11/glGetProgramInfoLog.java @@ -1,21 +1,5 @@ -/* - * Copyright (C) 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. - */ - // C function void glGetProgramInfoLog( GLuint program, GLsizei maxLength, GLsizei * length, - // GLchar * infoLog); + // GLchar * infoLog); public static native String glGetProgramInfoLog( int program diff --git a/opengl/tools/glgen/stubs/gles11/glGetShaderInfoLog.java b/opengl/tools/glgen/stubs/gles11/glGetShaderInfoLog.java index af529c0..dc1db5b 100644 --- a/opengl/tools/glgen/stubs/gles11/glGetShaderInfoLog.java +++ b/opengl/tools/glgen/stubs/gles11/glGetShaderInfoLog.java @@ -1,21 +1,5 @@ -/* - * Copyright (C) 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. - */ - // C function void glGetShaderInfoLog( GLuint shader, GLsizei maxLength, GLsizei * length, - // GLchar * infoLog); + // GLchar * infoLog); public static native String glGetShaderInfoLog( int shader diff --git a/opengl/tools/glgen/stubs/gles11/glGetString.java b/opengl/tools/glgen/stubs/gles11/glGetString.java index b02a0d1..3d4fe5b 100644 --- a/opengl/tools/glgen/stubs/gles11/glGetString.java +++ b/opengl/tools/glgen/stubs/gles11/glGetString.java @@ -1,19 +1,3 @@ -/* - * Copyright (C) 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. - */ - // C function const GLubyte * glGetString ( GLenum name ) public static native String glGetString( diff --git a/opengl/tools/glgen/stubs/gles11/glGetStringi.cpp b/opengl/tools/glgen/stubs/gles11/glGetStringi.cpp new file mode 100644 index 0000000..1611539 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetStringi.cpp @@ -0,0 +1,8 @@ +/* const GLubyte * glGetStringi ( GLenum name, GLuint index ) */ +static jstring +android_glGetStringi__II + (JNIEnv *_env, jobject _this, jint name, jint index) { + const GLubyte* _chars = glGetStringi((GLenum)name, (GLuint)index); + return _env->NewStringUTF((const char*)_chars); +} + diff --git a/opengl/tools/glgen/stubs/gles11/glGetStringi.java b/opengl/tools/glgen/stubs/gles11/glGetStringi.java new file mode 100644 index 0000000..523d4c7 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetStringi.java @@ -0,0 +1,7 @@ + // C function const GLubyte * glGetStringi ( GLenum name, GLuint index ) + + public static native String glGetStringi( + int name, + int index + ); + diff --git a/opengl/tools/glgen/stubs/gles11/glGetStringi.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetStringi.nativeReg new file mode 100644 index 0000000..e7ee353 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetStringi.nativeReg @@ -0,0 +1 @@ +{"glGetStringi", "(II)Ljava/lang/String;", (void *) android_glGetStringi__II },
\ No newline at end of file diff --git a/opengl/tools/glgen/stubs/gles11/glGetTransformFeedbackVarying.cpp b/opengl/tools/glgen/stubs/gles11/glGetTransformFeedbackVarying.cpp new file mode 100644 index 0000000..0514fe9 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetTransformFeedbackVarying.cpp @@ -0,0 +1,328 @@ +/* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */ +static void +android_glGetTransformFeedbackVarying__III_3II_3II_3II_3BI + (JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jintArray length_ref, jint lengthOffset, jintArray size_ref, jint sizeOffset, jintArray type_ref, jint typeOffset, jbyteArray name_ref, jint nameOffset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; + GLsizei *length_base = (GLsizei *) 0; + jint _lengthRemaining; + GLsizei *length = (GLsizei *) 0; + GLint *size_base = (GLint *) 0; + jint _sizeRemaining; + GLint *size = (GLint *) 0; + GLenum *type_base = (GLenum *) 0; + jint _typeRemaining; + GLenum *type = (GLenum *) 0; + char *name_base = (char *) 0; + jint _nameRemaining; + char *name = (char *) 0; + + if (!length_ref) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "length == null"; + goto exit; + } + if (lengthOffset < 0) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "lengthOffset < 0"; + goto exit; + } + _lengthRemaining = _env->GetArrayLength(length_ref) - lengthOffset; + length_base = (GLsizei *) + _env->GetPrimitiveArrayCritical(length_ref, (jboolean *)0); + length = length_base + lengthOffset; + + if (!size_ref) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "size == null"; + goto exit; + } + if (sizeOffset < 0) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "sizeOffset < 0"; + goto exit; + } + _sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset; + size_base = (GLint *) + _env->GetPrimitiveArrayCritical(size_ref, (jboolean *)0); + size = size_base + sizeOffset; + + if (!type_ref) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "type == null"; + goto exit; + } + if (typeOffset < 0) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "typeOffset < 0"; + goto exit; + } + _typeRemaining = _env->GetArrayLength(type_ref) - typeOffset; + type_base = (GLenum *) + _env->GetPrimitiveArrayCritical(type_ref, (jboolean *)0); + type = type_base + typeOffset; + + if (!name_ref) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "name == null"; + goto exit; + } + if (nameOffset < 0) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "nameOffset < 0"; + goto exit; + } + _nameRemaining = _env->GetArrayLength(name_ref) - nameOffset; + name_base = (char *) + _env->GetPrimitiveArrayCritical(name_ref, (jboolean *)0); + name = name_base + nameOffset; + + glGetTransformFeedbackVarying( + (GLuint)program, + (GLuint)index, + (GLsizei)bufsize, + (GLsizei *)length, + (GLint *)size, + (GLenum *)type, + (char *)name + ); + +exit: + if (name_base) { + _env->ReleasePrimitiveArrayCritical(name_ref, name_base, + _exception ? JNI_ABORT: 0); + } + if (type_base) { + _env->ReleasePrimitiveArrayCritical(type_ref, type_base, + _exception ? JNI_ABORT: 0); + } + if (size_base) { + _env->ReleasePrimitiveArrayCritical(size_ref, size_base, + _exception ? JNI_ABORT: 0); + } + if (length_base) { + _env->ReleasePrimitiveArrayCritical(length_ref, length_base, + _exception ? JNI_ABORT: 0); + } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } +} + +/* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */ +static void +android_glGetTransformFeedbackVarying__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B + (JNIEnv *_env, jobject _this, jint program, jint index, jint bufsize, jobject length_buf, jobject size_buf, jobject type_buf, jbyte name) { + jarray _lengthArray = (jarray) 0; + jint _lengthBufferOffset = (jint) 0; + jarray _sizeArray = (jarray) 0; + jint _sizeBufferOffset = (jint) 0; + jarray _typeArray = (jarray) 0; + jint _typeBufferOffset = (jint) 0; + jint _lengthRemaining; + GLsizei *length = (GLsizei *) 0; + jint _sizeRemaining; + GLint *size = (GLint *) 0; + jint _typeRemaining; + GLenum *type = (GLenum *) 0; + + length = (GLsizei *)getPointer(_env, length_buf, &_lengthArray, &_lengthRemaining, &_lengthBufferOffset); + size = (GLint *)getPointer(_env, size_buf, &_sizeArray, &_sizeRemaining, &_sizeBufferOffset); + type = (GLenum *)getPointer(_env, type_buf, &_typeArray, &_typeRemaining, &_typeBufferOffset); + if (length == NULL) { + char * _lengthBase = (char *)_env->GetPrimitiveArrayCritical(_lengthArray, (jboolean *) 0); + length = (GLsizei *) (_lengthBase + _lengthBufferOffset); + } + if (size == NULL) { + char * _sizeBase = (char *)_env->GetPrimitiveArrayCritical(_sizeArray, (jboolean *) 0); + size = (GLint *) (_sizeBase + _sizeBufferOffset); + } + if (type == NULL) { + char * _typeBase = (char *)_env->GetPrimitiveArrayCritical(_typeArray, (jboolean *) 0); + type = (GLenum *) (_typeBase + _typeBufferOffset); + } + glGetTransformFeedbackVarying( + (GLuint)program, + (GLuint)index, + (GLsizei)bufsize, + (GLsizei *)length, + (GLint *)size, + (GLenum *)type, + (char *)name + ); + if (_typeArray) { + releasePointer(_env, _typeArray, type, JNI_TRUE); + } + if (_sizeArray) { + releasePointer(_env, _sizeArray, size, JNI_TRUE); + } + if (_lengthArray) { + releasePointer(_env, _lengthArray, length, JNI_TRUE); + } +} + +/* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */ +static jstring +android_glGetTransformFeedbackVarying1 + (JNIEnv *_env, jobject _this, jint program, jint index, jintArray size_ref, jint sizeOffset, jintArray type_ref, jint typeOffset) { + jint _exception = 0; + const char * _exceptionType; + const char * _exceptionMessage; + GLint *size_base = (GLint *) 0; + jint _sizeRemaining; + GLint *size = (GLint *) 0; + GLenum *type_base = (GLenum *) 0; + jint _typeRemaining; + GLenum *type = (GLenum *) 0; + + jstring result = 0; + + GLint len = 0; + glGetProgramiv((GLuint)program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &len); + if (!len) { + return _env->NewStringUTF(""); + } + char* buf = (char*) malloc(len); + + if (buf == NULL) { + jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory"); + return NULL; + } + if (!size_ref) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "size == null"; + goto exit; + } + if (sizeOffset < 0) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "sizeOffset < 0"; + goto exit; + } + _sizeRemaining = _env->GetArrayLength(size_ref) - sizeOffset; + size_base = (GLint *) + _env->GetPrimitiveArrayCritical(size_ref, (jboolean *)0); + size = size_base + sizeOffset; + + if (!type_ref) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "type == null"; + goto exit; + } + if (typeOffset < 0) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "typeOffset < 0"; + goto exit; + } + _typeRemaining = _env->GetArrayLength(type_ref) - typeOffset; + type_base = (GLenum *) + _env->GetPrimitiveArrayCritical(type_ref, (jboolean *)0); + type = type_base + typeOffset; + + glGetTransformFeedbackVarying( + (GLuint)program, + (GLuint)index, + (GLsizei)len, + NULL, + (GLint *)size, + (GLenum *)type, + (char *)buf + ); +exit: + if (type_base) { + _env->ReleasePrimitiveArrayCritical(type_ref, type_base, + _exception ? JNI_ABORT: 0); + } + if (size_base) { + _env->ReleasePrimitiveArrayCritical(size_ref, size_base, + _exception ? JNI_ABORT: 0); + } + if (_exception != 1) { + result = _env->NewStringUTF(buf); + } + if (buf) { + free(buf); + } + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } + if (result == 0) { + result = _env->NewStringUTF(""); + } + + return result; +} + +/* void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) */ +static jstring +android_glGetTransformFeedbackVarying2 + (JNIEnv *_env, jobject _this, jint program, jint index, jobject size_buf, jobject type_buf) { + jarray _sizeArray = (jarray) 0; + jint _sizeBufferOffset = (jint) 0; + jarray _typeArray = (jarray) 0; + jint _typeBufferOffset = (jint) 0; + jint _lengthRemaining; + GLsizei *length = (GLsizei *) 0; + jint _sizeRemaining; + GLint *size = (GLint *) 0; + jint _typeRemaining; + GLenum *type = (GLenum *) 0; + + jstring result = 0; + + GLint len = 0; + glGetProgramiv((GLuint)program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &len); + if (!len) { + return _env->NewStringUTF(""); + } + char* buf = (char*) malloc(len); + + if (buf == NULL) { + jniThrowException(_env, "java/lang/IllegalArgumentException", "out of memory"); + return NULL; + } + + size = (GLint *)getPointer(_env, size_buf, &_sizeArray, &_sizeRemaining, &_sizeBufferOffset); + type = (GLenum *)getPointer(_env, type_buf, &_typeArray, &_typeRemaining, &_typeBufferOffset); + if (size == NULL) { + char * _sizeBase = (char *)_env->GetPrimitiveArrayCritical(_sizeArray, (jboolean *) 0); + size = (GLint *) (_sizeBase + _sizeBufferOffset); + } + if (type == NULL) { + char * _typeBase = (char *)_env->GetPrimitiveArrayCritical(_typeArray, (jboolean *) 0); + type = (GLenum *) (_typeBase + _typeBufferOffset); + } + glGetTransformFeedbackVarying( + (GLuint)program, + (GLuint)index, + (GLsizei)len, + NULL, + (GLint *)size, + (GLenum *)type, + (char *)buf + ); + + if (_typeArray) { + releasePointer(_env, _typeArray, type, JNI_TRUE); + } + if (_sizeArray) { + releasePointer(_env, _sizeArray, size, JNI_TRUE); + } + result = _env->NewStringUTF(buf); + if (buf) { + free(buf); + } + return result; +} diff --git a/opengl/tools/glgen/stubs/gles11/glGetTransformFeedbackVarying.java b/opengl/tools/glgen/stubs/gles11/glGetTransformFeedbackVarying.java new file mode 100644 index 0000000..f73bbfe --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetTransformFeedbackVarying.java @@ -0,0 +1,48 @@ + // C function void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) + + public static native void glGetTransformFeedbackVarying( + int program, + int index, + int bufsize, + int[] length, + int lengthOffset, + int[] size, + int sizeOffset, + int[] type, + int typeOffset, + byte[] name, + int nameOffset + ); + + // C function void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) + + public static native void glGetTransformFeedbackVarying( + int program, + int index, + int bufsize, + java.nio.IntBuffer length, + java.nio.IntBuffer size, + java.nio.IntBuffer type, + byte name + ); + + // C function void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) + + public static native String glGetTransformFeedbackVarying( + int program, + int index, + int[] size, + int sizeOffset, + int[] type, + int typeOffset + ); + + // C function void glGetTransformFeedbackVarying ( GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name ) + + public static native String glGetTransformFeedbackVarying( + int program, + int index, + java.nio.IntBuffer size, + java.nio.IntBuffer type + ); + diff --git a/opengl/tools/glgen/stubs/gles11/glGetTransformFeedbackVarying.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetTransformFeedbackVarying.nativeReg new file mode 100644 index 0000000..412d04c --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetTransformFeedbackVarying.nativeReg @@ -0,0 +1,4 @@ +{"glGetTransformFeedbackVarying", "(III[II[II[II[BI)V", (void *) android_glGetTransformFeedbackVarying__III_3II_3II_3II_3BI }, +{"glGetTransformFeedbackVarying", "(IIILjava/nio/IntBuffer;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;B)V", (void *) android_glGetTransformFeedbackVarying__IIILjava_nio_IntBuffer_2Ljava_nio_IntBuffer_2Ljava_nio_IntBuffer_2B }, +{"glGetTransformFeedbackVarying", "(II[II[II)Ljava/lang/String;", (void *) android_glGetTransformFeedbackVarying1 }, +{"glGetTransformFeedbackVarying", "(IILjava/nio/IntBuffer;Ljava/nio/IntBuffer;)Ljava/lang/String;", (void *) android_glGetTransformFeedbackVarying2 }, diff --git a/opengl/tools/glgen/stubs/gles11/glGetUniformIndices.cpp b/opengl/tools/glgen/stubs/gles11/glGetUniformIndices.cpp new file mode 100644 index 0000000..fb137ab --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetUniformIndices.cpp @@ -0,0 +1,154 @@ +/* void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices ) */ +static +void +android_glGetUniformIndices_array + (JNIEnv *_env, jobject _this, jint program, jobjectArray uniformNames_ref, jintArray uniformIndices_ref, jint uniformIndicesOffset) { + jint _exception = 0; + const char* _exceptionType = NULL; + const char* _exceptionMessage = NULL; + jint _count = 0; + jint _i; + const char** _names = NULL; + GLuint* _indices_base = NULL; + GLuint* _indices = NULL; + + if (!uniformNames_ref) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "uniformNames == null"; + goto exit; + } + _count = _env->GetArrayLength(uniformNames_ref); + _names = (const char**)calloc(_count, sizeof(const char*)); + for (_i = 0; _i < _count; _i++) { + jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i); + if (!_name) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "null uniformNames element"; + goto exit; + } + _names[_i] = _env->GetStringUTFChars(_name, 0); + } + + if (!uniformIndices_ref) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "uniformIndices == null"; + goto exit; + } + if (uniformIndicesOffset < 0) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "uniformIndicesOffset < 0"; + goto exit; + } + if (_env->GetArrayLength(uniformIndices_ref) - uniformIndicesOffset < _count) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "not enough space in uniformIndices"; + goto exit; + } + _indices_base = (GLuint*)_env->GetPrimitiveArrayCritical( + uniformIndices_ref, 0); + _indices = _indices_base + uniformIndicesOffset; + + glGetUniformIndices(program, _count, _names, _indices); + +exit: + if (_indices_base) { + _env->ReleasePrimitiveArrayCritical(uniformIndices_ref, _indices_base, + _exception ? JNI_ABORT : 0); + } + for (_i = _count - 1; _i >= 0; _i--) { + if (_names[_i]) { + jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i); + if (_name) { + _env->ReleaseStringUTFChars(_name, _names[_i]); + } + } + } + free(_names); + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } +} + +/* void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices ) */ +static +void +android_glGetUniformIndices_buffer + (JNIEnv *_env, jobject _this, jint program, jobjectArray uniformNames_ref, jobject uniformIndices_buf) { + jint _exception = 0; + const char* _exceptionType = NULL; + const char* _exceptionMessage = NULL; + jint _count = 0; + jint _i; + const char** _names = NULL; + jarray _uniformIndicesArray = (jarray)0; + jint _uniformIndicesRemaining; + jint _uniformIndicesOffset = 0; + GLuint* _indices = NULL; + char* _indicesBase = NULL; + + if (!uniformNames_ref) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "uniformNames == null"; + goto exit; + } + if (!uniformIndices_buf) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "uniformIndices == null"; + goto exit; + } + + _count = _env->GetArrayLength(uniformNames_ref); + _names = (const char**)calloc(_count, sizeof(const char*)); + for (_i = 0; _i < _count; _i++) { + jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i); + if (!_name) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "null uniformNames element"; + goto exit; + } + _names[_i] = _env->GetStringUTFChars(_name, 0); + } + + _indices = (GLuint*)getPointer(_env, uniformIndices_buf, + &_uniformIndicesArray, &_uniformIndicesRemaining, + &_uniformIndicesOffset); + if (!_indices) { + _indicesBase = (char*)_env->GetPrimitiveArrayCritical( + _uniformIndicesArray, 0); + _indices = (GLuint*)(_indicesBase + _uniformIndicesOffset); + } + if (_uniformIndicesRemaining < _count) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "not enough space in uniformIndices"; + goto exit; + } + + glGetUniformIndices(program, _count, _names, _indices); + +exit: + if (_uniformIndicesArray) { + releasePointer(_env, _uniformIndicesArray, _indicesBase, JNI_TRUE); + } + for (_i = _count - 1; _i >= 0; _i--) { + if (_names[_i]) { + jstring _name = (jstring)_env->GetObjectArrayElement(uniformNames_ref, _i); + if (_name) { + _env->ReleaseStringUTFChars(_name, _names[_i]); + } + } + } + free(_names); + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } +} + diff --git a/opengl/tools/glgen/stubs/gles11/glGetUniformIndices.java b/opengl/tools/glgen/stubs/gles11/glGetUniformIndices.java new file mode 100644 index 0000000..719429b --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetUniformIndices.java @@ -0,0 +1,17 @@ + // C function void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices ) + + public static native void glGetUniformIndices( + int program, + String[] uniformNames, + int[] uniformIndices, + int uniformIndicesOffset + ); + + // C function void glGetUniformIndices ( GLuint program, GLsizei uniformCount, const GLchar *const *uniformNames, GLuint *uniformIndices ) + + public static native void glGetUniformIndices( + int program, + String[] uniformNames, + java.nio.IntBuffer uniformIndices + ); + diff --git a/opengl/tools/glgen/stubs/gles11/glGetUniformIndices.nativeReg b/opengl/tools/glgen/stubs/gles11/glGetUniformIndices.nativeReg new file mode 100644 index 0000000..6e72c31 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glGetUniformIndices.nativeReg @@ -0,0 +1,2 @@ +{"glGetUniformIndices", "(I[Ljava/lang/String;[II)V", (void *) android_glGetUniformIndices_array }, +{"glGetUniformIndices", "(I[Ljava/lang/String;Ljava/nio/IntBuffer;)V", (void *) android_glGetUniformIndices_buffer }, diff --git a/opengl/tools/glgen/stubs/gles11/glMapBufferRange.cpp b/opengl/tools/glgen/stubs/gles11/glMapBufferRange.cpp new file mode 100644 index 0000000..2485642 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glMapBufferRange.cpp @@ -0,0 +1,13 @@ +/* GLvoid * glMapBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access ) */ +static jobject +android_glMapBufferRange__IIII + (JNIEnv *_env, jobject _this, jint target, jint offset, jint length, jint access) { + GLvoid* _p = glMapBufferRange((GLenum)target, + (GLintptr)offset, (GLsizeiptr)length, (GLbitfield)access); + jobject _buf = (jobject)0; + if (_p) { + _buf = _env->NewDirectByteBuffer(_p, length); + } + return _buf; +} + diff --git a/opengl/tools/glgen/stubs/gles11/glMapBufferRange.java b/opengl/tools/glgen/stubs/gles11/glMapBufferRange.java new file mode 100644 index 0000000..482ea99 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glMapBufferRange.java @@ -0,0 +1,9 @@ + // C function GLvoid * glMapBufferRange ( GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access ) + + public static native java.nio.Buffer glMapBufferRange( + int target, + int offset, + int length, + int access + ); + diff --git a/opengl/tools/glgen/stubs/gles11/glMapBufferRange.nativeReg b/opengl/tools/glgen/stubs/gles11/glMapBufferRange.nativeReg new file mode 100644 index 0000000..ad5c077 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glMapBufferRange.nativeReg @@ -0,0 +1 @@ +{"glMapBufferRange", "(IIII)Ljava/nio/Buffer;", (void *) android_glMapBufferRange__IIII },
\ No newline at end of file diff --git a/opengl/tools/glgen/stubs/gles11/glShaderSource.java b/opengl/tools/glgen/stubs/gles11/glShaderSource.java index e9fcef3..a9c338a 100644 --- a/opengl/tools/glgen/stubs/gles11/glShaderSource.java +++ b/opengl/tools/glgen/stubs/gles11/glShaderSource.java @@ -1,19 +1,3 @@ -/* - * Copyright (C) 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. - */ - // C function void glShaderSource ( GLuint shader, GLsizei count, const GLchar ** string, const GLint* length ) public static native void glShaderSource( diff --git a/opengl/tools/glgen/stubs/gles11/glTransformFeedbackVaryings.cpp b/opengl/tools/glgen/stubs/gles11/glTransformFeedbackVaryings.cpp new file mode 100644 index 0000000..0dedd0f --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glTransformFeedbackVaryings.cpp @@ -0,0 +1,49 @@ +/* void glTransformFeedbackVaryings ( GLuint program, GLsizei count, const GLchar *varyings, GLenum bufferMode ) */ +static +void +android_glTransformFeedbackVaryings + (JNIEnv *_env, jobject _this, jint program, jobjectArray varyings_ref, jint bufferMode) { + jint _exception = 0; + const char* _exceptionType = NULL; + const char* _exceptionMessage = NULL; + jint _count = 0, _i; + const char** _varyings = NULL; + const char* _varying = NULL; + + if (!varyings_ref) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "varyings == null"; + goto exit; + } + + _count = _env->GetArrayLength(varyings_ref); + _varyings = (const char**)calloc(_count, sizeof(const char*)); + for (_i = 0; _i < _count; _i++) { + jstring _varying = (jstring)_env->GetObjectArrayElement(varyings_ref, _i); + if (!_varying) { + _exception = 1; + _exceptionType = "java/lang/IllegalArgumentException"; + _exceptionMessage = "null varyings element"; + goto exit; + } + _varyings[_i] = _env->GetStringUTFChars(_varying, 0); + } + + glTransformFeedbackVaryings(program, _count, _varyings, bufferMode); + +exit: + for (_i = _count - 1; _i >= 0; _i--) { + if (_varyings[_i]) { + jstring _varying = (jstring)_env->GetObjectArrayElement(varyings_ref, _i); + if (_varying) { + _env->ReleaseStringUTFChars(_varying, _varyings[_i]); + } + } + } + free(_varyings); + if (_exception) { + jniThrowException(_env, _exceptionType, _exceptionMessage); + } +} + diff --git a/opengl/tools/glgen/stubs/gles11/glTransformFeedbackVaryings.java b/opengl/tools/glgen/stubs/gles11/glTransformFeedbackVaryings.java new file mode 100644 index 0000000..c824344 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glTransformFeedbackVaryings.java @@ -0,0 +1,8 @@ + // C function void glTransformFeedbackVaryings ( GLuint program, GLsizei count, const GLchar *varyings, GLenum bufferMode ) + + public static native void glTransformFeedbackVaryings( + int program, + String[] varyings, + int bufferMode + ); + diff --git a/opengl/tools/glgen/stubs/gles11/glTransformFeedbackVaryings.nativeReg b/opengl/tools/glgen/stubs/gles11/glTransformFeedbackVaryings.nativeReg new file mode 100644 index 0000000..24f2b77 --- /dev/null +++ b/opengl/tools/glgen/stubs/gles11/glTransformFeedbackVaryings.nativeReg @@ -0,0 +1 @@ +{"glTransformFeedbackVaryings", "(I[Ljava/lang/String;I)V", (void *) android_glTransformFeedbackVaryings }, diff --git a/opengl/tools/glgen/stubs/jsr239/GLImplHeader.java-impl b/opengl/tools/glgen/stubs/jsr239/GLImplHeader.java-impl index e3aea76..9740235 100644 --- a/opengl/tools/glgen/stubs/jsr239/GLImplHeader.java-impl +++ b/opengl/tools/glgen/stubs/jsr239/GLImplHeader.java-impl @@ -22,7 +22,7 @@ import android.app.AppGlobals; import android.content.pm.ApplicationInfo; import android.content.pm.IPackageManager; import android.os.Build; -import android.os.UserId; +import android.os.UserHandle; import android.util.Log; import java.nio.Buffer; @@ -67,7 +67,7 @@ public class GLImpl implements GL10, GL10Ext, GL11, GL11Ext, GL11ExtensionPack { int version = 0; IPackageManager pm = AppGlobals.getPackageManager(); try { - ApplicationInfo applicationInfo = pm.getApplicationInfo(appName, 0, UserId.myUserId()); + ApplicationInfo applicationInfo = pm.getApplicationInfo(appName, 0, UserHandle.myUserId()); if (applicationInfo != null) { version = applicationInfo.targetSdkVersion; } |