<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 18, 2015 at 3:15 PM, Anuj Phogat <span dir="ltr"><<a href="mailto:anuj.phogat@gmail.com" target="_blank">anuj.phogat@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Mar 18, 2015 at 1:06 PM, Laura Ekstrand <<a href="mailto:laura@jlekstrand.net">laura@jlekstrand.net</a>> wrote:<br>
> So it turns out that this doesn't actually fix any bugs or add any features,<br>
> stictly speaking. However, it does avoid a lot of kludginess.  Previously, if<br>
> you called<br>
><br>
> glCopyTextureSubImage3D(texcube, 0, 0, 0, zoffset = 3, ...<br>
><br>
> it would grab the texture image object for face = 0 in teximage.c instead of<br>
> the desired face = 3.  But Line 274 of brw_blorp_blit.cpp would correct for<br>
> this by updating the slice to 3.<br>
><br>
> This commit does the correct thing before calling any drivers,<br>
> which should make the functionality much more robust and uniform across all<br>
> drivers.<br>
</span>Idea behind this patch looks good to me.<br>
<span class="">> ---<br>
>  src/mesa/main/teximage.c | 15 ++++++++++++---<br>
>  1 file changed, 12 insertions(+), 3 deletions(-)<br>
><br>
> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c<br>
> index 64e4816..8b56d5b 100644<br>
> --- a/src/mesa/main/teximage.c<br>
> +++ b/src/mesa/main/teximage.c<br>
> @@ -4254,9 +4254,18 @@ _mesa_CopyTextureSubImage3D(GLuint texture, GLint level,<br>
>        return;<br>
>     }<br>
><br>
> -   _mesa_copy_texture_sub_image(ctx, 3, texObj, texObj->Target, level,<br>
> -                                xoffset, yoffset, zoffset,<br>
> -                                x, y, width, height, true);<br>
> +   if (texObj->Target == GL_TEXTURE_CUBE_MAP) {<br>
> +      /* Act like CopyTexSubImage2D */<br>
> +      _mesa_copy_texture_sub_image(ctx, 2, texObj,<br>
> +                                   GL_TEXTURE_CUBE_MAP_POSITIVE_X + zoffset,<br>
> +                                   level,<br>
> +                                   xoffset, yoffset, 0,<br>
> +                                   x, y, width, height, false);<br>
</span>Parameters in above three lines can easily fit in 2 lines.<br></blockquote><div>This has been fixed. <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Passing dsa=false and dims = 2 will print incorrect _mesa_debug  / _mesa_error<br>
message in _mesa_copy_texture_sub_image() and copytexsubimage_error_check().<br></blockquote><div>I just sent out a separate patch that fixes this. <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> +   }<br>
> +   else<br>
> +      _mesa_copy_texture_sub_image(ctx, 3, texObj, texObj->Target, level,<br>
> +                                   xoffset, yoffset, zoffset,<br>
> +                                   x, y, width, height, true);<br>
>  }<br>
><br>
>  static bool<br>
> --<br>
> 2.1.0<br>
><br>
</span>> _______________________________________________<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>
</blockquote></div><br></div></div>