<div dir="ltr"><div>Please provide a page number and a section title in your spec comment.<br><br></div>Thanks.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 16, 2015 at 6:13 AM, Martin Peres <span dir="ltr"><<a href="mailto:martin.peres@linux.intel.com" target="_blank">martin.peres@linux.intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Maybe this should be the job of the dispatch layer.<br>
<br>
Signed-off-by: Martin Peres <<a href="mailto:martin.peres@linux.intel.com">martin.peres@linux.intel.com</a>><br>
---<br>
 src/mesa/main/multisample.c | 9 +++++++++<br>
 1 file changed, 9 insertions(+)<br>
<br>
diff --git a/src/mesa/main/multisample.c b/src/mesa/main/multisample.c<br>
index 1f3fa0c..a0a659b 100644<br>
--- a/src/mesa/main/multisample.c<br>
+++ b/src/mesa/main/multisample.c<br>
@@ -150,6 +150,15 @@ GLenum<br>
 _mesa_check_sample_count(struct gl_context *ctx, GLenum target,<br>
                          GLenum internalFormat, GLsizei samples)<br>
 {<br>
+   /* From the OpenGL core 3.0 spec, section 2.5:<br>
+    *<br>
+    * "If a negative number is provided where an argument of type sizei or<br>
+    * sizeiptr is specified, the error INVALID VALUE is generated."<br>
+    */<br>
+   if (samples < 0) {<br>
+      return GL_INVALID_VALUE;<br>
+   }<br>
+<br>
    /* If ARB_internalformat_query is supported, then treat its highest<br>
     * returned sample count as the absolute maximum for this format; it is<br>
     * allowed to exceed MAX_SAMPLES.<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.3.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" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>