10.2-rc4 upstream release, add back radeonsi hack

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
This commit is contained in:
Igor Gnatenko 2014-05-24 11:07:57 +04:00
parent c0e013caf5
commit 26ff2a1b0a
4 changed files with 23 additions and 95 deletions

1
.gitignore vendored
View File

@ -72,3 +72,4 @@ mesa-20100720.tar.bz2
/mesa-20140505.tar.xz
/mesa-20140510.tar.xz
/mesa-20140517.tar.xz
/mesa-20140524.tar.xz

View File

@ -53,13 +53,13 @@
%define _default_patch_fuzz 2
%define gitdate 20140517
%define gitdate 20140524
#% define snapshot
Summary: Mesa graphics libraries
Name: mesa
Version: 10.2
Release: 0.5.rc3.%{gitdate}%{?dist}
Release: 0.6.rc4.%{gitdate}%{?dist}
License: MIT
Group: System Environment/Libraries
URL: http://www.mesa3d.org
@ -87,6 +87,8 @@ Patch21: 0001-mesa-Don-t-optimize-out-glClear-if-drawbuffer-size-i.patch
# https://bugs.freedesktop.org/show_bug.cgi?id=73512
Patch99: 0001-opencl-use-versioned-.so-in-mesa.icd.patch
Patch100: radeonsi-llvm-version-hack.patch
BuildRequires: pkgconfig autoconf automake libtool
%if %{with_hardware}
BuildRequires: kernel-headers
@ -355,6 +357,8 @@ grep -q ^/ src/gallium/auxiliary/vl/vl_decoder.c && exit 1
%patch99 -p1 -b .icd
%endif
%patch100 -p1 -b .radeonsi_llvm_hack
%if 0%{with_private_llvm}
sed -i 's/llvm-config/mesa-private-llvm-config-%{__isa_bits}/g' configure.ac
sed -i 's/`$LLVM_CONFIG --version`/&-mesa/' configure.ac
@ -672,6 +676,10 @@ rm -rf $RPM_BUILD_ROOT
%endif
%changelog
* Sat May 24 2014 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 10.2-0.6.rc4.20140524
- 10.2-rc4 upstream release
- add back updated radeonsi hack for LLVM
* Sat May 17 2014 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 10.2-0.5.rc3.20140517
- 10.2-rc3 upstream release

View File

@ -1,93 +1,12 @@
diff --git a/src/gallium/drivers/radeonsi/si_descriptors.c b/src/gallium/drivers/radeonsi/si_descriptors.c
index 0c58d5f..7922f10 100644
--- a/src/gallium/drivers/radeonsi/si_descriptors.c
+++ b/src/gallium/drivers/radeonsi/si_descriptors.c
@@ -152,7 +152,7 @@ static void si_update_descriptors(struct si_context *sctx,
7 + /* copy */
(4 + desc->element_dw_size) * util_bitcount(desc->dirty_mask) + /* update */
4; /* pointer update */
-#if HAVE_LLVM >= 0x0305
+#if HAVE_LLVM >= 0x0304
if (desc->shader_userdata_reg >= R_00B130_SPI_SHADER_USER_DATA_VS_0 &&
desc->shader_userdata_reg < R_00B230_SPI_SHADER_USER_DATA_GS_0)
desc->atom.num_dw += 4; /* second pointer update */
@@ -177,7 +177,7 @@ static void si_emit_shader_pointer(struct si_context *sctx,
radeon_emit(cs, va);
radeon_emit(cs, va >> 32);
diff -uNr mesa-20140521.orig/configure.ac mesa-20140521/configure.ac
--- mesa-20140521.orig/configure.ac 2014-05-21 20:11:53.662619590 +0400
+++ mesa-20140521/configure.ac 2014-05-21 20:14:19.361398680 +0400
@@ -1642,7 +1642,7 @@
LLVM_COMPONENTS="${LLVM_COMPONENTS} option"
fi
fi
- DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT -DLLVM_VERSION_PATCH=$LLVM_VERSION_PATCH"
+ DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT -DLLVM_VERSION_PATCH=1"
MESA_LLVM=1
-#if HAVE_LLVM >= 0x0305
+#if HAVE_LLVM >= 0x0304
if (desc->shader_userdata_reg >= R_00B130_SPI_SHADER_USER_DATA_VS_0 &&
desc->shader_userdata_reg < R_00B230_SPI_SHADER_USER_DATA_GS_0) {
radeon_emit(cs, PKT3(PKT3_SET_SH_REG, 2, 0));
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index 873115b..3f23ff1 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -224,7 +224,7 @@ static int si_get_param(struct pipe_screen* pscreen, enum pipe_cap param)
return 4;
case PIPE_CAP_GLSL_FEATURE_LEVEL:
- return HAVE_LLVM >= 0x0305 ? 330 : 140;
+ return HAVE_LLVM >= 0x0304 ? 330 : 140;
case PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE:
return MIN2(sscreen->b.info.vram_size, 0xFFFFFFFF);
@@ -308,7 +308,7 @@ static int si_get_shader_param(struct pipe_screen* pscreen, unsigned shader, enu
case PIPE_SHADER_VERTEX:
break;
case PIPE_SHADER_GEOMETRY:
-#if HAVE_LLVM < 0x0305
+#if HAVE_LLVM < 0x0304
return 0;
#endif
break;
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c
index 6d5408b..1434986 100644
--- a/src/gallium/drivers/radeonsi/si_state.c
+++ b/src/gallium/drivers/radeonsi/si_state.c
@@ -2173,7 +2173,7 @@ static void *si_create_fs_state(struct pipe_context *ctx,
return si_create_shader_state(ctx, state, PIPE_SHADER_FRAGMENT);
}
-#if HAVE_LLVM >= 0x0305
+#if HAVE_LLVM >= 0x0304
static void *si_create_gs_state(struct pipe_context *ctx,
const struct pipe_shader_state *state)
@@ -2203,7 +2203,7 @@ static void si_bind_vs_shader(struct pipe_context *ctx, void *state)
sctx->vs_shader = sel;
}
-#if HAVE_LLVM >= 0x0305
+#if HAVE_LLVM >= 0x0304
static void si_bind_gs_shader(struct pipe_context *ctx, void *state)
{
@@ -2271,7 +2271,7 @@ static void si_delete_vs_shader(struct pipe_context *ctx, void *state)
si_delete_shader_selector(ctx, sel);
}
-#if HAVE_LLVM >= 0x0305
+#if HAVE_LLVM >= 0x0304
static void si_delete_gs_shader(struct pipe_context *ctx, void *state)
{
@@ -2767,7 +2767,7 @@ static void si_bind_vs_sampler_states(struct pipe_context *ctx, unsigned count,
si_set_sampler_states(sctx, pm4, count, states,
&sctx->samplers[PIPE_SHADER_VERTEX],
R_00B130_SPI_SHADER_USER_DATA_VS_0);
-#if HAVE_LLVM >= 0x0305
+#if HAVE_LLVM >= 0x0304
si_set_sampler_states(sctx, pm4, count, states,
&sctx->samplers[PIPE_SHADER_VERTEX],
R_00B330_SPI_SHADER_USER_DATA_ES_0);
@@ -2999,7 +2999,7 @@ void si_init_state_functions(struct si_context *sctx)
sctx->b.b.bind_fs_state = si_bind_ps_shader;
sctx->b.b.delete_vs_state = si_delete_vs_shader;
sctx->b.b.delete_fs_state = si_delete_ps_shader;
-#if HAVE_LLVM >= 0x0305
+#if HAVE_LLVM >= 0x0304
sctx->b.b.create_gs_state = si_create_gs_state;
sctx->b.b.bind_gs_state = si_bind_gs_shader;
sctx->b.b.delete_gs_state = si_delete_gs_shader;
dnl Check for Clang internal headers

View File

@ -1 +1 @@
64a559f0c5de6c5f2842c8a654b1bb5b mesa-20140517.tar.xz
54f729f3128ad0bcb26d942f97527447 mesa-20140524.tar.xz