From cfff2a6189b38f1ee8c8ca204e223574a5abf760 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 5 Jun 2009 17:16:47 -0600 Subject: mesa: bump version to 7.5-rc3 --- src/mesa/main/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h index e109f20df4..015ac71a17 100644 --- a/src/mesa/main/version.h +++ b/src/mesa/main/version.h @@ -31,7 +31,7 @@ #define MESA_MAJOR 7 #define MESA_MINOR 5 #define MESA_PATCH 0 -#define MESA_VERSION_STRING "7.5-rc2" +#define MESA_VERSION_STRING "7.5-rc3" /* To make version comparison easy */ #define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) -- cgit v1.2.3 From fce4ee12a620de4ece35cef62a4562bbd4895557 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 8 Jun 2009 07:25:24 -0600 Subject: mesa: EXT_vertex_array_bgra fixes 1) Pass the correct format when calling update_array in _mesa_VertexAttribPointerARB. 2) glVertexAttribPointerNV accepts GL_BGRA format too. 3) raise INVALID_VALUE error when format is BGRA and normalized is false in glVertexAttribPointerARB (cherry picked from commit 4adb190a162c5ed0684a8616331344caadba4010) --- src/mesa/main/varray.c | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c index 72b3e834b3..0882e8f37a 100644 --- a/src/mesa/main/varray.c +++ b/src/mesa/main/varray.c @@ -534,6 +534,7 @@ _mesa_VertexAttribPointerNV(GLuint index, GLint size, GLenum type, { GLboolean normalized = GL_FALSE; GLsizei elementSize; + GLenum format; GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); @@ -557,6 +558,21 @@ _mesa_VertexAttribPointerNV(GLuint index, GLint size, GLenum type, return; } + if (size == GL_BGRA) { + if (type != GL_UNSIGNED_BYTE) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glVertexAttribPointerNV(GL_BGRA/type)"); + return; + } + + format = GL_BGRA; + size = 4; + normalized = GL_TRUE; + } + else { + format = GL_RGBA; + } + /* check for valid 'type' and compute StrideB right away */ switch (type) { case GL_UNSIGNED_BYTE: @@ -579,7 +595,7 @@ _mesa_VertexAttribPointerNV(GLuint index, GLint size, GLenum type, update_array(ctx, &ctx->Array.ArrayObj->VertexAttrib[index], _NEW_ARRAY_ATTRIB(index), - elementSize, size, type, GL_RGBA, stride, normalized, ptr); + elementSize, size, type, format, stride, normalized, ptr); if (ctx->Driver.VertexAttribPointer) ctx->Driver.VertexAttribPointer( ctx, index, size, type, stride, ptr ); @@ -621,9 +637,14 @@ _mesa_VertexAttribPointerARB(GLuint index, GLint size, GLenum type, "glVertexAttribPointerARB(GL_BGRA/type)"); return; } + if (normalized != GL_TRUE) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glVertexAttribPointerARB(GL_BGRA/normalized)"); + return; + } + format = GL_BGRA; size = 4; - normalized = GL_TRUE; } else { format = GL_RGBA; @@ -668,7 +689,7 @@ _mesa_VertexAttribPointerARB(GLuint index, GLint size, GLenum type, update_array(ctx, &ctx->Array.ArrayObj->VertexAttrib[index], _NEW_ARRAY_ATTRIB(index), - elementSize, size, type, GL_RGBA, stride, normalized, ptr); + elementSize, size, type, format, stride, normalized, ptr); if (ctx->Driver.VertexAttribPointer) ctx->Driver.VertexAttribPointer(ctx, index, size, type, stride, ptr); -- cgit v1.2.3 From 0bced6a326e3520d2b280b4f6cdaadf843ce1d2d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 8 Jun 2009 09:42:04 -0600 Subject: mesa: bump MAX_PROGRAM_ENV_PARAMS from 128 to 256 Also, MAX_NV_VERTEX_PROGRAM_PARAMS should be 96, not 128 (or 256). --- src/mesa/main/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h index 2a9fdf9ca0..bd66a4c231 100644 --- a/src/mesa/main/config.h +++ b/src/mesa/main/config.h @@ -180,7 +180,7 @@ /*@{*/ #define MAX_PROGRAM_INSTRUCTIONS (16 * 1024) #define MAX_PROGRAM_LOCAL_PARAMS 256 /**< per-program constants (power of two) */ -#define MAX_PROGRAM_ENV_PARAMS 128 +#define MAX_PROGRAM_ENV_PARAMS 256 /**< per-context constants (power of two) */ #define MAX_PROGRAM_MATRICES 8 #define MAX_PROGRAM_MATRIX_STACK_DEPTH 4 #define MAX_PROGRAM_CALL_DEPTH 8 @@ -197,7 +197,7 @@ /*@{*/ #define MAX_NV_VERTEX_PROGRAM_INSTRUCTIONS 128 #define MAX_NV_VERTEX_PROGRAM_TEMPS 12 -#define MAX_NV_VERTEX_PROGRAM_PARAMS MAX_PROGRAM_ENV_PARAMS +#define MAX_NV_VERTEX_PROGRAM_PARAMS 96 #define MAX_NV_VERTEX_PROGRAM_INPUTS 16 #define MAX_NV_VERTEX_PROGRAM_OUTPUTS 15 /*@}*/ -- cgit v1.2.3 From e09f78d8dc7f20bb11f84206b6f1d71418332d8a Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Mon, 8 Jun 2009 16:29:46 +0100 Subject: mesa: Use matching signedness for the counter as upper bound. --- src/mesa/main/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c index 2eabcdaf49..b54e47919d 100644 --- a/src/mesa/main/debug.c +++ b/src/mesa/main/debug.c @@ -282,7 +282,7 @@ write_texture_image(struct gl_texture_object *texObj) case MESA_FORMAT_RGB565: { GLubyte *buf2 = (GLubyte *) _mesa_malloc(img->Width * img->Height * 3); - GLint i; + GLuint i; for (i = 0; i < img->Width * img->Height; i++) { GLint r, g, b; GLushort s = ((GLushort *) img->Data)[i]; -- cgit v1.2.3