Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/mesa
Path: blob/21.2-virgl/src/glx/dri_common.h
4558 views
1
/*
2
* Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
3
* Copyright © 2008 Red Hat, Inc.
4
*
5
* Permission is hereby granted, free of charge, to any person obtaining a
6
* copy of this software and associated documentation files (the "Soft-
7
* ware"), to deal in the Software without restriction, including without
8
* limitation the rights to use, copy, modify, merge, publish, distribute,
9
* and/or sell copies of the Software, and to permit persons to whom the
10
* Software is furnished to do so, provided that the above copyright
11
* notice(s) and this permission notice appear in all copies of the Soft-
12
* ware and that both the above copyright notice(s) and this permission
13
* notice appear in supporting documentation.
14
*
15
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
17
* ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY
18
* RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN
19
* THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE-
20
* QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
21
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
22
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR-
23
* MANCE OF THIS SOFTWARE.
24
*
25
* Except as contained in this notice, the name of a copyright holder shall
26
* not be used in advertising or otherwise to promote the sale, use or
27
* other dealings in this Software without prior written authorization of
28
* the copyright holder.
29
*
30
* Authors:
31
* Kevin E. Martin <[email protected]>
32
* Brian Paul <[email protected]>
33
* Kristian Høgsberg ([email protected])
34
*/
35
36
#ifndef _DRI_COMMON_H
37
#define _DRI_COMMON_H
38
39
#ifdef GLX_DIRECT_RENDERING
40
41
#include <GL/internal/dri_interface.h>
42
#include <stdbool.h>
43
#include "loader.h"
44
#include "util/macros.h" /* for PRINTFLIKE */
45
46
typedef struct __GLXDRIconfigPrivateRec __GLXDRIconfigPrivate;
47
48
struct __GLXDRIconfigPrivateRec
49
{
50
struct glx_config base;
51
const __DRIconfig *driConfig;
52
};
53
54
extern struct glx_config *driConvertConfigs(const __DRIcoreExtension * core,
55
struct glx_config * modes,
56
const __DRIconfig ** configs);
57
58
extern void driDestroyConfigs(const __DRIconfig **configs);
59
60
extern __GLXDRIdrawable *
61
driFetchDrawable(struct glx_context *gc, GLXDrawable glxDrawable);
62
63
extern void
64
driReleaseDrawables(struct glx_context *gc);
65
66
extern const __DRIextension **driOpenDriver(const char *driverName,
67
void **out_driver_handle);
68
69
extern bool
70
dri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs,
71
unsigned *major_ver, unsigned *minor_ver,
72
uint32_t *render_type, uint32_t *flags, unsigned *api,
73
int *reset, int *release, unsigned *error);
74
75
extern bool
76
dri2_check_no_error(uint32_t flags, struct glx_context *share_context,
77
int major, unsigned *error);
78
79
80
extern struct glx_context *
81
dri_common_create_context(struct glx_screen *base,
82
struct glx_config *config_base,
83
struct glx_context *shareList,
84
int renderType);
85
86
#endif /* GLX_DIRECT_RENDERING */
87
88
#endif /* _DRI_COMMON_H */
89
90