blob: 6fe667d3fbd9f2a4fe51c1f3f4908bb1b2137585 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
#ifndef INLINE_DEBUG_HELPER_H
#define INLINE_DEBUG_HELPER_H
#include "pipe/p_compiler.h"
#include "util/u_debug.h"
/* Helper function to wrap a screen with
* one or more debug driver: rbug, trace.
*/
#ifdef GALLIUM_TRACE
#include "trace/tr_public.h"
#endif
#ifdef GALLIUM_RBUG
#include "rbug/rbug_public.h"
#endif
#ifdef GALLIUM_GALAHAD
#include "galahad/glhd_public.h"
#endif
#ifdef GALLIUM_NOOP
#include "noop/noop_public.h"
#endif
/*
* TODO: Audit the following *screen_create() - all of
* them should return the original screen on failuire.
*/
static INLINE struct pipe_screen *
debug_screen_wrap(struct pipe_screen *screen)
{
#if defined(GALLIUM_RBUG)
screen = rbug_screen_create(screen);
#endif
#if defined(GALLIUM_TRACE)
screen = trace_screen_create(screen);
#endif
#if defined(GALLIUM_GALAHAD)
screen = galahad_screen_create(screen);
#endif
#if defined(GALLIUM_NOOP)
screen = noop_screen_create(screen);
#endif
return screen;
}
#endif
|