summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Faye-Lund <erik.faye-lund@collabora.com>2024-02-21 11:58:16 +0100
committerErik Faye-Lund <erik.faye-lund@collabora.com>2024-02-22 14:23:04 +0100
commit2a1c49a81cd9a6bf5d0c3a9b87225be94771ca96 (patch)
tree3d60f1abb2ea175fe795e0cd8b5a35bb3bafcd78
parent53e5c99ab9f7c637414c06c74aa5916acdc57208 (diff)
ext_texture_format_bgra8888: test glRenderbufferStorage
While it might seem unintuitive, the spec here actually adds GL_BGRA_EXT as a color-renderable format, which means it's usable for glRenderBufferstorage() as well. So we should test that. Reviewed-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/881>
-rw-r--r--tests/spec/ext_texture_format_bgra8888/api-errors.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/spec/ext_texture_format_bgra8888/api-errors.c b/tests/spec/ext_texture_format_bgra8888/api-errors.c
index a432ded5e..ea164ee57 100644
--- a/tests/spec/ext_texture_format_bgra8888/api-errors.c
+++ b/tests/spec/ext_texture_format_bgra8888/api-errors.c
@@ -41,11 +41,13 @@ PIGLIT_GL_TEST_CONFIG_END
static bool
run_test(void)
{
- GLuint tex;
+ GLuint tex, rb;
bool pass = true;
glGenTextures(1, &tex);
glBindTexture(GL_TEXTURE_2D, tex);
+ glGenRenderbuffers(1, &rb);
+ glBindRenderbuffer(GL_RENDERBUFFER, tex);
if (!piglit_check_gl_error(GL_NO_ERROR))
return false;
@@ -110,7 +112,13 @@ run_test(void)
if (!piglit_check_gl_error(GL_INVALID_OPERATION))
pass = false;
+ /* glRenderbufferStorage */
+ glRenderbufferStorage(GL_RENDERBUFFER, GL_BGRA_EXT, 2, 2);
+ if (!piglit_check_gl_error(GL_NO_ERROR))
+ pass = false;
+
glDeleteTextures(1, &tex);
+ glDeleteRenderbuffers(1, &rb);
return pass;
}