aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/buffers.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-10-17 16:18:45 -0600
committerKeith Whitwell <[email protected]>2008-09-21 22:13:51 -0700
commit87534210bb9fe5f4e3053d12123491a8c2ccbf6d (patch)
tree7c5b1d1e06162390f204d519c827ac5963624049 /src/mesa/main/buffers.c
parent411d6672a6f3b228faebcf13da90388ea7671ae2 (diff)
Add some FLUSH_CURRENT() calls.
Without these we can find ourselves in _mesa_load_state_parameters() computing derived lighting/material values whhen the current material properties haven't been updated from the VBO. This may be a somewhat wide-spread problem that needs more attention... (cherry picked from commit 49adf51eeec31c9f3c995a70acc5008522689708)
Diffstat (limited to 'src/mesa/main/buffers.c')
-rw-r--r--src/mesa/main/buffers.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
index 5ab969e0ebb..a4aa5e9cf4a 100644
--- a/src/mesa/main/buffers.c
+++ b/src/mesa/main/buffers.c
@@ -118,6 +118,8 @@ _mesa_Clear( GLbitfield mask )
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
+ FLUSH_CURRENT(ctx, 0);
+
if (MESA_VERBOSE & VERBOSE_API)
_mesa_debug(ctx, "glClear 0x%x\n", mask);