summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMathias Fröhlich <[email protected]>2012-02-29 18:19:34 +0100
committerMathias Fröhlich <[email protected]>2012-02-29 20:37:07 +0100
commit703ada1e4586acbbde31d0ea1eb81c5ce1557ca7 (patch)
tree53bb3c201436e6fb029bd255ef38e954631db40e /src/mesa
parent619baeae3ca5b9f993d1c6ddd9c4c0541e5a4f11 (diff)
mesa: Avoid explicit invalidation of shine tables.
Since the shine tables are implicitly invalidated by having a different shininess value than the current one, we can omit the explicit invalidation of the shine table. Reviewed-by: Alex Deucher <[email protected]> Reviewed-by: Brian Paul <[email protected]> Signed-off-by: Mathias Froehlich <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/light.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index 7ebf9bf51cf..a120b12da71 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -621,11 +621,6 @@ _mesa_material_bitmask( struct gl_context *ctx, GLenum face, GLenum pname,
-static void
-invalidate_shine_table( struct gl_context *ctx, GLuint side );
-
-
-
/* Update derived values following a change in ctx->Light.Material
*/
void
@@ -697,14 +692,6 @@ _mesa_update_material( struct gl_context *ctx, GLuint bitmask )
mat[MAT_ATTRIB_BACK_SPECULAR]);
}
}
-
- if (bitmask & MAT_BIT_FRONT_SHININESS) {
- invalidate_shine_table( ctx, 0 );
- }
-
- if (bitmask & MAT_BIT_BACK_SHININESS) {
- invalidate_shine_table( ctx, 1 );
- }
}
@@ -913,20 +900,6 @@ _mesa_GetMaterialiv( GLenum face, GLenum pname, GLint *params )
-/* Calculate a new shine table. Doing this here saves a branch in
- * lighting, and the cost of doing it early may be partially offset
- * by keeping a MRU cache of shine tables for various shine values.
- */
-static void
-invalidate_shine_table( struct gl_context *ctx, GLuint side )
-{
- ASSERT(side < 2);
- if (ctx->_ShineTable[side])
- ctx->_ShineTable[side]->refcount--;
- ctx->_ShineTable[side] = NULL;
-}
-
-
static void
validate_shine_table( struct gl_context *ctx, GLuint side, GLfloat shininess )
{