aboutsummaryrefslogtreecommitdiff
path: root/mesalib
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-18 10:12:07 +0200
committermarha <marha@users.sourceforge.net>2012-07-18 10:12:07 +0200
commit980040093547dc8dd563d8cb9d003aa39737eda4 (patch)
treec85afeb4affd10ee0d6001d18569510ef6488272 /mesalib
parent01102cdf33d68a7be192a139752831ff93dee117 (diff)
parent2ff5448bcca8cba4b62026d5493cb08aaf2838d8 (diff)
downloadvcxsrv-980040093547dc8dd563d8cb9d003aa39737eda4.tar.gz
vcxsrv-980040093547dc8dd563d8cb9d003aa39737eda4.tar.bz2
vcxsrv-980040093547dc8dd563d8cb9d003aa39737eda4.zip
Merge remote-tracking branch 'origin/released'
Conflicts: mesalib/src/glsl/.gitignore xorg-server/Xext/panoramiX.c xorg-server/hw/xwin/win.h xorg-server/hw/xwin/winclipboardinit.c xorg-server/hw/xwin/winclipboardthread.c xorg-server/hw/xwin/winclipboardunicode.c xorg-server/hw/xwin/winclipboardwrappers.c xorg-server/hw/xwin/winclipboardxevents.c xorg-server/hw/xwin/wincreatewnd.c xorg-server/hw/xwin/windialogs.c xorg-server/hw/xwin/winerror.c xorg-server/hw/xwin/winmonitors.c xorg-server/hw/xwin/winmultiwindowwm.c xorg-server/hw/xwin/winprocarg.c xorg-server/hw/xwin/winwndproc.c
Diffstat (limited to 'mesalib')
-rw-r--r--mesalib/configure.ac6
-rw-r--r--mesalib/include/GL/internal/dri_interface.h4
-rw-r--r--mesalib/scons/llvm.py7
-rw-r--r--mesalib/src/gallium/auxiliary/Makefile.sources2
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_cpu_detect.h12
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_format_etc.c25
-rw-r--r--mesalib/src/gallium/auxiliary/util/u_math.h14
-rw-r--r--mesalib/src/glsl/.gitignore2
-rw-r--r--mesalib/src/mesa/Makefile.am5
-rw-r--r--mesalib/src/mesa/main/drawpix.c2
-rw-r--r--mesalib/src/mesa/main/texcompress_etc.c32
-rw-r--r--mesalib/src/mesa/main/texcompress_etc.h9
-rw-r--r--mesalib/src/mesa/main/texcompress_etc_tmp.h34
-rw-r--r--mesalib/src/mesa/main/teximage.c4
14 files changed, 121 insertions, 37 deletions
diff --git a/mesalib/configure.ac b/mesalib/configure.ac
index 9227474f1..1d60957af 100644
--- a/mesalib/configure.ac
+++ b/mesalib/configure.ac
@@ -1847,9 +1847,9 @@ if test "x$enable_gallium_llvm" = xyes; then
dnl We can't use $LLVM_VERSION because it has 'svn' stripped out,
LLVM_LIBS="-lLLVM-`$LLVM_CONFIG --version`"
else
- LLVM_LIBS="`$LLVM_CONFIG --libs engine bitwriter`"
+ LLVM_LIBS="`$LLVM_CONFIG --libs engine bitwriter mcjit`"
if test "x$enable_opencl" = xyes; then
- LLVM_LIBS="${LLVM_LIBS} `llvm-config --libs ipo linker instrumentation`"
+ LLVM_LIBS="${LLVM_LIBS} `$LLVM_CONFIG --libs ipo linker instrumentation`"
fi
fi
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
@@ -2007,7 +2007,7 @@ if test "x$with_gallium_drivers" != x; then
USE_R600_LLVM_COMPILER=yes;
fi
if test "x$enable_opencl" = xyes -a "x$with_llvm_shared_libs" = xno; then
- LLVM_LIBS="${LLVM_LIBS} `llvm-config --libs bitreader asmparser`"
+ LLVM_LIBS="${LLVM_LIBS} `$LLVM_CONFIG --libs bitreader asmparser`"
fi
gallium_check_st "radeon/drm" "dri-r600" "xorg-r600" "" "xvmc-r600" "vdpau-r600" "va-r600"
;;
diff --git a/mesalib/include/GL/internal/dri_interface.h b/mesalib/include/GL/internal/dri_interface.h
index bcdd7f605..9aef95860 100644
--- a/mesalib/include/GL/internal/dri_interface.h
+++ b/mesalib/include/GL/internal/dri_interface.h
@@ -916,7 +916,7 @@ struct __DRIdri2ExtensionRec {
* extensions.
*/
#define __DRI_IMAGE "DRI_IMAGE"
-#define __DRI_IMAGE_VERSION 4
+#define __DRI_IMAGE_VERSION 5
/**
* These formats correspond to the similarly named MESA_FORMAT_*
@@ -950,6 +950,8 @@ struct __DRIdri2ExtensionRec {
#define __DRI_IMAGE_ATTRIB_HANDLE 0x2001
#define __DRI_IMAGE_ATTRIB_NAME 0x2002
#define __DRI_IMAGE_ATTRIB_FORMAT 0x2003 /* available in versions 3+ */
+#define __DRI_IMAGE_ATTRIB_WIDTH 0x2004 /* available in versions 5+ */
+#define __DRI_IMAGE_ATTRIB_HEIGHT 0x2005
typedef struct __DRIimageRec __DRIimage;
typedef struct __DRIimageExtensionRec __DRIimageExtension;
diff --git a/mesalib/scons/llvm.py b/mesalib/scons/llvm.py
index 8222c5b45..f87766af1 100644
--- a/mesalib/scons/llvm.py
+++ b/mesalib/scons/llvm.py
@@ -178,7 +178,12 @@ def generate(env):
pass
env.MergeFlags(cppflags)
- env.ParseConfig('llvm-config --libs engine bitwriter')
+ components = ['engine', 'bitwriter', 'x86asmprinter']
+
+ if llvm_version >= distutils.version.LooseVersion('3.1'):
+ components.append('mcjit')
+
+ env.ParseConfig('llvm-config --libs ' + ' '.join(components))
env.ParseConfig('llvm-config --ldflags')
except OSError:
print 'scons: llvm-config version %s failed' % llvm_version
diff --git a/mesalib/src/gallium/auxiliary/Makefile.sources b/mesalib/src/gallium/auxiliary/Makefile.sources
index 28a176d68..2807c780d 100644
--- a/mesalib/src/gallium/auxiliary/Makefile.sources
+++ b/mesalib/src/gallium/auxiliary/Makefile.sources
@@ -165,6 +165,7 @@ GALLIVM_SOURCES := \
gallivm/lp_bld_conv.c \
gallivm/lp_bld_flow.c \
gallivm/lp_bld_format_aos.c \
+ gallivm/lp_bld_format_aos_array.c \
gallivm/lp_bld_format_soa.c \
gallivm/lp_bld_format_yuv.c \
gallivm/lp_bld_gather.c \
@@ -187,7 +188,6 @@ GALLIVM_SOURCES := \
gallivm/lp_bld_type.c \
draw/draw_llvm.c \
draw/draw_llvm_sample.c \
- draw/draw_llvm_translate.c \
draw/draw_vs_llvm.c \
draw/draw_pt_fetch_shade_pipeline_llvm.c
diff --git a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.h b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.h
index 856e8d7a0..b44d9d9a0 100644
--- a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.h
+++ b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.h
@@ -35,9 +35,16 @@
#ifndef _UTIL_CPU_DETECT_H
#define _UTIL_CPU_DETECT_H
+
#include "pipe/p_compiler.h"
#include "pipe/p_config.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
struct util_cpu_caps {
unsigned nr_cpus;
@@ -66,4 +73,9 @@ util_cpu_caps;
void util_cpu_detect(void);
+#ifdef __cplusplus
+}
+#endif
+
+
#endif /* _UTIL_CPU_DETECT_H */
diff --git a/mesalib/src/gallium/auxiliary/util/u_format_etc.c b/mesalib/src/gallium/auxiliary/util/u_format_etc.c
index 7500e1ed6..f909b1608 100644
--- a/mesalib/src/gallium/auxiliary/util/u_format_etc.c
+++ b/mesalib/src/gallium/auxiliary/util/u_format_etc.c
@@ -13,30 +13,7 @@
void
util_format_etc1_rgb8_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride, const uint8_t *src_row, unsigned src_stride, unsigned width, unsigned height)
{
- const unsigned bw = 4, bh = 4, bs = 8, comps = 4;
- struct etc1_block block;
- unsigned x, y, i, j;
-
- for (y = 0; y < height; y += bh) {
- const uint8_t *src = src_row;
-
- for (x = 0; x < width; x+= bw) {
- etc1_parse_block(&block, src);
-
- for (j = 0; j < bh; j++) {
- uint8_t *dst = dst_row + (y + j) * dst_stride + x * comps;
- for (i = 0; i < bw; i++) {
- etc1_fetch_texel(&block, i, j, dst);
- dst[3] = 255;
- dst += comps;
- }
- }
-
- src += bs;
- }
-
- src_row += src_stride;
- }
+ etc1_unpack_rgba8888(dst_row, dst_stride, src_row, src_stride, width, height);
}
void
diff --git a/mesalib/src/gallium/auxiliary/util/u_math.h b/mesalib/src/gallium/auxiliary/util/u_math.h
index f35c35ffe..90b421ed8 100644
--- a/mesalib/src/gallium/auxiliary/util/u_math.h
+++ b/mesalib/src/gallium/auxiliary/util/u_math.h
@@ -477,6 +477,20 @@ unsigned ffs( unsigned u )
#endif /* FFS_DEFINED */
+/**
+ * Find last bit set in a word. The least significant bit is 1.
+ * Return 0 if no bits are set.
+ */
+static INLINE unsigned util_last_bit(unsigned u)
+{
+ unsigned r = 0;
+ while (u) {
+ r++;
+ u >>= 1;
+ }
+ return r;
+}
+
/* Destructively loop over all of the bits in a mask as in:
*
diff --git a/mesalib/src/glsl/.gitignore b/mesalib/src/glsl/.gitignore
index eae909cd3..5b4fc6c9c 100644
--- a/mesalib/src/glsl/.gitignore
+++ b/mesalib/src/glsl/.gitignore
@@ -1,8 +1,6 @@
glsl_compiler
glsl_lexer.cc
-glsl_lexer.cpp
glsl_parser.cc
-glsl_parser.cpp
glsl_parser.h
glsl_parser.output
builtin_function.cpp
diff --git a/mesalib/src/mesa/Makefile.am b/mesalib/src/mesa/Makefile.am
index 54c1bf8ad..2b023d727 100644
--- a/mesalib/src/mesa/Makefile.am
+++ b/mesalib/src/mesa/Makefile.am
@@ -98,8 +98,9 @@ noinst_LTLIBRARIES = libmesa.la libmesagallium.la
SRCDIR = $(top_srcdir)/src/mesa
include sources.mak
-AM_CFLAGS = $(API_DEFINES) $(DEFINES) $(INCLUDE_DIRS) $(LLVM_CFLAGS) $(CFLAGS)
-AM_CXXFLAGS = $(API_DEFINES) $(DEFINES) $(INCLUDE_DIRS) $(LLVM_CFLAGS) $(CXXFLAGS)
+AM_CPPFLAGS = $(API_DEFINES) $(DEFINES) $(INCLUDE_DIRS)
+AM_CFLAGS = $(LLVM_CFLAGS)
+AM_CXXFLAGS = $(LLVM_CFLAGS)
# cannot just add $(MESA_ASM_FILES) to libmesa_la_SOURCES as it contains a configure substitution
MESA_ASM_FILES_FOR_ARCH =
diff --git a/mesalib/src/mesa/main/drawpix.c b/mesalib/src/mesa/main/drawpix.c
index def55dddd..fdcbcccde 100644
--- a/mesalib/src/mesa/main/drawpix.c
+++ b/mesalib/src/mesa/main/drawpix.c
@@ -240,7 +240,7 @@ _mesa_CopyPixels( GLint srcx, GLint srcy, GLsizei width, GLsizei height,
}
if (ctx->ReadBuffer->Name != 0 && ctx->ReadBuffer->Visual.samples > 0) {
- _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION,
+ _mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyPixels(multisample FBO)");
goto end;
}
diff --git a/mesalib/src/mesa/main/texcompress_etc.c b/mesalib/src/mesa/main/texcompress_etc.c
index 5b331a92a..c645f52b9 100644
--- a/mesalib/src/mesa/main/texcompress_etc.c
+++ b/mesalib/src/mesa/main/texcompress_etc.c
@@ -69,3 +69,35 @@ _mesa_fetch_texel_2d_f_etc1_rgb8(const struct swrast_texture_image *texImage,
texel[BCOMP] = UBYTE_TO_FLOAT(dst[2]);
texel[ACOMP] = 1.0f;
}
+
+/**
+ * Decode texture data in format `MESA_FORMAT_ETC1_RGB8` to
+ * `MESA_FORMAT_ABGR8888`.
+ *
+ * The size of the source data must be a multiple of the ETC1 block size,
+ * which is 8, even if the texture image's dimensions are not aligned to 4.
+ * From the GL_OES_compressed_ETC1_RGB8_texture spec:
+ * The texture is described as a number of 4x4 pixel blocks. If the
+ * texture (or a particular mip-level) is smaller than 4 pixels in
+ * any dimension (such as a 2x2 or a 8x1 texture), the texture is
+ * found in the upper left part of the block(s), and the rest of the
+ * pixels are not used. For instance, a texture of size 4x2 will be
+ * placed in the upper half of a 4x4 block, and the lower half of the
+ * pixels in the block will not be accessed.
+ *
+ * \param src_width in pixels
+ * \param src_height in pixels
+ * \param dst_stride in bytes
+ */
+void
+_mesa_etc1_unpack_rgba8888(uint8_t *dst_row,
+ unsigned dst_stride,
+ const uint8_t *src_row,
+ unsigned src_stride,
+ unsigned src_width,
+ unsigned src_height)
+{
+ etc1_unpack_rgba8888(dst_row, dst_stride,
+ src_row, src_stride,
+ src_width, src_height);
+}
diff --git a/mesalib/src/mesa/main/texcompress_etc.h b/mesalib/src/mesa/main/texcompress_etc.h
index 8e8427f8f..411e1540d 100644
--- a/mesalib/src/mesa/main/texcompress_etc.h
+++ b/mesalib/src/mesa/main/texcompress_etc.h
@@ -24,6 +24,7 @@
#ifndef TEXCOMPRESS_ETC1_H
#define TEXCOMPRESS_ETC1_H
+#include <inttypes.h>
#include "glheader.h"
#include "mfeatures.h"
#include "texstore.h"
@@ -37,4 +38,12 @@ void
_mesa_fetch_texel_2d_f_etc1_rgb8(const struct swrast_texture_image *texImage,
GLint i, GLint j, GLint k, GLfloat *texel);
+void
+_mesa_etc1_unpack_rgba8888(uint8_t *dst_row,
+ unsigned dst_stride,
+ const uint8_t *src_row,
+ unsigned src_stride,
+ unsigned src_width,
+ unsigned src_height);
+
#endif
diff --git a/mesalib/src/mesa/main/texcompress_etc_tmp.h b/mesalib/src/mesa/main/texcompress_etc_tmp.h
index 5c8c6decf..8bbb2cde8 100644
--- a/mesalib/src/mesa/main/texcompress_etc_tmp.h
+++ b/mesalib/src/mesa/main/texcompress_etc_tmp.h
@@ -134,3 +134,37 @@ TAG(etc1_fetch_texel)(const struct TAG(etc1_block) *block,
dst[1] = TAG(etc1_clamp)(base_color[1], modifier);
dst[2] = TAG(etc1_clamp)(base_color[2], modifier);
}
+
+static void
+etc1_unpack_rgba8888(uint8_t *dst_row,
+ unsigned dst_stride,
+ const uint8_t *src_row,
+ unsigned src_stride,
+ unsigned width,
+ unsigned height)
+{
+ const unsigned bw = 4, bh = 4, bs = 8, comps = 4;
+ struct etc1_block block;
+ unsigned x, y, i, j;
+
+ for (y = 0; y < height; y += bh) {
+ const uint8_t *src = src_row;
+
+ for (x = 0; x < width; x+= bw) {
+ etc1_parse_block(&block, src);
+
+ for (j = 0; j < bh; j++) {
+ uint8_t *dst = dst_row + (y + j) * dst_stride + x * comps;
+ for (i = 0; i < bw; i++) {
+ etc1_fetch_texel(&block, i, j, dst);
+ dst[3] = 255;
+ dst += comps;
+ }
+ }
+
+ src += bs;
+ }
+
+ src_row += src_stride;
+ }
+}
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c
index 126386ebe..64b25a82d 100644
--- a/mesalib/src/mesa/main/teximage.c
+++ b/mesalib/src/mesa/main/teximage.c
@@ -2005,7 +2005,7 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,
}
if (ctx->ReadBuffer->Visual.samples > 0) {
- _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION,
+ _mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyTexImage%dD(multisample FBO)",
dimensions);
return GL_TRUE;
@@ -2130,7 +2130,7 @@ copytexsubimage_error_check1( struct gl_context *ctx, GLuint dimensions,
}
if (ctx->ReadBuffer->Visual.samples > 0) {
- _mesa_error(ctx, GL_INVALID_FRAMEBUFFER_OPERATION,
+ _mesa_error(ctx, GL_INVALID_OPERATION,
"glCopyTexSubImage%dD(multisample FBO)",
dimensions);
return GL_TRUE;