From 5e9cb42aa662022c63563b4bc7f9e1d99f6d81ee Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 10 Oct 2008 09:43:15 -0700 Subject: i965: Add missing intel_pixel_draw.c symlink to fix build. --- src/mesa/drivers/dri/i965/intel_pixel_draw.c | 1 + 1 file changed, 1 insertion(+) create mode 120000 src/mesa/drivers/dri/i965/intel_pixel_draw.c (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/intel_pixel_draw.c b/src/mesa/drivers/dri/i965/intel_pixel_draw.c new file mode 120000 index 0000000000..8431a24edf --- /dev/null +++ b/src/mesa/drivers/dri/i965/intel_pixel_draw.c @@ -0,0 +1 @@ +../intel/intel_pixel_draw.c \ No newline at end of file -- cgit v1.2.3 From e7002694418cd0decb1cd0d9121f634480e5f0d6 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 10 Oct 2008 11:47:43 -0700 Subject: intel: GLSL 1.20 is broken in Mesa, so disable it in the i965 driver --- src/mesa/drivers/dri/intel/intel_context.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c index e6c0d3175e..2b3a9b9d37 100644 --- a/src/mesa/drivers/dri/intel/intel_context.c +++ b/src/mesa/drivers/dri/intel/intel_context.c @@ -398,7 +398,11 @@ static const struct dri_extension brw_extensions[] = { { "GL_ARB_point_sprite", NULL }, { "GL_ARB_shader_objects", GL_ARB_shader_objects_functions }, { "GL_ARB_shading_language_100", GL_VERSION_2_0_functions }, +#if 0 + /* Support for GLSL 1.20 is currently broken in core Mesa. + */ { "GL_ARB_shading_language_120", GL_VERSION_2_1_functions }, +#endif { "GL_ARB_shadow", NULL }, { "GL_ARB_texture_non_power_of_two", NULL }, { "GL_ARB_vertex_shader", GL_ARB_vertex_shader_functions }, -- cgit v1.2.3 From f63594bfef883fa9e15ab7f3f69affe4901353aa Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 10 Oct 2008 16:21:52 -0600 Subject: mesa: remove unneeded includes --- src/mesa/main/api_loopback.c | 1 - src/mesa/main/dlist.c | 1 - 2 files changed, 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/api_loopback.c b/src/mesa/main/api_loopback.c index 924d7134a2..0e3f5ff957 100644 --- a/src/mesa/main/api_loopback.c +++ b/src/mesa/main/api_loopback.c @@ -31,7 +31,6 @@ #include "glheader.h" #include "macros.h" -#include "colormac.h" #include "api_loopback.h" #include "mtypes.h" #include "glapi/glapi.h" diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c index f7660930a9..c7db435506 100644 --- a/src/mesa/main/dlist.c +++ b/src/mesa/main/dlist.c @@ -41,7 +41,6 @@ #endif #include "arrayobj.h" #include "clip.h" -#include "colormac.h" #include "colortab.h" #include "context.h" #include "convolve.h" -- cgit v1.2.3 From 3210a6d6c7e3d5660d31f6c736e0d0f7e34bcf6d Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 10 Oct 2008 16:23:31 -0600 Subject: mesa: rename macro params to emphasize that there's no particular color ordering --- src/mesa/main/colormac.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/colormac.h b/src/mesa/main/colormac.h index a19521fc85..a34bd2ed38 100644 --- a/src/mesa/main/colormac.h +++ b/src/mesa/main/colormac.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.1 + * Version: 7.3 * - * Copyright (C) 1999-2004 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -180,20 +180,20 @@ do { \ */ /*@{*/ -#define PACK_COLOR_8888( R, G, B, A ) \ - (((R) << 24) | ((G) << 16) | ((B) << 8) | (A)) +#define PACK_COLOR_8888( X, Y, Z, W ) \ + (((X) << 24) | ((Y) << 16) | ((Z) << 8) | (W)) -#define PACK_COLOR_8888_REV( R, G, B, A ) \ - (((A) << 24) | ((B) << 16) | ((G) << 8) | (R)) +#define PACK_COLOR_8888_REV( X, Y, Z, W ) \ + (((W) << 24) | ((Z) << 16) | ((Y) << 8) | (X)) -#define PACK_COLOR_888( R, G, B ) \ - (((R) << 16) | ((G) << 8) | (B)) +#define PACK_COLOR_888( X, Y, Z ) \ + (((X) << 16) | ((Y) << 8) | (Z)) -#define PACK_COLOR_565( R, G, B ) \ - ((((R) & 0xf8) << 8) | (((G) & 0xfc) << 3) | (((B) & 0xf8) >> 3)) +#define PACK_COLOR_565( X, Y, Z ) \ + ((((X) & 0xf8) << 8) | (((Y) & 0xfc) << 3) | (((Z) & 0xf8) >> 3)) -#define PACK_COLOR_565_REV( R, G, B ) \ - (((R) & 0xf8) | ((G) & 0xe0) >> 5 | (((G) & 0x1c) << 11) | (((B) & 0xf8) << 5)) +#define PACK_COLOR_565_REV( X, Y, Z ) \ + (((X) & 0xf8) | ((Y) & 0xe0) >> 5 | (((Y) & 0x1c) << 11) | (((Z) & 0xf8) << 5)) #define PACK_COLOR_1555( A, B, G, R ) \ ((((B) & 0xf8) << 7) | (((G) & 0xf8) << 2) | (((R) & 0xf8) >> 3) | \ -- cgit v1.2.3 From 85a3bf6dabc8b2d545dab078516fdfee9c4cd792 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 10 Oct 2008 16:26:15 -0600 Subject: mesa: fix error codes in _mesa_GetObjectParameterivARB(), bug 17861 --- src/mesa/main/shaders.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/mesa') diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c index aeb5d4ca2a..e5c54bb10d 100644 --- a/src/mesa/main/shaders.c +++ b/src/mesa/main/shaders.c @@ -247,7 +247,18 @@ _mesa_GetObjectParameterivARB(GLhandleARB object, GLenum pname, GLint *params) } } else { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetObjectParameterivARB"); + /* error code depends on pname */ + GLenum err; + switch (pname) { + case GL_OBJECT_TYPE_ARB: + case GL_OBJECT_DELETE_STATUS_ARB: + case GL_OBJECT_INFO_LOG_LENGTH_ARB: + err = GL_INVALID_OPERATION; + break; + default: + err = GL_INVALID_VALUE; + } + _mesa_error(ctx, err, "glGetObjectParameterivARB"); } } -- cgit v1.2.3 From f863ae1a040c358728d8608531ae3eb695f3af9e Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 10 Oct 2008 16:29:54 -0600 Subject: mesa: remove unneeded includes --- src/mesa/main/blend.c | 1 - src/mesa/main/getstring.c | 1 - 2 files changed, 2 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/blend.c b/src/mesa/main/blend.c index 4d4a897141..39cf6153e2 100644 --- a/src/mesa/main/blend.c +++ b/src/mesa/main/blend.c @@ -31,7 +31,6 @@ #include "glheader.h" #include "blend.h" -#include "colormac.h" #include "context.h" #include "enums.h" #include "macros.h" diff --git a/src/mesa/main/getstring.c b/src/mesa/main/getstring.c index 1a82ccce59..94bf5de1e8 100644 --- a/src/mesa/main/getstring.c +++ b/src/mesa/main/getstring.c @@ -25,7 +25,6 @@ #include "glheader.h" -#include "colormac.h" #include "context.h" #include "get.h" #include "version.h" -- cgit v1.2.3 From bf9d9a9d01b7697f4a30305cb9574430cba351fa Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 10 Oct 2008 16:30:18 -0600 Subject: mesa: include needed header --- src/mesa/swrast/s_texcombine.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa') diff --git a/src/mesa/swrast/s_texcombine.c b/src/mesa/swrast/s_texcombine.c index 4e3d329075..632d650007 100644 --- a/src/mesa/swrast/s_texcombine.c +++ b/src/mesa/swrast/s_texcombine.c @@ -26,6 +26,7 @@ #include "main/glheader.h" #include "main/context.h" #include "main/colormac.h" +#include "main/image.h" #include "main/imports.h" #include "main/macros.h" #include "main/pixel.h" -- cgit v1.2.3 From 24748268a3ac7bedc2c9ae5bf76c4c741d539f80 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 10 Oct 2008 16:30:43 -0600 Subject: mesa: fix asst. issues in _mesa_texstore_argb8888() If we shift bytes into the texel word (or use the PACK_COLOR_8888 macro), we don't have to worry about big vs. little endian. See comments about texel formats in texformat.h. Remove an unneeded/incorrect else-if clause that produced wrong results on big-endian systems. --- src/mesa/main/texstore.c | 50 ++++++++++-------------------------------------- 1 file changed, 10 insertions(+), 40 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c index 56f5b2ebaa..75b14c2bf0 100644 --- a/src/mesa/main/texstore.c +++ b/src/mesa/main/texstore.c @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 7.1 + * Version: 7.3 * * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. * @@ -1536,10 +1536,10 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS) for (row = 0; row < srcHeight; row++) { GLuint *d4 = (GLuint *) dstRow; for (col = 0; col < srcWidth; col++) { - d4[col] = ((0xff << 24) | - (srcRow[col * 3 + RCOMP] << 16) | - (srcRow[col * 3 + GCOMP] << 8) | - (srcRow[col * 3 + BCOMP] << 0)); + d4[col] = PACK_COLOR_8888(0xff, + srcRow[col * 3 + RCOMP], + srcRow[col * 3 + GCOMP], + srcRow[col * 3 + BCOMP]); } dstRow += dstRowStride; srcRow += srcRowStride; @@ -1551,8 +1551,7 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS) dstFormat == &_mesa_texformat_argb8888 && srcFormat == GL_RGBA && baseInternalFormat == GL_RGBA && - srcType == GL_UNSIGNED_BYTE && - littleEndian) { + srcType == GL_UNSIGNED_BYTE) { /* same as above case, but src data has alpha too */ GLint img, row, col; /* For some reason, streaming copies to write-combined regions @@ -1573,39 +1572,10 @@ _mesa_texstore_argb8888(TEXSTORE_PARAMS) for (row = 0; row < srcHeight; row++) { GLuint *d4 = (GLuint *) dstRow; for (col = 0; col < srcWidth; col++) { - d4[col] = ((srcRow[col * 4 + ACOMP] << 24) | - (srcRow[col * 4 + RCOMP] << 16) | - (srcRow[col * 4 + GCOMP] << 8) | - (srcRow[col * 4 + BCOMP] << 0)); - } - dstRow += dstRowStride; - srcRow += srcRowStride; - } - } - } - else if (!ctx->_ImageTransferState && - !srcPacking->SwapBytes && - dstFormat == &_mesa_texformat_argb8888 && - srcFormat == GL_RGBA && - baseInternalFormat == GL_RGBA && - srcType == GL_UNSIGNED_BYTE) { - - GLint img, row, col; - for (img = 0; img < srcDepth; img++) { - const GLint srcRowStride = _mesa_image_row_stride(srcPacking, - srcWidth, srcFormat, srcType); - GLubyte *srcRow = (GLubyte *) _mesa_image_address(dims, srcPacking, - srcAddr, srcWidth, srcHeight, srcFormat, srcType, img, 0, 0); - GLubyte *dstRow = (GLubyte *) dstAddr - + dstImageOffsets[dstZoffset + img] * dstFormat->TexelBytes - + dstYoffset * dstRowStride - + dstXoffset * dstFormat->TexelBytes; - for (row = 0; row < srcHeight; row++) { - for (col = 0; col < srcWidth; col++) { - dstRow[col * 4 + 0] = srcRow[col * 4 + BCOMP]; - dstRow[col * 4 + 1] = srcRow[col * 4 + GCOMP]; - dstRow[col * 4 + 2] = srcRow[col * 4 + RCOMP]; - dstRow[col * 4 + 3] = srcRow[col * 4 + ACOMP]; + d4[col] = PACK_COLOR_8888(srcRow[col * 4 + ACOMP], + srcRow[col * 4 + RCOMP], + srcRow[col * 4 + GCOMP], + srcRow[col * 4 + BCOMP]); } dstRow += dstRowStride; srcRow += srcRowStride; -- cgit v1.2.3