<div dir="ltr">On 26 August 2013 11:53, Jacob Penner <span dir="ltr"><<a href="mailto:jkpenner91@gmail.com" target="_blank">jkpenner91@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">---<br>
.../framebuffertexture-buffer-textures.c | 73 ++++++++++++++++++++++<br>
1 file changed, 73 insertions(+)<br>
create mode 100644 tests/spec/gl-3.2/layered-rendering/framebuffertexture-buffer-textures.c<br></blockquote><div><br></div><div>This patch is:<br><br>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
diff --git a/tests/spec/gl-3.2/layered-rendering/framebuffertexture-buffer-textures.c b/tests/spec/gl-3.2/layered-rendering/framebuffertexture-buffer-textures.c<br>
new file mode 100644<br>
index 0000000..c85e080<br>
--- /dev/null<br>
+++ b/tests/spec/gl-3.2/layered-rendering/framebuffertexture-buffer-textures.c<br>
@@ -0,0 +1,73 @@<br>
+/*<br>
+ * Copyright © 2013 Intel Corporation<br>
+ *<br>
+ * Permission is hereby granted, free of charge, to any person obtaining a<br>
+ * copy of this software and associated documentation files (the "Software"),<br>
+ * to deal in the Software without restriction, including without limitation<br>
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,<br>
+ * and/or sell copies of the Software, and to permit persons to whom the<br>
+ * Software is furnished to do so, subject to the following conditions:<br>
+ *<br>
+ * The above copyright notice and this permission notice (including the next<br>
+ * paragraph) shall be included in all copies or substantial portions of the<br>
+ * Software.<br>
+ *<br>
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR<br>
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,<br>
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL<br>
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER<br>
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING<br>
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS<br>
+ * IN THE SOFTWARE.<br>
+ */<br>
+<br>
+<br>
+/** @file framebuffertexture-buffer-textures.c<br>
+ *<br>
+ * Section 4.4.2(Framebuffer Objects) From GL spec 3.2 core:<br>
+ * An INVALID_OPERATION error is generated if texture is the name<br>
+ * of a buffer texture.<br>
+ */<br>
+<br>
+#include "piglit-util-gl-common.h"<br>
+<br>
+PIGLIT_GL_TEST_CONFIG_BEGIN<br>
+<br>
+ config.supports_gl_compat_version = 32;<br>
+ config.supports_gl_core_version = 32;<br>
+<br>
+PIGLIT_GL_TEST_CONFIG_END<br>
+<br>
+void<br>
+piglit_init(int argc, char **argv)<br>
+{<br>
+ bool pass = true;<br>
+ GLuint fbo, buff, tex;<br>
+<br>
+ glGenFramebuffers(1, &fbo);<br>
+ glBindFramebuffer(GL_FRAMEBUFFER, fbo);<br>
+<br>
+ glGenBuffers(1, &buff);<br>
+ glBindBuffer(GL_TEXTURE_BUFFER, buff);<br>
+<br>
+ glGenTextures(1, &tex);<br>
+ glBindTexture(GL_TEXTURE_BUFFER, tex);<br>
+<br>
+ glTexBuffer(GL_TEXTURE_BUFFER, GL_RGB32F, buff);<br>
+<br>
+ pass = piglit_check_gl_error(GL_NO_ERROR) && pass;<br>
+<br>
+ /* Try to attach the buffer texture to the framebuffer */<br>
+ glFramebufferTexture(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, tex, 0);<br>
+<br>
+ pass = piglit_check_gl_error(GL_INVALID_OPERATION) && pass;<br>
+<br>
+ piglit_report_result(pass ? PIGLIT_PASS : PIGLIT_FAIL);<br>
+}<br>
+<br>
+enum piglit_result<br>
+piglit_display(void)<br>
+{<br>
+ /* UNREACHABLE! */<br>
+ return PIGLIT_FAIL;<br>
+}<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.8.3.1<br>
<br>
_______________________________________________<br>
Piglit mailing list<br>
<a href="mailto:Piglit@lists.freedesktop.org">Piglit@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/piglit" target="_blank">http://lists.freedesktop.org/mailman/listinfo/piglit</a><br>
</font></span></blockquote></div><br></div></div>