[Mesa-dev] [PATCH 8/8] i965: Move the remaining driver debug over to stderr.

Matt Turner mattst88 at gmail.com
Fri Feb 21 12:41:33 PST 2014


On Fri, Feb 21, 2014 at 11:32 AM, Eric Anholt <eric at anholt.net> wrote:
> ---
>  src/mesa/drivers/dri/i965/brw_context.c           |  4 ++--
>  src/mesa/drivers/dri/i965/brw_curbe.c             | 26 +++++++++++------------
>  src/mesa/drivers/dri/i965/brw_draw_upload.c       |  8 +++----
>  src/mesa/drivers/dri/i965/brw_eu_compact.c        |  8 +++----
>  src/mesa/drivers/dri/i965/brw_eu_emit.c           |  6 ++++--
>  src/mesa/drivers/dri/i965/brw_interpolation_map.c | 12 +++++------
>  src/mesa/drivers/dri/i965/brw_program.c           | 22 +++++++++----------
>  src/mesa/drivers/dri/i965/brw_urb.c               | 19 +++++++++--------
>  src/mesa/drivers/dri/i965/brw_vs_surface_state.c  |  4 ++--
>  src/mesa/drivers/dri/i965/gen6_vs_state.c         |  6 +++---
>  src/mesa/drivers/dri/i965/gen6_wm_state.c         | 12 +++++------
>  src/mesa/drivers/dri/i965/intel_debug.h           |  2 +-
>  12 files changed, 66 insertions(+), 63 deletions(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
> index 9791a49..1441b46 100644
> --- a/src/mesa/drivers/dri/i965/brw_context.c
> +++ b/src/mesa/drivers/dri/i965/brw_context.c
> @@ -602,7 +602,7 @@ brwCreateContext(gl_api api,
>
>     struct brw_context *brw = rzalloc(NULL, struct brw_context);
>     if (!brw) {
> -      printf("%s: failed to alloc context\n", __FUNCTION__);
> +      fprintf(stderr, "%s: failed to alloc context\n", __FUNCTION__);
>        *dri_ctx_error = __DRI_CTX_ERROR_NO_MEMORY;
>        return false;
>     }
> @@ -658,7 +658,7 @@ brwCreateContext(gl_api api,
>
>     if (!_mesa_initialize_context(ctx, api, mesaVis, shareCtx, &functions)) {
>        *dri_ctx_error = __DRI_CTX_ERROR_NO_MEMORY;
> -      printf("%s: failed to init mesa context\n", __FUNCTION__);
> +      fprintf(stderr, "%s: failed to init mesa context\n", __FUNCTION__);
>        intelDestroyContext(driContextPriv);
>        return false;
>     }
> diff --git a/src/mesa/drivers/dri/i965/brw_curbe.c b/src/mesa/drivers/dri/i965/brw_curbe.c
> index 19544aa..e3514ea 100644
> --- a/src/mesa/drivers/dri/i965/brw_curbe.c
> +++ b/src/mesa/drivers/dri/i965/brw_curbe.c
> @@ -114,13 +114,13 @@ static void calculate_curbe_offsets( struct brw_context *brw )
>        brw->curbe.total_size = reg;
>
>        if (0)
> -        printf("curbe wm %d+%d clip %d+%d vs %d+%d\n",
> -               brw->curbe.wm_start,
> -               brw->curbe.wm_size,
> -               brw->curbe.clip_start,
> -               brw->curbe.clip_size,
> -               brw->curbe.vs_start,
> -               brw->curbe.vs_size );
> +        fprintf(stderr, "curbe wm %d+%d clip %d+%d vs %d+%d\n",
> +                 brw->curbe.wm_start,
> +                 brw->curbe.wm_size,
> +                 brw->curbe.clip_start,
> +                 brw->curbe.clip_size,
> +                 brw->curbe.vs_start,
> +                 brw->curbe.vs_size );

I can't tell if there are too many spaces before the arguments, of if
it's just the fault of the tab before the fprintf, but they arguments
appear unaligned. There are a few places in this series where we've
modified a line and left a leading tab in place. I'd be nice to go
ahead and remove them while we're touching the line.

The whole series is

Reviewed-by: Matt Turner <mattst88 at gmail.com>


More information about the mesa-dev mailing list