diff options
author | Ian Romanick <[email protected]> | 2010-02-24 18:24:07 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2010-03-03 12:37:04 -0800 |
commit | a9c1b3caf67f035df83c6a4e38709cfa395f4cc6 (patch) | |
tree | 548d499762ff263d8f5a8a0d94b0d9f6cac0e506 /src/mesa/tnl/t_vb_light.c | |
parent | 5cf2c5851bcd29c2d53bb04ab692b4b156f5a74d (diff) |
tnl: Remove color-index TNL support
Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/tnl/t_vb_light.c')
-rw-r--r-- | src/mesa/tnl/t_vb_light.c | 37 |
1 files changed, 11 insertions, 26 deletions
diff --git a/src/mesa/tnl/t_vb_light.c b/src/mesa/tnl/t_vb_light.c index 8a0fe63fd8b..e7309aaac60 100644 --- a/src/mesa/tnl/t_vb_light.c +++ b/src/mesa/tnl/t_vb_light.c @@ -64,7 +64,6 @@ struct light_stage_data { GLvector4f Input; GLvector4f LitColor[2]; GLvector4f LitSecondary[2]; - GLvector4f LitIndex[2]; light_func *light_func_tab; struct material_cursor mat[MAT_ATTRIB_MAX]; @@ -161,7 +160,6 @@ static light_func _tnl_light_tab[MAX_LIGHT_FUNC]; static light_func _tnl_light_fast_tab[MAX_LIGHT_FUNC]; static light_func _tnl_light_fast_single_tab[MAX_LIGHT_FUNC]; static light_func _tnl_light_spec_tab[MAX_LIGHT_FUNC]; -static light_func _tnl_light_ci_tab[MAX_LIGHT_FUNC]; #define TAG(x) x #define IDX (0) @@ -260,22 +258,18 @@ static void validate_lighting( GLcontext *ctx, if (!ctx->Light.Enabled || ctx->VertexProgram._Current) return; - if (ctx->Visual.rgbMode) { - if (ctx->Light._NeedVertices) { - if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) - tab = _tnl_light_spec_tab; - else - tab = _tnl_light_tab; - } - else { - if (ctx->Light.EnabledList.next == ctx->Light.EnabledList.prev) - tab = _tnl_light_fast_single_tab; - else - tab = _tnl_light_fast_tab; - } + if (ctx->Light._NeedVertices) { + if (ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR) + tab = _tnl_light_spec_tab; + else + tab = _tnl_light_tab; + } + else { + if (ctx->Light.EnabledList.next == ctx->Light.EnabledList.prev) + tab = _tnl_light_fast_single_tab; + else + tab = _tnl_light_fast_tab; } - else - tab = _tnl_light_ci_tab; LIGHT_STAGE_DATA(stage)->light_func_tab = tab; @@ -311,19 +305,12 @@ static GLboolean init_lighting( GLcontext *ctx, _mesa_vector4f_alloc( &store->LitColor[1], 0, size, 32 ); _mesa_vector4f_alloc( &store->LitSecondary[0], 0, size, 32 ); _mesa_vector4f_alloc( &store->LitSecondary[1], 0, size, 32 ); - _mesa_vector4f_alloc( &store->LitIndex[0], 0, size, 32 ); - _mesa_vector4f_alloc( &store->LitIndex[1], 0, size, 32 ); store->LitColor[0].size = 4; store->LitColor[1].size = 4; store->LitSecondary[0].size = 3; store->LitSecondary[1].size = 3; - store->LitIndex[0].size = 1; - store->LitIndex[0].stride = sizeof(GLfloat); - store->LitIndex[1].size = 1; - store->LitIndex[1].stride = sizeof(GLfloat); - return GL_TRUE; } @@ -340,8 +327,6 @@ static void dtr( struct tnl_pipeline_stage *stage ) _mesa_vector4f_free( &store->LitColor[1] ); _mesa_vector4f_free( &store->LitSecondary[0] ); _mesa_vector4f_free( &store->LitSecondary[1] ); - _mesa_vector4f_free( &store->LitIndex[0] ); - _mesa_vector4f_free( &store->LitIndex[1] ); FREE( store ); stage->privatePtr = NULL; } |