i830->state.Ctx[I830_CTXREG_ENABLES_2] |= DISABLE_DEPTH_WRITE;
}
-/** Called from ctx->Driver.Viewport() */
-static void
-i830Viewport(struct gl_context * ctx,
- GLint x, GLint y, GLsizei width, GLsizei height)
-{
- intelCalcViewport(ctx);
-}
-
-
/** Called from ctx->Driver.DepthRange() */
static void
i830DepthRange(struct gl_context * ctx, GLclampd nearval, GLclampd farval)
functions->StencilMaskSeparate = i830StencilMaskSeparate;
functions->StencilOpSeparate = i830StencilOpSeparate;
functions->DepthRange = i830DepthRange;
- functions->Viewport = i830Viewport;
}
void
}
-/** Called from ctx->Driver.Viewport() */
-static void
-i915Viewport(struct gl_context * ctx,
- GLint x, GLint y, GLsizei width, GLsizei height)
-{
- intelCalcViewport(ctx);
-}
-
-
/** Called from ctx->Driver.DepthRange() */
static void
i915DepthRange(struct gl_context * ctx, GLclampd nearval, GLclampd farval)
functions->StencilMaskSeparate = i915StencilMaskSeparate;
functions->StencilOpSeparate = i915StencilOpSeparate;
functions->DepthRange = i915DepthRange;
- functions->Viewport = i915Viewport;
}
}
static void
-intel_viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+intel_noninvalidate_viewport(struct gl_context *ctx, GLint x, GLint y,
+ GLsizei w, GLsizei h)
{
struct intel_context *intel = intel_context(ctx);
__DRIcontext *driContext = intel->driContext;
- if (intel->saved_viewport)
- intel->saved_viewport(ctx, x, y, w, h);
+ (void) x;
+ (void) y;
+ (void) w;
+ (void) h;
+
+ intelCalcViewport(ctx);
if (_mesa_is_winsys_fbo(ctx->DrawBuffer)) {
dri2InvalidateDrawable(driContext->driDrawablePriv);
}
}
+static void
+intel_viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+{
+ (void) x;
+ (void) y;
+ (void) w;
+ (void) h;
+
+ intelCalcViewport(ctx);
+}
+
static const struct dri_debug_control debug_control[] = {
{ "tex", DEBUG_TEXTURE},
{ "state", DEBUG_STATE},
struct gl_config visual;
/* Can't rely on invalidate events, fall back to glViewport hack */
- if (!driContextPriv->driScreenPriv->dri2.useInvalidate) {
- intel->saved_viewport = functions->Viewport;
+ if (!driContextPriv->driScreenPriv->dri2.useInvalidate)
+ functions->Viewport = intel_noninvalidate_viewport;
+ else
functions->Viewport = intel_viewport;
- }
if (mesaVis == NULL) {
memset(&visual, 0, sizeof visual);
__DRIcontext *driContext;
struct intel_screen *intelScreen;
- void (*saved_viewport)(struct gl_context * ctx,
- GLint x, GLint y, GLsizei width, GLsizei height);
/**
* Configuration cache