Commit d6ff35a9 authored by Brian Paul's avatar Brian Paul Committed by Dave Airlie

arb_texture_cube_map_array: fix assorted compiler warnings

Fix const correctness warnings.  Remove unused label.  Use program name
in error messages.
Signed-off-by: Dave Airlie's avatarDave Airlie <airlied@gmail.com>
parent 46780c7a
...@@ -106,8 +106,8 @@ ffs(int i) ...@@ -106,8 +106,8 @@ ffs(int i)
static void static void
set_image(int level, int size, int *color) set_image(int level, int size, int *color)
{ {
GLfloat *color1; const GLfloat *color1;
GLfloat *color2; const GLfloat *color2;
GLfloat *tex; GLfloat *tex;
int x, y; int x, y;
int face; int face;
...@@ -126,7 +126,7 @@ set_image(int level, int size, int *color) ...@@ -126,7 +126,7 @@ set_image(int level, int size, int *color)
*/ */
for (y = 0; y < size; y++) { for (y = 0; y < size; y++) {
for (x = 0; x < size; x++) { for (x = 0; x < size; x++) {
GLfloat *chosen_color; const GLfloat *chosen_color;
if (y >= (size / 2) || x >= (size / 2)) if (y >= (size / 2) || x >= (size / 2))
chosen_color = color1; chosen_color = color1;
...@@ -153,8 +153,8 @@ static bool ...@@ -153,8 +153,8 @@ static bool
test_results(int x, int y, int size, int level, int face, bool mipmapped, test_results(int x, int y, int size, int level, int face, bool mipmapped,
int color, int layer) int color, int layer)
{ {
GLfloat *color1 = colors[color]; const GLfloat *color1 = colors[color];
GLfloat *color2 = colors[(color + 1) % ARRAY_SIZE(colors)]; const GLfloat *color2 = colors[(color + 1) % ARRAY_SIZE(colors)];
bool pass = true; bool pass = true;
int x1 = x + size / 4, x2 = x + size * 3 / 4; int x1 = x + size / 4, x2 = x + size * 3 / 4;
int y1 = y + size / 4, y2 = y + size * 3 / 4; int y1 = y + size / 4, y2 = y + size * 3 / 4;
...@@ -170,8 +170,8 @@ test_results(int x, int y, int size, int level, int face, bool mipmapped, ...@@ -170,8 +170,8 @@ test_results(int x, int y, int size, int level, int face, bool mipmapped,
if (!pass) { if (!pass) {
int base_size = size * (1 << level); int base_size = size * (1 << level);
printf("Cube map failed at size %dx%d, level %d (%dx%d), face %s%s\n", printf("%s: Cube map failed at size %dx%d, level %d (%dx%d), face %s%s\n",
base_size, base_size, level, size, size, prog, base_size, base_size, level, size, size,
cube_face_names[face], cube_face_names[face],
mipmapped ? ", mipmapped" : ""); mipmapped ? ", mipmapped" : "");
} }
......
...@@ -119,7 +119,7 @@ create_array_fbo(void) ...@@ -119,7 +119,7 @@ create_array_fbo(void)
status = glCheckFramebufferStatusEXT (GL_FRAMEBUFFER_EXT); status = glCheckFramebufferStatusEXT (GL_FRAMEBUFFER_EXT);
if (status != GL_FRAMEBUFFER_COMPLETE_EXT) { if (status != GL_FRAMEBUFFER_COMPLETE_EXT) {
fprintf(stderr, "FBO incomplete\n"); fprintf(stderr, "%s: FBO incomplete\n", prog);
piglit_report_result(PIGLIT_SKIP); piglit_report_result(PIGLIT_SKIP);
} }
...@@ -131,8 +131,6 @@ create_array_fbo(void) ...@@ -131,8 +131,6 @@ create_array_fbo(void)
piglit_draw_rect(-2, -2, BUF_WIDTH + 2, BUF_HEIGHT + 2); piglit_draw_rect(-2, -2, BUF_WIDTH + 2, BUF_HEIGHT + 2);
} }
done:
glDeleteFramebuffersEXT(1, &fb); glDeleteFramebuffersEXT(1, &fb);
return tex; return tex;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment