Debian Codegraph @

src/gallium/winsys/svga/drm/vmw_context.h

raw
1 /*
2 * Copyright (c) 2009-2024 Broadcom. All Rights Reserved.
3 * The term “Broadcom” refers to Broadcom Inc.
4 * and/or its subsidiaries.
5 * SPDX-License-Identifier: MIT
6 */
7
8 /**
9 * @author Jose Fonseca <[email protected]>
10 */
11
12
13 #ifndef VMW_CONTEXT_H_
14 #define VMW_CONTEXT_H_
15
16 #include <stdio.h>
17 #include "util/compiler.h"
18
19 struct svga_winsys_screen;
20 struct svga_winsys_context;
21 struct pipe_context;
22 struct pipe_screen;
23
24
25 /** Set to 1 to get extra debug info/output */
26 #define VMW_DEBUG 0
27
28 #if VMW_DEBUG
29 #define vmw_printf debug_printf
30 #define VMW_FUNC debug_printf("%s\n", __func__)
31 #else
32 #define VMW_FUNC
33 #define vmw_printf(...)
34 #endif
35
36
37 /**
38 * Called when an error/failure is encountered.
39 * We want these messages reported for all build types.
40 */
41 #define vmw_error(...) fprintf(stderr, "VMware: " __VA_ARGS__)
42
43
44 struct svga_winsys_context *
45 vmw_svga_winsys_context_create(struct svga_winsys_screen *sws);
46
47 struct vmw_svga_winsys_surface;
48
49
50 void
51 vmw_swc_surface_clear_reference(struct svga_winsys_context *swc,
52 struct vmw_svga_winsys_surface *vsurf);
53
54 void
55 vmw_swc_unref(struct svga_winsys_context *swc);
56
57 void
58 vmw_swc_surface_clear_userspace_id(struct svga_winsys_context *swc,
59 uint32_t sid);
60
61 uint32_t
62 vmw_swc_surface_add_userspace_id(struct svga_winsys_context *swc);
63
64 #endif /* VMW_CONTEXT_H_ */