From 7d551eb03df0a732e9e55dd960afffc6a1525377 Mon Sep 17 00:00:00 2001 From: Corbin Simpson Date: Tue, 22 Jun 2010 22:37:39 -0700 Subject: glhd: Add glhd_warn for unconditional stderr output. Design decision. Bad API errors should never be silenced. Of course, you can always not use galahad. --- src/gallium/drivers/galahad/glhd_context.h | 9 +++++++++ src/gallium/drivers/galahad/glhd_screen.c | 1 + 2 files changed, 10 insertions(+) (limited to 'src/gallium') diff --git a/src/gallium/drivers/galahad/glhd_context.h b/src/gallium/drivers/galahad/glhd_context.h index b316ec32b16..a8753d0255a 100644 --- a/src/gallium/drivers/galahad/glhd_context.h +++ b/src/gallium/drivers/galahad/glhd_context.h @@ -28,6 +28,8 @@ #ifndef GLHD_CONTEXT_H #define GLHD_CONTEXT_H +#include + #include "pipe/p_state.h" #include "pipe/p_context.h" @@ -49,4 +51,11 @@ galahad_context(struct pipe_context *pipe) return (struct galahad_context *)pipe; } +#define glhd_warn(...) \ +do { \ + fprintf(stderr, "galahad: %s: ", __FUNCTION__); \ + fprintf(stderr, __VA_ARGS__); \ + fprintf(stderr, "\n"); \ +} while (0) + #endif /* GLHD_CONTEXT_H */ diff --git a/src/gallium/drivers/galahad/glhd_screen.c b/src/gallium/drivers/galahad/glhd_screen.c index 3f56c3bafdf..33cf9d22a1f 100644 --- a/src/gallium/drivers/galahad/glhd_screen.c +++ b/src/gallium/drivers/galahad/glhd_screen.c @@ -1,6 +1,7 @@ /************************************************************************** * * Copyright 2009 VMware, Inc. + * 2010 Corbin Simpson * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a -- cgit v1.2.3