Commit be4e0eb1 authored by Nigel Stewart's avatar Nigel Stewart Committed by Nigel Stewart
Browse files

Using KhronosGroup/OpenGL-Registry git repository for extension specifications

parent c849b3f0
...@@ -12,29 +12,8 @@ include ../config/version ...@@ -12,29 +12,8 @@ include ../config/version
SHELL = bash SHELL = bash
PYTHON ?= python 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 EXT = extensions/gl
FILTER = filter_gl_ext.sh
CORE = core/gl 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 BIN = bin
SRC = src SRC = src
...@@ -103,24 +82,27 @@ B.TARGETS = \ ...@@ -103,24 +82,27 @@ B.TARGETS = \
all custom: $(I.TARGETS) $(S.TARGETS) $(D.TARGETS) $(B.TARGETS) all custom: $(I.TARGETS) $(S.TARGETS) $(D.TARGETS) $(B.TARGETS)
registry: $(REGISTRY)/.dummy registry: OpenGL-Registry/.dummy
ext: $(EXT)/.dummy ext: $(EXT)/.dummy
$(REGISTRY)/.dummy: OpenGL-Registry/.dummy:
@echo "--------------------------------------------------------------------" @echo "--------------------------------------------------------------------"
@echo "Downloading registry" @echo "Downloading OpenGL-Registry"
@echo "--------------------------------------------------------------------" @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 $@ touch $@
$(EXT)/.dummy: $(REGISTRY)/.dummy $(EXT)/.dummy: OpenGL-Registry/.dummy
@echo "--------------------------------------------------------------------" @echo "--------------------------------------------------------------------"
@echo "Creating descriptors" @echo "Creating descriptors"
@echo "--------------------------------------------------------------------" @echo "--------------------------------------------------------------------"
rm -rf $(EXT) 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 $(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) ifeq ($(patsubst Darwin%,Darwin,$(SYSTEM)), Darwin)
find $(CORE) -maxdepth 1 -type f | grep -v VERSION | grep -v "~" | \ find $(CORE) -maxdepth 1 -type f | grep -v VERSION | grep -v "~" | \
xargs -J % cp % $(EXT) xargs -J % cp % $(EXT)
......
...@@ -287,9 +287,9 @@ EOT ...@@ -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) 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 EOT
# Filter glProgramParameteri from GL_ARB_separate_shader_objects # Filter glProgramUniform from GL_EXT_separate_shader_objects
# grep -v "glProgramParameteri" $1/GL_ARB_separate_shader_objects > tmp cat $1/GL_EXT_separate_shader_objects | grep -v "glProgramUniform" | grep -v "glProgramParameteri" > tmp
# mv tmp $1/GL_ARB_separate_shader_objects mv tmp $1/GL_EXT_separate_shader_objects
# Filter out EXT functions from GL_ARB_viewport_array # Filter out EXT functions from GL_ARB_viewport_array
grep -v "EXT" $1/GL_ARB_viewport_array > tmp grep -v "EXT" $1/GL_ARB_viewport_array > tmp
...@@ -558,6 +558,50 @@ EOT ...@@ -558,6 +558,50 @@ EOT
grep -v "TextureStorage" $1/GL_ARB_texture_storage > tmp grep -v "TextureStorage" $1/GL_ARB_texture_storage > tmp
mv tmp $1/GL_ARB_texture_storage 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 # Append GLVULKANPROCNV to GL_NV_draw_vulkan_image
# Probably ought to be explicitly mentioned in the spec language # Probably ought to be explicitly mentioned in the spec language
......
...@@ -69,6 +69,10 @@ my %typemap = ( ...@@ -69,6 +69,10 @@ my %typemap = (
uint64 => "GLuint64", uint64 => "GLuint64",
sync => "GLsync", sync => "GLsync",
# GL_EXT_EGL_image_storage
eglImageOES => "GLeglImageOES",
# AMD_debug_output # AMD_debug_output
DEBUGPROCAMD => "GLDEBUGPROCAMD", DEBUGPROCAMD => "GLDEBUGPROCAMD",
...@@ -137,6 +141,14 @@ my %fnc_ignore_list = ( ...@@ -137,6 +141,14 @@ my %fnc_ignore_list = (
"ProgramLocalParameter4fARB" => "ARB_vertex_program", "ProgramLocalParameter4fARB" => "ARB_vertex_program",
"ProgramLocalParameter4fvARB" => "ARB_vertex_program", "ProgramLocalParameter4fvARB" => "ARB_vertex_program",
"ProgramStringARB" => "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", "glXCreateContextAttribsARB" => "ARB_create_context_profile",
"wglCreateContextAttribsARB" => "WGL_ARB_create_context_profile", "wglCreateContextAttribsARB" => "WGL_ARB_create_context_profile",
); );
...@@ -311,7 +323,7 @@ my @speclist = (); ...@@ -311,7 +323,7 @@ my @speclist = ();
my %extensions = (); my %extensions = ();
my $ext_dir = shift; 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 # Take command line arguments or read list from file
if (@ARGV) if (@ARGV)
...@@ -332,7 +344,7 @@ foreach my $spec (sort @speclist) ...@@ -332,7 +344,7 @@ foreach my $spec (sort @speclist)
open EXT, ">$info"; open EXT, ">$info";
print EXT $ext . "\n"; # Extension name print EXT $ext . "\n"; # Extension name
my $specname = $spec; my $specname = $spec;
$specname =~ s/registry\/gl\/specs\///; $specname =~ s/OpenGL-Registry\/extensions\///;
print EXT $reg_http . $specname . "\n"; # Extension info URL print EXT $reg_http . $specname . "\n"; # Extension info URL
print EXT $ext . "\n"; # Extension string print EXT $ext . "\n"; # Extension string
print EXT "\n"; # Resuses nothing by default print EXT "\n"; # Resuses nothing by default
......
...@@ -5,10 +5,24 @@ EXT/vertex_array_set.txt ...@@ -5,10 +5,24 @@ EXT/vertex_array_set.txt
EXT/nurbs_tessellator.txt EXT/nurbs_tessellator.txt
EXT/object_space_tess.txt EXT/object_space_tess.txt
SGI/filter4_parameters.txt SGI/filter4_parameters.txt
SGIS/texture_color_mask.txt SGIS/SGIS_texture_color_mask.txt
SGIX/dmbuffer.txt SGIX/SGIX_dmbuffer.txt
SGIX/instruments.txt SGIX/SGIX_instruments.txt
SGIX/video_source.txt SGIX/SGIX_video_source.txt
SGIX/hyperpipe_group.txt SGIX/SGIX_hyperpipe_group.txt
SGIX/GLX_SGIX_color_type.txt
OES/OES_fixed_point.txt OES/OES_fixed_point.txt
OES/OES_query_matrix.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
...@@ -231,6 +231,8 @@ typedef struct __GLsync *GLsync; ...@@ -231,6 +231,8 @@ typedef struct __GLsync *GLsync;
typedef char GLchar; typedef char GLchar;
typedef void *GLeglImageOES; /* GL_EXT_EGL_image_storage */
#define GL_ZERO 0 #define GL_ZERO 0
#define GL_FALSE 0 #define GL_FALSE 0
#define GL_LOGIC_OP 0x0BF1 #define GL_LOGIC_OP 0x0BF1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment