Browse Source

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 49adf51eee)
tags/mesa_7_3_rc1
Brian 18 years ago
parent
commit
87534210bb
2 changed files with 4 additions and 0 deletions
  1. 2
    0
      src/mesa/main/buffers.c
  2. 2
    0
      src/mesa/main/drawpix.c

+ 2
- 0
src/mesa/main/buffers.c View File

@@ -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);


+ 2
- 0
src/mesa/main/drawpix.c View File

@@ -293,6 +293,8 @@ _mesa_ReadPixels( GLint x, GLint y, GLsizei width, GLsizei height,
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);

FLUSH_CURRENT(ctx, 0);

if (width < 0 || height < 0) {
_mesa_error( ctx, GL_INVALID_VALUE,
"glReadPixels(width=%d height=%d)", width, height );

Loading…
Cancel
Save