<div dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 12, 2017 at 9:40 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">Fixes dEQP-GLES31.functional.debug.<wbr>negative_coverage.get_error.<wbr>shader.srgb_decode_<wbr>samplerparameter{f,fv,i,Iiv,<wbr>Iuiv,iv}.<br>
---<br>
src/mesa/main/samplerobj.c | 13 ++++++++++++-<br>
1 file changed, 12 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c<br>
index d78528be2db..26e77252490 100644<br>
--- a/src/mesa/main/samplerobj.c<br>
+++ b/src/mesa/main/samplerobj.c<br>
@@ -780,8 +780,19 @@ set_sampler_srgb_decode(struct gl_context *ctx,<br>
if (samp->sRGBDecode == param)<br>
return GL_FALSE;<br>
<br>
+ /* The EXT_texture_sRGB_decode spec says:<br>
+ *<br>
+ * "INVALID_ENUM is generated if the <pname> parameter of<br>
+ * TexParameter[i,f,Ii,Iui][v][<wbr>EXT],<br>
+ * MultiTexParameter[i,f,Ii,Iui][<wbr>v]EXT,<br>
+ * TextureParameter[i,f,Ii,Iui][<wbr>v]EXT, SamplerParameter[i,f,Ii,Iui][<wbr>v]<br>
+ * is TEXTURE_SRGB_DECODE_EXT when the <param> parameter is not one of<br>
+ * DECODE_EXT or SKIP_DECODE_EXT.<br>
+ *<br>
+ * Returning INVALID_PARAM makes that happen.<br>
+ */<br>
if (param != GL_DECODE_EXT && param != GL_SKIP_DECODE_EXT)<br>
- return INVALID_VALUE;<br>
+ return INVALID_PARAM;<br>
<br>
flush(ctx);<br>
samp->sRGBDecode = param;<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.13.2<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>