diff options
author | Eric Anholt <[email protected]> | 2009-08-26 09:51:15 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2009-09-08 14:30:15 -0700 |
commit | b4922b533155cc139ebafb111502bb55d2ad2ccf (patch) | |
tree | a784133f9de7e5fccda5305ab926bebc5ffbaf19 /src/mesa/math/m_debug_clip.c | |
parent | 3e4539a471da48066a83eda8e14301dbc4dbf6db (diff) |
mesa: Add support for ARB_depth_clamp.
This currently doesn't include fixing up the cliptests in the assembly
paths to support ARB_depth_clamp, so enabling depth_clamp forces the C path.
Diffstat (limited to 'src/mesa/math/m_debug_clip.c')
-rw-r--r-- | src/mesa/math/m_debug_clip.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mesa/math/m_debug_clip.c b/src/mesa/math/m_debug_clip.c index 460fed4a754..f2b757a91b8 100644 --- a/src/mesa/math/m_debug_clip.c +++ b/src/mesa/math/m_debug_clip.c @@ -67,7 +67,8 @@ static GLvector4f *ref_cliptest_points4( GLvector4f *clip_vec, GLvector4f *proj_vec, GLubyte clipMask[], GLubyte *orMask, - GLubyte *andMask ) + GLubyte *andMask, + GLboolean viewport_z_clip ) { const GLuint stride = clip_vec->stride; const GLuint count = clip_vec->count; @@ -87,8 +88,10 @@ static GLvector4f *ref_cliptest_points4( GLvector4f *clip_vec, if ( cx + cw < 0 ) mask |= CLIP_LEFT_BIT; if ( -cy + cw < 0 ) mask |= CLIP_TOP_BIT; if ( cy + cw < 0 ) mask |= CLIP_BOTTOM_BIT; - if ( -cz + cw < 0 ) mask |= CLIP_FAR_BIT; - if ( cz + cw < 0 ) mask |= CLIP_NEAR_BIT; + if (viewport_z_clip) { + if ( -cz + cw < 0 ) mask |= CLIP_FAR_BIT; + if ( cz + cw < 0 ) mask |= CLIP_NEAR_BIT; + } clipMask[i] = mask; if ( mask ) { c++; |