From 888f4380cf6f2d285b2ebdab0795be9336236e35 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 22 Jan 2008 08:41:22 -0700 Subject: [PATCH 1/7] fix GLX vertex array bug 14197 --- docs/relnotes-7.0.3.html | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/relnotes-7.0.3.html b/docs/relnotes-7.0.3.html index 52b54efad29..daf11431b56 100644 --- a/docs/relnotes-7.0.3.html +++ b/docs/relnotes-7.0.3.html @@ -32,6 +32,7 @@ Mesa 7.0.3 is a stable release with bug fixes since version 7.0.2.
  • glGetActiveUniform returned incorrect sizes (bug 13751)
  • Fix several bugs relating to uniforms and attributes in GLSL API (Bruce Merry, bug 13753)
  • glTexImage3D(GL_PROXY_TEXTURE_3D) mis-set teximage depth field +
  • Fixed GLX indirect vertex array rendering bug (14197) From 557b0d9df7ffa71135959ce0ed8de346b9175b73 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 22 Jan 2008 14:57:20 -0500 Subject: [PATCH 2/7] glxinfo: Fix multisample visual reporting. strstr() == 0 tests for the string _not_ being present. Originally Red Hat bug #351871. --- progs/xdemos/glxinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/progs/xdemos/glxinfo.c b/progs/xdemos/glxinfo.c index 3e8e0be5203..e33cddff047 100644 --- a/progs/xdemos/glxinfo.c +++ b/progs/xdemos/glxinfo.c @@ -596,7 +596,7 @@ get_visual_attribs(Display *dpy, XVisualInfo *vInfo, /* multisample attribs */ #ifdef GLX_ARB_multisample - if (ext && strstr(ext, "GLX_ARB_multisample") == 0) { + if (ext && strstr(ext, "GLX_ARB_multisample")) { glXGetConfig(dpy, vInfo, GLX_SAMPLE_BUFFERS_ARB, &attribs->numMultisample); glXGetConfig(dpy, vInfo, GLX_SAMPLES_ARB, &attribs->numSamples); } From 0fd23f01c6961a39cf9c5a16bbabc47bbe836114 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 23 Jan 2008 16:03:19 -0700 Subject: [PATCH 3/7] Assorted patches for miniglx/linux-solo (Gavin Li ) --- Makefile | 1 + src/glut/mini/Makefile | 17 +++++++++++++++++ src/glut/mini/glut.pc.in | 11 +++++++++++ src/glx/mini/Makefile | 4 ++++ 4 files changed, 33 insertions(+) create mode 100644 src/glut/mini/glut.pc.in diff --git a/Makefile b/Makefile index 4a0654e87ad..1da2d95eeb5 100644 --- a/Makefile +++ b/Makefile @@ -415,6 +415,7 @@ GLUT_FILES = \ $(DIRECTORY)/src/glut/fbdev/Makefile \ $(DIRECTORY)/src/glut/fbdev/*[ch] \ $(DIRECTORY)/src/glut/mini/*[ch] \ + $(DIRECTORY)/src/glut/mini/glut.pc.in \ $(DIRECTORY)/src/glut/directfb/Makefile \ $(DIRECTORY)/src/glut/directfb/NOTES \ $(DIRECTORY)/src/glut/directfb/*[ch] \ diff --git a/src/glut/mini/Makefile b/src/glut/mini/Makefile index 87ff43ce569..a73198a68cc 100644 --- a/src/glut/mini/Makefile +++ b/src/glut/mini/Makefile @@ -72,6 +72,23 @@ tags: etags `find . -name \*.[ch]` `find ../include` +# glut pkgconfig file +pcedit = sed \ + -e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \ + -e 's,@LIB_DIR@,$(LIB_DIR),' \ + -e 's,@VERSION@,$(GLUT_MAJOR).$(GLUT_MINOR).$(GLUT_TINY),' +glut.pc: glut.pc.in + $(pcedit) $< > $@ + +install: glut.pc + $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL + $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR) + $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig + $(INSTALL) -m 644 $(TOP)/include/GL/glut.h $(DESTDIR)$(INSTALL_DIR)/include/GL + $(INSTALL) $(TOP)/$(LIB_DIR)/libglut* $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR) + $(INSTALL) -m 644 glut.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig + + # Remove .o and backup files clean: depend -rm -f depend diff --git a/src/glut/mini/glut.pc.in b/src/glut/mini/glut.pc.in new file mode 100644 index 00000000000..f732f2990d0 --- /dev/null +++ b/src/glut/mini/glut.pc.in @@ -0,0 +1,11 @@ +prefix=@INSTALL_DIR@ +exec_prefix=${prefix} +libdir=${exec_prefix}/@LIB_DIR@ +includedir=${prefix}/include + +Name: glut +Description: Mesa OpenGL Utility Toolkit library +Requires: gl glu +Version: @VERSION@ +Libs: -L${libdir} -lglut +Cflags: -I${includedir} diff --git a/src/glx/mini/Makefile b/src/glx/mini/Makefile index 96750d2c248..7ed2146d562 100644 --- a/src/glx/mini/Makefile +++ b/src/glx/mini/Makefile @@ -75,6 +75,10 @@ tags: etags `find . -name \*.[ch]` `find ../include` +# Dummy install target +install: + + # Remove .o and backup files clean: -rm -f drmtest $(TOP)/$(LIB_DIR)/libGL.so* From 4b4c131cd0e9d96ce57f417354c85cca1d7a99a2 Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Fri, 25 Jan 2008 16:38:38 +0800 Subject: [PATCH 4/7] i965: re-define the type of reg.loopcount. avoid some issues such that 1 + (-2) gets a big positive value. --- src/mesa/drivers/dri/i965/brw_clip_tri.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_clip_tri.c b/src/mesa/drivers/dri/i965/brw_clip_tri.c index f62b02cedfd..0fc7306d39d 100644 --- a/src/mesa/drivers/dri/i965/brw_clip_tri.c +++ b/src/mesa/drivers/dri/i965/brw_clip_tri.c @@ -78,7 +78,7 @@ void brw_clip_tri_alloc_regs( struct brw_clip_compile *c, } c->reg.t = brw_vec1_grf(i, 0); - c->reg.loopcount = retype(brw_vec1_grf(i, 1), BRW_REGISTER_TYPE_UD); + c->reg.loopcount = retype(brw_vec1_grf(i, 1), BRW_REGISTER_TYPE_D); c->reg.nr_verts = retype(brw_vec1_grf(i, 2), BRW_REGISTER_TYPE_UD); c->reg.planemask = retype(brw_vec1_grf(i, 3), BRW_REGISTER_TYPE_UD); c->reg.plane_equation = brw_vec4_grf(i, 4); From 5a7feb8ea2e0d0a0f93e4fdfec1c89d2ceb58a66 Mon Sep 17 00:00:00 2001 From: "Xiang, Haihao" Date: Fri, 25 Jan 2008 16:52:08 +0800 Subject: [PATCH 5/7] i965: valid message length includes message header. --- src/mesa/drivers/dri/i965/brw_clip_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/i965/brw_clip_util.c b/src/mesa/drivers/dri/i965/brw_clip_util.c index 19bef19801a..e61f55c9f3f 100644 --- a/src/mesa/drivers/dri/i965/brw_clip_util.c +++ b/src/mesa/drivers/dri/i965/brw_clip_util.c @@ -262,7 +262,7 @@ void brw_clip_kill_thread(struct brw_clip_compile *c) c->reg.R0, 0, /* allocate */ 0, /* used */ - 0, /* msg len */ + 1, /* msg len */ 0, /* response len */ 1, /* eot */ 1, /* writes complete */ From 61972077cdd7e828147546c7f3f46308b4575bc2 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Mon, 28 Jan 2008 11:15:53 +0000 Subject: [PATCH 6/7] fix some pbo path problems --- src/mesa/swrast/s_drawpix.c | 3 ++- src/mesa/swrast/s_readpix.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index 4c9194e148f..82713bdc4f1 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -860,7 +860,8 @@ _swrast_DrawPixels( GLcontext *ctx, format, type, pixels)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawPixels(invalid PBO access)"); - goto end; + RENDER_FINISH(swrast,ctx); + return; } buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT, GL_READ_ONLY_ARB, diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index 916ddc1b973..806fca96b25 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -580,7 +580,8 @@ _swrast_ReadPixels( GLcontext *ctx, format, type, pixels)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(invalid PBO access)"); - goto end; + RENDER_FINISH(swrast, ctx); + return; } buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT, GL_WRITE_ONLY_ARB, From 86234e55a6463d130da3289f8543ed450d750078 Mon Sep 17 00:00:00 2001 From: Alan Hourihane Date: Mon, 28 Jan 2008 11:23:53 +0000 Subject: [PATCH 7/7] pull some more fixes for pbo access from trunk --- src/mesa/swrast/s_drawpix.c | 7 +++---- src/mesa/swrast/s_readpix.c | 12 ++++++------ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c index 82713bdc4f1..cb613b6b255 100644 --- a/src/mesa/swrast/s_drawpix.c +++ b/src/mesa/swrast/s_drawpix.c @@ -860,7 +860,7 @@ _swrast_DrawPixels( GLcontext *ctx, format, type, pixels)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawPixels(invalid PBO access)"); - RENDER_FINISH(swrast,ctx); + RENDER_FINISH(swrast, ctx); return; } buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_UNPACK_BUFFER_EXT, @@ -869,7 +869,8 @@ _swrast_DrawPixels( GLcontext *ctx, if (!buf) { /* buffer is already mapped - that's an error */ _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawPixels(PBO is mapped)"); - goto end; + RENDER_FINISH(swrast, ctx); + return; } pixels = ADD_POINTERS(buf, pixels); } @@ -909,8 +910,6 @@ _swrast_DrawPixels( GLcontext *ctx, /* don't return yet, clean-up */ } -end: - RENDER_FINISH(swrast,ctx); if (unpack->BufferObj->Name) { diff --git a/src/mesa/swrast/s_readpix.c b/src/mesa/swrast/s_readpix.c index 806fca96b25..8df15c8704e 100644 --- a/src/mesa/swrast/s_readpix.c +++ b/src/mesa/swrast/s_readpix.c @@ -570,7 +570,8 @@ _swrast_ReadPixels( GLcontext *ctx, /* Do all needed clipping here, so that we can forget about it later */ if (!_mesa_clip_readpixels(ctx, &x, &y, &width, &height, &clippedPacking)) { /* The ReadPixels region is totally outside the window bounds */ - goto end; + RENDER_FINISH(swrast, ctx); + return; } if (clippedPacking.BufferObj->Name) { @@ -580,8 +581,8 @@ _swrast_ReadPixels( GLcontext *ctx, format, type, pixels)) { _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(invalid PBO access)"); - RENDER_FINISH(swrast, ctx); - return; + RENDER_FINISH(swrast, ctx); + return; } buf = (GLubyte *) ctx->Driver.MapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT, GL_WRITE_ONLY_ARB, @@ -589,7 +590,8 @@ _swrast_ReadPixels( GLcontext *ctx, if (!buf) { /* buffer is already mapped - that's an error */ _mesa_error(ctx, GL_INVALID_OPERATION, "glReadPixels(PBO is mapped)"); - goto end; + RENDER_FINISH(swrast, ctx); + return; } pixels = ADD_POINTERS(buf, pixels); } @@ -630,8 +632,6 @@ _swrast_ReadPixels( GLcontext *ctx, /* don't return yet, clean-up */ } - -end: RENDER_FINISH(swrast, ctx); if (clippedPacking.BufferObj->Name) {