[Mesa-dev] [PATCH 2/2] mesa: update derived framebuffer state in GetMultisamplefv
Marek Olšák
maraeo at gmail.com
Sat Apr 6 15:29:16 PDT 2013
This makes sure that ctx->DrawBuffer->Visual.samples is up-to-date.
---
src/mesa/main/multisample.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/mesa/main/multisample.c b/src/mesa/main/multisample.c
index b0f45d9..a1edb52 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) {
--
1.7.10.4
More information about the mesa-dev
mailing list