mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 04:50:11 +01:00
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.
This commit is contained in:
parent
75612aa199
commit
7d551eb03d
2 changed files with 10 additions and 0 deletions
|
|
@ -28,6 +28,8 @@
|
|||
#ifndef GLHD_CONTEXT_H
|
||||
#define GLHD_CONTEXT_H
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#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 */
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
/**************************************************************************
|
||||
*
|
||||
* Copyright 2009 VMware, Inc.
|
||||
* 2010 Corbin Simpson <MostAwesomeDude@gmail.com>
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue