diff options
author | Brian Paul <[email protected]> | 2009-09-09 08:54:38 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-09-09 08:54:38 -0600 |
commit | 3fed69eb168774d2303e4efb9149f34e55d91b58 (patch) | |
tree | 46a63a73c5a3c3b649b76743600f38466620f0c5 /src/mesa/tnl/t_vb_vertex.c | |
parent | da9ed257a3b47c97ac557da17c32cf271190a407 (diff) |
mesa: move call to init_c_cliptest() from enable.c to tnl module.
Fixed gallium build breakage.
Diffstat (limited to 'src/mesa/tnl/t_vb_vertex.c')
-rw-r--r-- | src/mesa/tnl/t_vb_vertex.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mesa/tnl/t_vb_vertex.c b/src/mesa/tnl/t_vb_vertex.c index 6a746417c87..4734754ea40 100644 --- a/src/mesa/tnl/t_vb_vertex.c +++ b/src/mesa/tnl/t_vb_vertex.c @@ -118,6 +118,22 @@ static void (*(usercliptab[5]))( GLcontext *, }; +void +tnl_clip_prepare(GLcontext *ctx) +{ + /* Neither the x86 nor sparc asm cliptest functions have been updated + * for ARB_depth_clamp, so force the C paths. + */ + if (ctx->Transform.DepthClamp) { + static GLboolean c_funcs_installed = GL_FALSE; + if (!c_funcs_installed) { + init_c_cliptest(); + c_funcs_installed = GL_TRUE; + } + } +} + + static GLboolean run_vertex_stage( GLcontext *ctx, struct tnl_pipeline_stage *stage ) @@ -129,6 +145,8 @@ static GLboolean run_vertex_stage( GLcontext *ctx, if (ctx->VertexProgram._Current) return GL_TRUE; + tnl_clip_prepare(ctx); + if (ctx->_NeedEyeCoords) { /* Separate modelview transformation: * Use combined ModelProject to avoid some depth artifacts |