On Sun, Dec 16, 2012 at 6:11 PM, Marek Olšák <mar...@gmail.com> wrote: > On Sun, Dec 16, 2012 at 5:50 PM, Christoph Bumiller > <e0425...@student.tuwien.ac.at> wrote: >> --- >> src/mapi/glapi/gen/ARB_texture_buffer_range.xml | 22 ++++++ >> src/mapi/glapi/gen/Makefile.am | 1 + >> src/mapi/glapi/gen/gl_API.xml | 2 + >> src/mesa/main/context.c | 1 + >> src/mesa/main/extensions.c | 1 + >> src/mesa/main/get.c | 1 + >> src/mesa/main/get_hash_params.py | 3 + >> src/mesa/main/mtypes.h | 6 ++ >> src/mesa/main/teximage.c | 91 >> ++++++++++++++++++----- >> src/mesa/main/teximage.h | 4 + >> src/mesa/main/texparam.c | 8 ++ >> 11 files changed, 121 insertions(+), 19 deletions(-) >> create mode 100644 src/mapi/glapi/gen/ARB_texture_buffer_range.xml >> >> diff --git a/src/mapi/glapi/gen/ARB_texture_buffer_range.xml >> b/src/mapi/glapi/gen/ARB_texture_buffer_range.xml >> new file mode 100644 >> index 0000000..2176c08 >> --- /dev/null >> +++ b/src/mapi/glapi/gen/ARB_texture_buffer_range.xml >> @@ -0,0 +1,22 @@ >> +<?xml version="1.0"?> >> +<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd"> >> + >> +<OpenGLAPI> >> + >> +<category name="GL_ARB_texture_buffer_range" number="139"> >> + >> + <enum name="TEXTURE_BUFFER_OFFSET" value="0x919D"/> >> + <enum name="TEXTURE_BUFFER_SIZE" value="0x919E"/> >> + <enum name="TEXTURE_BUFFER_OFFSET_ALIGNMENT" value="0x919F"/> >> + >> + <function name="TexBufferRange" offset="assign"> >> + <param name="target" type="GLenum"/> >> + <param name="internalformat" type="GLenum"/> >> + <param name="buffer" type="GLuint"/> >> + <param name="offset" type="GLintptr"/> >> + <param name="size" type="GLsizeiptr"/> >> + </function> >> + >> +</category> >> + >> +</OpenGLAPI> >> diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am >> index 13943e8..4de78dd 100644 >> --- a/src/mapi/glapi/gen/Makefile.am >> +++ b/src/mapi/glapi/gen/Makefile.am >> @@ -110,6 +110,7 @@ API_XML = \ >> ARB_seamless_cube_map.xml \ >> ARB_sync.xml \ >> ARB_texture_buffer_object.xml \ >> + ARB_texture_buffer_range.xml \ >> ARB_texture_compression_rgtc.xml \ >> ARB_texture_float.xml \ >> ARB_texture_rg.xml \ >> diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml >> index a47316a..d0479f4 100644 >> --- a/src/mapi/glapi/gen/gl_API.xml >> +++ b/src/mapi/glapi/gen/gl_API.xml >> @@ -8151,6 +8151,8 @@ >> >> <xi:include href="ARB_texture_buffer_object.xml" >> xmlns:xi="http://www.w3.org/2001/XInclude"/> >> >> +<xi:include href="ARB_texture_buffer_range.xml" >> xmlns:xi="http://www.w3.org/2001/XInclude"/> >> + >> <xi:include href="ARB_texture_compression_rgtc.xml" >> xmlns:xi="http://www.w3.org/2001/XInclude"/> >> >> <xi:include href="ARB_texture_rg.xml" >> xmlns:xi="http://www.w3.org/2001/XInclude"/> >> diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c >> index fa552e8..b380646 100644 >> --- a/src/mesa/main/context.c >> +++ b/src/mesa/main/context.c >> @@ -563,6 +563,7 @@ _mesa_init_constants(struct gl_context *ctx) >> ctx->Const.MaxTextureMaxAnisotropy = MAX_TEXTURE_MAX_ANISOTROPY; >> ctx->Const.MaxTextureLodBias = MAX_TEXTURE_LOD_BIAS; >> ctx->Const.MaxTextureBufferSize = 65536; >> + ctx->Const.TextureBufferOffsetAlignment = 1; >> ctx->Const.MaxArrayLockSize = MAX_ARRAY_LOCK_SIZE; >> ctx->Const.SubPixelBits = SUB_PIXEL_BITS; >> ctx->Const.MinPointSize = MIN_POINT_SIZE; >> diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c >> index 98711b3..83ed196 100644 >> --- a/src/mesa/main/extensions.c >> +++ b/src/mesa/main/extensions.c >> @@ -128,6 +128,7 @@ static const struct extension extension_table[] = { >> { "GL_ARB_texture_border_clamp", >> o(ARB_texture_border_clamp), GLL, 2000 }, >> { "GL_ARB_texture_buffer_object", >> o(ARB_texture_buffer_object), GLC, 2008 }, >> { "GL_ARB_texture_buffer_object_rgb32", >> o(ARB_texture_buffer_object_rgb32), GLC, 2009 }, >> + { "GL_ARB_texture_buffer_range", >> o(ARB_texture_buffer_range), GLC, 2012 }, >> { "GL_ARB_texture_compression", o(dummy_true), >> GLL, 2000 }, >> { "GL_ARB_texture_compression_rgtc", >> o(ARB_texture_compression_rgtc), GL, 2004 }, >> { "GL_ARB_texture_cube_map", o(ARB_texture_cube_map), >> GLL, 1999 }, >> diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c >> index f3dbda2..478ae5d 100644 >> --- a/src/mesa/main/get.c >> +++ b/src/mesa/main/get.c >> @@ -337,6 +337,7 @@ EXTRA_EXT(ARB_uniform_buffer_object); >> EXTRA_EXT(ARB_timer_query); >> EXTRA_EXT(ARB_map_buffer_alignment); >> EXTRA_EXT(ARB_texture_cube_map_array); >> +EXTRA_EXT(ARB_texture_buffer_range); > > This EXTRA macro doesn't prevent querying > TEXTURE_BUFFER_OFFSET_ALIGNMENT on a non-core GL profile where the > extension isn't advertised. Please see "extra_texture_buffer_object" > to know how the API support should be defined.
Please disregard that comment. The core profile requirement should actually be specified in get_hash_params.py by adding another section specifying the allowed APIs at its beginning. Sorry about the confusion. Marek _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev