~mmach/netext73/mesa-haswell

« back to all changes in this revision

Viewing changes to src/gallium/auxiliary/target-helpers/inline_debug_helper.h

  • Committer: mmach
  • Date: 2022-09-22 19:56:13 UTC
  • Revision ID: netbit73@gmail.com-20220922195613-wtik9mmy20tmor0i
2022-09-22 21:17:09

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
#ifndef INLINE_DEBUG_HELPER_H
3
 
#define INLINE_DEBUG_HELPER_H
4
 
 
5
 
#include "pipe/p_compiler.h"
6
 
#include "util/u_debug.h"
7
 
#include "util/u_tests.h"
8
 
 
9
 
 
10
 
/* Helper function to wrap a screen with
11
 
 * one or more debug drivers.
12
 
 */
13
 
 
14
 
#include "driver_ddebug/dd_public.h"
15
 
#include "driver_trace/tr_public.h"
16
 
#include "driver_rbug/rbug_public.h"
17
 
#include "driver_noop/noop_public.h"
18
 
 
19
 
#ifdef __cplusplus
20
 
extern "C" {
21
 
#endif
22
 
 
23
 
/*
24
 
 * TODO: Audit the following *screen_create() - all of
25
 
 * them should return the original screen on failuire.
26
 
 */
27
 
static inline struct pipe_screen *
28
 
debug_screen_wrap(struct pipe_screen *screen)
29
 
{
30
 
   screen = ddebug_screen_create(screen);
31
 
   screen = rbug_screen_create(screen);
32
 
   screen = trace_screen_create(screen);
33
 
   screen = noop_screen_create(screen);
34
 
 
35
 
   if (debug_get_bool_option("GALLIUM_TESTS", FALSE))
36
 
      util_run_tests(screen);
37
 
 
38
 
   return screen;
39
 
}
40
 
 
41
 
#ifdef __cplusplus
42
 
}
43
 
#endif
44
 
 
45
 
#endif // INLINE_DEBUG_HELPER_H