From 1c54579e8687feee98a439b65c41d06f26804492 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sat, 30 Apr 2005 18:30:16 +0000 Subject: apply previous GL_COMPRESSED_TEXTURE_FORMATS_ARB fix to generator file, and regenerate get.c --- src/mesa/main/get.c | 7 +++++-- src/mesa/main/get_gen.py | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index 78f776ccf6..9b2981059c 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -1082,8 +1082,9 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params ) { GLint formats[100]; GLuint i, n = _mesa_get_compressed_formats(ctx, formats); + ASSERT(n <= 100); for (i = 0; i < n; i++) - params[i] = ENUM_TO_BOOLEAN(formats[i]); + params[i] = ENUM_TO_INT(formats[i]); } break; case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT: @@ -2925,8 +2926,9 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params ) { GLint formats[100]; GLuint i, n = _mesa_get_compressed_formats(ctx, formats); + ASSERT(n <= 100); for (i = 0; i < n; i++) - params[i] = ENUM_TO_BOOLEAN(formats[i]); + params[i] = ENUM_TO_INT(formats[i]); } break; case GL_ARRAY_ELEMENT_LOCK_FIRST_EXT: @@ -4768,6 +4770,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params ) { GLint formats[100]; GLuint i, n = _mesa_get_compressed_formats(ctx, formats); + ASSERT(n <= 100); for (i = 0; i < n; i++) params[i] = ENUM_TO_INT(formats[i]); } diff --git a/src/mesa/main/get_gen.py b/src/mesa/main/get_gen.py index 848b593c12..b3e6bc5855 100644 --- a/src/mesa/main/get_gen.py +++ b/src/mesa/main/get_gen.py @@ -508,8 +508,9 @@ StateVars = [ [], """GLint formats[100]; GLuint i, n = _mesa_get_compressed_formats(ctx, formats); + ASSERT(n <= 100); for (i = 0; i < n; i++) - params[i] = ENUM_TO_BOOLEAN(formats[i]);""", + params[i] = ENUM_TO_INT(formats[i]);""", "ARB_texture_compression" ), # GL_EXT_compiled_vertex_array -- cgit v1.2.3