[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

mesa: Changes to 'debian-experimental'



 configs/debian-dri-default |    4 
 debian/changelog           |   25 +++
 debian/copyright           |  299 +++------------------------------------------
 debian/rules               |    2 
 4 files changed, 53 insertions(+), 277 deletions(-)

New commits:
commit 85d882983f6760f699b8248ed3b012e067056b7f
Author: Julien Cristau <jcristau@debian.org>
Date:   Sun Dec 14 09:59:33 2008 +0530

    Prepare changelog for upload

diff --git a/debian/changelog b/debian/changelog
index 640eb61..3d28285 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,11 @@
-mesa (7.0.3-7) UNRELEASED; urgency=low
+mesa (7.0.3-7) unstable; urgency=low
 
   * Cherry-pick patch from upstream:
     Use 3Dnow! x86-64 routines only on processors that support 3Dnow!
     (closes: #484180).
   * Also build the x86-specific dri drivers on kfreebsd (closes: #492894).
 
- -- Julien Cristau <jcristau@debian.org>  Sun, 26 Oct 2008 15:27:10 +0100
+ -- Julien Cristau <jcristau@debian.org>  Sun, 14 Dec 2008 07:34:58 +0530
 
 mesa (7.0.3-6) unstable; urgency=high
 

commit 0206e20240e5f3f48431567a1afc955272362321
Author: Julien Cristau <jcristau@debian.org>
Date:   Sun Oct 26 15:58:46 2008 +0100

    Also build the x86-specific dri drivers on kfreebsd (closes: #492894).

diff --git a/configs/debian-dri-default b/configs/debian-dri-default
index 2a01bf8..b42bfc3 100644
--- a/configs/debian-dri-default
+++ b/configs/debian-dri-default
@@ -22,7 +22,7 @@ DRI_DIRS = mach64 mga r128 r200 r300 radeon s3v savage tdfx trident
 
 ARCH_X86 = i386 amd64
 
-ifneq ($(findstring $(DEB_BUILD_ARCH), $(ARCH_X86)),)
+ifneq ($(filter $(DEB_HOST_ARCH_CPU), $(ARCH_X86)),)
 	DRI_DIRS += i810 i915 i965 sis unichrome
 endif
 
diff --git a/debian/changelog b/debian/changelog
index cf2fd6d..640eb61 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ mesa (7.0.3-7) UNRELEASED; urgency=low
   * Cherry-pick patch from upstream:
     Use 3Dnow! x86-64 routines only on processors that support 3Dnow!
     (closes: #484180).
+  * Also build the x86-specific dri drivers on kfreebsd (closes: #492894).
 
  -- Julien Cristau <jcristau@debian.org>  Sun, 26 Oct 2008 15:27:10 +0100
 
diff --git a/debian/rules b/debian/rules
index 3d00bb7..6a66df1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -22,9 +22,11 @@ endif
 
 DEB_BUILD_ARCH     ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
 DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_ARCH_CPU  ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
 DEB_BUILD_DIR      ?= $(CURDIR)/obj-$(DEB_BUILD_GNU_TYPE)
 
 export DEB_BUILD_ARCH
+export DEB_HOST_ARCH_CPU
 
 # choose which configurations to build
 SWX11_GLU_CONFIGS =

commit 83a4719056284993a5c441c1b1d662d1c2c69de1
Author: Julien Cristau <jcristau@debian.org>
Date:   Sun Oct 26 15:34:37 2008 +0100

    Update changelog

diff --git a/debian/changelog b/debian/changelog
index 299a63d..cf2fd6d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+mesa (7.0.3-7) UNRELEASED; urgency=low
+
+  * Cherry-pick patch from upstream:
+    Use 3Dnow! x86-64 routines only on processors that support 3Dnow!
+    (closes: #484180).
+
+ -- Julien Cristau <jcristau@debian.org>  Sun, 26 Oct 2008 15:27:10 +0100
+
 mesa (7.0.3-6) unstable; urgency=high
 
   * Update debian/copyright to the SGI Free Software License B, version 2.0.

commit 6cfe871c754b896a2a9993e33d5056705ae7f486
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Sun Sep 28 20:31:46 2008 -0700

    Use 3Dnow! x86-64 routines only on processors that support 3Dnow!
    
    Added an x86-64 CPUID function and use it to detect 3Dnow!  If 3Dnow!
    is available, use _mesa_3dnow_transform_points4_3d_no_rot,
    _mesa_3dnow_transform_points4_perspective,
    _mesa_3dnow_transform_points4_2d_no_rot, and _mesa_3dnow_transform_points4_2d.
    
    This fixes long standing bug #8724.
    (cherry picked from commit 2b8d8989fb6f9c36baf166fc715182a1407ebadb)

diff --git a/src/mesa/x86-64/x86-64.c b/src/mesa/x86-64/x86-64.c
index 09508b6..d15c076 100644
--- a/src/mesa/x86-64/x86-64.c
+++ b/src/mesa/x86-64/x86-64.c
@@ -42,7 +42,10 @@
 #include "math/m_debug.h"
 #endif
 
+extern void _mesa_x86_64_cpuid(unsigned int *regs);
+
 DECLARE_XFORM_GROUP( x86_64, 4 )
+DECLARE_XFORM_GROUP( 3dnow, 4 )
 
 #else
 /* just to silence warning below */
@@ -82,6 +85,7 @@ static void message( const char *msg )
 void _mesa_init_all_x86_64_transform_asm(void)
 {
 #ifdef USE_X86_64_ASM
+   unsigned int regs[4];
 
    if ( _mesa_getenv( "MESA_NO_ASM" ) ) {
      return;
@@ -89,24 +93,32 @@ void _mesa_init_all_x86_64_transform_asm(void)
 
    message("Initializing x86-64 optimizations\n");
 
-   ASSIGN_XFORM_GROUP( x86_64, 4 );
 
-   /*
    _mesa_transform_tab[4][MATRIX_GENERAL] =
       _mesa_x86_64_transform_points4_general;
    _mesa_transform_tab[4][MATRIX_IDENTITY] =
       _mesa_x86_64_transform_points4_identity;
    _mesa_transform_tab[4][MATRIX_3D] =
       _mesa_x86_64_transform_points4_3d;
-   _mesa_transform_tab[4][MATRIX_3D_NO_ROT] =
-      _mesa_x86_64_transform_points4_3d_no_rot;
-   _mesa_transform_tab[4][MATRIX_PERSPECTIVE] =
-      _mesa_x86_64_transform_points4_perspective;
-   _mesa_transform_tab[4][MATRIX_2D_NO_ROT] =
-      _mesa_x86_64_transform_points4_2d_no_rot;
-   _mesa_transform_tab[4][MATRIX_2D] =
-      _mesa_x86_64_transform_points4_2d;
-   */
+
+   regs[0] = 0x80000001;
+   regs[1] = 0x00000000;
+   regs[2] = 0x00000000;
+   regs[3] = 0x00000000;
+   _mesa_x86_64_cpuid(regs);
+   if (regs[3] & (1U << 31)) {
+      message("3Dnow! detected\n");
+      _mesa_transform_tab[4][MATRIX_3D_NO_ROT] =
+	  _mesa_3dnow_transform_points4_3d_no_rot;
+      _mesa_transform_tab[4][MATRIX_PERSPECTIVE] =
+	  _mesa_3dnow_transform_points4_perspective;
+      _mesa_transform_tab[4][MATRIX_2D_NO_ROT] =
+	  _mesa_3dnow_transform_points4_2d_no_rot;
+      _mesa_transform_tab[4][MATRIX_2D] =
+	  _mesa_3dnow_transform_points4_2d;
+
+   }
+
    
 #ifdef DEBUG_MATH
    _math_test_all_transform_functions("x86_64");
diff --git a/src/mesa/x86-64/xform4.S b/src/mesa/x86-64/xform4.S
index f512b3a..51aeb99 100644
--- a/src/mesa/x86-64/xform4.S
+++ b/src/mesa/x86-64/xform4.S
@@ -29,7 +29,22 @@
 .text
 
 .align 16
+.globl _mesa_x86_64_cpuid
+_mesa_x86_64_cpuid:
+	pushq	%rbx
+	movl	(%rdi), %eax
+	movl	8(%rdi), %ecx
+
+	cpuid
+
+	movl	%ebx, 4(%rdi)
+	movl	%eax, (%rdi)
+	movl	%ecx, 8(%rdi)
+	movl	%edx, 12(%rdi)
+	popq	%rbx
+	ret
 
+.align 16
 .globl _mesa_x86_64_transform_points4_general
 _mesa_x86_64_transform_points4_general:
 /*
@@ -204,8 +219,8 @@ p4_identity_done:
 
 	
 .align 16
-.globl _mesa_x86_64_transform_points4_3d_no_rot
-_mesa_x86_64_transform_points4_3d_no_rot:
+.globl _mesa_3dnow_transform_points4_3d_no_rot
+_mesa_3dnow_transform_points4_3d_no_rot:
 
 	movl V4F_COUNT(%rdx), %ecx	/* count */
 	movzx V4F_STRIDE(%rdx), %eax	/* stride */
@@ -268,8 +283,8 @@ p4_3d_no_rot_done:
 
 	
 .align 16
-.globl _mesa_x86_64_transform_points4_perspective
-_mesa_x86_64_transform_points4_perspective:
+.globl _mesa_3dnow_transform_points4_perspective
+_mesa_3dnow_transform_points4_perspective:
 
 	movl V4F_COUNT(%rdx), %ecx	/* count */
 	movzx V4F_STRIDE(%rdx), %eax	/* stride */
@@ -334,8 +349,8 @@ p4_perspective_done:
 	ret
 
 .align 16
-.globl _mesa_x86_64_transform_points4_2d_no_rot
-_mesa_x86_64_transform_points4_2d_no_rot:
+.globl _mesa_3dnow_transform_points4_2d_no_rot
+_mesa_3dnow_transform_points4_2d_no_rot:
 
 	movl V4F_COUNT(%rdx), %ecx	/* count */
 	movzx V4F_STRIDE(%rdx), %eax	/* stride */
@@ -389,8 +404,8 @@ p4_2d_no_rot_done:
 
 	
 .align 16
-.globl _mesa_x86_64_transform_points4_2d
-_mesa_x86_64_transform_points4_2d:
+.globl _mesa_3dnow_transform_points4_2d
+_mesa_3dnow_transform_points4_2d:
 
 	movl V4F_COUNT(%rdx), %ecx	/* count */
 	movzx V4F_STRIDE(%rdx), %eax	/* stride */

commit 07c1fcc604379f42ee337300ada421287ba82875
Author: Julien Cristau <jcristau@debian.org>
Date:   Sat Sep 20 16:31:30 2008 +0200

    Prepare changelog for upload

diff --git a/debian/changelog b/debian/changelog
index ee29787..299a63d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,10 @@
-mesa (7.0.3-6) UNRELEASED; urgency=low
+mesa (7.0.3-6) unstable; urgency=high
 
   * Update debian/copyright to the SGI Free Software License B, version 2.0.
     It now mirrors the free X11 license used by X.Org (closes: #368560).
     http://www.sgi.com/company_info/newsroom/press_releases/2008/september/opengl.html
 
- -- Julien Cristau <jcristau@debian.org>  Fri, 19 Sep 2008 18:02:55 +0200
+ -- Julien Cristau <jcristau@debian.org>  Sat, 20 Sep 2008 16:30:44 +0200
 
 mesa (7.0.3-5) unstable; urgency=low
 

commit 7959b95efa7e451e938b3a04074f034102be095c
Author: Julien Cristau <jcristau@debian.org>
Date:   Fri Sep 19 18:03:59 2008 +0200

    Update debian/copyright to the SGI Free Software License B, version 2.0.
    
    It now mirrors the free X11 license used by X.Org (closes: #368560).
    http://www.sgi.com/company_info/newsroom/press_releases/2008/september/opengl.html

diff --git a/debian/changelog b/debian/changelog
index af22184..ee29787 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+mesa (7.0.3-6) UNRELEASED; urgency=low
+
+  * Update debian/copyright to the SGI Free Software License B, version 2.0.
+    It now mirrors the free X11 license used by X.Org (closes: #368560).
+    http://www.sgi.com/company_info/newsroom/press_releases/2008/september/opengl.html
+
+ -- Julien Cristau <jcristau@debian.org>  Fri, 19 Sep 2008 18:02:55 +0200
+
 mesa (7.0.3-5) unstable; urgency=low
 
   * Disable the i915tex driver, it doesn't build against libdrm 2.3.1.
diff --git a/debian/copyright b/debian/copyright
index 03ac1d5..d38eb4b 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -65,283 +65,32 @@ License:
 Some files, as listed below, are made available under the SGI Free B 
 license.  This license is as follows:
 
-           SGI FREE SOFTWARE LICENSE B (Version 1.1 [02/22/2000])
-
-1.  Definitions.
-
-1.1. "Additional Notice Provisions" means such additional provisions as
-     appear in the Notice in Original Code under the heading "Additional
-     Notice Provisions."
-
-1.2. "Covered Code" means the Original Code or Modifications, or any
-     combination thereof.
-
-1.3. "Hardware" means any physical device that accepts input, processes
-     input, stores the results of processing, and/or provides output.
-
-1.4. "Larger Work" means a work that combines Covered Code or portions
-     thereof with code not governed by the terms of this License.
-
-1.5. "Licensable" means having the right to grant, to the maximum extent
-     possible, whether at the time of the initial grant or subsequently
-     acquired, any and all of the rights conveyed herein.
-
-1.6. "License" means this document.
-
-1.7. "Licensed Patents" means patent claims Licensable by SGI that are
-     infringed by the use or sale of Original Code or any Modifications
-     provided by SGI, or any combination thereof.
-
-1.8. "Modifications" means any addition to or deletion from the
-     substance or structure of the Original Code or any previous
-     Modifications. When Covered Code is released as a series of files,
-     a Modification is: 
-
-     A. Any addition to the contents of a file containing Original Code
-        and/or addition to or deletion from the contents of a file
-        containing previous Modifications.
-
-     B. Any new file that contains any part of the Original Code or
-        previous Modifications.
-
-1.9. "Notice" means any notice in Original Code or Covered Code, as
-     required by and in compliance with this License.
-
-1.10. "Original Code" means source code of computer software code that
-      is described in the source code Notice required by Exhibit A as
-      Original Code, and updates and error corrections specifically 
-      thereto.
-
-1.11. "Recipient" means an individual or a legal entity exercising
-      rights under, and complying with all of the terms of, this License
-      or a future version of this License issued under Section 8. For
-      legal entities, "Recipient" includes any entity that controls, is
-      controlled by, or is under common control with Recipient. For
-      purposes of this definition, "control" of an entity means (a) the
-      power, direct or indirect, to direct or manage such entity, or (b)
-      ownership of fifty percent (50%) or more of the outstanding shares
-      or beneficial ownership of such entity.
-
-1.12. "Recipient Patents" means patent claims Licensable by a Recipient
-      that are infringed by the use or sale of Original Code or any
-      Modifications provided by SGI, or any combination thereof.
-
-1.13. "SGI" means Silicon Graphics, Inc.
-
-1.14. "SGI Patents" means patent claims Licensable by SGI other than the
-      Licensed Patents.
-
-2.  License Grant and Restrictions.
-
-2.1. SGI License Grant. Subject to the terms of this License and any
-     third party intellectual property claims, for the duration of
-     intellectual property protections inherent in the Original Code,
-     SGI hereby grants Recipient a worldwide, royalty-free,
-     non-exclusive license, to do the following: (i) under copyrights
-     Licensable by SGI, to reproduce, distribute, create derivative
-     works from, and, to the extent applicable, display and perform the
-     Original Code and/or any Modifications provided by SGI alone and/or
-     as part of a Larger Work; and (ii) under any Licensable Patents, to
-     make, have made, use, sell, offer for sale, import and/or otherwise
-     transfer the Original Code and/or any Modifications provided by
-     SGI. Recipient accepts the terms and conditions of this License by
-     undertaking any of the aforementioned actions. The patent license
-     shall apply to the Covered Code if, at the time any related
-     Modification is added, such addition of the Modification causes
-     such combination to be covered by the Licensed Patents. The patent
-     license in Section 2.1(ii) shall not apply to any other
-     combinations that include the Modification. No patent license is
-     provided under SGI Patents for infringements of SGI Patents by
-     Modifications not provided by SGI or combinations of Original Code
-     and Modifications not provided by SGI.
-
-2.2. Recipient License Grant. Subject to the terms of this License and
-     any third party intellectual property claims, Recipient hereby
-     grants SGI and any other Recipients a worldwide, royalty-free,
-     non-exclusive license, under any Recipient Patents, to make, have
-     made, use, sell, offer for sale, import and/or otherwise transfer
-     the Original Code and/or any Modifications provided by SGI.
-
-2.3. No License For Hardware Implementations. The licenses granted in
-     Section 2.1 and 2.2 are not applicable to implementation in
-     Hardware of the algorithms embodied in the Original Code or any
-     Modifications provided by SGI .
-
-3.  Redistributions. 
-
-3.1. Retention of Notice/Copy of License. The Notice set forth in
-     Exhibit A, below, must be conspicuously retained or included in any
-     and all redistributions of Covered Code. For distributions of the
-     Covered Code in source code form, the Notice must appear in every
-     file that can include a text comments field; in executable form,
-     the Notice and a copy of this License must appear in related
-     documentation or collateral where the Recipient’s rights relating
-     to Covered Code are described. Any Additional Notice Provisions
-     which actually appears in the Original Code must also be retained
-     or included in any and all redistributions of Covered Code.
-
-3.2. Alternative License. Provided that Recipient is in compliance with
-     the terms of this License, Recipient may, so long as without
-     derogation of any of SGI’s rights in and to the Original Code,
-     distribute the source code and/or executable version(s) of Covered
-     Code under (1) this License; (2) a license identical to this
-     License but for only such changes as are necessary in order to
-     clarify Recipient’s role as licensor of Modifications; and/or (3) a
-     license of Recipient’s choosing, containing terms different from
-     this License, provided that the license terms include this Section
-     3 and Sections 4, 6, 7, 10, 12, and 13, which terms may not be
-     modified or superseded by any other terms of such license. If
-     Recipient elects to use any license other than this License,
-     Recipient must make it absolutely clear that any of its terms which
-     differ from this License are offered by Recipient alone, and not by
-     SGI. It is emphasized that this License is a limited license, and,
-     regardless of the license form employed by Recipient in accordance
-     with this Section 3.2, Recipient may relicense only such rights, in
-     Original Code and Modifications by SGI, as it has actually been
-     granted by SGI in this License.
-
-3.3. Indemnity. Recipient hereby agrees to indemnify SGI for any
-     liability incurred by SGI as a result of any such alternative
-     license terms Recipient offers.
-
-4.  Termination. This License and the rights granted hereunder will
-    terminate automatically if Recipient breaches any term herein and
-    fails to cure such breach within 30 days thereof. Any sublicense to 
-    the Covered Code that is properly granted shall survive any
-    termination of this License, absent termination by the terms of such
-    sublicense. Provisions that, by their nature, must remain in effect
-    beyond the termination of this License, shall survive.
-
-5.  No Trademark Or Other Rights. This License does not grant any rights
-    to: (i) any software apart from the Covered Code, nor shall any
-    other rights or licenses not expressly granted hereunder arise by
-    implication, estoppel or otherwise with respect to the Covered Code;
-    (ii) any trade name, trademark or service mark whatsoever, including
-    without limitation any related right for purposes of endorsement or
-    promotion of products derived from the Covered Code, without prior
-    written permission of SGI; or (iii) any title to or ownership of the
-    Original Code, which shall at all times remains with SGI. All rights
-    in the Original Code not expressly granted under this License are
-    reserved.
-
-6.  Compliance with Laws; Non-Infringement. There are various worldwide
-    laws, regulations, and executive orders applicable to dispositions
-    of Covered Code, including without limitation export, re-export, and
-    import control laws, regulations, and executive orders, of the U.S.
-    government and other countries, and Recipient is reminded it is
-    obliged to obey such laws, regulations, and executive orders.
-    Recipient may not distribute Covered Code that (i) in any way
-    infringes (directly or contributorily) any intellectual property
-    rights of any kind of any other person or entity or (ii) breaches
-    any representation or warranty, express, implied or statutory, to
-    which, under any applicable law, it might be deemed to have been
-    subject.
-
-7.  Claims of Infringement. If Recipient learns of any third party claim
-    that any disposition of Covered Code and/or functionality wholly or
-    partially infringes the third party's intellectual property rights,
-    Recipient will promptly notify SGI of such claim.
-
-8.  Versions of the License. SGI may publish revised and/or new versions
-    of the License from time to time, each with a distinguishing version
-    number. Once Covered Code has been published under a particular
-    version of the License, Recipient may, for the duration of the
-    license, continue to use it under the terms of that version, or
-    choose to use such Covered Code under the terms of any subsequent
-    version published by SGI. Subject to the provisions of Sections 3
-    and 4 of this License, only SGI may modify the terms applicable to
-    Covered Code created under this License.
-
-9.  DISCLAIMER OF WARRANTY. COVERED CODE IS PROVIDED "AS IS." ALL
-    EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS ARE DISCLAIMED,
-    INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS
-    OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR
-    PURPOSE, AND NON-INFRINGEMENT. SGI ASSUMES NO RISK AS TO THE QUALITY
-    AND PERFORMANCE OF THE SOFTWARE. SHOULD THE SOFTWARE PROVE DEFECTIVE
-    IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR SERVICING,
-    REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY IS AN ESSENTIAL
-    PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED
-    HEREUNDER EXCEPT SUBJECT TO THIS DISCLAIMER.
-
-10.  LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES NOR LEGAL THEORY,
-     WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT
-     LIABILITY), CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR
-     BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR
-     CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT
-     LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, LOSS OF
-     DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
-     COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
-     INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-     LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
-     RESULTING FROM SGI's NEGLIGENCE TO THE EXTENT APPLICABLE LAW
-     PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
-     EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
-     THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO RECIPIENT.
-
-11.  Indemnity. Recipient shall be solely responsible for damages
-     arising, directly or indirectly, out of its utilization of rights
-     under this License. Recipient will defend, indemnify and hold
-     harmless Silicon Graphics, Inc. from and against any loss,
-     liability, damages, costs or expenses (including the payment of
-     reasonable attorneys fees) arising out of Recipient's use,
-     modification, reproduction and distribution of the Covered Code or
-     out of any representation or warranty made by Recipient.
-
-12.  U.S. Government End Users. The Covered Code is a "commercial item"
-     consisting of "commercial computer software" as such terms are
-     defined in title 48 of the Code of Federal Regulations and all U.S.
-     Government End Users acquire only the rights set forth in this
-     License and are subject to the terms of this License.
-
-13.  Miscellaneous. This License represents the complete agreement
-     concerning the its subject matter. If any provision of this License
-     is held to be unenforceable, such provision shall be reformed so as
-     to achieve as nearly as possible the same legal and economic effect
-     as the original provision and the remainder of this License will
-     remain in effect. This License shall be governed by and construed
-     in accordance with the laws of the United States and the State of
-     California as applied to agreements entered into and to be
-     performed entirely within California between California residents.
-     Any litigation relating to this License shall be subject to the
-     exclusive jurisdiction of the Federal Courts of the Northern
-     District of California (or, absent subject matter jurisdiction in
-     such courts, the courts of the State of California), with venue
-     lying exclusively in Santa Clara County, California, with the
-     losing party responsible for costs, including without limitation,
-     court costs and reasonable attorneys fees and expenses. The
-     application of the United Nations Convention on Contracts for the
-     International Sale of Goods is expressly excluded. Any law or
-     regulation that provides that the language of a contract shall be
-     construed against the drafter shall not apply to this License.
-
-Exhibit A
-
-License Applicability. Except to the extent portions of this file are
-made subject to an alternative license as permitted in the SGI Free
-Software License B, Version 1.1 (the "License"), the contents of this
-file are subject only to the provisions of the License. You may not use
-this file except in compliance with the License. You may obtain a copy
-of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
-Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
-
-http://oss.sgi.com/projects/FreeB
-
-Note that, as provided in the License, the Software is distributed on an
-"AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
-DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
-CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
-PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
-
-Original Code. The Original Code is: [name of software, version number,
-and release date], developed by Silicon Graphics, Inc. The Original Code
-is Copyright (c) [dates of first publication, as appearing in the Notice
-in the Original Code] Silicon Graphics, Inc. Copyright in any portions
-created by third parties is as indicated elsewhere herein. All Rights
+SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008)
+
+Copyright (C) [dates of first publication] Silicon Graphics, Inc. All Rights
 Reserved.
 
-Additional Notice Provisions: [such additional provisions, if any, as 
-appear in the Notice in the Original Code under the heading "Additional 
-Notice Provisions"]
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+The above copyright notice including the dates of first publication and either
+this permission notice or a reference to http://oss.sgi.com/projects/FreeB/
+shall be included in all copies or substantial portions of the Software.
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL SILICON GRAPHICS, INC. BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
+IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
+Except as contained in this notice, the name of Silicon Graphics, Inc. shall
+not be used in advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization from Silicon
+Graphics, Inc.
 
 --------------------------------------------------------------------------
 

commit e325b764447ffd05e6a052f0aeb33d7dba62e357
Author: Julien Cristau <jcristau@debian.org>
Date:   Sat Jul 12 18:56:22 2008 +0200

    Prepare changelog for upload

diff --git a/debian/changelog b/debian/changelog
index 7c8d4de..af22184 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,9 @@
-mesa (7.0.3-5) UNRELEASED; urgency=low
+mesa (7.0.3-5) unstable; urgency=low
 
   * Disable the i915tex driver, it doesn't build against libdrm 2.3.1.
   * Pull from mesa_7_0_branch (27425708).
 
- -- Julien Cristau <jcristau@debian.org>  Tue, 08 Jul 2008 18:16:24 +0200
+ -- Julien Cristau <jcristau@debian.org>  Sat, 12 Jul 2008 18:56:19 +0200
 
 mesa (7.0.3-4) unstable; urgency=low
 

commit 34eedc6a9839e6dd551659a7990f5e28161df1e1
Author: Julien Cristau <jcristau@debian.org>
Date:   Sat Jul 12 18:55:55 2008 +0200

    update changelog

diff --git a/debian/changelog b/debian/changelog
index 20ff8d3..7c8d4de 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 mesa (7.0.3-5) UNRELEASED; urgency=low
 
   * Disable the i915tex driver, it doesn't build against libdrm 2.3.1.
+  * Pull from mesa_7_0_branch (27425708).
 
  -- Julien Cristau <jcristau@debian.org>  Tue, 08 Jul 2008 18:16:24 +0200
 

commit 27425708f51b0534a4f77f3779f401c8f05903ed
Author: Brian Paul <brian.paul@tungstengraphics.com>
Date:   Wed Jul 9 15:06:49 2008 -0600

    mesa: return -1, not GL_FALSE if _glapi_add_dispatch() fails name sanity check

diff --git a/src/mesa/glapi/glapi.c b/src/mesa/glapi/glapi.c
index 47c5782..0aca9f4 100644
--- a/src/mesa/glapi/glapi.c
+++ b/src/mesa/glapi/glapi.c
@@ -724,7 +724,7 @@ add_function_name( const char * funcName )
  * \returns
  * The offset in the dispatch table of the named function.  A pointer to the
  * driver's implementation of the named function should be stored at
- * \c dispatch_table[\c offset].
+ * \c dispatch_table[\c offset].  Return -1 if error/problem.
  *
  * \sa glXGetProcAddress
  *
@@ -773,7 +773,7 @@ _glapi_add_dispatch( const char * const * function_names,
        */
 
       if (!function_names[i] || function_names[i][0] != 'g' || function_names[i][1] != 'l')
-	return GL_FALSE;
+         return -1;
    
       /* Determine if the named function already exists.  If the function does
        * exist, it must have the same parameter signature as the function

commit fc07b6cda0b421850471338330d2d11f44f0f12d
Author: Brian Paul <brian.paul@tungstengraphics.com>
Date:   Wed Jul 9 08:58:47 2008 -0600

    ARB program, GLSL fixes

diff --git a/docs/relnotes-7.0.4.html b/docs/relnotes-7.0.4.html
index df156aa..a2fc54d 100644
--- a/docs/relnotes-7.0.4.html
+++ b/docs/relnotes-7.0.4.html
@@ -30,6 +30,8 @@ Mesa 7.0.4 is a stable release with bug fixes since version 7.0.3.
 <li>Fixed GLSL linker bug causing generic vertex attributes to get aliased
 <li>Fixed stack overflow when using glPixelZoom on Windows
 <li>Fixed broken all(bvec2) GLSL function, added misc missing bvec constructors
+<li>ARB program "state.clip[n].plane" didn't parse correctly
+<li>Fixed broken glGetUniformiv() (bug 13774)
 </ul>
 
 <h2>Changes</h2>

commit 562ed27eb50396c5a81202c64d3326577ce2d019
Author: Brian Paul <brian.paul@tungstengraphics.com>
Date:   Wed Jul 9 08:52:44 2008 -0600

    mesa: remove debug code

diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c
index c18eb8a..6ed7f5d 100644
--- a/src/mesa/main/shaders.c
+++ b/src/mesa/main/shaders.c
@@ -128,7 +128,6 @@ _mesa_DeleteObjectARB(GLhandleARB obj)
 void GLAPIENTRY
 _mesa_DeleteProgram(GLuint name)
 {
-   printf("%s name=%u\n", __FUNCTION__, name);
    if (name) {
       GET_CURRENT_CONTEXT(ctx);
       ctx->Driver.DeleteProgram2(ctx, name);

commit 0a0e09078d58b6535349e14dd9e7765b6c6b03fe
Author: Brian Paul <brian.paul@tungstengraphics.com>
Date:   Wed Jul 9 08:51:35 2008 -0600

    mesa: implement glGetUniformiv() with new ctx->Driver function
    
    The old implementation could overwrite the caller's param buffer.
    
    cherry-picked from master

diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index e9b364e..bafc3a0 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -284,6 +284,7 @@ _mesa_init_glsl_driver_functions(struct dd_function_table *driver)
    driver->GetShaderInfoLog = _mesa_get_shader_info_log;
    driver->GetShaderSource = _mesa_get_shader_source;
    driver->GetUniformfv = _mesa_get_uniformfv;
+   driver->GetUniformiv = _mesa_get_uniformiv;
    driver->GetUniformLocation = _mesa_get_uniform_location;
    driver->IsProgram = _mesa_is_program;
    driver->IsShader = _mesa_is_shader;
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index bb47cd4..d609db1 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -862,6 +862,8 @@ struct dd_function_table {
                            GLsizei *length, GLcharARB *sourceOut);
    void (*GetUniformfv)(GLcontext *ctx, GLuint program, GLint location,
                         GLfloat *params);
+   void (*GetUniformiv)(GLcontext *ctx, GLuint program, GLint location,
+                        GLint *params);
    GLint (*GetUniformLocation)(GLcontext *ctx, GLuint program,
                                const GLcharARB *name);
    GLboolean (*IsProgram)(GLcontext *ctx, GLuint name);
diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c
index 7bf8808..c18eb8a 100644
--- a/src/mesa/main/shaders.c
+++ b/src/mesa/main/shaders.c
@@ -128,6 +128,7 @@ _mesa_DeleteObjectARB(GLhandleARB obj)
 void GLAPIENTRY
 _mesa_DeleteProgram(GLuint name)
 {
+   printf("%s name=%u\n", __FUNCTION__, name);
    if (name) {
       GET_CURRENT_CONTEXT(ctx);
       ctx->Driver.DeleteProgram2(ctx, name);
@@ -309,11 +310,7 @@ void GLAPIENTRY
 _mesa_GetUniformivARB(GLhandleARB program, GLint location, GLint * params)
 {
    GET_CURRENT_CONTEXT(ctx);
-   GLfloat fparams[16]; /* XXX is 16 enough? */
-   GLuint i;
-   ctx->Driver.GetUniformfv(ctx, program, location, fparams);
-   for (i = 0; i < 16; i++)
-      params[i] = (GLint) fparams[i];  /* XXX correct? */
+   ctx->Driver.GetUniformiv(ctx, program, location, params);
 }
 
 
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c
index a330629..409468a 100644
--- a/src/mesa/shader/shader_api.c
+++ b/src/mesa/shader/shader_api.c
@@ -963,12 +963,15 @@ _mesa_get_shader_source(GLcontext *ctx, GLuint shader, GLsizei maxLength,
 }
 
 
+#define MAX_UNIFORM_ELEMENTS 16
+
 /**
- * Called via ctx->Driver.GetUniformfv().
+ * Helper for GetUniformfv(), GetUniformiv()
+ * Returns number of elements written to 'params' output.
  */
-void
-_mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location,
-                    GLfloat *params)
+static GLuint
+get_uniformfv(GLcontext *ctx, GLuint program, GLint location,
+              GLfloat *params)
 {
    struct gl_shader_program *shProg
       = _mesa_lookup_shader_program(ctx, program);
@@ -1004,11 +1007,14 @@ _mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location,
             for (c = 0, i = 0; c * 4 < uSize; c++)
                for (r = 0; r < rows; r++, i++)
                   params[i] = shProg->Uniforms->ParameterValues[location + c][r];
+            return i;
          }
-         else
+         else {
             for (i = 0; i < uSize; i++) {
                params[i] = shProg->Uniforms->ParameterValues[location][i];
             }
+            return i;
+         }
       }
       else {
          _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformfv(location)");
@@ -1017,6 +1023,35 @@ _mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location,
    else {
       _mesa_error(ctx, GL_INVALID_OPERATION, "glGetUniformfv(program)");
    }
+   return 0;
+}
+
+
+/**
+ * Called via ctx->Driver.GetUniformfv().
+ */
+void
+_mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location,
+                    GLfloat *params)
+{
+   (void) get_uniformfv(ctx, program, location, params);
+}
+
+
+/**
+ * Called via ctx->Driver.GetUniformiv().
+ */
+void
+_mesa_get_uniformiv(GLcontext *ctx, GLuint program, GLint location,
+                    GLint *params)
+{
+   GLfloat fparams[MAX_UNIFORM_ELEMENTS];
+   GLuint n = get_uniformfv(ctx, program, location, fparams);
+   GLuint i;
+   assert(n <= MAX_UNIFORM_ELEMENTS);
+   for (i = 0; i < n; i++) {
+      params[i] = (GLint) fparams[i];
+   }
 }
 
 
diff --git a/src/mesa/shader/shader_api.h b/src/mesa/shader/shader_api.h
index 27e5870..586ff39 100644
--- a/src/mesa/shader/shader_api.h
+++ b/src/mesa/shader/shader_api.h
@@ -151,6 +151,10 @@ extern void
 _mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location,
                     GLfloat *params);
 
+extern void
+_mesa_get_uniformiv(GLcontext *ctx, GLuint program, GLint location,
+                    GLint *params);
+
 extern GLint
 _mesa_get_uniform_location(GLcontext *ctx, GLuint program, const GLchar *name);
 

commit 50bc5a75a75ad05dfcd83dcdbe3fc76f11bce685
Author: Brian Paul <brian.paul@tungstengraphics.com>
Date:   Wed Jul 9 08:35:50 2008 -0600

    mesa: fix state.clip[n].plane parsing bug (bug 16611)

diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c
index f74f727..db2e374 100644
--- a/src/mesa/shader/arbprogparse.c
+++ b/src/mesa/shader/arbprogparse.c
@@ -1123,7 +1123,9 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst,
                          struct arb_program *Program,
                          gl_state_index state_tokens[STATE_LENGTH])
 {
-   switch (*(*inst)++) {
+   GLubyte token = *(*inst)++;
+
+   switch (token) {
       case STATE_MATERIAL_PARSER:
          state_tokens[0] = STATE_MATERIAL;
          state_tokens[1] = parse_face_type (inst);
@@ -1308,7 +1310,6 @@ parse_state_single_item (GLcontext * ctx, const GLubyte ** inst,
 
       case STATE_CLIP_PLANE:
          state_tokens[0] = STATE_CLIPPLANE;
-         state_tokens[1] = parse_integer (inst, Program);
          if (parse_clipplane_num (ctx, inst, Program,
                                   (GLint *) &state_tokens[1]))
             return 1;
@@ -1760,7 +1761,9 @@ parse_param_elements (GLcontext * ctx, const GLubyte ** inst,
    gl_state_index state_tokens[STATE_LENGTH] = {0, 0, 0, 0, 0};
    GLfloat const_values[4];
 
-   switch (*(*inst)++) {
+   GLubyte token = *(*inst)++;
+
+   switch (token) {
       case PARAM_STATE_ELEMENT:
          if (parse_state_single_item (ctx, inst, Program, state_tokens))
             return 1;

commit 6661f53eb37c46a74275bd203a24e587b77fa13a
Author: Brian Paul <brian.paul@tungstengraphics.com>
Date:   Wed Jul 9 08:42:28 2008 -0600

    mesa: check for OpenBSD (bug 15604)
    
    cherry-picked from master

diff --git a/src/mesa/main/execmem.c b/src/mesa/main/execmem.c
index df30952..072b046 100644
--- a/src/mesa/main/execmem.c
+++ b/src/mesa/main/execmem.c
@@ -36,7 +36,7 @@
 
 
 
-#if defined(__linux__)
+#if defined(__linux__) || defined(__OpenBSD__)
 
 /*
  * Allocate a large block of memory which can hold code then dole it out
@@ -47,6 +47,11 @@
 #include <sys/mman.h>
 #include "mm.h"
 
+#ifndef MAP_ANONYMOUS
+#define MAP_ANONYMOUS MAP_ANON
+#endif
+
+
 #define EXEC_HEAP_SIZE (10*1024*1024)
 
 _glthread_DECLARE_STATIC_MUTEX(exec_mutex);

commit b8782affc8819c2492ab590c21cd772d7df5a570
Author: Xiang, Haihao <haihao.xiang@intel.com>
Date:   Wed Jul 9 13:08:09 2008 +0800

    i915: fall back to software rendering when shadow comparison is
    enabled for 1D texture. fix #12176
    
    Cherry-picked from commit 75e4db18049f3284197c9a8deabd9dd74aa7920e

diff --git a/src/mesa/drivers/dri/i915/i915_texstate.c b/src/mesa/drivers/dri/i915/i915_texstate.c
index 8a56fc3..08c561e 100644
--- a/src/mesa/drivers/dri/i915/i915_texstate.c
+++ b/src/mesa/drivers/dri/i915/i915_texstate.c
@@ -609,13 +609,8 @@ static void i915ImportTexObjState( struct gl_texture_object *texObj )
       shadow = SS2_SHADOW_ENABLE;
       shadow |= intel_translate_compare_func( texObj->CompareFunc );
       
-      if (texObj->Target == GL_TEXTURE_1D) {
-	  minFilt = FILTER_NEAREST;
-	  magFilt = FILTER_NEAREST;
-      } else {
-	  minFilt = FILTER_4X4_FLAT;
-	  magFilt = FILTER_4X4_FLAT;
-      }
+      minFilt = FILTER_4X4_FLAT;
+      magFilt = FILTER_4X4_FLAT;
    }
 
 
@@ -747,6 +742,9 @@ static GLboolean enable_tex_common( GLcontext *ctx, GLuint unit )
       return GL_FALSE;
    }
 
+   if (tObj->Target == GL_TEXTURE_1D &&
+       tObj->CompareMode == GL_COMPARE_R_TO_TEXTURE_ARB)
+      return GL_FALSE;
 
    /* Update state if this is a different texture object to last
     * time.

commit 9a9e839b9b132a7d42cf3b6ff45c5ddfeed1b714
Author: Brian Paul <brian.paul@tungstengraphics.com>
Date:   Tue Jul 8 15:11:19 2008 -0600

    added null texObj ptr check (bug 15567)


Reply to: