[Piglit] [PATCH] arb_texture_buffer_range: test glTexBufferRange() with wrong target
Nicolai Hähnle
nhaehnle at gmail.com
Wed Apr 5 13:45:31 UTC 2017
On 04.04.2017 14:50, Samuel Pitoiset wrote:
> 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>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.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
>
--
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.
More information about the Piglit
mailing list