<p dir="ltr"><br>
On Jan 20, 2016 6:20 PM, "Ian Romanick" <<a href="mailto:idr@freedesktop.org">idr@freedesktop.org</a>> wrote:<br>
><br>
> From: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
><br>
> Add a big spec quotation justifying the error generated, which has<br>
> changed over the GL versions.<br>
><br>
> Signed-off-by: Ian Romanick <<a href="mailto:ian.d.romanick@intel.com">ian.d.romanick@intel.com</a>><br>
> ---<br>
><br>
> I intended to send this out with the other four, but I selected the<br>
> wrong SHA from the list.<br>
><br>
>  src/mesa/main/texparam.c | 31 ++++++++++++++++++++++++-------<br>
>  1 file changed, 24 insertions(+), 7 deletions(-)<br>
><br>
> diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c<br>
> index 89f286c..ee50b5a 100644<br>
> --- a/src/mesa/main/texparam.c<br>
> +++ b/src/mesa/main/texparam.c<br>
> @@ -369,8 +369,31 @@ set_tex_parameteri(struct gl_context *ctx,<br>
>        if (texObj->BaseLevel == params[0])<br>
>           return GL_FALSE;<br>
><br>
> +      /* Section 8.10 (Texture Parameters) of the OpenGL 4.5 Core Profile spec<br>
> +       * says:<br>
> +       *<br>
> +       *     "An INVALID_OPERATION error is generated if the effective target<br>
> +       *     is either TEXTURE_2D_MULTISAMPLE or TEXTURE_2D_MULTISAMPLE_ARRAY,<br>
> +       *     and pname TEXTURE_BASE_LEVEL is set to a value other than zero.<br>
> +       *<br>
> +       *     ...<br>
> +       *<br>
> +       *     An INVALID_OPERATION error is generated if the effective target<br>
> +       *     is TEXTURE_RECTANGLE and pname TEXTURE_BASE_LEVEL is set to any<br>
> +       *     value other than zero."</p>
<p dir="ltr">Do we really need the "pname"s?  IMHO, they make it harder to read.</p>
<p dir="ltr">Other than that, the series looks good.</p>
<p dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason.ekstrand@intel.com">jason.ekstrand@intel.com</a>></p>
<p dir="ltr">> +       *<br>
> +       * Note that section 3.8.8 (Texture Parameters) of the OpenGL 3.3 Core<br>
> +       * Profile spec said:<br>
> +       *<br>
> +       *     "The error INVALID_VALUE is generated if TEXTURE_BASE_LEVEL is<br>
> +       *     set to any value other than zero."<br>
> +       *<br>
> +       * We take the 4.5 language as a correction to the 3.3, and we implement<br>
> +       * that on all GL versions.<br>
> +       */<br>
>        if ((texObj->Target == GL_TEXTURE_2D_MULTISAMPLE ||<br>
> -           texObj->Target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY) && params[0] != 0)<br>
> +           texObj->Target == GL_TEXTURE_2D_MULTISAMPLE_ARRAY ||<br>
> +           texObj->Target == GL_TEXTURE_RECTANGLE) && params[0] != 0)<br>
>           goto invalid_operation;<br>
><br>
>        if (params[0] < 0) {<br>
> @@ -378,12 +401,6 @@ set_tex_parameteri(struct gl_context *ctx,<br>
>                       "glTex%sParameter(param=%d)", suffix, params[0]);<br>
>           return GL_FALSE;<br>
>        }<br>
> -      if (texObj->Target == GL_TEXTURE_RECTANGLE_ARB && params[0] != 0) {<br>
> -         _mesa_error(ctx, GL_INVALID_OPERATION,<br>
> -                     "glTex%sParameter(target=%s, param=%d)", suffix,<br>
> -                     _mesa_enum_to_string(texObj->Target), params[0]);<br>
> -         return GL_FALSE;<br>
> -      }<br>
>        incomplete(ctx, texObj);<br>
><br>
>        /** See note about ARB_texture_storage below */<br>
> --<br>
> 2.5.0<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">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</p>