aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/drivers/common/meta.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/drivers/common/meta.c')
-rw-r--r--mesalib/src/mesa/drivers/common/meta.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mesalib/src/mesa/drivers/common/meta.c b/mesalib/src/mesa/drivers/common/meta.c
index 7a8e627ba..87532c1df 100644
--- a/mesalib/src/mesa/drivers/common/meta.c
+++ b/mesalib/src/mesa/drivers/common/meta.c
@@ -680,6 +680,12 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)
_mesa_Ortho(0.0, ctx->DrawBuffer->Width,
0.0, ctx->DrawBuffer->Height,
-1.0, 1.0);
+
+ if (ctx->Extensions.ARB_clip_control) {
+ save->ClipOrigin = ctx->Transform.ClipOrigin;
+ save->ClipDepthMode = ctx->Transform.ClipDepthMode;
+ _mesa_ClipControl(GL_LOWER_LEFT, GL_NEGATIVE_ONE_TO_ONE);
+ }
}
if (state & MESA_META_CLIP) {
@@ -1081,6 +1087,9 @@ _mesa_meta_end(struct gl_context *ctx)
_mesa_LoadMatrixf(save->ProjectionMatrix);
_mesa_MatrixMode(save->MatrixMode);
+
+ if (ctx->Extensions.ARB_clip_control)
+ _mesa_ClipControl(save->ClipOrigin, save->ClipDepthMode);
}
if (state & MESA_META_CLIP) {