mesa: update derived framebuffer state in GetMultisamplefv

This makes sure that ctx->DrawBuffer->Visual.samples is up-to-date.

Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Marek Olšák 2013-04-07 00:22:32 +02:00
parent b6475f9437
commit 4f1fd920c9
1 changed files with 5 additions and 0 deletions

View File

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