summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordawes <dawes>2001-05-01 21:13:03 +0000
committerdawes <dawes>2001-05-01 21:13:03 +0000
commit9c4eee2b56b1c57ac03562ea0424d164c6b20b90 (patch)
treece4b5cd1957d24d3f77151cd21af10a6e5d9a7b9
parent2846daeebb1ff72b04c1a1b41b9abb281395580a (diff)
Mesa version 3.4(.1) (20010501)
-rw-r--r--extras/Mesa/docs/VERSIONS1
-rw-r--r--extras/Mesa/src/Windows/wmesa.c8
-rw-r--r--extras/Mesa/src/X/xfonts.c4
-rw-r--r--extras/Mesa/src/extensions.c2
-rw-r--r--extras/Mesa/src/texture.c5
5 files changed, 15 insertions, 5 deletions
diff --git a/extras/Mesa/docs/VERSIONS b/extras/Mesa/docs/VERSIONS
index b2a6e99e7..444a056eb 100644
--- a/extras/Mesa/docs/VERSIONS
+++ b/extras/Mesa/docs/VERSIONS
@@ -809,3 +809,4 @@ post-3.4.1
- AA triangle rendering could touch pixels outside right window bound
- fixed byteswapping problem in clear_32bit_ximage() function
- fixed bugs in wglUseFontBitmapsA(), by Frank Warmerdam
+ - fixed memory leak in glXUseXFont()
diff --git a/extras/Mesa/src/Windows/wmesa.c b/extras/Mesa/src/Windows/wmesa.c
index 58a7b9105..7abfbab35 100644
--- a/extras/Mesa/src/Windows/wmesa.c
+++ b/extras/Mesa/src/Windows/wmesa.c
@@ -1406,6 +1406,14 @@ void /*APIENTRY*/ WMesaMakeCurrent( WMesaContext c )
void /*APIENTRY*/ WMesaSwapBuffers( void )
{
HDC DC = Current->hDC;
+ GET_CURRENT_CONTEXT(ctx);
+
+ /* If we're swapping the buffer associated with the current context
+ * we have to flush any pending rendering commands first.
+ */
+ if (Current && Current->gl_ctx == ctx)
+ _mesa_swapbuffers(ctx);
+
if (Current->db_flag)
wmFlush(Current);
}
diff --git a/extras/Mesa/src/X/xfonts.c b/extras/Mesa/src/X/xfonts.c
index bb2523370..c871cd99f 100644
--- a/extras/Mesa/src/X/xfonts.c
+++ b/extras/Mesa/src/X/xfonts.c
@@ -260,7 +260,7 @@ void Fake_glXUseXFont( Font font, int first, int count, int listbase )
bm = (GLubyte *) MALLOC((max_bm_width * max_bm_height) * sizeof
(GLubyte));
if (!bm) {
- XFreeFontInfo( NULL, fs, 0 );
+ XFreeFontInfo( NULL, fs, 1 );
gl_error(NULL, GL_OUT_OF_MEMORY,
"Couldn't allocate bitmap in glXUseXFont()");
return;
@@ -375,7 +375,7 @@ bm_height);
}
FREE(bm);
- XFreeFontInfo( NULL, fs, 0 );
+ XFreeFontInfo( NULL, fs, 1 );
XFreeGC (dpy, gc);
/* Restore saved packing modes. */
diff --git a/extras/Mesa/src/extensions.c b/extras/Mesa/src/extensions.c
index 510deea56..a8298c416 100644
--- a/extras/Mesa/src/extensions.c
+++ b/extras/Mesa/src/extensions.c
@@ -53,7 +53,7 @@ static struct { int enabled; const char *name; } default_extensions[] = {
{ DEFAULT_ON, "GL_ARB_multitexture" },
{ DEFAULT_OFF, "GL_ARB_texture_compression" },
{ DEFAULT_OFF, "GL_ARB_texture_cube_map" }, /* in progress */
- { ALWAYS_ENABLED, "GL_ARB_tranpose_matrix" },
+ { ALWAYS_ENABLED, "GL_ARB_transpose_matrix" },
{ ALWAYS_ENABLED, "GL_EXT_abgr" },
{ DEFAULT_ON, "GL_EXT_blend_color" },
{ DEFAULT_ON, "GL_EXT_blend_func_separate" },
diff --git a/extras/Mesa/src/texture.c b/extras/Mesa/src/texture.c
index 9f937f9c0..09ffdd02d 100644
--- a/extras/Mesa/src/texture.c
+++ b/extras/Mesa/src/texture.c
@@ -2064,10 +2064,12 @@ _mesa_texture_combine(const GLcontext *ctx,
const GLubyte red = FLOAT_TO_UBYTE(textureUnit->EnvColor[0]);
const GLubyte green = FLOAT_TO_UBYTE(textureUnit->EnvColor[1]);
const GLubyte blue = FLOAT_TO_UBYTE(textureUnit->EnvColor[2]);
+ const GLubyte alpha = FLOAT_TO_UBYTE(textureUnit->EnvColor[3]);
for (i = 0; i < n; i++) {
c[i][RCOMP] = red;
c[i][GCOMP] = green;
c[i][BCOMP] = blue;
+ c[i][ACOMP] = alpha;
}
argRGB[j] = ccolor[j];
}
@@ -2080,6 +2082,7 @@ _mesa_texture_combine(const GLcontext *ctx,
GLubyte (*src)[4] = argRGB[j];
GLubyte (*dst)[4] = ccolor[j];
+ /* point to new arg[j] storage */
argRGB[j] = ccolor[j];
if (textureUnit->CombineOperandRGB[j] == GL_ONE_MINUS_SRC_COLOR) {
@@ -2090,7 +2093,6 @@ _mesa_texture_combine(const GLcontext *ctx,
}
}
else if (textureUnit->CombineOperandRGB[j] == GL_SRC_ALPHA) {
- src = argA[j];
for (i = 0; i < n; i++) {
dst[i][RCOMP] = src[i][ACOMP];
dst[i][GCOMP] = src[i][ACOMP];
@@ -2098,7 +2100,6 @@ _mesa_texture_combine(const GLcontext *ctx,
}
}
else { /* GL_ONE_MINUS_SRC_ALPHA */
- src = argA[j];
for (i = 0; i < n; i++) {
dst[i][RCOMP] = 255 - src[i][ACOMP];
dst[i][GCOMP] = 255 - src[i][ACOMP];