From 905e12f3cce7f1bd8cfa990e4d6d7c0b14610f84 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Fri, 20 Nov 2009 14:20:15 -0800 Subject: gallium/util: Initialize variables in u_pack_color.h. (cherry picked from commit 36e2074b63e3e5bc489eb74cad0cd97eafcedb40) --- src/gallium/auxiliary/util/u_pack_color.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gallium/auxiliary/util/u_pack_color.h b/src/gallium/auxiliary/util/u_pack_color.h index eda883b3b9..9dacc6d83d 100644 --- a/src/gallium/auxiliary/util/u_pack_color.h +++ b/src/gallium/auxiliary/util/u_pack_color.h @@ -302,7 +302,10 @@ util_unpack_color_ub(enum pipe_format format, const void *src, static INLINE void util_pack_color(const float rgba[4], enum pipe_format format, void *dest) { - ubyte r, g, b, a; + ubyte r = 0; + ubyte g = 0; + ubyte b = 0; + ubyte a = 0; if (pf_size_x(format) <= 8) { /* format uses 8-bit components or less */ -- cgit v1.2.3 From d23bb22f6258a4b55af42fdb3f29fec2e694df72 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 22 Nov 2009 01:45:53 -0500 Subject: glu: Fix memory leak in __gl_meshMakeEdge. (cherry picked from commit d3b4c99c703f70a9d0e715a97e52672f7f8fc980) --- src/glu/sgi/libtess/mesh.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/glu/sgi/libtess/mesh.c b/src/glu/sgi/libtess/mesh.c index ae861f8642..95f87cdc94 100644 --- a/src/glu/sgi/libtess/mesh.c +++ b/src/glu/sgi/libtess/mesh.c @@ -284,7 +284,12 @@ GLUhalfEdge *__gl_meshMakeEdge( GLUmesh *mesh ) } e = MakeEdge( &mesh->eHead ); - if (e == NULL) return NULL; + if (e == NULL) { + memFree(newVertex1); + memFree(newVertex2); + memFree(newFace); + return NULL; + } MakeVertex( newVertex1, e, &mesh->vHead ); MakeVertex( newVertex2, e->Sym, &mesh->vHead ); -- cgit v1.2.3 From fe38c16021694145b2c96818e0c0fb095e42c03b Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 22 Nov 2009 01:57:35 -0500 Subject: glu/sgi: Fix memory leak in gluScaleImage. (cherry picked from commit a9c540f5dedbf593f8038fdbc95eecb60826ab26) --- src/glu/sgi/libutil/mipmap.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/glu/sgi/libutil/mipmap.c b/src/glu/sgi/libutil/mipmap.c index af647af73c..4139c304a1 100644 --- a/src/glu/sgi/libutil/mipmap.c +++ b/src/glu/sgi/libutil/mipmap.c @@ -3526,6 +3526,8 @@ gluScaleImage(GLenum format, GLsizei widthin, GLsizei heightin, afterImage = malloc(image_size(widthout, heightout, format, GL_UNSIGNED_SHORT)); if (beforeImage == NULL || afterImage == NULL) { + free(beforeImage); + free(afterImage); return GLU_OUT_OF_MEMORY; } -- cgit v1.2.3 From 6c1fc2b2a5c80697dff304562e79dae25d9f2cb1 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Mon, 23 Nov 2009 00:57:37 -0500 Subject: glu/sgi: Fix memory leak in gluScaleImage3D. (cherry picked from commit b611f639b4bffdcca376293f7ce71af9f6bdbff3) --- src/glu/sgi/libutil/mipmap.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/glu/sgi/libutil/mipmap.c b/src/glu/sgi/libutil/mipmap.c index 4139c304a1..223621f49f 100644 --- a/src/glu/sgi/libutil/mipmap.c +++ b/src/glu/sgi/libutil/mipmap.c @@ -7384,6 +7384,8 @@ int gluScaleImage3D(GLenum format, afterImage = malloc(imageSize3D(widthOut, heightOut, depthOut, format, GL_UNSIGNED_SHORT)); if (beforeImage == NULL || afterImage == NULL) { + free(beforeImage); + free(afterImage); return GLU_OUT_OF_MEMORY; } retrieveStoreModes3D(&psm); -- cgit v1.2.3 From 80a3944a4d6a07793872d283633546d482cf61b7 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Mon, 23 Nov 2009 01:09:06 -0500 Subject: glu/sgi: Fix memory leak in bitmapBuild2DMipmaps. (cherry picked from commit 5b925b7daa566d799c4f50911a7fcca114131503) --- src/glu/sgi/libutil/mipmap.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/glu/sgi/libutil/mipmap.c b/src/glu/sgi/libutil/mipmap.c index 223621f49f..c5faebd6a3 100644 --- a/src/glu/sgi/libutil/mipmap.c +++ b/src/glu/sgi/libutil/mipmap.c @@ -3762,6 +3762,7 @@ static int bitmapBuild2DMipmaps(GLenum target, GLint internalFormat, glPixelStorei(GL_UNPACK_SKIP_PIXELS,psm.unpack_skip_pixels); glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); + free(newImage); return GLU_OUT_OF_MEMORY; } } -- cgit v1.2.3 From 7ed749c062c2bc2b048a34f8e4c6b0a5198e32bb Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 24 Nov 2009 01:23:12 -0500 Subject: glu/sgi: Fix memory leak in gluBuild3DMipmapLevelsCore. (cherry picked from commit 326b66d724754ca97012501db1c7c62d7d41a457) --- src/glu/sgi/libutil/mipmap.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/glu/sgi/libutil/mipmap.c b/src/glu/sgi/libutil/mipmap.c index c5faebd6a3..a5d07a59cf 100644 --- a/src/glu/sgi/libutil/mipmap.c +++ b/src/glu/sgi/libutil/mipmap.c @@ -8232,6 +8232,7 @@ static int gluBuild3DMipmapLevelsCore(GLenum target, GLint internalFormat, glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); glPixelStorei(GL_UNPACK_SKIP_IMAGES, psm.unpack_skip_images); glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, psm.unpack_image_height); + free(srcImage); return GLU_OUT_OF_MEMORY; } } -- cgit v1.2.3 From 7b5eba453e08dfad151d09ba4d308cbdf4fc83af Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 25 Nov 2009 00:18:49 -0500 Subject: glu/sgi: Fix memory leak in gluBuild3DMipmapLevelsCore. (cherry picked from commit f895abbd9777c4985aa40cf660c68f6d7333f0ec) --- src/glu/sgi/libutil/mipmap.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/glu/sgi/libutil/mipmap.c b/src/glu/sgi/libutil/mipmap.c index a5d07a59cf..22d702291f 100644 --- a/src/glu/sgi/libutil/mipmap.c +++ b/src/glu/sgi/libutil/mipmap.c @@ -8098,6 +8098,7 @@ static int gluBuild3DMipmapLevelsCore(GLenum target, GLint internalFormat, glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); glPixelStorei(GL_UNPACK_SKIP_IMAGES, psm.unpack_skip_images); glPixelStorei(GL_UNPACK_IMAGE_HEIGHT, psm.unpack_image_height); + free(srcImage); return GLU_OUT_OF_MEMORY; } /* level userLevel+1 is in srcImage; level userLevel already saved */ -- cgit v1.2.3 From ea487c6d0b261bf90e898f51bc9f872de8166ddb Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 25 Nov 2009 00:28:56 -0500 Subject: glu/sgi: Fix memory leak in gluBuild2DMipmapLevelsCore. (cherry picked from commit 0d89f3dc7ff3f89ba8d5d664253730485bca35e2) --- src/glu/sgi/libutil/mipmap.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/glu/sgi/libutil/mipmap.c b/src/glu/sgi/libutil/mipmap.c index 22d702291f..796be0aad3 100644 --- a/src/glu/sgi/libutil/mipmap.c +++ b/src/glu/sgi/libutil/mipmap.c @@ -4349,6 +4349,7 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat, glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); + free(srcImage); return GLU_OUT_OF_MEMORY; } } -- cgit v1.2.3 From 8df551c46bc15a4b1ce1dc11e083498442018418 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Wed, 25 Nov 2009 00:39:37 -0500 Subject: glu/sgi: Fix memory leak in gluBuild1DMipmapLevelsCore. (cherry picked from commit 94bcb9f1a43f2ab3bdff09156e3ab5b1c115cbd8) --- src/glu/sgi/libutil/mipmap.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/glu/sgi/libutil/mipmap.c b/src/glu/sgi/libutil/mipmap.c index 796be0aad3..bf6eaf88c6 100644 --- a/src/glu/sgi/libutil/mipmap.c +++ b/src/glu/sgi/libutil/mipmap.c @@ -3608,6 +3608,7 @@ int gluBuild1DMipmapLevelsCore(GLenum target, GLint internalFormat, glPixelStorei(GL_UNPACK_SKIP_PIXELS,psm.unpack_skip_pixels); glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); + free(newImage); return GLU_OUT_OF_MEMORY; } } -- cgit v1.2.3 From c74afe0c46dbd0f90361c06526f70885a9061e8e Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 26 Nov 2009 00:35:31 -0500 Subject: glu/sgi: Fix memory leak in gluBuild2DMipmapLevelsCore. (cherry picked from commit 808f0376607b0e2d31dfebc888fd8f1e737fed09) --- src/glu/sgi/libutil/mipmap.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/glu/sgi/libutil/mipmap.c b/src/glu/sgi/libutil/mipmap.c index bf6eaf88c6..d1fd5a7d72 100644 --- a/src/glu/sgi/libutil/mipmap.c +++ b/src/glu/sgi/libutil/mipmap.c @@ -4108,6 +4108,7 @@ static int gluBuild2DMipmapLevelsCore(GLenum target, GLint internalFormat, glPixelStorei(GL_UNPACK_SKIP_PIXELS, psm.unpack_skip_pixels); glPixelStorei(GL_UNPACK_ROW_LENGTH, psm.unpack_row_length); glPixelStorei(GL_UNPACK_SWAP_BYTES, psm.unpack_swap_bytes); + free(srcImage); return GLU_OUT_OF_MEMORY; } /* level userLevel+1 is in srcImage; level userLevel already saved */ -- cgit v1.2.3 From 8d8fd9776e23a34e0d22e489ce1f85eb5e383121 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Fri, 4 Dec 2009 09:52:37 -0500 Subject: radeon: fix polygon stipple fixes fdo bug 25354 Signed-off-by: Alex Deucher --- src/mesa/drivers/dri/radeon/radeon_common.c | 23 ----------------------- src/mesa/drivers/dri/radeon/radeon_common.h | 1 - src/mesa/drivers/dri/radeon/radeon_context.h | 4 ++++ src/mesa/drivers/dri/radeon/radeon_state.c | 25 +++++++++++++++++++++++++ 4 files changed, 29 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/mesa/drivers/dri/radeon/radeon_common.c b/src/mesa/drivers/dri/radeon/radeon_common.c index 8032cbcd69..5b2bcfdb24 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common.c +++ b/src/mesa/drivers/dri/radeon/radeon_common.c @@ -262,29 +262,6 @@ void radeonScissor(GLcontext* ctx, GLint x, GLint y, GLsizei w, GLsizei h) } } -void radeonPolygonStipplePreKMS( GLcontext *ctx, const GLubyte *mask ) -{ - radeonContextPtr radeon = RADEON_CONTEXT(ctx); - GLuint i; - drm_radeon_stipple_t stipple; - - /* Must flip pattern upside down. - */ - for ( i = 0 ; i < 32 ; i++ ) { - stipple.mask[31 - i] = ((GLuint *) mask)[i]; - } - - /* TODO: push this into cmd mechanism - */ - radeon_firevertices(radeon); - LOCK_HARDWARE( radeon ); - - drmCommandWrite( radeon->dri.fd, DRM_RADEON_STIPPLE, - &stipple, sizeof(stipple) ); - UNLOCK_HARDWARE( radeon ); -} - - /* ================================================================ * SwapBuffers with client-side throttling */ diff --git a/src/mesa/drivers/dri/radeon/radeon_common.h b/src/mesa/drivers/dri/radeon/radeon_common.h index f3201911ac..a9e1ca49eb 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common.h +++ b/src/mesa/drivers/dri/radeon/radeon_common.h @@ -10,7 +10,6 @@ void radeonRecalcScissorRects(radeonContextPtr radeon); void radeonSetCliprects(radeonContextPtr radeon); void radeonUpdateScissor( GLcontext *ctx ); void radeonScissor(GLcontext* ctx, GLint x, GLint y, GLsizei w, GLsizei h); -void radeonPolygonStipplePreKMS( GLcontext *ctx, const GLubyte *mask ); void radeonWaitForIdleLocked(radeonContextPtr radeon); extern uint32_t radeonGetAge(radeonContextPtr radeon); diff --git a/src/mesa/drivers/dri/radeon/radeon_context.h b/src/mesa/drivers/dri/radeon/radeon_context.h index 4e2c52c835..12ab33a009 100644 --- a/src/mesa/drivers/dri/radeon/radeon_context.h +++ b/src/mesa/drivers/dri/radeon/radeon_context.h @@ -331,8 +331,12 @@ struct r100_hw_state { struct radeon_state_atom stp; }; +struct radeon_stipple_state { + GLuint mask[32]; +}; struct r100_state { + struct radeon_stipple_state stipple; struct radeon_texture_state texture; }; diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c index 4d0d35ee0c..f6c733ab20 100644 --- a/src/mesa/drivers/dri/radeon/radeon_state.c +++ b/src/mesa/drivers/dri/radeon/radeon_state.c @@ -550,6 +550,31 @@ static void radeonPolygonOffset( GLcontext *ctx, rmesa->hw.zbs.cmd[ZBS_SE_ZBIAS_CONSTANT] = constant.ui32; } +static void radeonPolygonStipplePreKMS( GLcontext *ctx, const GLubyte *mask ) +{ + r100ContextPtr rmesa = R100_CONTEXT(ctx); + GLuint i; + drm_radeon_stipple_t stipple; + + /* Must flip pattern upside down. + */ + for ( i = 0 ; i < 32 ; i++ ) { + rmesa->state.stipple.mask[31 - i] = ((GLuint *) mask)[i]; + } + + /* TODO: push this into cmd mechanism + */ + radeon_firevertices(&rmesa->radeon); + LOCK_HARDWARE( &rmesa->radeon ); + + /* FIXME: Use window x,y offsets into stipple RAM. + */ + stipple.mask = rmesa->state.stipple.mask; + drmCommandWrite( rmesa->radeon.dri.fd, DRM_RADEON_STIPPLE, + &stipple, sizeof(drm_radeon_stipple_t) ); + UNLOCK_HARDWARE( &rmesa->radeon ); +} + static void radeonPolygonMode( GLcontext *ctx, GLenum face, GLenum mode ) { r100ContextPtr rmesa = R100_CONTEXT(ctx); -- cgit v1.2.3 From 225bc70b77fcf107dd8abc93be27a15c27743071 Mon Sep 17 00:00:00 2001 From: Coleman Kane Date: Fri, 4 Dec 2009 08:44:57 -0700 Subject: r300g: use $(MAKE) variable Fixes bug 24501 --- src/gallium/drivers/r300/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/gallium/drivers/r300/Makefile b/src/gallium/drivers/r300/Makefile index d7a2c8c462..8d0c6e33bb 100644 --- a/src/gallium/drivers/r300/Makefile +++ b/src/gallium/drivers/r300/Makefile @@ -38,4 +38,4 @@ include ../../Makefile.template .PHONY : $(COMPILER_ARCHIVE) $(COMPILER_ARCHIVE): - cd $(TOP)/src/mesa/drivers/dri/r300/compiler; make + $(MAKE) -C $(TOP)/src/mesa/drivers/dri/r300/compiler -- cgit v1.2.3 From fe8e18bcd41a19282ba92350a04a34866fda1d7b Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 28 Nov 2009 22:04:06 -0500 Subject: mesa: Fix array out-of-bounds access in _mesa_TexEnvf. _mesa_TexEnvf calls _mesa_TexEnvfv, which uses the param argument as an array. (cherry picked from commit a11d60d14caf8efc07f70af63b57b33273f8cf9b) --- src/mesa/main/texenv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/main/texenv.c b/src/mesa/main/texenv.c index 6d86a4275c..4442fb8cf8 100644 --- a/src/mesa/main/texenv.c +++ b/src/mesa/main/texenv.c @@ -598,7 +598,10 @@ _mesa_TexEnvfv( GLenum target, GLenum pname, const GLfloat *param ) void GLAPIENTRY _mesa_TexEnvf( GLenum target, GLenum pname, GLfloat param ) { - _mesa_TexEnvfv( target, pname, ¶m ); + GLfloat p[4]; + p[0] = param; + p[1] = p[2] = p[3] = 0.0; + _mesa_TexEnvfv( target, pname, p ); } -- cgit v1.2.3 From 4071d065c2c32a872bb148d108252a2380c42da4 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 29 Nov 2009 18:18:23 -0500 Subject: mesa: Fix array out-of-bounds access by _mesa_TexParameterf. _mesa_TexParameterf calls set_tex_parameteri, which uses the params argument as an array. (cherry picked from commit a201dfb6bf28b89d6f511c2ec9ae0d81ef18511d) --- src/mesa/main/texparam.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 9d1fdd0566..416792f0e9 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -544,8 +544,10 @@ _mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param) case GL_DEPTH_TEXTURE_MODE_ARB: { /* convert float param to int */ - GLint p = (GLint) param; - need_update = set_tex_parameteri(ctx, texObj, pname, &p); + GLint p[4]; + p[0] = (GLint) param; + p[1] = p[2] = p[3] = 0; + need_update = set_tex_parameteri(ctx, texObj, pname, p); } break; default: -- cgit v1.2.3 From ca8a2150c79899bad0f80e132656863822db045e Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 29 Nov 2009 21:17:44 -0500 Subject: mesa: Fix array out-of-bounds access by _mesa_TexParameterf. _mesa_TexParameterf calls set_tex_parameterf, which uses the params argument as an array. (cherry picked from commit 270d36da146b899d39e08f830fe34b63833a3731) --- src/mesa/main/texparam.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 416792f0e9..4ce8c8593a 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -551,8 +551,13 @@ _mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param) } break; default: - /* this will generate an error if pname is illegal */ - need_update = set_tex_parameterf(ctx, texObj, pname, ¶m); + { + /* this will generate an error if pname is illegal */ + GLfloat p[4]; + p[0] = param; + p[1] = p[2] = p[3] = 0.0F; + need_update = set_tex_parameterf(ctx, texObj, pname, p); + } } if (ctx->Driver.TexParameter && need_update) { -- cgit v1.2.3 From d74cd04e6190ebb3a9c53d45cbb2452d92e24ad5 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 28 Nov 2009 23:47:23 -0500 Subject: mesa: Fix array out-of-bounds access by _mesa_TexGeni. _mesa_TexGeni calls _mesa_TexGeniv, which uses the params argument as an array. (cherry picked from commit d55fb7c835b56951f05a058083e7eda264ba192e) --- src/mesa/main/texgen.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/main/texgen.c b/src/mesa/main/texgen.c index e3feb024c3..13b33745b8 100644 --- a/src/mesa/main/texgen.c +++ b/src/mesa/main/texgen.c @@ -213,7 +213,10 @@ _mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param ) void GLAPIENTRY _mesa_TexGeni( GLenum coord, GLenum pname, GLint param ) { - _mesa_TexGeniv( coord, pname, ¶m ); + GLint p[4]; + p[0] = param; + p[1] = p[2] = p[3] = 0; + _mesa_TexGeniv( coord, pname, p ); } -- cgit v1.2.3 From b2953ee1a655a010f36b5fc1b47f8bd8b06ce368 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 29 Nov 2009 00:50:48 -0500 Subject: mesa: Fix array out-of-bounds access by _mesa_TexGenf. _mesa_TexGenf calls _mesa_TexGenfv, which uses the params argument as an array. (cherry picked from commit ca5a7aadb4361e7d053aea8687372cd44cbd8795) --- src/mesa/main/texgen.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/main/texgen.c b/src/mesa/main/texgen.c index 13b33745b8..d3ea7b936b 100644 --- a/src/mesa/main/texgen.c +++ b/src/mesa/main/texgen.c @@ -206,7 +206,10 @@ _mesa_TexGendv(GLenum coord, GLenum pname, const GLdouble *params ) void GLAPIENTRY _mesa_TexGenf( GLenum coord, GLenum pname, GLfloat param ) { - _mesa_TexGenfv(coord, pname, ¶m); + GLfloat p[4]; + p[0] = param; + p[1] = p[2] = p[3] = 0.0F; + _mesa_TexGenfv(coord, pname, p); } -- cgit v1.2.3 From 3cd745515e72c42efcd0c9f7d30e58f46f821b98 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Fri, 20 Nov 2009 16:03:48 -0800 Subject: draw: Initialize variable in draw_pt.c. (cherry picked from commit ea98e9820d7117f7a187f355445796b1ef5d9e0c) --- src/gallium/auxiliary/draw/draw_pt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c index dbb5ac7182..4865a2d854 100644 --- a/src/gallium/auxiliary/draw/draw_pt.c +++ b/src/gallium/auxiliary/draw/draw_pt.c @@ -192,7 +192,8 @@ draw_print_arrays(struct draw_context *draw, uint prim, int start, uint count) prim, start, count); for (i = 0; i < count; i++) { - uint ii, j; + uint ii = 0; + uint j; if (draw->pt.user.elts) { /* indexed arrays */ -- cgit v1.2.3 From 76b3523d752968bc552d4350a39b9b9b1a023cf0 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Mon, 23 Nov 2009 01:30:32 -0500 Subject: glx: Prevent potential null pointer deference in driCreateContext. (cherry picked from commit 4b0b250aae6ae7d48cd24f9d91d05ab58086c4b2) --- src/glx/x11/drisw_glx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/glx/x11/drisw_glx.c b/src/glx/x11/drisw_glx.c index 15e1586658..1866b2cc87 100644 --- a/src/glx/x11/drisw_glx.c +++ b/src/glx/x11/drisw_glx.c @@ -250,12 +250,14 @@ driCreateContext(__GLXscreenConfigs * psc, { __GLXDRIcontextPrivate *pcp, *pcp_shared; __GLXDRIconfigPrivate *config = (__GLXDRIconfigPrivate *) mode; - const __DRIcoreExtension *core = psc->core; + const __DRIcoreExtension *core; __DRIcontext *shared = NULL; if (!psc || !psc->driScreen) return NULL; + core = psc->core; + if (shareList) { pcp_shared = (__GLXDRIcontextPrivate *) shareList->driContext; shared = pcp_shared->driContext; -- cgit v1.2.3 From f622b649fb0c55b1640997f9d32ea327743519a1 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 24 Nov 2009 00:57:55 -0500 Subject: dri: Fix potential null pointer deference in dri_put_drawable. (cherry picked from commit 364070b1f2b08d43fb205ec198894a35bec6b2f3) --- src/mesa/drivers/dri/common/dri_util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index e48e10d7c0..439f66a7b8 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -498,11 +498,11 @@ static void dri_put_drawable(__DRIdrawable *pdp) { __DRIscreenPrivate *psp; - pdp->refcount--; - if (pdp->refcount) - return; - if (pdp) { + pdp->refcount--; + if (pdp->refcount) + return; + psp = pdp->driScreenPriv; (*psp->DriverAPI.DestroyBuffer)(pdp); if (pdp->pClipRects) { -- cgit v1.2.3 From c994f08eb1ec2a4bbaa44fbd6d35e7ff033d5c3c Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sat, 28 Nov 2009 23:22:31 -0500 Subject: dri: Fix potential null pointer dereference in driBindContext. (cherry picked from commit 919898e92fa23ff71a59d86a46ff0886a6f34e4d) --- src/mesa/drivers/dri/common/dri_util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c index 439f66a7b8..da81ec9de5 100644 --- a/src/mesa/drivers/dri/common/dri_util.c +++ b/src/mesa/drivers/dri/common/dri_util.c @@ -167,11 +167,12 @@ static int driBindContext(__DRIcontext *pcp, __DRIdrawable *pdp, __DRIdrawable *prp) { - __DRIscreenPrivate *psp = pcp->driScreenPriv; + __DRIscreenPrivate *psp; /* Bind the drawable to the context */ if (pcp) { + psp = pcp->driScreenPriv; pcp->driDrawablePriv = pdp; pcp->driReadablePriv = prp; if (pdp) { -- cgit v1.2.3 From 7005f7cd1a9947e75bf772897d9055e3fe467c3d Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Fri, 20 Nov 2009 16:33:25 -0800 Subject: st/egl: Fix memory leak in egl_tracker.c. (cherry picked from commit 052b127842af3372fd768eae8e29b240a696a12a) --- src/gallium/state_trackers/egl/egl_tracker.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/gallium/state_trackers/egl/egl_tracker.c b/src/gallium/state_trackers/egl/egl_tracker.c index 5140755001..4548b4fd27 100644 --- a/src/gallium/state_trackers/egl/egl_tracker.c +++ b/src/gallium/state_trackers/egl/egl_tracker.c @@ -85,11 +85,11 @@ drm_get_device_id(struct drm_device *device) } ret = fgets(path, sizeof( path ), file); + fclose(file); if (!ret) return; sscanf(path, "%x", &device->deviceID); - fclose(file); } static void -- cgit v1.2.3 From 9dbd47fc6b1cf9ddfb318f2e05df0886cd5fe0df Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 7 Dec 2009 16:59:59 -0800 Subject: mesa: set version string to 7.6.1-rc3 --- src/mesa/main/version.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h index e2fed57080..8a2013229a 100644 --- a/src/mesa/main/version.h +++ b/src/mesa/main/version.h @@ -32,7 +32,7 @@ #define MESA_MAJOR 7 #define MESA_MINOR 6 #define MESA_PATCH 1 -#define MESA_VERSION_STRING "7.6.1-rc2" +#define MESA_VERSION_STRING "7.6.1-rc3" /* To make version comparison easy */ #define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) -- cgit v1.2.3