diff options
author | Brian <[email protected]> | 2007-02-22 08:53:33 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-02-22 08:53:33 -0700 |
commit | 29c471aafc6a3fef23d553e31a555d1782854a77 (patch) | |
tree | 335385fd55d510118346136c6feb4daa707988b6 /src/mesa/glapi | |
parent | 6d4cf6be4e79c3a6ab18272577df17389e3834a6 (diff) | |
parent | a4b344baa2484c65a1618f3cce3a94c91dea8ef7 (diff) |
Merge branch 'origin' into glsl-compiler-1
Conflicts:
src/mesa/main/state.c
src/mesa/shader/program.c
src/mesa/shader/program.h
src/mesa/shader/programopt.c
src/mesa/shader/slang/slang_execute.c
src/mesa/sources
src/mesa/swrast/s_arbshader.c
src/mesa/swrast/s_context.c
src/mesa/swrast/s_span.c
src/mesa/swrast/s_zoom.c
src/mesa/tnl/t_context.c
src/mesa/tnl/t_save_api.c
src/mesa/tnl/t_vb_arbprogram.c
src/mesa/tnl/t_vp_build.c
src/mesa/tnl/t_vtx_eval.c
Diffstat (limited to 'src/mesa/glapi')
-rw-r--r-- | src/mesa/glapi/Makefile | 10 | ||||
-rw-r--r-- | src/mesa/glapi/glX_proto_recv.py | 21 | ||||
-rw-r--r-- | src/mesa/glapi/glX_proto_size.py | 12 | ||||
-rw-r--r-- | src/mesa/glapi/gl_API.xml | 6 | ||||
-rw-r--r-- | src/mesa/glapi/glapi.c | 2 | ||||
-rw-r--r-- | src/mesa/glapi/glapitable.h | 2 | ||||
-rw-r--r-- | src/mesa/glapi/glapitemp.h | 14 | ||||
-rw-r--r-- | src/mesa/glapi/glprocs.h | 12 |
8 files changed, 33 insertions, 46 deletions
diff --git a/src/mesa/glapi/Makefile b/src/mesa/glapi/Makefile index 2f8da126b8e..c52c0903478 100644 --- a/src/mesa/glapi/Makefile +++ b/src/mesa/glapi/Makefile @@ -26,6 +26,8 @@ GLX_DIR = $(XORG_BASE)/GL/glx SERVER_OUTPUTS = $(GLX_DIR)/indirect_dispatch.c \ $(GLX_DIR)/indirect_dispatch_swap.c \ $(GLX_DIR)/indirect_dispatch.h \ + $(GLX_DIR)/indirect_reqsize.c \ + $(GLX_DIR)/indirect_reqsize.h \ $(GLX_DIR)/indirect_size_get.c \ $(GLX_DIR)/indirect_size_get.h \ $(GLX_DIR)/indirect_table.c @@ -37,7 +39,7 @@ API_XML = gl_API.xml \ COMMON = gl_XML.py glX_XML.py license.py $(API_XML) typeexpr.py COMMON_GLX = $(COMMON) glX_API.xml glX_XML.py glX_proto_common.py -INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce +INDENT_FLAGS = -i4 -nut -br -brs -npcs -ce -T GLubyte -T GLbyte -T Bool all: $(OUTPUTS) @@ -104,6 +106,12 @@ $(GLX_DIR)/indirect_size_get.h: $(COMMON_GLX) glX_proto_size.py $(GLX_DIR)/indirect_size_get.c: $(COMMON_GLX) glX_proto_size.py $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m size_c | indent $(INDENT_FLAGS) > $@ +$(GLX_DIR)/indirect_reqsize.h: $(COMMON_GLX) glX_proto_size.py + $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m reqsize_h --only-get -h '_INDIRECT_SIZE_GET_H_' | indent $(INDENT_FLAGS) -l200 > $@ + +$(GLX_DIR)/indirect_reqsize.c: $(COMMON_GLX) glX_proto_size.py + $(PYTHON2) $(PYTHON_FLAGS) glX_proto_size.py -m reqsize_c | indent $(INDENT_FLAGS) > $@ + $(GLX_DIR)/indirect_table.c: $(COMMON_GLX) glX_server_table.py glX_API.xml $(PYTHON2) $(PYTHON_FLAGS) glX_server_table.py -f gl_and_glX_API.xml > $@ diff --git a/src/mesa/glapi/glX_proto_recv.py b/src/mesa/glapi/glX_proto_recv.py index 527f6f10eef..20f75575cf1 100644 --- a/src/mesa/glapi/glX_proto_recv.py +++ b/src/mesa/glapi/glX_proto_recv.py @@ -81,31 +81,12 @@ class PrintGlxDispatchFunctions(glX_proto_common.glx_print_proto): print '#include <GL/gl.h>' print '#include <GL/glxproto.h>' - - # FIXME: Since this block will require changes as other - # FIXME: platforms are added, it should probably be in a - # FIXME: header file that is not generated by a script. - - if self.do_swap: - print '#ifdef __linux__' - print '#include <byteswap.h>' - print '#elif defined(__OpenBSD__)' - print '#include <sys/endian.h>' - print '#define bswap_16 __swap16' - print '#define bswap_32 __swap32' - print '#define bswap_64 __swap64' - print '#else' - print '#include <sys/endian.h>' - print '#define bswap_16 bswap16' - print '#define bswap_32 bswap32' - print '#define bswap_64 bswap64' - print '#endif' - print '#include <inttypes.h>' print '#include "indirect_size.h"' print '#include "indirect_size_get.h"' print '#include "indirect_dispatch.h"' print '#include "glxserver.h"' + print '#include "glxbyteorder.h"' print '#include "indirect_util.h"' print '#include "singlesize.h"' print '#include "glapitable.h"' diff --git a/src/mesa/glapi/glX_proto_size.py b/src/mesa/glapi/glX_proto_size.py index 18bfa1b71bc..2b9a6433622 100644 --- a/src/mesa/glapi/glX_proto_size.py +++ b/src/mesa/glapi/glX_proto_size.py @@ -447,18 +447,10 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common): print '' print '#include <GL/gl.h>' print '#include "glxserver.h"' + print '#include "glxbyteorder.h"' print '#include "indirect_size.h"' print '#include "indirect_reqsize.h"' print '' - print '#if defined(linux)' - print '# include <byteswap.h>' - print '# define SWAP_32(v) do { (v) = bswap_32(v); } while(0)' - print '#else' - print '# include <X11/misc.h>' - print '# define SWAP_32(v) do { char tmp; swapl(&v, tmp); } while(0)' - print '#endif' - - print '' print '#define __GLX_PAD(x) (((x) + 3) & ~3)' print '' print '#if defined(__CYGWIN__) || defined(__MINGW32__)' @@ -538,7 +530,7 @@ class PrintGlxReqSize_c(PrintGlxReqSize_common): if fixup: print ' if (swap) {' for name in fixup: - print ' SWAP_32( %s );' % (name) + print ' %s = bswap_32(%s);' % (name, name) print ' }' return diff --git a/src/mesa/glapi/gl_API.xml b/src/mesa/glapi/gl_API.xml index 905c4a03a67..bd31e8871b0 100644 --- a/src/mesa/glapi/gl_API.xml +++ b/src/mesa/glapi/gl_API.xml @@ -5318,7 +5318,7 @@ <glx ignore="true"/> </function> - <function name="GetVertexAttribPointerv" alias="GetVertexAttribPointervARB"> + <function name="GetVertexAttribPointerv" alias="GetVertexAttribPointervNV"> <param name="index" type="GLuint"/> <param name="pname" type="GLenum"/> <param name="pointer" type="GLvoid **" output="true"/> @@ -7209,7 +7209,7 @@ <function name="GetVertexAttribPointervARB" alias="GetVertexAttribPointervNV"> <param name="index" type="GLuint"/> <param name="pname" type="GLenum"/> - <param name="params" type="GLvoid **" output="true"/> + <param name="pointer" type="GLvoid **" output="true"/> </function> </category> @@ -11234,7 +11234,7 @@ <function name="GetVertexAttribPointervNV" offset="assign"> <param name="index" type="GLuint"/> <param name="pname" type="GLenum"/> - <param name="params" type="GLvoid **" output="true"/> + <param name="pointer" type="GLvoid **" output="true"/> <glx handcode="true"/> </function> diff --git a/src/mesa/glapi/glapi.c b/src/mesa/glapi/glapi.c index d1ccc5fba69..348f12b3e74 100644 --- a/src/mesa/glapi/glapi.c +++ b/src/mesa/glapi/glapi.c @@ -1003,7 +1003,6 @@ _glapi_check_table(const struct _glapi_table *table) GLuint offset = (secondaryColor3fFunc - (char *) table) / sizeof(void *); assert(secondaryColor3fOffset == _gloffset_SecondaryColor3fEXT); assert(secondaryColor3fOffset == offset); - assert(_glapi_get_proc_address("glSecondaryColor3fEXT") == (_glapi_proc) &glSecondaryColor3fEXT); } { GLuint pointParameterivOffset = _glapi_get_proc_offset("glPointParameterivNV"); @@ -1011,7 +1010,6 @@ _glapi_check_table(const struct _glapi_table *table) GLuint offset = (pointParameterivFunc - (char *) table) / sizeof(void *); assert(pointParameterivOffset == _gloffset_PointParameterivNV); assert(pointParameterivOffset == offset); - assert(_glapi_get_proc_address("glPointParameterivNV") == (_glapi_proc) &glPointParameterivNV); } { GLuint setFenceOffset = _glapi_get_proc_offset("glSetFenceNV"); diff --git a/src/mesa/glapi/glapitable.h b/src/mesa/glapi/glapitable.h index 026af32af8f..55548adcd3b 100644 --- a/src/mesa/glapi/glapitable.h +++ b/src/mesa/glapi/glapitable.h @@ -704,7 +704,7 @@ struct _glapi_table void (GLAPIENTRYP GetProgramStringNV)(GLuint id, GLenum pname, GLubyte * program); /* 664 */ void (GLAPIENTRYP GetProgramivNV)(GLuint id, GLenum pname, GLint * params); /* 665 */ void (GLAPIENTRYP GetTrackMatrixivNV)(GLenum target, GLuint address, GLenum pname, GLint * params); /* 666 */ - void (GLAPIENTRYP GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** params); /* 667 */ + void (GLAPIENTRYP GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** pointer); /* 667 */ void (GLAPIENTRYP GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble * params); /* 668 */ void (GLAPIENTRYP GetVertexAttribfvNV)(GLuint index, GLenum pname, GLfloat * params); /* 669 */ void (GLAPIENTRYP GetVertexAttribivNV)(GLuint index, GLenum pname, GLint * params); /* 670 */ diff --git a/src/mesa/glapi/glapitemp.h b/src/mesa/glapi/glapitemp.h index 340a4f6a040..62407968ccc 100644 --- a/src/mesa/glapi/glapitemp.h +++ b/src/mesa/glapi/glapitemp.h @@ -4865,14 +4865,19 @@ KEYWORD1 void KEYWORD2 NAME(GetTrackMatrixivNV)(GLenum target, GLuint address, G DISPATCH(GetTrackMatrixivNV, (target, address, pname, params), (F, "glGetTrackMatrixivNV(0x%x, %d, 0x%x, %p);\n", target, address, pname, (const void *) params)); } -KEYWORD1 void KEYWORD2 NAME(GetVertexAttribPointervARB)(GLuint index, GLenum pname, GLvoid ** params) +KEYWORD1 void KEYWORD2 NAME(GetVertexAttribPointerv)(GLuint index, GLenum pname, GLvoid ** pointer) { - DISPATCH(GetVertexAttribPointervNV, (index, pname, params), (F, "glGetVertexAttribPointervARB(%d, 0x%x, %p);\n", index, pname, (const void *) params)); + DISPATCH(GetVertexAttribPointervNV, (index, pname, pointer), (F, "glGetVertexAttribPointerv(%d, 0x%x, %p);\n", index, pname, (const void *) pointer)); } -KEYWORD1 void KEYWORD2 NAME(GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** params) +KEYWORD1 void KEYWORD2 NAME(GetVertexAttribPointervARB)(GLuint index, GLenum pname, GLvoid ** pointer) { - DISPATCH(GetVertexAttribPointervNV, (index, pname, params), (F, "glGetVertexAttribPointervNV(%d, 0x%x, %p);\n", index, pname, (const void *) params)); + DISPATCH(GetVertexAttribPointervNV, (index, pname, pointer), (F, "glGetVertexAttribPointervARB(%d, 0x%x, %p);\n", index, pname, (const void *) pointer)); +} + +KEYWORD1 void KEYWORD2 NAME(GetVertexAttribPointervNV)(GLuint index, GLenum pname, GLvoid ** pointer) +{ + DISPATCH(GetVertexAttribPointervNV, (index, pname, pointer), (F, "glGetVertexAttribPointervNV(%d, 0x%x, %p);\n", index, pname, (const void *) pointer)); } KEYWORD1 void KEYWORD2 NAME(GetVertexAttribdvNV)(GLuint index, GLenum pname, GLdouble * params) @@ -6577,6 +6582,7 @@ static _glapi_proc UNUSED_TABLE_NAME[] = { TABLE_ENTRY(BindProgramARB), TABLE_ENTRY(DeleteProgramsARB), TABLE_ENTRY(GenProgramsARB), + TABLE_ENTRY(GetVertexAttribPointerv), TABLE_ENTRY(GetVertexAttribPointervARB), TABLE_ENTRY(IsProgramARB), TABLE_ENTRY(PointParameteri), diff --git a/src/mesa/glapi/glprocs.h b/src/mesa/glapi/glprocs.h index 905c65862d1..190d9ed149b 100644 --- a/src/mesa/glapi/glprocs.h +++ b/src/mesa/glapi/glprocs.h @@ -1086,6 +1086,7 @@ static const char gl_string_table[] = "glBindProgramARB\0" "glDeleteProgramsARB\0" "glGenProgramsARB\0" + "glGetVertexAttribPointerv\0" "glGetVertexAttribPointervARB\0" "glIsProgramARB\0" "glPointParameteri\0" @@ -2229,11 +2230,12 @@ static const glprocs_table_t static_functions[] = { NAME_FUNC_OFFSET(18432, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV), NAME_FUNC_OFFSET(18452, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV), NAME_FUNC_OFFSET(18469, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV), - NAME_FUNC_OFFSET(18498, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV), - NAME_FUNC_OFFSET(18513, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV), - NAME_FUNC_OFFSET(18531, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV), - NAME_FUNC_OFFSET(18550, gl_dispatch_stub_749, gl_dispatch_stub_749, NULL, _gloffset_BlendEquationSeparateEXT), - NAME_FUNC_OFFSET(18574, gl_dispatch_stub_749, gl_dispatch_stub_749, NULL, _gloffset_BlendEquationSeparateEXT), + NAME_FUNC_OFFSET(18495, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV), + NAME_FUNC_OFFSET(18524, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV), + NAME_FUNC_OFFSET(18539, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV), + NAME_FUNC_OFFSET(18557, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV), + NAME_FUNC_OFFSET(18576, gl_dispatch_stub_749, gl_dispatch_stub_749, NULL, _gloffset_BlendEquationSeparateEXT), + NAME_FUNC_OFFSET(18600, gl_dispatch_stub_749, gl_dispatch_stub_749, NULL, _gloffset_BlendEquationSeparateEXT), NAME_FUNC_OFFSET(-1, NULL, NULL, NULL, 0) }; |