intel: Improve INTEL_DEBUG=fbo output.
[mesa.git] / src / mesa / drivers / dri / intel / intel_fbo.c
index 608f75b82406e93029db5f82e2a3af7432dae6e7..dc96b36a15da65bd1cd8bbdd729d13814297bc8c 100644 (file)
@@ -398,8 +398,6 @@ static GLboolean
 intel_update_wrapper(GLcontext *ctx, struct intel_renderbuffer *irb, 
                     struct gl_texture_image *texImage)
 {
-   gl_format texFormat;
-
    if (texImage->TexFormat == MESA_FORMAT_ARGB8888) {
       irb->Base.DataType = GL_UNSIGNED_BYTE;
       DBG("Render to RGBA8 texture OK\n");
@@ -429,14 +427,13 @@ intel_update_wrapper(GLcontext *ctx, struct intel_renderbuffer *irb,
       DBG("Render to DEPTH_STENCIL texture OK\n");
    }
    else {
-      DBG("Render to texture BAD FORMAT %d\n", texImage->TexFormat);
+      DBG("Render to texture BAD FORMAT %s\n",
+         _mesa_get_format_name(texImage->TexFormat));
       return GL_FALSE;
    }
 
    irb->Base.Format = texImage->TexFormat;
 
-   texFormat = texImage->TexFormat;
-
    irb->Base.InternalFormat = texImage->InternalFormat;
    irb->Base._BaseFormat = _mesa_base_fbo_format(ctx, irb->Base.InternalFormat);
    irb->Base.Width = texImage->Width;
@@ -598,6 +595,9 @@ intel_validate_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb)
       /* we only support combined depth/stencil buffers, not separate
        * stencil buffers.
        */
+      DBG("Only supports combined depth/stencil (found %s, %s)\n",
+         depthRb ? _mesa_get_format_name(depthRb->Base.Format): "NULL",
+         stencilRb ? _mesa_get_format_name(stencilRb->Base.Format): "NULL");
       fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
    }
 
@@ -609,6 +609,7 @@ intel_validate_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb)
         continue;
 
       if (irb == NULL) {
+        DBG("software rendering renderbuffer\n");
         fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
         continue;
       }