From 8eed6ac677f55f05e2d11933c570bdda007511b26ba875bb115929aa82e0f725 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Sun, 20 Apr 2008 18:35:26 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/Mesa?expand=0&rev=35 --- Mesa.changes | 9 ++++ Mesa.spec | 23 ++++------- unichrome-context.diff | 94 ++++++++++++++++++++++++++++++++++++++++++ via.csh | 6 --- via.sh | 6 --- 5 files changed, 112 insertions(+), 26 deletions(-) create mode 100644 unichrome-context.diff delete mode 100644 via.csh delete mode 100644 via.sh diff --git a/Mesa.changes b/Mesa.changes index e7ba5e3..436eca6 100644 --- a/Mesa.changes +++ b/Mesa.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Apr 14 23:56:57 CEST 2008 - sndirsch@suse.de + +- unichrome-context.diff + * Do not clear the current context before attempting to use it. + (bnc #285496) +- no longer need to use LIBGL_ALWAYS_INDIRECT=1 on via hardware + (bnc #285496) + ------------------------------------------------------------------- Thu Apr 10 12:54:45 CEST 2008 - ro@suse.de diff --git a/Mesa.spec b/Mesa.spec index ed979d0..64069a0 100644 --- a/Mesa.spec +++ b/Mesa.spec @@ -20,20 +20,19 @@ Provides: xorg-x11-Mesa Obsoletes: xorg-x11-Mesa AutoReqProv: on Version: 7.0.3 -Release: 23 +Release: 25 Summary: Mesa is a 3-D graphics library with an API which is very similar to that of OpenGL Source: MesaLib-%{version}.tar.bz2 Source1: MesaDemos-%{version}.tar.bz2 Source3: README.updates Source4: manual-pages.tar.bz2 -Source5: via.csh -Source6: via.sh Patch0: disable-sis_dri.diff Patch1: dri_driver_dir.diff Patch2: i915-crossbar.diff Patch4: libIndirectGL.diff Patch5: static.diff Patch6: link-shared.diff +Patch7: unichrome-context.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -123,6 +122,7 @@ rm -rf src/glw/ %ifarch %ix86 x86_64 ppc %patch6 %endif +%patch7 -p1 %build @@ -201,12 +201,6 @@ mkdir -p $RPM_BUILD_ROOT/usr/%{_lib}/dri/updates install -m 644 $RPM_SOURCE_DIR/README.updates \ $RPM_BUILD_ROOT/usr/%{_lib}/dri/updates %endif -%if %suse_version > 1010 -%ifnarch s390 s390x ppc64 -mkdir -p $RPM_BUILD_ROOT/etc/profile.d -install -m 644 $RPM_SOURCE_DIR/via.{sh,csh} $RPM_BUILD_ROOT/etc/profile.d -%endif -%endif %clean rm -rf $RPM_BUILD_ROOT @@ -218,11 +212,6 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %doc docs/README* docs/COPYING -%if %suse_version > 1010 -%ifnarch s390 s390x ppc64 -/etc/profile.d/via.* -%endif -%endif /usr/include/GL/gl.h /usr/include/GL/glext.h /usr/include/GL/glx.h @@ -271,6 +260,12 @@ rm -rf $RPM_BUILD_ROOT /usr/%{_lib}/libMesaGL.a %changelog +* Tue Apr 15 2008 sndirsch@suse.de +- unichrome-context.diff + * Do not clear the current context before attempting to use it. + (bnc #285496) +- no longer need to use LIBGL_ALWAYS_INDIRECT=1 on via hardware + (bnc #285496) * Thu Apr 10 2008 ro@suse.de - added baselibs.conf file to build xxbit packages for multilib support diff --git a/unichrome-context.diff b/unichrome-context.diff new file mode 100644 index 0000000..9b5e6ab --- /dev/null +++ b/unichrome-context.diff @@ -0,0 +1,94 @@ +From c75a717af6aee750f673ff1809faf69e8fe2527a Mon Sep 17 00:00:00 2001 +From: Luc Verhaegen +Date: Mon, 14 Apr 2008 22:51:36 +0200 +Subject: [PATCH] unichrome: Do not clear the current context before attempting to use it. + +Beautified from Gabriel Mansi's (gabriel.mansi@gmail.com) original patch, +available from http://rudin.suse.de:8888/attachment.cgi?id=181709 +--- + src/mesa/drivers/dri/unichrome/via_context.c | 56 +++++++++++++------------ + 1 files changed, 29 insertions(+), 27 deletions(-) + +diff --git a/src/mesa/drivers/dri/unichrome/via_context.c b/src/mesa/drivers/dri/unichrome/via_context.c +index 1d5b1e0..d489d80 100644 +--- a/src/mesa/drivers/dri/unichrome/via_context.c ++++ b/src/mesa/drivers/dri/unichrome/via_context.c +@@ -686,46 +686,48 @@ void + viaDestroyContext(__DRIcontextPrivate *driContextPriv) + { + GET_CURRENT_CONTEXT(ctx); +- struct via_context *vmesa = ++ struct via_context *vmesa = + (struct via_context *)driContextPriv->driverPrivate; + struct via_context *current = ctx ? VIA_CONTEXT(ctx) : NULL; ++ + assert(vmesa); /* should never be null */ + ++ if (vmesa->driDrawable) { ++ viaWaitIdle(vmesa, GL_FALSE); ++ ++ if (vmesa->doPageFlip) { ++ LOCK_HARDWARE(vmesa); ++ if (vmesa->pfCurrentOffset != 0) { ++ fprintf(stderr, "%s - reset pf\n", __FUNCTION__); ++ viaResetPageFlippingLocked(vmesa); ++ } ++ UNLOCK_HARDWARE(vmesa); ++ } ++ } ++ + /* check if we're deleting the currently bound context */ + if (vmesa == current) { + VIA_FLUSH_DMA(vmesa); + _mesa_make_current(NULL, NULL, NULL); + } + +- if (vmesa) { +- viaWaitIdle(vmesa, GL_FALSE); +- if (vmesa->doPageFlip) { +- LOCK_HARDWARE(vmesa); +- if (vmesa->pfCurrentOffset != 0) { +- fprintf(stderr, "%s - reset pf\n", __FUNCTION__); +- viaResetPageFlippingLocked(vmesa); +- } +- UNLOCK_HARDWARE(vmesa); +- } +- +- _swsetup_DestroyContext(vmesa->glCtx); +- _tnl_DestroyContext(vmesa->glCtx); +- _vbo_DestroyContext(vmesa->glCtx); +- _swrast_DestroyContext(vmesa->glCtx); +- /* free the Mesa context */ +- _mesa_destroy_context(vmesa->glCtx); +- /* release our data */ +- FreeBuffer(vmesa); ++ _swsetup_DestroyContext(vmesa->glCtx); ++ _tnl_DestroyContext(vmesa->glCtx); ++ _vbo_DestroyContext(vmesa->glCtx); ++ _swrast_DestroyContext(vmesa->glCtx); ++ /* free the Mesa context */ ++ _mesa_destroy_context(vmesa->glCtx); ++ /* release our data */ ++ FreeBuffer(vmesa); + +- assert (is_empty_list(&vmesa->tex_image_list[VIA_MEM_AGP])); +- assert (is_empty_list(&vmesa->tex_image_list[VIA_MEM_VIDEO])); +- assert (is_empty_list(&vmesa->tex_image_list[VIA_MEM_SYSTEM])); +- assert (is_empty_list(&vmesa->freed_tex_buffers)); ++ assert (is_empty_list(&vmesa->tex_image_list[VIA_MEM_AGP])); ++ assert (is_empty_list(&vmesa->tex_image_list[VIA_MEM_VIDEO])); ++ assert (is_empty_list(&vmesa->tex_image_list[VIA_MEM_SYSTEM])); ++ assert (is_empty_list(&vmesa->freed_tex_buffers)); + +- driDestroyOptionCache(&vmesa->optionCache); ++ driDestroyOptionCache(&vmesa->optionCache); + +- FREE(vmesa); +- } ++ FREE(vmesa); + } + + +-- +1.4.3.4 + diff --git a/via.csh b/via.csh deleted file mode 100644 index 0081473..0000000 --- a/via.csh +++ /dev/null @@ -1,6 +0,0 @@ -if ( -r /var/log/Xorg.0.log ) then - grep -q \"via\" /var/log/Xorg.0.log - if ( $? == 0 ) then - setenv LIBGL_ALWAYS_INDIRECT 1 - endif -endif diff --git a/via.sh b/via.sh deleted file mode 100644 index 95d0866..0000000 --- a/via.sh +++ /dev/null @@ -1,6 +0,0 @@ -if [ -r /var/log/Xorg.0.log ]; then - grep -q \"via\" /var/log/Xorg.0.log - if [ $? -eq 0 ]; then - export LIBGL_ALWAYS_INDIRECT=1 - fi -fi