<div dir="ltr">No, there's no need for a backport.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 3, 2015 at 6:00 PM, Emil Velikov <span dir="ltr"><<a href="mailto:emil.l.velikov@gmail.com" target="_blank">emil.l.velikov@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Laura,<br>
<br>
This commit does not pick cleanly against the 10.4 tree. Upon closer<br>
look it seems that it depends on your Texture{Sub,}Image rework from<br>
earlier this year. Can you confirm if want this for 10.4 and if so<br>
send over a backport.<br>
<br>
Thanks<br>
Emil<br>
<div><div class="h5"><br>
On 28 February 2015 at 00:38, Laura Ekstrand <<a href="mailto:laura@jlekstrand.net">laura@jlekstrand.net</a>> wrote:<br>
> CC: 10.4, 10.5<br>
><br>
><br>
> ---------- Forwarded message ----------<br>
> From: Laura Ekstrand <<a href="mailto:laura@jlekstrand.net">laura@jlekstrand.net</a>><br>
> Date: Wed, Feb 25, 2015 at 6:04 PM<br>
> Subject: [PATCH] main: Fix target checking for CopyTexSubImage*D.<br>
> To: <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> Cc: Laura Ekstrand <<a href="mailto:laura@jlekstrand.net">laura@jlekstrand.net</a>><br>
><br>
><br>
> This fixes a dEQP test failure. In the test,<br>
> glCopyTexSubImage2D was called with target = 0 and failed to throw<br>
> INVALID ENUM. This failure was caused by _mesa_get_current_tex_object(ctx,<br>
> target) being called before the target checking. To remedy this, target<br>
> checking was separated from the main error-checking function and<br>
> called prior to _mesa_get_current_tex_object.<br>
><br>
> Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=89312" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=89312</a><br>
> ---<br>
> src/mesa/main/teximage.c | 62<br>
> +++++++++++++++++++++++++++++++++++++++++-------<br>
> 1 file changed, 54 insertions(+), 8 deletions(-)<br>
><br>
> diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c<br>
> index 87231df..475dc54 100644<br>
> --- a/src/mesa/main/teximage.c<br>
> +++ b/src/mesa/main/teximage.c<br>
> @@ -2815,14 +2815,6 @@ copytexsubimage_error_check(struct gl_context *ctx,<br>
> GLuint dimensions,<br>
> }<br>
> }<br>
><br>
> - /* check target (proxies not allowed) */<br>
> - if (!legal_texsubimage_target(ctx, dimensions, target, dsa)) {<br>
> - _mesa_error(ctx, GL_INVALID_ENUM,<br>
> "glCopyTex%sSubImage%uD(target=%s)",<br>
> - suffix, dimensions,<br>
> - _mesa_lookup_enum_by_nr(target));<br>
> - return GL_TRUE;<br>
> - }<br>
> -<br>
> /* Check level */<br>
> if (level < 0 || level >= _mesa_max_texture_levels(ctx, target)) {<br>
> _mesa_error(ctx, GL_INVALID_VALUE,<br>
> @@ -4090,6 +4082,16 @@ _mesa_CopyTexSubImage1D( GLenum target, GLint level,<br>
> struct gl_texture_object* texObj;<br>
> GET_CURRENT_CONTEXT(ctx);<br>
><br>
> + /* Check target (proxies not allowed). Target must be checked prior to<br>
> + * calling _mesa_get_current_tex_object.<br>
> + */<br>
> + if (!legal_texsubimage_target(ctx, 1, target, false)) {<br>
> + _mesa_error(ctx, GL_INVALID_ENUM,<br>
> + "glCopyTexSubImage1D(invalid target %s)",<br>
> + _mesa_lookup_enum_by_nr(target));<br>
> + return;<br>
> + }<br>
> +<br>
> texObj = _mesa_get_current_tex_object(ctx, target);<br>
> if (!texObj)<br>
> return;<br>
> @@ -4108,6 +4110,16 @@ _mesa_CopyTexSubImage2D( GLenum target, GLint level,<br>
> struct gl_texture_object* texObj;<br>
> GET_CURRENT_CONTEXT(ctx);<br>
><br>
> + /* Check target (proxies not allowed). Target must be checked prior to<br>
> + * calling _mesa_get_current_tex_object.<br>
> + */<br>
> + if (!legal_texsubimage_target(ctx, 2, target, false)) {<br>
> + _mesa_error(ctx, GL_INVALID_ENUM,<br>
> + "glCopyTexSubImage2D(invalid target %s)",<br>
> + _mesa_lookup_enum_by_nr(target));<br>
> + return;<br>
> + }<br>
> +<br>
> texObj = _mesa_get_current_tex_object(ctx, target);<br>
> if (!texObj)<br>
> return;<br>
> @@ -4127,6 +4139,16 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level,<br>
> struct gl_texture_object* texObj;<br>
> GET_CURRENT_CONTEXT(ctx);<br>
><br>
> + /* Check target (proxies not allowed). Target must be checked prior to<br>
> + * calling _mesa_get_current_tex_object.<br>
> + */<br>
> + if (!legal_texsubimage_target(ctx, 3, target, false)) {<br>
> + _mesa_error(ctx, GL_INVALID_ENUM,<br>
> + "glCopyTexSubImage3D(invalid target %s)",<br>
> + _mesa_lookup_enum_by_nr(target));<br>
> + return;<br>
> + }<br>
> +<br>
> texObj = _mesa_get_current_tex_object(ctx, target);<br>
> if (!texObj)<br>
> return;<br>
> @@ -4147,6 +4169,14 @@ _mesa_CopyTextureSubImage1D(GLuint texture, GLint<br>
> level,<br>
> if (!texObj)<br>
> return;<br>
><br>
> + /* Check target (proxies not allowed). */<br>
> + if (!legal_texsubimage_target(ctx, 1, texObj->Target, true)) {<br>
> + _mesa_error(ctx, GL_INVALID_ENUM,<br>
> + "glCopyTextureSubImage1D(invalid target %s)",<br>
> + _mesa_lookup_enum_by_nr(texObj->Target));<br>
> + return;<br>
> + }<br>
> +<br>
> _mesa_copy_texture_sub_image(ctx, 1, texObj, texObj->Target, level,<br>
> xoffset, 0, 0, x, y, width, 1, true);<br>
> }<br>
> @@ -4163,6 +4193,14 @@ _mesa_CopyTextureSubImage2D(GLuint texture, GLint<br>
> level,<br>
> if (!texObj)<br>
> return;<br>
><br>
> + /* Check target (proxies not allowed). */<br>
> + if (!legal_texsubimage_target(ctx, 2, texObj->Target, true)) {<br>
> + _mesa_error(ctx, GL_INVALID_ENUM,<br>
> + "glCopyTextureSubImage2D(invalid target %s)",<br>
> + _mesa_lookup_enum_by_nr(texObj->Target));<br>
> + return;<br>
> + }<br>
> +<br>
> _mesa_copy_texture_sub_image(ctx, 2, texObj, texObj->Target, level,<br>
> xoffset, yoffset, 0,<br>
> x, y, width, height, true);<br>
> @@ -4182,6 +4220,14 @@ _mesa_CopyTextureSubImage3D(GLuint texture, GLint<br>
> level,<br>
> if (!texObj)<br>
> return;<br>
><br>
> + /* Check target (proxies not allowed). */<br>
> + if (!legal_texsubimage_target(ctx, 3, texObj->Target, true)) {<br>
> + _mesa_error(ctx, GL_INVALID_ENUM,<br>
> + "glCopyTextureSubImage3D(invalid target %s)",<br>
> + _mesa_lookup_enum_by_nr(texObj->Target));<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>
> --<br>
> 2.1.0<br>
><br>
><br>
><br>
</div></div>> _______________________________________________<br>
> mesa-stable mailing list<br>
> <a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/mesa-stable" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-stable</a><br>
><br>
</blockquote></div><br></div>