From 275620c4b298cae9e3152fd39d7e291b87802f03 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Sat, 12 Jan 2013 14:19:30 -0800 Subject: [PATCH] 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 --- src/mesa/main/fbobject.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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; -- 2.30.2