From: Marek Olšák Date: Sat, 6 Apr 2013 22:22:32 +0000 (+0200) Subject: mesa: update derived framebuffer state in GetMultisamplefv X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4f1fd920c90443eb90a115a7b859dfac293ba373;p=mesa.git mesa: update derived framebuffer state in GetMultisamplefv This makes sure that ctx->DrawBuffer->Visual.samples is up-to-date. Reviewed-by: Eric Anholt --- diff --git a/src/mesa/main/multisample.c b/src/mesa/main/multisample.c index b0f45d9332a..a1edb52efcf 100644 --- a/src/mesa/main/multisample.c +++ b/src/mesa/main/multisample.c @@ -30,6 +30,7 @@ #include "main/mtypes.h" #include "main/fbobject.h" #include "main/glformats.h" +#include "main/state.h" /** @@ -73,6 +74,10 @@ _mesa_GetMultisamplefv(GLenum pname, GLuint index, GLfloat * val) { GET_CURRENT_CONTEXT(ctx); + if (ctx->NewState & _NEW_BUFFERS) { + _mesa_update_state(ctx); + } + switch (pname) { case GL_SAMPLE_POSITION: { if (index >= ctx->DrawBuffer->Visual.samples) {