<div dir="ltr">This patch breaks a lot of piglit on my HSW.<br><br><a href="https://bugs.freedesktop.org/show_bug.cgi?id=85425">https://bugs.freedesktop.org/show_bug.cgi?id=85425</a><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 24, 2014 at 12:26 AM, <span dir="ltr"><<a href="mailto:Mathias.Froehlich@gmx.net" target="_blank">Mathias.Froehlich@gmx.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Mathias Fröhlich <<a href="mailto:Mathias.Froehlich@gmx.net">Mathias.Froehlich@gmx.net</a>><br>
<br>
Restore clip control to the default state if MESA_META_VIEWPORT<br>
or MESA_META_DEPTH_TEST is requested.<br>
<br>
v3:<br>
Handle clip control state with MESA_META_TRANSFORM.<br>
<br>
Signed-off-by: Mathias Froehlich <<a href="mailto:Mathias.Froehlich@web.de">Mathias.Froehlich@web.de</a>><br>
---<br>
src/mesa/drivers/common/meta.c | 6 ++++++<br>
src/mesa/drivers/common/meta.h | 2 ++<br>
2 files changed, 8 insertions(+)<br>
<br>
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c<br>
index 7a8e627..ebb6f5c 100644<br>
--- a/src/mesa/drivers/common/meta.c<br>
+++ b/src/mesa/drivers/common/meta.c<br>
@@ -680,6 +680,10 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)<br>
_mesa_Ortho(0.0, ctx->DrawBuffer->Width,<br>
0.0, ctx->DrawBuffer->Height,<br>
-1.0, 1.0);<br>
+<br>
+ save->ClipControlOrigin = ctx->Transform.Origin;<br>
+ save->ClipControlDepth = ctx->Transform.Depth;<br>
+ _mesa_ClipControl(GL_LOWER_LEFT, GL_NEGATIVE_ONE_TO_ONE);<br>
}<br>
<br>
if (state & MESA_META_CLIP) {<br>
@@ -1081,6 +1085,8 @@ _mesa_meta_end(struct gl_context *ctx)<br>
_mesa_LoadMatrixf(save->ProjectionMatrix);<br>
<br>
_mesa_MatrixMode(save->MatrixMode);<br>
+<br>
+ _mesa_ClipControl(save->ClipControlOrigin, save->ClipControlDepth);<br>
}<br>
<br>
if (state & MESA_META_CLIP) {<br>
diff --git a/src/mesa/drivers/common/meta.h b/src/mesa/drivers/common/meta.h<br>
index 2c9517b..596a0d9 100644<br>
--- a/src/mesa/drivers/common/meta.h<br>
+++ b/src/mesa/drivers/common/meta.h<br>
@@ -136,6 +136,8 @@ struct save_state<br>
GLfloat ModelviewMatrix[16];<br>
GLfloat ProjectionMatrix[16];<br>
GLfloat TextureMatrix[16];<br>
+ GLenum ClipControlOrigin;<br>
+ GLenum ClipControlDepth;<br>
<br>
/** MESA_META_CLIP */<br>
GLbitfield ClipPlanesEnabled;<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.9.3<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>