From 09c04db3c900e4ed833d060853b48c7ca23697e1 Mon Sep 17 00:00:00 2001
From: Michel Dänzer
Date: Thu, 14 May 2009 11:07:49 +0200
Subject: r300: Make sure to drop current hardware state reference to texture
objects.
Fixes potential texture object leaks.
---
src/mesa/drivers/dri/r300/r300_context.c | 7 +++++++
src/mesa/drivers/dri/r300/r300_texstate.c | 22 ++++++++++++++--------
2 files changed, 21 insertions(+), 8 deletions(-)
diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c
index 12bee1a8fb..8f0effd83e 100644
--- a/src/mesa/drivers/dri/r300/r300_context.c
+++ b/src/mesa/drivers/dri/r300/r300_context.c
@@ -43,6 +43,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "main/matrix.h"
#include "main/extensions.h"
#include "main/state.h"
+#include "main/texobj.h"
#include "main/bufferobj.h"
#include "swrast/swrast.h"
@@ -500,6 +501,7 @@ void r300DestroyContext(__DRIcontextPrivate * driContextPriv)
r300ContextPtr r300 = (r300ContextPtr) driContextPriv->driverPrivate;
radeonContextPtr radeon = (radeonContextPtr) r300;
radeonContextPtr current = ctx ? RADEON_CONTEXT(ctx) : NULL;
+ int i;
if (RADEON_DEBUG & DEBUG_DRI) {
fprintf(stderr, "Destroying context !\n");
@@ -553,6 +555,11 @@ void r300DestroyContext(__DRIcontextPrivate * driContextPriv)
assert(is_empty_list(&r300->swapped));
}
+ /* Drop texture object references from current hardware state */
+ for (i = 0; i < 8; i++) {
+ _mesa_reference_texobj(&r300->state.texture.unit[i].texobj, NULL);
+ }
+
radeonCleanupContext(&r300->radeon);
#ifdef USER_BUFFERS
diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c
index abe613e27b..f6ae4b675b 100644
--- a/src/mesa/drivers/dri/r300/r300_texstate.c
+++ b/src/mesa/drivers/dri/r300/r300_texstate.c
@@ -557,12 +557,15 @@ static GLboolean r300UpdateTexture(GLcontext * ctx, int unit)
{
r300ContextPtr rmesa = R300_CONTEXT(ctx);
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
- struct gl_texture_object *tObj = texUnit->_Current;
- r300TexObjPtr t = (r300TexObjPtr) tObj->DriverData;
+ struct gl_texture_object *tObj = texUnit->_ReallyEnabled ?
+ texUnit->_Current : NULL;
+ r300TexObjPtr t = tObj ? (r300TexObjPtr) tObj->DriverData : NULL;
/* Fallback if there's a texture border */
- if (tObj->Image[0][tObj->BaseLevel]->Border > 0)
- return GL_FALSE;
+ if (tObj && tObj->Image[0][tObj->BaseLevel]->Border > 0) {
+ tObj = NULL;
+ t = NULL;
+ }
/* Update state if this is a different texture object to last
* time.
@@ -579,11 +582,14 @@ static GLboolean r300UpdateTexture(GLcontext * ctx, int unit)
}
_mesa_reference_texobj(&rmesa->state.texture.unit[unit].texobj, tObj);
- t->base.bound |= (1 << unit);
- driUpdateTextureLRU(&t->base); /* XXX: should be locked! */
+
+ if (t) {
+ t->base.bound |= (1 << unit);
+ driUpdateTextureLRU(&t->base); /* XXX: should be locked! */
+ }
}
- return !t->border_fallback;
+ return !t || !t->border_fallback;
}
void r300SetTexOffset(__DRIcontext * pDRICtx, GLint texname,
@@ -651,7 +657,7 @@ static GLboolean r300UpdateTextureUnit(GLcontext * ctx, int unit)
} else if (texUnit->_ReallyEnabled) {
return GL_FALSE;
} else {
- return GL_TRUE;
+ return r300UpdateTexture(ctx, unit);
}
}
--
cgit v1.2.3
From 65b9cd74e3145b416f2c9695a0c3bc7bd6b85e25 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Fri, 15 May 2009 08:02:40 -0600
Subject: docs: updates from the 7.4 branch
---
docs/news.html | 5 ++--
docs/relnotes-7.4.2.html | 74 ++++++++++++++++++++++++++++++++++++++++++++++++
docs/relnotes.html | 6 ++--
3 files changed, 80 insertions(+), 5 deletions(-)
create mode 100644 docs/relnotes-7.4.2.html
diff --git a/docs/news.html b/docs/news.html
index 98cee9b8b8..8cf2f91dd0 100644
--- a/docs/news.html
+++ b/docs/news.html
@@ -11,9 +11,10 @@
News
-May tbd, 2009
+May 15, 2009
-Mesa 7.5 is released.
+Mesa 7.4.2 is released.
+This is a stable release fixing bugs since the 7.4.1 release.
diff --git a/docs/relnotes-7.4.2.html b/docs/relnotes-7.4.2.html
new file mode 100644
index 0000000000..7d066e418e
--- /dev/null
+++ b/docs/relnotes-7.4.2.html
@@ -0,0 +1,74 @@
+
+
+Mesa Release Notes
+
+
+
+
+
+
+
+Mesa 7.4.2 Release Notes / May 15, 2009
+
+
+Mesa 7.4.2 is a stable development release fixing bugs since the 7.4.1 release.
+
+
+Mesa 7.4.2 implements the OpenGL 2.1 API, but the version reported by
+glGetString(GL_VERSION) depends on the particular driver being used.
+Some drivers don't support all the features required in OpenGL 2.1.
+
+
+See the Compiling/Installing page for prerequisites
+for DRI hardware acceleration.
+
+
+
+MD5 checksums
+
+172f5193154dad731387f97bd44ab68f MesaLib-7.4.2.tar.gz
+b10a76e32bde4645cfc34ea0416d7d8b MesaLib-7.4.2.tar.bz2
+cc6dfc2efd424cc342b84e6bcd78ce5d MesaLib-7.4.2.zip
+182a7e78aa7a480b3650a5c956dbddd1 MesaDemos-7.4.2.tar.gz
+bf559a0485667a3bfa4513a23501579b MesaDemos-7.4.2.tar.bz2
+5379e622b65e8c22022dba34aeb6f4f9 MesaDemos-7.4.2.zip
+7cc43c1c35bf6a279a16e063dea3b8c5 MesaGLUT-7.4.2.tar.gz
+e0dfc44d537904a030861e5b3c760c11 MesaGLUT-7.4.2.tar.bz2
+4a6cf5bbbac190d6ba97448b3098b7f4 MesaGLUT-7.4.2.zip
+
+
+
+Bug fixes
+
+Fixed segfault when rendering to front buffer with DRI 1.
+ Fixed swrast texture rectangle bug when wrap mode = GL_CLAMP_TO_BORDER and
+ filter mode = GL_LINEAR. (bug 21461)
+ Fixed texture object mem leak during context destruction.
+ Fixed a state validation bug in glCopyTex[Sub]Image()
+ Fixed some i965 GLSL bugs.
+ Fixed an R300 driver texture object bad memory reference.
+
+
+
+
+Driver Status
+
+
+Driver Status
+---------------------- ----------------------
+DRI drivers varies with the driver
+XMesa/GLX (on Xlib) implements OpenGL 2.1
+OSMesa (off-screen) implements OpenGL 2.1
+Windows/Win32 implements OpenGL 2.1
+Glide (3dfx Voodoo1/2) implements OpenGL 1.3
+SVGA unsupported
+Wind River UGL unsupported
+DJGPP unsupported
+GGI unsupported
+BeOS unsupported
+Allegro unsupported
+D3D unsupported
+
+
+
+
diff --git a/docs/relnotes.html b/docs/relnotes.html
index 298352038c..ca808af64c 100644
--- a/docs/relnotes.html
+++ b/docs/relnotes.html
@@ -10,8 +10,8 @@
Mesa uses an even/odd version number scheme like the Linux kernel.
-Odd numbered versions (such as 7.5) designate new developmental releases.
-Even numbered versions (such as 7.4) designate stable releases.
+Odd numbered versions (such as 6.5) designate new developmental releases.
+Even numbered versions (such as 6.4) designate stable releases.
@@ -20,7 +20,7 @@ The release notes summarize what's new or changed in each Mesa release.
-7.5 release notes
+7.4.2 release notes
7.4.1 release notes
7.4 release notes
7.3 release notes
--
cgit v1.2.3
From 483e247804db914835173347b7f2a12c0f78d60e Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Fri, 15 May 2009 08:03:56 -0600
Subject: mesa: bump version to 7.5-rc2
---
Makefile | 2 +-
src/mesa/main/version.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 69d3ecacd7..acf83e6280 100644
--- a/Makefile
+++ b/Makefile
@@ -181,7 +181,7 @@ ultrix-gcc:
# Rules for making release tarballs
-VERSION=7.5-rc1
+VERSION=7.5-rc2
DIRECTORY = Mesa-$(VERSION)
LIB_NAME = MesaLib-$(VERSION)
DEMO_NAME = MesaDemos-$(VERSION)
diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h
index 072037bbd7..e109f20df4 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-rc1"
+#define MESA_VERSION_STRING "7.5-rc2"
/* To make version comparison easy */
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
--
cgit v1.2.3
From f2445dfd85b42aafe0634e17b2929b4122ff3f03 Mon Sep 17 00:00:00 2001
From: Aidan Thornton
Date: Mon, 18 May 2009 12:47:00 +0200
Subject: Initialize psp->waitX/waitGL for swrast_dri.so.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=21053 .
---
src/glx/x11/drisw_glx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/glx/x11/drisw_glx.c b/src/glx/x11/drisw_glx.c
index 5e3d763cff..b843ce484f 100644
--- a/src/glx/x11/drisw_glx.c
+++ b/src/glx/x11/drisw_glx.c
@@ -405,6 +405,8 @@ driCreateScreen(__GLXscreenConfigs * psc, int screen,
psp->createContext = driCreateContext;
psp->createDrawable = driCreateDrawable;
psp->swapBuffers = driSwapBuffers;
+ psp->waitX = NULL;
+ psp->waitGL = NULL;
return psp;
--
cgit v1.2.3
From da0d4e1db67d7641a535218de2db5f7bb00a6bb8 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Mon, 18 May 2009 07:17:36 -0600
Subject: docs: emphasize the incomplete status of the nouveau/R300 gallium
drivers
---
docs/relnotes-7.5.html | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/docs/relnotes-7.5.html b/docs/relnotes-7.5.html
index 3de243d1b2..d47b21d827 100644
--- a/docs/relnotes-7.5.html
+++ b/docs/relnotes-7.5.html
@@ -46,7 +46,7 @@ tbd
New features
-Gallium - this is the new architecture for OS-independent and
+ Gallium3D - this is the new architecture for OS-independent and
API-independent 3D drivers.
Gallium3D is intended for GPUs that fully support vertex/fragment shaders.
The Gallium3D drivers currently included are:
@@ -54,8 +54,10 @@ tbd
softpipe - a software/reference driver
i915 - Intel 915/945 driver
Cell - IBM/Sony/Toshiba Cell processor driver
- nouveau - preliminary driver for NVIDIA GPUs (still under development)
- r300 - preliminary driver for R300 (still under development)
+ nouveau (for NVIDIA GPUs) and R300 for (AMD/ATI R300).
+ PLEASE NOTE: these drivers are incomplete and still under development.
+ It's probably NOT worthwhile to report any bugs unless you have patches.
+
GL_ARB_framebuffer_object extension (software drivers, i965 driver)
Reworked two-sided stencil support.
--
cgit v1.2.3
From 6e61700541f229b55d78102a534c022caee1319c Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Mon, 18 May 2009 07:17:46 -0600
Subject: docs: link to 7.5 relnotes
---
docs/relnotes.html | 1 +
1 file changed, 1 insertion(+)
diff --git a/docs/relnotes.html b/docs/relnotes.html
index ca808af64c..45746268af 100644
--- a/docs/relnotes.html
+++ b/docs/relnotes.html
@@ -20,6 +20,7 @@ The release notes summarize what's new or changed in each Mesa release.
+7.5 release notes
7.4.2 release notes
7.4.1 release notes
7.4 release notes
--
cgit v1.2.3
From df37cde3090cabded561f4f5ef29ff5ddf980170 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Mon, 18 May 2009 08:46:17 -0600
Subject: mesa: added linux-osmesa-static config
Contributed by Nicolas Noble. See SF bug #2792536
---
Makefile | 1 +
configs/linux-osmesa-static | 37 +++++++++++++++++++++++++++++++++++++
2 files changed, 38 insertions(+)
create mode 100644 configs/linux-osmesa-static
diff --git a/Makefile b/Makefile
index acf83e6280..d134c4c330 100644
--- a/Makefile
+++ b/Makefile
@@ -127,6 +127,7 @@ linux-icc \
linux-icc-static \
linux-llvm \
linux-osmesa \
+linux-osmesa-static \
linux-osmesa16 \
linux-osmesa16-static \
linux-osmesa32 \
diff --git a/configs/linux-osmesa-static b/configs/linux-osmesa-static
new file mode 100644
index 0000000000..a03e63eb75
--- /dev/null
+++ b/configs/linux-osmesa-static
@@ -0,0 +1,37 @@
+# Configuration for building static libOSMesa.a on Linux, no Xlib driver
+# This doesn't really have any Linux dependencies, so it should be usable
+# on other (gcc-based) systems.
+
+include $(TOP)/configs/default
+
+CONFIG_NAME = linux-osmesa
+
+# Compiler and flags
+CC = gcc -m32
+CXX = g++ -m32
+CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE -DPTHREADS
+CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
+
+MKLIB_OPTIONS = -static
+
+# Library names (actual file names)
+GL_LIB_NAME = libGL.a
+GLU_LIB_NAME = libGLU.a
+GLUT_LIB_NAME = libglut.a
+GLW_LIB_NAME = libGLw.a
+OSMESA_LIB_NAME = libOSMesa.a
+
+# Directories
+SRC_DIRS = mesa glu
+DRIVER_DIRS = osmesa
+PROGRAM_DIRS = osdemos
+
+
+# Dependencies
+GL_LIB_DEPS =
+OSMESA_LIB_DEPS =
+GLU_LIB_DEPS =
+GLUT_LIB_DEPS =
+GLW_LIB_DEPS =
+APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \
+ $(EXTRA_LIB_PATH) -lX11 -lXmu -lXt -lXi -lpthread -lstdc++ -lm
--
cgit v1.2.3
From 14e5bff97b20565637d468d97dba434ac4cd2ba1 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Mon, 18 May 2009 10:12:36 -0600
Subject: st: fix incorrect target parameter to screen->is_format_supported()
We were passing a GL texture target instead of a pipe_texture_target enum.
---
src/mesa/state_tracker/st_gen_mipmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c
index e159b4c9db..3a88908022 100644
--- a/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/src/mesa/state_tracker/st_gen_mipmap.c
@@ -87,7 +87,7 @@ st_render_mipmap(struct st_context *st,
assert(target != GL_TEXTURE_3D); /* not done yet */
/* check if we can render in the texture's format */
- if (!screen->is_format_supported(screen, pt->format, target,
+ if (!screen->is_format_supported(screen, pt->format, pt->target,
PIPE_TEXTURE_USAGE_RENDER_TARGET, 0)) {
return FALSE;
}
--
cgit v1.2.3
From 30320f0afb3ae4409adab662d65475cf9665bc19 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Mon, 18 May 2009 10:13:44 -0600
Subject: softpipe: add texture target sanity check assertion
---
src/gallium/drivers/softpipe/sp_screen.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index 7380a6ae2b..a32fd3a1ba 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -127,6 +127,11 @@ softpipe_is_format_supported( struct pipe_screen *screen,
unsigned tex_usage,
unsigned geom_flags )
{
+ assert(target == PIPE_TEXTURE_1D ||
+ target == PIPE_TEXTURE_2D ||
+ target == PIPE_TEXTURE_3D ||
+ target == PIPE_TEXTURE_CUBE);
+
switch(format) {
case PIPE_FORMAT_DXT1_RGB:
case PIPE_FORMAT_DXT1_RGBA:
--
cgit v1.2.3
From adabd0e81e287cd5dac60fa63841d8b096d10d5f Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Mon, 18 May 2009 10:27:31 -0600
Subject: mesa: comments for _mesa_generate_mipmap_level()
---
src/mesa/main/mipmap.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index bc8658beff..7a719745fc 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -1370,6 +1370,9 @@ make_2d_stack_mipmap(GLenum datatype, GLuint comps, GLint border,
/**
* Down-sample a texture image to produce the next lower mipmap level.
+ * \param comps components per texel (1, 2, 3 or 4)
+ * \param srcRowStride stride between source rows, in texels
+ * \param dstRowStride stride between destination rows, in texels
*/
void
_mesa_generate_mipmap_level(GLenum target,
--
cgit v1.2.3
From 7ce105d2e6885eeac73c59dc14c4cd59a89c1425 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Mon, 18 May 2009 10:28:04 -0600
Subject: st/mesa: fix incorrect src/dst stride params to
_mesa_generate_mipmap_level()
The stride needs to be in texels, not bytes.
---
src/mesa/state_tracker/st_gen_mipmap.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/mesa/state_tracker/st_gen_mipmap.c b/src/mesa/state_tracker/st_gen_mipmap.c
index 3a88908022..dc6d77825f 100644
--- a/src/mesa/state_tracker/st_gen_mipmap.c
+++ b/src/mesa/state_tracker/st_gen_mipmap.c
@@ -123,6 +123,7 @@ fallback_generate_mipmap(GLcontext *ctx, GLenum target,
struct pipe_transfer *srcTrans, *dstTrans;
const ubyte *srcData;
ubyte *dstData;
+ int srcStride, dstStride;
srcTrans = st_cond_flush_get_tex_transfer(st_context(ctx), pt, face,
srcLevel, zslice,
@@ -139,14 +140,17 @@ fallback_generate_mipmap(GLcontext *ctx, GLenum target,
srcData = (ubyte *) screen->transfer_map(screen, srcTrans);
dstData = (ubyte *) screen->transfer_map(screen, dstTrans);
+ srcStride = srcTrans->stride / srcTrans->block.size;
+ dstStride = dstTrans->stride / dstTrans->block.size;
+
_mesa_generate_mipmap_level(target, datatype, comps,
0 /*border*/,
pt->width[srcLevel], pt->height[srcLevel], pt->depth[srcLevel],
srcData,
- srcTrans->stride, /* stride in bytes */
+ srcStride, /* stride in texels */
pt->width[dstLevel], pt->height[dstLevel], pt->depth[dstLevel],
dstData,
- dstTrans->stride); /* stride in bytes */
+ dstStride); /* stride in texels */
screen->transfer_unmap(screen, srcTrans);
screen->transfer_unmap(screen, dstTrans);
--
cgit v1.2.3