diff options
Diffstat (limited to 'mesalib/src/mesa/main/debug.c')
-rw-r--r-- | mesalib/src/mesa/main/debug.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mesalib/src/mesa/main/debug.c b/mesalib/src/mesa/main/debug.c index 33b35e03c..526145aec 100644 --- a/mesalib/src/mesa/main/debug.c +++ b/mesalib/src/mesa/main/debug.c @@ -85,7 +85,7 @@ void _mesa_print_state( const char *msg, GLuint state ) { _mesa_debug(NULL, - "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", + "%s: (0x%x) %s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s\n", msg, state, (state & _NEW_MODELVIEW) ? "ctx->ModelView, " : "", @@ -105,6 +105,7 @@ _mesa_print_state( const char *msg, GLuint state ) (state & _NEW_POLYGON) ? "ctx->Polygon, " : "", (state & _NEW_POLYGONSTIPPLE) ? "ctx->PolygonStipple, " : "", (state & _NEW_SCISSOR) ? "ctx->Scissor, " : "", + (state & _NEW_STENCIL) ? "ctx->Stencil, " : "", (state & _NEW_TEXTURE) ? "ctx->Texture, " : "", (state & _NEW_TRANSFORM) ? "ctx->Transform, " : "", (state & _NEW_VIEWPORT) ? "ctx->Viewport, " : "", @@ -314,7 +315,7 @@ write_texture_image(struct gl_texture_object *texObj, buffer, texObj, img); /* make filename */ - sprintf(s, "/tmp/tex%u.l%u.f%u.ppm", texObj->Name, level, face); + _mesa_snprintf(s, sizeof(s), "/tmp/tex%u.l%u.f%u.ppm", texObj->Name, level, face); printf(" Writing image level %u to %s\n", level, s); write_ppm(s, buffer, img->Width, img->Height, 4, 0, 1, 2, GL_FALSE); @@ -356,7 +357,7 @@ write_renderbuffer_image(const struct gl_renderbuffer *rb) format, type, &ctx->DefaultPacking, buffer); /* make filename */ - sprintf(s, "/tmp/renderbuffer%u.ppm", rb->Name); + _mesa_snprintf(s, sizeof(s), "/tmp/renderbuffer%u.ppm", rb->Name); printf(" Writing renderbuffer image to %s\n", s); write_ppm(s, buffer, rb->Width, rb->Height, 4, 0, 1, 2, GL_TRUE); |