intel: Fall back on glBitmap with fog enabled.
[mesa.git] / src / mesa / drivers / dri / intel / intel_pixel.c
index cf2f32d38453623f956dceca209ce64b37b0872f..fc0ac0b79c0a873a8eb78fa0f54e73e90bdeded8 100644 (file)
@@ -30,6 +30,7 @@
 #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"
@@ -112,7 +113,7 @@ intel_check_blit_fragment_ops(GLcontext * ctx, GLboolean src_alpha_is_one)
       return GL_FALSE;
    }
 
-   if (ctx->Stencil.Enabled) {
+   if (ctx->Stencil._Enabled) {
       DBG("fallback due to image stencil\n");
       return GL_FALSE;
    }
@@ -181,8 +182,11 @@ intel_meta_set_passthrough_transform(struct intel_context *intel)
    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();
@@ -202,8 +206,12 @@ intel_meta_restore_transform(struct intel_context *intel)
    _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;
 }
 
 /**