X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fdebug.c;h=3471b26aad860bb11f20eb3c78274829ffb1703a;hb=192de3f051c70ff1404369f88ae2d55f1ffcf806;hp=b50d79e0c261c91eb849b8c9904717cdcb7c1472;hpb=fac77912b5faa2394e0c0a88f3862eae9d87967a;p=mesa.git diff --git a/src/mesa/main/debug.c b/src/mesa/main/debug.c index b50d79e0c26..3471b26aad8 100644 --- a/src/mesa/main/debug.c +++ b/src/mesa/main/debug.c @@ -26,11 +26,11 @@ #include #include "mtypes.h" #include "attrib.h" -#include "colormac.h" #include "enums.h" #include "formats.h" #include "hash.h" #include "imports.h" +#include "macros.h" #include "debug.h" #include "get.h" #include "pixelstore.h" @@ -189,7 +189,8 @@ set_debug_flags(const char *str) { "silent", DEBUG_SILENT }, /* turn off debug messages */ { "flush", DEBUG_ALWAYS_FLUSH }, /* flush after each drawing command */ { "incomplete_tex", DEBUG_INCOMPLETE_TEXTURE }, - { "incomplete_fbo", DEBUG_INCOMPLETE_FBO } + { "incomplete_fbo", DEBUG_INCOMPLETE_FBO }, + { "context", DEBUG_CONTEXT } /* force set GL_CONTEXT_FLAG_DEBUG_BIT flag */ }; GLuint i; @@ -272,7 +273,9 @@ write_texture_image(struct gl_texture_object *texObj, store = ctx->Pack; /* save */ ctx->Pack = ctx->DefaultPacking; - ctx->Driver.GetTexImage(ctx, GL_RGBA, GL_UNSIGNED_BYTE, buffer, img); + ctx->Driver.GetTexSubImage(ctx, + 0, 0, 0, img->Width, img->Height, img->Depth, + GL_RGBA, GL_UNSIGNED_BYTE, buffer, img); /* make filename */ _mesa_snprintf(s, sizeof(s), "/tmp/tex%u.l%u.f%u.ppm", texObj->Name, level, face); @@ -411,7 +414,7 @@ dump_renderbuffer(const struct gl_renderbuffer *rb, GLboolean writeImage) { printf("Renderbuffer %u: %u x %u IntFormat = %s\n", rb->Name, rb->Width, rb->Height, - _mesa_lookup_enum_by_nr(rb->InternalFormat)); + _mesa_enum_to_string(rb->InternalFormat)); if (writeImage) { _mesa_write_renderbuffer_image(rb); }