diff options
author | Thomas White <taw@bitwiz.org.uk> | 2009-09-20 21:38:39 +0100 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2010-02-18 15:39:25 +0100 |
commit | 20b41db143ff7fec33da4463da1656769afb560f (patch) | |
tree | 93ba0c6e5ee8e98108ebe345d4a5b5c4b5881516 /src/mesa | |
parent | cc85954bdcd0ac1a8ca15a71955ced1a5fe691ce (diff) |
Revert "Nasty workaround for apparent GCC bug"
An improved workaround has now been committed.
This reverts commit 692fd8a500e0f9eadc703b29b0c7550f57863e29.
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/clear.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c index 2494585128..8085bedf1c 100644 --- a/src/mesa/main/clear.c +++ b/src/mesa/main/clear.c @@ -37,8 +37,6 @@ #include "enums.h" #include "state.h" -#include <unistd.h> /* Needed for usleep() */ - #if _HAVE_FULL_GL @@ -62,20 +60,6 @@ _mesa_ClearIndex( GLfloat c ) #endif -/* Nasty workaround - the same as CLAMP(x, min, max), but fudged to avoid - * some kind of problematic copmiler optimisation */ -static GLfloat clamp_clear(GLclampf x, GLfloat min, GLfloat max) -{ - if ( x > max ) { - return max; - } - if ( x < min ) { - return min; - } - usleep(1); - return x; -} - /** * Specify the clear values for the color buffers. * @@ -97,10 +81,10 @@ _mesa_ClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); - tmp[0] = clamp_clear(red, 0.0F, 1.0F); - tmp[1] = clamp_clear(green, 0.0F, 1.0F); - tmp[2] = clamp_clear(blue, 0.0F, 1.0F); - tmp[3] = clamp_clear(alpha, 0.0F, 1.0F); + tmp[0] = CLAMP(red, 0.0F, 1.0F); + tmp[1] = CLAMP(green, 0.0F, 1.0F); + tmp[2] = CLAMP(blue, 0.0F, 1.0F); + tmp[3] = CLAMP(alpha, 0.0F, 1.0F); if (TEST_EQ_4V(tmp, ctx->Color.ClearColor)) return; /* no change */ |