diff -u mesa-7.10.1/debian/libgl1-mesa-swx11.prerm mesa-7.10.1/debian/libgl1-mesa-swx11.prerm --- mesa-7.10.1/debian/libgl1-mesa-swx11.prerm +++ mesa-7.10.1/debian/libgl1-mesa-swx11.prerm @@ -8,7 +8,7 @@ case "$1" in remove) # Use alternatives to make it easier to switch between Mesa and 3rd party modules - update-alternatives --remove gl_conf /usr/lib/GL/ld.so.conf + update-alternatives --remove gl_conf /usr/lib/mesa/ld.so.conf # explicit ldconfig due to alternatives ldconfig diff -u mesa-7.10.1/debian/rules mesa-7.10.1/debian/rules --- mesa-7.10.1/debian/rules +++ mesa-7.10.1/debian/rules @@ -185,7 +185,7 @@ # for 32 bit compatibility on 64 bit systems # # Add /usr/lib/dri-alternates for classic fallback for gallium drivers -ifeq ($(DEB_BUILD_ARCH),i386) +ifeq ($(DEB_HOST_ARCH),i386) confflags-dri += --with-dri-searchpath=/usr/lib/dri:/usr/lib/dri-alternates:/usr/lib32/dri:/usr/lib32/dri-alternates else confflags-dri += --with-dri-searchpath=/usr/lib/dri:/usr/lib/dri-alternates @@ -284,7 +284,7 @@ echo "/usr/lib/mesa" \ > $(CURDIR)/debian/libgl1-mesa-swx11/usr/lib/mesa/ld.so.conf -ifeq ($(DEB_BUILD_ARCH),amd64) +ifeq ($(DEB_HOST_ARCH),amd64) # Add the path to 32bit libGL from Mesa (on 64 bit) echo "/usr/lib32/mesa" \ >> $(CURDIR)/debian/libgl1-mesa-glx/usr/lib/mesa/ld.so.conf diff -u mesa-7.10.1/debian/libgl1-mesa-glx.prerm mesa-7.10.1/debian/libgl1-mesa-glx.prerm --- mesa-7.10.1/debian/libgl1-mesa-glx.prerm +++ mesa-7.10.1/debian/libgl1-mesa-glx.prerm @@ -8,7 +8,7 @@ case "$1" in remove) # Use alternatives to make it easier to switch between Mesa and 3rd party modules - update-alternatives --remove gl_conf /usr/lib/GL/ld.so.conf + update-alternatives --remove gl_conf /usr/lib/mesa/ld.so.conf # explicit ldconfig due to alternatives ldconfig diff -u mesa-7.10.1/debian/changelog mesa-7.10.1/debian/changelog --- mesa-7.10.1/debian/changelog +++ mesa-7.10.1/debian/changelog @@ -1,3 +1,18 @@ +mesa (7.10.1-0ubuntu4~snb) natty; urgency=low + + [ Robert Hooker ] + * Cherry-pick upstream commit 6c324777a685d28d0a81d23157e4863240552999 + to fix a major performance problem with unity on Intel + Sandybridge GPUs. + + [ Steve Langasek ] + * Fix alternatives removal on removal of libgl1-mesa-{swx11,glx}: the + files are in /usr/lib/mesa, not /usr/lib/GL. + * The architecture we're building for is DEB_HOST_ARCH, not + DEB_BUILD_ARCH. + + -- Robert Hooker Wed, 23 Mar 2011 15:51:12 -0400 + mesa (7.10.1-0ubuntu3) natty; urgency=low * debian/patches/113_partially_fix_tls.diff: diff -u mesa-7.10.1/debian/patches/series mesa-7.10.1/debian/patches/series --- mesa-7.10.1/debian/patches/series +++ mesa-7.10.1/debian/patches/series @@ -7,6 +7,7 @@ # Ubuntu patches. 100_no_abi_tag.patch 101_ubuntu_hidden_glname.patch +102_i965_bump_VS_thread_number.patch 103_savage-expose_fbmodes_with_nonzero_alpha.patch 105_use_shared_libdricore.patch 108_fix_leaks_dri2_screen_creation.patch only in patch2: unchanged: --- mesa-7.10.1.orig/debian/patches/102_i965_bump_VS_thread_number.patch +++ mesa-7.10.1/debian/patches/102_i965_bump_VS_thread_number.patch @@ -0,0 +1,62 @@ +From 71bb87af9d720abb728136b4b61782ee26f6e0da Mon Sep 17 00:00:00 2001 +From: Zou Nan hai +Date: Tue, 1 Mar 2011 10:39:35 +0800 +Subject: [PATCH 1/2] i965: bump VS thread number to 60 on SNB + +Signed-off-by: Zou Nan hai +--- + src/mesa/drivers/dri/i965/brw_vs_emit.c | 10 +++++++++- + src/mesa/drivers/dri/i965/gen6_vs_state.c | 3 ++- + 2 files changed, 11 insertions(+), 2 deletions(-) + +diff --git a/src/mesa/drivers/dri/i965/brw_vs_emit.c b/src/mesa/drivers/dri/i965/brw_vs_emit.c +index 0411ce0..6ec6255 100644 +--- a/src/mesa/drivers/dri/i965/brw_vs_emit.c ++++ b/src/mesa/drivers/dri/i965/brw_vs_emit.c +@@ -1561,6 +1561,7 @@ static void emit_vertex_write( struct brw_vs_compile *c) + int eot; + GLuint len_vertex_header = 2; + int next_mrf, i; ++ int msg_len; + + if (c->key.copy_edgeflag) { + brw_MOV(p, +@@ -1727,13 +1728,20 @@ static void emit_vertex_write( struct brw_vs_compile *c) + + eot = (c->first_overflow_output == 0); + ++ msg_len = c->nr_outputs + 2 + len_vertex_header; ++ if (intel->gen >= 6) { ++ /* interleaved urb write message length for gen6 should be multiple of 2 */ ++ if ((msg_len % 2) != 0) ++ msg_len++; ++ } ++ + brw_urb_WRITE(p, + brw_null_reg(), /* dest */ + 0, /* starting mrf reg nr */ + c->r0, /* src */ + 0, /* allocate */ + 1, /* used */ +- MIN2(c->nr_outputs + 1 + len_vertex_header, (BRW_MAX_MRF-1)), /* msg len */ ++ MIN2(msg_len - 1, (BRW_MAX_MRF - 1)), /* msg len */ + 0, /* response len */ + eot, /* eot */ + eot, /* writes complete */ +diff --git a/src/mesa/drivers/dri/i965/gen6_vs_state.c b/src/mesa/drivers/dri/i965/gen6_vs_state.c +index ed132bd..20dfb13 100644 +--- a/src/mesa/drivers/dri/i965/gen6_vs_state.c ++++ b/src/mesa/drivers/dri/i965/gen6_vs_state.c +@@ -136,7 +136,8 @@ upload_vs_state(struct brw_context *brw) + OUT_BATCH((1 << GEN6_VS_DISPATCH_START_GRF_SHIFT) | + (brw->vs.prog_data->urb_read_length << GEN6_VS_URB_READ_LENGTH_SHIFT) | + (0 << GEN6_VS_URB_ENTRY_READ_OFFSET_SHIFT)); +- OUT_BATCH((0 << GEN6_VS_MAX_THREADS_SHIFT) | ++ ++ OUT_BATCH(((60 - 1) << GEN6_VS_MAX_THREADS_SHIFT) | /* max 60 threads for gen6 */ + GEN6_VS_STATISTICS_ENABLE | + GEN6_VS_ENABLE); + ADVANCE_BATCH(); +-- +1.7.4.1 +