diff --git a/auto/Makefile b/auto/Makefile index ff9dd36..8299a02 100644 --- a/auto/Makefile +++ b/auto/Makefile @@ -12,29 +12,8 @@ include ../config/version SHELL = bash PYTHON ?= python -### Use git repository for GL extension specifications - -GIT_CLONE ?= git clone --branch glew https://github.com/nigels-com/glfixes.git - -### -### Conventional desktop OpenGL settings -### - -REGISTRY = registry/gl/specs EXT = extensions/gl -FILTER = filter_gl_ext.sh CORE = core/gl -REGISTRY_URL = http://www.opengl.org/registry/ - -### -### Experimental OpenGL ES settings -### - -# REGISTRY = registry/gles -# EXT = extensions/gles -# FILTER = filter_gles_ext.sh -# CORE = core/gles -# REGISTRY_URL = http://www.khronos.org/registry/gles/ BIN = bin SRC = src @@ -103,24 +82,27 @@ B.TARGETS = \ all custom: $(I.TARGETS) $(S.TARGETS) $(D.TARGETS) $(B.TARGETS) -registry: $(REGISTRY)/.dummy +registry: OpenGL-Registry/.dummy ext: $(EXT)/.dummy -$(REGISTRY)/.dummy: +OpenGL-Registry/.dummy: @echo "--------------------------------------------------------------------" - @echo "Downloading registry" + @echo "Downloading OpenGL-Registry" @echo "--------------------------------------------------------------------" - $(GIT_CLONE) registry + git clone https://github.com/KhronosGroup/OpenGL-Registry.git OpenGL-Registry + git clone --branch glew https://github.com/nigels-com/glfixes glfixes touch $@ -$(EXT)/.dummy: $(REGISTRY)/.dummy +$(EXT)/.dummy: OpenGL-Registry/.dummy @echo "--------------------------------------------------------------------" @echo "Creating descriptors" @echo "--------------------------------------------------------------------" rm -rf $(EXT) - $(BIN)/update_ext.sh $(EXT) $(REGISTRY) $(BLACKLIST) + cp -r glfixes/gl/specs/ANGLE OpenGL-Registry/extensions + cp -r glfixes/gl/specs/REGAL OpenGL-Registry/extensions + $(BIN)/update_ext.sh $(EXT) OpenGL-Registry/extensions $(BLACKLIST) $(PYTHON) $(BIN)/parse_xml.py registry/xml/egl.xml --core core/gl --extensions extensions/gl - $(BIN)/$(FILTER) $(EXT) + $(BIN)/filter_gl_ext.sh $(EXT) ifeq ($(patsubst Darwin%,Darwin,$(SYSTEM)), Darwin) find $(CORE) -maxdepth 1 -type f | grep -v VERSION | grep -v "~" | \ xargs -J % cp % $(EXT) diff --git a/auto/bin/filter_gl_ext.sh b/auto/bin/filter_gl_ext.sh index 88eebb1..3be74ae 100755 --- a/auto/bin/filter_gl_ext.sh +++ b/auto/bin/filter_gl_ext.sh @@ -287,9 +287,9 @@ EOT BOOL wglCopyImageSubDataNV (HGLRC hSrcRC, GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, HGLRC hDstRC, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth) EOT -# Filter glProgramParameteri from GL_ARB_separate_shader_objects -# grep -v "glProgramParameteri" $1/GL_ARB_separate_shader_objects > tmp -# mv tmp $1/GL_ARB_separate_shader_objects +# Filter glProgramUniform from GL_EXT_separate_shader_objects + cat $1/GL_EXT_separate_shader_objects | grep -v "glProgramUniform" | grep -v "glProgramParameteri" > tmp + mv tmp $1/GL_EXT_separate_shader_objects # Filter out EXT functions from GL_ARB_viewport_array grep -v "EXT" $1/GL_ARB_viewport_array > tmp @@ -558,6 +558,50 @@ EOT grep -v "TextureStorage" $1/GL_ARB_texture_storage > tmp mv tmp $1/GL_ARB_texture_storage +# Filter out functions from GL_EXT_occlusion_query_boolean + + grep -v "(" $1/GL_EXT_occlusion_query_boolean > tmp + mv tmp $1/GL_EXT_occlusion_query_boolean + +# Filter out duplicate enums from GL_EXT_protected_textures + + cat $1/GL_EXT_protected_textures | grep -v GL_TRUE | grep -v GL_FALSE > tmp + mv tmp $1/GL_EXT_protected_textures + +# Filter out duplicate enums from GL_EXT_robustness + + cat $1/GL_EXT_robustness | grep -v GL_NO_ERROR > tmp + mv tmp $1/GL_EXT_robustness + +# Filter GL_EXT_shader_framebuffer_fetch_non_coherent + + grep -v "FramebufferFetchBarrierEXT" $1/GL_EXT_shader_framebuffer_fetch_non_coherent > tmp + mv tmp $1/GL_EXT_shader_framebuffer_fetch_non_coherent + +# Filter GL_EXT_tessellation_shader + + grep -v "PatchParameteriEXT" $1/GL_EXT_tessellation_shader > tmp + mv tmp $1/GL_EXT_tessellation_shader + +# Filter GL_EXT_texture_buffer + + grep -v "TexBuffer" $1/GL_EXT_texture_buffer > tmp + mv tmp $1/GL_EXT_texture_buffer + +# Filter GL_EXT_texture_border_clamp + + grep -v "TexParameter" $1/GL_EXT_texture_border_clamp > tmp + mv tmp $1/GL_EXT_texture_border_clamp + +# Filter GL_EXT_disjoint_timer_query + + cat $1/GL_EXT_disjoint_timer_query | grep -v GetQueryObjecti64v | grep -v GetQueryObjectui64v > tmp + mv tmp $1/GL_EXT_disjoint_timer_query + +# Filter GL_NV_read_buffer_front + + grep -v "ReadBufferNV" $1/GL_NV_read_buffer_front > tmp + mv tmp $1/GL_NV_read_buffer_front # Append GLVULKANPROCNV to GL_NV_draw_vulkan_image # Probably ought to be explicitly mentioned in the spec language diff --git a/auto/bin/parse_spec.pl b/auto/bin/parse_spec.pl index d898a3a..0cb1e95 100755 --- a/auto/bin/parse_spec.pl +++ b/auto/bin/parse_spec.pl @@ -69,6 +69,10 @@ my %typemap = ( uint64 => "GLuint64", sync => "GLsync", + # GL_EXT_EGL_image_storage + + eglImageOES => "GLeglImageOES", + # AMD_debug_output DEBUGPROCAMD => "GLDEBUGPROCAMD", @@ -137,6 +141,14 @@ my %fnc_ignore_list = ( "ProgramLocalParameter4fARB" => "ARB_vertex_program", "ProgramLocalParameter4fvARB" => "ARB_vertex_program", "ProgramStringARB" => "ARB_vertex_program", + "EGLImageTargetTexture2DOES" => "OES_EGL_image", + "FramebufferTextureOES" => "GL_OES_geometry_shader", + "PatchParameteriOES" => "GL_OES_tessellation_shader", + "PointSizePointerOES" => "GL_OES_point_size_array", + "LockArraysEXT" => "EXT_compiled_vertex_array", + "UnlockArraysEXT" => "EXT_compiled_vertex_array", + "CoverageMaskNV" => "NV_coverage_sample", + "CoverageOperationNV" => "NV_coverage_sample", "glXCreateContextAttribsARB" => "ARB_create_context_profile", "wglCreateContextAttribsARB" => "WGL_ARB_create_context_profile", ); @@ -311,7 +323,7 @@ my @speclist = (); my %extensions = (); my $ext_dir = shift; -my $reg_http = "http://www.opengl.org/registry/specs/"; +my $reg_http = "https://www.khronos.org/registry/OpenGL/extensions/"; # Take command line arguments or read list from file if (@ARGV) @@ -332,7 +344,7 @@ foreach my $spec (sort @speclist) open EXT, ">$info"; print EXT $ext . "\n"; # Extension name my $specname = $spec; - $specname =~ s/registry\/gl\/specs\///; + $specname =~ s/OpenGL-Registry\/extensions\///; print EXT $reg_http . $specname . "\n"; # Extension info URL print EXT $ext . "\n"; # Extension string print EXT "\n"; # Resuses nothing by default diff --git a/auto/blacklist b/auto/blacklist index 6cd0e11..6b3c28b 100644 --- a/auto/blacklist +++ b/auto/blacklist @@ -5,10 +5,24 @@ EXT/vertex_array_set.txt EXT/nurbs_tessellator.txt EXT/object_space_tess.txt SGI/filter4_parameters.txt -SGIS/texture_color_mask.txt -SGIX/dmbuffer.txt -SGIX/instruments.txt -SGIX/video_source.txt -SGIX/hyperpipe_group.txt +SGIS/SGIS_texture_color_mask.txt +SGIX/SGIX_dmbuffer.txt +SGIX/SGIX_instruments.txt +SGIX/SGIX_video_source.txt +SGIX/SGIX_hyperpipe_group.txt +SGIX/GLX_SGIX_color_type.txt OES/OES_fixed_point.txt OES/OES_query_matrix.txt +IMG/IMG_user_clip_plane.txt +NV/NV_query_resource.txt +NV/EGL_NV_coverage_sample.txt +OES/OES_draw_elements_base_vertex.txt +OES/OES_viewport_array.txt +OES/EGL_KHR_fence_sync.txt +EXT/EXT_texenv_op.txt +EXT/EXT_transform_feedback2.txt +EXT/EXT_vertex_array_set.txt +EXT/EXT_separate_shader_objects.gles.txt +IGLOO/IGLOO_swap_triangle_strip_vertex_pointerXXX.txt +IGLOO/IGLOO_viewport_offsetXXX.txt +IGLOO/IGLOO_toggle_color_and_lightXXX.txt diff --git a/auto/src/glew_head.h b/auto/src/glew_head.h index c19cefb..41e5a26 100644 --- a/auto/src/glew_head.h +++ b/auto/src/glew_head.h @@ -231,6 +231,8 @@ typedef struct __GLsync *GLsync; typedef char GLchar; +typedef void *GLeglImageOES; /* GL_EXT_EGL_image_storage */ + #define GL_ZERO 0 #define GL_FALSE 0 #define GL_LOGIC_OP 0x0BF1