Mesa3D Graphics Library (Bleeding edge ray tracing branches)
Go to file
Kenneth Graunke 85e8e9e000 i965: Use linker-assigned sampler IDs in instruction encoding.
When assigning uniform locations, the linker assigns each sampler
uniform a sequential numerical ID.  gl_shader_program::SamplerUnits maps
these sampler variable IDs to the actual texture units they reference
(specified via glUniform1i).

Previously, we encoded this mapping in the SEND instruction encoding:
the "sampler" was the texture unit number, and the binding table index
was SURF_INDEX_TEXTURE(the texture unit number).  This unfortunately
meant that whenever the application changed the value of a sampler
uniform, we had to recompile the shader to change the SEND instructions.

This was horrible for the game Cogs, which repeatedly switches between
using texture unit 0 and 1.  It also made fragment shader precompiles
useless: we'd do the precompile at glLinkShader() time, before the
application called glUniform1i to set the sampler values.  As soon as
it did that, we'd have to recompile, wasting time and space in the
program cache.

This patch encodes the SamplerUnits indirection in the binding table,
sampler state, and sampler default color tables.  Instead of baking the
texture unit number into the shader, we bake in the sampler variable ID
assigned by the linker.  Since those never change, we don't need to
recompile programs on uniform changes.

This does mean that the tables now depend on the linked shader program
being used for rendering, rather than simply representing all available
texture units.  This could cause an increase in state emission.

Another plus is that the sampler state and sampler default color tables
are now compact: we only emit as many entries as there are sampler
uniforms, with no holes in the table since the new sampler IDs are
sequential.  Previously we had to emit a full 16 entries every time,
since the tables tracked the state of all active texture units.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Acked-by: Paul Berry <stereotype441@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2012-08-25 12:01:10 -07:00
bin mesa: remove obsolete confdiff.sh 2012-06-20 01:51:38 -07:00
configs build: Remove GLU_DIRS 2012-08-24 11:08:19 -07:00
docs i965: add ARB_texture_rgb10_a2ui support 2012-08-14 17:07:42 -07:00
doxygen Fix building glsl when using automake-1.12 after 68e04cc6 2012-07-15 15:27:26 +01:00
include dri2: Note that __DRI_API_GLES2 is also used for OpenGL ES 3.0 2012-08-14 15:41:03 -07:00
scons scons: Fix MinGW cross compilation. 2012-08-16 17:21:52 +01:00
src i965: Use linker-assigned sampler IDs in instruction encoding. 2012-08-25 12:01:10 -07:00
.dir-locals.el Add emacs setup for the docs/devinfo.html comment wrapping recommendation. 2012-07-11 09:20:21 -07:00
.gitattributes Disable autocrlf for Visual Studio project files. 2008-02-28 12:34:01 +09:00
.gitignore automake: Move top-level makefile to automake. 2012-06-11 09:28:00 -07:00
Android.common.mk mesa/dlopen: use HAVE_DLOPEN instead of _GNU_SOURCE 2012-08-24 11:08:19 -07:00
Android.mk radeonsi: initial WIP SI code 2012-04-13 10:32:06 -04:00
Makefile.am mesa/tests: Add tests for the generated shared-glapi dispatch table 2012-08-08 10:06:26 -07:00
SConstruct scons: Disable saving options automatically. 2011-07-01 19:04:57 +01:00
acinclude.m4 autoconf: Attempt to figure out the PIC flags for the platform 2008-05-09 07:05:16 -07:00
autogen.sh build: Fix autogen.sh to allow out-of-tree builds 2012-08-14 10:54:39 -07:00
common.py scons: Add option to enable floating-point textures. 2012-08-15 22:04:24 -07:00
configure.ac automake: convert vgapi 2012-08-24 11:08:19 -07:00

docs/README.WIN32

File: docs/README.WIN32

Last updated: 23 April 2011


Quick Start
----- -----

Windows drivers are build with SCons.  Makefiles or Visual Studio projects are
no longer shipped or supported.

Run

  scons osmesa mesagdi

to build classic mesa Windows GDI drivers; or

  scons libgl-gdi

to build gallium based GDI driver.

This will work both with MSVS or Mingw.


Windows Drivers
------- -------

At this time, only the gallium GDI driver is known to work.

Source code also exists in the tree for other drivers in
src/mesa/drivers/windows, but the status of this code is unknown.


General
-------

After building, you can copy the above DLL files to a place in your
PATH such as $SystemRoot/SYSTEM32.  If you don't like putting things
in a system directory, place them in the same directory as the
executable(s).  Be careful about accidentially overwriting files of
the same name in the SYSTEM32 directory.

The DLL files are built so that the external entry points use the
stdcall calling convention.

Static LIB files are not built.  The LIB files that are built with are
the linker import files associated with the DLL files.

The si-glu sources are used to build the GLU libs.  This was done
mainly to get the better tessellator code.

If you have a Windows-related build problem or question, please post
to the mesa-dev or mesa-users list.