Rebuild with new git snapshot

- Remove upstreamed patches
This commit is contained in:
Richard Hughes 2012-04-24 17:47:33 +01:00
parent 5a541d6a41
commit 43e76b84ef
7 changed files with 21 additions and 357 deletions

1
.gitignore vendored
View File

@ -34,3 +34,4 @@ mesa-20100720.tar.bz2
/MesaLib-8.0.tar.bz2
/MesaLib-8.0.1.tar.bz2
/MesaLib-8.0.2.tar.bz2
/mesa-20120424.tar.xz

View File

@ -1,52 +0,0 @@
From 89e796aef5ca1b35ca4ff6fce9231b4125e07037 Mon Sep 17 00:00:00 2001
From: Dylan Noblesmith <nobled@dreamwidth.org>
Date: Fri, 16 Mar 2012 18:38:49 +0000
Subject: [PATCH] intel: fix null dereference processing HiZ buffer
Or technically, a near-null dereference.
https://bugs.freedesktop.org/show_bug.cgi?id=46303
https://bugs.freedesktop.org/show_bug.cgi?id=46739
NOTE: This is a candidate for the 8.0 branch.
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
(cherry picked from commit 8d9decb75f0df564abaf9888d9fc5c77de8059cd)
---
src/mesa/drivers/dri/intel/intel_context.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index d3c0d70..9cdd804 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -1225,6 +1225,10 @@ intel_process_dri2_buffer_with_separate_stencil(struct intel_context *intel,
if (!rb)
return;
+ /* Check if we failed to allocate the depth miptree earlier. */
+ if (buffer->attachment == __DRI_BUFFER_HIZ && rb->mt == NULL)
+ return;
+
/* If the renderbuffer's and DRIbuffer's regions match, then continue. */
if ((buffer->attachment != __DRI_BUFFER_HIZ &&
rb->mt &&
@@ -1266,6 +1270,7 @@ intel_process_dri2_buffer_with_separate_stencil(struct intel_context *intel,
* due to failure to allocate new storage.
*/
if (buffer->attachment == __DRI_BUFFER_HIZ) {
+ assert(rb->mt);
intel_miptree_release(&rb->mt->hiz_mt);
} else {
intel_miptree_release(&rb->mt);
@@ -1291,6 +1296,7 @@ intel_process_dri2_buffer_with_separate_stencil(struct intel_context *intel,
/* Associate buffer with new storage. */
if (buffer->attachment == __DRI_BUFFER_HIZ) {
+ assert(rb->mt);
rb->mt->hiz_mt = mt;
} else {
rb->mt = mt;
--
1.7.7.6

View File

@ -1,12 +0,0 @@
diff -up mesa-20120105/configure.ac.jx mesa-20120105/configure.ac
--- mesa-20120105/configure.ac.jx 2012-01-05 14:03:26.000000000 -0500
+++ mesa-20120105/configure.ac 2012-01-05 14:35:14.559990582 -0500
@@ -1775,7 +1775,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|sed -e 's/-DNDEBUG\>//g' -e 's/-pedantic//g'`
- LLVM_LIBS="`$LLVM_CONFIG --libs`"
+ LLVM_LIBS="-lLLVM-`llvm-config --version` -lstdc++"
LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags`
DEFINES="$DEFINES -D__STDC_CONSTANT_MACROS"

View File

@ -1,17 +1,3 @@
diff -up Mesa-8.0.1/src/glx/drisw_glx.c.jx Mesa-8.0.1/src/glx/drisw_glx.c
--- Mesa-8.0.1/src/glx/drisw_glx.c.jx 2012-04-02 10:34:23.000000000 -0400
+++ Mesa-8.0.1/src/glx/drisw_glx.c 2012-04-02 11:44:19.296407735 -0400
@@ -274,7 +274,9 @@ swrastShmGetImage(__DRIdrawable *read, c
do {
int i;
char *src = ximage->data;
- int dst_width = align(ximage->width * ximage->bits_per_pixel / 8, 256);
+ int bytes_per_pixel = ((ximage->bits_per_pixel + 7) / 8);
+ int dst_width = align(ximage->width * bytes_per_pixel,
+ 64 * bytes_per_pixel);
for (i = 0; i < ximage->height; i++) {
memcpy(data, src, ximage->bytes_per_line);
diff -up Mesa-8.0.1/src/mesa/state_tracker/st_manager.c.jx Mesa-8.0.1/src/mesa/state_tracker/st_manager.c
--- Mesa-8.0.1/src/mesa/state_tracker/st_manager.c.jx 2012-02-14 18:44:00.000000000 -0500
+++ Mesa-8.0.1/src/mesa/state_tracker/st_manager.c 2012-04-02 12:02:14.613964417 -0400

View File

@ -1,265 +0,0 @@
diff --git a/docs/relnotes-8.0.1.html b/docs/relnotes-8.0.1.html
index 8c8cd3f..29a314c 100644
--- a/docs/relnotes-8.0.1.html
+++ b/docs/relnotes-8.0.1.html
@@ -28,7 +28,9 @@ for DRI hardware acceleration.
<h2>MD5 checksums</h2>
<pre>
-tdb
+4855c2d93bd2ebd43f384bdcc92c9a27 MesaLib-8.0.1.tar.gz
+24eeebf66971809d8f40775a379b36c9 MesaLib-8.0.1.tar.bz2
+54e745d14dac5717f7f65b4e2d5c1df2 MesaLib-8.0.1.zip
</pre>
<h2>New features</h2>
diff --git a/src/gallium/auxiliary/rtasm/rtasm_cpu.c b/src/gallium/auxiliary/rtasm/rtasm_cpu.c
index 0461c81..7afcf14 100644
--- a/src/gallium/auxiliary/rtasm/rtasm_cpu.c
+++ b/src/gallium/auxiliary/rtasm/rtasm_cpu.c
@@ -25,43 +25,43 @@
*
**************************************************************************/
+#include "pipe/p_config.h"
+#include "rtasm_cpu.h"
+
+#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
#include "util/u_debug.h"
-#include "rtasm_cpu.h"
+#include "util/u_cpu_detect.h"
+DEBUG_GET_ONCE_BOOL_OPTION(nosse, "GALLIUM_NOSSE", FALSE);
-#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
-static boolean rtasm_sse_enabled(void)
+static struct util_cpu_caps *get_cpu_caps(void)
{
- static boolean firsttime = 1;
- static boolean enabled;
-
- /* This gets called quite often at the moment:
- */
- if (firsttime) {
- enabled = !debug_get_bool_option("GALLIUM_NOSSE", FALSE);
- firsttime = FALSE;
- }
- return enabled;
+ util_cpu_detect();
+ return &util_cpu_caps;
}
-#endif
int rtasm_cpu_has_sse(void)
{
- /* FIXME: actually detect this at run-time */
-#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
- return rtasm_sse_enabled();
-#else
- return 0;
-#endif
+ return !debug_get_option_nosse() && get_cpu_caps()->has_sse;
}
int rtasm_cpu_has_sse2(void)
{
- /* FIXME: actually detect this at run-time */
-#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)
- return rtasm_sse_enabled();
+ return !debug_get_option_nosse() && get_cpu_caps()->has_sse2;
+}
+
+
#else
+
+int rtasm_cpu_has_sse(void)
+{
return 0;
-#endif
}
+
+int rtasm_cpu_has_sse2(void)
+{
+ return 0;
+}
+
+#endif
diff --git a/src/gallium/drivers/r300/compiler/radeon_program_alu.c b/src/gallium/drivers/r300/compiler/radeon_program_alu.c
index dd1dfb3..c48f936 100644
--- a/src/gallium/drivers/r300/compiler/radeon_program_alu.c
+++ b/src/gallium/drivers/r300/compiler/radeon_program_alu.c
@@ -1165,35 +1165,79 @@ int radeonTransformDeriv(struct radeon_compiler* c,
}
/**
+ * IF Temp[0].x -> IF Temp[0].x
+ * ... -> ...
+ * KILP -> KIL -abs(Temp[0].x)
+ * ... -> ...
+ * ENDIF -> ENDIF
+ *
+ * === OR ===
+ *
* IF Temp[0].x -\
* KILP - > KIL -abs(Temp[0].x)
* ENDIF -/
*
- * This needs to be done in its own pass, because it modifies the instructions
- * before and after KILP.
+ * === OR ===
+ *
+ * IF Temp[0].x -> IF Temp[0].x
+ * ... -> ...
+ * ELSE -> ELSE
+ * ... -> ...
+ * KILP -> KIL -abs(Temp[0].x)
+ * ... -> ...
+ * ENDIF -> ENDIF
+ *
+ * === OR ===
+ *
+ * KILP -> KIL -none.1111
+ *
+ * This needs to be done in its own pass, because it might modify the
+ * instructions before and after KILP.
*/
void rc_transform_KILP(struct radeon_compiler * c, void *user)
{
struct rc_instruction * inst;
for (inst = c->Program.Instructions.Next;
inst != &c->Program.Instructions; inst = inst->Next) {
+ struct rc_instruction * if_inst;
+ unsigned in_if = 0;
if (inst->U.I.Opcode != RC_OPCODE_KILP)
continue;
+ for (if_inst = inst->Prev; if_inst != &c->Program.Instructions;
+ if_inst = if_inst->Prev) {
+
+ if (if_inst->U.I.Opcode == RC_OPCODE_IF) {
+ in_if = 1;
+ break;
+ }
+ }
+
inst->U.I.Opcode = RC_OPCODE_KIL;
- if (inst->Prev->U.I.Opcode != RC_OPCODE_IF
- || inst->Next->U.I.Opcode != RC_OPCODE_ENDIF) {
+ if (!in_if) {
inst->U.I.SrcReg[0] = negate(builtin_one);
} else {
-
+ /* This should work even if the KILP is inside the ELSE
+ * block, because -0.0 is considered negative. */
inst->U.I.SrcReg[0] =
- negate(absolute(inst->Prev->U.I.SrcReg[0]));
- /* Remove IF */
- rc_remove_instruction(inst->Prev);
- /* Remove ENDIF */
- rc_remove_instruction(inst->Next);
+ negate(absolute(if_inst->U.I.SrcReg[0]));
+
+ if (inst->Prev->U.I.Opcode != RC_OPCODE_IF
+ && inst->Next->U.I.Opcode != RC_OPCODE_ENDIF) {
+
+ /* Optimize the special case:
+ * IF Temp[0].x
+ * KILP
+ * ENDIF
+ */
+
+ /* Remove IF */
+ rc_remove_instruction(inst->Prev);
+ /* Remove ENDIF */
+ rc_remove_instruction(inst->Next);
+ }
}
}
}
diff --git a/src/gallium/drivers/svga/svga_screen.c b/src/gallium/drivers/svga/svga_screen.c
index 82a3ff2..e22deb4 100644
--- a/src/gallium/drivers/svga/svga_screen.c
+++ b/src/gallium/drivers/svga/svga_screen.c
@@ -235,7 +235,7 @@ static int svga_get_shader_param(struct pipe_screen *screen, unsigned shader, en
case PIPE_SHADER_CAP_MAX_TEMPS:
if (!sws->get_cap(sws, SVGA3D_DEVCAP_MAX_FRAGMENT_SHADER_TEMPS, &result))
return 32;
- return result.u;
+ return MIN2(result.u, SVGA3D_TEMPREG_MAX);
case PIPE_SHADER_CAP_MAX_ADDRS:
case PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR:
/*
@@ -286,7 +286,7 @@ static int svga_get_shader_param(struct pipe_screen *screen, unsigned shader, en
case PIPE_SHADER_CAP_MAX_TEMPS:
if (!sws->get_cap(sws, SVGA3D_DEVCAP_MAX_VERTEX_SHADER_TEMPS, &result))
return 32;
- return result.u;
+ return MIN2(result.u, SVGA3D_TEMPREG_MAX);
case PIPE_SHADER_CAP_MAX_ADDRS:
return 1;
case PIPE_SHADER_CAP_MAX_PREDS:
diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c b/src/mesa/drivers/dri/i965/brw_eu_emit.c
index 3347157..b2581da 100644
--- a/src/mesa/drivers/dri/i965/brw_eu_emit.c
+++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c
@@ -2188,7 +2188,7 @@ void brw_fb_WRITE(struct brw_compile *p,
msg_type,
msg_length,
header_present,
- 1, /* last render target write */
+ eot, /* last render target write */
response_length,
eot,
0 /* send_commit_msg */);
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index a2959a8..4b27e06 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -1159,17 +1159,17 @@ _mesa_GetBufferParameterivARB(GLenum target, GLenum pname, GLint *params)
*params = _mesa_bufferobj_mapped(bufObj);
return;
case GL_BUFFER_ACCESS_FLAGS:
- if (ctx->VersionMajor < 3)
+ if (!ctx->Extensions.ARB_map_buffer_range)
goto invalid_pname;
*params = bufObj->AccessFlags;
return;
case GL_BUFFER_MAP_OFFSET:
- if (ctx->VersionMajor < 3)
+ if (!ctx->Extensions.ARB_map_buffer_range)
goto invalid_pname;
*params = (GLint) bufObj->Offset;
return;
case GL_BUFFER_MAP_LENGTH:
- if (ctx->VersionMajor < 3)
+ if (!ctx->Extensions.ARB_map_buffer_range)
goto invalid_pname;
*params = (GLint) bufObj->Length;
return;
@@ -1210,7 +1210,7 @@ _mesa_GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params)
*params = simplified_access_mode(bufObj->AccessFlags);
return;
case GL_BUFFER_ACCESS_FLAGS:
- if (ctx->VersionMajor < 3)
+ if (!ctx->Extensions.ARB_map_buffer_range)
goto invalid_pname;
*params = bufObj->AccessFlags;
return;
@@ -1218,12 +1218,12 @@ _mesa_GetBufferParameteri64v(GLenum target, GLenum pname, GLint64 *params)
*params = _mesa_bufferobj_mapped(bufObj);
return;
case GL_BUFFER_MAP_OFFSET:
- if (ctx->VersionMajor < 3)
+ if (!ctx->Extensions.ARB_map_buffer_range)
goto invalid_pname;
*params = bufObj->Offset;
return;
case GL_BUFFER_MAP_LENGTH:
- if (ctx->VersionMajor < 3)
+ if (!ctx->Extensions.ARB_map_buffer_range)
goto invalid_pname;
*params = bufObj->Length;
return;

View File

@ -20,28 +20,26 @@
%define _default_patch_fuzz 2
%define manpages gl-manpages-1.0.1
#% define gitdate 20120126
%define gitdate 20120424
#% define snapshot
Summary: Mesa graphics libraries
Name: mesa
Version: 8.0.2
Release: 4%{?dist}
Version: 8.1
Release: 0.1%{?dist}
License: MIT
Group: System Environment/Libraries
URL: http://www.mesa3d.org
#Source0: http://downloads.sf.net/mesa3d/MesaLib-%{version}.tar.bz2
#Source0: http://www.mesa3d.org/beta/MesaLib-%{version}%{?snapshot}.tar.bz2
Source0: ftp://ftp.freedesktop.org/pub/%{name}/%{version}/MesaLib-%{version}.tar.bz2
#Source0: %{name}-%{gitdate}.tar.xz
#Source0: ftp://ftp.freedesktop.org/pub/%{name}/%{version}/MesaLib-%{version}.tar.bz2
Source0: %{name}-%{gitdate}.tar.xz
Source2: %{manpages}.tar.bz2
Source3: make-git-snapshot.sh
#Patch7: mesa-7.1-link-shared.patch
Patch8: mesa-7.10-llvmcore.patch
Patch9: mesa-8.0-llvmpipe-shmget.patch
Patch10: 0001-intel-fix-null-dereference-processing-HiZ-buffer.patch
Patch11: mesa-8.0-nouveau-tfp-blacklist.patch
Patch12: mesa-8.0.1-fix-16bpp.patch
@ -271,12 +269,10 @@ Requires(postun): /sbin/ldconfig
Mesa shared glapi
%prep
%setup -q -n Mesa-%{version}%{?snapshot} -b2
#setup -q -n mesa-%{gitdate} -b2
#% setup -q -n Mesa-%{version}%{?snapshot} -b2
%setup -q -n mesa-%{gitdate} -b2
#patch7 -p1 -b .dricore
%patch8 -p1 -b .llvmcore
%patch9 -p1 -b .shmget
%patch10 -p1 -b .intel-hiz-fix
#%patch9 -p1 -b .shmget
%patch11 -p1 -b .nouveau
%patch12 -p1 -b .16bpp
@ -354,6 +350,10 @@ pushd $RPM_BUILD_ROOT%{_includedir}/GL
rm -f [vw]*.h
popd
# remove .la files
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
rm -f $RPM_BUILD_ROOT%{_libdir}/dri/*.la
# man pages
pushd ../%{manpages}
make %{?_smp_mflags} install DESTDIR=$RPM_BUILD_ROOT
@ -417,11 +417,14 @@ rm -rf $RPM_BUILD_ROOT
%files dri-drivers
%defattr(-,root,root,-)
%config(noreplace) %{_sysconfdir}/drirc
%if %{with_hardware}
%{_libdir}/dri/radeon_dri.so
%{_libdir}/dri/r200_dri.so
%{_libdir}/dri/r300_dri.so
%{_libdir}/dri/r600_dri.so
%{_libdir}/dri/libdricore.so
%{_libdir}/dri/libglsl.so
%ifarch %{ix86} x86_64 ia64
%{_libdir}/dri/i915_dri.so
%ifnarch ia64
@ -550,6 +553,10 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
* Tue Apr 24 2012 Richard Hughes <rhughes@redhat.com> 8.0.3-0.1
- Rebuild with new git snapshot
- Remove upstreamed patches
* Tue Apr 24 2012 Karsten Hopp <karsten@redhat.com> 8.0.2-4
- disable llvm on PPC(64) in Fedora as recommended in bugzilla 769803

View File

@ -1,2 +1 @@
6ae05158e678f4594343f32c2ca50515 gl-manpages-1.0.1.tar.bz2
a368104e5700707048dc3e8691a9a7a1 MesaLib-8.0.2.tar.bz2
a8e677338c53a4fcb0fc5fcf52ed5d40 mesa-20120424.tar.xz