<div dir="ltr"><div>There isn't any bugzilla entry for this yet.  I just saw it in the source code so far rather than in a misbehaving program.<br></div>Perhaps piglit could use a few tests for whether meta operations damage context attributes.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 26, 2015 at 3:26 PM, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Friday, June 26, 2015 03:15:46 PM Mike Stroyan wrote:<br>
> The meta code was setting a default depth range for all viewports<br>
> and 'restoring' all viewports to depth range values saved from viewport 0.<br>
> ---<br>
>  src/mesa/drivers/common/meta.c | 4 ++--<br>
>  1 file changed, 2 insertions(+), 2 deletions(-)<br>
><br>
> diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c<br>
> index 214a68a..9a75019 100644<br>
> --- a/src/mesa/drivers/common/meta.c<br>
> +++ b/src/mesa/drivers/common/meta.c<br>
> @@ -728,7 +728,7 @@ _mesa_meta_begin(struct gl_context *ctx, GLbitfield state)<br>
>        save->DepthNear = ctx->ViewportArray[0].Near;<br>
>        save->DepthFar = ctx->ViewportArray[0].Far;<br>
>        /* set depth range to default */<br>
> -      _mesa_DepthRange(0.0, 1.0);<br>
> +      _mesa_set_depth_range(ctx, 0, 0.0, 1.0);<br>
>     }<br>
><br>
>     if (state & MESA_META_CLAMP_FRAGMENT_COLOR) {<br>
> @@ -1129,7 +1129,7 @@ _mesa_meta_end(struct gl_context *ctx)<br>
>           _mesa_set_viewport(ctx, 0, save->ViewportX, save->ViewportY,<br>
>                              save->ViewportW, save->ViewportH);<br>
>        }<br>
> -      _mesa_DepthRange(save->DepthNear, save->DepthFar);<br>
> +      _mesa_set_depth_range(ctx, 0, save->DepthNear, save->DepthFar);<br>
>     }<br>
><br>
>     if (state & MESA_META_CLAMP_FRAGMENT_COLOR &&<br>
><br>
<br>
</div></div>Good catch - this code predates GL_ARB_viewport_array, and really ought<br>
to only change viewport 0.  Thanks, Mike!<br>
<br>
Cc: "10.6 10.5" <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.org</a>><br>
Reviewed-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
<br>
Is there a bugzilla entry related to this patch?<br>
<br>
I'll plan to push this tonight/tomorrow unless someone else objects.<br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><br> Mike Stroyan - Software Architect<br> LunarG, Inc.  - The Graphics Experts<br> Cell:  (970) 219-7905<br> Email: Mike@LunarG.com<br> Website: <a href="http://www.lunarg.com" target="_blank">http://www.lunarg.com</a></div>
</div>