[Mesa-dev] [PATCH 2/2] intel: Update state before using _ColorDrawBuffers[] in glFinish().

Eric Anholt eric at anholt.net
Wed May 25 17:23:52 PDT 2011


_ColorDrawBuffers is computed state, so we need a state update to use
it, which mesa core doesn't do for this function.  Fixes valgrind
complaints on fbo-finish-deleted.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33545
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33656
---
 src/mesa/drivers/dri/intel/intel_context.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 2ea52c2..5d285de 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -33,6 +33,7 @@
 #include "main/framebuffer.h"
 #include "main/imports.h"
 #include "main/points.h"
+#include "main/state.h"
 
 #include "swrast/swrast.h"
 #include "swrast_setup/swrast_setup.h"
@@ -582,6 +583,8 @@ intelFinish(struct gl_context * ctx)
    struct gl_framebuffer *fb = ctx->DrawBuffer;
    int i;
 
+   _mesa_update_state(ctx);
+
    intel_flush(ctx);
    intel_flush_front(ctx);
 
-- 
1.7.5.1



More information about the mesa-dev mailing list