intel: Finish renaming fallback_debug() to perf_debug().
authorEric Anholt <eric@anholt.net>
Fri, 22 Feb 2013 20:56:13 +0000 (12:56 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 5 Mar 2013 22:25:00 +0000 (14:25 -0800)
They're about to change to handle GL_ARB_debug_output, so just make one
function.

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/drivers/dri/intel/intel_context.h
src/mesa/drivers/dri/intel/intel_mipmap_tree.c
src/mesa/drivers/dri/intel/intel_pixel_copy.c
src/mesa/drivers/dri/intel/intel_pixel_read.c
src/mesa/drivers/dri/intel/intel_tex_copy.c

index ce83bc1..c72176a 100644 (file)
@@ -461,11 +461,6 @@ extern int INTEL_DEBUG;
                dbg_printf(__VA_ARGS__);                        \
 } while(0)
 
-#define fallback_debug(...) do {                               \
-       if (unlikely(INTEL_DEBUG & DEBUG_PERF))                 \
-               dbg_printf(__VA_ARGS__);                        \
-} while(0)
-
 #define perf_debug(...) do {                                   \
        if (unlikely(INTEL_DEBUG & DEBUG_PERF))                 \
                dbg_printf(__VA_ARGS__);                        \
index 69e4a2e..663575f 100644 (file)
@@ -858,8 +858,8 @@ intel_miptree_copy_slice(struct intel_context *intel,
                          width, height,
                          GL_COPY)) {
 
-      fallback_debug("miptree validate blit for %s failed\n",
-                    _mesa_get_format_name(format));
+      perf_debug("miptree validate blit for %s failed\n",
+                 _mesa_get_format_name(format));
 
       intel_miptree_copy_slice_sw(intel, dst_mt, src_mt, level, slice,
                                   width, height);
index 682a52d..8cbda07 100644 (file)
@@ -97,7 +97,7 @@ do_blit_copypixels(struct gl_context * ctx,
    switch (type) {
    case GL_COLOR:
       if (fb->_NumColorDrawBuffers != 1) {
-        fallback_debug("glCopyPixels() fallback: MRT\n");
+        perf_debug("glCopyPixels() fallback: MRT\n");
         return false;
       }
 
@@ -110,23 +110,23 @@ do_blit_copypixels(struct gl_context * ctx,
         intel_renderbuffer(read_fb->Attachment[BUFFER_DEPTH].Renderbuffer);
       break;
    case GL_DEPTH:
-      fallback_debug("glCopyPixels() fallback: GL_DEPTH\n");
+      perf_debug("glCopyPixels() fallback: GL_DEPTH\n");
       return false;
    case GL_STENCIL:
-      fallback_debug("glCopyPixels() fallback: GL_STENCIL\n");
+      perf_debug("glCopyPixels() fallback: GL_STENCIL\n");
       return false;
    default:
-      fallback_debug("glCopyPixels(): Unknown type\n");
+      perf_debug("glCopyPixels(): Unknown type\n");
       return false;
    }
 
    if (!draw_irb) {
-      fallback_debug("glCopyPixels() fallback: missing draw buffer\n");
+      perf_debug("glCopyPixels() fallback: missing draw buffer\n");
       return false;
    }
 
    if (!read_irb) {
-      fallback_debug("glCopyPixels() fallback: missing read buffer\n");
+      perf_debug("glCopyPixels() fallback: missing read buffer\n");
       return false;
    }
 
@@ -136,9 +136,9 @@ do_blit_copypixels(struct gl_context * ctx,
    if (draw_format != read_format &&
        !(draw_format == MESA_FORMAT_XRGB8888 &&
         read_format == MESA_FORMAT_ARGB8888)) {
-      fallback_debug("glCopyPixels() fallback: mismatched formats (%s -> %s\n",
-                    _mesa_get_format_name(read_format),
-                     _mesa_get_format_name(draw_format));
+      perf_debug("glCopyPixels() fallback: mismatched formats (%s -> %s\n",
+                 _mesa_get_format_name(read_format),
+                 _mesa_get_format_name(draw_format));
       return false;
    }
 
index 324ffb2..08f19ea 100644 (file)
@@ -183,7 +183,7 @@ intelReadPixels(struct gl_context * ctx,
    intel_prepare_render(intel);
    intel->front_buffer_dirty = dirty;
 
-   fallback_debug("%s: fallback to swrast\n", __FUNCTION__);
+   perf_debug("%s: fallback to swrast\n", __FUNCTION__);
 
    /* Update Mesa state before calling _mesa_readpixels().
     * XXX this may not be needed since ReadPixels no longer uses the
index 6d90db3..085b6fd 100644 (file)
@@ -198,7 +198,7 @@ intelCopyTexSubImage(struct gl_context *ctx, GLuint dims,
    }
 
    /* Finally, fall back to meta.  This will likely be slow. */
-   fallback_debug("%s - fallback to swrast\n", __FUNCTION__);
+   perf_debug("%s - fallback to swrast\n", __FUNCTION__);
    _mesa_meta_CopyTexSubImage(ctx, dims, texImage,
                               xoffset, yoffset, zoffset,
                               rb, x, y, width, height);