[Mesa-dev] [PATCH 0/8] Enable gl_ClipDistance in i965 GEN6+.

Paul Berry stereotype441 at gmail.com
Tue Sep 20 15:42:30 PDT 2011


This patch series enables support for gl_ClipDistance in the Intel
i965 driver.  The first three patches are in mesa core (and hence
potentially affect all drivers); the rest are i965-specific.

For those of you who aren't concerned with the i965 driver, you will
probably be most interested in looking at patch 2 in the series, which
modifies the all-important gl_vert_result and gl_frag_attrib enums.  I
believe that the changes I've made don't violate any drivers'
assumptions about the layout of these enums, but it would be good to
get some confirmation about this from people more familiar with
non-i965 code.

This patch series depends on the patches "glsl hierarchical visitor:
Do not overwrite base_ir for parameter lists." and "glsl: Implement a
lowering pass for gl_ClipDistance.", which haven't landed yet since
the latter is still under discussion.  If you want to see the patches
in their proper context, you can fetch branch clip-distance from
git://github.com/stereotype441/mesa.git.

Note that to try out the new functionality you'll need to have i965
GEN6 hardware ("Sandy Bridge"), and you'll need to set the environment
variable INTEL_GLSL_VERSION=130 to enable the (still experimental)
GLSL-1.30 functionality.

[PATCH 1/8] mesa: Add a flag to indicate whether a program uses gl_ClipDistance.
[PATCH 2/8] mesa: set up gl_vert_result and gl_frag_attrib values for gl_ClipDistance.
[PATCH 3/8] mesa: Decode GL_CLIP_DISTANCE[67] properly in _mesa_set_enable().
[PATCH 4/8] i965: Enable lower_clip_distance.
[PATCH 5/8] i965: Don't upload clip planes when gl_ClipDistance is in use.
[PATCH 6/8] i965: Set up clip distance VUE slots appropriately for gl_ClipDistance.
[PATCH 7/8] i965: Allow clip distances to be read back in fragment shaders.
[PATCH 8/8] i965: Increase MaxClipPlanes to 8 for gen6+.


More information about the mesa-dev mailing list