From 88bd32383a06224c742f6af59fcd95cd11284d5b Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Fri, 1 Jan 2010 15:12:58 -0800 Subject: ARB prog parser: Silence unused variable warnings. --- src/mesa/shader/program_parse.y | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/shader/program_parse.y b/src/mesa/shader/program_parse.y index 3f1a350c24..b40b216d65 100644 --- a/src/mesa/shader/program_parse.y +++ b/src/mesa/shader/program_parse.y @@ -2297,7 +2297,9 @@ set_dst_reg(struct prog_dst_register *r, gl_register_file file, GLint index) const GLint maxIndex = 1 << INST_INDEX_BITS; const GLint minIndex = 0; ASSERT(index >= minIndex); + (void) minIndex; ASSERT(index <= maxIndex); + (void) maxIndex; ASSERT(file == PROGRAM_TEMPORARY || file == PROGRAM_ADDRESS || file == PROGRAM_OUTPUT); @@ -2338,7 +2340,9 @@ set_src_reg_swz(struct asm_src_register *r, gl_register_file file, GLint index, const GLint minIndex = -(1 << INST_INDEX_BITS); ASSERT(file < PROGRAM_FILE_MAX); ASSERT(index >= minIndex); + (void) minIndex; ASSERT(index <= maxIndex); + (void) maxIndex; memset(r, 0, sizeof(*r)); r->Base.File = file; r->Base.Index = index; -- cgit v1.2.3 From fab161f28739c397200e1ad3b6ad2a26409c95bf Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Fri, 1 Jan 2010 17:06:16 -0800 Subject: x86: Silence printf format warnings. --- src/mesa/x86/gen_matypes.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/x86/gen_matypes.c b/src/mesa/x86/gen_matypes.c index d56b701aa8..771d9df082 100644 --- a/src/mesa/x86/gen_matypes.c +++ b/src/mesa/x86/gen_matypes.c @@ -61,21 +61,11 @@ do { \ printf( "\n" ); \ } while (0) -#if defined(__BEOS__) || defined(__HAIKU__) || defined(_LP64) #define OFFSET( s, t, m ) \ - printf( "#define %s\t%ld\n", s, offsetof( t, m ) ); -#else -#define OFFSET( s, t, m ) \ - printf( "#define %s\t%d\n", s, offsetof( t, m ) ); -#endif + printf( "#define %s\t%lu\n", s, (unsigned long) offsetof( t, m ) ); -#if defined(__BEOS__) || defined(__HAIKU__) || defined(_LP64) -#define SIZEOF( s, t ) \ - printf( "#define %s\t%ld\n", s, sizeof(t) ); -#else #define SIZEOF( s, t ) \ - printf( "#define %s\t%d\n", s, sizeof(t) ); -#endif + printf( "#define %s\t%lu\n", s, (unsigned long) sizeof(t) ); #define DEFINE( s, d ) \ printf( "#define %s\t0x%x\n", s, d ); -- cgit v1.2.3 From 94c5faad26eae7bb4b95d6c95548860ff52354ba Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 2 Jan 2010 20:47:15 -0800 Subject: sis: ifdef out unused variable. Silences GCC warning. --- src/mesa/drivers/dri/sis/sis_context.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/sis/sis_context.c b/src/mesa/drivers/dri/sis/sis_context.c index f501e7ad2e..346e8c5568 100644 --- a/src/mesa/drivers/dri/sis/sis_context.c +++ b/src/mesa/drivers/dri/sis/sis_context.c @@ -83,6 +83,7 @@ static struct dri_extension card_extensions[] = { NULL, NULL } }; +#if 0 static struct dri_extension card_extensions_6326[] = { /*{ "GL_ARB_texture_border_clamp", NULL },*/ @@ -90,6 +91,7 @@ static struct dri_extension card_extensions_6326[] = /*{ "GL_MESA_ycbcr_texture", NULL },*/ { NULL, NULL } }; +#endif static const struct dri_debug_control debug_control[] = { -- cgit v1.2.3 From d27effbfd88463fc395c364c4e6fc59636074bda Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 2 Jan 2010 21:05:06 -0800 Subject: i810: Fix include recursion. --- src/mesa/drivers/dri/i810/i810tex.h | 1 - 1 file changed, 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i810/i810tex.h b/src/mesa/drivers/dri/i810/i810tex.h index d980927030..28958dcb4b 100644 --- a/src/mesa/drivers/dri/i810/i810tex.h +++ b/src/mesa/drivers/dri/i810/i810tex.h @@ -29,7 +29,6 @@ #include "main/mtypes.h" #include "main/mm.h" -#include "i810context.h" #include "i810_3d_reg.h" #include "texmem.h" -- cgit v1.2.3 From 287cbba9b7ebf95391f77b58f519dd76c415d355 Mon Sep 17 00:00:00 2001 From: Jeremy Huddleston Date: Thu, 24 Dec 2009 08:47:29 -0800 Subject: apple: Purge existing (not working) GLX_USE_APPLEGL from dated libGL on OSX Signed-off-by: Jeremy Huddleston --- src/glx/x11/dri_glx.c | 13 ------------- src/glx/x11/glxcurrent.c | 7 ------- src/mesa/main/dispatch.c | 4 ---- 3 files changed, 24 deletions(-) (limited to 'src/mesa') diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c index 4f7acb6cc3..88487b6c96 100644 --- a/src/glx/x11/dri_glx.c +++ b/src/glx/x11/dri_glx.c @@ -280,8 +280,6 @@ static const __DRIextension *loader_extensions[] = { NULL }; -#ifndef GLX_USE_APPLEGL - /** * Perform the required libGL-side initialization and call the client-side * driver's \c __driCreateNewScreen function. @@ -475,17 +473,6 @@ CallCreateNewScreen(Display * dpy, int scrn, __GLXscreenConfigs * psc, return NULL; } -#else /* !GLX_USE_APPLEGL */ - -static void * -CallCreateNewScreen(Display * dpy, int scrn, __GLXscreenConfigs * psc, - __GLXDRIdisplayPrivate * driDpy) -{ - return NULL; -} - -#endif /* !GLX_USE_APPLEGL */ - static void driDestroyContext(__GLXDRIcontext * context, __GLXscreenConfigs * psc, Display * dpy) diff --git a/src/glx/x11/glxcurrent.c b/src/glx/x11/glxcurrent.c index f1e3e161be..fae1bd9fa6 100644 --- a/src/glx/x11/glxcurrent.c +++ b/src/glx/x11/glxcurrent.c @@ -475,13 +475,6 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw, IndirectAPI = __glXNewIndirectAPI(); _glapi_set_dispatch(IndirectAPI); -#ifdef GLX_USE_APPLEGL - do { - extern void XAppleDRIUseIndirectDispatch(void); - XAppleDRIUseIndirectDispatch(); - } while (0); -#endif - state = (__GLXattribute *) (gc->client_state_private); gc->currentContextTag = reply.contextTag; diff --git a/src/mesa/main/dispatch.c b/src/mesa/main/dispatch.c index 97d213e8e1..eb0d1ff8a7 100644 --- a/src/mesa/main/dispatch.c +++ b/src/mesa/main/dispatch.c @@ -37,8 +37,6 @@ * \author Brian Paul */ -#ifndef GLX_USE_APPLEGL - #include "main/glheader.h" #include "main/compiler.h" #include "glapi/glapi.h" @@ -92,5 +90,3 @@ #include "glapi/glapitemp.h" #endif /* USE_X86_ASM */ - -#endif /* !GLX_USE_APPLEGL */ -- cgit v1.2.3 From eb5d9e6f70037d4dc12430302f82a116cb1e00ca Mon Sep 17 00:00:00 2001 From: José Fonseca Date: Sun, 3 Jan 2010 19:58:54 +0000 Subject: mesa: Cope with the degenerate case of zero length ranges. Fixes assertion failures on glean's bufferObject test. --- src/mesa/state_tracker/st_cb_bufferobjects.c | 49 +++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/state_tracker/st_cb_bufferobjects.c b/src/mesa/state_tracker/st_cb_bufferobjects.c index 494a3a99c8..0102d8a6f7 100644 --- a/src/mesa/state_tracker/st_cb_bufferobjects.c +++ b/src/mesa/state_tracker/st_cb_bufferobjects.c @@ -103,6 +103,17 @@ st_bufferobj_subdata(GLcontext *ctx, ASSERT(size >= 0); ASSERT(offset + size <= obj->Size); + if (!size) + return; + + /* + * According to ARB_vertex_buffer_object specification, if data is null, + * then the contents of the buffer object's data store is undefined. We just + * ignore, and leave it unchanged. + */ + if (!data) + return; + st_cond_flush_pipe_buffer_write(st_context(ctx), st_obj->buffer, offset, size, data); } @@ -125,6 +136,9 @@ st_bufferobj_get_subdata(GLcontext *ctx, ASSERT(size >= 0); ASSERT(offset + size <= obj->Size); + if (!size) + return; + st_cond_flush_pipe_buffer_read(st_context(ctx), st_obj->buffer, offset, size, data); } @@ -222,6 +236,13 @@ st_bufferobj_map(GLcontext *ctx, GLenum target, GLenum access, } +/** + * Dummy data whose's pointer is used for zero length ranges. + */ +static long +st_bufferobj_zero_length_range = 0; + + /** * Called via glMapBufferRange(). */ @@ -257,14 +278,26 @@ st_bufferobj_map_range(GLcontext *ctx, GLenum target, assert(offset < obj->Size); assert(offset + length <= obj->Size); - obj->Pointer = pipe_buffer_map_range(pipe->screen, st_obj->buffer, offset, length, flags); + /* + * We go out of way here to hide the degenerate yet valid case of zero + * length range from the pipe driver. + */ + if (!length) { + obj->Pointer = &st_bufferobj_zero_length_range; + } + else { + obj->Pointer = pipe_buffer_map_range(pipe->screen, st_obj->buffer, offset, length, flags); + if (obj->Pointer) { + obj->Pointer = (ubyte *) obj->Pointer + offset; + } + } + if (obj->Pointer) { - obj->Pointer = (ubyte *) obj->Pointer + offset; obj->Offset = offset; obj->Length = length; obj->AccessFlags = access; } - + return obj->Pointer; } @@ -282,6 +315,9 @@ st_bufferobj_flush_mapped_range(GLcontext *ctx, GLenum target, assert(length >= 0); assert(offset + length <= obj->Length); + if (!length) + return; + pipe_buffer_flush_mapped_range(pipe->screen, st_obj->buffer, obj->Offset + offset, length); } @@ -296,7 +332,9 @@ st_bufferobj_unmap(GLcontext *ctx, GLenum target, struct gl_buffer_object *obj) struct pipe_context *pipe = st_context(ctx)->pipe; struct st_buffer_object *st_obj = st_buffer_object(obj); - pipe_buffer_unmap(pipe->screen, st_obj->buffer); + if(obj->Length) + pipe_buffer_unmap(pipe->screen, st_obj->buffer); + obj->Pointer = NULL; obj->Offset = 0; obj->Length = 0; @@ -319,6 +357,9 @@ st_copy_buffer_subdata(GLcontext *ctx, struct st_buffer_object *dstObj = st_buffer_object(dst); ubyte *srcPtr, *dstPtr; + if(!size) + return; + /* buffer should not already be mapped */ assert(!src->Pointer); assert(!dst->Pointer); -- cgit v1.2.3 From 58531029e6eba11c374d996ea031f1bbe4386c54 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 3 Jan 2010 18:32:07 -0800 Subject: r300: Silence 'mixed declarations and code' warning. --- src/mesa/drivers/dri/r300/compiler/memory_pool.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/compiler/memory_pool.c b/src/mesa/drivers/dri/r300/compiler/memory_pool.c index 37aa2b6579..76c7c60d8f 100644 --- a/src/mesa/drivers/dri/r300/compiler/memory_pool.c +++ b/src/mesa/drivers/dri/r300/compiler/memory_pool.c @@ -71,12 +71,14 @@ static void refill_pool(struct memory_pool * pool) void * memory_pool_malloc(struct memory_pool * pool, unsigned int bytes) { if (bytes < POOL_LARGE_ALLOC) { + void * ptr; + if (pool->head + bytes > pool->end) refill_pool(pool); assert(pool->head + bytes <= pool->end); - void * ptr = pool->head; + ptr = pool->head; pool->head += bytes; pool->head = (unsigned char*)(((unsigned long)pool->head + POOL_ALIGN - 1) & ~(POOL_ALIGN - 1)); -- cgit v1.2.3 From 0214b7b3c1eae5573b03b485b18e4c10729831ee Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 3 Jan 2010 20:16:59 -0800 Subject: r300: Silence 'mixed declarations and code' warning. --- src/mesa/drivers/dri/r300/compiler/radeon_code.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_code.c b/src/mesa/drivers/dri/r300/compiler/radeon_code.c index 1a3d8bb641..853b2becd1 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_code.c +++ b/src/mesa/drivers/dri/r300/compiler/radeon_code.c @@ -143,7 +143,8 @@ unsigned rc_constants_add_immediate_scalar(struct rc_constant_list * c, float da for(index = 0; index < c->Count; ++index) { if (c->Constants[index].Type == RC_CONSTANT_IMMEDIATE) { - for(unsigned comp = 0; comp < c->Constants[index].Size; ++comp) { + unsigned comp; + for(comp = 0; comp < c->Constants[index].Size; ++comp) { if (c->Constants[index].u.Immediate[comp] == data) { *swizzle = RC_MAKE_SWIZZLE(comp, comp, comp, comp); return index; -- cgit v1.2.3 From b14cbfaebc135351a72d86128ae987611ef8c31f Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 3 Jan 2010 20:51:23 -0800 Subject: r300: Silence 'mixed declarations and code' warnings. --- src/mesa/drivers/dri/r300/compiler/radeon_compiler.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c index c0e7a7f7a0..41ea23ee32 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c +++ b/src/mesa/drivers/dri/r300/compiler/radeon_compiler.c @@ -232,12 +232,16 @@ void rc_copy_output(struct radeon_compiler * c, unsigned output, unsigned dup_ou void rc_transform_fragment_wpos(struct radeon_compiler * c, unsigned wpos, unsigned new_input) { unsigned tempregi = rc_find_free_temporary(c); + struct rc_instruction * inst_rcp; + struct rc_instruction * inst_mul; + struct rc_instruction * inst_mad; + struct rc_instruction * inst; c->Program.InputsRead &= ~(1 << wpos); c->Program.InputsRead |= 1 << new_input; /* perspective divide */ - struct rc_instruction * inst_rcp = rc_insert_new_instruction(c, &c->Program.Instructions); + inst_rcp = rc_insert_new_instruction(c, &c->Program.Instructions); inst_rcp->U.I.Opcode = RC_OPCODE_RCP; inst_rcp->U.I.DstReg.File = RC_FILE_TEMPORARY; @@ -248,7 +252,7 @@ void rc_transform_fragment_wpos(struct radeon_compiler * c, unsigned wpos, unsig inst_rcp->U.I.SrcReg[0].Index = new_input; inst_rcp->U.I.SrcReg[0].Swizzle = RC_SWIZZLE_WWWW; - struct rc_instruction * inst_mul = rc_insert_new_instruction(c, inst_rcp); + inst_mul = rc_insert_new_instruction(c, inst_rcp); inst_mul->U.I.Opcode = RC_OPCODE_MUL; inst_mul->U.I.DstReg.File = RC_FILE_TEMPORARY; @@ -263,7 +267,7 @@ void rc_transform_fragment_wpos(struct radeon_compiler * c, unsigned wpos, unsig inst_mul->U.I.SrcReg[1].Swizzle = RC_SWIZZLE_WWWW; /* viewport transformation */ - struct rc_instruction * inst_mad = rc_insert_new_instruction(c, inst_mul); + inst_mad = rc_insert_new_instruction(c, inst_mul); inst_mad->U.I.Opcode = RC_OPCODE_MAD; inst_mad->U.I.DstReg.File = RC_FILE_TEMPORARY; @@ -282,7 +286,6 @@ void rc_transform_fragment_wpos(struct radeon_compiler * c, unsigned wpos, unsig inst_mad->U.I.SrcReg[2].Index = inst_mad->U.I.SrcReg[1].Index; inst_mad->U.I.SrcReg[2].Swizzle = RC_MAKE_SWIZZLE(RC_SWIZZLE_X, RC_SWIZZLE_Y, RC_SWIZZLE_Z, RC_SWIZZLE_ZERO); - struct rc_instruction * inst; for (inst = inst_mad->Next; inst != &c->Program.Instructions; inst = inst->Next) { const struct rc_opcode_info * opcode = rc_get_opcode_info(inst->U.I.Opcode); unsigned i; -- cgit v1.2.3 From d1e2fc19cc1b8e4c23f5ad82ec68779c41101b41 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 3 Jan 2010 23:33:32 -0800 Subject: r300: Use C-style comments. --- .../drivers/dri/r300/compiler/radeon_program_alu.c | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c b/src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c index ced66af1eb..b5c08aea49 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c +++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c @@ -267,9 +267,9 @@ static void transform_LIT(struct radeon_compiler* c, temp = inst->U.I.DstReg.Index; srctemp = srcreg(RC_FILE_TEMPORARY, temp); - // tmp.x = max(0.0, Src.x); - // tmp.y = max(0.0, Src.y); - // tmp.w = clamp(Src.z, -128+eps, 128-eps); + /* tmp.x = max(0.0, Src.x); */ + /* tmp.y = max(0.0, Src.y); */ + /* tmp.w = clamp(Src.z, -128+eps, 128-eps); */ emit2(c, inst->Prev, RC_OPCODE_MAX, 0, dstregtmpmask(temp, RC_MASK_XYW), inst->U.I.SrcReg[0], @@ -280,7 +280,7 @@ static void transform_LIT(struct radeon_compiler* c, swizzle(srctemp, RC_SWIZZLE_W, RC_SWIZZLE_W, RC_SWIZZLE_W, RC_SWIZZLE_W), negate(srcregswz(RC_FILE_CONSTANT, constant, constant_swizzle))); - // tmp.w = Pow(tmp.y, tmp.w) + /* tmp.w = Pow(tmp.y, tmp.w) */ emit1(c, inst->Prev, RC_OPCODE_LG2, 0, dstregtmpmask(temp, RC_MASK_W), swizzle(srctemp, RC_SWIZZLE_Y, RC_SWIZZLE_Y, RC_SWIZZLE_Y, RC_SWIZZLE_Y)); @@ -292,14 +292,14 @@ static void transform_LIT(struct radeon_compiler* c, dstregtmpmask(temp, RC_MASK_W), swizzle(srctemp, RC_SWIZZLE_W, RC_SWIZZLE_W, RC_SWIZZLE_W, RC_SWIZZLE_W)); - // tmp.z = (tmp.x > 0) ? tmp.w : 0.0 + /* tmp.z = (tmp.x > 0) ? tmp.w : 0.0 */ emit3(c, inst->Prev, RC_OPCODE_CMP, inst->U.I.SaturateMode, dstregtmpmask(temp, RC_MASK_Z), negate(swizzle(srctemp, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X)), swizzle(srctemp, RC_SWIZZLE_W, RC_SWIZZLE_W, RC_SWIZZLE_W, RC_SWIZZLE_W), builtin_zero); - // tmp.x, tmp.y, tmp.w = 1.0, tmp.x, 1.0 + /* tmp.x, tmp.y, tmp.w = 1.0, tmp.x, 1.0 */ emit1(c, inst->Prev, RC_OPCODE_MOV, inst->U.I.SaturateMode, dstregtmpmask(temp, RC_MASK_XYW), swizzle(srctemp, RC_SWIZZLE_ONE, RC_SWIZZLE_X, RC_SWIZZLE_ONE, RC_SWIZZLE_ONE)); @@ -533,16 +533,16 @@ static void sincos_constants(struct radeon_compiler* c, unsigned int *constants) { static const float SinCosConsts[2][4] = { { - 1.273239545, // 4/PI - -0.405284735, // -4/(PI*PI) - 3.141592654, // PI - 0.2225 // weight + 1.273239545, /* 4/PI */ + -0.405284735, /* -4/(PI*PI) */ + 3.141592654, /* PI */ + 0.2225 /* weight */ }, { 0.75, 0.5, - 0.159154943, // 1/(2*PI) - 6.283185307 // 2*PI + 0.159154943, /* 1/(2*PI) */ + 6.283185307 /* 2*PI */ } }; int i; @@ -602,9 +602,9 @@ int radeonTransformTrigSimple(struct radeon_compiler* c, sincos_constants(c, constants); if (inst->U.I.Opcode == RC_OPCODE_COS) { - // MAD tmp.x, src, 1/(2*PI), 0.75 - // FRC tmp.x, tmp.x - // MAD tmp.z, tmp.x, 2*PI, -PI + /* MAD tmp.x, src, 1/(2*PI), 0.75 */ + /* FRC tmp.x, tmp.x */ + /* MAD tmp.z, tmp.x, 2*PI, -PI */ emit3(c, inst->Prev, RC_OPCODE_MAD, 0, dstregtmpmask(tempreg, RC_MASK_W), swizzle(inst->U.I.SrcReg[0], RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X), swizzle(srcreg(RC_FILE_CONSTANT, constants[1]), RC_SWIZZLE_Z, RC_SWIZZLE_Z, RC_SWIZZLE_Z, RC_SWIZZLE_Z), -- cgit v1.2.3 From 1e414df894fc70b7024eb38c812e582336014974 Mon Sep 17 00:00:00 2001 From: Michel Dänzer Date: Mon, 4 Jan 2010 16:54:29 +0100 Subject: st/mesa: Only call st_texture_image_unmap() if texImage->Data is non-NULL. This was already done in st_TexImage() but was missed between incremental changes to st_TexSubimage(). --- src/mesa/state_tracker/st_cb_texture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index d4630a514f..cb9106c7de 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1090,7 +1090,7 @@ st_TexSubimage(GLcontext *ctx, GLint dims, GLenum target, GLint level, done: _mesa_unmap_teximage_pbo(ctx, packing); - if (stImage->pt) { + if (stImage->pt && texImage->Data) { st_texture_image_unmap(ctx->st, stImage); texImage->Data = NULL; } -- cgit v1.2.3 From f52dd2ab333b0bdfa1df15bffb8156350c93f892 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 29 Dec 2009 10:26:28 -0700 Subject: glsl: use varName variable in _slang_gen_assignment() --- src/mesa/shader/slang/slang_codegen.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index b62cfc36af..372a9acdd0 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -4249,14 +4249,15 @@ _slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper) if (oper->children[0].type == SLANG_OPER_IDENTIFIER) { /* Check that var is writeable */ + const char *varName = (char *) oper->children[0].a_id; slang_variable *var = _slang_variable_locate(oper->children[0].locals, oper->children[0].a_id, GL_TRUE); if (!var) { - slang_info_log_error(A->log, "undefined variable '%s'", - (char *) oper->children[0].a_id); + slang_info_log_error(A->log, "undefined variable '%s'", varName); return NULL; } + if (var->type.qualifier == SLANG_QUAL_CONST || var->type.qualifier == SLANG_QUAL_ATTRIBUTE || var->type.qualifier == SLANG_QUAL_UNIFORM || @@ -4264,7 +4265,7 @@ _slang_gen_assignment(slang_assemble_ctx * A, slang_operation *oper) A->program->Target == GL_FRAGMENT_PROGRAM_ARB)) { slang_info_log_error(A->log, "illegal assignment to read-only variable '%s'", - (char *) oper->children[0].a_id); + varName); return NULL; } -- cgit v1.2.3 From 707faf65c89dbe64e2cb01196b913b354221e26e Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 4 Jan 2010 11:29:09 -0700 Subject: glapi: comment-out TIMEOUT_IGNORED This is not really a GLenum value. --- src/mesa/glapi/ARB_sync.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/glapi/ARB_sync.xml b/src/mesa/glapi/ARB_sync.xml index 37f474980c..4e4eebac32 100644 --- a/src/mesa/glapi/ARB_sync.xml +++ b/src/mesa/glapi/ARB_sync.xml @@ -33,8 +33,10 @@ - + -- cgit v1.2.3 From e661bf50183bf5481ee0d6c8e6be0809da991913 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 4 Jan 2010 11:29:38 -0700 Subject: mesa: regenerated enums.c file --- src/mesa/main/enums.c | 465 +++++++++++++++++++++++++------------------------- 1 file changed, 231 insertions(+), 234 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/enums.c b/src/mesa/main/enums.c index f9f4bc7853..8a39401371 100644 --- a/src/mesa/main/enums.c +++ b/src/mesa/main/enums.c @@ -1787,7 +1787,6 @@ LONGSTRING static const char enum_string_table[] = "GL_TEXTURE_WRAP_S\0" "GL_TEXTURE_WRAP_T\0" "GL_TIMEOUT_EXPIRED\0" - "GL_TIMEOUT_IGNORED\0" "GL_TIME_ELAPSED_EXT\0" "GL_TRACK_MATRIX_NV\0" "GL_TRACK_MATRIX_TRANSFORM_NV\0" @@ -1919,7 +1918,7 @@ LONGSTRING static const char enum_string_table[] = "GL_ZOOM_Y\0" ; -static const enum_elt all_enums[1881] = +static const enum_elt all_enums[1880] = { { 0, 0x00000600 }, /* GL_2D */ { 6, 0x00001407 }, /* GL_2_BYTES */ @@ -3672,147 +3671,146 @@ static const enum_elt all_enums[1881] = { 37686, 0x00002802 }, /* GL_TEXTURE_WRAP_S */ { 37704, 0x00002803 }, /* GL_TEXTURE_WRAP_T */ { 37722, 0x0000911B }, /* GL_TIMEOUT_EXPIRED */ - { 37741, 0xFFFFFFFFFFFFFFFF }, /* GL_TIMEOUT_IGNORED */ - { 37760, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */ - { 37780, 0x00008648 }, /* GL_TRACK_MATRIX_NV */ - { 37799, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */ - { 37828, 0x00001000 }, /* GL_TRANSFORM_BIT */ - { 37845, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */ - { 37871, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */ - { 37901, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */ - { 37933, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */ - { 37963, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */ - { 37997, 0x0000862C }, /* GL_TRANSPOSE_NV */ - { 38013, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */ - { 38044, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */ - { 38079, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */ - { 38107, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */ - { 38139, 0x00000004 }, /* GL_TRIANGLES */ - { 38152, 0x00000006 }, /* GL_TRIANGLE_FAN */ - { 38168, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */ - { 38189, 0x00000005 }, /* GL_TRIANGLE_STRIP */ - { 38207, 0x00000001 }, /* GL_TRUE */ - { 38215, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */ - { 38235, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */ - { 38258, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */ - { 38278, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */ - { 38299, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */ - { 38321, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */ - { 38343, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */ - { 38363, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */ - { 38384, 0x00009118 }, /* GL_UNSIGNALED */ - { 38398, 0x00001401 }, /* GL_UNSIGNED_BYTE */ - { 38415, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */ - { 38442, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */ - { 38465, 0x00001405 }, /* GL_UNSIGNED_INT */ - { 38481, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */ - { 38508, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */ - { 38529, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_EXT */ - { 38554, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */ - { 38578, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */ - { 38609, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */ - { 38633, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */ - { 38661, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */ - { 38684, 0x00001403 }, /* GL_UNSIGNED_SHORT */ - { 38702, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */ - { 38732, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */ - { 38758, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */ - { 38788, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */ - { 38814, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */ - { 38838, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */ - { 38866, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */ - { 38894, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */ - { 38921, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */ - { 38953, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */ - { 38984, 0x00008CA2 }, /* GL_UPPER_LEFT */ - { 38998, 0x00002A20 }, /* GL_V2F */ - { 39005, 0x00002A21 }, /* GL_V3F */ - { 39012, 0x00008B83 }, /* GL_VALIDATE_STATUS */ - { 39031, 0x00001F00 }, /* GL_VENDOR */ - { 39041, 0x00001F02 }, /* GL_VERSION */ - { 39052, 0x00008074 }, /* GL_VERTEX_ARRAY */ - { 39068, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */ - { 39092, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */ - { 39122, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */ - { 39153, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */ - { 39188, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */ - { 39212, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */ - { 39233, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */ - { 39256, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */ - { 39277, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */ - { 39304, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */ - { 39332, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */ - { 39360, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */ - { 39388, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */ - { 39416, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */ - { 39444, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */ - { 39472, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */ - { 39499, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */ - { 39526, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */ - { 39553, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */ - { 39580, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */ - { 39607, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */ - { 39634, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */ - { 39661, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */ - { 39688, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */ - { 39715, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */ - { 39753, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */ - { 39795, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */ - { 39826, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */ - { 39861, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */ - { 39895, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */ - { 39933, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */ - { 39964, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */ - { 39999, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */ - { 40027, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */ - { 40059, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */ - { 40089, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */ - { 40123, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */ - { 40151, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */ - { 40183, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */ - { 40203, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */ - { 40225, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */ - { 40254, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */ - { 40275, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */ - { 40304, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */ - { 40337, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */ - { 40369, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */ - { 40396, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */ - { 40427, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */ - { 40457, 0x00008B31 }, /* GL_VERTEX_SHADER */ - { 40474, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */ - { 40495, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */ - { 40522, 0x00000BA2 }, /* GL_VIEWPORT */ - { 40534, 0x00000800 }, /* GL_VIEWPORT_BIT */ - { 40550, 0x0000911D }, /* GL_WAIT_FAILED */ - { 40565, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */ - { 40585, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */ - { 40616, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */ - { 40651, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */ - { 40679, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */ - { 40704, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */ - { 40731, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */ - { 40756, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */ - { 40780, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */ - { 40799, 0x000088B9 }, /* GL_WRITE_ONLY */ - { 40813, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */ - { 40831, 0x00001506 }, /* GL_XOR */ - { 40838, 0x000085B9 }, /* GL_YCBCR_422_APPLE */ - { 40857, 0x00008757 }, /* GL_YCBCR_MESA */ - { 40871, 0x00000000 }, /* GL_ZERO */ - { 40879, 0x00000D16 }, /* GL_ZOOM_X */ - { 40889, 0x00000D17 }, /* GL_ZOOM_Y */ + { 37741, 0x000088BF }, /* GL_TIME_ELAPSED_EXT */ + { 37761, 0x00008648 }, /* GL_TRACK_MATRIX_NV */ + { 37780, 0x00008649 }, /* GL_TRACK_MATRIX_TRANSFORM_NV */ + { 37809, 0x00001000 }, /* GL_TRANSFORM_BIT */ + { 37826, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX */ + { 37852, 0x000084E6 }, /* GL_TRANSPOSE_COLOR_MATRIX_ARB */ + { 37882, 0x000088B7 }, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */ + { 37914, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX */ + { 37944, 0x000084E3 }, /* GL_TRANSPOSE_MODELVIEW_MATRIX_ARB */ + { 37978, 0x0000862C }, /* GL_TRANSPOSE_NV */ + { 37994, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX */ + { 38025, 0x000084E4 }, /* GL_TRANSPOSE_PROJECTION_MATRIX_ARB */ + { 38060, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX */ + { 38088, 0x000084E5 }, /* GL_TRANSPOSE_TEXTURE_MATRIX_ARB */ + { 38120, 0x00000004 }, /* GL_TRIANGLES */ + { 38133, 0x00000006 }, /* GL_TRIANGLE_FAN */ + { 38149, 0x00008615 }, /* GL_TRIANGLE_MESH_SUN */ + { 38170, 0x00000005 }, /* GL_TRIANGLE_STRIP */ + { 38188, 0x00000001 }, /* GL_TRUE */ + { 38196, 0x00000CF5 }, /* GL_UNPACK_ALIGNMENT */ + { 38216, 0x0000806E }, /* GL_UNPACK_IMAGE_HEIGHT */ + { 38239, 0x00000CF1 }, /* GL_UNPACK_LSB_FIRST */ + { 38259, 0x00000CF2 }, /* GL_UNPACK_ROW_LENGTH */ + { 38280, 0x0000806D }, /* GL_UNPACK_SKIP_IMAGES */ + { 38302, 0x00000CF4 }, /* GL_UNPACK_SKIP_PIXELS */ + { 38324, 0x00000CF3 }, /* GL_UNPACK_SKIP_ROWS */ + { 38344, 0x00000CF0 }, /* GL_UNPACK_SWAP_BYTES */ + { 38365, 0x00009118 }, /* GL_UNSIGNALED */ + { 38379, 0x00001401 }, /* GL_UNSIGNED_BYTE */ + { 38396, 0x00008362 }, /* GL_UNSIGNED_BYTE_2_3_3_REV */ + { 38423, 0x00008032 }, /* GL_UNSIGNED_BYTE_3_3_2 */ + { 38446, 0x00001405 }, /* GL_UNSIGNED_INT */ + { 38462, 0x00008036 }, /* GL_UNSIGNED_INT_10_10_10_2 */ + { 38489, 0x000084FA }, /* GL_UNSIGNED_INT_24_8 */ + { 38510, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_EXT */ + { 38535, 0x000084FA }, /* GL_UNSIGNED_INT_24_8_NV */ + { 38559, 0x00008368 }, /* GL_UNSIGNED_INT_2_10_10_10_REV */ + { 38590, 0x00008035 }, /* GL_UNSIGNED_INT_8_8_8_8 */ + { 38614, 0x00008367 }, /* GL_UNSIGNED_INT_8_8_8_8_REV */ + { 38642, 0x00008C17 }, /* GL_UNSIGNED_NORMALIZED */ + { 38665, 0x00001403 }, /* GL_UNSIGNED_SHORT */ + { 38683, 0x00008366 }, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */ + { 38713, 0x00008033 }, /* GL_UNSIGNED_SHORT_4_4_4_4 */ + { 38739, 0x00008365 }, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */ + { 38769, 0x00008034 }, /* GL_UNSIGNED_SHORT_5_5_5_1 */ + { 38795, 0x00008363 }, /* GL_UNSIGNED_SHORT_5_6_5 */ + { 38819, 0x00008364 }, /* GL_UNSIGNED_SHORT_5_6_5_REV */ + { 38847, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_APPLE */ + { 38875, 0x000085BA }, /* GL_UNSIGNED_SHORT_8_8_MESA */ + { 38902, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */ + { 38934, 0x000085BB }, /* GL_UNSIGNED_SHORT_8_8_REV_MESA */ + { 38965, 0x00008CA2 }, /* GL_UPPER_LEFT */ + { 38979, 0x00002A20 }, /* GL_V2F */ + { 38986, 0x00002A21 }, /* GL_V3F */ + { 38993, 0x00008B83 }, /* GL_VALIDATE_STATUS */ + { 39012, 0x00001F00 }, /* GL_VENDOR */ + { 39022, 0x00001F02 }, /* GL_VERSION */ + { 39033, 0x00008074 }, /* GL_VERTEX_ARRAY */ + { 39049, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING */ + { 39073, 0x000085B5 }, /* GL_VERTEX_ARRAY_BINDING_APPLE */ + { 39103, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING */ + { 39134, 0x00008896 }, /* GL_VERTEX_ARRAY_BUFFER_BINDING_ARB */ + { 39169, 0x0000808E }, /* GL_VERTEX_ARRAY_POINTER */ + { 39193, 0x0000807A }, /* GL_VERTEX_ARRAY_SIZE */ + { 39214, 0x0000807C }, /* GL_VERTEX_ARRAY_STRIDE */ + { 39237, 0x0000807B }, /* GL_VERTEX_ARRAY_TYPE */ + { 39258, 0x00008650 }, /* GL_VERTEX_ATTRIB_ARRAY0_NV */ + { 39285, 0x0000865A }, /* GL_VERTEX_ATTRIB_ARRAY10_NV */ + { 39313, 0x0000865B }, /* GL_VERTEX_ATTRIB_ARRAY11_NV */ + { 39341, 0x0000865C }, /* GL_VERTEX_ATTRIB_ARRAY12_NV */ + { 39369, 0x0000865D }, /* GL_VERTEX_ATTRIB_ARRAY13_NV */ + { 39397, 0x0000865E }, /* GL_VERTEX_ATTRIB_ARRAY14_NV */ + { 39425, 0x0000865F }, /* GL_VERTEX_ATTRIB_ARRAY15_NV */ + { 39453, 0x00008651 }, /* GL_VERTEX_ATTRIB_ARRAY1_NV */ + { 39480, 0x00008652 }, /* GL_VERTEX_ATTRIB_ARRAY2_NV */ + { 39507, 0x00008653 }, /* GL_VERTEX_ATTRIB_ARRAY3_NV */ + { 39534, 0x00008654 }, /* GL_VERTEX_ATTRIB_ARRAY4_NV */ + { 39561, 0x00008655 }, /* GL_VERTEX_ATTRIB_ARRAY5_NV */ + { 39588, 0x00008656 }, /* GL_VERTEX_ATTRIB_ARRAY6_NV */ + { 39615, 0x00008657 }, /* GL_VERTEX_ATTRIB_ARRAY7_NV */ + { 39642, 0x00008658 }, /* GL_VERTEX_ATTRIB_ARRAY8_NV */ + { 39669, 0x00008659 }, /* GL_VERTEX_ATTRIB_ARRAY9_NV */ + { 39696, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */ + { 39734, 0x0000889F }, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB */ + { 39776, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */ + { 39807, 0x00008622 }, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB */ + { 39842, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */ + { 39876, 0x0000886A }, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB */ + { 39914, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */ + { 39945, 0x00008645 }, /* GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB */ + { 39980, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */ + { 40008, 0x00008623 }, /* GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB */ + { 40040, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */ + { 40070, 0x00008624 }, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB */ + { 40104, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */ + { 40132, 0x00008625 }, /* GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB */ + { 40164, 0x000086A7 }, /* GL_VERTEX_BLEND_ARB */ + { 40184, 0x00008620 }, /* GL_VERTEX_PROGRAM_ARB */ + { 40206, 0x0000864A }, /* GL_VERTEX_PROGRAM_BINDING_NV */ + { 40235, 0x00008620 }, /* GL_VERTEX_PROGRAM_NV */ + { 40256, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE */ + { 40285, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_ARB */ + { 40318, 0x00008642 }, /* GL_VERTEX_PROGRAM_POINT_SIZE_NV */ + { 40350, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE */ + { 40377, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_ARB */ + { 40408, 0x00008643 }, /* GL_VERTEX_PROGRAM_TWO_SIDE_NV */ + { 40438, 0x00008B31 }, /* GL_VERTEX_SHADER */ + { 40455, 0x00008B31 }, /* GL_VERTEX_SHADER_ARB */ + { 40476, 0x00008621 }, /* GL_VERTEX_STATE_PROGRAM_NV */ + { 40503, 0x00000BA2 }, /* GL_VIEWPORT */ + { 40515, 0x00000800 }, /* GL_VIEWPORT_BIT */ + { 40531, 0x0000911D }, /* GL_WAIT_FAILED */ + { 40546, 0x000086AD }, /* GL_WEIGHT_ARRAY_ARB */ + { 40566, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */ + { 40597, 0x0000889E }, /* GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB */ + { 40632, 0x000086AC }, /* GL_WEIGHT_ARRAY_POINTER_ARB */ + { 40660, 0x000086AB }, /* GL_WEIGHT_ARRAY_SIZE_ARB */ + { 40685, 0x000086AA }, /* GL_WEIGHT_ARRAY_STRIDE_ARB */ + { 40712, 0x000086A9 }, /* GL_WEIGHT_ARRAY_TYPE_ARB */ + { 40737, 0x000086A6 }, /* GL_WEIGHT_SUM_UNITY_ARB */ + { 40761, 0x000081D4 }, /* GL_WRAP_BORDER_SUN */ + { 40780, 0x000088B9 }, /* GL_WRITE_ONLY */ + { 40794, 0x000088B9 }, /* GL_WRITE_ONLY_ARB */ + { 40812, 0x00001506 }, /* GL_XOR */ + { 40819, 0x000085B9 }, /* GL_YCBCR_422_APPLE */ + { 40838, 0x00008757 }, /* GL_YCBCR_MESA */ + { 40852, 0x00000000 }, /* GL_ZERO */ + { 40860, 0x00000D16 }, /* GL_ZOOM_X */ + { 40870, 0x00000D17 }, /* GL_ZOOM_Y */ }; -static const unsigned reduced_enums[1347] = +static const unsigned reduced_enums[1346] = { 479, /* GL_FALSE */ 701, /* GL_LINES */ 703, /* GL_LINE_LOOP */ 710, /* GL_LINE_STRIP */ - 1766, /* GL_TRIANGLES */ - 1769, /* GL_TRIANGLE_STRIP */ - 1767, /* GL_TRIANGLE_FAN */ + 1765, /* GL_TRIANGLES */ + 1768, /* GL_TRIANGLE_STRIP */ + 1766, /* GL_TRIANGLE_FAN */ 1285, /* GL_QUADS */ 1289, /* GL_QUAD_STRIP */ 1171, /* GL_POLYGON */ @@ -3946,7 +3944,7 @@ static const unsigned reduced_enums[1347] = 1533, /* GL_STENCIL_WRITEMASK */ 853, /* GL_MATRIX_MODE */ 1025, /* GL_NORMALIZE */ - 1861, /* GL_VIEWPORT */ + 1860, /* GL_VIEWPORT */ 999, /* GL_MODELVIEW_STACK_DEPTH */ 1263, /* GL_PROJECTION_STACK_DEPTH */ 1740, /* GL_TEXTURE_STACK_DEPTH */ @@ -4008,12 +4006,12 @@ static const unsigned reduced_enums[1347] = 1117, /* GL_PIXEL_MAP_G_TO_G_SIZE */ 1115, /* GL_PIXEL_MAP_B_TO_B_SIZE */ 1113, /* GL_PIXEL_MAP_A_TO_A_SIZE */ - 1778, /* GL_UNPACK_SWAP_BYTES */ - 1773, /* GL_UNPACK_LSB_FIRST */ - 1774, /* GL_UNPACK_ROW_LENGTH */ - 1777, /* GL_UNPACK_SKIP_ROWS */ - 1776, /* GL_UNPACK_SKIP_PIXELS */ - 1771, /* GL_UNPACK_ALIGNMENT */ + 1777, /* GL_UNPACK_SWAP_BYTES */ + 1772, /* GL_UNPACK_LSB_FIRST */ + 1773, /* GL_UNPACK_ROW_LENGTH */ + 1776, /* GL_UNPACK_SKIP_ROWS */ + 1775, /* GL_UNPACK_SKIP_PIXELS */ + 1770, /* GL_UNPACK_ALIGNMENT */ 1099, /* GL_PACK_SWAP_BYTES */ 1094, /* GL_PACK_LSB_FIRST */ 1095, /* GL_PACK_ROW_LENGTH */ @@ -4026,8 +4024,8 @@ static const unsigned reduced_enums[1347] = 641, /* GL_INDEX_OFFSET */ 1313, /* GL_RED_SCALE */ 1311, /* GL_RED_BIAS */ - 1879, /* GL_ZOOM_X */ - 1880, /* GL_ZOOM_Y */ + 1878, /* GL_ZOOM_X */ + 1879, /* GL_ZOOM_Y */ 603, /* GL_GREEN_SCALE */ 601, /* GL_GREEN_BIAS */ 93, /* GL_BLUE_SCALE */ @@ -4112,11 +4110,11 @@ static const unsigned reduced_enums[1347] = 244, /* GL_COMPILE */ 245, /* GL_COMPILE_AND_EXECUTE */ 120, /* GL_BYTE */ - 1780, /* GL_UNSIGNED_BYTE */ + 1779, /* GL_UNSIGNED_BYTE */ 1437, /* GL_SHORT */ - 1792, /* GL_UNSIGNED_SHORT */ + 1791, /* GL_UNSIGNED_SHORT */ 645, /* GL_INT */ - 1783, /* GL_UNSIGNED_INT */ + 1782, /* GL_UNSIGNED_INT */ 489, /* GL_FLOAT */ 1, /* GL_2_BYTES */ 5, /* GL_3_BYTES */ @@ -4128,7 +4126,7 @@ static const unsigned reduced_enums[1347] = 299, /* GL_COPY */ 51, /* GL_AND_INVERTED */ 1023, /* GL_NOOP */ - 1875, /* GL_XOR */ + 1874, /* GL_XOR */ 1086, /* GL_OR */ 1024, /* GL_NOR */ 470, /* GL_EQUIV */ @@ -4172,9 +4170,9 @@ static const unsigned reduced_enums[1347] = 1339, /* GL_REPLACE */ 627, /* GL_INCR */ 342, /* GL_DECR */ - 1807, /* GL_VENDOR */ + 1806, /* GL_VENDOR */ 1336, /* GL_RENDERER */ - 1808, /* GL_VERSION */ + 1807, /* GL_VERSION */ 474, /* GL_EXTENSIONS */ 1387, /* GL_S */ 1553, /* GL_T */ @@ -4207,8 +4205,8 @@ static const unsigned reduced_enums[1347] = 1178, /* GL_POLYGON_OFFSET_POINT */ 1177, /* GL_POLYGON_OFFSET_LINE */ 1297, /* GL_R3_G3_B2 */ - 1804, /* GL_V2F */ - 1805, /* GL_V3F */ + 1803, /* GL_V2F */ + 1804, /* GL_V3F */ 123, /* GL_C4UB_V2F */ 124, /* GL_C4UB_V3F */ 121, /* GL_C3F_V3F */ @@ -4281,11 +4279,11 @@ static const unsigned reduced_enums[1347] = 951, /* GL_MINMAX_FORMAT */ 953, /* GL_MINMAX_SINK */ 1561, /* GL_TABLE_TOO_LARGE_EXT */ - 1782, /* GL_UNSIGNED_BYTE_3_3_2 */ - 1794, /* GL_UNSIGNED_SHORT_4_4_4_4 */ - 1796, /* GL_UNSIGNED_SHORT_5_5_5_1 */ - 1789, /* GL_UNSIGNED_INT_8_8_8_8 */ - 1784, /* GL_UNSIGNED_INT_10_10_10_2 */ + 1781, /* GL_UNSIGNED_BYTE_3_3_2 */ + 1793, /* GL_UNSIGNED_SHORT_4_4_4_4 */ + 1795, /* GL_UNSIGNED_SHORT_5_5_5_1 */ + 1788, /* GL_UNSIGNED_INT_8_8_8_8 */ + 1783, /* GL_UNSIGNED_INT_10_10_10_2 */ 1176, /* GL_POLYGON_OFFSET_FILL */ 1175, /* GL_POLYGON_OFFSET_FACTOR */ 1174, /* GL_POLYGON_OFFSET_BIAS */ @@ -4340,22 +4338,22 @@ static const unsigned reduced_enums[1347] = 1639, /* GL_TEXTURE_BINDING_3D */ 1096, /* GL_PACK_SKIP_IMAGES */ 1092, /* GL_PACK_IMAGE_HEIGHT */ - 1775, /* GL_UNPACK_SKIP_IMAGES */ - 1772, /* GL_UNPACK_IMAGE_HEIGHT */ + 1774, /* GL_UNPACK_SKIP_IMAGES */ + 1771, /* GL_UNPACK_IMAGE_HEIGHT */ 1631, /* GL_TEXTURE_3D */ 1277, /* GL_PROXY_TEXTURE_3D */ 1694, /* GL_TEXTURE_DEPTH */ 1747, /* GL_TEXTURE_WRAP_R */ 856, /* GL_MAX_3D_TEXTURE_SIZE */ - 1809, /* GL_VERTEX_ARRAY */ + 1808, /* GL_VERTEX_ARRAY */ 1026, /* GL_NORMAL_ARRAY */ 148, /* GL_COLOR_ARRAY */ 631, /* GL_INDEX_ARRAY */ 1672, /* GL_TEXTURE_COORD_ARRAY */ 459, /* GL_EDGE_FLAG_ARRAY */ - 1815, /* GL_VERTEX_ARRAY_SIZE */ - 1817, /* GL_VERTEX_ARRAY_TYPE */ - 1816, /* GL_VERTEX_ARRAY_STRIDE */ + 1814, /* GL_VERTEX_ARRAY_SIZE */ + 1816, /* GL_VERTEX_ARRAY_TYPE */ + 1815, /* GL_VERTEX_ARRAY_STRIDE */ 1031, /* GL_NORMAL_ARRAY_TYPE */ 1030, /* GL_NORMAL_ARRAY_STRIDE */ 152, /* GL_COLOR_ARRAY_SIZE */ @@ -4367,7 +4365,7 @@ static const unsigned reduced_enums[1347] = 1678, /* GL_TEXTURE_COORD_ARRAY_TYPE */ 1677, /* GL_TEXTURE_COORD_ARRAY_STRIDE */ 463, /* GL_EDGE_FLAG_ARRAY_STRIDE */ - 1814, /* GL_VERTEX_ARRAY_POINTER */ + 1813, /* GL_VERTEX_ARRAY_POINTER */ 1029, /* GL_NORMAL_ARRAY_POINTER */ 151, /* GL_COLOR_ARRAY_POINTER */ 634, /* GL_INDEX_ARRAY_POINTER */ @@ -4467,7 +4465,7 @@ static const unsigned reduced_enums[1347] = 306, /* GL_CULL_VERTEX_EXT */ 308, /* GL_CULL_VERTEX_OBJECT_POSITION_EXT */ 307, /* GL_CULL_VERTEX_EYE_POSITION_EXT */ - 1872, /* GL_WRAP_BORDER_SUN */ + 1871, /* GL_WRAP_BORDER_SUN */ 1656, /* GL_TEXTURE_COLOR_WRITEMASK_SGIS */ 690, /* GL_LIGHT_MODEL_COLOR_CONTROL */ 1440, /* GL_SINGLE_COLOR */ @@ -4485,13 +4483,13 @@ static const unsigned reduced_enums[1347] = 580, /* GL_FRAMEBUFFER_UNDEFINED */ 373, /* GL_DEPTH_STENCIL_ATTACHMENT */ 630, /* GL_INDEX */ - 1781, /* GL_UNSIGNED_BYTE_2_3_3_REV */ - 1797, /* GL_UNSIGNED_SHORT_5_6_5 */ - 1798, /* GL_UNSIGNED_SHORT_5_6_5_REV */ - 1795, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */ - 1793, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */ - 1790, /* GL_UNSIGNED_INT_8_8_8_8_REV */ - 1788, /* GL_UNSIGNED_INT_2_10_10_10_REV */ + 1780, /* GL_UNSIGNED_BYTE_2_3_3_REV */ + 1796, /* GL_UNSIGNED_SHORT_5_6_5 */ + 1797, /* GL_UNSIGNED_SHORT_5_6_5_REV */ + 1794, /* GL_UNSIGNED_SHORT_4_4_4_4_REV */ + 1792, /* GL_UNSIGNED_SHORT_1_5_5_5_REV */ + 1789, /* GL_UNSIGNED_INT_8_8_8_8_REV */ + 1787, /* GL_UNSIGNED_INT_2_10_10_10_REV */ 1726, /* GL_TEXTURE_MAX_CLAMP_S_SGIX */ 1727, /* GL_TEXTURE_MAX_CLAMP_T_SGIX */ 1725, /* GL_TEXTURE_MAX_CLAMP_R_SGIX */ @@ -4562,10 +4560,10 @@ static const unsigned reduced_enums[1347] = 18, /* GL_ACTIVE_TEXTURE */ 133, /* GL_CLIENT_ACTIVE_TEXTURE */ 934, /* GL_MAX_TEXTURE_UNITS */ - 1759, /* GL_TRANSPOSE_MODELVIEW_MATRIX */ - 1762, /* GL_TRANSPOSE_PROJECTION_MATRIX */ - 1764, /* GL_TRANSPOSE_TEXTURE_MATRIX */ - 1756, /* GL_TRANSPOSE_COLOR_MATRIX */ + 1758, /* GL_TRANSPOSE_MODELVIEW_MATRIX */ + 1761, /* GL_TRANSPOSE_PROJECTION_MATRIX */ + 1763, /* GL_TRANSPOSE_TEXTURE_MATRIX */ + 1755, /* GL_TRANSPOSE_COLOR_MATRIX */ 1545, /* GL_SUBTRACT */ 919, /* GL_MAX_RENDERBUFFER_SIZE */ 247, /* GL_COMPRESSED_ALPHA */ @@ -4580,7 +4578,7 @@ static const unsigned reduced_enums[1347] = 1281, /* GL_PROXY_TEXTURE_RECTANGLE_ARB */ 917, /* GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB */ 372, /* GL_DEPTH_STENCIL */ - 1785, /* GL_UNSIGNED_INT_24_8 */ + 1784, /* GL_UNSIGNED_INT_24_8 */ 930, /* GL_MAX_TEXTURE_LOD_BIAS */ 1724, /* GL_TEXTURE_MAX_ANISOTROPY_EXT */ 931, /* GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT */ @@ -4633,32 +4631,32 @@ static const unsigned reduced_enums[1347] = 1072, /* GL_OPERAND1_ALPHA */ 1078, /* GL_OPERAND2_ALPHA */ 1084, /* GL_OPERAND3_ALPHA_NV */ - 1810, /* GL_VERTEX_ARRAY_BINDING */ + 1809, /* GL_VERTEX_ARRAY_BINDING */ 1733, /* GL_TEXTURE_RANGE_LENGTH_APPLE */ 1734, /* GL_TEXTURE_RANGE_POINTER_APPLE */ - 1876, /* GL_YCBCR_422_APPLE */ - 1799, /* GL_UNSIGNED_SHORT_8_8_APPLE */ - 1801, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */ + 1875, /* GL_YCBCR_422_APPLE */ + 1798, /* GL_UNSIGNED_SHORT_8_8_APPLE */ + 1800, /* GL_UNSIGNED_SHORT_8_8_REV_APPLE */ 1743, /* GL_TEXTURE_STORAGE_HINT_APPLE */ 1536, /* GL_STORAGE_PRIVATE_APPLE */ 1535, /* GL_STORAGE_CACHED_APPLE */ 1537, /* GL_STORAGE_SHARED_APPLE */ 1442, /* GL_SLICE_ACCUM_SUN */ 1288, /* GL_QUAD_MESH_SUN */ - 1768, /* GL_TRIANGLE_MESH_SUN */ - 1849, /* GL_VERTEX_PROGRAM_ARB */ - 1860, /* GL_VERTEX_STATE_PROGRAM_NV */ - 1836, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */ - 1842, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */ - 1844, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */ - 1846, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */ + 1767, /* GL_TRIANGLE_MESH_SUN */ + 1848, /* GL_VERTEX_PROGRAM_ARB */ + 1859, /* GL_VERTEX_STATE_PROGRAM_NV */ + 1835, /* GL_VERTEX_ATTRIB_ARRAY_ENABLED */ + 1841, /* GL_VERTEX_ATTRIB_ARRAY_SIZE */ + 1843, /* GL_VERTEX_ATTRIB_ARRAY_STRIDE */ + 1845, /* GL_VERTEX_ATTRIB_ARRAY_TYPE */ 334, /* GL_CURRENT_VERTEX_ATTRIB */ 1240, /* GL_PROGRAM_LENGTH_ARB */ 1254, /* GL_PROGRAM_STRING_ARB */ 998, /* GL_MODELVIEW_PROJECTION_NV */ 623, /* GL_IDENTITY_NV */ 670, /* GL_INVERSE_NV */ - 1761, /* GL_TRANSPOSE_NV */ + 1760, /* GL_TRANSPOSE_NV */ 671, /* GL_INVERSE_TRANSPOSE_NV */ 903, /* GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB */ 902, /* GL_MAX_PROGRAM_MATRICES_ARB */ @@ -4672,33 +4670,33 @@ static const unsigned reduced_enums[1347] = 845, /* GL_MATRIX7_NV */ 318, /* GL_CURRENT_MATRIX_STACK_DEPTH_ARB */ 315, /* GL_CURRENT_MATRIX_ARB */ - 1852, /* GL_VERTEX_PROGRAM_POINT_SIZE */ - 1855, /* GL_VERTEX_PROGRAM_TWO_SIDE */ + 1851, /* GL_VERTEX_PROGRAM_POINT_SIZE */ + 1854, /* GL_VERTEX_PROGRAM_TWO_SIDE */ 1252, /* GL_PROGRAM_PARAMETER_NV */ - 1840, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */ + 1839, /* GL_VERTEX_ATTRIB_ARRAY_POINTER */ 1256, /* GL_PROGRAM_TARGET_NV */ 1253, /* GL_PROGRAM_RESIDENT_NV */ - 1753, /* GL_TRACK_MATRIX_NV */ - 1754, /* GL_TRACK_MATRIX_TRANSFORM_NV */ - 1850, /* GL_VERTEX_PROGRAM_BINDING_NV */ + 1752, /* GL_TRACK_MATRIX_NV */ + 1753, /* GL_TRACK_MATRIX_TRANSFORM_NV */ + 1849, /* GL_VERTEX_PROGRAM_BINDING_NV */ 1234, /* GL_PROGRAM_ERROR_POSITION_ARB */ 356, /* GL_DEPTH_CLAMP */ - 1818, /* GL_VERTEX_ATTRIB_ARRAY0_NV */ - 1825, /* GL_VERTEX_ATTRIB_ARRAY1_NV */ - 1826, /* GL_VERTEX_ATTRIB_ARRAY2_NV */ - 1827, /* GL_VERTEX_ATTRIB_ARRAY3_NV */ - 1828, /* GL_VERTEX_ATTRIB_ARRAY4_NV */ - 1829, /* GL_VERTEX_ATTRIB_ARRAY5_NV */ - 1830, /* GL_VERTEX_ATTRIB_ARRAY6_NV */ - 1831, /* GL_VERTEX_ATTRIB_ARRAY7_NV */ - 1832, /* GL_VERTEX_ATTRIB_ARRAY8_NV */ - 1833, /* GL_VERTEX_ATTRIB_ARRAY9_NV */ - 1819, /* GL_VERTEX_ATTRIB_ARRAY10_NV */ - 1820, /* GL_VERTEX_ATTRIB_ARRAY11_NV */ - 1821, /* GL_VERTEX_ATTRIB_ARRAY12_NV */ - 1822, /* GL_VERTEX_ATTRIB_ARRAY13_NV */ - 1823, /* GL_VERTEX_ATTRIB_ARRAY14_NV */ - 1824, /* GL_VERTEX_ATTRIB_ARRAY15_NV */ + 1817, /* GL_VERTEX_ATTRIB_ARRAY0_NV */ + 1824, /* GL_VERTEX_ATTRIB_ARRAY1_NV */ + 1825, /* GL_VERTEX_ATTRIB_ARRAY2_NV */ + 1826, /* GL_VERTEX_ATTRIB_ARRAY3_NV */ + 1827, /* GL_VERTEX_ATTRIB_ARRAY4_NV */ + 1828, /* GL_VERTEX_ATTRIB_ARRAY5_NV */ + 1829, /* GL_VERTEX_ATTRIB_ARRAY6_NV */ + 1830, /* GL_VERTEX_ATTRIB_ARRAY7_NV */ + 1831, /* GL_VERTEX_ATTRIB_ARRAY8_NV */ + 1832, /* GL_VERTEX_ATTRIB_ARRAY9_NV */ + 1818, /* GL_VERTEX_ATTRIB_ARRAY10_NV */ + 1819, /* GL_VERTEX_ATTRIB_ARRAY11_NV */ + 1820, /* GL_VERTEX_ATTRIB_ARRAY12_NV */ + 1821, /* GL_VERTEX_ATTRIB_ARRAY13_NV */ + 1822, /* GL_VERTEX_ATTRIB_ARRAY14_NV */ + 1823, /* GL_VERTEX_ATTRIB_ARRAY15_NV */ 757, /* GL_MAP1_VERTEX_ATTRIB0_4_NV */ 764, /* GL_MAP1_VERTEX_ATTRIB1_4_NV */ 765, /* GL_MAP1_VERTEX_ATTRIB2_4_NV */ @@ -4737,14 +4735,14 @@ static const unsigned reduced_enums[1347] = 269, /* GL_COMPRESSED_TEXTURE_FORMATS */ 946, /* GL_MAX_VERTEX_UNITS_ARB */ 22, /* GL_ACTIVE_VERTEX_UNITS_ARB */ - 1871, /* GL_WEIGHT_SUM_UNITY_ARB */ - 1848, /* GL_VERTEX_BLEND_ARB */ + 1870, /* GL_WEIGHT_SUM_UNITY_ARB */ + 1847, /* GL_VERTEX_BLEND_ARB */ 336, /* GL_CURRENT_WEIGHT_ARB */ - 1870, /* GL_WEIGHT_ARRAY_TYPE_ARB */ - 1869, /* GL_WEIGHT_ARRAY_STRIDE_ARB */ - 1868, /* GL_WEIGHT_ARRAY_SIZE_ARB */ - 1867, /* GL_WEIGHT_ARRAY_POINTER_ARB */ - 1864, /* GL_WEIGHT_ARRAY_ARB */ + 1869, /* GL_WEIGHT_ARRAY_TYPE_ARB */ + 1868, /* GL_WEIGHT_ARRAY_STRIDE_ARB */ + 1867, /* GL_WEIGHT_ARRAY_SIZE_ARB */ + 1866, /* GL_WEIGHT_ARRAY_POINTER_ARB */ + 1863, /* GL_WEIGHT_ARRAY_ARB */ 386, /* GL_DOT3_RGB */ 387, /* GL_DOT3_RGBA */ 263, /* GL_COMPRESSED_RGB_FXT1_3DFX */ @@ -4789,7 +4787,7 @@ static const unsigned reduced_enums[1347] = 1001, /* GL_MODULATE_ADD_ATI */ 1002, /* GL_MODULATE_SIGNED_ADD_ATI */ 1003, /* GL_MODULATE_SUBTRACT_ATI */ - 1877, /* GL_YCBCR_MESA */ + 1876, /* GL_YCBCR_MESA */ 1093, /* GL_PACK_INVERT_MESA */ 339, /* GL_DEBUG_OBJECT_MESA */ 340, /* GL_DEBUG_PRINT_MESA */ @@ -4862,7 +4860,7 @@ static const unsigned reduced_enums[1347] = 1292, /* GL_QUERY_RESULT */ 1294, /* GL_QUERY_RESULT_AVAILABLE */ 940, /* GL_MAX_VERTEX_ATTRIBS */ - 1838, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */ + 1837, /* GL_VERTEX_ATTRIB_ARRAY_NORMALIZED */ 377, /* GL_DEPTH_STENCIL_TO_RGBA_NV */ 376, /* GL_DEPTH_STENCIL_TO_BGRA_NV */ 926, /* GL_MAX_TEXTURE_COORDS */ @@ -4877,7 +4875,7 @@ static const unsigned reduced_enums[1347] = 464, /* GL_ELEMENT_ARRAY_BUFFER */ 54, /* GL_ARRAY_BUFFER_BINDING */ 465, /* GL_ELEMENT_ARRAY_BUFFER_BINDING */ - 1812, /* GL_VERTEX_ARRAY_BUFFER_BINDING */ + 1811, /* GL_VERTEX_ARRAY_BUFFER_BINDING */ 1027, /* GL_NORMAL_ARRAY_BUFFER_BINDING */ 149, /* GL_COLOR_ARRAY_BUFFER_BINDING */ 632, /* GL_INDEX_ARRAY_BUFFER_BINDING */ @@ -4885,8 +4883,8 @@ static const unsigned reduced_enums[1347] = 460, /* GL_EDGE_FLAG_ARRAY_BUFFER_BINDING */ 1416, /* GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING */ 514, /* GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING */ - 1865, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */ - 1834, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */ + 1864, /* GL_WEIGHT_ARRAY_BUFFER_BINDING */ + 1833, /* GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING */ 1239, /* GL_PROGRAM_INSTRUCTIONS_ARB */ 898, /* GL_MAX_PROGRAM_INSTRUCTIONS_ARB */ 1245, /* GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB */ @@ -4910,14 +4908,14 @@ static const unsigned reduced_enums[1347] = 899, /* GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB */ 895, /* GL_MAX_PROGRAM_ENV_PARAMETERS_ARB */ 1260, /* GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB */ - 1758, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */ + 1757, /* GL_TRANSPOSE_CURRENT_MATRIX_ARB */ 1304, /* GL_READ_ONLY */ - 1873, /* GL_WRITE_ONLY */ + 1872, /* GL_WRITE_ONLY */ 1306, /* GL_READ_WRITE */ 102, /* GL_BUFFER_ACCESS */ 105, /* GL_BUFFER_MAPPED */ 107, /* GL_BUFFER_MAP_POINTER */ - 1752, /* GL_TIME_ELAPSED_EXT */ + 1751, /* GL_TIME_ELAPSED_EXT */ 808, /* GL_MATRIX0_ARB */ 820, /* GL_MATRIX1_ARB */ 832, /* GL_MATRIX2_ARB */ @@ -4978,7 +4976,7 @@ static const unsigned reduced_enums[1347] = 109, /* GL_BUFFER_SERIALIZED_MODIFY_APPLE */ 104, /* GL_BUFFER_FLUSHING_UNMAP_APPLE */ 537, /* GL_FRAGMENT_SHADER */ - 1858, /* GL_VERTEX_SHADER */ + 1857, /* GL_VERTEX_SHADER */ 1250, /* GL_PROGRAM_OBJECT_ARB */ 1429, /* GL_SHADER_OBJECT_ARB */ 882, /* GL_MAX_FRAGMENT_UNIFORM_COMPONENTS */ @@ -5016,7 +5014,7 @@ static const unsigned reduced_enums[1347] = 345, /* GL_DELETE_STATUS */ 246, /* GL_COMPILE_STATUS */ 715, /* GL_LINK_STATUS */ - 1806, /* GL_VALIDATE_STATUS */ + 1805, /* GL_VALIDATE_STATUS */ 644, /* GL_INFO_LOG_LENGTH */ 56, /* GL_ATTACHED_SHADERS */ 20, /* GL_ACTIVE_UNIFORMS */ @@ -5039,7 +5037,7 @@ static const unsigned reduced_enums[1347] = 1106, /* GL_PALETTE8_RGB5_A1_OES */ 626, /* GL_IMPLEMENTATION_COLOR_READ_TYPE_OES */ 625, /* GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES */ - 1791, /* GL_UNSIGNED_NORMALIZED */ + 1790, /* GL_UNSIGNED_NORMALIZED */ 1628, /* GL_TEXTURE_1D_ARRAY_EXT */ 1272, /* GL_PROXY_TEXTURE_1D_ARRAY_EXT */ 1630, /* GL_TEXTURE_2D_ARRAY_EXT */ @@ -5060,7 +5058,7 @@ static const unsigned reduced_enums[1347] = 266, /* GL_COMPRESSED_SLUMINANCE_ALPHA */ 1167, /* GL_POINT_SPRITE_COORD_ORIGIN */ 723, /* GL_LOWER_LEFT */ - 1803, /* GL_UPPER_LEFT */ + 1802, /* GL_UPPER_LEFT */ 1509, /* GL_STENCIL_BACK_REF */ 1510, /* GL_STENCIL_BACK_VALUE_MASK */ 1511, /* GL_STENCIL_BACK_WRITEMASK */ @@ -5138,12 +5136,12 @@ static const unsigned reduced_enums[1347] = 1549, /* GL_SYNC_FLAGS */ 1548, /* GL_SYNC_FENCE */ 1551, /* GL_SYNC_GPU_COMMANDS_COMPLETE */ - 1779, /* GL_UNSIGNALED */ + 1778, /* GL_UNSIGNALED */ 1438, /* GL_SIGNALED */ 46, /* GL_ALREADY_SIGNALED */ 1750, /* GL_TIMEOUT_EXPIRED */ 270, /* GL_CONDITION_SATISFIED */ - 1863, /* GL_WAIT_FAILED */ + 1862, /* GL_WAIT_FAILED */ 471, /* GL_EVAL_BIT */ 1298, /* GL_RASTER_POSITION_UNCLIPPED_IBM */ 717, /* GL_LIST_BIT */ @@ -5152,7 +5150,6 @@ static const unsigned reduced_enums[1347] = 29, /* GL_ALL_ATTRIB_BITS */ 1008, /* GL_MULTISAMPLE_BIT */ 30, /* GL_ALL_CLIENT_ATTRIB_BITS */ - 1751, /* GL_TIMEOUT_IGNORED */ }; typedef int (*cfunc)(const void *, const void *); -- cgit v1.2.3 From 6130bb13913090f7477d3dab5662c7e80c7b9293 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Mon, 4 Jan 2010 12:06:04 -0800 Subject: mesa: Prevent possible array out-of-bounds access by _mesa_light. --- src/mesa/main/attrib.c | 47 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 15 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c index 246c5521b7..a14f71c330 100644 --- a/src/mesa/main/attrib.c +++ b/src/mesa/main/attrib.c @@ -1043,22 +1043,39 @@ _mesa_PopAttrib(void) _math_matrix_analyse( ctx->ModelviewMatrixStack.Top ); for (i = 0; i < ctx->Const.MaxLights; i++) { - const struct gl_light *l = &light->Light[i]; + const struct gl_light *l = &light->Light[i]; _mesa_set_enable(ctx, GL_LIGHT0 + i, l->Enabled); - _mesa_light(ctx, i, GL_AMBIENT, l->Ambient); - _mesa_light(ctx, i, GL_DIFFUSE, l->Diffuse); - _mesa_light(ctx, i, GL_SPECULAR, l->Specular ); - _mesa_light(ctx, i, GL_POSITION, l->EyePosition); - _mesa_light(ctx, i, GL_SPOT_DIRECTION, l->SpotDirection); - _mesa_light(ctx, i, GL_SPOT_EXPONENT, &l->SpotExponent); - _mesa_light(ctx, i, GL_SPOT_CUTOFF, &l->SpotCutoff); - _mesa_light(ctx, i, GL_CONSTANT_ATTENUATION, - &l->ConstantAttenuation); - _mesa_light(ctx, i, GL_LINEAR_ATTENUATION, - &l->LinearAttenuation); - _mesa_light(ctx, i, GL_QUADRATIC_ATTENUATION, - &l->QuadraticAttenuation); - } + _mesa_light(ctx, i, GL_AMBIENT, l->Ambient); + _mesa_light(ctx, i, GL_DIFFUSE, l->Diffuse); + _mesa_light(ctx, i, GL_SPECULAR, l->Specular ); + _mesa_light(ctx, i, GL_POSITION, l->EyePosition); + _mesa_light(ctx, i, GL_SPOT_DIRECTION, l->SpotDirection); + { + GLfloat p[4] = { 0 }; + p[0] = l->SpotExponent; + _mesa_light(ctx, i, GL_SPOT_EXPONENT, p); + } + { + GLfloat p[4] = { 0 }; + p[0] = l->SpotCutoff; + _mesa_light(ctx, i, GL_SPOT_CUTOFF, p); + } + { + GLfloat p[4] = { 0 }; + p[0] = l->ConstantAttenuation; + _mesa_light(ctx, i, GL_CONSTANT_ATTENUATION, p); + } + { + GLfloat p[4] = { 0 }; + p[0] = l->LinearAttenuation; + _mesa_light(ctx, i, GL_LINEAR_ATTENUATION, p); + } + { + GLfloat p[4] = { 0 }; + p[0] = l->QuadraticAttenuation; + _mesa_light(ctx, i, GL_QUADRATIC_ATTENUATION, p); + } + } /* light model */ _mesa_LightModelfv(GL_LIGHT_MODEL_AMBIENT, light->Model.Ambient); -- cgit v1.2.3 From 82421c549f782cee0d377a064852813117ff6850 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 4 Jan 2010 13:59:43 -0700 Subject: mesa: added GL_DU8DV8_ATI in extract_float_rgba() Fixes warning seen with Shadowgrounds. See bug 24016. --- src/mesa/main/image.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c index 139e56a96b..3b685cb947 100644 --- a/src/mesa/main/image.c +++ b/src/mesa/main/image.c @@ -3228,6 +3228,7 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4], srcFormat == GL_RGBA || srcFormat == GL_BGRA || srcFormat == GL_ABGR_EXT || + srcFormat == GL_DU8DV8_ATI || srcFormat == GL_DUDV_ATI); ASSERT(srcType == GL_UNSIGNED_BYTE || @@ -3343,6 +3344,7 @@ extract_float_rgba(GLuint n, GLfloat rgba[][4], aComp = 0; stride = 4; break; + case GL_DU8DV8_ATI: case GL_DUDV_ATI: redIndex = 0; greenIndex = 1; -- cgit v1.2.3 From a160d1c27de8afcf072b4fd438d6a37f16742e75 Mon Sep 17 00:00:00 2001 From: Andre Maasikas Date: Tue, 29 Dec 2009 14:47:01 +0200 Subject: r600: support vertex_array_bgra Use vertex program key mechanism and swizzle during vertex fetch - is there a better way? --- src/mesa/drivers/dri/r600/r600_context.h | 1 + src/mesa/drivers/dri/r600/r700_assembler.c | 20 ++++++++++++++++---- src/mesa/drivers/dri/r600/r700_assembler.h | 1 + src/mesa/drivers/dri/r600/r700_vertprog.c | 8 ++++++-- src/mesa/drivers/dri/r600/r700_vertprog.h | 1 + 5 files changed, 25 insertions(+), 6 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/r600/r600_context.h b/src/mesa/drivers/dri/r600/r600_context.h index 394fd757d4..94662ab547 100644 --- a/src/mesa/drivers/dri/r600/r600_context.h +++ b/src/mesa/drivers/dri/r600/r600_context.h @@ -108,6 +108,7 @@ typedef struct StreamDesc GLint size; //number of data element GLenum type; //data element type GLsizei stride; + GLenum format; // GL_RGBA,GLBGRA struct radeon_bo *bo; GLint bo_offset; diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c index 67e0ee7746..b0b38927e6 100644 --- a/src/mesa/drivers/dri/r600/r700_assembler.c +++ b/src/mesa/drivers/dri/r600/r700_assembler.c @@ -798,6 +798,7 @@ GLboolean assemble_vfetch_instruction2(r700_AssemblerBase* pAsm, GLubyte element, GLuint _signed, GLboolean normalize, + GLenum format, VTX_FETCH_METHOD * pFetchMethod) { GLuint client_size_inbyte; @@ -846,10 +847,21 @@ GLboolean assemble_vfetch_instruction2(r700_AssemblerBase* pAsm, vfetch_instruction_ptr->m_Word0.f.src_sel_x = SQ_SEL_X; vfetch_instruction_ptr->m_Word0.f.mega_fetch_count = mega_fetch_count; - vfetch_instruction_ptr->m_Word1.f.dst_sel_x = (size < 1) ? SQ_SEL_0 : SQ_SEL_X; - vfetch_instruction_ptr->m_Word1.f.dst_sel_y = (size < 2) ? SQ_SEL_0 : SQ_SEL_Y; - vfetch_instruction_ptr->m_Word1.f.dst_sel_z = (size < 3) ? SQ_SEL_0 : SQ_SEL_Z; - vfetch_instruction_ptr->m_Word1.f.dst_sel_w = (size < 4) ? SQ_SEL_1 : SQ_SEL_W; + if(format == GL_BGRA) + { + vfetch_instruction_ptr->m_Word1.f.dst_sel_x = (size < 1) ? SQ_SEL_0 : SQ_SEL_Z; + vfetch_instruction_ptr->m_Word1.f.dst_sel_y = (size < 2) ? SQ_SEL_0 : SQ_SEL_Y; + vfetch_instruction_ptr->m_Word1.f.dst_sel_z = (size < 3) ? SQ_SEL_0 : SQ_SEL_X; + vfetch_instruction_ptr->m_Word1.f.dst_sel_w = (size < 4) ? SQ_SEL_1 : SQ_SEL_W; + } + else + { + vfetch_instruction_ptr->m_Word1.f.dst_sel_x = (size < 1) ? SQ_SEL_0 : SQ_SEL_X; + vfetch_instruction_ptr->m_Word1.f.dst_sel_y = (size < 2) ? SQ_SEL_0 : SQ_SEL_Y; + vfetch_instruction_ptr->m_Word1.f.dst_sel_z = (size < 3) ? SQ_SEL_0 : SQ_SEL_Z; + vfetch_instruction_ptr->m_Word1.f.dst_sel_w = (size < 4) ? SQ_SEL_1 : SQ_SEL_W; + + } vfetch_instruction_ptr->m_Word1.f.use_const_fields = 1; vfetch_instruction_ptr->m_Word1.f.data_format = data_format; diff --git a/src/mesa/drivers/dri/r600/r700_assembler.h b/src/mesa/drivers/dri/r600/r700_assembler.h index c66db502a1..ee12582661 100644 --- a/src/mesa/drivers/dri/r600/r700_assembler.h +++ b/src/mesa/drivers/dri/r600/r700_assembler.h @@ -422,6 +422,7 @@ GLboolean assemble_vfetch_instruction2(r700_AssemblerBase* pAsm, GLubyte element, GLuint _signed, GLboolean normalize, + GLenum format, VTX_FETCH_METHOD * pFetchMethod); GLboolean cleanup_vfetch_instructions(r700_AssemblerBase* pAsm); GLuint gethelpr(r700_AssemblerBase* pAsm); diff --git a/src/mesa/drivers/dri/r600/r700_vertprog.c b/src/mesa/drivers/dri/r600/r700_vertprog.c index ffc6068bd8..4ca5ce693a 100644 --- a/src/mesa/drivers/dri/r600/r700_vertprog.c +++ b/src/mesa/drivers/dri/r600/r700_vertprog.c @@ -179,7 +179,8 @@ GLboolean Process_Vertex_Program_Vfetch_Instructions2( context->stream_desc[i].size, context->stream_desc[i].element, context->stream_desc[i]._signed, - context->stream_desc[i].normalize, + context->stream_desc[i].normalize, + context->stream_desc[i].format, &vtxFetchMethod); } @@ -308,6 +309,7 @@ struct r700_vertex_program* r700TranslateVertexShader(GLcontext *ctx, vp->aos_desc[i].size = context->stream_desc[i].size; vp->aos_desc[i].stride = context->stream_desc[i].stride; vp->aos_desc[i].type = context->stream_desc[i].type; + vp->aos_desc[i].format = context->stream_desc[i].format; } if (context->radeon.radeonScreen->chip_family < CHIP_FAMILY_RV770) @@ -368,7 +370,8 @@ void r700SelectVertexShader(GLcontext *ctx) match = GL_TRUE; for(i=0; inNumActiveAos; i++) { - if (vp->aos_desc[i].size != context->stream_desc[i].size) + if (vp->aos_desc[i].size != context->stream_desc[i].size || + vp->aos_desc[i].format != context->stream_desc[i].format) { match = GL_FALSE; break; @@ -471,6 +474,7 @@ static void r700TranslateAttrib(GLcontext *ctx, GLuint unLoc, int count, const s pStreamDesc->size = input->Size; pStreamDesc->dst_loc = context->nNumActiveAos; pStreamDesc->element = unLoc; + pStreamDesc->format = input->Format; switch (pStreamDesc->type) { //GetSurfaceFormat diff --git a/src/mesa/drivers/dri/r600/r700_vertprog.h b/src/mesa/drivers/dri/r600/r700_vertprog.h index 00824c29d3..645c9ac84a 100644 --- a/src/mesa/drivers/dri/r600/r700_vertprog.h +++ b/src/mesa/drivers/dri/r600/r700_vertprog.h @@ -39,6 +39,7 @@ typedef struct ArrayDesc //TEMP GLint size; //number of data element GLenum type; //data element type GLsizei stride; + GLenum format; //GL_RGBA or GL_BGRA } ArrayDesc; struct r700_vertex_program -- cgit v1.2.3 From 63610fae4f46361f2500577a83bf5ac6f9e8b0ac Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 4 Jan 2010 08:47:01 -0800 Subject: i965: Fix the surface offset calculation for tiled buffers. If we ever had a non-tile-aligned tiled renderbuffer, the math was all off. Use the existing x,y coordinates instead of trying to reconstruct them from an incorrectly-calculated offset value. --- src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 50 ++++++++++++++---------- 1 file changed, 30 insertions(+), 20 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c index 8335e5a650..afb36b7bd7 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c +++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c @@ -522,7 +522,8 @@ brw_update_renderbuffer_surface(struct brw_context *brw, GLubyte color_mask[4]; GLboolean color_blend; uint32_t tiling; - uint32_t draw_offset; + uint32_t draw_x; + uint32_t draw_y; } key; memset(&key, 0, sizeof(key)); @@ -564,7 +565,8 @@ brw_update_renderbuffer_surface(struct brw_context *brw, } key.pitch = region->pitch; key.cpp = region->cpp; - key.draw_offset = region->draw_offset; /* cur 3d or cube face offset */ + key.draw_x = region->draw_x; + key.draw_y = region->draw_y; } else { key.surface_type = BRW_SURFACE_NULL; key.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM; @@ -572,7 +574,8 @@ brw_update_renderbuffer_surface(struct brw_context *brw, key.width = 1; key.height = 1; key.cpp = 4; - key.draw_offset = 0; + key.draw_x = 0; + key.draw_y = 0; } /* _NEW_COLOR */ memcpy(key.color_mask, ctx->Color.ColorMask, @@ -602,25 +605,32 @@ brw_update_renderbuffer_surface(struct brw_context *brw, surf.ss0.surface_format = key.surface_format; surf.ss0.surface_type = key.surface_type; if (key.tiling == I915_TILING_NONE) { - surf.ss1.base_addr = key.draw_offset; + surf.ss1.base_addr = (key.draw_x + key.draw_y * key.pitch) * key.cpp; } else { - uint32_t tile_offset = key.draw_offset % 4096; - - surf.ss1.base_addr = key.draw_offset - tile_offset; - - assert(BRW_IS_G4X(brw) || tile_offset == 0); - if (BRW_IS_G4X(brw)) { - if (key.tiling == I915_TILING_X) { - /* Note that the low bits of these fields are missing, so - * there's the possibility of getting in trouble. - */ - surf.ss5.x_offset = (tile_offset % 512) / key.cpp / 4; - surf.ss5.y_offset = tile_offset / 512 / 2; - } else { - surf.ss5.x_offset = (tile_offset % 128) / key.cpp / 4; - surf.ss5.y_offset = tile_offset / 128 / 2; - } + uint32_t tile_base, tile_x, tile_y; + uint32_t pitch = key.pitch * key.cpp; + + if (key.tiling == I915_TILING_X) { + tile_x = key.draw_x % (512 / key.cpp); + tile_y = key.draw_y % 8; + tile_base = ((key.draw_y / 8) * (8 * pitch)); + tile_base += (key.draw_x - tile_x) / (512 / key.cpp) * 4096; + } else { + /* Y */ + tile_x = key.draw_x % (128 / key.cpp); + tile_y = key.draw_y % 32; + tile_base = ((key.draw_y / 32) * (32 * pitch)); + tile_base += (key.draw_x - tile_x) / (128 / key.cpp) * 4096; } + assert(BRW_IS_G4X(brw) || (tile_x == 0 && tile_y == 0)); + assert(tile_x % 4 == 0); + assert(tile_y % 2 == 0); + /* Note that the low bits of these fields are missing, so + * there's the possibility of getting in trouble. + */ + surf.ss1.base_addr = tile_base; + surf.ss5.x_offset = tile_x / 4; + surf.ss5.y_offset = tile_y / 2; } if (region_bo != NULL) surf.ss1.base_addr += region_bo->offset; /* reloc */ -- cgit v1.2.3 From 19a26dfc474618ecfe881846a8c9dac221332d44 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 4 Jan 2010 09:39:07 -0800 Subject: intel: Fix CopyTexImage from tiled mipmap levels > 0. Fixes piglit fbo-copyteximage. --- src/mesa/drivers/dri/intel/intel_tex_copy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/intel/intel_tex_copy.c b/src/mesa/drivers/dri/intel/intel_tex_copy.c index ee953cfbe7..ef5aed32f3 100644 --- a/src/mesa/drivers/dri/intel/intel_tex_copy.c +++ b/src/mesa/drivers/dri/intel/intel_tex_copy.c @@ -160,13 +160,14 @@ do_copy_texsubimage(struct intel_context *intel, intelImage->mt->cpp, src_pitch, src->buffer, - src->draw_offset, + 0, src->tiling, intelImage->mt->pitch, dst_bo, 0, intelImage->mt->region->tiling, - x, y, image_x + dstx, image_y + dsty, + src->draw_x + x, src->draw_y + y, + image_x + dstx, image_y + dsty, width, height, GL_COPY)) { UNLOCK_HARDWARE(intel); -- cgit v1.2.3 From b434a816d7a4b298e16a8b51b54e5a2d5ea28da8 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 29 Dec 2009 15:55:34 -0800 Subject: i915: Use _MaxLevel on principle in texture setup. It was OK before because we proceed to clamp the value to hardware limits, but given that other use of MaxLevel has been a trap, let's avoid it. --- src/mesa/drivers/dri/i915/i915_texstate.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c index de258484d6..825f1dbbe3 100644 --- a/src/mesa/drivers/dri/i915/i915_texstate.c +++ b/src/mesa/drivers/dri/i915/i915_texstate.c @@ -196,10 +196,11 @@ i915_update_tex_unit(struct intel_context *intel, GLuint unit, GLuint ss3) state[I915_TEXREG_MS3] |= MS3_TILE_WALK; } - /* We get one field with fraction bits to cover the maximum addressable (smallest - * resolution) LOD. Use it to cover both MAX_LEVEL and MAX_LOD. + /* We get one field with fraction bits for the maximum addressable + * (lowest resolution) LOD. Use it to cover both MAX_LEVEL and + * MAX_LOD. */ - maxlod = MIN2(tObj->MaxLod, tObj->MaxLevel - tObj->BaseLevel); + maxlod = MIN2(tObj->MaxLod, tObj->_MaxLevel - tObj->BaseLevel); state[I915_TEXREG_MS4] = ((((pitch / 4) - 1) << MS4_PITCH_SHIFT) | MS4_CUBE_FACE_ENA_MASK | -- cgit v1.2.3 From 6d845808589b9df84f23551b122533a55dce6bd5 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 4 Jan 2010 19:05:31 -0700 Subject: mesa: add missing _mesa_lock_texture() call --- src/mesa/main/texparam.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa') diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index db4c7a5eda..9e1a889bce 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -1165,6 +1165,7 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params ) return; } + _mesa_lock_texture(ctx, obj); switch (pname) { case GL_TEXTURE_MAG_FILTER: *params = (GLint) obj->MagFilter; -- cgit v1.2.3