#include "main/context.h"
#include "main/enable.h"
#include "main/matrix.h"
+#include "main/viewport.h"
#include "swrast/swrast.h"
#include "shader/arbprogram.h"
#include "shader/program.h"
return GL_FALSE;
}
- if (ctx->Stencil.Enabled) {
+ if (ctx->Stencil._Enabled) {
DBG("fallback due to image stencil\n");
return GL_FALSE;
}
intel->meta.saved_vp_y = ctx->Viewport.Y;
intel->meta.saved_vp_width = ctx->Viewport.Width;
intel->meta.saved_vp_height = ctx->Viewport.Height;
+ intel->meta.saved_matrix_mode = ctx->Transform.MatrixMode;
+ intel->internal_viewport_call = GL_TRUE;
_mesa_Viewport(0, 0, ctx->DrawBuffer->Width, ctx->DrawBuffer->Height);
+ intel->internal_viewport_call = GL_FALSE;
_mesa_MatrixMode(GL_PROJECTION);
_mesa_PushMatrix();
_mesa_MatrixMode(GL_MODELVIEW);
_mesa_PopMatrix();
+ _mesa_MatrixMode(intel->meta.saved_matrix_mode);
+
+ intel->internal_viewport_call = GL_TRUE;
_mesa_Viewport(intel->meta.saved_vp_x, intel->meta.saved_vp_y,
intel->meta.saved_vp_width, intel->meta.saved_vp_height);
+ intel->internal_viewport_call = GL_FALSE;
}
/**