From 420c062cb68e4e313ef34bd879852a003101169e Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 17 Oct 2007 15:59:59 -0600 Subject: [PATCH] Assert that there's no outstanding current state that needs to be flushed from the vbo in _mesa_load_state_parameters(). Several of the state parameters use current state (such as materials). Need to make sure those values are not stale. --- src/mesa/shader/prog_statevars.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c index d37d7fb9bf4..9a745a77e55 100644 --- a/src/mesa/shader/prog_statevars.c +++ b/src/mesa/shader/prog_statevars.c @@ -815,6 +815,8 @@ _mesa_load_state_parameters(GLcontext *ctx, if (!paramList) return; + assert(ctx->Driver.NeedFlush == 0); + for (i = 0; i < paramList->NumParameters; i++) { if (paramList->Parameters[i].Type == PROGRAM_STATE_VAR) { _mesa_fetch_state(ctx, -- 2.30.2