[Piglit] [PATCH] arb_texture_buffer_range: test glTexBufferRange() with wrong target
Samuel Pitoiset
samuel.pitoiset at gmail.com
Tue Apr 4 12:50:43 UTC 2017
>From OpenGL 4.5 spec, section 8.9 Buffer Textures:
"An INVALID_ENUM error is generated if the effective target is not
TEXTURE_BUFFER."
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
tests/spec/arb_texture_buffer_range/errors.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tests/spec/arb_texture_buffer_range/errors.c b/tests/spec/arb_texture_buffer_range/errors.c
index 6c6a32cb6..a5e9cbec6 100644
--- a/tests/spec/arb_texture_buffer_range/errors.c
+++ b/tests/spec/arb_texture_buffer_range/errors.c
@@ -69,6 +69,15 @@ piglit_init(int argc, char **argv)
piglit_report_result(PIGLIT_FAIL);
}
+ /* From OpenGL 4.5 spec, section 8.9 Buffer Textures:
+ *
+ * "An INVALID_ENUM error is generated if the effective target is not
+ * TEXTURE_BUFFER."
+ */
+ glTexBufferRange(GL_TEXTURE_2D, GL_RGBA8, bo, 0, 4);
+ if (!piglit_check_gl_error(GL_INVALID_ENUM))
+ piglit_report_result(PIGLIT_FAIL);
+
/* If <offset> is negative or if <size> is
* less than or equal to zero or if <offset> + <size> is greater than
* the value of BUFFER_SIZE for the buffer bound to <target>, of if
--
2.12.2
More information about the Piglit
mailing list