Remove GL_EXT_cull_vertex
This is only used in the i915 driver where it provides little benefit for very few applications that use it with fixed function TNL.
This commit is contained in:
@@ -266,7 +266,6 @@ static const struct tnl_pipeline_stage _intel_render_stage = {
|
|||||||
|
|
||||||
const struct tnl_pipeline_stage *intel_pipeline[] = {
|
const struct tnl_pipeline_stage *intel_pipeline[] = {
|
||||||
&_tnl_vertex_transform_stage,
|
&_tnl_vertex_transform_stage,
|
||||||
&_tnl_vertex_cull_stage,
|
|
||||||
&_tnl_normal_transform_stage,
|
&_tnl_normal_transform_stage,
|
||||||
&_tnl_lighting_stage,
|
&_tnl_lighting_stage,
|
||||||
&_tnl_fog_coordinate_stage,
|
&_tnl_fog_coordinate_stage,
|
||||||
|
@@ -46,7 +46,6 @@
|
|||||||
#define need_GL_EXT_blend_equation_separate
|
#define need_GL_EXT_blend_equation_separate
|
||||||
#define need_GL_EXT_blend_func_separate
|
#define need_GL_EXT_blend_func_separate
|
||||||
#define need_GL_EXT_blend_minmax
|
#define need_GL_EXT_blend_minmax
|
||||||
#define need_GL_EXT_cull_vertex
|
|
||||||
#define need_GL_EXT_draw_buffers2
|
#define need_GL_EXT_draw_buffers2
|
||||||
#define need_GL_EXT_fog_coord
|
#define need_GL_EXT_fog_coord
|
||||||
#define need_GL_EXT_framebuffer_blit
|
#define need_GL_EXT_framebuffer_blit
|
||||||
@@ -106,7 +105,6 @@ static const struct dri_extension card_extensions[] = {
|
|||||||
{ "GL_EXT_blend_minmax", GL_EXT_blend_minmax_functions },
|
{ "GL_EXT_blend_minmax", GL_EXT_blend_minmax_functions },
|
||||||
{ "GL_EXT_blend_logic_op", NULL },
|
{ "GL_EXT_blend_logic_op", NULL },
|
||||||
{ "GL_EXT_blend_subtract", NULL },
|
{ "GL_EXT_blend_subtract", NULL },
|
||||||
{ "GL_EXT_cull_vertex", GL_EXT_cull_vertex_functions },
|
|
||||||
{ "GL_EXT_framebuffer_blit", GL_EXT_framebuffer_blit_functions },
|
{ "GL_EXT_framebuffer_blit", GL_EXT_framebuffer_blit_functions },
|
||||||
{ "GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions },
|
{ "GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions },
|
||||||
{ "GL_EXT_framebuffer_multisample", GL_EXT_framebuffer_multisample_functions },
|
{ "GL_EXT_framebuffer_multisample", GL_EXT_framebuffer_multisample_functions },
|
||||||
|
@@ -135,8 +135,6 @@ EXPORTS
|
|||||||
glCopyTexSubImage3D
|
glCopyTexSubImage3D
|
||||||
glCopyTexSubImage3DEXT
|
glCopyTexSubImage3DEXT
|
||||||
glCullFace
|
glCullFace
|
||||||
glCullParameterdvEXT
|
|
||||||
glCullParameterfvEXT
|
|
||||||
glDeleteBuffersARB
|
glDeleteBuffersARB
|
||||||
glDeleteFencesNV
|
glDeleteFencesNV
|
||||||
glDeleteLists
|
glDeleteLists
|
||||||
|
@@ -224,8 +224,6 @@ _mesa_create_exec_table(void)
|
|||||||
SET_ClearIndex(exec, _mesa_ClearIndex);
|
SET_ClearIndex(exec, _mesa_ClearIndex);
|
||||||
SET_ClipPlane(exec, _mesa_ClipPlane);
|
SET_ClipPlane(exec, _mesa_ClipPlane);
|
||||||
SET_ColorMaterial(exec, _mesa_ColorMaterial);
|
SET_ColorMaterial(exec, _mesa_ColorMaterial);
|
||||||
SET_CullParameterfvEXT(exec, _mesa_CullParameterfvEXT);
|
|
||||||
SET_CullParameterdvEXT(exec, _mesa_CullParameterdvEXT);
|
|
||||||
SET_DepthFunc(exec, _mesa_DepthFunc);
|
SET_DepthFunc(exec, _mesa_DepthFunc);
|
||||||
SET_DepthMask(exec, _mesa_DepthMask);
|
SET_DepthMask(exec, _mesa_DepthMask);
|
||||||
SET_DepthRange(exec, _mesa_DepthRange);
|
SET_DepthRange(exec, _mesa_DepthRange);
|
||||||
|
@@ -114,46 +114,3 @@ _mesa_GetClipPlane( GLenum plane, GLdouble *equation )
|
|||||||
equation[2] = (GLdouble) ctx->Transform.EyeUserPlane[p][2];
|
equation[2] = (GLdouble) ctx->Transform.EyeUserPlane[p][2];
|
||||||
equation[3] = (GLdouble) ctx->Transform.EyeUserPlane[p][3];
|
equation[3] = (GLdouble) ctx->Transform.EyeUserPlane[p][3];
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLAPIENTRY
|
|
||||||
_mesa_CullParameterfvEXT (GLenum cap, GLfloat *v)
|
|
||||||
{
|
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
|
||||||
ASSERT_OUTSIDE_BEGIN_END(ctx);
|
|
||||||
|
|
||||||
switch (cap) {
|
|
||||||
case GL_CULL_VERTEX_EYE_POSITION_EXT:
|
|
||||||
FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
|
|
||||||
COPY_4FV(ctx->Transform.CullEyePos, v);
|
|
||||||
|
|
||||||
_mesa_transform_vector( ctx->Transform.CullObjPos,
|
|
||||||
ctx->Transform.CullEyePos,
|
|
||||||
ctx->ModelviewMatrixStack.Top->inv );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case GL_CULL_VERTEX_OBJECT_POSITION_EXT:
|
|
||||||
FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
|
|
||||||
COPY_4FV(ctx->Transform.CullObjPos, v);
|
|
||||||
|
|
||||||
_mesa_transform_vector( ctx->Transform.CullEyePos,
|
|
||||||
ctx->Transform.CullObjPos,
|
|
||||||
ctx->ModelviewMatrixStack.Top->m );
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
_mesa_error( ctx, GL_INVALID_ENUM, "glCullParameterfvEXT" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void GLAPIENTRY
|
|
||||||
_mesa_CullParameterdvEXT (GLenum cap, GLdouble *v)
|
|
||||||
{
|
|
||||||
GLfloat f[4];
|
|
||||||
|
|
||||||
f[0] = (GLfloat)v[0];
|
|
||||||
f[1] = (GLfloat)v[1];
|
|
||||||
f[2] = (GLfloat)v[2];
|
|
||||||
f[3] = (GLfloat)v[3];
|
|
||||||
|
|
||||||
_mesa_CullParameterfvEXT(cap, f);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@@ -39,11 +39,4 @@ _mesa_ClipPlane( GLenum plane, const GLdouble *equation );
|
|||||||
extern void GLAPIENTRY
|
extern void GLAPIENTRY
|
||||||
_mesa_GetClipPlane( GLenum plane, GLdouble *equation );
|
_mesa_GetClipPlane( GLenum plane, GLdouble *equation );
|
||||||
|
|
||||||
extern void GLAPIENTRY
|
|
||||||
_mesa_CullParameterfvEXT (GLenum cap, GLfloat *v);
|
|
||||||
|
|
||||||
extern void GLAPIENTRY
|
|
||||||
_mesa_CullParameterdvEXT (GLenum cap, GLdouble *v);
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@@ -335,13 +335,6 @@ _mesa_set_enable(GLcontext *ctx, GLenum cap, GLboolean state)
|
|||||||
FLUSH_VERTICES(ctx, _NEW_POLYGON);
|
FLUSH_VERTICES(ctx, _NEW_POLYGON);
|
||||||
ctx->Polygon.CullFlag = state;
|
ctx->Polygon.CullFlag = state;
|
||||||
break;
|
break;
|
||||||
case GL_CULL_VERTEX_EXT:
|
|
||||||
CHECK_EXTENSION(EXT_cull_vertex, cap);
|
|
||||||
if (ctx->Transform.CullVertexFlag == state)
|
|
||||||
return;
|
|
||||||
FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
|
|
||||||
ctx->Transform.CullVertexFlag = state;
|
|
||||||
break;
|
|
||||||
case GL_DEPTH_TEST:
|
case GL_DEPTH_TEST:
|
||||||
if (ctx->Depth.Test == state)
|
if (ctx->Depth.Test == state)
|
||||||
return;
|
return;
|
||||||
|
@@ -114,7 +114,6 @@ static const struct {
|
|||||||
{ OFF, "GL_EXT_blend_minmax", F(EXT_blend_minmax) },
|
{ OFF, "GL_EXT_blend_minmax", F(EXT_blend_minmax) },
|
||||||
{ OFF, "GL_EXT_blend_subtract", F(EXT_blend_subtract) },
|
{ OFF, "GL_EXT_blend_subtract", F(EXT_blend_subtract) },
|
||||||
{ OFF, "GL_EXT_clip_volume_hint", F(EXT_clip_volume_hint) },
|
{ OFF, "GL_EXT_clip_volume_hint", F(EXT_clip_volume_hint) },
|
||||||
{ OFF, "GL_EXT_cull_vertex", F(EXT_cull_vertex) },
|
|
||||||
{ ON, "GL_EXT_compiled_vertex_array", F(EXT_compiled_vertex_array) },
|
{ ON, "GL_EXT_compiled_vertex_array", F(EXT_compiled_vertex_array) },
|
||||||
{ ON, "GL_EXT_copy_texture", F(EXT_copy_texture) },
|
{ ON, "GL_EXT_copy_texture", F(EXT_copy_texture) },
|
||||||
{ OFF, "GL_EXT_depth_bounds_test", F(EXT_depth_bounds_test) },
|
{ OFF, "GL_EXT_depth_bounds_test", F(EXT_depth_bounds_test) },
|
||||||
|
@@ -1405,7 +1405,6 @@ struct gl_transform_attrib
|
|||||||
GLboolean RasterPositionUnclipped; /**< GL_IBM_rasterpos_clip */
|
GLboolean RasterPositionUnclipped; /**< GL_IBM_rasterpos_clip */
|
||||||
GLboolean DepthClamp; /**< GL_ARB_depth_clamp */
|
GLboolean DepthClamp; /**< GL_ARB_depth_clamp */
|
||||||
|
|
||||||
GLboolean CullVertexFlag; /**< True if GL_CULL_VERTEX_EXT is enabled */
|
|
||||||
GLfloat CullEyePos[4];
|
GLfloat CullEyePos[4];
|
||||||
GLfloat CullObjPos[4];
|
GLfloat CullObjPos[4];
|
||||||
};
|
};
|
||||||
@@ -2624,7 +2623,6 @@ struct gl_extensions
|
|||||||
GLboolean EXT_blend_minmax;
|
GLboolean EXT_blend_minmax;
|
||||||
GLboolean EXT_blend_subtract;
|
GLboolean EXT_blend_subtract;
|
||||||
GLboolean EXT_clip_volume_hint;
|
GLboolean EXT_clip_volume_hint;
|
||||||
GLboolean EXT_cull_vertex;
|
|
||||||
GLboolean EXT_compiled_vertex_array;
|
GLboolean EXT_compiled_vertex_array;
|
||||||
GLboolean EXT_copy_texture;
|
GLboolean EXT_copy_texture;
|
||||||
GLboolean EXT_depth_bounds_test;
|
GLboolean EXT_depth_bounds_test;
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -154,7 +154,6 @@ TNL_SOURCES = \
|
|||||||
tnl/t_vb_texgen.c \
|
tnl/t_vb_texgen.c \
|
||||||
tnl/t_vb_texmat.c \
|
tnl/t_vb_texmat.c \
|
||||||
tnl/t_vb_vertex.c \
|
tnl/t_vb_vertex.c \
|
||||||
tnl/t_vb_cull.c \
|
|
||||||
tnl/t_vb_fog.c \
|
tnl/t_vb_fog.c \
|
||||||
tnl/t_vb_light.c \
|
tnl/t_vb_light.c \
|
||||||
tnl/t_vb_normals.c \
|
tnl/t_vb_normals.c \
|
||||||
|
@@ -44,7 +44,6 @@ extern void _tnl_install_pipeline( GLcontext *ctx,
|
|||||||
/* These are implemented in the t_vb_*.c files:
|
/* These are implemented in the t_vb_*.c files:
|
||||||
*/
|
*/
|
||||||
extern const struct tnl_pipeline_stage _tnl_vertex_transform_stage;
|
extern const struct tnl_pipeline_stage _tnl_vertex_transform_stage;
|
||||||
extern const struct tnl_pipeline_stage _tnl_vertex_cull_stage;
|
|
||||||
extern const struct tnl_pipeline_stage _tnl_normal_transform_stage;
|
extern const struct tnl_pipeline_stage _tnl_normal_transform_stage;
|
||||||
extern const struct tnl_pipeline_stage _tnl_lighting_stage;
|
extern const struct tnl_pipeline_stage _tnl_lighting_stage;
|
||||||
extern const struct tnl_pipeline_stage _tnl_fog_coordinate_stage;
|
extern const struct tnl_pipeline_stage _tnl_fog_coordinate_stage;
|
||||||
|
@@ -1,96 +0,0 @@
|
|||||||
/*
|
|
||||||
* Mesa 3-D graphics library
|
|
||||||
* Version: 6.5
|
|
||||||
*
|
|
||||||
* Copyright (C) 1999-2006 Brian Paul 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, sublicense,
|
|
||||||
* 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 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 NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
* BRIAN PAUL 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.
|
|
||||||
*
|
|
||||||
* Authors:
|
|
||||||
* Keith Whitwell <keith@tungstengraphics.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#include "main/glheader.h"
|
|
||||||
#include "main/colormac.h"
|
|
||||||
#include "main/macros.h"
|
|
||||||
#include "main/imports.h"
|
|
||||||
#include "main/mtypes.h"
|
|
||||||
|
|
||||||
#include "math/m_xform.h"
|
|
||||||
|
|
||||||
#include "t_context.h"
|
|
||||||
#include "t_pipeline.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* EXT_vertex_cull. Not really a big win, but probably depends on
|
|
||||||
* your application. This stage not included in the default pipeline.
|
|
||||||
*/
|
|
||||||
static GLboolean run_cull_stage( GLcontext *ctx,
|
|
||||||
struct tnl_pipeline_stage *stage )
|
|
||||||
{
|
|
||||||
TNLcontext *tnl = TNL_CONTEXT(ctx);
|
|
||||||
struct vertex_buffer *VB = &tnl->vb;
|
|
||||||
|
|
||||||
const GLfloat a = ctx->Transform.CullObjPos[0];
|
|
||||||
const GLfloat b = ctx->Transform.CullObjPos[1];
|
|
||||||
const GLfloat c = ctx->Transform.CullObjPos[2];
|
|
||||||
GLfloat *norm = (GLfloat *)VB->AttribPtr[_TNL_ATTRIB_NORMAL]->data;
|
|
||||||
GLuint stride = VB->AttribPtr[_TNL_ATTRIB_NORMAL]->stride;
|
|
||||||
GLuint count = VB->Count;
|
|
||||||
GLuint i;
|
|
||||||
|
|
||||||
if (ctx->VertexProgram._Current ||
|
|
||||||
!ctx->Transform.CullVertexFlag)
|
|
||||||
return GL_TRUE;
|
|
||||||
|
|
||||||
VB->ClipOrMask &= ~CLIP_CULL_BIT;
|
|
||||||
VB->ClipAndMask |= CLIP_CULL_BIT;
|
|
||||||
|
|
||||||
for (i = 0 ; i < count ; i++) {
|
|
||||||
GLfloat dp = (norm[0] * a +
|
|
||||||
norm[1] * b +
|
|
||||||
norm[2] * c);
|
|
||||||
|
|
||||||
if (dp < 0) {
|
|
||||||
VB->ClipMask[i] |= CLIP_CULL_BIT;
|
|
||||||
VB->ClipOrMask |= CLIP_CULL_BIT;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
VB->ClipMask[i] &= ~CLIP_CULL_BIT;
|
|
||||||
VB->ClipAndMask &= ~CLIP_CULL_BIT;
|
|
||||||
}
|
|
||||||
|
|
||||||
STRIDE_F(norm, stride);
|
|
||||||
}
|
|
||||||
|
|
||||||
return !(VB->ClipAndMask & CLIP_CULL_BIT);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const struct tnl_pipeline_stage _tnl_vertex_cull_stage =
|
|
||||||
{
|
|
||||||
"EXT_cull_vertex",
|
|
||||||
NULL, /* private data */
|
|
||||||
NULL, /* ctr */
|
|
||||||
NULL, /* destructor */
|
|
||||||
NULL,
|
|
||||||
run_cull_stage /* run -- initially set to init */
|
|
||||||
};
|
|
Reference in New Issue
Block a user