From 7a2af605c2c2b0d2e9bbb0b161eba8842acefbcb Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 15 Jun 2012 08:28:24 +0200 Subject: fontconfig mesa pixman xserver git update 15 juni 2012 --- mesalib/Makefile.am | 7 +- mesalib/bin/shortlog_mesa.sh | 23 + mesalib/configure.ac | 7 +- mesalib/docs/autoconf.html | 15 +- mesalib/docs/banner.html | 52 +- mesalib/docs/bugs.html | 22 +- mesalib/docs/conform.html | 19 +- mesalib/docs/contents.html | 74 +-- mesalib/docs/debugging.html | 21 +- mesalib/docs/developers.html | 19 +- mesalib/docs/devinfo.html | 38 +- mesalib/docs/dispatch.html | 50 +- mesalib/docs/download.html | 25 +- mesalib/docs/egl.html | 13 +- mesalib/docs/envvars.html | 34 +- mesalib/docs/extensions.html | 54 +- mesalib/docs/faq.html | 87 ++- mesalib/docs/games.html | 25 +- mesalib/docs/glu.html | 19 +- mesalib/docs/helpwanted.html | 25 +- mesalib/docs/index.html | 8 +- mesalib/docs/install.html | 59 +-- mesalib/docs/intro.html | 35 +- mesalib/docs/libraries.html | 20 +- mesalib/docs/license.html | 23 +- mesalib/docs/lists.html | 42 +- mesalib/docs/llvmpipe.html | 37 +- mesalib/docs/mangling.html | 23 +- mesalib/docs/modelers.html | 20 +- mesalib/docs/news.html | 214 ++++---- mesalib/docs/opengles.html | 13 +- mesalib/docs/openvg.html | 21 +- mesalib/docs/osmesa.html | 25 +- mesalib/docs/perf.html | 23 +- mesalib/docs/postprocess.html | 23 +- mesalib/docs/precompiled.html | 21 +- mesalib/docs/relnotes-6.4.1.html | 2 +- mesalib/docs/relnotes-6.5.2.html | 2 +- mesalib/docs/relnotes-7.1.html | 2 +- mesalib/docs/relnotes-7.10.1.html | 4 +- mesalib/docs/relnotes-7.10.3.html | 6 +- mesalib/docs/relnotes-7.10.html | 12 +- mesalib/docs/relnotes-7.11.html | 2 +- mesalib/docs/relnotes-7.9.1.html | 8 +- mesalib/docs/relnotes-7.9.2.html | 1 - mesalib/docs/relnotes-8.0.2.html | 2 +- mesalib/docs/relnotes-8.0.3.html | 4 +- mesalib/docs/relnotes.html | 161 +++--- mesalib/docs/repository.html | 37 +- mesalib/docs/science.html | 24 +- mesalib/docs/shading.html | 55 +- mesalib/docs/sourcedocs.html | 29 +- mesalib/docs/sourcetree.html | 19 +- mesalib/docs/subset-A.html | 18 +- mesalib/docs/subset.html | 21 +- mesalib/docs/systems.html | 23 +- mesalib/docs/thanks.html | 35 +- mesalib/docs/utilities.html | 19 +- mesalib/docs/utility.html | 19 +- mesalib/docs/versions.html | 89 ++-- mesalib/docs/viewperf.html | 19 +- mesalib/docs/vmware-guest.html | 18 +- mesalib/docs/webmaster.html | 19 +- mesalib/docs/xlibdriver.html | 35 +- mesalib/scons/gallium.py | 11 +- mesalib/src/gallium/auxiliary/util/u_blit.c | 6 +- mesalib/src/glsl/TODO | 3 - mesalib/src/glsl/ir.cpp | 48 ++ mesalib/src/glsl/ir.h | 26 +- mesalib/src/glsl/opt_algebraic.cpp | 31 ++ mesalib/src/mapi/glapi/gen/ARB_texture_storage.xml | 2 +- mesalib/src/mapi/glapi/gen/GL3x.xml | 40 ++ mesalib/src/mapi/glapi/gen/gl_API.xml | 218 ++++++-- mesalib/src/mesa/Makefile | 2 +- mesalib/src/mesa/drivers/common/meta.c | 72 ++- mesalib/src/mesa/drivers/windows/gdi/mesa.def | 15 - mesalib/src/mesa/main/shaderobj.c | 4 +- mesalib/src/mesa/program/hash_table.c | 5 +- mesalib/src/mesa/program/hash_table.h | 17 +- mesalib/src/mesa/sources.mak | 1 + mesalib/src/mesa/state_tracker/st_atom.c | 27 +- mesalib/src/mesa/state_tracker/st_atom.h | 5 + mesalib/src/mesa/state_tracker/st_atom_array.c | 588 +++++++++++++++++++++ mesalib/src/mesa/state_tracker/st_cb_drawpixels.c | 13 +- mesalib/src/mesa/state_tracker/st_context.h | 2 + mesalib/src/mesa/state_tracker/st_draw.c | 573 +------------------- mesalib/src/mesa/state_tracker/st_draw.h | 7 - 87 files changed, 2029 insertions(+), 1608 deletions(-) create mode 100644 mesalib/bin/shortlog_mesa.sh create mode 100644 mesalib/src/mesa/state_tracker/st_atom_array.c (limited to 'mesalib') diff --git a/mesalib/Makefile.am b/mesalib/Makefile.am index 59fd9b584..9c9e9f6cf 100644 --- a/mesalib/Makefile.am +++ b/mesalib/Makefile.am @@ -19,13 +19,16 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. -SUBDIRS = src tests +SUBDIRS = src doxygen: cd doxygen && $(MAKE) check-local: + $(MAKE) -C src/mapi/glapi/tests check + $(MAKE) -C src/mesa/main/tests check $(MAKE) -C src/glsl/tests check + $(MAKE) -C src/glx/tests check clean-local: -@touch $(top_builddir)/configs/current @@ -56,8 +59,6 @@ PACKAGE_NAME = MesaLib-$(PACKAGE_VERSION) EXTRA_FILES = \ aclocal.m4 \ configure \ - tests/Makefile.in \ - tests/glx/Makefile.in \ src/glsl/glsl_parser.cpp \ src/glsl/glsl_parser.h \ src/glsl/glsl_lexer.cpp \ diff --git a/mesalib/bin/shortlog_mesa.sh b/mesalib/bin/shortlog_mesa.sh new file mode 100644 index 000000000..b20c52fdd --- /dev/null +++ b/mesalib/bin/shortlog_mesa.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# This script is used to generate the list of changes that +# appears in the release notes files, with HTML formatting. + + +typeset -i in_log=0 + +git shortlog $* | while read l +do + if [ $in_log -eq 0 ]; then + echo '

'$l'

' + echo '' + echo + in_log=0 + else + mesg=$(echo $l | sed 's/ (cherry picked from commit [0-9a-f]\+)//;s/\&/&/g;s//\>/g') + echo '
  • '${mesg}'
  • ' + fi +done diff --git a/mesalib/configure.ac b/mesalib/configure.ac index 29ee87bb0..d5f8cd719 100644 --- a/mesalib/configure.ac +++ b/mesalib/configure.ac @@ -2166,9 +2166,12 @@ AC_CONFIG_FILES([configs/autoconf src/egl/wayland/wayland-drm/Makefile src/glsl/tests/Makefile src/glx/Makefile + src/glx/tests/Makefile src/mapi/shared-glapi/Makefile + src/mapi/glapi/tests/Makefile src/gtest/Makefile src/mesa/libdricore/Makefile + src/mesa/main/tests/Makefile src/mesa/drivers/dri/dri.pc src/mesa/drivers/dri/Makefile src/mesa/drivers/dri/common/Makefile @@ -2177,9 +2180,7 @@ AC_CONFIG_FILES([configs/autoconf src/mesa/drivers/dri/nouveau/Makefile src/mesa/drivers/dri/r200/Makefile src/mesa/drivers/dri/radeon/Makefile - src/mesa/drivers/dri/swrast/Makefile - tests/Makefile - tests/glx/Makefile]) + src/mesa/drivers/dri/swrast/Makefile]) dnl Replace the configs/current symlink AC_CONFIG_COMMANDS([configs],[ diff --git a/mesalib/docs/autoconf.html b/mesalib/docs/autoconf.html index 07a966e05..4f1ad8d64 100644 --- a/mesalib/docs/autoconf.html +++ b/mesalib/docs/autoconf.html @@ -1,12 +1,12 @@ - - -Compilation and Installation using Autoconf - - - + + + + + Compilation and Installation using Autoconf + + -

    Compilation and Installation using Autoconf

      @@ -209,7 +209,6 @@ options are 16- and 32-bit color channels, which will add the bit size to the library name. For example, --with-osmesa-bits=16 will create the libOSMesa16 library with a 16-bit color channel. -

      3. Library Options

      diff --git a/mesalib/docs/banner.html b/mesalib/docs/banner.html index 4f12c7ac6..2ec187bb9 100644 --- a/mesalib/docs/banner.html +++ b/mesalib/docs/banner.html @@ -1,27 +1,33 @@ - - + + - Banner + + Banner + -

      The -Mesa 3D Graphics Library

      + + + +
      +
      +

      The Mesa 3D Graphics Library

      + diff --git a/mesalib/docs/bugs.html b/mesalib/docs/bugs.html index fa7c484cd..c5ed16d42 100644 --- a/mesalib/docs/bugs.html +++ b/mesalib/docs/bugs.html @@ -1,13 +1,13 @@ - - + + + + + Mesa Bug Reporting + + + -Mesa Bug Reporting - - - - - -

      Bug Database

      +

      Bug Database

      The Mesa bug database is hosted on @@ -50,5 +50,5 @@ If your bug report is vague or your test program doesn't compile easily, the problem may not be fixed very quickly.

      - - + + diff --git a/mesalib/docs/conform.html b/mesalib/docs/conform.html index 3611f8c6f..51674e8d4 100644 --- a/mesalib/docs/conform.html +++ b/mesalib/docs/conform.html @@ -1,12 +1,13 @@ - - -Conformance - - - - - -

      Conformance

      + + + + + Conformance + + + + +

      Conformance

      The SGI OpenGL conformance tests verify correct operation of OpenGL diff --git a/mesalib/docs/contents.html b/mesalib/docs/contents.html index 6f556eed9..e7a23a6bc 100644 --- a/mesalib/docs/contents.html +++ b/mesalib/docs/contents.html @@ -1,33 +1,35 @@ - - -Contents - - - - - + + + + + Contents + + + + + Documentation

      Developer Topics @@ -96,9 +98,9 @@ a:visited { Hosted by:
      -Sourceforge.net +Sourceforge.net
      diff --git a/mesalib/docs/debugging.html b/mesalib/docs/debugging.html index 2df62f56e..36d3634ba 100644 --- a/mesalib/docs/debugging.html +++ b/mesalib/docs/debugging.html @@ -1,12 +1,13 @@ - + + + + + Debugging Tips + + + -Debugging Tips - - - - - -

      Debugging Tips

      +

      Debugging Tips

      Normally Mesa (and OpenGL) records but does not notify the user of @@ -34,5 +35,5 @@ src/dlist.c for details.

      - - + + diff --git a/mesalib/docs/developers.html b/mesalib/docs/developers.html index 8960e7cb4..e1c52ac0d 100644 --- a/mesalib/docs/developers.html +++ b/mesalib/docs/developers.html @@ -1,12 +1,13 @@ - - -Developers - - - - - -

      Developers

      + + + + + Developers + + + + +

      Developers

      Both professional and volunteer developers contribute to Mesa. diff --git a/mesalib/docs/devinfo.html b/mesalib/docs/devinfo.html index 678e48c01..4828cc61d 100644 --- a/mesalib/docs/devinfo.html +++ b/mesalib/docs/devinfo.html @@ -1,15 +1,16 @@ - + + + + + Development Notes + + + -Development Notes +

      Development Notes

      - - - -

      Development Notes

      - - -

      Adding Extentions

      +

      Adding Extentions

      To add a new GL extension to Mesa you have to do at least the following. @@ -52,7 +53,7 @@ To add a new GL extension to Mesa you have to do at least the following. -

      Coding Style

      +

      Coding Style

      Mesa's code style has changed over the years. Here's the latest. @@ -148,20 +149,20 @@ src/mesa/state_tracker/st_glsl_to_tgsi.cpp can serve as examples.

      -

      Making a New Mesa Release

      +

      Making a New Mesa Release

      These are the instructions for making a new Mesa release.

      -

      Get latest source files

      +

      Get latest source files

      Use git to get the latest Mesa files from the git repository, from whatever branch is relevant.

      -

      Verify and update version info

      +

      Verify and update version info

      Create/edit the docs/relnotes-x.y.html file to document what's new in the release. Add the new relnotes-x.y.html file to relnotes.html. @@ -182,7 +183,10 @@ Update docs/news.html.

      -Check in all updates to git. +Create a docs/relnotes-x.y.z.html file. +The bin/shortlog_mesa.sh script can be used to create a HTML-formatted list +of changes to include in the file. +Link the new docs/relnotes-x.y.z.html file into the main relnotes.html file.

      @@ -192,7 +196,7 @@ Then: git push origin mesa_X_Y

      -

      Make the tarballs

      +

      Make the tarballs

      Make the distribution files. From inside the Mesa directory:

      @@ -210,7 +214,7 @@ Copy the distribution files to a temporary directory, unpack them,
       compile everything, and run some demos to be sure everything works.
       

      -

      Update the website and announce the release

      +

      Update the website and announce the release

      Follow the directions on SourceForge for creating a new "release" and uploading the tarballs. @@ -242,7 +246,5 @@ and mesa-announce@lists.freedesktop.org

      - - diff --git a/mesalib/docs/dispatch.html b/mesalib/docs/dispatch.html index 620aecd74..e40b41a60 100644 --- a/mesalib/docs/dispatch.html +++ b/mesalib/docs/dispatch.html @@ -1,19 +1,20 @@ - - -GL Dispatch in Mesa - - - - -

      GL Dispatch in Mesa

      + + + + + GL Dispatch in Mesa + + + +

      GL Dispatch in Mesa

      Several factors combine to make efficient dispatch of OpenGL functions fairly complicated. This document attempts to explain some of the issues and introduce the reader to Mesa's implementation. Readers already familiar -with the issues around GL dispatch can safely skip ahead to the overview of Mesa's implementation.

      +with the issues around GL dispatch can safely skip ahead to the overview of Mesa's implementation.

      -

      1. Complexity of GL Dispatch

      +

      1. Complexity of GL Dispatch

      Every GL application has at least one object called a GL context. This object, which is an implicit parameter to ever GL function, stores all @@ -46,8 +47,7 @@ differnt GL context current. This means that poor old glVertex3fv has to know which GL context is current in the thread where it is being called.

      - -

      2. Overview of Mesa's Implementation

      +

      2. Overview of Mesa's Implementation

      Mesa uses two per-thread pointers. The first pointer stores the address of the context current in the thread, and the second pointer stores the @@ -75,7 +75,7 @@ table. void glVertex3f(GLfloat x, GLfloat y, GLfloat z) { const struct _glapi_table * const dispatch = GET_DISPATCH(); - + (*dispatch->Vertex3f)(x, y, z); }

      Sample dispatch function @@ -89,14 +89,14 @@ overhead that it adds to every GL function call.

      similar function. Mesa provides a wrapper function called _glapi_get_dispatch that is used by default.

      -

      3. Optimizations

      +

      3. Optimizations

      A number of optimizations have been made over the years to diminish the performance hit imposed by GL dispatch. This section describes these optimizations. The benefits of each optimization and the situations where each can or cannot be used are listed.

      -

      3.1. Dual dispatch table pointers

      +

      3.1. Dual dispatch table pointers

      The vast majority of OpenGL applications use the API in a single threaded manner. That is, the application has only one thread that makes calls into @@ -131,7 +131,7 @@ the common case.

      Improved GET_DISPATCH Implementation -

      3.2. ELF TLS

      +

      3.2. ELF TLS

      Starting with the 2.4.20 Linux kernel, each thread is allocated an area of per-thread, global storage. Variables can be put in this area using some @@ -161,7 +161,7 @@ extern __thread struct _glapi_table *_glapi_tls_Dispatch GLX_USE_TLS. Any platform capable of using TLS should use this as the default dispatch method.

      -

      3.3. Assembly Language Dispatch Stubs

      +

      3.3. Assembly Language Dispatch Stubs

      Many platforms has difficulty properly optimizing the tail-call in the dispatch stubs. Platforms like x86 that pass parameters on the stack seem @@ -170,7 +170,7 @@ routines are very short, and it is trivial to create optimal assembly language versions. The amount of optimization provided by using assembly stubs varies from platform to platform and application to application. However, by using the assembly stubs, many platforms can use an additional -space optimization (see below).

      +space optimization (see below).

      The biggest hurdle to creating assembly stubs is handling the various ways that the dispatch table pointer can be accessed. There are four @@ -235,7 +235,7 @@ implementation of each function. This makes the assembly file considerably larger (e.g., 29,332 lines for glapi_x86-64.S versus 1,155 lines for glapi_x86.S) and causes simple changes to the function implementation to generate many lines of diffs. Since the assmebly files -are typically generated by scripts (see below), this +are typically generated by scripts (see below), this isn't a significant problem.

      Once a new assembly file is created, it must be inserted in the build @@ -245,8 +245,7 @@ step is to add the correct #ifdef magic to src/mesa/glapi/glapi_dispatch.c to prevent the C version of the dispatch functions from being built.

      - -

      3.4. Fixed-Length Dispatch Stubs

      +

      3.4. Fixed-Length Dispatch Stubs

      To implement glXGetProcAddress, Mesa stores a table that associates function names with pointers to those functions. This table is @@ -265,8 +264,7 @@ dispatch stub.

      src/mesa/glapi/glapi.c just before glprocs.h is included.

      -
      -

      4. Automatic Generation of Dispatch Stubs

      +

      4. Automatic Generation of Dispatch Stubs

      - - + + diff --git a/mesalib/docs/download.html b/mesalib/docs/download.html index 6a9533aae..3d543281f 100644 --- a/mesalib/docs/download.html +++ b/mesalib/docs/download.html @@ -1,12 +1,13 @@ - + + + + + Getting Mesa + + + -Getting Mesa - - - - - -

      Downloading

      +

      Downloading

      Primary Mesa download site: @@ -20,7 +21,7 @@ When a new release is coming, release candidates (betas) may be found

      -

      Unpacking

      +

      Unpacking

      Mesa releases are available in three formats: .tar.bz2, .tar.gz, and .zip @@ -79,7 +80,7 @@ instructions.

      -

      Demos and GLUT

      +

      Demos and GLUT

      A package of Mark Kilgard's GLUT library is available @@ -98,5 +99,5 @@ were split off some time ago.

      - - + + diff --git a/mesalib/docs/egl.html b/mesalib/docs/egl.html index 5b750070c..e374357c9 100644 --- a/mesalib/docs/egl.html +++ b/mesalib/docs/egl.html @@ -1,9 +1,10 @@ - - -Mesa EGL - - - + + + + + Mesa EGL + +

      Mesa EGL

      diff --git a/mesalib/docs/envvars.html b/mesalib/docs/envvars.html index a64e2ee62..fffb50a47 100644 --- a/mesalib/docs/envvars.html +++ b/mesalib/docs/envvars.html @@ -1,12 +1,13 @@ - + + + + + Environment Variables + + + -Environment Variables - - - - - -

      Environment Variables

      +

      Environment Variables

      Normally, no environment variables need to be set. Most of the environment @@ -15,7 +16,7 @@ sometimes be useful for debugging end-user issues.

      -

      LibGL environment variables

      +

      LibGL environment variables

      -

      If you're using a fedora distro the following command should install all the needed dependencies: +

         sudo yum install flex bison imake libtool xorg-x11-proto-devel libdrm-devel \
         gcc-c++ xorg-x11-server-devel libXi-devel libXmu-devel libXdamage-devel git \
      @@ -73,8 +71,7 @@ the needed dependencies:
       
       
       
      -
      -

      2. Building with autoconf (Linux/Unix/X11)

      +

      2. Building with autoconf (Linux/Unix/X11)

      The primary method to build Mesa on Unix systems is with autoconf. @@ -82,19 +79,20 @@ The primary method to build Mesa on Unix systems is with autoconf.

      The general approach is the standard: +

         ./configure
         make
         sudo make install
       
      +

      But please read the detailed autoconf instructions for more details.

      - -

      3. Building with SCons (Windows/Linux)

      +

      3. Building with SCons (Windows/Linux)

      To build Mesa with SCons on Linux or Windows do @@ -119,8 +117,8 @@ To build Mesa with SCons for Windows on Linux using the MinGW crosscompiler tool This will create:

        -
      • build/windows-x86-debug/mesa/drivers/windows/gdi/opengl32.dll — Mesa + swrast, binary compatible with Windows's opengl32.dll -
      • build/windows-x86-debug/gallium/targets/libgl-gdi/opengl32.dll — Mesa + Gallium + softpipe, binary compatible with Windows's opengl32.dll +
      • build/windows-x86-debug/mesa/drivers/windows/gdi/opengl32.dll — Mesa + swrast, binary compatible with Windows's opengl32.dll +
      • build/windows-x86-debug/gallium/targets/libgl-gdi/opengl32.dll — Mesa + Gallium + softpipe, binary compatible with Windows's opengl32.dll

      Put them all in the same directory to test them. @@ -128,23 +126,21 @@ Put them all in the same directory to test them. - -

      4. Building for other systems

      +

      4. Building for other systems

      Documentation for other environments (some may be very out of date):

      -
      + - -

      5. Library Information

      +

      5. Library Information

      When compilation has finished, look in the top-level lib/ @@ -188,8 +184,7 @@ versions of libGL and device drivers.

      -
      -

      6. Building OpenGL programs with pkg-config

      +

      6. Building OpenGL programs with pkg-config

      Running make install will install package configuration files diff --git a/mesalib/docs/intro.html b/mesalib/docs/intro.html index 303f5eb0f..ef04f357e 100644 --- a/mesalib/docs/intro.html +++ b/mesalib/docs/intro.html @@ -1,12 +1,13 @@ - + + + + + Mesa Introduction + + + -Mesa Introduction - - - - - -

      Introduction

      +

      Introduction

      Mesa is an open-source implementation of the @@ -30,7 +31,7 @@ systems. -

      Project History

      +

      Project History

      The Mesa project was originally started by Brian Paul. @@ -156,7 +157,7 @@ of the OpenGL specification. -

      Major Versions

      +

      Major Versions

      This is a summary of the major versions of Mesa. @@ -165,7 +166,7 @@ of the OpenGL specification is implemented.

      -

      Version 8.x features

      +

      Version 8.x features

      Version 8.x of Mesa implements the OpenGL 3.0 API. The developers at Intel deserve a lot of credit for implementing most @@ -174,14 +175,14 @@ the i965 driver.

      -

      Version 7.x features

      +

      Version 7.x features

      Version 7.x of Mesa implements the OpenGL 2.1 API. The main feature of OpenGL 2.x is the OpenGL Shading Language.

      -

      Version 6.x features

      +

      Version 6.x features

      Version 6.x of Mesa implements the OpenGL 1.5 API with the following extensions incorporated as standard features: @@ -221,7 +222,7 @@ OpenGL specification for more details. -

      Version 5.x features

      +

      Version 5.x features

      Version 5.x of Mesa implements the OpenGL 1.4 API with the following extensions incorporated as standard features: @@ -247,7 +248,7 @@ extensions incorporated as standard features: -

      Version 4.x features

      +

      Version 4.x features

      Version 4.x of Mesa implements the OpenGL 1.3 API with the following @@ -266,7 +267,7 @@ extensions incorporated as standard features:

    1. GL_ARB_transpose_matrix -

      Version 3.x features

      +

      Version 3.x features

      Version 3.x of Mesa implements the OpenGL 1.2 API with the following @@ -282,7 +283,7 @@ features: -

      Version 2.x features

      +

      Version 2.x features

      Version 2.x of Mesa implements the OpenGL 1.1 API with the following features. diff --git a/mesalib/docs/libraries.html b/mesalib/docs/libraries.html index 1c425cf1b..e9db42790 100644 --- a/mesalib/docs/libraries.html +++ b/mesalib/docs/libraries.html @@ -1,12 +1,13 @@ - + + + + + Libraries and Toolkits + + + -Libraries and Toolkits - - - - - -

      Libraries and Toolkits

      +

      Libraries and Toolkits

      • Apprentice - free OpenInventor work-alike @@ -53,4 +54,5 @@ Open SG PLUS - a scene-graph library
      - + + diff --git a/mesalib/docs/license.html b/mesalib/docs/license.html index 913dd4109..f0ac28ccf 100644 --- a/mesalib/docs/license.html +++ b/mesalib/docs/license.html @@ -1,12 +1,13 @@ - + + + + + License / Cppyright Information + + + -License / Cppyright Information - - - - - -

      Disclaimer

      +

      Disclaimer

      Mesa is a 3-D graphics library with an API which is very similar to @@ -34,7 +35,7 @@ target="_parent">Silicon Graphics Incorporated. -

      License / Copyright Information

      +

      License / Copyright Information

      The Mesa distribution consists of several components. Different copyrights @@ -73,7 +74,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    2. -

      Attention, Contributors

      +

      Attention, Contributors

      When contributing to the Mesa project you must agree to the licensing terms @@ -83,7 +84,7 @@ and their respective licenses.

      -

      Mesa Component Licenses

      +

      Mesa Component Licenses

       Component         Location               License
      diff --git a/mesalib/docs/lists.html b/mesalib/docs/lists.html
      index 033b0b70a..d89bcffbd 100644
      --- a/mesalib/docs/lists.html
      +++ b/mesalib/docs/lists.html
      @@ -1,38 +1,36 @@
      -
      +
      +
      +
      +  
      +  Mesa Mailing Lists
      +  
      +
      +
       
      -Mesa Mailing Lists
      -
      -
      -
      -
      -
      -

      Mailing Lists

      +

      Mailing Lists

      There are four Mesa 3D / DRI mailing lists:

        -
      • mesa-users - intended for end-users of Mesa and DRI drivers. Newbie questions are OK, but please try the general OpenGL -resources and Mesa/DRI documentation first. +resources and Mesa/DRI documentation first.

      • -
        -
      • mesa-dev - for Mesa, Gallium and DRI development -discussion. Not for beginners. +discussion. Not for beginners.

      • -
        -
      • mesa-commit - relays git check-in messages (for developers). -In general, people should not post to this list. +In general, people should not post to this list.

      • -
        -
      • mesa-announce - announcements of new Mesa -versions are sent to this list. Very low traffic. +versions are sent to this list. Very low traffic.

      @@ -65,7 +63,7 @@ DRI wiki.
      -

      OpenGL Forums

      +

      OpenGL Forums

      Here are some other OpenGL-related forums you might find useful: @@ -82,5 +80,5 @@ target="_parent">OpenGL discussion forums at www.opengl.org - - + + diff --git a/mesalib/docs/llvmpipe.html b/mesalib/docs/llvmpipe.html index bd9cc26f2..cf4512ffc 100644 --- a/mesalib/docs/llvmpipe.html +++ b/mesalib/docs/llvmpipe.html @@ -1,12 +1,13 @@ - + + + + + llvmpipe + + + -llvmpipe - - - - - -

      Introduction

      +

      Introduction

      The Gallium llvmpipe driver is a software rasterizer that uses LLVM to @@ -24,19 +25,19 @@ It's the fastest software rasterizer for Mesa.

      • -

        An x86 or amd64 processor; 64-bit mode recommended.

        An x86 or amd64 processor; 64-bit mode recommended.

        Support for SSE2 is strongly encouraged. Support for SSSE3 and SSE4.1 will yield the most efficient code. The fewer features the CPU has the more - likely is that you run into underperforming, buggy, or incomplete code. + likely is that you run into underperforming, buggy, or incomplete code.

        See /proc/cpuinfo to know what your CPU supports.

      • -

        LLVM: version 2.9 recommended; 2.6 or later required.

        - NOTE: LLVM 2.8 and earlier will not work on systems that support the +

        LLVM: version 2.9 recommended; 2.6 or later required.

        +

        NOTE: LLVM 2.8 and earlier will not work on systems that support the Intel AVX extensions (e.g. Sandybridge). LLVM's code generator will fail when trying to emit AVX instructions. This was fixed in LLVM 2.9.

        @@ -46,6 +47,7 @@ It's the fastest software rasterizer for Mesa.
              aptitude install llvm-dev
         
        +

        For a RPM-based distribution do:

        @@ -73,8 +75,6 @@ It's the fastest software rasterizer for Mesa.
         
      - -

      Building

      To build everything on Linux invoke scons as: @@ -126,7 +126,7 @@ need to ask, don't even try it. To profile llvmpipe you should pass the options
      -  scons build=profile 
      +  scons build=profile <same-as-before>
       
      This will ensure that frame pointers are used both in C and JIT functions, and @@ -164,7 +164,7 @@ Building will also create several unit tests in build/linux-???-debug/gallium/drivers/llvmpipe:

      - +
      • lp_test_blend: blending
      • lp_test_conv: SIMD vector conversion
      • lp_test_format: pixel unpacking/packing @@ -185,7 +185,7 @@ for posterior analysis, e.g.:
      • When looking to this code by the first time start in lp_state_fs.c, and then skim through the lp_bld_* functions called in there, and the comments - at the top of the lp_bld_*.c functions. + at the top of the lp_bld_*.c functions.
      • The driver-independent parts of the LLVM / Gallium code are found in @@ -200,3 +200,6 @@ for posterior analysis, e.g.: for a stand-alone example. See the llvm-c/Core.h file for reference.
      + + + diff --git a/mesalib/docs/mangling.html b/mesalib/docs/mangling.html index 55071544f..2ff628c34 100644 --- a/mesalib/docs/mangling.html +++ b/mesalib/docs/mangling.html @@ -1,12 +1,13 @@ - + + + + + Function Name Mangling + + + -Function Name Mangling - - - - - -

      Function Name Mangling

      +

      Function Name Mangling

      If you want to use both Mesa and another OpenGL library in the same @@ -20,11 +21,11 @@ This results in all the Mesa functions being prefixed with To do this, recompile Mesa with the compiler flag -DUSE_MGL_NAMESPACE. Add the flag to CFLAGS in the configuration file which you want to use. For example: +

       CFLAGS += -DUSE_MGL_NAMESPACE
       
      -

      - - + + diff --git a/mesalib/docs/modelers.html b/mesalib/docs/modelers.html index 2e90a5268..13a4603fa 100644 --- a/mesalib/docs/modelers.html +++ b/mesalib/docs/modelers.html @@ -1,12 +1,13 @@ - + + + + + Modelers, Renderers and Viewers + + + -Modelers, Renderers and Viewers - - - - - -

      Modelers, Renderers and Viewers

      +

      Modelers, Renderers and Viewers

      • Aqsis - a RenderMan compatible renderer
      • @@ -60,4 +61,5 @@
      - + + diff --git a/mesalib/docs/news.html b/mesalib/docs/news.html index 140f35b47..b6b82671c 100644 --- a/mesalib/docs/news.html +++ b/mesalib/docs/news.html @@ -1,15 +1,13 @@ - - -Mesa News - - - - - - - -

      News

      + + + + + Mesa News + + + +

      News

      May 18, 2012

      @@ -311,7 +309,7 @@ shading language and built-in functions.

      April 2007

      Thomas Hellström of Tungsten Graphics has written a whitepaper -describing the new DRI memory management system. +describing the new DRI memory management system.

      December 5, 2006

      @@ -541,7 +539,7 @@ release). - sampling an incomplete texture in a fragment program would segfault - glTexImage was missing a few error checks - fixed some minor glGetTexParameter glitches - - GL_INTENSITY was mistakenly accepted as a to glTexImage + - GL_INTENSITY was mistakenly accepted as a <format> to glTexImage - fragment program writes to RC/HC register were broken - fixed a few glitches in GL_HP_occlusion_test extension - glBeginQueryARB and glEndQueryARB didn't work inside display lists @@ -549,6 +547,7 @@ release). - fixed triangle color interpolation bug on AIX (Shane Blackett) - fixed a number of minor memory leaks (bug #1002030)
      +

      The MD5 checksums are:

      @@ -578,7 +577,7 @@ This release basically just fixes bugs since the 6.0. release.
       	- fixed build problems on OpenBSD
       	- omit CVS directories from tarballs
       	- glGetTexImage(GL_COLOR_INDEX) was broken
      -	- fixed an infinite loop in t&l module
      +	- fixed an infinite loop in t&l module
       	- silenced some valgrind warnings about using unitialized memory
       	- fixed some compilation/link glitches on IRIX (Mike Stephens)
       	- glBindProgram wasn't getting compiled into display lists
      @@ -600,6 +599,7 @@ This release basically just fixes bugs since the 6.0. release.
       	- fragment program XPD instruction was incorrect
       	- glGetMaterial() didn't work reliably
       
      +

      The MD5 checksums are:

      @@ -612,7 +612,6 @@ eff71d59c211825e949199852f5a2316  MesaDemos-6.0.1.zip
       
      -

      January 16, 2004

      @@ -639,7 +638,6 @@ and primarily just incorporates bug fixes. -

      December 28, 2003

      @@ -663,7 +661,7 @@ OpenGL 1.5 features.

           New features:
       	- reorganized directory tree
      -	- GL_ARB_vertex/fragment_program extensions (Michal Krol & Karl Rasche)
      +	- GL_ARB_vertex/fragment_program extensions (Michal Krol & Karl Rasche)
       	- GL_ATI_texture_env_combine3 extension (Ian Romanick)
       	- GL_SGI_texture_color_table extension (Eric Plante)
       	- GL_NV_fragment_program extension
      @@ -699,7 +697,7 @@ OpenGL 1.5 features.
       	- glTexImage1/2/3D now allows width/height/depth = 0
       	- disable SPARC asm code on Linux (bug 852204)
       
      - +

      The MD5 checksums are:

      @@ -731,7 +729,6 @@ a21be975589e8a2d1871b6bb7874fffa  MesaDemos-5.0.2.zip
       
      -

      September 5, 2003

      @@ -766,7 +763,6 @@ Mesa 5.0.2 has been released. This is a stable, bug-fix release. -

      June 2003

      @@ -780,7 +776,6 @@ holds the Mesa 5.0.x code which will be abandoned at some point.

      -

      March 30, 2003

      @@ -1175,8 +1170,8 @@ Here's what's new:

      Known problems: - NURBS or evaluator surfaces inside display lists don't always work -

      -

      November 3, 2000

      + +

      November 3, 2000

      Mesa 3.4 has been released. Here's what's new since the 3.3 release:

          New:
           - optimized glDrawPixels for glPixelZoom(1,-1)
      @@ -1204,8 +1199,8 @@ Here's what's new:

      Changes: - finished internal support for compressed textures for DRI
      -

      -

      April 24, 2000

      + +

      April 24, 2000

      Mesa 3.2 has been released. Here's what's new since the beta release:

          Bug fixes:
           - fixed memcpy bugs in span.c
      @@ -1220,78 +1215,69 @@ Here's what's new:

      - use bcopy() optimizations on FreeBSD - re-enabled the optimized persp_textured_triangle() function
      -

      -

      March 23, 2000

      + +

      March 23, 2000

      I've just upload the Mesa 3.2 beta 1 files to SourceForge at http://sourceforge.net/project/filelist.php?group_id=3

      3.2 (note even number) is a stabilization release of Mesa 3.1 meaning it's mainly just bug fixes.

      -

      Here's what's changed: - -

      +

      Here's what's changed:

      +
      +    Bug fixes:
      +        - mixed drawing of lines and bitmaps sometimes had wrong colors
      +        - added missing glHintPGI() function
      +        - fixed a polygon culling bug
      +        - fixed bugs in gluPartialDisk()
      +        - Z values in selection mode were wrong
      +        - added missing tokens:
      +            GL_SMOOTH_POINT_SIZE_RANGE
      +            GL_SMOOTH_POINT_SIZE_GRANULARITY
      +            GL_SMOOTH_LINE_WIDTH_RANGE
      +            GL_SMOOTH_LINE_WIDTH_GRANULARITY
      +            GL_ALIASED_POINT_SIZE_RANGE
      +            GL_ALIASED_LINE_WIDTH_RANGE
      +        - fixed glCopyPixels when copying from back to front buffer
      +        - GL_EXT_compiled_vertex_array tokens had _SGI suffix instead of _EXT
      +        - glDrawRangeElements(GL_LINES, 0, 1, 2, type, indices) was broken
      +        - glDeleteTextures() didn't decrement reference count correctly
      +        - GL_SRCA_ALPHA_SATURATE blend mode didn't work correctly
      +        - Actual depth of transformation matrix stacks was off by one
      +        - 24bpp visuals didn't address pixels correctly
      +        - mipmap level of detail (lambda) calculation simplified, more accurate
      +        - 101691 - Polygon clipping and GL_LINE
      +        - 101928 - Polygon clipping and GL_LINE (same fix as above)
      +        - 101808 - Non-glVertexArrays tristrip bug
      +        - 101971 - find_last_3f on Dec OSF (worked around)
      +        - 102369 - segv on dec osf (possibly a duplicate of the above)
      +        - 102893 - orientations of modelview cause segfault
      +    New:
      +        - updated SVGA Linux driver
      +        - added the MESA_FX_NO_SIGNALS env var, see docs/README.3DFX
      +        - build libGLw.a (Xt/OpenGL drawing area widget) library by default
      +        - changed -O2 to -O3 for a number of gcc configs
      +    Changes:
      +        - glXCopyContext's mask parameter is now unsigned long, per GLX spec
      +

      Please report any problems with this release ASAP. Bugs should be filed on the Mesa3D website at sourceforge.
      After 3.2 is wrapped up I hope to release 3.3 beta 1 soon afterward.

      -- Brian

      -

      -

      December 17, 1999

      + +

      December 17, 1999

      A Slashdot interview with Brian about Mesa (questions submitted by Slashdot readers) can be found at http://slashdot.org/interviews/99/12/17/0927212.shtml.

      -

      -

      December 14, 1999

      + +

      December 14, 1999

      Mesa 3.1 is released!

      -

      -

      September 21, 1999

      + +

      September 21, 1999

      There appear to be two new files on the ftp site, MesaLib-3.1beta3.tar.gz and MesaDemos-3.1beta3.tar.gz, that seem to be... yes, I've just received confirmation from the beta center, they are indeed the THIRD beta release of Mesa 3.1! Happy Days. Happy Days. Thanks Keith Whitwell for preparing these for us during Brian's absence.

      -

      -

      August 30, 1999

      + +

      August 30, 1999

      I'm pleased to announce that I've accepted a position with Precision Insight, Inc. effective October, 1999. I'll be leaving Avid Technology in September.

      I've been working on Mesa in my spare time for over five years. With Precision @@ -1301,41 +1287,41 @@ and OpenGL on Linux.

      my work will continue to be open sourced and available to any other programmers who may want to contribute to it, or use it for other projects or platforms

      PS: I'm going to be traveling until Sep 6 and won't be reading email until then.

      -

      -

      August 23, 1999

      + +

      August 23, 1999

      Anonymous CVS access is back online so suck up all the bandwidth you can afford. Note that this is a new archive, so you will need to re-checkout the archive. That means don't cvs update from a previous download.

      -

      -

      August 17, 1999

      + +

      August 17, 1999

      A report from the SIGGRAPH '99 Linux/OpenGL BOF meeting is now available.

      -Brian

      -

      -

      August 14, 1999

      + +

      August 14, 1999

      www.mesa3d.org is having technical problems due to hardware failures at VA Linux systems. The Mac pages, ftp, and CVS services aren't fully restored yet. Please be patient.

      -Brian

      -

      -

      June 7, 1999

      + +

      June 7, 1999

      RPMS of the nVidia RIVA server can be found at ftp://ftp.mesa3d.org/mesa/misc/nVidia/.

      -

      -

      June 2, 1999

      + +

      June 2, 1999

      nVidia has released some Linux binaries for xfree86 3.3.3.1, along with the full source, which includes GLX acceleration based on Mesa 3.0. They can be downloaded from http://www.nvidia.com/Products.nsf/htmlmedia/software_drivers.html.

      -

      -

      May 24, 1999

      + +

      May 24, 1999

      Beta 2 of Mesa 3.1 has been make available at ftp://ftp.mesa3d.org/mesa/beta/. If you are into the quake scene, you may want to try this out, as it contains some optimizations specifically in the Q3A rendering path. -

      -

      May 13, 1999

      + +

      May 13, 1999

      For those interested in the integration of Mesa into XFree86 4.0, Precision Insight has posted their lowlevel design documents at http://www.precisioninsight.com.

      -

      -

      May 13, 1999

      + +

      May 13, 1999

      May 1999 - John Carmack of id Software, Inc. has made a donation of
       US$10,000 to the Mesa project to support its continuing development.
       Mesa is a free implementation of the OpenGL 3D graphics library and id's
      @@ -1356,33 +1342,27 @@ This donation from John/id is very generous.  Keith and I are very
       grateful.
       
       
      -

      -

      May 1, 1999

      -

      John Carmack made an interesting .plan update yesterday: -

      +

      May 1, 1999

      +

      John Carmack made an interesting .plan update yesterday:

      +
      + "I put together a document on optimizing OpenGL drivers for Q3 that + should be helpful to the various Linux 3D teams.
      + http://www.quake3arena.com/news/glopt.html" +
      -

      -

      April 7, 1999

      +

      April 7, 1999

      Updated the Mesa contributors section and added links to RPM Mesa packages.

      -

      -

      March 18, 1999

      + +

      March 18, 1999

      The new webpages are now online. Enjoy, and let me know if you find any errors. -

      -

      February 16, 1999

      + +

      February 16, 1999

      SGI releases its GLX source code.

      -

      -

      January 22, 1999

      -

      www.mesa3d.org established

      - - -

      +

      January 22, 1999

      +

      www.mesa3d.org established


      diff --git a/mesalib/docs/opengles.html b/mesalib/docs/opengles.html index 0fee488e1..d02482589 100644 --- a/mesalib/docs/opengles.html +++ b/mesalib/docs/opengles.html @@ -1,9 +1,10 @@ - - -OpenGL ES - - - + + + + + OpenGL ES + +

      OpenGL ES

      diff --git a/mesalib/docs/openvg.html b/mesalib/docs/openvg.html index 81e50b65f..9c3cc87d9 100644 --- a/mesalib/docs/openvg.html +++ b/mesalib/docs/openvg.html @@ -1,14 +1,13 @@ - - -OpenVG State Tracker - - - - - - - -

      OpenVG State Tracker

      + + + + + OpenVG State Tracker + + + + +

      OpenVG State Tracker

      The current version of the OpenVG state tracker implements OpenVG 1.1. diff --git a/mesalib/docs/osmesa.html b/mesalib/docs/osmesa.html index 525da4d42..2207641ed 100644 --- a/mesalib/docs/osmesa.html +++ b/mesalib/docs/osmesa.html @@ -1,12 +1,13 @@ - + + + + + Off-screen Rendering + + + -Off-screen Rendering - - - - - -

      Off-screen Rendering

      +

      Off-screen Rendering

      @@ -19,7 +20,7 @@ One potential application is to use Mesa as an off-line, batch-style renderer.

      -The OSMesa API provides three basic functions for making off-screen +The OSMesa API provides three basic functions for making off-screen renderings: OSMesaCreateContext(), OSMesaMakeCurrent(), and OSMesaDestroyContext(). See the Mesa/include/GL/osmesa.h header for more information about the API functions. @@ -31,7 +32,7 @@ directory.

      -

      Deep color channels

      +

      Deep color channels

      For some applications 8-bit color channels don't have sufficient @@ -84,5 +85,5 @@ the top-level Makefile. Send a patch to the Mesa developers too, if you're inclined.

      - - + + diff --git a/mesalib/docs/perf.html b/mesalib/docs/perf.html index ee9c4b117..ec400c613 100644 --- a/mesalib/docs/perf.html +++ b/mesalib/docs/perf.html @@ -1,16 +1,17 @@ - + + + + + Performance Tips + + + -Performance Tips - - - - - -

      Performance Tips

      +

      Performance Tips

      Performance tips for software rendering: -

      +

      1. Turn off smooth shading when you don't need it (glShadeModel) @@ -64,5 +65,5 @@ Performance tips for software rendering:
      - - + + diff --git a/mesalib/docs/postprocess.html b/mesalib/docs/postprocess.html index 2a3796942..06a45930e 100644 --- a/mesalib/docs/postprocess.html +++ b/mesalib/docs/postprocess.html @@ -1,12 +1,13 @@ - + + + + + Gallium Post-processing + + + -Gallium Post-processing - - - - - -

      Gallium Post-processing

      +

      Gallium Post-processing

      The Gallium drivers support user-defined image post-processing. @@ -25,7 +26,7 @@ Multiple filters can be used together.

      -

      PP environment variables

      +

      PP environment variables

      -

      - diff --git a/mesalib/docs/relnotes-7.10.3.html b/mesalib/docs/relnotes-7.10.3.html index 9ac5ef28e..68cc925e6 100644 --- a/mesalib/docs/relnotes-7.10.3.html +++ b/mesalib/docs/relnotes-7.10.3.html @@ -55,9 +55,9 @@ d77b02034c11d6c2a55c07f82367d780 MesaLib-7.10.3.tar.gz
    3. Bug 32835 - [glsl] recursive #define results in infinite stack recursion
    4. -
    5. Bug 33303 - [glsl] ir_constant_expression.cpp:72: virtual ir_constant* ir_expression::constant_expression_value(): Assertion `op[0]->type->base_type == op[1]->type->base_type' failed.
    6. +
    7. Bug 33303 - [glsl] ir_constant_expression.cpp:72: virtual ir_constant* ir_expression::constant_expression_value(): Assertion `op[0]->type->base_type == op[1]->type->base_type' failed.
    8. -
    9. Bug 33314 - [glsl] ir_constant_expression.cpp:122: virtual ir_constant* ir_expression::constant_expression_value(): Assertion `op[0]->type->base_type == GLSL_TYPE_BOOL' failed.
    10. +
    11. Bug 33314 - [glsl] ir_constant_expression.cpp:122: virtual ir_constant* ir_expression::constant_expression_value(): Assertion `op[0]->type->base_type == GLSL_TYPE_BOOL' failed.
    12. Bug 33512 - [SNB] case ogles2conform/GL/gl_FragCoord/gl_FragCoord_xy_frag.test and gl_FragCoord_w_frag.test fail
    13. @@ -160,7 +160,7 @@ d77b02034c11d6c2a55c07f82367d780 MesaLib-7.10.3.tar.gz
    14. mesa: Use _mesa_get_format_bytes to refactor out the RB get_pointer_*
    15. mesa: Use _mesa_get_format_bytes to refactor out the RB get_row_*
    16. mesa: Add renderbuffer accessors for R8/RG88/R16/RG1616.
    17. -
    18. swrast: Don't try to adjust_colors for <8bpc when handling R16, RG1616.
    19. +
    20. swrast: Don't try to adjust_colors for <8bpc when handling R16, RG1616.
    21. intel: Use mesa core's R8, RG88, R16, RG1616 RB accessors.
    22. Revert "intel: Add spans code for the ARB_texture_rg support."
    23. mesa: Add support for the ARB_fragment_program part of ARB_draw_buffers.
    24. diff --git a/mesalib/docs/relnotes-7.10.html b/mesalib/docs/relnotes-7.10.html index 3f4f229b0..bb5fde502 100644 --- a/mesalib/docs/relnotes-7.10.html +++ b/mesalib/docs/relnotes-7.10.html @@ -79,7 +79,7 @@ bc644be551ed585fc4f66c16b64a91c9 MesaGLUT-7.10.tar.gz
    25. Bug 31194 - The mesa meta save/restore code doesn't ref the current GLSL program
    26. -
    27. Bug 31371 - glslparsertest: ir.cpp:358: ir_constant::ir_constant(const glsl_type*, const ir_constant_data*): Assertion `(type->base_type >= 0) && (type->base_type <= 3)' failed.
    28. +
    29. Bug 31371 - glslparsertest: ir.cpp:358: ir_constant::ir_constant(const glsl_type*, const ir_constant_data*): Assertion `(type->base_type >= 0) && (type->base_type <= 3)' failed.
    30. Bug 31439 - Crash in glBufferSubData() with size == 0
    31. @@ -91,7 +91,7 @@ bc644be551ed585fc4f66c16b64a91c9 MesaGLUT-7.10.tar.gz
    32. Bug 31617 - Radeon/Compiz: 'failed to attach dri2 front buffer', error case not handled
    33. -
    34. Bug 31648 - [GLSL] array-struct-array gets assertion: `(size >= 1) && (size <= 4)' failed.
    35. +
    36. Bug 31648 - [GLSL] array-struct-array gets assertion: `(size >= 1) && (size <= 4)' failed.
    37. Bug 31650 - [GLSL] varying gl_TexCoord fails to be re-declared to different size in the second shader
    38. @@ -527,7 +527,7 @@ bc644be551ed585fc4f66c16b64a91c9 MesaGLUT-7.10.tar.gz
    39. glsl: Add glsl_type::uvecN_type for N=2,3
    40. glsl: Add lexer rules for uint and uvecN (N=2..4)
    41. glsl: Changes in generated file glsl_lexer.cpp
    42. -
    43. glsl: Add lexer rules for << and >> in GLSL 1.30
    44. +
    45. glsl: Add lexer rules for << and >> in GLSL 1.30
    46. glsl: Change generated file glsl_lexer.cpp
    47. glsl: Implement ast-to-hir for binary shifts in GLSL 1.30
    48. glsl: Implement constant expr evaluation for bitwise-not
    49. @@ -1824,7 +1824,7 @@ bc644be551ed585fc4f66c16b64a91c9 MesaGLUT-7.10.tar.gz
    50. llvmpipe: use llvm for attribute interpolant calculation
    51. graw: add frag-face shader
    52. llvmpipe: fix flatshading in new line code
    53. -
    54. draw: don't apply flatshading to clipped tris with <3 verts
    55. +
    56. draw: don't apply flatshading to clipped tris with <3 verts
    57. llvmpipe: handle FACING interpolants in line and point setup
    58. llvmpipe: handle up to 8 planes in triangle binner
    59. llvmpipe: make debug_fs_variant respect variant->nr_samplers
    60. @@ -1968,7 +1968,7 @@ bc644be551ed585fc4f66c16b64a91c9 MesaGLUT-7.10.tar.gz
    61. glsl: Rename various ir_* files to lower_* and opt_*.
    62. glcpp: Define GL_FRAGMENT_PRECISION_HIGH if GLSL version >= 1.30.
    63. Refresh autogenerated glcpp parser.
    64. -
    65. glsl: Fix constant expression handling for <, >, <=, >= on vectors.
    66. +
    67. glsl: Fix constant expression handling for <, >, <=, >= on vectors.
    68. glsl: Unconditionally define GL_FRAGMENT_PRECISION_HIGH in ES2 shaders.
    69. Regenerate glcpp parser.
    70. glsl: Reimplement the "cross" built-in without ir_binop_cross.
    71. @@ -2685,7 +2685,7 @@ bc644be551ed585fc4f66c16b64a91c9 MesaGLUT-7.10.tar.gz
    72. nv50: fix size of outputs_written array
    73. nv50: apply layout_mask to tile_flags
    74. nvfx: only expose one rt on nv30
    75. -
    76. nvfx: fb->nr_cbufs <= 1 on nv30
    77. +
    78. nvfx: fb->nr_cbufs <= 1 on nv30
    79. nvfx: reset nvfx->hw_zeta
    80. nvfx: fixes after array textures merge
    81. init ps->context with util_surfaces_get and do_get
    82. diff --git a/mesalib/docs/relnotes-7.11.html b/mesalib/docs/relnotes-7.11.html index 52033cf1e..10be4c935 100644 --- a/mesalib/docs/relnotes-7.11.html +++ b/mesalib/docs/relnotes-7.11.html @@ -320,7 +320,7 @@ did not exist in the 7.10 release series at all.

    83. Bug 39257 - [bisected SNB]Mesa demos engine causes GPU hang
    84. -
    85. Bug 39487 - [i965] brw_wm_surface_state.c:495: brw_update_renderbuffer_surface: Assertion `brw->>has_surface_tile_offset || (tile_x == 0 && tile_y == 0)' failed.
    86. +
    87. Bug 39487 - [i965] brw_wm_surface_state.c:495: brw_update_renderbuffer_surface: Assertion `brw->has_surface_tile_offset || (tile_x == 0 && tile_y == 0)' failed.
    88. Bug 39515 - FTBFS: libEGL depends on libgbm, but libEGL builds first
    89. diff --git a/mesalib/docs/relnotes-7.9.1.html b/mesalib/docs/relnotes-7.9.1.html index bef4ef1dd..f45fa48bf 100644 --- a/mesalib/docs/relnotes-7.9.1.html +++ b/mesalib/docs/relnotes-7.9.1.html @@ -65,7 +65,7 @@ ee9ecae4ca56fbb2d14dc15e3a0a7640 MesaGLUT-7.9.1.tar.gz
    90. Bug 31194 - The mesa meta save/restore code doesn't ref the current GLSL program
    91. -
    92. Bug 31371 - glslparsertest: ir.cpp:358: ir_constant::ir_constant(const glsl_type*, const ir_constant_data*): Assertion `(type->base_type >= 0) && (type->base_type <= 3)' failed.
    93. +
    94. Bug 31371 - glslparsertest: ir.cpp:358: ir_constant::ir_constant(const glsl_type*, const ir_constant_data*): Assertion `(type->base_type >= 0) && (type->base_type <= 3)' failed.
    95. Bug 31439 - Crash in glBufferSubData() with size == 0
    96. @@ -73,11 +73,11 @@ ee9ecae4ca56fbb2d14dc15e3a0a7640 MesaGLUT-7.9.1.tar.gz
    97. Bug 31514 - isBuffer returns true for unbound buffers
    98. -
    99. Bug 31560 - [tdfx] tdfx_tex.c:702: error: ‘const struct gl_color_table’ has no member named ‘Format’
    100. +
    101. Bug 31560 - [tdfx] tdfx_tex.c:702: error: 'const struct gl_color_table' has no member named 'Format'
    102. Bug 31617 - Radeon/Compiz: 'failed to attach dri2 front buffer', error case not handled
    103. -
    104. Bug 31648 - [GLSL] array-struct-array gets assertion: `(size >= 1) && (size <= 4)' failed.
    105. +
    106. Bug 31648 - [GLSL] array-struct-array gets assertion: `(size >= 1) && (size <= 4)' failed.
    107. Bug 31650 - [GLSL] varying gl_TexCoord fails to be re-declared to different size in the second shader
    108. @@ -293,7 +293,7 @@ ee9ecae4ca56fbb2d14dc15e3a0a7640 MesaGLUT-7.9.1.tar.gz
    109. ir_dead_functions: Actually free dead functions and signatures.
    110. glcpp: Define GL_FRAGMENT_PRECISION_HIGH if GLSL version >= 1.30.
    111. glsl: Unconditionally define GL_FRAGMENT_PRECISION_HIGH in ES2 shaders.
    112. -
    113. glsl: Fix constant expression handling for <, >, <=, >= on vectors.
    114. +
    115. glsl: Fix constant expression handling for <, >, <=, >= on vectors.
    116. glsl: Use do_common_optimization in the standalone compiler.
    117. glsl: Don't inline function prototypes.
    118. glsl: Add a virtual as_discard() method.
    119. diff --git a/mesalib/docs/relnotes-7.9.2.html b/mesalib/docs/relnotes-7.9.2.html index 65929cc2a..82240441b 100644 --- a/mesalib/docs/relnotes-7.9.2.html +++ b/mesalib/docs/relnotes-7.9.2.html @@ -330,7 +330,6 @@ with in, out, attribute, and varying.

      -

      diff --git a/mesalib/docs/relnotes-8.0.2.html b/mesalib/docs/relnotes-8.0.2.html index d73ba9f92..88f730c16 100644 --- a/mesalib/docs/relnotes-8.0.2.html +++ b/mesalib/docs/relnotes-8.0.2.html @@ -86,7 +86,7 @@ d5e5cdb85d2afdbcd1c0623d3ed1c54d MesaLib-8.0.2.zip

      Daniel Vetter (1):

      Versions of Mesa prior to 6.4 are summarized in the versions file and the following release notes.

      - + - - + + diff --git a/mesalib/docs/repository.html b/mesalib/docs/repository.html index bdd2b577b..3e05871fd 100644 --- a/mesalib/docs/repository.html +++ b/mesalib/docs/repository.html @@ -1,10 +1,11 @@ - - -Code Repository - - - - + + + + + Code Repository + + +

      Code Repository

      @@ -13,6 +14,7 @@ Mesa uses git as its source code management system.

      +

      The master git repository is hosted on freedesktop.org.

      @@ -33,8 +35,7 @@ target="_parent">Mesa demos and tests git repository.

      - -

      Anonymous git Access

      +

      Anonymous git Access

      To get the Mesa sources anonymously (read-only): @@ -57,8 +58,7 @@ To get the Mesa sources anonymously (read-only):

    - -

    Developer git Access

    +

    Developer git Access

    Mesa developers need to first have an account on @@ -92,7 +92,7 @@ Once your account is established: -

    Windows Users

    +

    Windows Users

    If you're @@ -113,8 +113,7 @@ Unix users don't need to set this option.
    -
    -

    Development Branches

    +

    Development Branches

    At any given time, there may be several active branches in Mesa's @@ -132,7 +131,7 @@ Questions about branch status/activity should be posted to the mesa3d-dev mailing list.

    -

    Developer Git Tips

    +

    Developer Git Tips

    1. Setting up to edit the master branch @@ -144,6 +143,7 @@ branch, try: git config branch.master.remote origin git config branch.master.merge master +

      Otherwise, you have to say git pull origin master each time you do a pull.

      @@ -162,6 +162,7 @@ If it has been awhile since you've done the initial clone, try
           git pull
       
      +

      to get the latest files before you start working.

      @@ -170,6 +171,7 @@ Make your changes and use git add <files to commit> git commit +

      to get your changes ready to push back into the fd.o repository.

      @@ -185,12 +187,13 @@ To avoid this, git pull --rebase git push +

      If you are familiar with CVS or similar system, this is similar to doing a cvs update in order to update your source tree to the current repository state, instead of the time you did the last update. (CVS doesn't work like git in this respect, but this is easiest way to explain it.) -
      +
      In any case, your repository now looks like you made your changes after all the other changes.

      @@ -212,5 +215,3 @@ See
      - - diff --git a/mesalib/docs/science.html b/mesalib/docs/science.html index 0b3384303..c701db3e3 100644 --- a/mesalib/docs/science.html +++ b/mesalib/docs/science.html @@ -1,12 +1,13 @@ - + + + + + Science and Technical + + + -Science and Technical - - - - - -

      Science and Technical

      +

      Science and Technical

      • Ch - OpenGL bindings for the Ch C/C++ interpreter @@ -48,7 +49,6 @@
      • ORSA - An interactive tool for Celestial Mechanics
      • ParaView - Scientific visualization package -
      • ROOT - Object Oriented Data Analysis Framework
      • SLFFEA - GNU finite element @@ -63,7 +63,9 @@ modeling
      • Webots - 3-D mobile robot simulator -
      +
    2. + - + + diff --git a/mesalib/docs/shading.html b/mesalib/docs/shading.html index aba395974..175e02460 100644 --- a/mesalib/docs/shading.html +++ b/mesalib/docs/shading.html @@ -1,12 +1,13 @@ - + + + + + Shading Language Support + + + -Shading Language Support - - - - - -

      Shading Language Support

      +

      Shading Language Support

      This page describes the features and status of Mesa's support for the @@ -19,7 +20,7 @@ Contents

      - - -

      Environment Variables

      +

      Environment Variables

      The MESA_GLSL environment variable can be set to a comma-separated @@ -58,8 +57,7 @@ Example: export MESA_GLSL=dump,nopt

      -
      -

      GLSL Version

      +

      GLSL Version

      The GLSL compiler currently supports version 1.20 of the shading language. @@ -76,8 +74,7 @@ Several GLSL extensions are also supported: - -

      Unsupported Features

      +

      Unsupported Features

      XXX update this section

      @@ -100,8 +97,7 @@ All other major features of the shading language should function.

      -
      -

      Implementation Notes

      +

      Implementation Notes

      - -

      Compiler Validation

      +

      Compiler Validation

      Developers working on the GLSL compiler should test frequently to avoid @@ -264,5 +253,5 @@ tests GLSL features. The Mesa demos repository also has some good GLSL tests.

      - - + + diff --git a/mesalib/docs/sourcedocs.html b/mesalib/docs/sourcedocs.html index 90538af5c..2b1633c67 100644 --- a/mesalib/docs/sourcedocs.html +++ b/mesalib/docs/sourcedocs.html @@ -1,15 +1,16 @@ - + + + + + Source Code Documentation + + + -Source Code Documentation - - - - - -

      Source Code Documentation

      +

      Source Code Documentation

      -Doxygen +Doxygen is used to automatically produce cross-referenced documentation from the Mesa source code.

      @@ -27,11 +28,11 @@ such as here -

      +here +

      - - + + diff --git a/mesalib/docs/sourcetree.html b/mesalib/docs/sourcetree.html index e26c653ab..abc5e3986 100644 --- a/mesalib/docs/sourcetree.html +++ b/mesalib/docs/sourcetree.html @@ -1,10 +1,11 @@ - - -Mesa Source Tree - - - - + + + + + Mesa Source Tree + + +

      Mesa source code tree overview

      @@ -157,5 +158,5 @@ each directory. - - + + diff --git a/mesalib/docs/subset-A.html b/mesalib/docs/subset-A.html index d576bb674..6dcd84374 100644 --- a/mesalib/docs/subset-A.html +++ b/mesalib/docs/subset-A.html @@ -1,21 +1,15 @@ - - + + + Mini GLX Specification -

      -
      Mesa Subset Specification
      -

      -

      -
      -

      Tungsten Graphics, Inc.

      -

      February 26, 2003
      -

      -
      -

      +

      Mesa Subset Specification

      +

      Tungsten Graphics, Inc.

      +

      February 26, 2003

      Copyright © 2002-2003 by Tungsten Graphics, Inc., Cedar Park, Texas. All Rights Reserved.

      diff --git a/mesalib/docs/subset.html b/mesalib/docs/subset.html index c706381e3..0ceb13666 100644 --- a/mesalib/docs/subset.html +++ b/mesalib/docs/subset.html @@ -1,12 +1,13 @@ - + + + + + Mesa Subset Driver + + + -Mesa Subset Driver - - - - - -

      Mesa Subset Driver

      +

      Mesa Subset Driver

      In 2002/2003 Tungsten Graphics was contracted to develop a subset Mesa/Radeon @@ -20,5 +21,5 @@ The specification for this subset can be found here.

      - - + + diff --git a/mesalib/docs/systems.html b/mesalib/docs/systems.html index 62a6e0b52..999975183 100644 --- a/mesalib/docs/systems.html +++ b/mesalib/docs/systems.html @@ -1,12 +1,13 @@ - + + + + + Supported Systems and Drivers + + + -Supported Systems and Drivers - - - - - -

      Supported Systems and Drivers

      +

      Supported Systems and Drivers

      Mesa is primarily developed and used on Linux systems. @@ -47,14 +48,14 @@ Software drivers include: Additional driver information:

      -

      @@ -80,7 +81,7 @@ The list includes:
    3. DOS
    4. fbdev
    5. DEC/VMS -
        +
      diff --git a/mesalib/docs/thanks.html b/mesalib/docs/thanks.html index 2031788f0..b9a2b27cb 100644 --- a/mesalib/docs/thanks.html +++ b/mesalib/docs/thanks.html @@ -1,14 +1,13 @@ - + + + + + Acknowledgements + + + - -Acknowledgements - - - - - - -

      Acknowledgments

      +

      Acknowledgments

      The following individuals and groups are to be acknowledged for their @@ -18,8 +17,8 @@ This list is far from complete and somewhat dated, unfortunately.
      • Early Mesa development was done while Brian was part of the -SSEC Visualization Project at the University of +SSEC Visualization Project at the University of Wisconsin. He'd like to thank Bill Hibbard for letting him work on Mesa as part of that project.
        @@ -34,11 +33,11 @@ Tungsten Graphics, Inc. have supported the ongoing development of Mesa.

      • The -Mesa +Mesa website is hosted by - -Sourceforge.net + +Sourceforge.net

        @@ -130,5 +129,5 @@ Please send corrections and additions to Brian.

        - - + + diff --git a/mesalib/docs/utilities.html b/mesalib/docs/utilities.html index 4693639b8..c74816944 100644 --- a/mesalib/docs/utilities.html +++ b/mesalib/docs/utilities.html @@ -1,12 +1,13 @@ - + + + + + Development Utilities + + + -Development Utilities - - - - - -

        Development Utilities

        +

        Development Utilities

          @@ -23,4 +24,4 @@ memory-related problems in your code.
        - \ No newline at end of file + diff --git a/mesalib/docs/utility.html b/mesalib/docs/utility.html index dfb4a909f..23d65496b 100644 --- a/mesalib/docs/utility.html +++ b/mesalib/docs/utility.html @@ -1,12 +1,13 @@ - - -Utilities - - - - - -

        Utilities

        + + + + + Utilities + + + + +

        Utilities

        • - -Mesa Version History - - - - - - - - + + + + + Mesa Version History + + + + + NOTE: Changes for Mesa 6.4 and later are documented in the corresponding release notes file. - + -

          Mesa Version History

          +

          Mesa Version History

          -

          1.0 beta February 1995

          +

          1.0 beta February 1995

          • Initial release
          -

          1.1 beta March 4, 1995

          +

          1.1 beta March 4, 1995

          Changes:
          • faster point and line drawing (2x faster) @@ -37,7 +36,7 @@ New:
          • GLUT support
          -

          1.1.1 beta March 7, 1995

          +

          1.1.1 beta March 7, 1995

          Changes:
          • Reverted from eval2.c to eval.c due to FPE on Linux @@ -45,7 +44,7 @@ Changes:
          • more Makefile changes
          -

          1.1.2 beta March 14, 1995

          +

          1.1.2 beta March 14, 1995

          New:
          • implementation of SGI's blending extensions @@ -61,7 +60,7 @@ Changes:
          • faster transformation arithmetic
          -

          1.1.3 beta March 31, 1995

          +

          1.1.3 beta March 31, 1995

          New:
          • gluScaleImage() and gluBuild2DMipMaps() implemented @@ -76,7 +75,7 @@ Changes:
          • more bug fixes
          -

          1.1.4 beta April 20, 1995

          +

          1.1.4 beta April 20, 1995

          Bug fixes:
          • missing #define SEEK_SET in src-tk/image.c @@ -96,7 +95,7 @@ New features:
          • Implemented gluPartialDisk()
          -

          1.2 May 22, 1995

          +

          1.2 May 22, 1995

          Bug fixes:
          • IRIX 4.x makefile problem @@ -128,7 +127,7 @@ Bug fixes:
          • X/Mesa incorrect default clear color and drawing color
          • more robust X MIT-SHM support in X/Mesa
          • glTexImage( format=GL_LUMINANCE ) didn't work -
          • GL_LINE mode polygons with line width > 1.0 could cause a crash +
          • GL_LINE mode polygons with line width > 1.0 could cause a crash
          • numerous feedback bugs
          • glReadPixels() from depth buffer was wrong
          • error prone depth and stencil buffer allocation @@ -391,7 +390,7 @@ Bug fixes:
          • using 24-bit color on some X servers resulted in garbage rendering
          • 32-bit per pixel mode for XFree86 now works
          • glRotate(a,0,0,0) gave unpredictable results -
          • GL_LINE_STRIP with > 480 vertices had occasional clipping problems +
          • GL_LINE_STRIP with > 480 vertices had occasional clipping problems
          • 8-bit TrueColor GLXPixmap rendering incorrectly required a colormap
          • glMaterial() wasn't ignored when GL_COLOR_MATERIAL was enabled
          • glEnable(GL_COLOR_MATERIAL) followed by glColor() didn't work right @@ -505,7 +504,7 @@ Changes:
          • many 3Dfx driver updates
          • cygnus Makefiles now included
          • updated DOS driver -
          • made a few changes to dosmesa.c and wmesa.c (VB->Unclipped) +
          • made a few changes to dosmesa.c and wmesa.c (VB->Unclipped)
          • internally, colors now stored in GLubytes, not GLfixed
          • optimized changing of GL_SHININESS parameter
          @@ -594,7 +593,7 @@ New:
        • v0.22 of 3Dfx Glide driver
        • more X86 assembly language optimizations
        • faster blending for some modes -
        • XMesaSetFXmode() to switch between 3Dfx window and full-screen mode +
        • XMesaSetFXmode() to switch between 3Dfx window and full-screen mode
        • added preliminary thread support
        • added GLX_MESA_copy_sub_buffer extension
        • some clipping optimizations @@ -606,7 +605,7 @@ Bug fixes:
        • fixed clipping bug when using 3Dfx driver
        • fixed a problem when trying to use X fonts w/ 3Dfx driver
        • fixed a texture filter bug in 3Dfx/Glide driver -
        • fixed bug in 3Dfx/Glide driver involving depth mask & clearing +
        • fixed bug in 3Dfx/Glide driver involving depth mask & clearing
        • glLoadMatrix to set projection matrix confused the 3Dfx driver
        • non-identity texture matrices didn't work with linux-386 configs
        • glGenTextures() didn't reserve the returned texture IDs @@ -621,7 +620,7 @@ Changes:
          • replaced old Mesa/windows/ directory with Mesa/WIN32/ directory
          • converted a few old glaux/gltk demos to GLUT -
          • renamed directories: demos -> xdemos, gdemos -> demos +
          • renamed directories: demos -> xdemos, gdemos -> demos
          @@ -898,9 +897,9 @@ New:
        • demos/texenv.c demo
        • GL_EXT_texture_env_combine extension (by Holger Waechtler)
        • Xlib driver is now thread-safe (see xdemos/glthreads) -
            -Bug Fixes:
          +Bug Fixes: +
          • various GL conformance failures fixed since 3.2.1
          Changes: @@ -936,9 +935,9 @@ Bug Fixes:
        • texture matrix changes weren't always detected (GLUT projtex demo)
        • fixed random color problem in vertex fog code
        • fixed Glide-related bug that let Quake get a 24-bit Z buffer -
            -Changes:
          +Changes: +
          • finished internal support for compressed textures for DRI
          @@ -1137,12 +1136,12 @@ Bug fixes:
        • glDraw/ReadPixels didn't catch all the errors that they should have
        • Fixed 24bpp rendering problem in Windows driver (Karl Schultz)
        • 16-bit GLchan mode fixes (m_trans_tmp.h, s_triangle.c) -
        • Fixed 1-bit float->int conversion bug in glDrawPixels(GL_DEPTH_COMP) +
        • Fixed 1-bit float->int conversion bug in glDrawPixels(GL_DEPTH_COMP)
        • glColorMask as sometimes effecting glXSwapBuffers()
        • fixed a potential bug in XMesaGarbageCollect()
        • N threads rendering into one window didn't work reliably
        • glCopyPixels didn't work for deep color channels -
        • improved 8 -> 16bit/channel texture image conversion (Gerk Huisma) +
        • improved 8 -> 16bit/channel texture image conversion (Gerk Huisma)
        • glPopAttrib() didn't correctly restore user clip planes
        • user clip planes failed for some perspective projections (Chromium)
        @@ -1180,7 +1179,7 @@ Bug fixes: Changes:
        • lots of C++ (g++) code clean-ups -
        • lots of T&L updates for the Radeon DRI driver +
        • lots of T&L updates for the Radeon DRI driver
        Known bugs:
          @@ -1380,7 +1379,7 @@ Changes: New:
          • reorganized directory tree -
          • GL_ARB_vertex/fragment_program extensions (Michal Krol & Karl Rasche) +
          • GL_ARB_vertex/fragment_program extensions (Michal Krol & Karl Rasche)
          • GL_ATI_texture_env_combine3 extension (Ian Romanick)
          • GL_SGI_texture_color_table extension (Eric Plante)
          • GL_NV_fragment_program extension @@ -1443,7 +1442,7 @@ Bug fixes:
          -

          6.0.1 April 2, 2004

          +

          6.0.1 April 2, 2004

          New:
          • upgraded glext.h to version 22 @@ -1456,7 +1455,7 @@ Bug fixes:
          • fixed build problems on OpenBSD
          • omit CVS directories from tarballs
          • glGetTexImage(GL_COLOR_INDEX) was broken -
          • fixed an infinite loop in t&l module +
          • fixed an infinite loop in t&l module
          • silenced some valgrind warnings about using unitialized memory
          • fixed some compilation/link glitches on IRIX (Mike Stephens)
          • glBindProgram wasn't getting compiled into display lists @@ -1481,7 +1480,7 @@ Bug fixes:
          -

          6.1 August 18, 2004

          +

          6.1 August 18, 2004

          New:
          • Revamped Makefile system @@ -1514,7 +1513,7 @@ Bug fixes:
          • sampling an incomplete texture in a fragment program would segfault
          • glTexImage was missing a few error checks
          • fixed some minor glGetTexParameter glitches -
          • GL_INTENSITY was mistakenly accepted as a to glTexImage +
          • GL_INTENSITY was mistakenly accepted as a <format> to glTexImage
          • fragment program writes to RC/HC register were broken
          • fixed a few glitches in GL_HP_occlusion_test extension
          • glBeginQueryARB and glEndQueryARB didn't work inside display lists @@ -1524,7 +1523,7 @@ Bug fixes:
          -

          6.2 October 2, 2004

          +

          6.2 October 2, 2004

          New:
          • enabled GL_ARB_texture_rectangle (same as GL_NV_texture_rectangle) @@ -1551,7 +1550,7 @@ Bug fixes:
          -

          6.2.1 December 9, 2004

          +

          6.2.1 December 9, 2004

          Bug fixes:
          • don't apply regular fog or color sum when using a fragment program @@ -1572,7 +1571,7 @@ Changes:
          -

          6.3 July 20, 2005

          +

          6.3 July 20, 2005

          New:
          • GL_EXT_framebuffer_object extension @@ -1616,13 +1615,13 @@ Bug fixes:
          -

          6.3.1

          +

          6.3.1

          This was an intermediate release for X.org which wasn't otherwise released.)

          -

          6.3.2 August 19, 2005

          +

          6.3.2 August 19, 2005

          New:
          • The distribution now includes the DRI drivers and GLX code @@ -1646,10 +1645,10 @@ Bug fixes:
          - + NOTE: Changes for Mesa 6.4 and later are documented in the corresponding
          release notes file. - + diff --git a/mesalib/docs/viewperf.html b/mesalib/docs/viewperf.html index af351bc42..6c3faf68c 100644 --- a/mesalib/docs/viewperf.html +++ b/mesalib/docs/viewperf.html @@ -1,10 +1,11 @@ - - -Viewperf Issues - - - - + + + + + Viewperf Issues + + +

          Viewperf Issues

          @@ -196,5 +197,5 @@ and with a semi-random color (between white and black) since GL_FOG is enabled.

          - - + + diff --git a/mesalib/docs/vmware-guest.html b/mesalib/docs/vmware-guest.html index 4d95c1769..abb904c43 100644 --- a/mesalib/docs/vmware-guest.html +++ b/mesalib/docs/vmware-guest.html @@ -1,12 +1,12 @@ - - -VMware guest GL driver - - - + + + + + VMware guest GL driver + + -

          VMware guest GL driver

          @@ -186,13 +186,13 @@ OpenGL renderer string: Gallium 0.4 on SVGA3D; build: RELEASE; OpenGL version string: 2.1 Mesa 8.0 +

          If you don't see this, try setting this environment variable:

             export LIBGL_DEBUG=verbose
          +

          then rerun glxinfo and examine the output for error messages.

          - - diff --git a/mesalib/docs/webmaster.html b/mesalib/docs/webmaster.html index 16f4dc803..f9de714fd 100644 --- a/mesalib/docs/webmaster.html +++ b/mesalib/docs/webmaster.html @@ -1,17 +1,18 @@ - + + + + + Mesa Introduction + + + -Mesa Introduction - - - - - -

          Webmaster

          +

          Webmaster

          If you have problems, edits or additions for this website send them to Brian -(brian.e.paul gmail.com). +(brian.e.paul gmail.com).

          diff --git a/mesalib/docs/xlibdriver.html b/mesalib/docs/xlibdriver.html index db03bc353..57b23789e 100644 --- a/mesalib/docs/xlibdriver.html +++ b/mesalib/docs/xlibdriver.html @@ -1,12 +1,13 @@ - + + + + + Xlib Software Driver + + + -Xlib Software Driver - - - - - -

          Xlib Software Driver

          +

          Xlib Software Driver

          Mesa's Xlib driver provides an emulation of the GLX interface so that @@ -31,7 +32,7 @@ The unique features of the Xlib driver follows.

          -

          X Visual Selection

          +

          X Visual Selection

          Mesa supports RGB(A) rendering into almost any X visual type and depth.

          @@ -68,7 +69,7 @@ Here are some examples: -

          Double Buffering

          +

          Double Buffering

          Mesa can use either an X Pixmap or XImage as the back color buffer when in double-buffer mode. @@ -95,7 +96,7 @@ for your application.

          -

          Colormaps

          +

          Colormaps

          When using Mesa directly or with GLX, it's up to the application writer to create a window with an appropriate colormap. The GLUT @@ -116,7 +117,7 @@ significant.

          -

          Gamma Correction

          +

          Gamma Correction

          To compensate for the nonlinear relationship between pixel values and displayed intensities, there is a gamma correction feature in @@ -169,7 +170,7 @@ the Gamma FAQ

          -

          Overlay Planes

          +

          Overlay Planes

          Hardware overlay planes are supported by the Xlib driver. To determine if your X server has overlay support you can test for the @@ -180,7 +181,7 @@ SERVER_OVERLAY_VISUALS property: -

          HPCR Dithering

          +

          HPCR Dithering

          If you set the MESA_HPCR_CLEAR environment variable then dithering will be used when clearing the color buffer. This is only applicable @@ -189,7 +190,7 @@ This incurs a small performance penalty.

          -

          Extensions

          +

          Extensions

          The following MESA-specific extensions are implemented in the Xlib driver.

          @@ -248,7 +249,7 @@ just before an X window is destroyed. For example: This extension was added in Mesa 2.0.

          -

          GLX_MESA_copy_sub_buffer

          +

          GLX_MESA_copy_sub_buffer

          This extension adds the glXCopySubBufferMESA() function. It works like glXSwapBuffers() but only copies a sub-region of the window @@ -261,7 +262,7 @@ instead of the whole window. This extension was added in Mesa 2.6

          -

          Summary of X-related environment variables

          +

          Summary of X-related environment variables

              MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode (X only)
              MESA_CI_VISUAL - specifies the X visual and depth for CI mode (X only)
          diff --git a/mesalib/scons/gallium.py b/mesalib/scons/gallium.py
          index 2fa80db88..ee91ca444 100644
          --- a/mesalib/scons/gallium.py
          +++ b/mesalib/scons/gallium.py
          @@ -327,7 +327,8 @@ def generate(env):
                           #'-march=pentium4',
                       ]
                       if distutils.version.LooseVersion(ccversion) >= distutils.version.LooseVersion('4.2') \
          -               and (platform != 'windows' or env['build'] == 'debug' or True):
          +               and (platform != 'windows' or env['build'] == 'debug' or True) \
          +               and platform != 'haiku':
                           # NOTE: We need to ensure stack is realigned given that we
                           # produce shared objects, and have no control over the stack
                           # alignment policy of the application. Therefore we need
          @@ -346,6 +347,14 @@ def generate(env):
                       if platform in ['windows', 'darwin']:
                           # Workaround http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37216
                           ccflags += ['-fno-common']
          +            if platform in ['haiku']:
          +                # Make optimizations compatible with Pentium or higher on Haiku
          +                ccflags += [
          +                    '-mstackrealign', # ensure stack is aligned
          +                    '-march=i586', # Haiku target is Pentium
          +                    '-mtune=i686', # use i686 where we can
          +                    '-mmmx' # use mmx math where we can
          +                ]
                   if env['machine'] == 'x86_64':
                       ccflags += ['-m64']
                       if platform == 'darwin':
          diff --git a/mesalib/src/gallium/auxiliary/util/u_blit.c b/mesalib/src/gallium/auxiliary/util/u_blit.c
          index e5b97f720..9bd2ef52d 100644
          --- a/mesalib/src/gallium/auxiliary/util/u_blit.c
          +++ b/mesalib/src/gallium/auxiliary/util/u_blit.c
          @@ -419,7 +419,7 @@ util_blit_pixels_writemask(struct blit_state *ctx,
                                            dstX0, dstY0, dst->u.tex.first_layer,/* dest */
                                            src_tex, src_level,
                                            &src_box);
          -       return;
          +      return;
              }
           
              if (dst_format == dst->format) {
          @@ -444,6 +444,9 @@ util_blit_pixels_writemask(struct blit_state *ctx,
                  src_tex->target != PIPE_TEXTURE_2D &&
                  src_tex->target != PIPE_TEXTURE_RECT))
              {
          +      /* Make a temporary texture which contains a copy of the source pixels.
          +       * Then we'll sample from the temporary texture.
          +       */
                 struct pipe_resource texTemp;
                 struct pipe_resource *tex;
                 struct pipe_sampler_view sv_templ;
          @@ -515,6 +518,7 @@ util_blit_pixels_writemask(struct blit_state *ctx,
                 pipe_resource_reference(&tex, NULL);
              }
              else {
          +      /* Directly sample from the source resource/texture */
                 u_sampler_view_default_template(&sv_templ, src_tex, src_format);
                 sampler_view = pipe->create_sampler_view(pipe, src_tex, &sv_templ);
           
          diff --git a/mesalib/src/glsl/TODO b/mesalib/src/glsl/TODO
          index eb73fc2e8..bd077a856 100644
          --- a/mesalib/src/glsl/TODO
          +++ b/mesalib/src/glsl/TODO
          @@ -6,9 +6,6 @@
             constant index values.  For others it is more complicated.  Perhaps these
             cases should be silently converted to uniforms?
           
          -- Implement support for ir_binop_dot in opt_algebraic.cpp.  Perform
          -  transformations such as "dot(v, vec3(0.0, 1.0, 0.0))" -> v.y.
          -
           - Track source locations throughout the IR.  There are currently several
             places where we cannot emit line numbers for errors (and currently emit 0:0)
             because we've "lost" the line number information.  This is particularly
          diff --git a/mesalib/src/glsl/ir.cpp b/mesalib/src/glsl/ir.cpp
          index 69954998b..f81bfd1ab 100644
          --- a/mesalib/src/glsl/ir.cpp
          +++ b/mesalib/src/glsl/ir.cpp
          @@ -46,6 +46,11 @@ bool ir_rvalue::is_negative_one() const
              return false;
           }
           
          +bool ir_rvalue::is_basis() const
          +{
          +   return false;
          +}
          +
           /**
            * Modify the swizzle make to move one component to another
            *
          @@ -1125,6 +1130,49 @@ ir_constant::is_negative_one() const
              return true;
           }
           
          +bool
          +ir_constant::is_basis() const
          +{
          +   if (!this->type->is_scalar() && !this->type->is_vector())
          +      return false;
          +
          +   if (this->type->is_boolean())
          +      return false;
          +
          +   unsigned ones = 0;
          +   for (unsigned c = 0; c < this->type->vector_elements; c++) {
          +      switch (this->type->base_type) {
          +      case GLSL_TYPE_FLOAT:
          +	 if (this->value.f[c] == 1.0)
          +	    ones++;
          +	 else if (this->value.f[c] != 0.0)
          +	    return false;
          +	 break;
          +      case GLSL_TYPE_INT:
          +	 if (this->value.i[c] == 1)
          +	    ones++;
          +	 else if (this->value.i[c] != 0)
          +	    return false;
          +	 break;
          +      case GLSL_TYPE_UINT:
          +	 if (int(this->value.u[c]) == 1)
          +	    ones++;
          +	 else if (int(this->value.u[c]) != 0)
          +	    return false;
          +	 break;
          +      default:
          +	 /* The only other base types are structures, arrays, samplers, and
          +	  * booleans.  Samplers cannot be constants, and the others should
          +	  * have been filtered out above.
          +	  */
          +	 assert(!"Should not get here.");
          +	 return false;
          +      }
          +   }
          +
          +   return ones == 1;
          +}
          +
           ir_loop::ir_loop()
           {
              this->ir_type = ir_type_loop;
          diff --git a/mesalib/src/glsl/ir.h b/mesalib/src/glsl/ir.h
          index a3f9f0588..55535b2f5 100644
          --- a/mesalib/src/glsl/ir.h
          +++ b/mesalib/src/glsl/ir.h
          @@ -201,7 +201,8 @@ public:
               * for vector and scalar types that have all elements set to the value
               * zero (or \c false for booleans).
               *
          -    * \sa ir_constant::has_value, ir_rvalue::is_one, ir_rvalue::is_negative_one
          +    * \sa ir_constant::has_value, ir_rvalue::is_one, ir_rvalue::is_negative_one,
          +    *     ir_constant::is_basis
               */
              virtual bool is_zero() const;
           
          @@ -213,7 +214,8 @@ public:
               * for vector and scalar types that have all elements set to the value
               * one (or \c true for booleans).
               *
          -    * \sa ir_constant::has_value, ir_rvalue::is_zero, ir_rvalue::is_negative_one
          +    * \sa ir_constant::has_value, ir_rvalue::is_zero, ir_rvalue::is_negative_one,
          +    *     ir_constant::is_basis
               */
              virtual bool is_one() const;
           
          @@ -223,12 +225,27 @@ public:
               * The base implementation of this function always returns \c false.  The
               * \c ir_constant class over-rides this function to return \c true \b only
               * for vector and scalar types that have all elements set to the value
          -    * negative one.  For boolean times, the result is always \c false.
          +    * negative one.  For boolean types, the result is always \c false.
               *
               * \sa ir_constant::has_value, ir_rvalue::is_zero, ir_rvalue::is_one
          +    *     ir_constant::is_basis
               */
              virtual bool is_negative_one() const;
           
          +   /**
          +    * Determine if an r-value is a basis vector
          +    *
          +    * The base implementation of this function always returns \c false.  The
          +    * \c ir_constant class over-rides this function to return \c true \b only
          +    * for vector and scalar types that have one element set to the value one,
          +    * and the other elements set to the value zero.  For boolean types, the
          +    * result is always \c false.
          +    *
          +    * \sa ir_constant::has_value, ir_rvalue::is_zero, ir_rvalue::is_one,
          +    *     is_constant::is_negative_one
          +    */
          +   virtual bool is_basis() const;
          +
           
              /**
               * Return a generic value of error_type.
          @@ -1743,13 +1760,14 @@ public:
               * Determine whether a constant has the same value as another constant
               *
               * \sa ir_constant::is_zero, ir_constant::is_one,
          -    * ir_constant::is_negative_one
          +    * ir_constant::is_negative_one, ir_constant::is_basis
               */
              bool has_value(const ir_constant *) const;
           
              virtual bool is_zero() const;
              virtual bool is_one() const;
              virtual bool is_negative_one() const;
          +   virtual bool is_basis() const;
           
              /**
               * Value of the constant.
          diff --git a/mesalib/src/glsl/opt_algebraic.cpp b/mesalib/src/glsl/opt_algebraic.cpp
          index d39761260..75948db16 100644
          --- a/mesalib/src/glsl/opt_algebraic.cpp
          +++ b/mesalib/src/glsl/opt_algebraic.cpp
          @@ -84,6 +84,12 @@ is_vec_one(ir_constant *ir)
              return (ir == NULL) ? false : ir->is_one();
           }
           
          +static inline bool
          +is_vec_basis(ir_constant *ir)
          +{
          +   return (ir == NULL) ? false : ir->is_basis();
          +}
          +
           static void
           update_type(ir_expression *ir)
           {
          @@ -309,6 +315,31 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir)
                 }
                 break;
           
          +   case ir_binop_dot:
          +      if (is_vec_zero(op_const[0]) || is_vec_zero(op_const[1])) {
          +	 this->progress = true;
          +	 return ir_constant::zero(mem_ctx, ir->type);
          +      }
          +      if (is_vec_basis(op_const[0])) {
          +	 this->progress = true;
          +	 unsigned component = 0;
          +	 for (unsigned c = 0; c < op_const[0]->type->vector_elements; c++) {
          +	    if (op_const[0]->value.f[c] == 1.0)
          +	       component = c;
          +	 }
          +	 return new(mem_ctx) ir_swizzle(ir->operands[1], component, 0, 0, 0, 1);
          +      }
          +      if (is_vec_basis(op_const[1])) {
          +	 this->progress = true;
          +	 unsigned component = 0;
          +	 for (unsigned c = 0; c < op_const[1]->type->vector_elements; c++) {
          +	    if (op_const[1]->value.f[c] == 1.0)
          +	       component = c;
          +	 }
          +	 return new(mem_ctx) ir_swizzle(ir->operands[0], component, 0, 0, 0, 1);
          +      }
          +      break;
          +
              case ir_binop_logic_and:
                 /* FINISHME: Also simplify (a && a) to (a). */
                 if (is_vec_one(op_const[0])) {
          diff --git a/mesalib/src/mapi/glapi/gen/ARB_texture_storage.xml b/mesalib/src/mapi/glapi/gen/ARB_texture_storage.xml
          index 945467939..045913806 100644
          --- a/mesalib/src/mapi/glapi/gen/ARB_texture_storage.xml
          +++ b/mesalib/src/mapi/glapi/gen/ARB_texture_storage.xml
          @@ -8,7 +8,7 @@
           
           
           
          -  
          +  
           
             
               
          diff --git a/mesalib/src/mapi/glapi/gen/GL3x.xml b/mesalib/src/mapi/glapi/gen/GL3x.xml
          index ab4900c3e..f3d782ca4 100644
          --- a/mesalib/src/mapi/glapi/gen/GL3x.xml
          +++ b/mesalib/src/mapi/glapi/gen/GL3x.xml
          @@ -32,6 +32,8 @@
             
             
             
          +  
          +  
             
             
             
          @@ -474,8 +476,41 @@
           
           
           
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
          +  
             
             
          +  
             
             
             
          @@ -583,6 +618,11 @@
           
           
             
          +  
          +  
          +  
          +  
          +  
           
             
               
          diff --git a/mesalib/src/mapi/glapi/gen/gl_API.xml b/mesalib/src/mapi/glapi/gen/gl_API.xml
          index a74577d1f..4bd0fc6b2 100644
          --- a/mesalib/src/mapi/glapi/gen/gl_API.xml
          +++ b/mesalib/src/mapi/glapi/gen/gl_API.xml
          @@ -7965,7 +7965,12 @@
           
           
           
          -
          +
          +
          +    
          +        
          +    
          +
           
           
           
          @@ -8614,37 +8619,37 @@
           
           
           
          -    
          +    
                   
                   
                   
               
           
          -    
          +    
                   
                   
                   
               
           
          -    
          +    
                   
                   
                   
               
           
          -    
          +    
                   
                   
                   
               
           
          -    
          +    
                   
                   
                   
               
           
          -    
          +    
                   
                   
                   
          @@ -8787,6 +8792,15 @@
           
           
           
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +
          +
               
                   
               
          @@ -9381,6 +9395,9 @@
           
           
           
          +    
          +    
          +
               
                   
                   
          @@ -10003,7 +10020,7 @@
           
           
           
          -    
          +    
                   
                   
               
          @@ -10522,11 +10539,11 @@
           
           
           
          -    
          +    
                   
               
           
          -    
          +    
                   
                   
                   
          @@ -10534,31 +10551,31 @@
           
           
           
          -    
          +    
                   
                   
                   
               
           
          -    
          +    
                   
                   
                   
               
           
          -    
          +    
                   
                   
                   
               
           
          -    
          +    
                   
                   
                   
               
           
          -    
          +    
                   
                   
                   
          @@ -10568,7 +10585,7 @@
                   
               
           
          -    
          +    
                   
                   
                   
          @@ -10582,7 +10599,7 @@
                   
               
           
          -    
          +    
                   
                   
                   
          @@ -10590,7 +10607,7 @@
                   
               
           
          -    
          +    
                   
                   
                   
          @@ -10599,7 +10616,7 @@
                   
               
           
          -    
          +    
                   
                   
                   
          @@ -10608,7 +10625,7 @@
                   
               
           
          -    
          +    
                   
                   
                   
          @@ -10616,7 +10633,7 @@
                   
               
           
          -    
          +    
                   
                   
                   
          @@ -10624,14 +10641,14 @@
                   
               
           
          -    
          +    
                   
                   
                   
                   
               
           
          -    
          +    
                   
                   
                   
          @@ -10654,7 +10671,7 @@
           
           
           
          -    
          +    
               
                   
                   
          @@ -10988,43 +11005,43 @@
           
           
           
          -    
          +    
                   
                   
                   
               
           
          -    
          +    
                   
                   
                   
               
           
          -    
          +    
                   
                   
                   
               
           
          -    
          +    
                   
                   
                   
               
           
          -    
          +    
                   
                   
                   
                   
               
           
          -    
          +    
                   
                   
               
           
          -    
          +    
                   
                   
                   
          @@ -11776,6 +11793,117 @@
           
           
           
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +    
          +
          +    
          +    
          +    
          +    
          +
          +    
          +    
          +    
          +
          +    
          +
               
                 
                 
          @@ -12030,6 +12158,13 @@
           
           
           
          +    
          +    
          +    
          +    
          +    
          +    
          +
               
                   
                   
          @@ -12236,8 +12371,19 @@
               
           
           
          +
          +    
          +    
          +    
          +
          +
           
           
          +
          +    
          +    
          +
          +
           
               
                   
          @@ -12264,12 +12410,12 @@
               
                   
               
          -    
          +    
                   
                   
                   
               
          -    
          +    
                   
                   
                   
          @@ -12279,6 +12425,12 @@
           
           
          +
          +    
          +    
          +    
          +
          +
           
           
           
          diff --git a/mesalib/src/mesa/Makefile b/mesalib/src/mesa/Makefile
          index 845b524e6..b0b461fdd 100644
          --- a/mesalib/src/mesa/Makefile
          +++ b/mesalib/src/mesa/Makefile
          @@ -135,7 +135,7 @@ asm_subdirs:
           ######################################################################
           # Dependency generation
           
          -depend: $(ALL_FILES)
          +depend: $(ALL_FILES) main/git_sha1.h
           	@ echo "running $(MKDEP)"
           	@ touch depend
           	@$(MKDEP) $(MKDEP_OPTIONS) $(MESA_CPPFLAGS) \
          diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c
          index 8d7e90126..be7141a58 100644
          --- a/mesalib/src/mesa/drivers/common/meta.c
          +++ b/mesalib/src/mesa/drivers/common/meta.c
          @@ -319,6 +319,10 @@ struct gl_meta_state
              struct drawtex_state DrawTex;  /**< For _mesa_meta_DrawTex() */
           };
           
          +static void meta_glsl_blit_cleanup(struct gl_context *ctx, struct blit_state *blit);
          +static void cleanup_temp_texture(struct gl_context *ctx, struct temp_texture *tex);
          +static void meta_glsl_clear_cleanup(struct gl_context *ctx, struct clear_state *clear);
          +
           static GLuint
           compile_shader_with_debug(struct gl_context *ctx, GLenum target, const GLcharARB *source)
           {
          @@ -335,12 +339,16 @@ compile_shader_with_debug(struct gl_context *ctx, GLenum target, const GLcharARB
                 return shader;
           
              _mesa_GetShaderiv(shader, GL_INFO_LOG_LENGTH, &size);
          -   if (size == 0)
          +   if (size == 0) {
          +      _mesa_DeleteObjectARB(shader);
                 return 0;
          +   }
           
              info = malloc(size);
          -   if (!info)
          +   if (!info) {
          +      _mesa_DeleteObjectARB(shader);
                 return 0;
          +   }
           
              _mesa_GetProgramInfoLog(shader, size, NULL, info);
              _mesa_problem(ctx,
          @@ -349,6 +357,7 @@ compile_shader_with_debug(struct gl_context *ctx, GLenum target, const GLcharARB
           		 info, source);
           
              free(info);
          +   _mesa_DeleteObjectARB(shader);
           
              return 0;
           }
          @@ -401,10 +410,15 @@ _mesa_meta_init(struct gl_context *ctx)
           void
           _mesa_meta_free(struct gl_context *ctx)
           {
          -   /* Note: Any textures, VBOs, etc, that we allocate should get
          -    * freed by the normal context destruction code.  But this would be
          -    * the place to free other meta data someday.
          -    */
          +   GET_CURRENT_CONTEXT(old_context);
          +   _mesa_make_current(ctx, NULL, NULL);
          +   meta_glsl_blit_cleanup(ctx, &ctx->Meta->Blit);
          +   meta_glsl_clear_cleanup(ctx, &ctx->Meta->Clear);
          +   cleanup_temp_texture(ctx, &ctx->Meta->TempTex);
          +   if (old_context)
          +      _mesa_make_current(old_context, old_context->WinSysDrawBuffer, old_context->WinSysReadBuffer);
          +   else
          +      _mesa_make_current(NULL, NULL, NULL);
              free(ctx->Meta);
              ctx->Meta = NULL;
           }
          @@ -1068,6 +1082,15 @@ init_temp_texture(struct gl_context *ctx, struct temp_texture *tex)
              _mesa_GenTextures(1, &tex->TexObj);
           }
           
          +static void
          +cleanup_temp_texture(struct gl_context *ctx, struct temp_texture *tex)
          +{
          +   if (!tex->TexObj)
          +     return;
          +   _mesa_DeleteTextures(1, &tex->TexObj);
          +   tex->TexObj = 0;
          +}
          +
           
           /**
            * Return pointer to temp_texture info for non-bitmap ops.
          @@ -1604,6 +1627,21 @@ _mesa_meta_BlitFramebuffer(struct gl_context *ctx,
              }
           }
           
          +static void
          +meta_glsl_blit_cleanup(struct gl_context *ctx, struct blit_state *blit)
          +{
          +   if (blit->ArrayObj) {
          +      _mesa_DeleteVertexArraysAPPLE(1, &blit->ArrayObj);
          +      blit->ArrayObj = 0;
          +      _mesa_DeleteBuffersARB(1, &blit->VBO);
          +      blit->VBO = 0;
          +   }
          +   if (blit->DepthFP) {
          +      _mesa_DeletePrograms(1, &blit->DepthFP);
          +      blit->DepthFP = 0;
          +   }
          +}
          +
           
           /**
            * Meta implementation of ctx->Driver.Clear() in terms of polygon rendering.
          @@ -1786,7 +1824,9 @@ meta_glsl_clear_init(struct gl_context *ctx, struct clear_state *clear)
           
              clear->ShaderProg = _mesa_CreateProgramObjectARB();
              _mesa_AttachShader(clear->ShaderProg, fs);
          +   _mesa_DeleteObjectARB(fs);
              _mesa_AttachShader(clear->ShaderProg, vs);
          +   _mesa_DeleteObjectARB(vs);
              _mesa_BindAttribLocationARB(clear->ShaderProg, 0, "position");
              _mesa_LinkProgramARB(clear->ShaderProg);
           
          @@ -1799,7 +1839,9 @@ meta_glsl_clear_init(struct gl_context *ctx, struct clear_state *clear)
           
                 clear->IntegerShaderProg = _mesa_CreateProgramObjectARB();
                 _mesa_AttachShader(clear->IntegerShaderProg, fs);
          +      _mesa_DeleteObjectARB(fs);
                 _mesa_AttachShader(clear->IntegerShaderProg, vs);
          +      _mesa_DeleteObjectARB(vs);
                 _mesa_BindAttribLocationARB(clear->IntegerShaderProg, 0, "position");
           
                 /* Note that user-defined out attributes get automatically assigned
          @@ -1814,6 +1856,24 @@ meta_glsl_clear_init(struct gl_context *ctx, struct clear_state *clear)
              }
           }
           
          +static void
          +meta_glsl_clear_cleanup(struct gl_context *ctx, struct clear_state *clear)
          +{
          +   if (clear->ArrayObj == 0)
          +      return;
          +   _mesa_DeleteVertexArraysAPPLE(1, &clear->ArrayObj);
          +   clear->ArrayObj = 0;
          +   _mesa_DeleteBuffersARB(1, &clear->VBO);
          +   clear->VBO = 0;
          +   _mesa_DeleteObjectARB(clear->ShaderProg);
          +   clear->ShaderProg = 0;
          +
          +   if (clear->IntegerShaderProg) {
          +      _mesa_DeleteObjectARB(clear->IntegerShaderProg);
          +      clear->IntegerShaderProg = 0;
          +   }
          +}
          +
           /**
            * Meta implementation of ctx->Driver.Clear() in terms of polygon rendering.
            */
          diff --git a/mesalib/src/mesa/drivers/windows/gdi/mesa.def b/mesalib/src/mesa/drivers/windows/gdi/mesa.def
          index d5c98801d..fec7bbac0 100644
          --- a/mesalib/src/mesa/drivers/windows/gdi/mesa.def
          +++ b/mesalib/src/mesa/drivers/windows/gdi/mesa.def
          @@ -556,21 +556,6 @@ EXPORTS
           	glFogCoorddvEXT
           	glFogCoordPointerEXT
           	glBlendFuncSeparateEXT
          -	glFlushVertexArrayRangeNV
          -	glVertexArrayRangeNV
          -	glCombinerParameterfvNV
          -	glCombinerParameterfNV
          -	glCombinerParameterivNV
          -	glCombinerParameteriNV
          -	glCombinerInputNV
          -	glCombinerOutputNV
          -	glFinalCombinerInputNV
          -	glGetCombinerInputParameterfvNV
          -	glGetCombinerInputParameterivNV
          -	glGetCombinerOutputParameterfvNV
          -	glGetCombinerOutputParameterivNV
          -	glGetFinalCombinerInputParameterfvNV
          -	glGetFinalCombinerInputParameterivNV
           	glResizeBuffersMESA
           	glWindowPos2dMESA
           	glWindowPos2dvMESA
          diff --git a/mesalib/src/mesa/main/shaderobj.c b/mesalib/src/mesa/main/shaderobj.c
          index 7eb6f0bda..16800ae5e 100644
          --- a/mesalib/src/mesa/main/shaderobj.c
          +++ b/mesalib/src/mesa/main/shaderobj.c
          @@ -278,7 +278,9 @@ _mesa_clear_shader_program_data(struct gl_context *ctx,
                                           struct gl_shader_program *shProg)
           {
              if (shProg->UniformStorage) {
          -      _mesa_uniform_detach_all_driver_storage(shProg->UniformStorage);
          +      unsigned i;
          +      for (i = 0; i < shProg->NumUserUniformStorage; ++i)
          +         _mesa_uniform_detach_all_driver_storage(&shProg->UniformStorage[i]);
                 ralloc_free(shProg->UniformStorage);
                 shProg->NumUserUniformStorage = 0;
                 shProg->UniformStorage = NULL;
          diff --git a/mesalib/src/mesa/program/hash_table.c b/mesalib/src/mesa/program/hash_table.c
          index dc8563a33..7dabadc50 100644
          --- a/mesalib/src/mesa/program/hash_table.c
          +++ b/mesalib/src/mesa/program/hash_table.c
          @@ -149,7 +149,7 @@ hash_table_insert(struct hash_table *ht, void *data, const void *key)
               insert_at_head(& ht->buckets[bucket], & node->link);
           }
           
          -void
          +bool
           hash_table_replace(struct hash_table *ht, void *data, const void *key)
           {
               const unsigned hash_value = (*ht->hash)(key);
          @@ -162,7 +162,7 @@ hash_table_replace(struct hash_table *ht, void *data, const void *key)
           
                  if ((*ht->compare)(hn->key, key) == 0) {
           	  hn->data = data;
          -	  return;
          +	  return true;
                  }
               }
           
          @@ -172,6 +172,7 @@ hash_table_replace(struct hash_table *ht, void *data, const void *key)
               hn->key = key;
           
               insert_at_head(& ht->buckets[bucket], & hn->link);
          +    return false;
           }
           
           void
          diff --git a/mesalib/src/mesa/program/hash_table.h b/mesalib/src/mesa/program/hash_table.h
          index bcf65df7d..e95fc4982 100644
          --- a/mesalib/src/mesa/program/hash_table.h
          +++ b/mesalib/src/mesa/program/hash_table.h
          @@ -32,6 +32,7 @@
           #define HASH_TABLE_H
           
           #include 
          +#include 
           #include 
           #include 
           #include 
          @@ -114,6 +115,10 @@ extern void hash_table_insert(struct hash_table *ht, void *data,
           /**
            * Add an element to a hash table with replacement
            *
          + * \return
          + * 1 if it did replace the the value (in which case the old key is kept), 0 if
          + * it did not replace the value (in which case the new key is kept).
          + *
            * \warning
            * If \c key is already in the hash table, \c data will \b replace the most
            * recently inserted \c data (see the warning in \c hash_table_insert) for
          @@ -121,7 +126,7 @@ extern void hash_table_insert(struct hash_table *ht, void *data,
            *
            * \sa hash_table_insert
            */
          -extern void hash_table_replace(struct hash_table *ht, void *data,
          +extern bool hash_table_replace(struct hash_table *ht, void *data,
               const void *key);
           
           /**
          @@ -219,6 +224,7 @@ public:
               */
              void clear()
              {
          +      hash_table_call_foreach(this->ht, delete_key, NULL);
                 hash_table_clear(this->ht);
              }
           
          @@ -258,9 +264,12 @@ public:
                  * because UINT_MAX+1 = 0.
                  */
                 assert(value != UINT_MAX);
          -      hash_table_replace(this->ht,
          -			 (void *) (intptr_t) (value + 1),
          -			 strdup(key));
          +      char *dup_key = strdup(key);
          +      bool result = hash_table_replace(this->ht,
          +				       (void *) (intptr_t) (value + 1),
          +				       dup_key);
          +      if (result)
          +	 free(dup_key);
              }
           
           private:
          diff --git a/mesalib/src/mesa/sources.mak b/mesalib/src/mesa/sources.mak
          index 608aa79ab..16b1c39c0 100644
          --- a/mesalib/src/mesa/sources.mak
          +++ b/mesalib/src/mesa/sources.mak
          @@ -198,6 +198,7 @@ VBO_FILES = \
           
           STATETRACKER_FILES = \
           	$(SRCDIR)/state_tracker/st_atom.c \
          +	$(SRCDIR)/state_tracker/st_atom_array.c \
           	$(SRCDIR)/state_tracker/st_atom_blend.c \
           	$(SRCDIR)/state_tracker/st_atom_clip.c \
           	$(SRCDIR)/state_tracker/st_atom_constbuf.c \
          diff --git a/mesalib/src/mesa/state_tracker/st_atom.c b/mesalib/src/mesa/state_tracker/st_atom.c
          index d9cd4aab4..e6fc114f1 100644
          --- a/mesalib/src/mesa/state_tracker/st_atom.c
          +++ b/mesalib/src/mesa/state_tracker/st_atom.c
          @@ -63,7 +63,10 @@ static const struct st_tracked_state *atoms[] =
              &st_update_vs_constants,
              &st_update_gs_constants,
              &st_update_fs_constants,
          -   &st_update_pixel_transfer
          +   &st_update_pixel_transfer,
          +
          +   /* this must be done after the vertex program update */
          +   &st_update_array
           };
           
           
          @@ -122,6 +125,22 @@ static void check_program_state( struct st_context *st )
                 st->dirty.st |= ST_NEW_GEOMETRY_PROGRAM;
           }
           
          +static void check_attrib_edgeflag(struct st_context *st)
          +{
          +   const struct gl_client_array **arrays = st->ctx->Array._DrawArrays;
          +   GLboolean vertDataEdgeFlags;
          +
          +   if (!arrays)
          +      return;
          +
          +   vertDataEdgeFlags = arrays[VERT_ATTRIB_EDGEFLAG]->BufferObj &&
          +                       arrays[VERT_ATTRIB_EDGEFLAG]->BufferObj->Name;
          +   if (vertDataEdgeFlags != st->vertdata_edgeflags) {
          +      st->vertdata_edgeflags = vertDataEdgeFlags;
          +      st->dirty.st |= ST_NEW_EDGEFLAGS_DATA;
          +   }
          +}
          +
           
           /***********************************************************************
            * Update all derived state:
          @@ -132,6 +151,12 @@ void st_validate_state( struct st_context *st )
              struct st_state_flags *state = &st->dirty;
              GLuint i;
           
          +   /* Get Mesa driver state. */
          +   st->dirty.st |= st->ctx->NewDriverState;
          +   st->ctx->NewDriverState = 0;
          +
          +   check_attrib_edgeflag(st);
          +
              /* The bitmap cache is immune to pixel unpack changes.
               * Note that GLUT makes several calls to glPixelStore for each
               * bitmap char it draws so this is an important check.
          diff --git a/mesalib/src/mesa/state_tracker/st_atom.h b/mesalib/src/mesa/state_tracker/st_atom.h
          index 930a08444..703bc2ab3 100644
          --- a/mesalib/src/mesa/state_tracker/st_atom.h
          +++ b/mesalib/src/mesa/state_tracker/st_atom.h
          @@ -46,6 +46,7 @@ void st_destroy_atoms( struct st_context *st );
           void st_validate_state( struct st_context *st );
           
           
          +extern const struct st_tracked_state st_update_array;
           extern const struct st_tracked_state st_update_framebuffer;
           extern const struct st_tracked_state st_update_clip;
           extern const struct st_tracked_state st_update_depth_stencil_alpha;
          @@ -70,4 +71,8 @@ extern const struct st_tracked_state st_update_pixel_transfer;
           
           GLuint st_compare_func_to_pipe(GLenum func);
           
          +enum pipe_format
          +st_pipe_vertex_format(GLenum type, GLuint size, GLenum format,
          +                      GLboolean normalized, GLboolean integer);
          +
           #endif
          diff --git a/mesalib/src/mesa/state_tracker/st_atom_array.c b/mesalib/src/mesa/state_tracker/st_atom_array.c
          new file mode 100644
          index 000000000..d60b0d7a9
          --- /dev/null
          +++ b/mesalib/src/mesa/state_tracker/st_atom_array.c
          @@ -0,0 +1,588 @@
          +/**************************************************************************
          + *
          + * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
          + * Copyright 2012 Marek Olšák 
          + * All Rights Reserved.
          + *
          + * 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, sub license, 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 and this permission notice (including the
          + * next paragraph) 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 NON-INFRINGEMENT.
          + * IN NO EVENT SHALL AUTHORS AND/OR ITS SUPPLIERS 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.
          + *
          + **************************************************************************/
          +
          +/*
          + * This converts the VBO's vertex attribute/array information into
          + * Gallium vertex state and binds it.
          + *
          + * Authors:
          + *   Keith Whitwell 
          + *   Marek Olšák 
          + */
          +
          +#include "st_context.h"
          +#include "st_atom.h"
          +#include "st_cb_bufferobjects.h"
          +#include "st_draw.h"
          +#include "st_program.h"
          +
          +#include "cso_cache/cso_context.h"
          +#include "util/u_math.h"
          +
          +#include "main/bufferobj.h"
          +#include "main/image.h"
          +
          +
          +static GLuint double_types[4] = {
          +   PIPE_FORMAT_R64_FLOAT,
          +   PIPE_FORMAT_R64G64_FLOAT,
          +   PIPE_FORMAT_R64G64B64_FLOAT,
          +   PIPE_FORMAT_R64G64B64A64_FLOAT
          +};
          +
          +static GLuint float_types[4] = {
          +   PIPE_FORMAT_R32_FLOAT,
          +   PIPE_FORMAT_R32G32_FLOAT,
          +   PIPE_FORMAT_R32G32B32_FLOAT,
          +   PIPE_FORMAT_R32G32B32A32_FLOAT
          +};
          +
          +static GLuint half_float_types[4] = {
          +   PIPE_FORMAT_R16_FLOAT,
          +   PIPE_FORMAT_R16G16_FLOAT,
          +   PIPE_FORMAT_R16G16B16_FLOAT,
          +   PIPE_FORMAT_R16G16B16A16_FLOAT
          +};
          +
          +static GLuint uint_types_norm[4] = {
          +   PIPE_FORMAT_R32_UNORM,
          +   PIPE_FORMAT_R32G32_UNORM,
          +   PIPE_FORMAT_R32G32B32_UNORM,
          +   PIPE_FORMAT_R32G32B32A32_UNORM
          +};
          +
          +static GLuint uint_types_scale[4] = {
          +   PIPE_FORMAT_R32_USCALED,
          +   PIPE_FORMAT_R32G32_USCALED,
          +   PIPE_FORMAT_R32G32B32_USCALED,
          +   PIPE_FORMAT_R32G32B32A32_USCALED
          +};
          +
          +static GLuint uint_types_int[4] = {
          +   PIPE_FORMAT_R32_UINT,
          +   PIPE_FORMAT_R32G32_UINT,
          +   PIPE_FORMAT_R32G32B32_UINT,
          +   PIPE_FORMAT_R32G32B32A32_UINT
          +};
          +
          +static GLuint int_types_norm[4] = {
          +   PIPE_FORMAT_R32_SNORM,
          +   PIPE_FORMAT_R32G32_SNORM,
          +   PIPE_FORMAT_R32G32B32_SNORM,
          +   PIPE_FORMAT_R32G32B32A32_SNORM
          +};
          +
          +static GLuint int_types_scale[4] = {
          +   PIPE_FORMAT_R32_SSCALED,
          +   PIPE_FORMAT_R32G32_SSCALED,
          +   PIPE_FORMAT_R32G32B32_SSCALED,
          +   PIPE_FORMAT_R32G32B32A32_SSCALED
          +};
          +
          +static GLuint int_types_int[4] = {
          +   PIPE_FORMAT_R32_SINT,
          +   PIPE_FORMAT_R32G32_SINT,
          +   PIPE_FORMAT_R32G32B32_SINT,
          +   PIPE_FORMAT_R32G32B32A32_SINT
          +};
          +
          +static GLuint ushort_types_norm[4] = {
          +   PIPE_FORMAT_R16_UNORM,
          +   PIPE_FORMAT_R16G16_UNORM,
          +   PIPE_FORMAT_R16G16B16_UNORM,
          +   PIPE_FORMAT_R16G16B16A16_UNORM
          +};
          +
          +static GLuint ushort_types_scale[4] = {
          +   PIPE_FORMAT_R16_USCALED,
          +   PIPE_FORMAT_R16G16_USCALED,
          +   PIPE_FORMAT_R16G16B16_USCALED,
          +   PIPE_FORMAT_R16G16B16A16_USCALED
          +};
          +
          +static GLuint ushort_types_int[4] = {
          +   PIPE_FORMAT_R16_UINT,
          +   PIPE_FORMAT_R16G16_UINT,
          +   PIPE_FORMAT_R16G16B16_UINT,
          +   PIPE_FORMAT_R16G16B16A16_UINT
          +};
          +
          +static GLuint short_types_norm[4] = {
          +   PIPE_FORMAT_R16_SNORM,
          +   PIPE_FORMAT_R16G16_SNORM,
          +   PIPE_FORMAT_R16G16B16_SNORM,
          +   PIPE_FORMAT_R16G16B16A16_SNORM
          +};
          +
          +static GLuint short_types_scale[4] = {
          +   PIPE_FORMAT_R16_SSCALED,
          +   PIPE_FORMAT_R16G16_SSCALED,
          +   PIPE_FORMAT_R16G16B16_SSCALED,
          +   PIPE_FORMAT_R16G16B16A16_SSCALED
          +};
          +
          +static GLuint short_types_int[4] = {
          +   PIPE_FORMAT_R16_SINT,
          +   PIPE_FORMAT_R16G16_SINT,
          +   PIPE_FORMAT_R16G16B16_SINT,
          +   PIPE_FORMAT_R16G16B16A16_SINT
          +};
          +
          +static GLuint ubyte_types_norm[4] = {
          +   PIPE_FORMAT_R8_UNORM,
          +   PIPE_FORMAT_R8G8_UNORM,
          +   PIPE_FORMAT_R8G8B8_UNORM,
          +   PIPE_FORMAT_R8G8B8A8_UNORM
          +};
          +
          +static GLuint ubyte_types_scale[4] = {
          +   PIPE_FORMAT_R8_USCALED,
          +   PIPE_FORMAT_R8G8_USCALED,
          +   PIPE_FORMAT_R8G8B8_USCALED,
          +   PIPE_FORMAT_R8G8B8A8_USCALED
          +};
          +
          +static GLuint ubyte_types_int[4] = {
          +   PIPE_FORMAT_R8_UINT,
          +   PIPE_FORMAT_R8G8_UINT,
          +   PIPE_FORMAT_R8G8B8_UINT,
          +   PIPE_FORMAT_R8G8B8A8_UINT
          +};
          +
          +static GLuint byte_types_norm[4] = {
          +   PIPE_FORMAT_R8_SNORM,
          +   PIPE_FORMAT_R8G8_SNORM,
          +   PIPE_FORMAT_R8G8B8_SNORM,
          +   PIPE_FORMAT_R8G8B8A8_SNORM
          +};
          +
          +static GLuint byte_types_scale[4] = {
          +   PIPE_FORMAT_R8_SSCALED,
          +   PIPE_FORMAT_R8G8_SSCALED,
          +   PIPE_FORMAT_R8G8B8_SSCALED,
          +   PIPE_FORMAT_R8G8B8A8_SSCALED
          +};
          +
          +static GLuint byte_types_int[4] = {
          +   PIPE_FORMAT_R8_SINT,
          +   PIPE_FORMAT_R8G8_SINT,
          +   PIPE_FORMAT_R8G8B8_SINT,
          +   PIPE_FORMAT_R8G8B8A8_SINT
          +};
          +
          +static GLuint fixed_types[4] = {
          +   PIPE_FORMAT_R32_FIXED,
          +   PIPE_FORMAT_R32G32_FIXED,
          +   PIPE_FORMAT_R32G32B32_FIXED,
          +   PIPE_FORMAT_R32G32B32A32_FIXED
          +};
          +
          +
          +/**
          + * Return a PIPE_FORMAT_x for the given GL datatype and size.
          + */
          +enum pipe_format
          +st_pipe_vertex_format(GLenum type, GLuint size, GLenum format,
          +                      GLboolean normalized, GLboolean integer)
          +{
          +   assert((type >= GL_BYTE && type <= GL_DOUBLE) ||
          +          type == GL_FIXED || type == GL_HALF_FLOAT ||
          +          type == GL_INT_2_10_10_10_REV ||
          +          type == GL_UNSIGNED_INT_2_10_10_10_REV);
          +   assert(size >= 1);
          +   assert(size <= 4);
          +   assert(format == GL_RGBA || format == GL_BGRA);
          +
          +   if (type == GL_INT_2_10_10_10_REV ||
          +       type == GL_UNSIGNED_INT_2_10_10_10_REV) {
          +      assert(size == 4);
          +      assert(!integer);
          +
          +      if (format == GL_BGRA) {
          +         if (type == GL_INT_2_10_10_10_REV) {
          +            if (normalized)
          +               return PIPE_FORMAT_B10G10R10A2_SNORM;
          +            else
          +               return PIPE_FORMAT_B10G10R10A2_SSCALED;
          +         } else {
          +            if (normalized)
          +               return PIPE_FORMAT_B10G10R10A2_UNORM;
          +            else
          +               return PIPE_FORMAT_B10G10R10A2_USCALED;
          +         }
          +      } else {
          +         if (type == GL_INT_2_10_10_10_REV) {
          +            if (normalized)
          +               return PIPE_FORMAT_R10G10B10A2_SNORM;
          +            else
          +               return PIPE_FORMAT_R10G10B10A2_SSCALED;
          +         } else {
          +            if (normalized)
          +               return PIPE_FORMAT_R10G10B10A2_UNORM;
          +            else
          +               return PIPE_FORMAT_R10G10B10A2_USCALED;
          +         }
          +      }
          +   }
          +
          +   if (format == GL_BGRA) {
          +      /* this is an odd-ball case */
          +      assert(type == GL_UNSIGNED_BYTE);
          +      assert(normalized);
          +      return PIPE_FORMAT_B8G8R8A8_UNORM;
          +   }
          +
          +   if (integer) {
          +      switch (type) {
          +      case GL_INT: return int_types_int[size-1];
          +      case GL_SHORT: return short_types_int[size-1];
          +      case GL_BYTE: return byte_types_int[size-1];
          +      case GL_UNSIGNED_INT: return uint_types_int[size-1];
          +      case GL_UNSIGNED_SHORT: return ushort_types_int[size-1];
          +      case GL_UNSIGNED_BYTE: return ubyte_types_int[size-1];
          +      default: assert(0); return 0;
          +      }
          +   }
          +   else if (normalized) {
          +      switch (type) {
          +      case GL_DOUBLE: return double_types[size-1];
          +      case GL_FLOAT: return float_types[size-1];
          +      case GL_HALF_FLOAT: return half_float_types[size-1];
          +      case GL_INT: return int_types_norm[size-1];
          +      case GL_SHORT: return short_types_norm[size-1];
          +      case GL_BYTE: return byte_types_norm[size-1];
          +      case GL_UNSIGNED_INT: return uint_types_norm[size-1];
          +      case GL_UNSIGNED_SHORT: return ushort_types_norm[size-1];
          +      case GL_UNSIGNED_BYTE: return ubyte_types_norm[size-1];
          +      case GL_FIXED: return fixed_types[size-1];
          +      default: assert(0); return 0;
          +      }
          +   }
          +   else {
          +      switch (type) {
          +      case GL_DOUBLE: return double_types[size-1];
          +      case GL_FLOAT: return float_types[size-1];
          +      case GL_HALF_FLOAT: return half_float_types[size-1];
          +      case GL_INT: return int_types_scale[size-1];
          +      case GL_SHORT: return short_types_scale[size-1];
          +      case GL_BYTE: return byte_types_scale[size-1];
          +      case GL_UNSIGNED_INT: return uint_types_scale[size-1];
          +      case GL_UNSIGNED_SHORT: return ushort_types_scale[size-1];
          +      case GL_UNSIGNED_BYTE: return ubyte_types_scale[size-1];
          +      case GL_FIXED: return fixed_types[size-1];
          +      default: assert(0); return 0;
          +      }
          +   }
          +   return PIPE_FORMAT_NONE; /* silence compiler warning */
          +}
          +
          +/**
          + * Examine the active arrays to determine if we have interleaved
          + * vertex arrays all living in one VBO, or all living in user space.
          + */
          +static GLboolean
          +is_interleaved_arrays(const struct st_vertex_program *vp,
          +                      const struct st_vp_variant *vpv,
          +                      const struct gl_client_array **arrays)
          +{
          +   GLuint attr;
          +   const struct gl_buffer_object *firstBufObj = NULL;
          +   GLint firstStride = -1;
          +   const GLubyte *firstPtr = NULL;
          +   GLboolean userSpaceBuffer = GL_FALSE;
          +
          +   for (attr = 0; attr < vpv->num_inputs; attr++) {
          +      const GLuint mesaAttr = vp->index_to_input[attr];
          +      const struct gl_client_array *array = arrays[mesaAttr];
          +      const struct gl_buffer_object *bufObj = array->BufferObj;
          +      const GLsizei stride = array->StrideB; /* in bytes */
          +
          +      if (attr == 0) {
          +         /* save info about the first array */
          +         firstStride = stride;
          +         firstPtr = array->Ptr;
          +         firstBufObj = bufObj;
          +         userSpaceBuffer = !bufObj || !bufObj->Name;
          +      }
          +      else {
          +         /* check if other arrays interleave with the first, in same buffer */
          +         if (stride != firstStride)
          +            return GL_FALSE; /* strides don't match */
          +
          +         if (bufObj != firstBufObj)
          +            return GL_FALSE; /* arrays in different VBOs */
          +
          +         if (abs(array->Ptr - firstPtr) > firstStride)
          +            return GL_FALSE; /* arrays start too far apart */
          +
          +         if ((!_mesa_is_bufferobj(bufObj)) != userSpaceBuffer)
          +            return GL_FALSE; /* mix of VBO and user-space arrays */
          +      }
          +   }
          +
          +   return GL_TRUE;
          +}
          +
          +/**
          + * Set up for drawing interleaved arrays that all live in one VBO
          + * or all live in user space.
          + * \param vbuffer  returns vertex buffer info
          + * \param velements  returns vertex element info
          + */
          +static boolean
          +setup_interleaved_attribs(const struct st_vertex_program *vp,
          +                          const struct st_vp_variant *vpv,
          +                          const struct gl_client_array **arrays,
          +                          struct pipe_vertex_buffer *vbuffer,
          +                          struct pipe_vertex_element velements[])
          +{
          +   GLuint attr;
          +   const GLubyte *low_addr = NULL;
          +   GLboolean usingVBO;      /* all arrays in a VBO? */
          +   struct gl_buffer_object *bufobj;
          +   GLsizei stride;
          +
          +   /* Find the lowest address of the arrays we're drawing,
          +    * Init bufobj and stride.
          +    */
          +   if (vpv->num_inputs) {
          +      const GLuint mesaAttr0 = vp->index_to_input[0];
          +      const struct gl_client_array *array = arrays[mesaAttr0];
          +
          +      /* Since we're doing interleaved arrays, we know there'll be at most
          +       * one buffer object and the stride will be the same for all arrays.
          +       * Grab them now.
          +       */
          +      bufobj = array->BufferObj;
          +      stride = array->StrideB;
          +
          +      low_addr = arrays[vp->index_to_input[0]]->Ptr;
          +
          +      for (attr = 1; attr < vpv->num_inputs; attr++) {
          +         const GLubyte *start = arrays[vp->index_to_input[attr]]->Ptr;
          +         low_addr = MIN2(low_addr, start);
          +      }
          +   }
          +   else {
          +      /* not sure we'll ever have zero inputs, but play it safe */
          +      bufobj = NULL;
          +      stride = 0;
          +      low_addr = 0;
          +   }
          +
          +   /* are the arrays in user space? */
          +   usingVBO = _mesa_is_bufferobj(bufobj);
          +
          +   for (attr = 0; attr < vpv->num_inputs; attr++) {
          +      const GLuint mesaAttr = vp->index_to_input[attr];
          +      const struct gl_client_array *array = arrays[mesaAttr];
          +      unsigned src_offset = (unsigned) (array->Ptr - low_addr);
          +      GLuint element_size = array->_ElementSize;
          +
          +      assert(element_size == array->Size * _mesa_sizeof_type(array->Type));
          +
          +      velements[attr].src_offset = src_offset;
          +      velements[attr].instance_divisor = array->InstanceDivisor;
          +      velements[attr].vertex_buffer_index = 0;
          +      velements[attr].src_format = st_pipe_vertex_format(array->Type,
          +                                                         array->Size,
          +                                                         array->Format,
          +                                                         array->Normalized,
          +                                                         array->Integer);
          +      assert(velements[attr].src_format);
          +   }
          +
          +   /*
          +    * Return the vbuffer info and setup user-space attrib info, if needed.
          +    */
          +   if (vpv->num_inputs == 0) {
          +      /* just defensive coding here */
          +      vbuffer->buffer = NULL;
          +      vbuffer->user_buffer = NULL;
          +      vbuffer->buffer_offset = 0;
          +      vbuffer->stride = 0;
          +   }
          +   else if (usingVBO) {
          +      /* all interleaved arrays in a VBO */
          +      struct st_buffer_object *stobj = st_buffer_object(bufobj);
          +
          +      if (!stobj || !stobj->buffer) {
          +         return FALSE; /* out-of-memory error probably */
          +      }
          +
          +      vbuffer->buffer = stobj->buffer;
          +      vbuffer->user_buffer = NULL;
          +      vbuffer->buffer_offset = pointer_to_offset(low_addr);
          +      vbuffer->stride = stride;
          +   }
          +   else {
          +      /* all interleaved arrays in user memory */
          +      vbuffer->buffer = NULL;
          +      vbuffer->user_buffer = low_addr;
          +      vbuffer->buffer_offset = 0;
          +      vbuffer->stride = stride;
          +   }
          +   return TRUE;
          +}
          +
          +/**
          + * Set up a separate pipe_vertex_buffer and pipe_vertex_element for each
          + * vertex attribute.
          + * \param vbuffer  returns vertex buffer info
          + * \param velements  returns vertex element info
          + */
          +static boolean
          +setup_non_interleaved_attribs(struct st_context *st,
          +                              const struct st_vertex_program *vp,
          +                              const struct st_vp_variant *vpv,
          +                              const struct gl_client_array **arrays,
          +                              struct pipe_vertex_buffer vbuffer[],
          +                              struct pipe_vertex_element velements[])
          +{
          +   struct gl_context *ctx = st->ctx;
          +   GLuint attr;
          +
          +   for (attr = 0; attr < vpv->num_inputs; attr++) {
          +      const GLuint mesaAttr = vp->index_to_input[attr];
          +      const struct gl_client_array *array = arrays[mesaAttr];
          +      struct gl_buffer_object *bufobj = array->BufferObj;
          +      GLsizei stride = array->StrideB;
          +
          +      assert(array->_ElementSize == array->Size * _mesa_sizeof_type(array->Type));
          +
          +      if (_mesa_is_bufferobj(bufobj)) {
          +         /* Attribute data is in a VBO.
          +          * Recall that for VBOs, the gl_client_array->Ptr field is
          +          * really an offset from the start of the VBO, not a pointer.
          +          */
          +         struct st_buffer_object *stobj = st_buffer_object(bufobj);
          +
          +         if (!stobj || !stobj->buffer) {
          +            return FALSE; /* out-of-memory error probably */
          +         }
          +
          +         vbuffer[attr].buffer = stobj->buffer;
          +         vbuffer[attr].user_buffer = NULL;
          +         vbuffer[attr].buffer_offset = pointer_to_offset(array->Ptr);
          +      }
          +      else {
          +         /* wrap user data */
          +         void *ptr;
          +
          +         if (array->Ptr) {
          +            ptr = (void *) array->Ptr;
          +         }
          +         else {
          +            /* no array, use ctx->Current.Attrib[] value */
          +            ptr = (void *) ctx->Current.Attrib[mesaAttr];
          +            stride = 0;
          +         }
          +
          +         assert(ptr);
          +
          +         vbuffer[attr].buffer = NULL;
          +         vbuffer[attr].user_buffer = ptr;
          +         vbuffer[attr].buffer_offset = 0;
          +      }
          +
          +      /* common-case setup */
          +      vbuffer[attr].stride = stride; /* in bytes */
          +
          +      velements[attr].src_offset = 0;
          +      velements[attr].instance_divisor = array->InstanceDivisor;
          +      velements[attr].vertex_buffer_index = attr;
          +      velements[attr].src_format = st_pipe_vertex_format(array->Type,
          +                                                         array->Size,
          +                                                         array->Format,
          +                                                         array->Normalized,
          +                                                         array->Integer);
          +      assert(velements[attr].src_format);
          +   }
          +   return TRUE;
          +}
          +
          +static void update_array(struct st_context *st)
          +{
          +   struct gl_context *ctx = st->ctx;
          +   const struct gl_client_array **arrays = ctx->Array._DrawArrays;
          +   const struct st_vertex_program *vp;
          +   const struct st_vp_variant *vpv;
          +   struct pipe_vertex_buffer vbuffer[PIPE_MAX_SHADER_INPUTS];
          +   struct pipe_vertex_element velements[PIPE_MAX_ATTRIBS];
          +   unsigned num_vbuffers, num_velements;
          +
          +   st->vertex_array_out_of_memory = FALSE;
          +
          +   /* No drawing has been done yet, so do nothing. */
          +   if (!arrays)
          +      return;
          +
          +   /* vertex program validation must be done before this */
          +   vp = st->vp;
          +   vpv = st->vp_variant;
          +
          +   memset(velements, 0, sizeof(struct pipe_vertex_element) * vpv->num_inputs);
          +
          +   /*
          +    * Setup the vbuffer[] and velements[] arrays.
          +    */
          +   if (is_interleaved_arrays(vp, vpv, arrays)) {
          +      if (!setup_interleaved_attribs(vp, vpv, arrays, vbuffer, velements)) {
          +         st->vertex_array_out_of_memory = TRUE;
          +         return;
          +      }
          +
          +      num_vbuffers = 1;
          +      num_velements = vpv->num_inputs;
          +      if (num_velements == 0)
          +         num_vbuffers = 0;
          +   }
          +   else {
          +      if (!setup_non_interleaved_attribs(st, vp, vpv, arrays, vbuffer,
          +                                         velements)) {
          +         st->vertex_array_out_of_memory = TRUE;
          +         return;
          +      }
          +
          +      num_vbuffers = vpv->num_inputs;
          +      num_velements = vpv->num_inputs;
          +   }
          +
          +   cso_set_vertex_buffers(st->cso_context, num_vbuffers, vbuffer);
          +   cso_set_vertex_elements(st->cso_context, num_velements, velements);
          +}
          +
          +
          +const struct st_tracked_state st_update_array = {
          +   "st_update_array",					/* name */
          +   {							/* dirty */
          +      (_NEW_PROGRAM | _NEW_BUFFER_OBJECT),		/* mesa */
          +      ST_NEW_VERTEX_ARRAYS | ST_NEW_VERTEX_PROGRAM,     /* st */
          +   },
          +   update_array						/* update */
          +};
          diff --git a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
          index 9a3f22465..d3f8d1368 100644
          --- a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
          +++ b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
          @@ -217,7 +217,7 @@ st_make_drawpix_z_stencil_program(struct st_context *st,
              if (!p)
                 return NULL;
           
          -   p->NumInstructions = write_depth ? 2 : 1;
          +   p->NumInstructions = write_depth ? 3 : 1;
              p->NumInstructions += write_stencil ? 1 : 0;
           
              p->Instructions = _mesa_alloc_instructions(p->NumInstructions);
          @@ -238,6 +238,13 @@ st_make_drawpix_z_stencil_program(struct st_context *st,
                 p->Instructions[ic].TexSrcUnit = 0;
                 p->Instructions[ic].TexSrcTarget = TEXTURE_2D_INDEX;
                 ic++;
          +      /* MOV result.color, fragment.color; */
          +      p->Instructions[ic].Opcode = OPCODE_MOV;
          +      p->Instructions[ic].DstReg.File = PROGRAM_OUTPUT;
          +      p->Instructions[ic].DstReg.Index = FRAG_RESULT_COLOR;
          +      p->Instructions[ic].SrcReg[0].File = PROGRAM_INPUT;
          +      p->Instructions[ic].SrcReg[0].Index = FRAG_ATTRIB_COL0;
          +      ic++;
              }
           
              if (write_stencil) {
          @@ -260,8 +267,10 @@ st_make_drawpix_z_stencil_program(struct st_context *st,
           
              p->InputsRead = FRAG_BIT_TEX0 | FRAG_BIT_COL0;
              p->OutputsWritten = 0;
          -   if (write_depth)
          +   if (write_depth) {
                 p->OutputsWritten |= BITFIELD64_BIT(FRAG_RESULT_DEPTH);
          +      p->OutputsWritten |= BITFIELD64_BIT(FRAG_RESULT_COLOR);
          +   }
              if (write_stencil)
                 p->OutputsWritten |= BITFIELD64_BIT(FRAG_RESULT_STENCIL);
           
          diff --git a/mesalib/src/mesa/state_tracker/st_context.h b/mesalib/src/mesa/state_tracker/st_context.h
          index 55ae65b3c..734b4d9c1 100644
          --- a/mesalib/src/mesa/state_tracker/st_context.h
          +++ b/mesalib/src/mesa/state_tracker/st_context.h
          @@ -88,6 +88,8 @@ struct st_context
               */
              boolean invalidate_on_gl_viewport;
           
          +   boolean vertex_array_out_of_memory;
          +
              /* Some state is contained in constant objects.
               * Other state is just parameter values.
               */
          diff --git a/mesalib/src/mesa/state_tracker/st_draw.c b/mesalib/src/mesa/state_tracker/st_draw.c
          index 0a06e9995..db8caa566 100644
          --- a/mesalib/src/mesa/state_tracker/st_draw.c
          +++ b/mesalib/src/mesa/state_tracker/st_draw.c
          @@ -31,10 +31,6 @@
            * this function whether the user called glBegin/End, glDrawArrays,
            * glDrawElements, glEvalMesh, or glCalList, etc.
            *
          - * We basically convert the VBO's vertex attribute/array information into
          - * Gallium vertex state, bind the vertex buffer objects and call
          - * pipe->draw_vbo().
          - *
            * Authors:
            *   Keith Whitwell 
            */
          @@ -68,261 +64,6 @@
           #include "../glsl/ir_uniform.h"
           
           
          -static GLuint double_types[4] = {
          -   PIPE_FORMAT_R64_FLOAT,
          -   PIPE_FORMAT_R64G64_FLOAT,
          -   PIPE_FORMAT_R64G64B64_FLOAT,
          -   PIPE_FORMAT_R64G64B64A64_FLOAT
          -};
          -
          -static GLuint float_types[4] = {
          -   PIPE_FORMAT_R32_FLOAT,
          -   PIPE_FORMAT_R32G32_FLOAT,
          -   PIPE_FORMAT_R32G32B32_FLOAT,
          -   PIPE_FORMAT_R32G32B32A32_FLOAT
          -};
          -
          -static GLuint half_float_types[4] = {
          -   PIPE_FORMAT_R16_FLOAT,
          -   PIPE_FORMAT_R16G16_FLOAT,
          -   PIPE_FORMAT_R16G16B16_FLOAT,
          -   PIPE_FORMAT_R16G16B16A16_FLOAT
          -};
          -
          -static GLuint uint_types_norm[4] = {
          -   PIPE_FORMAT_R32_UNORM,
          -   PIPE_FORMAT_R32G32_UNORM,
          -   PIPE_FORMAT_R32G32B32_UNORM,
          -   PIPE_FORMAT_R32G32B32A32_UNORM
          -};
          -
          -static GLuint uint_types_scale[4] = {
          -   PIPE_FORMAT_R32_USCALED,
          -   PIPE_FORMAT_R32G32_USCALED,
          -   PIPE_FORMAT_R32G32B32_USCALED,
          -   PIPE_FORMAT_R32G32B32A32_USCALED
          -};
          -
          -static GLuint uint_types_int[4] = {
          -   PIPE_FORMAT_R32_UINT,
          -   PIPE_FORMAT_R32G32_UINT,
          -   PIPE_FORMAT_R32G32B32_UINT,
          -   PIPE_FORMAT_R32G32B32A32_UINT
          -};
          -
          -static GLuint int_types_norm[4] = {
          -   PIPE_FORMAT_R32_SNORM,
          -   PIPE_FORMAT_R32G32_SNORM,
          -   PIPE_FORMAT_R32G32B32_SNORM,
          -   PIPE_FORMAT_R32G32B32A32_SNORM
          -};
          -
          -static GLuint int_types_scale[4] = {
          -   PIPE_FORMAT_R32_SSCALED,
          -   PIPE_FORMAT_R32G32_SSCALED,
          -   PIPE_FORMAT_R32G32B32_SSCALED,
          -   PIPE_FORMAT_R32G32B32A32_SSCALED
          -};
          -
          -static GLuint int_types_int[4] = {
          -   PIPE_FORMAT_R32_SINT,
          -   PIPE_FORMAT_R32G32_SINT,
          -   PIPE_FORMAT_R32G32B32_SINT,
          -   PIPE_FORMAT_R32G32B32A32_SINT
          -};
          -
          -static GLuint ushort_types_norm[4] = {
          -   PIPE_FORMAT_R16_UNORM,
          -   PIPE_FORMAT_R16G16_UNORM,
          -   PIPE_FORMAT_R16G16B16_UNORM,
          -   PIPE_FORMAT_R16G16B16A16_UNORM
          -};
          -
          -static GLuint ushort_types_scale[4] = {
          -   PIPE_FORMAT_R16_USCALED,
          -   PIPE_FORMAT_R16G16_USCALED,
          -   PIPE_FORMAT_R16G16B16_USCALED,
          -   PIPE_FORMAT_R16G16B16A16_USCALED
          -};
          -
          -static GLuint ushort_types_int[4] = {
          -   PIPE_FORMAT_R16_UINT,
          -   PIPE_FORMAT_R16G16_UINT,
          -   PIPE_FORMAT_R16G16B16_UINT,
          -   PIPE_FORMAT_R16G16B16A16_UINT
          -};
          -
          -static GLuint short_types_norm[4] = {
          -   PIPE_FORMAT_R16_SNORM,
          -   PIPE_FORMAT_R16G16_SNORM,
          -   PIPE_FORMAT_R16G16B16_SNORM,
          -   PIPE_FORMAT_R16G16B16A16_SNORM
          -};
          -
          -static GLuint short_types_scale[4] = {
          -   PIPE_FORMAT_R16_SSCALED,
          -   PIPE_FORMAT_R16G16_SSCALED,
          -   PIPE_FORMAT_R16G16B16_SSCALED,
          -   PIPE_FORMAT_R16G16B16A16_SSCALED
          -};
          -
          -static GLuint short_types_int[4] = {
          -   PIPE_FORMAT_R16_SINT,
          -   PIPE_FORMAT_R16G16_SINT,
          -   PIPE_FORMAT_R16G16B16_SINT,
          -   PIPE_FORMAT_R16G16B16A16_SINT
          -};
          -
          -static GLuint ubyte_types_norm[4] = {
          -   PIPE_FORMAT_R8_UNORM,
          -   PIPE_FORMAT_R8G8_UNORM,
          -   PIPE_FORMAT_R8G8B8_UNORM,
          -   PIPE_FORMAT_R8G8B8A8_UNORM
          -};
          -
          -static GLuint ubyte_types_scale[4] = {
          -   PIPE_FORMAT_R8_USCALED,
          -   PIPE_FORMAT_R8G8_USCALED,
          -   PIPE_FORMAT_R8G8B8_USCALED,
          -   PIPE_FORMAT_R8G8B8A8_USCALED
          -};
          -
          -static GLuint ubyte_types_int[4] = {
          -   PIPE_FORMAT_R8_UINT,
          -   PIPE_FORMAT_R8G8_UINT,
          -   PIPE_FORMAT_R8G8B8_UINT,
          -   PIPE_FORMAT_R8G8B8A8_UINT
          -};
          -
          -static GLuint byte_types_norm[4] = {
          -   PIPE_FORMAT_R8_SNORM,
          -   PIPE_FORMAT_R8G8_SNORM,
          -   PIPE_FORMAT_R8G8B8_SNORM,
          -   PIPE_FORMAT_R8G8B8A8_SNORM
          -};
          -
          -static GLuint byte_types_scale[4] = {
          -   PIPE_FORMAT_R8_SSCALED,
          -   PIPE_FORMAT_R8G8_SSCALED,
          -   PIPE_FORMAT_R8G8B8_SSCALED,
          -   PIPE_FORMAT_R8G8B8A8_SSCALED
          -};
          -
          -static GLuint byte_types_int[4] = {
          -   PIPE_FORMAT_R8_SINT,
          -   PIPE_FORMAT_R8G8_SINT,
          -   PIPE_FORMAT_R8G8B8_SINT,
          -   PIPE_FORMAT_R8G8B8A8_SINT
          -};
          -
          -static GLuint fixed_types[4] = {
          -   PIPE_FORMAT_R32_FIXED,
          -   PIPE_FORMAT_R32G32_FIXED,
          -   PIPE_FORMAT_R32G32B32_FIXED,
          -   PIPE_FORMAT_R32G32B32A32_FIXED
          -};
          -
          -
          -
          -/**
          - * Return a PIPE_FORMAT_x for the given GL datatype and size.
          - */
          -enum pipe_format
          -st_pipe_vertex_format(GLenum type, GLuint size, GLenum format,
          -                      GLboolean normalized, GLboolean integer)
          -{
          -   assert((type >= GL_BYTE && type <= GL_DOUBLE) ||
          -          type == GL_FIXED || type == GL_HALF_FLOAT ||
          -          type == GL_INT_2_10_10_10_REV ||
          -          type == GL_UNSIGNED_INT_2_10_10_10_REV);
          -   assert(size >= 1);
          -   assert(size <= 4);
          -   assert(format == GL_RGBA || format == GL_BGRA);
          -
          -   if (type == GL_INT_2_10_10_10_REV ||
          -       type == GL_UNSIGNED_INT_2_10_10_10_REV) {
          -      assert(size == 4);
          -      assert(!integer);
          -
          -      if (format == GL_BGRA) {
          -         if (type == GL_INT_2_10_10_10_REV) {
          -            if (normalized)
          -               return PIPE_FORMAT_B10G10R10A2_SNORM;
          -            else
          -               return PIPE_FORMAT_B10G10R10A2_SSCALED;
          -         } else {
          -            if (normalized)
          -               return PIPE_FORMAT_B10G10R10A2_UNORM;
          -            else
          -               return PIPE_FORMAT_B10G10R10A2_USCALED;
          -         }
          -      } else {
          -         if (type == GL_INT_2_10_10_10_REV) {
          -            if (normalized)
          -               return PIPE_FORMAT_R10G10B10A2_SNORM;
          -            else
          -               return PIPE_FORMAT_R10G10B10A2_SSCALED;
          -         } else {
          -            if (normalized)
          -               return PIPE_FORMAT_R10G10B10A2_UNORM;
          -            else
          -               return PIPE_FORMAT_R10G10B10A2_USCALED;
          -         }
          -      }
          -   }
          -
          -   if (format == GL_BGRA) {
          -      /* this is an odd-ball case */
          -      assert(type == GL_UNSIGNED_BYTE);
          -      assert(normalized);
          -      return PIPE_FORMAT_B8G8R8A8_UNORM;
          -   }
          -
          -   if (integer) {
          -      switch (type) {
          -      case GL_INT: return int_types_int[size-1];
          -      case GL_SHORT: return short_types_int[size-1];
          -      case GL_BYTE: return byte_types_int[size-1];
          -      case GL_UNSIGNED_INT: return uint_types_int[size-1];
          -      case GL_UNSIGNED_SHORT: return ushort_types_int[size-1];
          -      case GL_UNSIGNED_BYTE: return ubyte_types_int[size-1];
          -      default: assert(0); return 0;
          -      }
          -   }
          -   else if (normalized) {
          -      switch (type) {
          -      case GL_DOUBLE: return double_types[size-1];
          -      case GL_FLOAT: return float_types[size-1];
          -      case GL_HALF_FLOAT: return half_float_types[size-1];
          -      case GL_INT: return int_types_norm[size-1];
          -      case GL_SHORT: return short_types_norm[size-1];
          -      case GL_BYTE: return byte_types_norm[size-1];
          -      case GL_UNSIGNED_INT: return uint_types_norm[size-1];
          -      case GL_UNSIGNED_SHORT: return ushort_types_norm[size-1];
          -      case GL_UNSIGNED_BYTE: return ubyte_types_norm[size-1];
          -      case GL_FIXED: return fixed_types[size-1];
          -      default: assert(0); return 0;
          -      }
          -   }
          -   else {
          -      switch (type) {
          -      case GL_DOUBLE: return double_types[size-1];
          -      case GL_FLOAT: return float_types[size-1];
          -      case GL_HALF_FLOAT: return half_float_types[size-1];
          -      case GL_INT: return int_types_scale[size-1];
          -      case GL_SHORT: return short_types_scale[size-1];
          -      case GL_BYTE: return byte_types_scale[size-1];
          -      case GL_UNSIGNED_INT: return uint_types_scale[size-1];
          -      case GL_UNSIGNED_SHORT: return ushort_types_scale[size-1];
          -      case GL_UNSIGNED_BYTE: return ubyte_types_scale[size-1];
          -      case GL_FIXED: return fixed_types[size-1];
          -      default: assert(0); return 0;
          -      }
          -   }
          -   return PIPE_FORMAT_NONE; /* silence compiler warning */
          -}
          -
          -
           /**
            * This is very similar to vbo_all_varyings_in_vbos() but we are
            * only interested in per-vertex data.  See bug 38626.
          @@ -342,240 +83,6 @@ all_varyings_in_vbos(const struct gl_client_array *arrays[])
           }
           
           
          -/**
          - * Examine the active arrays to determine if we have interleaved
          - * vertex arrays all living in one VBO, or all living in user space.
          - */
          -static GLboolean
          -is_interleaved_arrays(const struct st_vertex_program *vp,
          -                      const struct st_vp_variant *vpv,
          -                      const struct gl_client_array **arrays)
          -{
          -   GLuint attr;
          -   const struct gl_buffer_object *firstBufObj = NULL;
          -   GLint firstStride = -1;
          -   const GLubyte *firstPtr = NULL;
          -   GLboolean userSpaceBuffer = GL_FALSE;
          -
          -   for (attr = 0; attr < vpv->num_inputs; attr++) {
          -      const GLuint mesaAttr = vp->index_to_input[attr];
          -      const struct gl_client_array *array = arrays[mesaAttr];
          -      const struct gl_buffer_object *bufObj = array->BufferObj;
          -      const GLsizei stride = array->StrideB; /* in bytes */
          -
          -      if (attr == 0) {
          -         /* save info about the first array */
          -         firstStride = stride;
          -         firstPtr = array->Ptr;         
          -         firstBufObj = bufObj;
          -         userSpaceBuffer = !bufObj || !bufObj->Name;
          -      }
          -      else {
          -         /* check if other arrays interleave with the first, in same buffer */
          -         if (stride != firstStride)
          -            return GL_FALSE; /* strides don't match */
          -
          -         if (bufObj != firstBufObj)
          -            return GL_FALSE; /* arrays in different VBOs */
          -
          -         if (abs(array->Ptr - firstPtr) > firstStride)
          -            return GL_FALSE; /* arrays start too far apart */
          -
          -         if ((!_mesa_is_bufferobj(bufObj)) != userSpaceBuffer)
          -            return GL_FALSE; /* mix of VBO and user-space arrays */
          -      }
          -   }
          -
          -   return GL_TRUE;
          -}
          -
          -
          -/**
          - * Set up for drawing interleaved arrays that all live in one VBO
          - * or all live in user space.
          - * \param vbuffer  returns vertex buffer info
          - * \param velements  returns vertex element info
          - * \return GL_TRUE for success, GL_FALSE otherwise (probably out of memory)
          - */
          -static GLboolean
          -setup_interleaved_attribs(struct gl_context *ctx,
          -                          const struct st_vertex_program *vp,
          -                          const struct st_vp_variant *vpv,
          -                          const struct gl_client_array **arrays,
          -                          struct pipe_vertex_buffer *vbuffer,
          -                          struct pipe_vertex_element velements[])
          -{
          -   GLuint attr;
          -   const GLubyte *low_addr = NULL;
          -   GLboolean usingVBO;      /* all arrays in a VBO? */
          -   struct gl_buffer_object *bufobj;
          -   GLsizei stride;
          -
          -   /* Find the lowest address of the arrays we're drawing,
          -    * Init bufobj and stride.
          -    */
          -   if (vpv->num_inputs) {
          -      const GLuint mesaAttr0 = vp->index_to_input[0];
          -      const struct gl_client_array *array = arrays[mesaAttr0];
          -
          -      /* Since we're doing interleaved arrays, we know there'll be at most
          -       * one buffer object and the stride will be the same for all arrays.
          -       * Grab them now.
          -       */
          -      bufobj = array->BufferObj;
          -      stride = array->StrideB;
          -
          -      low_addr = arrays[vp->index_to_input[0]]->Ptr;
          -
          -      for (attr = 1; attr < vpv->num_inputs; attr++) {
          -         const GLubyte *start = arrays[vp->index_to_input[attr]]->Ptr;
          -         low_addr = MIN2(low_addr, start);
          -      }
          -   }
          -   else {
          -      /* not sure we'll ever have zero inputs, but play it safe */
          -      bufobj = NULL;
          -      stride = 0;
          -      low_addr = 0;
          -   }
          -
          -   /* are the arrays in user space? */
          -   usingVBO = _mesa_is_bufferobj(bufobj);
          -
          -   for (attr = 0; attr < vpv->num_inputs; attr++) {
          -      const GLuint mesaAttr = vp->index_to_input[attr];
          -      const struct gl_client_array *array = arrays[mesaAttr];
          -      unsigned src_offset = (unsigned) (array->Ptr - low_addr);
          -      GLuint element_size = array->_ElementSize;
          -
          -      assert(element_size == array->Size * _mesa_sizeof_type(array->Type));
          -
          -      velements[attr].src_offset = src_offset;
          -      velements[attr].instance_divisor = array->InstanceDivisor;
          -      velements[attr].vertex_buffer_index = 0;
          -      velements[attr].src_format = st_pipe_vertex_format(array->Type,
          -                                                         array->Size,
          -                                                         array->Format,
          -                                                         array->Normalized,
          -                                                         array->Integer);
          -      assert(velements[attr].src_format);
          -   }
          -
          -   /*
          -    * Return the vbuffer info and setup user-space attrib info, if needed.
          -    */
          -   if (vpv->num_inputs == 0) {
          -      /* just defensive coding here */
          -      vbuffer->buffer = NULL;
          -      vbuffer->user_buffer = NULL;
          -      vbuffer->buffer_offset = 0;
          -      vbuffer->stride = 0;
          -   }
          -   else if (usingVBO) {
          -      /* all interleaved arrays in a VBO */
          -      struct st_buffer_object *stobj = st_buffer_object(bufobj);
          -
          -      if (!stobj || !stobj->buffer) {
          -         /* probably out of memory (or zero-sized buffer) */
          -         return GL_FALSE;
          -      }
          -
          -      vbuffer->buffer = stobj->buffer;
          -      vbuffer->user_buffer = NULL;
          -      vbuffer->buffer_offset = pointer_to_offset(low_addr);
          -      vbuffer->stride = stride;
          -   }
          -   else {
          -      /* all interleaved arrays in user memory */
          -      vbuffer->buffer = NULL;
          -      vbuffer->user_buffer = low_addr;
          -      vbuffer->buffer_offset = 0;
          -      vbuffer->stride = stride;
          -   }
          -
          -   return GL_TRUE;
          -}
          -
          -
          -/**
          - * Set up a separate pipe_vertex_buffer and pipe_vertex_element for each
          - * vertex attribute.
          - * \param vbuffer  returns vertex buffer info
          - * \param velements  returns vertex element info
          - * \return GL_TRUE for success, GL_FALSE otherwise (probably out of memory)
          - */
          -static GLboolean
          -setup_non_interleaved_attribs(struct gl_context *ctx,
          -                              const struct st_vertex_program *vp,
          -                              const struct st_vp_variant *vpv,
          -                              const struct gl_client_array **arrays,
          -                              struct pipe_vertex_buffer vbuffer[],
          -                              struct pipe_vertex_element velements[])
          -{
          -   GLuint attr;
          -
          -   for (attr = 0; attr < vpv->num_inputs; attr++) {
          -      const GLuint mesaAttr = vp->index_to_input[attr];
          -      const struct gl_client_array *array = arrays[mesaAttr];
          -      struct gl_buffer_object *bufobj = array->BufferObj;
          -      GLsizei stride = array->StrideB;
          -
          -      assert(array->_ElementSize == array->Size * _mesa_sizeof_type(array->Type));
          -
          -      if (_mesa_is_bufferobj(bufobj)) {
          -         /* Attribute data is in a VBO.
          -          * Recall that for VBOs, the gl_client_array->Ptr field is
          -          * really an offset from the start of the VBO, not a pointer.
          -          */
          -         struct st_buffer_object *stobj = st_buffer_object(bufobj);
          -
          -         if (!stobj || !stobj->buffer) {
          -            /* probably out of memory (or zero-sized buffer) */
          -            return GL_FALSE;
          -         }
          -
          -         vbuffer[attr].buffer = stobj->buffer;
          -         vbuffer[attr].user_buffer = NULL;
          -         vbuffer[attr].buffer_offset = pointer_to_offset(array->Ptr);
          -      }
          -      else {
          -         /* wrap user data */
          -         void *ptr;
          -
          -         if (array->Ptr) {
          -            ptr = (void *) array->Ptr;
          -         }
          -         else {
          -            /* no array, use ctx->Current.Attrib[] value */
          -            ptr = (void *) ctx->Current.Attrib[mesaAttr];
          -            stride = 0;
          -         }
          -
          -         assert(ptr);
          -
          -         vbuffer[attr].buffer = NULL;
          -         vbuffer[attr].user_buffer = ptr;
          -         vbuffer[attr].buffer_offset = 0;
          -      }
          -
          -      /* common-case setup */
          -      vbuffer[attr].stride = stride; /* in bytes */
          -
          -      velements[attr].src_offset = 0;
          -      velements[attr].instance_divisor = array->InstanceDivisor;
          -      velements[attr].vertex_buffer_index = attr;
          -      velements[attr].src_format = st_pipe_vertex_format(array->Type,
          -                                                         array->Size,
          -                                                         array->Format,
          -                                                         array->Normalized,
          -                                                         array->Integer);
          -      assert(velements[attr].src_format);
          -   }
          -
          -   return GL_TRUE;
          -}
          -
          -
           static void
           setup_index_buffer(struct st_context *st,
                              const struct _mesa_index_buffer *ib,
          @@ -664,58 +171,6 @@ translate_prim(const struct gl_context *ctx, unsigned prim)
           }
           
           
          -/**
          - * Setup vertex arrays and buffers prior to drawing.
          - * \return GL_TRUE for success, GL_FALSE otherwise (probably out of memory)
          - */
          -static GLboolean
          -st_validate_varrays(struct gl_context *ctx,
          -                    const struct gl_client_array **arrays)
          -{
          -   struct st_context *st = st_context(ctx);
          -   const struct st_vertex_program *vp;
          -   const struct st_vp_variant *vpv;
          -   struct pipe_vertex_buffer vbuffer[PIPE_MAX_SHADER_INPUTS];
          -   struct pipe_vertex_element velements[PIPE_MAX_ATTRIBS];
          -   unsigned num_vbuffers, num_velements;
          -
          -   /* must get these after state validation! */
          -   vp = st->vp;
          -   vpv = st->vp_variant;
          -
          -   memset(velements, 0, sizeof(struct pipe_vertex_element) * vpv->num_inputs);
          -
          -   /*
          -    * Setup the vbuffer[] and velements[] arrays.
          -    */
          -   if (is_interleaved_arrays(vp, vpv, arrays)) {
          -      if (!setup_interleaved_attribs(ctx, vp, vpv, arrays, vbuffer,
          -                                     velements)) {
          -         return GL_FALSE;
          -      }
          -
          -      num_vbuffers = 1;
          -      num_velements = vpv->num_inputs;
          -      if (num_velements == 0)
          -         num_vbuffers = 0;
          -   }
          -   else {
          -      if (!setup_non_interleaved_attribs(ctx, vp, vpv, arrays,
          -                                         vbuffer, velements)) {
          -         return GL_FALSE;
          -      }
          -
          -      num_vbuffers = vpv->num_inputs;
          -      num_velements = vpv->num_inputs;
          -   }
          -
          -   cso_set_vertex_buffers(st->cso_context, num_vbuffers, vbuffer);
          -   cso_set_vertex_elements(st->cso_context, num_velements, velements);
          -
          -   return GL_TRUE;
          -}
          -
          -
           /**
            * This function gets plugged into the VBO module and is called when
            * we have something to render.
          @@ -736,38 +191,16 @@ st_draw_vbo(struct gl_context *ctx,
              struct pipe_draw_info info;
              const struct gl_client_array **arrays = ctx->Array._DrawArrays;
              unsigned i;
          -   GLboolean new_array;
           
              /* Mesa core state should have been validated already */
              assert(ctx->NewState == 0x0);
           
          -   /* Get Mesa driver state. */
          -   st->dirty.st |= ctx->NewDriverState;
          -   ctx->NewDriverState = 0;
          -
          -   new_array =
          -      (st->dirty.st & (ST_NEW_VERTEX_ARRAYS | ST_NEW_VERTEX_PROGRAM)) ||
          -      (st->dirty.mesa & (_NEW_PROGRAM | _NEW_BUFFER_OBJECT)) != 0;
          -
              /* Validate state. */
          -   if (st->dirty.st) {
          -      GLboolean vertDataEdgeFlags;
          -
          -      vertDataEdgeFlags = arrays[VERT_ATTRIB_EDGEFLAG]->BufferObj &&
          -                          arrays[VERT_ATTRIB_EDGEFLAG]->BufferObj->Name;
          -      if (vertDataEdgeFlags != st->vertdata_edgeflags) {
          -         st->vertdata_edgeflags = vertDataEdgeFlags;
          -         st->dirty.st |= ST_NEW_EDGEFLAGS_DATA;
          -      }
          -
          +   if (st->dirty.st || ctx->NewDriverState) {
                 st_validate_state(st);
           
          -      if (new_array) {
          -         if (!st_validate_varrays(ctx, arrays)) {
          -            /* probably out of memory, no-op the draw call */
          -            return;
          -         }
          -      }
          +      if (st->vertex_array_out_of_memory)
          +         return;
           
           #if 0
                 if (MESA_VERBOSE & VERBOSE_GLSL) {
          diff --git a/mesalib/src/mesa/state_tracker/st_draw.h b/mesalib/src/mesa/state_tracker/st_draw.h
          index c608051eb..3313fc8c7 100644
          --- a/mesalib/src/mesa/state_tracker/st_draw.h
          +++ b/mesalib/src/mesa/state_tracker/st_draw.h
          @@ -67,13 +67,6 @@ st_feedback_draw_vbo(struct gl_context *ctx,
                                GLuint max_index,
                                struct gl_transform_feedback_object *tfb_vertcount);
           
          -/* Internal function:
          - */
          -extern enum pipe_format
          -st_pipe_vertex_format(GLenum type, GLuint size, GLenum format,
          -                      GLboolean normalized, GLboolean integer);
          -
          -
           /**
            * When drawing with VBOs, the addresses specified with
            * glVertex/Color/TexCoordPointer() are really offsets into the VBO, not real
          -- 
          cgit v1.2.3