Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
d24e61ed9b | ||
|
e2fa28a578 | ||
|
50919da7b3 |
35
.gitignore
vendored
35
.gitignore
vendored
@ -1,8 +1,29 @@
|
|||||||
*.jx
|
*.jx
|
||||||
*.src.rpm
|
mesa-20100208.tar.bz2
|
||||||
.build*
|
gl-manpages-1.0.1.tar.bz2
|
||||||
/mesa-*.tar.bz2
|
xdriinfo-1.0.3.tar.bz2
|
||||||
/mesa-*.tar.xz
|
mesa-demos-20100529.tar.bz2
|
||||||
x86_64/
|
mesa-20100529.tar.bz2
|
||||||
results_mesa/
|
mesa-20100612.tar.bz2
|
||||||
mesa-*/
|
mesa-20100709.tar.bz2
|
||||||
|
mesa-20100720.tar.bz2
|
||||||
|
/mesa-20100824.tar.bz2
|
||||||
|
/mesa-20101020.tar.bz2
|
||||||
|
/mesa-20101108.tar.bz2
|
||||||
|
/mesa-20101118.tar.bz2
|
||||||
|
/mesa-20101129.tar.bz2
|
||||||
|
/mesa-20101214.tar.xz
|
||||||
|
/mesa-20101216.tar.xz
|
||||||
|
/mesa-20110107.tar.xz
|
||||||
|
/mesa-20110315.tar.xz
|
||||||
|
/mesa-20110327.tar.xz
|
||||||
|
/MesaLib-7.10.1.tar.bz2
|
||||||
|
/mesa-20110327.tar.xz
|
||||||
|
/mesa-20110330.tar.xz
|
||||||
|
/mesa-20110401.tar.xz
|
||||||
|
/mesa-20110412.tar.xz
|
||||||
|
/mesa-20110620.tar.xz
|
||||||
|
/mesa-20110730.tar.xz
|
||||||
|
/MesaLib-7.11.tar.bz2
|
||||||
|
/mesa-20111103.tar.xz
|
||||||
|
/MesaLib-7.11.2.tar.bz2
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
From c9987fca1fa611e48f85644493edd8d5a30cf403 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Tom Stellard <tstellar@redhat.com>
|
|
||||||
Date: Fri, 13 Dec 2019 17:42:17 +0000
|
|
||||||
Subject: [PATCH] Link with libclang-cpp
|
|
||||||
|
|
||||||
---
|
|
||||||
src/gallium/targets/opencl/meson.build | 14 +-------------
|
|
||||||
1 file changed, 1 insertion(+), 13 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/gallium/targets/opencl/meson.build b/src/gallium/targets/opencl/meson.build
|
|
||||||
index 907cc74337d..031d35b9716 100644
|
|
||||||
--- a/src/gallium/targets/opencl/meson.build
|
|
||||||
+++ b/src/gallium/targets/opencl/meson.build
|
|
||||||
@@ -43,19 +43,7 @@ libopencl = shared_library(
|
|
||||||
dependencies : [
|
|
||||||
idep_mesautil,
|
|
||||||
dep_clock, dep_dl, dep_unwind, dep_elf,
|
|
||||||
- cpp.find_library('clangCodeGen', dirs : llvm_libdir),
|
|
||||||
- cpp.find_library('clangFrontendTool', dirs : llvm_libdir),
|
|
||||||
- cpp.find_library('clangFrontend', dirs : llvm_libdir),
|
|
||||||
- cpp.find_library('clangDriver', dirs : llvm_libdir),
|
|
||||||
- cpp.find_library('clangSerialization', dirs : llvm_libdir),
|
|
||||||
- cpp.find_library('clangParse', dirs : llvm_libdir),
|
|
||||||
- cpp.find_library('clangSema', dirs : llvm_libdir),
|
|
||||||
- cpp.find_library('clangAnalysis', dirs : llvm_libdir),
|
|
||||||
- cpp.find_library('clangAST', dirs : llvm_libdir),
|
|
||||||
- cpp.find_library('clangASTMatchers', dirs : llvm_libdir),
|
|
||||||
- cpp.find_library('clangEdit', dirs : llvm_libdir),
|
|
||||||
- cpp.find_library('clangLex', dirs : llvm_libdir),
|
|
||||||
- cpp.find_library('clangBasic', dirs : llvm_libdir),
|
|
||||||
+ cpp.find_library('clang-cpp', dirs : llvm_libdir),
|
|
||||||
],
|
|
||||||
version : '@0@.0.0'.format(opencl_version),
|
|
||||||
install : true,
|
|
||||||
--
|
|
||||||
2.20.1
|
|
||||||
|
|
18
0001-nv50-fix-max-texture-levels.patch
Normal file
18
0001-nv50-fix-max-texture-levels.patch
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
diff -up Mesa-7.11/src/gallium/drivers/nv50/nv50_screen.c.jx Mesa-7.11/src/gallium/drivers/nv50/nv50_screen.c
|
||||||
|
--- Mesa-7.11/src/gallium/drivers/nv50/nv50_screen.c.jx 2011-07-08 21:37:09.000000000 -0400
|
||||||
|
+++ Mesa-7.11/src/gallium/drivers/nv50/nv50_screen.c 2011-10-25 13:20:36.605408094 -0400
|
||||||
|
@@ -76,11 +76,11 @@ nv50_screen_get_param(struct pipe_screen
|
||||||
|
case PIPE_CAP_MAX_COMBINED_SAMPLERS:
|
||||||
|
return 64;
|
||||||
|
case PIPE_CAP_MAX_TEXTURE_2D_LEVELS:
|
||||||
|
- return 13;
|
||||||
|
+ return 14;
|
||||||
|
case PIPE_CAP_MAX_TEXTURE_3D_LEVELS:
|
||||||
|
- return 10;
|
||||||
|
+ return 12;
|
||||||
|
case PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS:
|
||||||
|
- return 13;
|
||||||
|
+ return 14;
|
||||||
|
case PIPE_CAP_ARRAY_TEXTURES: /* shader support missing */
|
||||||
|
return 0;
|
||||||
|
case PIPE_CAP_TEXTURE_MIRROR_CLAMP:
|
@ -1,26 +0,0 @@
|
|||||||
From 0ec3bdb2264b491fd3f5dc4e638b4c12611ef219 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
||||||
Date: Sun, 20 Mar 2016 13:27:45 +0100
|
|
||||||
Subject: [PATCH 3/4] evergreen big endian
|
|
||||||
|
|
||||||
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
||||||
---
|
|
||||||
src/gallium/drivers/r600/r600_state_common.c | 2 +-
|
|
||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
|
|
||||||
index cac240e..4b620a1 100644
|
|
||||||
--- a/src/gallium/drivers/r600/r600_state_common.c
|
|
||||||
+++ b/src/gallium/drivers/r600/r600_state_common.c
|
|
||||||
@@ -2716,7 +2716,7 @@ uint32_t r600_translate_colorformat(enum chip_class chip, enum pipe_format forma
|
|
||||||
|
|
||||||
uint32_t r600_colorformat_endian_swap(uint32_t colorformat, bool do_endian_swap)
|
|
||||||
{
|
|
||||||
- if (R600_BIG_ENDIAN) {
|
|
||||||
+ if (0 && R600_BIG_ENDIAN) {
|
|
||||||
switch(colorformat) {
|
|
||||||
/* 8-bit buffers. */
|
|
||||||
case V_0280A0_COLOR_4_4:
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -1,117 +0,0 @@
|
|||||||
|
|
||||||
Subject: RE: Question about Mesa MLAA license
|
|
||||||
From: Jorge Jimenez <iryoku@gmail.com>
|
|
||||||
Date: 01/08/2013 12:50 PM
|
|
||||||
To: Tom Callaway <tcallawa@redhat.com>
|
|
||||||
CC: "jorge@iryoku.com" <jorge@iryoku.com>
|
|
||||||
|
|
||||||
Yes to both questions.
|
|
||||||
|
|
||||||
Thanks,
|
|
||||||
Jorge
|
|
||||||
|
|
||||||
From: Tom Callaway <tcallawa@redhat.com>
|
|
||||||
Sent: January 8, 2013 6:49 PM
|
|
||||||
To: Jorge Jimenez <iryoku@gmail.com>
|
|
||||||
CC: jorge@iryoku.com
|
|
||||||
Subject: Re: Question about Mesa MLAA license
|
|
||||||
|
|
||||||
On 01/08/2013 12:39 PM, Jorge Jimenez wrote:
|
|
||||||
> Hi Tom,
|
|
||||||
>
|
|
||||||
> What we meant with that is that we made an exception for clause 2.
|
|
||||||
> Instead of clause 2, in the case of the Mesa project, you have to name
|
|
||||||
> the technique Jimenez's MLAA in the config options of Mesa. We did that
|
|
||||||
> just to allow them to solve license issues. This exception should be for
|
|
||||||
> the Mesa project, and any project using Mesa, like Fedora.
|
|
||||||
>
|
|
||||||
> We want to widespread usage of our MLAA, so we want to avoid any kind of
|
|
||||||
> license complications. Hope current one is good for Fedora, if not
|
|
||||||
> please tell, and we'll see what we can do!
|
|
||||||
|
|
||||||
Okay, a few more questions:
|
|
||||||
|
|
||||||
* If Fedora decides to simply reproduce the quoted statement:
|
|
||||||
"Uses Jimenez's MLAA. Copyright (C) 2010 by Jorge Jimenez, Belen Masia,
|
|
||||||
Jose I. Echevarria, Fernando Navarro and Diego Gutierrez."
|
|
||||||
|
|
||||||
Specifically, if this is done as part of documentation included with
|
|
||||||
Mesa, is that sufficient to meet clause 2 even if the Mesa config option
|
|
||||||
is not set as described in your exception?
|
|
||||||
|
|
||||||
* Currently, the Mesa config option for MLAA says: "Morphological
|
|
||||||
anti-aliasing based on Jimenez\' MLAA. 0 to disable, 8 for default
|
|
||||||
quality". Is this in compliance with your exception?
|
|
||||||
|
|
||||||
Thanks again,
|
|
||||||
|
|
||||||
~tom
|
|
||||||
|
|
||||||
==
|
|
||||||
Fedora Project
|
|
||||||
|
|
||||||
Subject: RE: Question about Mesa MLAA license
|
|
||||||
From: Jorge Jimenez <iryoku@gmail.com>
|
|
||||||
Date: 01/08/2013 12:39 PM
|
|
||||||
To: "jorge@iryoku.com" <jorge@iryoku.com>, Tom Callaway <tcallawa@redhat.com>
|
|
||||||
|
|
||||||
Hi Tom,
|
|
||||||
|
|
||||||
What we meant with that is that we made an exception for clause 2.
|
|
||||||
Instead of clause 2, in the case of the Mesa project, you have to name
|
|
||||||
the technique Jimenez's MLAA in the config options of Mesa. We did that
|
|
||||||
just to allow them to solve license issues. This exception should be for
|
|
||||||
the Mesa project, and any project using Mesa, like Fedora.
|
|
||||||
|
|
||||||
We want to widespread usage of our MLAA, so we want to avoid any kind of
|
|
||||||
license complications. Hope current one is good for Fedora, if not
|
|
||||||
please tell, and we'll see what we can do!
|
|
||||||
|
|
||||||
Cheers,
|
|
||||||
Jorge
|
|
||||||
|
|
||||||
From: Tom Callaway <tcallawa@redhat.com>
|
|
||||||
Sent: January 8, 2013 6:30 PM
|
|
||||||
To: jorge@iryoku.com
|
|
||||||
Subject: Question about Mesa MLAA license
|
|
||||||
|
|
||||||
Jorge,
|
|
||||||
|
|
||||||
Thanks for all of your fantastic graphics work! I have been auditing
|
|
||||||
Fedora (a popular distribution of Linux) for license compliance and I
|
|
||||||
came across your MLAA code in Mesa.
|
|
||||||
|
|
||||||
The license says:
|
|
||||||
|
|
||||||
* 2. Redistributions in binary form must reproduce the following
|
|
||||||
statement:
|
|
||||||
*
|
|
||||||
* "Uses Jimenez's MLAA. Copyright (C) 2010 by Jorge Jimenez, Belen Masia,
|
|
||||||
* Jose I. Echevarria, Fernando Navarro and Diego Gutierrez."
|
|
||||||
*
|
|
||||||
* Only for use in the Mesa project, this point 2 is filled by naming the
|
|
||||||
* technique Jimenez's MLAA in the Mesa config options.
|
|
||||||
|
|
||||||
That wording is unclear. When you say "Only for use in the Mesa
|
|
||||||
project...", it seems like you could either be saying:
|
|
||||||
|
|
||||||
- This code may only be used as part of Mesa.
|
|
||||||
|
|
||||||
OR
|
|
||||||
|
|
||||||
- In Mesa, you can comply with clause 2 by simply selecting "Jimenez's
|
|
||||||
MLAA" in the Mesa config options.
|
|
||||||
|
|
||||||
*****
|
|
||||||
|
|
||||||
If the first item is true, then we may have to remove the MLAA code from
|
|
||||||
Fedora's copy of Mesa. However, looking at the license on your SMAA
|
|
||||||
code, I do not believe it to be the case. Please let me know either way!
|
|
||||||
|
|
||||||
Thanks in advance,
|
|
||||||
|
|
||||||
Tom Callaway
|
|
||||||
Fedora Legal
|
|
||||||
|
|
||||||
==
|
|
||||||
Fedora Project
|
|
36
legacy-drivers.patch
Normal file
36
legacy-drivers.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
diff -up mesa-20110620/configure.ac.classic mesa-20110620/configure.ac
|
||||||
|
--- mesa-20110620/configure.ac.classic 2011-06-20 13:52:52.000000000 +1000
|
||||||
|
+++ mesa-20110620/configure.ac 2011-06-20 13:55:09.000000000 +1000
|
||||||
|
@@ -1023,20 +1023,20 @@ if test "$mesa_driver" = dri -o "$mesa_d
|
||||||
|
# x86-64 system where they could *ever* be used.
|
||||||
|
if test "x$DRI_DIRS" = "xyes"; then
|
||||||
|
DRI_DIRS="i915 i965 mga nouveau r128 r200 r300 r600 \
|
||||||
|
- radeon savage tdfx unichrome swrast"
|
||||||
|
+ radeon savage tdfx unichrome"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
powerpc*)
|
||||||
|
# Build only the drivers for cards that exist on PowerPC.
|
||||||
|
# At some point MGA will be added, but not yet.
|
||||||
|
if test "x$DRI_DIRS" = "xyes"; then
|
||||||
|
- DRI_DIRS="r128 r200 r300 r600 radeon tdfx swrast"
|
||||||
|
+ DRI_DIRS="r128 r200 r300 r600 radeon tdfx nouveau"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
sparc*)
|
||||||
|
# Build only the drivers for cards that exist on sparc`
|
||||||
|
if test "x$DRI_DIRS" = "xyes"; then
|
||||||
|
- DRI_DIRS="r128 r200 r300 r600 radeon swrast"
|
||||||
|
+ DRI_DIRS="r128 r200 r300 r600 radeon nouveau"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
@@ -1080,7 +1080,7 @@ if test "$mesa_driver" = dri -o "$mesa_d
|
||||||
|
# default drivers
|
||||||
|
if test "x$DRI_DIRS" = "xyes"; then
|
||||||
|
DRI_DIRS="i810 i915 i965 mga nouveau r128 r200 r300 r600 radeon \
|
||||||
|
- savage sis tdfx unichrome swrast"
|
||||||
|
+ savage sis tdfx unichrome"
|
||||||
|
fi
|
||||||
|
|
||||||
|
DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'`
|
22
make-git-snapshot.sh
Executable file
22
make-git-snapshot.sh
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Usage: ./make-git-snapshot.sh [COMMIT]
|
||||||
|
#
|
||||||
|
# to make a snapshot of the given tag/branch. Defaults to HEAD.
|
||||||
|
# Point env var REF to a local mesa repo to reduce clone time.
|
||||||
|
|
||||||
|
DIRNAME=mesa-$( date +%Y%m%d )
|
||||||
|
|
||||||
|
echo REF ${REF:+--reference $REF}
|
||||||
|
echo DIRNAME $DIRNAME
|
||||||
|
echo HEAD ${1:-HEAD}
|
||||||
|
|
||||||
|
rm -rf $DIRNAME
|
||||||
|
|
||||||
|
git clone ${REF:+--reference $REF} \
|
||||||
|
git://git.freedesktop.org/git/mesa/mesa $DIRNAME
|
||||||
|
|
||||||
|
GIT_DIR=$DIRNAME/.git git archive --format=tar --prefix=$DIRNAME/ ${1:-HEAD} \
|
||||||
|
| xz > $DIRNAME.tar.xz
|
||||||
|
|
||||||
|
# rm -rf $DIRNAME
|
15
mesa-7.1-nukeglthread-debug.patch
Normal file
15
mesa-7.1-nukeglthread-debug.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
diff -up mesa-20110620/src/mesa/drivers/dri/intel/intel_fbo.c.da mesa-20110620/src/mesa/drivers/dri/intel/intel_fbo.c
|
||||||
|
--- mesa-20110620/src/mesa/drivers/dri/intel/intel_fbo.c.da 2011-06-20 13:51:25.000000000 +1000
|
||||||
|
+++ mesa-20110620/src/mesa/drivers/dri/intel/intel_fbo.c 2011-06-20 13:51:32.000000000 +1000
|
||||||
|
@@ -612,11 +612,6 @@ intel_render_texture(struct gl_context *
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
- DBG("Begin render texture tid %lx tex=%u w=%d h=%d refcount=%d\n",
|
||||||
|
- _glthread_GetID(),
|
||||||
|
- att->Texture->Name, image->Width, image->Height,
|
||||||
|
- irb->Base.RefCount);
|
||||||
|
-
|
||||||
|
intel_renderbuffer_set_draw_offset(irb, intel_image, att->Zoffset);
|
||||||
|
intel_image->used_as_render_target = GL_TRUE;
|
||||||
|
|
12
mesa-7.10-llvmcore.patch
Normal file
12
mesa-7.10-llvmcore.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -up mesa-20110412/configure.ac.jx mesa-20110412/configure.ac
|
||||||
|
--- mesa-20110412/configure.ac.jx 2011-05-09 15:04:19.000000000 -0400
|
||||||
|
+++ mesa-20110412/configure.ac 2011-05-09 15:05:11.000000000 -0400
|
||||||
|
@@ -1679,7 +1679,7 @@ if test "x$enable_gallium_llvm" = xyes;
|
||||||
|
if test "x$LLVM_CONFIG" != xno; then
|
||||||
|
LLVM_VERSION=`$LLVM_CONFIG --version`
|
||||||
|
LLVM_CFLAGS=`$LLVM_CONFIG --cppflags`
|
||||||
|
- LLVM_LIBS="`$LLVM_CONFIG --libs` -lstdc++"
|
||||||
|
+ LLVM_LIBS="-lLLVM-`llvm-config --version` -lstdc++"
|
||||||
|
|
||||||
|
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
|
||||||
|
GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS llvmpipe"
|
23
mesa-7.10-swrastg.patch
Normal file
23
mesa-7.10-swrastg.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
diff -up mesa-20101020/src/gallium/drivers/llvmpipe/Makefile.jx mesa-20101020/src/gallium/drivers/llvmpipe/Makefile
|
||||||
|
diff -up mesa-20101020/src/gallium/targets/dri-swrast/Makefile.jx mesa-20101020/src/gallium/targets/dri-swrast/Makefile
|
||||||
|
--- mesa-20101020/src/gallium/targets/dri-swrast/Makefile.jx 2010-10-20 15:54:57.000000000 -0400
|
||||||
|
+++ mesa-20101020/src/gallium/targets/dri-swrast/Makefile 2010-11-08 14:39:47.000000000 -0500
|
||||||
|
@@ -26,6 +26,8 @@ C_SOURCES = \
|
||||||
|
|
||||||
|
ASM_SOURCES =
|
||||||
|
|
||||||
|
+LDFLAGS += -Wl,--version-script,../version-script
|
||||||
|
+
|
||||||
|
include ../Makefile.dri
|
||||||
|
|
||||||
|
INCLUDES += \
|
||||||
|
diff -up mesa-20101020/src/gallium/targets/version-script.jx mesa-20101020/src/gallium/targets/version-script
|
||||||
|
--- mesa-20101020/src/gallium/targets/version-script.jx 2010-11-08 14:39:56.000000000 -0500
|
||||||
|
+++ mesa-20101020/src/gallium/targets/version-script 2010-11-08 14:40:36.000000000 -0500
|
||||||
|
@@ -0,0 +1,6 @@
|
||||||
|
+GALLIUM {
|
||||||
|
+ global:
|
||||||
|
+ __dri*;
|
||||||
|
+ local:
|
||||||
|
+ *;
|
||||||
|
+};
|
32
mesa-7.11-fix-sw-24bpp.patch
Normal file
32
mesa-7.11-fix-sw-24bpp.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
From 4258e9b3a5eeaa90f2a0485576d7d17d6d8e4d6f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Marc Pignat <marc@pignat.org>
|
||||||
|
Date: Tue, 28 Jun 2011 13:21:58 +0000
|
||||||
|
Subject: drisw: Fix 24bpp software rendering, take 2
|
||||||
|
|
||||||
|
This patch add the support for 24bpp in the dri/swrast implementation.
|
||||||
|
See http://bugs.freedesktop.org/show_bug.cgi?id=23525
|
||||||
|
|
||||||
|
Signed-off-by: Marc Pignat <marc at pignat.org>
|
||||||
|
Signed-off-by: Brian Paul <brianp@vmware.com>
|
||||||
|
(cherry picked from commit cfec000e7514342fd51859906e173ba2d474a55c)
|
||||||
|
---
|
||||||
|
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c
|
||||||
|
index 07d4955..a57b327 100644
|
||||||
|
--- a/src/glx/drisw_glx.c
|
||||||
|
+++ b/src/glx/drisw_glx.c
|
||||||
|
@@ -100,6 +100,13 @@ XCreateDrawable(struct drisw_drawable * pdp,
|
||||||
|
32, /* bitmap_pad */
|
||||||
|
0); /* bytes_per_line */
|
||||||
|
|
||||||
|
+ /**
|
||||||
|
+ * swrast does not handle 24-bit depth with 24 bpp, so let X do the
|
||||||
|
+ * the conversion for us.
|
||||||
|
+ */
|
||||||
|
+ if (pdp->ximage->bits_per_pixel == 24)
|
||||||
|
+ pdp->ximage->bits_per_pixel = 32;
|
||||||
|
+
|
||||||
|
return True;
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
cgit v0.9.0.2-2-gbebe
|
12
mesa-7.11-generic-wmb.patch
Normal file
12
mesa-7.11-generic-wmb.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -up Mesa-7.11/src/mesa/drivers/dri/sis/sis_context.h.jx Mesa-7.11/src/mesa/drivers/dri/sis/sis_context.h
|
||||||
|
--- Mesa-7.11/src/mesa/drivers/dri/sis/sis_context.h.jx 2010-12-14 16:43:15.000000000 -0500
|
||||||
|
+++ Mesa-7.11/src/mesa/drivers/dri/sis/sis_context.h 2011-09-09 11:47:56.454465358 -0400
|
||||||
|
@@ -405,7 +405,7 @@ struct sis_context
|
||||||
|
#elif defined(__ia64__)
|
||||||
|
#define MMIO_WMB() __asm __volatile("mf" : : : "memory")
|
||||||
|
#else
|
||||||
|
-#error platform needs WMB
|
||||||
|
+#define MMIO_WMB() __sync_synchronize()
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define mEndPrimitive() \
|
778
mesa-7.11-git.patch
Normal file
778
mesa-7.11-git.patch
Normal file
@ -0,0 +1,778 @@
|
|||||||
|
Tip: 906f670f1a1f33d69139f520ee931b268049eac6
|
||||||
|
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index 817bf8b..fb74cfd 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -75,13 +75,13 @@ AC_COMPILE_IFELSE(
|
||||||
|
not clang
|
||||||
|
#endif
|
||||||
|
]])],
|
||||||
|
-[CLANG=yes], [CLANG=no])
|
||||||
|
+[acv_mesa_CLANG=yes], [acv_mesa_CLANG=no])
|
||||||
|
|
||||||
|
-AC_MSG_RESULT([$CLANG])
|
||||||
|
+AC_MSG_RESULT([$acv_mesa_CLANG])
|
||||||
|
|
||||||
|
dnl If we're using GCC, make sure that it is at least version 3.3.0. Older
|
||||||
|
dnl versions are explictly not supported.
|
||||||
|
-if test "x$GCC" = xyes -a "x$CLANG" = xno; then
|
||||||
|
+if test "x$GCC" = xyes -a "x$acv_mesa_CLANG" = xno; then
|
||||||
|
AC_MSG_CHECKING([whether gcc version is sufficient])
|
||||||
|
major=0
|
||||||
|
minor=0
|
||||||
|
diff --git a/docs/news.html b/docs/news.html
|
||||||
|
index dbd4933..6e1f810 100644
|
||||||
|
--- a/docs/news.html
|
||||||
|
+++ b/docs/news.html
|
||||||
|
@@ -11,6 +11,16 @@
|
||||||
|
<H1>News</H1>
|
||||||
|
|
||||||
|
|
||||||
|
+<h2>November 27, 2011</h2>
|
||||||
|
+
|
||||||
|
+<p>
|
||||||
|
+<a href="relnotes-7.11.2.html">Mesa 7.11.2</a> is released.
|
||||||
|
+This release was made primarily to fix build problems with 7.11.1 on
|
||||||
|
+Mandriva and to fix problems related to glCopyTexImage to
|
||||||
|
+luminance-alpha textures. That later was believed to have been fixed
|
||||||
|
+in 7.11.1 but was not.
|
||||||
|
+</p>
|
||||||
|
+
|
||||||
|
<h2>November 17, 2011</h2>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
diff --git a/docs/relnotes.html b/docs/relnotes.html
|
||||||
|
index 1057bd1..49595de 100644
|
||||||
|
--- a/docs/relnotes.html
|
||||||
|
+++ b/docs/relnotes.html
|
||||||
|
@@ -13,6 +13,7 @@ The release notes summarize what's new or changed in each Mesa release.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<UL>
|
||||||
|
+<LI><A HREF="relnotes-7.11.2.html">7.11.2 release notes</A>
|
||||||
|
<LI><A HREF="relnotes-7.11.1.html">7.11.1 release notes</A>
|
||||||
|
<LI><A HREF="relnotes-7.11.html">7.11 release notes</A>
|
||||||
|
<LI><A HREF="relnotes-7.10.3.html">7.10.3 release notes</A>
|
||||||
|
diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
|
||||||
|
index 56c26f5..d477c40 100644
|
||||||
|
--- a/src/gallium/auxiliary/draw/draw_llvm.c
|
||||||
|
+++ b/src/gallium/auxiliary/draw/draw_llvm.c
|
||||||
|
@@ -96,7 +96,7 @@ draw_llvm_generate_elts(struct draw_llvm *llvm, struct draw_llvm_variant *var);
|
||||||
|
* Create LLVM type for struct draw_jit_texture
|
||||||
|
*/
|
||||||
|
static LLVMTypeRef
|
||||||
|
-create_jit_texture_type(struct gallivm_state *gallivm)
|
||||||
|
+create_jit_texture_type(struct gallivm_state *gallivm, const char *struct_name)
|
||||||
|
{
|
||||||
|
LLVMTargetDataRef target = gallivm->target;
|
||||||
|
LLVMTypeRef texture_type;
|
||||||
|
@@ -120,13 +120,21 @@ create_jit_texture_type(struct gallivm_state *gallivm)
|
||||||
|
elem_types[DRAW_JIT_TEXTURE_BORDER_COLOR] =
|
||||||
|
LLVMArrayType(LLVMFloatTypeInContext(gallivm->context), 4);
|
||||||
|
|
||||||
|
+#if HAVE_LLVM >= 0x0300
|
||||||
|
+ texture_type = LLVMStructCreateNamed(gallivm->context, struct_name);
|
||||||
|
+ LLVMStructSetBody(texture_type, elem_types,
|
||||||
|
+ Elements(elem_types), 0);
|
||||||
|
+#else
|
||||||
|
texture_type = LLVMStructTypeInContext(gallivm->context, elem_types,
|
||||||
|
Elements(elem_types), 0);
|
||||||
|
|
||||||
|
+ LLVMAddTypeName(gallivm->module, struct_name, texture_type);
|
||||||
|
+
|
||||||
|
/* Make sure the target's struct layout cache doesn't return
|
||||||
|
* stale/invalid data.
|
||||||
|
*/
|
||||||
|
LLVMInvalidateStructLayout(gallivm->target, texture_type);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
LP_CHECK_MEMBER_OFFSET(struct draw_jit_texture, width,
|
||||||
|
target, texture_type,
|
||||||
|
@@ -176,7 +184,7 @@ create_jit_texture_type(struct gallivm_state *gallivm)
|
||||||
|
*/
|
||||||
|
static LLVMTypeRef
|
||||||
|
create_jit_context_type(struct gallivm_state *gallivm,
|
||||||
|
- LLVMTypeRef texture_type)
|
||||||
|
+ LLVMTypeRef texture_type, const char *struct_name)
|
||||||
|
{
|
||||||
|
LLVMTargetDataRef target = gallivm->target;
|
||||||
|
LLVMTypeRef float_type = LLVMFloatTypeInContext(gallivm->context);
|
||||||
|
@@ -189,11 +197,17 @@ create_jit_context_type(struct gallivm_state *gallivm,
|
||||||
|
elem_types[3] = LLVMPointerType(float_type, 0); /* viewport */
|
||||||
|
elem_types[4] = LLVMArrayType(texture_type,
|
||||||
|
PIPE_MAX_VERTEX_SAMPLERS); /* textures */
|
||||||
|
-
|
||||||
|
+#if HAVE_LLVM >= 0x0300
|
||||||
|
+ context_type = LLVMStructCreateNamed(gallivm->context, struct_name);
|
||||||
|
+ LLVMStructSetBody(context_type, elem_types,
|
||||||
|
+ Elements(elem_types), 0);
|
||||||
|
+#else
|
||||||
|
context_type = LLVMStructTypeInContext(gallivm->context, elem_types,
|
||||||
|
Elements(elem_types), 0);
|
||||||
|
+ LLVMAddTypeName(gallivm->module, struct_name, context_type);
|
||||||
|
|
||||||
|
LLVMInvalidateStructLayout(gallivm->target, context_type);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
LP_CHECK_MEMBER_OFFSET(struct draw_jit_context, vs_constants,
|
||||||
|
target, context_type, 0);
|
||||||
|
@@ -215,7 +229,7 @@ create_jit_context_type(struct gallivm_state *gallivm,
|
||||||
|
* Create LLVM type for struct pipe_vertex_buffer
|
||||||
|
*/
|
||||||
|
static LLVMTypeRef
|
||||||
|
-create_jit_vertex_buffer_type(struct gallivm_state *gallivm)
|
||||||
|
+create_jit_vertex_buffer_type(struct gallivm_state *gallivm, const char *struct_name)
|
||||||
|
{
|
||||||
|
LLVMTargetDataRef target = gallivm->target;
|
||||||
|
LLVMTypeRef elem_types[3];
|
||||||
|
@@ -225,10 +239,17 @@ create_jit_vertex_buffer_type(struct gallivm_state *gallivm)
|
||||||
|
elem_types[1] = LLVMInt32TypeInContext(gallivm->context);
|
||||||
|
elem_types[2] = LLVMPointerType(LLVMInt8TypeInContext(gallivm->context), 0); /* vs_constants */
|
||||||
|
|
||||||
|
+#if HAVE_LLVM >= 0x0300
|
||||||
|
+ vb_type = LLVMStructCreateNamed(gallivm->context, struct_name);
|
||||||
|
+ LLVMStructSetBody(vb_type, elem_types,
|
||||||
|
+ Elements(elem_types), 0);
|
||||||
|
+#else
|
||||||
|
vb_type = LLVMStructTypeInContext(gallivm->context, elem_types,
|
||||||
|
Elements(elem_types), 0);
|
||||||
|
+ LLVMAddTypeName(gallivm->module, struct_name, vb_type);
|
||||||
|
|
||||||
|
LLVMInvalidateStructLayout(gallivm->target, vb_type);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
LP_CHECK_MEMBER_OFFSET(struct pipe_vertex_buffer, stride,
|
||||||
|
target, vb_type, 0);
|
||||||
|
@@ -258,10 +279,17 @@ create_jit_vertex_header(struct gallivm_state *gallivm, int data_elems)
|
||||||
|
elem_types[1] = LLVMArrayType(LLVMFloatTypeInContext(gallivm->context), 4);
|
||||||
|
elem_types[2] = LLVMArrayType(elem_types[1], data_elems);
|
||||||
|
|
||||||
|
+#if HAVE_LLVM >= 0x0300
|
||||||
|
+ vertex_header = LLVMStructCreateNamed(gallivm->context, struct_name);
|
||||||
|
+ LLVMStructSetBody(vertex_header, elem_types,
|
||||||
|
+ Elements(elem_types), 0);
|
||||||
|
+#else
|
||||||
|
vertex_header = LLVMStructTypeInContext(gallivm->context, elem_types,
|
||||||
|
Elements(elem_types), 0);
|
||||||
|
+ LLVMAddTypeName(gallivm->module, struct_name, vertex_header);
|
||||||
|
|
||||||
|
LLVMInvalidateStructLayout(gallivm->target, vertex_header);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/* these are bit-fields and we can't take address of them
|
||||||
|
LP_CHECK_MEMBER_OFFSET(struct vertex_header, clipmask,
|
||||||
|
@@ -284,8 +312,6 @@ create_jit_vertex_header(struct gallivm_state *gallivm, int data_elems)
|
||||||
|
target, vertex_header,
|
||||||
|
DRAW_JIT_VERTEX_DATA);
|
||||||
|
|
||||||
|
- LLVMAddTypeName(gallivm->module, struct_name, vertex_header);
|
||||||
|
-
|
||||||
|
return vertex_header;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -299,19 +325,15 @@ create_jit_types(struct draw_llvm *llvm)
|
||||||
|
struct gallivm_state *gallivm = llvm->gallivm;
|
||||||
|
LLVMTypeRef texture_type, context_type, buffer_type, vb_type;
|
||||||
|
|
||||||
|
- texture_type = create_jit_texture_type(gallivm);
|
||||||
|
- LLVMAddTypeName(gallivm->module, "texture", texture_type);
|
||||||
|
+ texture_type = create_jit_texture_type(gallivm, "texture");
|
||||||
|
|
||||||
|
- context_type = create_jit_context_type(gallivm, texture_type);
|
||||||
|
- LLVMAddTypeName(gallivm->module, "draw_jit_context", context_type);
|
||||||
|
+ context_type = create_jit_context_type(gallivm, texture_type, "draw_jit_context");
|
||||||
|
llvm->context_ptr_type = LLVMPointerType(context_type, 0);
|
||||||
|
|
||||||
|
buffer_type = LLVMPointerType(LLVMIntTypeInContext(gallivm->context, 8), 0);
|
||||||
|
- LLVMAddTypeName(gallivm->module, "buffer", buffer_type);
|
||||||
|
llvm->buffer_ptr_type = LLVMPointerType(buffer_type, 0);
|
||||||
|
|
||||||
|
- vb_type = create_jit_vertex_buffer_type(gallivm);
|
||||||
|
- LLVMAddTypeName(gallivm->module, "pipe_vertex_buffer", vb_type);
|
||||||
|
+ vb_type = create_jit_vertex_buffer_type(gallivm, "pipe_vertex_buffer");
|
||||||
|
llvm->vb_ptr_type = LLVMPointerType(vb_type, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
|
||||||
|
index 8636cd6..f44749d 100644
|
||||||
|
--- a/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
|
||||||
|
+++ b/src/gallium/auxiliary/gallivm/lp_bld_debug.cpp
|
||||||
|
@@ -27,17 +27,23 @@
|
||||||
|
|
||||||
|
#include <llvm-c/Core.h>
|
||||||
|
#include <llvm/Target/TargetMachine.h>
|
||||||
|
-#include <llvm/Target/TargetRegistry.h>
|
||||||
|
-#include <llvm/Target/TargetSelect.h>
|
||||||
|
#include <llvm/Target/TargetInstrInfo.h>
|
||||||
|
#include <llvm/Support/raw_ostream.h>
|
||||||
|
#include <llvm/Support/MemoryObject.h>
|
||||||
|
|
||||||
|
+#if HAVE_LLVM >= 0x0300
|
||||||
|
+#include <llvm/Support/TargetRegistry.h>
|
||||||
|
+#include <llvm/Support/TargetSelect.h>
|
||||||
|
+#else /* HAVE_LLVM < 0x0300 */
|
||||||
|
+#include <llvm/Target/TargetRegistry.h>
|
||||||
|
+#include <llvm/Target/TargetSelect.h>
|
||||||
|
+#endif /* HAVE_LLVM < 0x0300 */
|
||||||
|
+
|
||||||
|
#if HAVE_LLVM >= 0x0209
|
||||||
|
#include <llvm/Support/Host.h>
|
||||||
|
-#else
|
||||||
|
+#else /* HAVE_LLVM < 0x0209 */
|
||||||
|
#include <llvm/System/Host.h>
|
||||||
|
-#endif
|
||||||
|
+#endif /* HAVE_LLVM < 0x0209 */
|
||||||
|
|
||||||
|
#if HAVE_LLVM >= 0x0207
|
||||||
|
#include <llvm/MC/MCDisassembler.h>
|
||||||
|
@@ -193,14 +199,23 @@ lp_disassemble(const void* func)
|
||||||
|
|
||||||
|
InitializeAllDisassemblers();
|
||||||
|
|
||||||
|
+#if HAVE_LLVM >= 0x0300
|
||||||
|
+ OwningPtr<const MCAsmInfo> AsmInfo(T->createMCAsmInfo(Triple));
|
||||||
|
+#else
|
||||||
|
OwningPtr<const MCAsmInfo> AsmInfo(T->createAsmInfo(Triple));
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
if (!AsmInfo) {
|
||||||
|
debug_printf("error: no assembly info for target %s\n", Triple.c_str());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if HAVE_LLVM >= 0x0300
|
||||||
|
+ const MCSubtargetInfo *STI = T->createMCSubtargetInfo(Triple, sys::getHostCPUName(), "");
|
||||||
|
+ OwningPtr<const MCDisassembler> DisAsm(T->createMCDisassembler(*STI));
|
||||||
|
+#else
|
||||||
|
OwningPtr<const MCDisassembler> DisAsm(T->createMCDisassembler());
|
||||||
|
+#endif
|
||||||
|
if (!DisAsm) {
|
||||||
|
debug_printf("error: no disassembler for target %s\n", Triple.c_str());
|
||||||
|
return;
|
||||||
|
@@ -213,7 +228,11 @@ lp_disassemble(const void* func)
|
||||||
|
#else
|
||||||
|
int AsmPrinterVariant = AsmInfo->getAssemblerDialect();
|
||||||
|
#endif
|
||||||
|
-#if HAVE_LLVM >= 0x0208
|
||||||
|
+
|
||||||
|
+#if HAVE_LLVM >= 0x0300
|
||||||
|
+ OwningPtr<MCInstPrinter> Printer(
|
||||||
|
+ T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo, *STI));
|
||||||
|
+#elif HAVE_LLVM >= 0x0208
|
||||||
|
OwningPtr<MCInstPrinter> Printer(
|
||||||
|
T->createMCInstPrinter(AsmPrinterVariant, *AsmInfo));
|
||||||
|
#else
|
||||||
|
@@ -253,7 +272,11 @@ lp_disassemble(const void* func)
|
||||||
|
|
||||||
|
if (!DisAsm->getInstruction(Inst, Size, memoryObject,
|
||||||
|
pc,
|
||||||
|
- nulls())) {
|
||||||
|
+#if HAVE_LLVM >= 0x0300
|
||||||
|
+ nulls(), nulls())) {
|
||||||
|
+#else
|
||||||
|
+ nulls())) {
|
||||||
|
+#endif
|
||||||
|
debug_printf("invalid\n");
|
||||||
|
pc += 1;
|
||||||
|
}
|
||||||
|
@@ -276,7 +299,9 @@ lp_disassemble(const void* func)
|
||||||
|
* Print the instruction.
|
||||||
|
*/
|
||||||
|
|
||||||
|
-#if HAVE_LLVM >= 0x208
|
||||||
|
+#if HAVE_LLVM >= 0x0300
|
||||||
|
+ Printer->printInst(&Inst, Out, "");
|
||||||
|
+#elif HAVE_LLVM >= 0x208
|
||||||
|
Printer->printInst(&Inst, Out);
|
||||||
|
#else
|
||||||
|
Printer->printInst(&Inst);
|
||||||
|
@@ -289,7 +314,11 @@ lp_disassemble(const void* func)
|
||||||
|
|
||||||
|
pc += Size;
|
||||||
|
|
||||||
|
+#if HAVE_LLVM >= 0x0300
|
||||||
|
+ const MCInstrDesc &TID = TII->get(Inst.getOpcode());
|
||||||
|
+#else
|
||||||
|
const TargetInstrDesc &TID = TII->get(Inst.getOpcode());
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Keep track of forward jumps to a nearby address.
|
||||||
|
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_type.c b/src/gallium/auxiliary/gallivm/lp_bld_type.c
|
||||||
|
index c5cf6d4..efd159f 100644
|
||||||
|
--- a/src/gallium/auxiliary/gallivm/lp_bld_type.c
|
||||||
|
+++ b/src/gallium/auxiliary/gallivm/lp_bld_type.c
|
||||||
|
@@ -325,16 +325,18 @@ lp_typekind_name(LLVMTypeKind t)
|
||||||
|
return "LLVMArrayTypeKind";
|
||||||
|
case LLVMPointerTypeKind:
|
||||||
|
return "LLVMPointerTypeKind";
|
||||||
|
+#if HAVE_LLVM < 0x0300
|
||||||
|
case LLVMOpaqueTypeKind:
|
||||||
|
return "LLVMOpaqueTypeKind";
|
||||||
|
+#endif
|
||||||
|
case LLVMVectorTypeKind:
|
||||||
|
return "LLVMVectorTypeKind";
|
||||||
|
case LLVMMetadataTypeKind:
|
||||||
|
return "LLVMMetadataTypeKind";
|
||||||
|
- /* Only in LLVM 2.7 and later???
|
||||||
|
+#if HAVE_LLVM == 0x0207
|
||||||
|
case LLVMUnionTypeKind:
|
||||||
|
return "LLVMUnionTypeKind";
|
||||||
|
- */
|
||||||
|
+#endif
|
||||||
|
default:
|
||||||
|
return "unknown LLVMTypeKind";
|
||||||
|
}
|
||||||
|
diff --git a/src/gallium/drivers/llvmpipe/lp_jit.c b/src/gallium/drivers/llvmpipe/lp_jit.c
|
||||||
|
index 268f0fa..ce92a80 100644
|
||||||
|
--- a/src/gallium/drivers/llvmpipe/lp_jit.c
|
||||||
|
+++ b/src/gallium/drivers/llvmpipe/lp_jit.c
|
||||||
|
@@ -68,10 +68,17 @@ lp_jit_create_types(struct llvmpipe_context *lp)
|
||||||
|
elem_types[LP_JIT_TEXTURE_BORDER_COLOR] =
|
||||||
|
LLVMArrayType(LLVMFloatTypeInContext(lc), 4);
|
||||||
|
|
||||||
|
+#if HAVE_LLVM >= 0x0300
|
||||||
|
+ texture_type = LLVMStructCreateNamed(gallivm->context, "texture");
|
||||||
|
+ LLVMStructSetBody(texture_type, elem_types,
|
||||||
|
+ Elements(elem_types), 0);
|
||||||
|
+#else
|
||||||
|
texture_type = LLVMStructTypeInContext(lc, elem_types,
|
||||||
|
Elements(elem_types), 0);
|
||||||
|
+ LLVMAddTypeName(gallivm->module, "texture", texture_type);
|
||||||
|
|
||||||
|
LLVMInvalidateStructLayout(gallivm->target, texture_type);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
LP_CHECK_MEMBER_OFFSET(struct lp_jit_texture, width,
|
||||||
|
gallivm->target, texture_type,
|
||||||
|
@@ -112,8 +119,6 @@ lp_jit_create_types(struct llvmpipe_context *lp)
|
||||||
|
|
||||||
|
LP_CHECK_STRUCT_SIZE(struct lp_jit_texture,
|
||||||
|
gallivm->target, texture_type);
|
||||||
|
-
|
||||||
|
- LLVMAddTypeName(gallivm->module, "texture", texture_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* struct lp_jit_context */
|
||||||
|
@@ -129,11 +134,19 @@ lp_jit_create_types(struct llvmpipe_context *lp)
|
||||||
|
elem_types[LP_JIT_CTX_TEXTURES] = LLVMArrayType(texture_type,
|
||||||
|
PIPE_MAX_SAMPLERS);
|
||||||
|
|
||||||
|
+#if HAVE_LLVM >= 0x0300
|
||||||
|
+ context_type = LLVMStructCreateNamed(gallivm->context, "context");
|
||||||
|
+ LLVMStructSetBody(context_type, elem_types,
|
||||||
|
+ Elements(elem_types), 0);
|
||||||
|
+#else
|
||||||
|
context_type = LLVMStructTypeInContext(lc, elem_types,
|
||||||
|
Elements(elem_types), 0);
|
||||||
|
|
||||||
|
LLVMInvalidateStructLayout(gallivm->target, context_type);
|
||||||
|
|
||||||
|
+ LLVMAddTypeName(gallivm->module, "context", context_type);
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
LP_CHECK_MEMBER_OFFSET(struct lp_jit_context, constants,
|
||||||
|
gallivm->target, context_type,
|
||||||
|
LP_JIT_CTX_CONSTANTS);
|
||||||
|
@@ -155,8 +168,6 @@ lp_jit_create_types(struct llvmpipe_context *lp)
|
||||||
|
LP_CHECK_STRUCT_SIZE(struct lp_jit_context,
|
||||||
|
gallivm->target, context_type);
|
||||||
|
|
||||||
|
- LLVMAddTypeName(gallivm->module, "context", context_type);
|
||||||
|
-
|
||||||
|
lp->jit_context_ptr_type = LLVMPointerType(context_type, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c
|
||||||
|
index ceb83f6..ac3e361 100644
|
||||||
|
--- a/src/gallium/drivers/nv50/nv50_context.c
|
||||||
|
+++ b/src/gallium/drivers/nv50/nv50_context.c
|
||||||
|
@@ -60,13 +60,13 @@ nv50_texture_barrier(struct pipe_context *pipe)
|
||||||
|
void
|
||||||
|
nv50_default_flush_notify(struct nouveau_channel *chan)
|
||||||
|
{
|
||||||
|
- struct nv50_context *nv50 = chan->user_private;
|
||||||
|
+ struct nv50_screen *screen = chan->user_private;
|
||||||
|
|
||||||
|
- if (!nv50)
|
||||||
|
+ if (!screen)
|
||||||
|
return;
|
||||||
|
|
||||||
|
- nouveau_fence_update(&nv50->screen->base, TRUE);
|
||||||
|
- nouveau_fence_next(&nv50->screen->base);
|
||||||
|
+ nouveau_fence_update(&screen->base, TRUE);
|
||||||
|
+ nouveau_fence_next(&screen->base);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
@@ -100,10 +100,8 @@ nv50_destroy(struct pipe_context *pipe)
|
||||||
|
|
||||||
|
draw_destroy(nv50->draw);
|
||||||
|
|
||||||
|
- if (nv50->screen->cur_ctx == nv50) {
|
||||||
|
- nv50->screen->base.channel->user_private = NULL;
|
||||||
|
+ if (nv50->screen->cur_ctx == nv50)
|
||||||
|
nv50->screen->cur_ctx = NULL;
|
||||||
|
- }
|
||||||
|
|
||||||
|
FREE(nv50);
|
||||||
|
}
|
||||||
|
@@ -140,7 +138,6 @@ nv50_create(struct pipe_screen *pscreen, void *priv)
|
||||||
|
|
||||||
|
if (!screen->cur_ctx)
|
||||||
|
screen->cur_ctx = nv50;
|
||||||
|
- screen->base.channel->user_private = nv50;
|
||||||
|
screen->base.channel->flush_notify = nv50_default_flush_notify;
|
||||||
|
|
||||||
|
nv50_init_query_functions(nv50);
|
||||||
|
diff --git a/src/gallium/drivers/nv50/nv50_screen.c b/src/gallium/drivers/nv50/nv50_screen.c
|
||||||
|
index 9606c99..f176a86 100644
|
||||||
|
--- a/src/gallium/drivers/nv50/nv50_screen.c
|
||||||
|
+++ b/src/gallium/drivers/nv50/nv50_screen.c
|
||||||
|
@@ -215,6 +215,8 @@ nv50_screen_destroy(struct pipe_screen *pscreen)
|
||||||
|
nouveau_fence_wait(screen->base.fence.current);
|
||||||
|
nouveau_fence_ref (NULL, &screen->base.fence.current);
|
||||||
|
}
|
||||||
|
+ if (screen->base.channel)
|
||||||
|
+ screen->base.channel->user_private = NULL;
|
||||||
|
|
||||||
|
nouveau_bo_ref(NULL, &screen->code);
|
||||||
|
nouveau_bo_ref(NULL, &screen->tls_bo);
|
||||||
|
@@ -304,6 +306,7 @@ nv50_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev)
|
||||||
|
FAIL_SCREEN_INIT("nouveau_screen_init failed: %d\n", ret);
|
||||||
|
|
||||||
|
chan = screen->base.channel;
|
||||||
|
+ chan->user_private = screen;
|
||||||
|
|
||||||
|
pscreen->winsys = ws;
|
||||||
|
pscreen->destroy = nv50_screen_destroy;
|
||||||
|
diff --git a/src/gallium/drivers/nv50/nv50_state_validate.c b/src/gallium/drivers/nv50/nv50_state_validate.c
|
||||||
|
index 11561f5..d29c1e9 100644
|
||||||
|
--- a/src/gallium/drivers/nv50/nv50_state_validate.c
|
||||||
|
+++ b/src/gallium/drivers/nv50/nv50_state_validate.c
|
||||||
|
@@ -282,8 +282,7 @@ nv50_switch_pipe_context(struct nv50_context *ctx_to)
|
||||||
|
if (!ctx_to->zsa)
|
||||||
|
ctx_to->dirty &= ~NV50_NEW_ZSA;
|
||||||
|
|
||||||
|
- ctx_to->screen->base.channel->user_private = ctx_to->screen->cur_ctx =
|
||||||
|
- ctx_to;
|
||||||
|
+ ctx_to->screen->cur_ctx = ctx_to;
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct state_validate {
|
||||||
|
diff --git a/src/gallium/drivers/nv50/nv50_vbo.c b/src/gallium/drivers/nv50/nv50_vbo.c
|
||||||
|
index bb08941..f23008a 100644
|
||||||
|
--- a/src/gallium/drivers/nv50/nv50_vbo.c
|
||||||
|
+++ b/src/gallium/drivers/nv50/nv50_vbo.c
|
||||||
|
@@ -389,11 +389,11 @@ nv50_prim_gl(unsigned prim)
|
||||||
|
static void
|
||||||
|
nv50_draw_vbo_flush_notify(struct nouveau_channel *chan)
|
||||||
|
{
|
||||||
|
- struct nv50_context *nv50 = chan->user_private;
|
||||||
|
+ struct nv50_screen *screen = chan->user_private;
|
||||||
|
|
||||||
|
- nouveau_fence_update(&nv50->screen->base, TRUE);
|
||||||
|
+ nouveau_fence_update(&screen->base, TRUE);
|
||||||
|
|
||||||
|
- nv50_bufctx_emit_relocs(nv50);
|
||||||
|
+ nv50_bufctx_emit_relocs(screen->cur_ctx);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
@@ -650,7 +650,6 @@ nv50_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
|
||||||
|
nv50_state_validate(nv50);
|
||||||
|
|
||||||
|
chan->flush_notify = nv50_draw_vbo_flush_notify;
|
||||||
|
- chan->user_private = nv50;
|
||||||
|
|
||||||
|
if (nv50->vbo_fifo) {
|
||||||
|
nv50_push_vbo(nv50, info);
|
||||||
|
diff --git a/src/gallium/drivers/nvc0/nvc0_context.c b/src/gallium/drivers/nvc0/nvc0_context.c
|
||||||
|
index 2679b7f..983db23 100644
|
||||||
|
--- a/src/gallium/drivers/nvc0/nvc0_context.c
|
||||||
|
+++ b/src/gallium/drivers/nvc0/nvc0_context.c
|
||||||
|
@@ -89,10 +89,8 @@ nvc0_destroy(struct pipe_context *pipe)
|
||||||
|
|
||||||
|
draw_destroy(nvc0->draw);
|
||||||
|
|
||||||
|
- if (nvc0->screen->cur_ctx == nvc0) {
|
||||||
|
- nvc0->screen->base.channel->user_private = NULL;
|
||||||
|
+ if (nvc0->screen->cur_ctx == nvc0)
|
||||||
|
nvc0->screen->cur_ctx = NULL;
|
||||||
|
- }
|
||||||
|
|
||||||
|
FREE(nvc0);
|
||||||
|
}
|
||||||
|
@@ -100,13 +98,13 @@ nvc0_destroy(struct pipe_context *pipe)
|
||||||
|
void
|
||||||
|
nvc0_default_flush_notify(struct nouveau_channel *chan)
|
||||||
|
{
|
||||||
|
- struct nvc0_context *nvc0 = chan->user_private;
|
||||||
|
+ struct nvc0_screen *screen = chan->user_private;
|
||||||
|
|
||||||
|
- if (!nvc0)
|
||||||
|
+ if (!screen)
|
||||||
|
return;
|
||||||
|
|
||||||
|
- nouveau_fence_update(&nvc0->screen->base, TRUE);
|
||||||
|
- nouveau_fence_next(&nvc0->screen->base);
|
||||||
|
+ nouveau_fence_update(&screen->base, TRUE);
|
||||||
|
+ nouveau_fence_next(&screen->base);
|
||||||
|
}
|
||||||
|
|
||||||
|
struct pipe_context *
|
||||||
|
@@ -141,7 +139,6 @@ nvc0_create(struct pipe_screen *pscreen, void *priv)
|
||||||
|
|
||||||
|
if (!screen->cur_ctx)
|
||||||
|
screen->cur_ctx = nvc0;
|
||||||
|
- screen->base.channel->user_private = nvc0;
|
||||||
|
screen->base.channel->flush_notify = nvc0_default_flush_notify;
|
||||||
|
|
||||||
|
nvc0_init_query_functions(nvc0);
|
||||||
|
diff --git a/src/gallium/drivers/nvc0/nvc0_screen.c b/src/gallium/drivers/nvc0/nvc0_screen.c
|
||||||
|
index e87688e..43eb6ce 100644
|
||||||
|
--- a/src/gallium/drivers/nvc0/nvc0_screen.c
|
||||||
|
+++ b/src/gallium/drivers/nvc0/nvc0_screen.c
|
||||||
|
@@ -198,8 +198,12 @@ nvc0_screen_destroy(struct pipe_screen *pscreen)
|
||||||
|
{
|
||||||
|
struct nvc0_screen *screen = nvc0_screen(pscreen);
|
||||||
|
|
||||||
|
- nouveau_fence_wait(screen->base.fence.current);
|
||||||
|
- nouveau_fence_ref(NULL, &screen->base.fence.current);
|
||||||
|
+ if (screen->base.fence.current) {
|
||||||
|
+ nouveau_fence_wait(screen->base.fence.current);
|
||||||
|
+ nouveau_fence_ref(NULL, &screen->base.fence.current);
|
||||||
|
+ }
|
||||||
|
+ if (screen->base.channel)
|
||||||
|
+ screen->base.channel->user_private = NULL;
|
||||||
|
|
||||||
|
nouveau_bo_ref(NULL, &screen->text);
|
||||||
|
nouveau_bo_ref(NULL, &screen->tls);
|
||||||
|
@@ -362,6 +366,7 @@ nvc0_screen_create(struct pipe_winsys *ws, struct nouveau_device *dev)
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
chan = screen->base.channel;
|
||||||
|
+ chan->user_private = screen;
|
||||||
|
|
||||||
|
pscreen->winsys = ws;
|
||||||
|
pscreen->destroy = nvc0_screen_destroy;
|
||||||
|
diff --git a/src/gallium/drivers/nvc0/nvc0_state_validate.c b/src/gallium/drivers/nvc0/nvc0_state_validate.c
|
||||||
|
index 9b2a281..f300f37 100644
|
||||||
|
--- a/src/gallium/drivers/nvc0/nvc0_state_validate.c
|
||||||
|
+++ b/src/gallium/drivers/nvc0/nvc0_state_validate.c
|
||||||
|
@@ -428,8 +428,7 @@ nvc0_switch_pipe_context(struct nvc0_context *ctx_to)
|
||||||
|
if (!ctx_to->zsa)
|
||||||
|
ctx_to->dirty &= ~NVC0_NEW_ZSA;
|
||||||
|
|
||||||
|
- ctx_to->screen->base.channel->user_private = ctx_to->screen->cur_ctx =
|
||||||
|
- ctx_to;
|
||||||
|
+ ctx_to->screen->cur_ctx = ctx_to;
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct state_validate {
|
||||||
|
diff --git a/src/gallium/drivers/nvc0/nvc0_vbo.c b/src/gallium/drivers/nvc0/nvc0_vbo.c
|
||||||
|
index 4107910..8a5bf8d 100644
|
||||||
|
--- a/src/gallium/drivers/nvc0/nvc0_vbo.c
|
||||||
|
+++ b/src/gallium/drivers/nvc0/nvc0_vbo.c
|
||||||
|
@@ -367,11 +367,11 @@ nvc0_prim_gl(unsigned prim)
|
||||||
|
static void
|
||||||
|
nvc0_draw_vbo_flush_notify(struct nouveau_channel *chan)
|
||||||
|
{
|
||||||
|
- struct nvc0_context *nvc0 = chan->user_private;
|
||||||
|
+ struct nvc0_screen *screen = chan->user_private;
|
||||||
|
|
||||||
|
- nouveau_fence_update(&nvc0->screen->base, TRUE);
|
||||||
|
+ nouveau_fence_update(&screen->base, TRUE);
|
||||||
|
|
||||||
|
- nvc0_bufctx_emit_relocs(nvc0);
|
||||||
|
+ nvc0_bufctx_emit_relocs(screen->cur_ctx);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
@@ -587,7 +587,6 @@ nvc0_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
|
||||||
|
nvc0_state_validate(nvc0);
|
||||||
|
|
||||||
|
chan->flush_notify = nvc0_draw_vbo_flush_notify;
|
||||||
|
- chan->user_private = nvc0;
|
||||||
|
|
||||||
|
if (nvc0->vbo_fifo) {
|
||||||
|
nvc0_push_vbo(nvc0, info);
|
||||||
|
diff --git a/src/glsl/ast.h b/src/glsl/ast.h
|
||||||
|
index d1de227..532347d 100644
|
||||||
|
--- a/src/glsl/ast.h
|
||||||
|
+++ b/src/glsl/ast.h
|
||||||
|
@@ -372,7 +372,7 @@ struct ast_type_qualifier {
|
||||||
|
* \note
|
||||||
|
* This field is only valid if \c explicit_location is set.
|
||||||
|
*/
|
||||||
|
- unsigned location;
|
||||||
|
+ int location;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if and only if an interpolation qualifier is present.
|
||||||
|
diff --git a/src/glsl/ast_to_hir.cpp b/src/glsl/ast_to_hir.cpp
|
||||||
|
index 2289047..1650978 100644
|
||||||
|
--- a/src/glsl/ast_to_hir.cpp
|
||||||
|
+++ b/src/glsl/ast_to_hir.cpp
|
||||||
|
@@ -1140,7 +1140,7 @@ ast_expression::hir(exec_list *instructions,
|
||||||
|
error_emitted = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
- type = op[0]->type;
|
||||||
|
+ type = error_emitted ? glsl_type::error_type : op[0]->type;
|
||||||
|
result = new(ctx) ir_expression(ir_unop_bit_not, type, op[0], NULL);
|
||||||
|
break;
|
||||||
|
|
||||||
|
diff --git a/src/glsl/lower_vec_index_to_swizzle.cpp b/src/glsl/lower_vec_index_to_swizzle.cpp
|
||||||
|
index c7630c2..46fd6ac 100644
|
||||||
|
--- a/src/glsl/lower_vec_index_to_swizzle.cpp
|
||||||
|
+++ b/src/glsl/lower_vec_index_to_swizzle.cpp
|
||||||
|
@@ -33,6 +33,7 @@
|
||||||
|
#include "ir_visitor.h"
|
||||||
|
#include "ir_optimization.h"
|
||||||
|
#include "glsl_types.h"
|
||||||
|
+#include "main/macros.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Visitor class for replacing expressions with ir_constant values.
|
||||||
|
@@ -76,8 +77,25 @@ ir_vec_index_to_swizzle_visitor::convert_vec_index_to_swizzle(ir_rvalue *ir)
|
||||||
|
|
||||||
|
void *ctx = ralloc_parent(ir);
|
||||||
|
this->progress = true;
|
||||||
|
- return new(ctx) ir_swizzle(deref->array,
|
||||||
|
- ir_constant->value.i[0], 0, 0, 0, 1);
|
||||||
|
+
|
||||||
|
+ /* Page 40 of the GLSL 1.20 spec says:
|
||||||
|
+ *
|
||||||
|
+ * "When indexing with non-constant expressions, behavior is undefined
|
||||||
|
+ * if the index is negative, or greater than or equal to the size of
|
||||||
|
+ * the vector."
|
||||||
|
+ *
|
||||||
|
+ * The quoted spec text mentions non-constant expressions, but this code
|
||||||
|
+ * operates on constants. These constants are the result of non-constant
|
||||||
|
+ * expressions that have been optimized to constants. The common case here
|
||||||
|
+ * is a loop counter from an unrolled loop that is used to index a vector.
|
||||||
|
+ *
|
||||||
|
+ * The ir_swizzle constructor gets angry if the index is negative or too
|
||||||
|
+ * large. For simplicity sake, just clamp the index to [0, size-1].
|
||||||
|
+ */
|
||||||
|
+ const int i = MIN2(MAX2(ir_constant->value.i[0], 0),
|
||||||
|
+ (deref->array->type->vector_elements - 1));
|
||||||
|
+
|
||||||
|
+ return new(ctx) ir_swizzle(deref->array, i, 0, 0, 0, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
ir_visitor_status
|
||||||
|
diff --git a/src/glw/GLwDrawA.c b/src/glw/GLwDrawA.c
|
||||||
|
index 30304a4..b9ef47b 100644
|
||||||
|
--- a/src/glw/GLwDrawA.c
|
||||||
|
+++ b/src/glw/GLwDrawA.c
|
||||||
|
@@ -270,7 +270,7 @@ static XtResource backgroundResources[] = {
|
||||||
|
static XtResource otherColorResources[] = {
|
||||||
|
{XmNforeground,XmCForeground,XmRPixel,
|
||||||
|
sizeof(Pixel),XtOffset(GLwDrawingAreaWidget,primitive.foreground),
|
||||||
|
- XmRString,(XtPointer)"lighgrey"},
|
||||||
|
+ XmRString,(XtPointer)"lightgrey"},
|
||||||
|
/*XmRCallProc, (XtPointer) _XmForegroundColorDefault},*/
|
||||||
|
|
||||||
|
{XmNhighlightColor,XmCHighlightColor,XmRPixel,sizeof(Pixel),
|
||||||
|
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
|
||||||
|
index 89fea9c..5ec8d67 100644
|
||||||
|
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
|
||||||
|
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
|
||||||
|
@@ -283,10 +283,10 @@ brw_create_constant_surface(struct brw_context *brw,
|
||||||
|
|
||||||
|
surf[1] = bo->offset; /* reloc */
|
||||||
|
|
||||||
|
- surf[2] = (((w & 0x7f) - 1) << BRW_SURFACE_WIDTH_SHIFT |
|
||||||
|
- (((w >> 7) & 0x1fff) - 1) << BRW_SURFACE_HEIGHT_SHIFT);
|
||||||
|
+ surf[2] = ((w & 0x7f) << BRW_SURFACE_WIDTH_SHIFT |
|
||||||
|
+ ((w >> 7) & 0x1fff) << BRW_SURFACE_HEIGHT_SHIFT);
|
||||||
|
|
||||||
|
- surf[3] = ((((w >> 20) & 0x7f) - 1) << BRW_SURFACE_DEPTH_SHIFT |
|
||||||
|
+ surf[3] = (((w >> 20) & 0x7f) << BRW_SURFACE_DEPTH_SHIFT |
|
||||||
|
(width * 16 - 1) << BRW_SURFACE_PITCH_SHIFT);
|
||||||
|
|
||||||
|
surf[4] = 0;
|
||||||
|
diff --git a/src/mesa/drivers/dri/i965/gen7_viewport_state.c b/src/mesa/drivers/dri/i965/gen7_viewport_state.c
|
||||||
|
index 838ad3a..be6a324 100644
|
||||||
|
--- a/src/mesa/drivers/dri/i965/gen7_viewport_state.c
|
||||||
|
+++ b/src/mesa/drivers/dri/i965/gen7_viewport_state.c
|
||||||
|
@@ -36,7 +36,7 @@ prepare_sf_clip_viewport(struct brw_context *brw)
|
||||||
|
const GLfloat *v = ctx->Viewport._WindowMap.m;
|
||||||
|
struct gen7_sf_clip_viewport *vp;
|
||||||
|
|
||||||
|
- vp = brw_state_batch(brw, sizeof(vp), 64, &brw->sf.vp_offset);
|
||||||
|
+ vp = brw_state_batch(brw, sizeof(*vp), 64, &brw->sf.vp_offset);
|
||||||
|
/* Also assign to clip.vp_offset in case something uses it. */
|
||||||
|
brw->clip.vp_offset = brw->sf.vp_offset;
|
||||||
|
|
||||||
|
diff --git a/src/mesa/drivers/dri/intel/intel_screen.c b/src/mesa/drivers/dri/intel/intel_screen.c
|
||||||
|
index 5ca9b66..96d448c 100644
|
||||||
|
--- a/src/mesa/drivers/dri/intel/intel_screen.c
|
||||||
|
+++ b/src/mesa/drivers/dri/intel/intel_screen.c
|
||||||
|
@@ -108,13 +108,15 @@ intelDRI2Flush(__DRIdrawable *drawable)
|
||||||
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
|
struct intel_context *intel = intel_context(ctx);
|
||||||
|
|
||||||
|
- if (intel->gen < 4)
|
||||||
|
- INTEL_FIREVERTICES(intel);
|
||||||
|
+ if (intel != NULL) {
|
||||||
|
+ if (intel->gen < 4)
|
||||||
|
+ INTEL_FIREVERTICES(intel);
|
||||||
|
|
||||||
|
- intel->need_throttle = GL_TRUE;
|
||||||
|
+ intel->need_throttle = GL_TRUE;
|
||||||
|
|
||||||
|
- if (intel->batch.used)
|
||||||
|
- intel_batchbuffer_flush(intel);
|
||||||
|
+ if (intel->batch.used)
|
||||||
|
+ intel_batchbuffer_flush(intel);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
static const struct __DRI2flushExtensionRec intelFlushExtension = {
|
||||||
|
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c
|
||||||
|
index 2bcbf06..1e327a0 100644
|
||||||
|
--- a/src/mesa/main/texgetimage.c
|
||||||
|
+++ b/src/mesa/main/texgetimage.c
|
||||||
|
@@ -713,6 +713,9 @@ _mesa_GetnTexImageARB( GLenum target, GLint level, GLenum format,
|
||||||
|
texObj = _mesa_get_current_tex_object(ctx, target);
|
||||||
|
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
|
||||||
|
|
||||||
|
+ if (_mesa_is_zero_size_texture(texImage))
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE)) {
|
||||||
|
_mesa_debug(ctx, "glGetTexImage(tex %u) format = %s, w=%d, h=%d,"
|
||||||
|
" dstFmt=0x%x, dstType=0x%x\n",
|
||||||
|
@@ -846,6 +849,9 @@ _mesa_GetnCompressedTexImageARB(GLenum target, GLint level, GLsizei bufSize,
|
||||||
|
texObj = _mesa_get_current_tex_object(ctx, target);
|
||||||
|
texImage = _mesa_select_tex_image(ctx, texObj, target, level);
|
||||||
|
|
||||||
|
+ if (_mesa_is_zero_size_texture(texImage))
|
||||||
|
+ return;
|
||||||
|
+
|
||||||
|
if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE)) {
|
||||||
|
_mesa_debug(ctx,
|
||||||
|
"glGetCompressedTexImage(tex %u) format = %s, w=%d, h=%d\n",
|
||||||
|
diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h
|
||||||
|
index 19abc64..534cc1b 100644
|
||||||
|
--- a/src/mesa/main/teximage.h
|
||||||
|
+++ b/src/mesa/main/teximage.h
|
||||||
|
@@ -42,6 +42,14 @@ _mesa_alloc_texmemory(GLsizei bytes);
|
||||||
|
extern void
|
||||||
|
_mesa_free_texmemory(void *m);
|
||||||
|
|
||||||
|
+/** Is any of the dimensions of given texture equal to zero? */
|
||||||
|
+static inline GLboolean
|
||||||
|
+_mesa_is_zero_size_texture(const struct gl_texture_image *texImage)
|
||||||
|
+{
|
||||||
|
+ return (texImage->Width == 0 ||
|
||||||
|
+ texImage->Height == 0 ||
|
||||||
|
+ texImage->Depth == 0);
|
||||||
|
+}
|
||||||
|
|
||||||
|
/** \name Internal functions */
|
||||||
|
/*@{*/
|
12
mesa-7.6-hush-vblank-warning.patch
Normal file
12
mesa-7.6-hush-vblank-warning.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -up mesa-20090813/src/mesa/drivers/dri/common/vblank.c.jx mesa-20090813/src/mesa/drivers/dri/common/vblank.c
|
||||||
|
--- mesa-20090813/src/mesa/drivers/dri/common/vblank.c.jx 2009-08-13 09:28:01.000000000 -0400
|
||||||
|
+++ mesa-20090813/src/mesa/drivers/dri/common/vblank.c 2009-09-08 14:07:51.000000000 -0400
|
||||||
|
@@ -256,7 +256,7 @@ static int do_wait( drmVBlank * vbl, GLu
|
||||||
|
if ( ret != 0 ) {
|
||||||
|
static GLboolean first_time = GL_TRUE;
|
||||||
|
|
||||||
|
- if ( first_time ) {
|
||||||
|
+ if (0) {
|
||||||
|
fprintf(stderr,
|
||||||
|
"%s: drmWaitVBlank returned %d, IRQs don't seem to be"
|
||||||
|
" working correctly.\nTry adjusting the vblank_mode"
|
46
mesa-no-mach64.patch
Normal file
46
mesa-no-mach64.patch
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
diff -up mesa-20110620/configure.ac.no-mach64 mesa-20110620/configure.ac
|
||||||
|
--- mesa-20110620/configure.ac.no-mach64 2011-06-20 12:19:16.000000000 +1000
|
||||||
|
+++ mesa-20110620/configure.ac 2011-06-20 13:52:27.000000000 +1000
|
||||||
|
@@ -1022,7 +1022,7 @@ if test "$mesa_driver" = dri -o "$mesa_d
|
||||||
|
# the new interface. i810 are missing because there is no
|
||||||
|
# x86-64 system where they could *ever* be used.
|
||||||
|
if test "x$DRI_DIRS" = "xyes"; then
|
||||||
|
- DRI_DIRS="i915 i965 mach64 mga nouveau r128 r200 r300 r600 \
|
||||||
|
+ DRI_DIRS="i915 i965 mga nouveau r128 r200 r300 r600 \
|
||||||
|
radeon savage tdfx unichrome swrast"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
@@ -1030,13 +1030,13 @@ if test "$mesa_driver" = dri -o "$mesa_d
|
||||||
|
# Build only the drivers for cards that exist on PowerPC.
|
||||||
|
# At some point MGA will be added, but not yet.
|
||||||
|
if test "x$DRI_DIRS" = "xyes"; then
|
||||||
|
- DRI_DIRS="mach64 r128 r200 r300 r600 radeon tdfx swrast"
|
||||||
|
+ DRI_DIRS="r128 r200 r300 r600 radeon tdfx swrast"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
sparc*)
|
||||||
|
# Build only the drivers for cards that exist on sparc`
|
||||||
|
if test "x$DRI_DIRS" = "xyes"; then
|
||||||
|
- DRI_DIRS="mach64 r128 r200 r300 r600 radeon swrast"
|
||||||
|
+ DRI_DIRS="r128 r200 r300 r600 radeon swrast"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
@@ -1050,7 +1050,7 @@ if test "$mesa_driver" = dri -o "$mesa_d
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "x$DRI_DIRS" = "xyes"; then
|
||||||
|
- DRI_DIRS="i810 i915 i965 mach64 mga nouveau r128 r200 r300 r600 \
|
||||||
|
+ DRI_DIRS="i810 i915 i965 mga nouveau r128 r200 r300 r600 \
|
||||||
|
radeon tdfx unichrome savage sis swrast"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
@@ -1079,7 +1079,7 @@ if test "$mesa_driver" = dri -o "$mesa_d
|
||||||
|
|
||||||
|
# default drivers
|
||||||
|
if test "x$DRI_DIRS" = "xyes"; then
|
||||||
|
- DRI_DIRS="i810 i915 i965 mach64 mga nouveau r128 r200 r300 r600 radeon \
|
||||||
|
+ DRI_DIRS="i810 i915 i965 mga nouveau r128 r200 r300 r600 radeon \
|
||||||
|
savage sis tdfx unichrome swrast"
|
||||||
|
fi
|
||||||
|
|
4
sources
4
sources
@ -1 +1,3 @@
|
|||||||
SHA512 (mesa-20.0.2.tar.xz) = d6ffc29bbc5b908cb0f08fa1b5a83e029b76c7b697c488a73e6bb60990a55beeb3ecdba1745868f6885ee2f660975f5debf7d2c9418e0a96e2f7049e83fd89ab
|
6ae05158e678f4594343f32c2ca50515 gl-manpages-1.0.1.tar.bz2
|
||||||
|
333f61aac5367c8b7b9ea22943c448b1 mesa-20111103.tar.xz
|
||||||
|
0837c52698fe3252369c3fdb5195afcc MesaLib-7.11.2.tar.bz2
|
||||||
|
Loading…
Reference in New Issue
Block a user