From: Jordan Justen Date: Sat, 12 Jan 2013 22:19:30 +0000 (-0800) Subject: fbobject: add VERBOSE=api message for renderbuffer storage X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=275620c4b298cae9e3152fd39d7e291b87802f03;p=mesa.git fbobject: add VERBOSE=api message for renderbuffer storage Add API debug trace message for: * glRenderbufferStorage * glRenderbufferStorageMultisample Signed-off-by: Jordan Justen Reviewed-by: Matt Turner Reviewed-by: Ian Romanick --- diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 74b038632d5..c4382681633 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1378,13 +1378,28 @@ renderbuffer_storage(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei samples) { const char *func = samples == NO_SAMPLES ? - "glRenderbufferStorage" : "RenderbufferStorageMultisample"; + "glRenderbufferStorage" : "glRenderbufferStorageMultisample"; struct gl_renderbuffer *rb; GLenum baseFormat; GET_CURRENT_CONTEXT(ctx); ASSERT_OUTSIDE_BEGIN_END(ctx); + if (MESA_VERBOSE & VERBOSE_API) { + if (samples == NO_SAMPLES) + _mesa_debug(ctx, "%s(%s, %s, %d, %d)\n", + func, + _mesa_lookup_enum_by_nr(target), + _mesa_lookup_enum_by_nr(internalFormat), + width, height); + else + _mesa_debug(ctx, "%s(%s, %s, %d, %d, %d)\n", + func, + _mesa_lookup_enum_by_nr(target), + _mesa_lookup_enum_by_nr(internalFormat), + width, height, samples); + } + if (target != GL_RENDERBUFFER_EXT) { _mesa_error(ctx, GL_INVALID_ENUM, "%s(target)", func); return;