[Piglit] [PATCH 09/15] fbo-storage-*: de-StudlyCaps.
Eric Anholt
eric at anholt.net
Mon Jan 14 10:55:36 PST 2013
---
tests/fbo/fbo-storage-completeness.c | 22 +++++++++++-----------
tests/fbo/fbo-storage-formats.c | 31 ++++++++++++++++---------------
2 files changed, 27 insertions(+), 26 deletions(-)
diff --git a/tests/fbo/fbo-storage-completeness.c b/tests/fbo/fbo-storage-completeness.c
index 3842684..7ca1c6a 100644
--- a/tests/fbo/fbo-storage-completeness.c
+++ b/tests/fbo/fbo-storage-completeness.c
@@ -46,7 +46,7 @@ PIGLIT_GL_TEST_CONFIG_END
#define ARB_texture_rg 3
#define MAX_EXT 4
-static GLboolean HaveExtension[MAX_EXT];
+static GLboolean have_extension[MAX_EXT];
@@ -57,7 +57,7 @@ struct format_info
};
-static const struct format_info Formats[] = {
+static const struct format_info formats[] = {
{ GL_RGB, 0 },
{ GL_R3_G3_B2, 0 },
{ GL_RGB4, 0 },
@@ -139,8 +139,8 @@ test(void)
;
/* find a format which is incomplete */
- for (i = 0; i < ARRAY_SIZE(Formats); i++) {
- if (!HaveExtension[Formats[i].extension])
+ for (i = 0; i < ARRAY_SIZE(formats); i++) {
+ if (!have_extension[formats[i].extension])
continue;
glGenFramebuffersEXT(1, &fbo);
@@ -160,7 +160,7 @@ test(void)
if (!piglit_check_gl_error(GL_NO_ERROR))
piglit_report_result(PIGLIT_FAIL);
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, Formats[i].format,
+ glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, formats[i].format,
piglit_width, piglit_height);
if (glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) ==
GL_FRAMEBUFFER_COMPLETE_EXT) {
@@ -200,7 +200,7 @@ test(void)
if (!piglit_check_gl_error(GL_NO_ERROR))
piglit_report_result(PIGLIT_FAIL);
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, Formats[complete].format,
+ glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, formats[complete].format,
piglit_width, piglit_height);
if (glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) !=
GL_FRAMEBUFFER_COMPLETE_EXT) {
@@ -210,7 +210,7 @@ test(void)
}
glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT,
- Formats[incomplete].format,
+ formats[incomplete].format,
piglit_width, piglit_height);
if (glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) ==
GL_FRAMEBUFFER_COMPLETE_EXT) {
@@ -238,10 +238,10 @@ piglit_init(int argc, char**argv)
{
piglit_require_extension("GL_EXT_framebuffer_object");
- HaveExtension[0] = GL_TRUE;
- HaveExtension[EXT_packed_depth_stencil] = piglit_is_extension_supported("GL_EXT_packed_depth_stencil");
- HaveExtension[ARB_framebuffer_object] = piglit_is_extension_supported("GL_ARB_framebuffer_object");
- HaveExtension[ARB_texture_rg] = piglit_is_extension_supported("GL_ARB_texture_rg");
+ have_extension[0] = GL_TRUE;
+ have_extension[EXT_packed_depth_stencil] = piglit_is_extension_supported("GL_EXT_packed_depth_stencil");
+ have_extension[ARB_framebuffer_object] = piglit_is_extension_supported("GL_ARB_framebuffer_object");
+ have_extension[ARB_texture_rg] = piglit_is_extension_supported("GL_ARB_texture_rg");
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
}
diff --git a/tests/fbo/fbo-storage-formats.c b/tests/fbo/fbo-storage-formats.c
index 5487a03..3f16fbb 100644
--- a/tests/fbo/fbo-storage-formats.c
+++ b/tests/fbo/fbo-storage-formats.c
@@ -47,7 +47,7 @@ static const char *TestName = "fbo-storage-formats";
#define ARB_texture_rg 3
#define MAX_EXT 4
-static GLboolean HaveExtension[MAX_EXT];
+static GLboolean have_extension[MAX_EXT];
@@ -58,7 +58,7 @@ struct format_info
};
-static const struct format_info Formats[] = {
+static const struct format_info formats[] = {
{ GL_RGB, 0 },
{ GL_R3_G3_B2, 0 },
{ GL_RGB4, 0 },
@@ -128,7 +128,7 @@ static const struct format_info Formats[] = {
};
-static const GLenum InvalidFormats[] = {
+static const GLenum invalid_formats[] = {
GL_COLOR_INDEX,
GL_COLOR_INDEX1_EXT,
GL_COLOR_INDEX2_EXT,
@@ -189,34 +189,35 @@ test(void)
;
/* test formats that should be accepted */
- for (i = 0; i < ARRAY_SIZE(Formats); i++) {
- if (!HaveExtension[Formats[i].extension])
+ for (i = 0; i < ARRAY_SIZE(formats); i++) {
+ if (!have_extension[formats[i].extension])
continue;
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, Formats[i].format,
+ glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, formats[i].format,
piglit_width, piglit_height);
err = glGetError();
if (err) {
printf("%s: glRenderbufferStorage failed for "
"format 0x%x\n",
- TestName, Formats[i].format);
+ TestName, formats[i].format);
pass = GL_FALSE;
}
- printf("0x%04X: %s\n", Formats[i].format,
+ printf("0x%04X: %s\n", formats[i].format,
(glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) ==
GL_FRAMEBUFFER_COMPLETE_EXT ?
"complete" : "incomplete"));
}
/* test formats that should fail */
- for (i = 0; i < ARRAY_SIZE(InvalidFormats); i++) {
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, InvalidFormats[i],
+ for (i = 0; i < ARRAY_SIZE(invalid_formats); i++) {
+ glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT,
+ invalid_formats[i],
piglit_width, piglit_height);
err = glGetError();
if (err != GL_INVALID_ENUM) {
printf("%s: glRenderbufferStorage erroneously "
"accepted format 0x%x\n",
- TestName, InvalidFormats[i]);
+ TestName, invalid_formats[i]);
pass = GL_FALSE;
}
}
@@ -237,10 +238,10 @@ piglit_init(int argc, char**argv)
{
piglit_require_extension("GL_EXT_framebuffer_object");
- HaveExtension[0] = GL_TRUE;
- HaveExtension[EXT_packed_depth_stencil] = piglit_is_extension_supported("GL_EXT_packed_depth_stencil");
- HaveExtension[ARB_framebuffer_object] = piglit_is_extension_supported("GL_ARB_framebuffer_object");
- HaveExtension[ARB_texture_rg] = piglit_is_extension_supported("GL_ARB_texture_rg");
+ have_extension[0] = GL_TRUE;
+ have_extension[EXT_packed_depth_stencil] = piglit_is_extension_supported("GL_EXT_packed_depth_stencil");
+ have_extension[ARB_framebuffer_object] = piglit_is_extension_supported("GL_ARB_framebuffer_object");
+ have_extension[ARB_texture_rg] = piglit_is_extension_supported("GL_ARB_texture_rg");
piglit_ortho_projection(piglit_width, piglit_height, GL_FALSE);
}
--
1.7.10.4
More information about the Piglit
mailing list