From 1d1f81af93058541992bd0795b86500509edea56 Mon Sep 17 00:00:00 2001 From: Maciej Cencora Date: Sat, 21 Nov 2009 15:56:02 +0100 Subject: [PATCH 01/15] radeon: fix glCompressedTexSubImage --- src/mesa/drivers/dri/radeon/radeon_texture.c | 22 +++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/mesa/drivers/dri/radeon/radeon_texture.c b/src/mesa/drivers/dri/radeon/radeon_texture.c index 6f11f1fa4ab..1ee9e2792a5 100644 --- a/src/mesa/drivers/dri/radeon/radeon_texture.c +++ b/src/mesa/drivers/dri/radeon/radeon_texture.c @@ -582,12 +582,12 @@ static void radeon_store_teximage(GLcontext* ctx, int dims, /* TODO */ assert(0); } else { - dstRowStride = _mesa_format_row_stride(texImage->TexFormat, width); + dstRowStride = _mesa_format_row_stride(texImage->TexFormat, texImage->Width); } if (dims == 3) { unsigned alignedWidth = dstRowStride/_mesa_get_format_bytes(texImage->TexFormat); - dstImageOffsets = allocate_image_offsets(ctx, alignedWidth, height, depth); + dstImageOffsets = allocate_image_offsets(ctx, alignedWidth, texImage->Height, texImage->Depth); if (!dstImageOffsets) { return; } @@ -598,8 +598,11 @@ static void radeon_store_teximage(GLcontext* ctx, int dims, radeon_teximage_map(image, GL_TRUE); if (compressed) { - uint32_t srcRowStride, bytesPerRow, rows; + uint32_t srcRowStride, bytesPerRow, rows, block_width, block_height; GLubyte *img_start; + + _mesa_get_format_block_size(texImage->TexFormat, &block_width, &block_height); + if (!image->mt) { dstRowStride = _mesa_format_row_stride(texImage->TexFormat, texImage->Width); img_start = _mesa_compressed_image_address(xoffset, yoffset, 0, @@ -607,17 +610,16 @@ static void radeon_store_teximage(GLcontext* ctx, int dims, texImage->Width, texImage->Data); } else { - uint32_t blocks_x, block_width, block_height; - _mesa_get_format_block_size(image->mt->mesaFormat, &block_width, &block_height); - blocks_x = dstRowStride / block_width; - img_start = texImage->Data + _mesa_get_format_bytes(image->mt->mesaFormat) * 4 * (blocks_x * (yoffset / 4) + xoffset / 4); + uint32_t offset; + offset = dstRowStride / _mesa_get_format_bytes(texImage->TexFormat) * yoffset / block_height + xoffset / block_width; + offset *= _mesa_get_format_bytes(texImage->TexFormat); + img_start = texImage->Data + offset; } srcRowStride = _mesa_format_row_stride(texImage->TexFormat, width); bytesPerRow = srcRowStride; - rows = (height + 3) / 4; - - copy_rows(img_start, dstRowStride, pixels, srcRowStride, rows, bytesPerRow); + rows = (height + block_height - 1) / block_height; + copy_rows(img_start, dstRowStride, pixels, srcRowStride, rows, bytesPerRow); } else { if (!_mesa_texstore(ctx, dims, texImage->_BaseFormat, From 563fe6e8f6c021ea45120cb1f201a1950b8d6057 Mon Sep 17 00:00:00 2001 From: Maciej Cencora Date: Sat, 21 Nov 2009 15:56:23 +0100 Subject: [PATCH 02/15] radeon: fix compressed mipmapped textures Tested on r300 only, other cards may require adjusting texture_compressed_row_align. --- .../dri/radeon/radeon_common_context.c | 2 +- .../drivers/dri/radeon/radeon_mipmap_tree.c | 47 +++++++++++-------- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/src/mesa/drivers/dri/radeon/radeon_common_context.c b/src/mesa/drivers/dri/radeon/radeon_common_context.c index 2a38c4599c6..71f70d724b9 100644 --- a/src/mesa/drivers/dri/radeon/radeon_common_context.c +++ b/src/mesa/drivers/dri/radeon/radeon_common_context.c @@ -262,7 +262,7 @@ GLboolean radeonInitContext(radeonContextPtr radeon, else radeon->texture_row_align = 32; radeon->texture_rect_row_align = 64; - radeon->texture_compressed_row_align = 64; + radeon->texture_compressed_row_align = 32; } radeon_init_dma(radeon); diff --git a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c index 0497fa7db50..a11b5b99799 100644 --- a/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c +++ b/src/mesa/drivers/dri/radeon/radeon_mipmap_tree.c @@ -37,26 +37,35 @@ #include "main/texobj.h" #include "radeon_texture.h" -static GLuint radeon_compressed_texture_size(GLcontext *ctx, - GLsizei width, GLsizei height, GLsizei depth, - gl_format mesaFormat) +static unsigned get_aligned_compressed_row_stride( + gl_format format, + unsigned width, + unsigned minStride) { - GLuint size = _mesa_format_image_size(mesaFormat, width, height, depth); + const unsigned blockSize = _mesa_get_format_bytes(format); + unsigned blockWidth, blockHeight, numXBlocks; - if (mesaFormat == MESA_FORMAT_RGB_DXT1 || - mesaFormat == MESA_FORMAT_RGBA_DXT1) { - if (width + 3 < 8) /* width one block */ - size = size * 4; - else if (width + 3 < 16) - size = size * 2; - } else { - /* DXT3/5, 16 bytes per block */ - // WARN_ONCE("DXT 3/5 suffers from multitexturing problems!\n"); - if (width + 3 < 8) - size = size * 2; + _mesa_get_format_block_size(format, &blockWidth, &blockHeight); + numXBlocks = (width + blockWidth - 1) / blockWidth; + + while (numXBlocks * blockSize < minStride) + { + ++numXBlocks; } - return size; + return numXBlocks * blockSize; +} + +static unsigned get_compressed_image_size( + gl_format format, + unsigned rowStride, + unsigned height) +{ + unsigned blockWidth, blockHeight; + + _mesa_get_format_block_size(format, &blockWidth, &blockHeight); + + return rowStride * ((height + blockHeight - 1) / blockHeight); } /** @@ -74,10 +83,8 @@ static void compute_tex_image_offset(radeonContextPtr rmesa, radeon_mipmap_tree /* Find image size in bytes */ if (_mesa_is_format_compressed(mt->mesaFormat)) { - /* TODO: Is this correct? Need test cases for compressed textures! */ - row_align = rmesa->texture_compressed_row_align - 1; - lvl->rowstride = (_mesa_format_row_stride(mt->mesaFormat, lvl->width) + row_align) & ~row_align; - lvl->size = radeon_compressed_texture_size(rmesa->glCtx, lvl->width, lvl->height, lvl->depth, mt->mesaFormat); + lvl->rowstride = get_aligned_compressed_row_stride(mt->mesaFormat, lvl->width, rmesa->texture_compressed_row_align); + lvl->size = get_compressed_image_size(mt->mesaFormat, lvl->rowstride, lvl->height); } else if (mt->target == GL_TEXTURE_RECTANGLE_NV) { row_align = rmesa->texture_rect_row_align - 1; lvl->rowstride = (_mesa_format_row_stride(mt->mesaFormat, lvl->width) + row_align) & ~row_align; From 46feb7db71b05ec67a7c78f6bc608adec0734dec Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 22 Nov 2009 00:55:52 -0500 Subject: [PATCH 03/15] st/xorg: Reorder cases in switch statement. Silences missing break statement warning. --- src/gallium/state_trackers/xorg/xorg_composite.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/xorg/xorg_composite.c b/src/gallium/state_trackers/xorg/xorg_composite.c index eed7a7d63a5..4dbb490ca51 100644 --- a/src/gallium/state_trackers/xorg/xorg_composite.c +++ b/src/gallium/state_trackers/xorg/xorg_composite.c @@ -151,9 +151,11 @@ render_filter_to_gallium(int xrender_filter, int *out_filter) case PictFilterBest: *out_filter = PIPE_TEX_FILTER_LINEAR; break; + case PictFilterConvolution: + *out_filter = PIPE_TEX_FILTER_NEAREST; + return FALSE; default: debug_printf("Unknown xrender filter\n"); - case PictFilterConvolution: *out_filter = PIPE_TEX_FILTER_NEAREST; return FALSE; } From 88aab56a26dd33a2d3177a41420f00473d7270af Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 22 Nov 2009 01:10:38 -0500 Subject: [PATCH 04/15] st/xorg: Prevent potential null pointer deference in xorg_xv.c. --- src/gallium/state_trackers/xorg/xorg_xv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/xorg/xorg_xv.c b/src/gallium/state_trackers/xorg/xorg_xv.c index a1e74fad598..e7f4900528d 100644 --- a/src/gallium/state_trackers/xorg/xorg_xv.c +++ b/src/gallium/state_trackers/xorg/xorg_xv.c @@ -446,7 +446,7 @@ display_video(ScrnInfoPtr pScrn, struct xorg_xv_port_priv *pPriv, int id, int x, y, w, h; struct exa_pixmap_priv *dst = exaGetPixmapDriverPrivate(pPixmap); - if (!dst->tex) { + if (dst && !dst->tex) { xorg_exa_set_shared_usage(pPixmap); pScrn->pScreen->ModifyPixmapHeader(pPixmap, 0, 0, 0, 0, 0, NULL); } From b62a74d3b94024bc08b31394f827761d354d2516 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 22 Nov 2009 01:20:07 -0500 Subject: [PATCH 05/15] svga: Fix memory leak in vmw_screen_ioctl.c --- src/gallium/winsys/drm/vmware/core/vmw_screen_ioctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/winsys/drm/vmware/core/vmw_screen_ioctl.c b/src/gallium/winsys/drm/vmware/core/vmw_screen_ioctl.c index b3515732a21..51e455f9254 100644 --- a/src/gallium/winsys/drm/vmware/core/vmw_screen_ioctl.c +++ b/src/gallium/winsys/drm/vmware/core/vmw_screen_ioctl.c @@ -331,6 +331,7 @@ vmw_ioctl_region_create(struct vmw_winsys_screen *vws, uint32_t size) return region; out_err1: + FREE(region); return NULL; } From 57d389aab5ea4462475756c0e262f3cb543f889d Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 22 Nov 2009 01:26:32 -0500 Subject: [PATCH 06/15] svga: Prevent potential null pointer deference in vmw_surface.c. --- src/gallium/winsys/drm/vmware/core/vmw_surface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/winsys/drm/vmware/core/vmw_surface.c b/src/gallium/winsys/drm/vmware/core/vmw_surface.c index 9ec4bf92726..c19e556df9f 100644 --- a/src/gallium/winsys/drm/vmware/core/vmw_surface.c +++ b/src/gallium/winsys/drm/vmware/core/vmw_surface.c @@ -39,7 +39,7 @@ vmw_svga_winsys_surface_reference(struct vmw_svga_winsys_surface **pdst, struct pipe_reference *dst_ref; struct vmw_svga_winsys_surface *dst = *pdst; - if(*pdst == src || pdst == NULL) + if(pdst == NULL || *pdst == src) return; src_ref = src ? &src->refcnt : NULL; From d3b4c99c703f70a9d0e715a97e52672f7f8fc980 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 22 Nov 2009 01:45:53 -0500 Subject: [PATCH 07/15] glu: Fix memory leak in __gl_meshMakeEdge. --- src/glu/sgi/libtess/mesh.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/glu/sgi/libtess/mesh.c b/src/glu/sgi/libtess/mesh.c index ae861f86428..95f87cdc949 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 ); From a9c540f5dedbf593f8038fdbc95eecb60826ab26 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Sun, 22 Nov 2009 01:57:35 -0500 Subject: [PATCH 08/15] glu/sgi: Fix memory leak in gluScaleImage. --- src/glu/sgi/libutil/mipmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/glu/sgi/libutil/mipmap.c b/src/glu/sgi/libutil/mipmap.c index af647af73c9..4139c304a1d 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; } From dfe440c856826450195e3fc5100a3b97d7c0b173 Mon Sep 17 00:00:00 2001 From: Maciej Cencora Date: Sun, 22 Nov 2009 14:13:18 +0100 Subject: [PATCH 09/15] r300: fix SIN/COS/SCS instructions for R300 fp --- .../drivers/dri/r300/compiler/radeon_program_alu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 0326d252339..ced66af1eb5 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c +++ b/src/mesa/drivers/dri/r300/compiler/radeon_program_alu.c @@ -560,23 +560,23 @@ static void sincos_constants(struct radeon_compiler* c, unsigned int *constants) * MAD dest, tmp.y, weight, tmp.x */ static void sin_approx( - struct radeon_compiler* c, struct rc_instruction * before, + struct radeon_compiler* c, struct rc_instruction * inst, struct rc_dst_register dst, struct rc_src_register src, const unsigned int* constants) { unsigned int tempreg = rc_find_free_temporary(c); - emit2(c, before, RC_OPCODE_MUL, 0, dstregtmpmask(tempreg, RC_MASK_XY), + emit2(c, inst->Prev, RC_OPCODE_MUL, 0, dstregtmpmask(tempreg, RC_MASK_XY), swizzle(src, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X), srcreg(RC_FILE_CONSTANT, constants[0])); - emit3(c, before, RC_OPCODE_MAD, 0, dstregtmpmask(tempreg, RC_MASK_X), + emit3(c, inst->Prev, RC_OPCODE_MAD, 0, dstregtmpmask(tempreg, RC_MASK_X), swizzle(srcreg(RC_FILE_TEMPORARY, tempreg), RC_SWIZZLE_Y, RC_SWIZZLE_Y, RC_SWIZZLE_Y, RC_SWIZZLE_Y), absolute(swizzle(src, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X)), swizzle(srcreg(RC_FILE_TEMPORARY, tempreg), RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X)); - emit3(c, before, RC_OPCODE_MAD, 0, dstregtmpmask(tempreg, RC_MASK_Y), + emit3(c, inst->Prev, RC_OPCODE_MAD, 0, dstregtmpmask(tempreg, RC_MASK_Y), swizzle(srcreg(RC_FILE_TEMPORARY, tempreg), RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X), absolute(swizzle(srcreg(RC_FILE_TEMPORARY, tempreg), RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X)), negate(swizzle(srcreg(RC_FILE_TEMPORARY, tempreg), RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X))); - emit3(c, before, RC_OPCODE_MAD, 0, dst, + emit3(c, inst->Prev, RC_OPCODE_MAD, 0, dst, swizzle(srcreg(RC_FILE_TEMPORARY, tempreg), RC_SWIZZLE_Y, RC_SWIZZLE_Y, RC_SWIZZLE_Y, RC_SWIZZLE_Y), swizzle(srcreg(RC_FILE_CONSTANT, constants[0]), RC_SWIZZLE_W, RC_SWIZZLE_W, RC_SWIZZLE_W, RC_SWIZZLE_W), swizzle(srcreg(RC_FILE_TEMPORARY, tempreg), RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X, RC_SWIZZLE_X)); From e0fda040135490fdd54e57000c7995e27dc70657 Mon Sep 17 00:00:00 2001 From: Maciej Cencora Date: Sun, 22 Nov 2009 15:08:46 +0100 Subject: [PATCH 10/15] r300: fix VP source conflict resolution on 64-bit machines On 32bit machines we were lucky because the sizeof(reg) == sizeof(rc_src_register). On 64bit machines pointers are 8 bytes long, so we were overwriting other data. --- src/mesa/drivers/dri/r300/compiler/radeon_program.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/drivers/dri/r300/compiler/radeon_program.h b/src/mesa/drivers/dri/r300/compiler/radeon_program.h index 33db3ea0ff8..03592884eb2 100644 --- a/src/mesa/drivers/dri/r300/compiler/radeon_program.h +++ b/src/mesa/drivers/dri/r300/compiler/radeon_program.h @@ -191,7 +191,7 @@ struct rc_src_register lmul_swizzle(unsigned int swizzle, struct rc_src_register static inline void reset_srcreg(struct rc_src_register* reg) { - memset(reg, 0, sizeof(reg)); + memset(reg, 0, sizeof(struct rc_src_register)); reg->Swizzle = RC_SWIZZLE_XYZW; } From b611f639b4bffdcca376293f7ce71af9f6bdbff3 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Mon, 23 Nov 2009 00:57:37 -0500 Subject: [PATCH 11/15] glu/sgi: Fix memory leak in gluScaleImage3D. --- src/glu/sgi/libutil/mipmap.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/glu/sgi/libutil/mipmap.c b/src/glu/sgi/libutil/mipmap.c index 4139c304a1d..223621f49fc 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); From 5b925b7daa566d799c4f50911a7fcca114131503 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Mon, 23 Nov 2009 01:09:06 -0500 Subject: [PATCH 12/15] glu/sgi: Fix memory leak in bitmapBuild2DMipmaps. --- src/glu/sgi/libutil/mipmap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/glu/sgi/libutil/mipmap.c b/src/glu/sgi/libutil/mipmap.c index 223621f49fc..c5faebd6a35 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; } } From 4b0b250aae6ae7d48cd24f9d91d05ab58086c4b2 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Mon, 23 Nov 2009 01:30:32 -0500 Subject: [PATCH 13/15] glx: Prevent potential null pointer deference in driCreateContext. --- src/glx/x11/drisw_glx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/glx/x11/drisw_glx.c b/src/glx/x11/drisw_glx.c index 15e15866582..1866b2cc870 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; From 67125c7f9aa141a7948ebb915ece9d991bb6ff19 Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Mon, 23 Nov 2009 01:52:59 -0500 Subject: [PATCH 14/15] mesa: Initialize variable in _mesa_get_texel_fetch_func. --- src/mesa/main/texfetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/texfetch.c b/src/mesa/main/texfetch.c index f4f2be48c37..b37039429f4 100644 --- a/src/mesa/main/texfetch.c +++ b/src/mesa/main/texfetch.c @@ -570,7 +570,7 @@ texfetch_funcs[MESA_FORMAT_COUNT] = static FetchTexelFuncF _mesa_get_texel_fetch_func(gl_format format, GLuint dims) { - FetchTexelFuncF f; + FetchTexelFuncF f = NULL; GLuint i; /* XXX replace loop with direct table lookup */ for (i = 0; i < MESA_FORMAT_COUNT; i++) { From 86710c3334850eeaeffcac6d538e01fd5c203167 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Mon, 23 Nov 2009 19:59:02 +0100 Subject: [PATCH 15/15] svga: Scrub Makefiles a bit Remove x86 specific hacks. Not that they will ever be used on none x86 arches, but they are built by default. And the way the flags where added was a hack. --- src/gallium/drivers/svga/Makefile | 8 +------- src/gallium/winsys/drm/vmware/core/Makefile | 14 +------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/src/gallium/drivers/svga/Makefile b/src/gallium/drivers/svga/Makefile index fe1d6d73841..d1413319c97 100644 --- a/src/gallium/drivers/svga/Makefile +++ b/src/gallium/drivers/svga/Makefile @@ -51,13 +51,7 @@ LIBRARY_INCLUDES = \ -I$(TOP)/src/gallium/drivers/svga/include LIBRARY_DEFINES = \ + -std=gnu99 -fvisibility=hidden \ -DHAVE_STDINT_H -DHAVE_SYS_TYPES_H -CC = gcc -fvisibility=hidden -msse -msse2 - -# Set the gnu99 standard to enable anonymous structs in vmware headers. -# -CFLAGS = -Wall -Wmissing-prototypes -std=gnu99 -ffast-math \ - $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) $(ASM_FLAGS) - include ../../Makefile.template diff --git a/src/gallium/winsys/drm/vmware/core/Makefile b/src/gallium/winsys/drm/vmware/core/Makefile index ff8f01b3222..a52957c1a5b 100644 --- a/src/gallium/winsys/drm/vmware/core/Makefile +++ b/src/gallium/winsys/drm/vmware/core/Makefile @@ -28,20 +28,8 @@ LIBRARY_INCLUDES = \ $(shell pkg-config libdrm --cflags-only-I) LIBRARY_DEFINES = \ + -std=gnu99 -fvisibility=hidden \ -DHAVE_STDINT_H -D_FILE_OFFSET_BITS=64 \ $(shell pkg-config libdrm --cflags-only-other) -CC = gcc -fvisibility=hidden -msse -msse2 - -# Set the gnu99 standard to enable anonymous structs in vmware headers. -# -CFLAGS = -Wall -Wmissing-prototypes -std=gnu99 -ffast-math \ - $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) $(ASM_FLAGS) - include ../../../../Makefile.template - - -symlinks: - - -include depend