1079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis/*
2079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
3079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * Copyright © 2008 Red Hat, Inc.
4079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis *
5079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * Permission is hereby granted, free of charge, to any person obtaining a
6079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * copy of this software and associated documentation files (the "Soft-
7079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * ware"), to deal in the Software without restriction, including without
8079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * limitation the rights to use, copy, modify, merge, publish, distribute,
9079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * and/or sell copies of the Software, and to permit persons to whom the
10079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * Software is furnished to do so, provided that the above copyright
11079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * notice(s) and this permission notice appear in all copies of the Soft-
12079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * ware and that both the above copyright notice(s) and this permission
13079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * notice appear in supporting documentation.
14079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis *
15079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
16079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
17079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY
18079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN
19079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE-
20079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
21079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
22079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR-
23079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * MANCE OF THIS SOFTWARE.
24079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis *
25079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * Except as contained in this notice, the name of a copyright holder shall
26079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * not be used in advertising or otherwise to promote the sale, use or
27079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * other dealings in this Software without prior written authorization of
28079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * the copyright holder.
29079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis *
30079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis * Authors:
31079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis *   Kevin E. Martin <kevin@precisioninsight.com>
32079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis *   Brian Paul <brian@precisioninsight.com>
33079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis *   Kristian Høgsberg (krh@redhat.com)
34079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis */
35079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis
36079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis#ifndef _DRI_COMMON_H
37079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis#define _DRI_COMMON_H
38079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis
397a66e549583a3168f05acc7df1e872d218fd670dKristian Høgsberg#include <GL/internal/dri_interface.h>
40b45f77dc4c9662a774c19db764bb8f95c4f61073Ian Romanick#include <stdbool.h>
417a66e549583a3168f05acc7df1e872d218fd670dKristian Høgsberg
4209c889b31809acc2e76db770e6e9a5895c484f08RALOVICH, Kristóftypedef struct __GLXDRIconfigPrivateRec __GLXDRIconfigPrivate;
43079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis
4409c889b31809acc2e76db770e6e9a5895c484f08RALOVICH, Kristófstruct __GLXDRIconfigPrivateRec
4509c889b31809acc2e76db770e6e9a5895c484f08RALOVICH, Kristóf{
466ddf66e9230ee862ac341c4767cf6b3b2dd2552bKristian Høgsberg   struct glx_config base;
4709c889b31809acc2e76db770e6e9a5895c484f08RALOVICH, Kristóf   const __DRIconfig *driConfig;
48079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis};
49079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis
506ddf66e9230ee862ac341c4767cf6b3b2dd2552bKristian Høgsbergextern struct glx_config *driConvertConfigs(const __DRIcoreExtension * core,
516ddf66e9230ee862ac341c4767cf6b3b2dd2552bKristian Høgsberg                                           struct glx_config * modes,
5209c889b31809acc2e76db770e6e9a5895c484f08RALOVICH, Kristóf                                           const __DRIconfig ** configs);
53079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis
54bab13969d8bf3ff9259524c3f4ab96d81485ccefKristian Høgsbergextern void driDestroyConfigs(const __DRIconfig **configs);
55bab13969d8bf3ff9259524c3f4ab96d81485ccefKristian Høgsberg
56c491e585e43d48a2aeec96ccc4008da6c443fb42Kristian Høgsbergextern __GLXDRIdrawable *
57c491e585e43d48a2aeec96ccc4008da6c443fb42Kristian HøgsbergdriFetchDrawable(struct glx_context *gc, GLXDrawable glxDrawable);
58c491e585e43d48a2aeec96ccc4008da6c443fb42Kristian Høgsberg
5916887d042a917fa4773e4d853f50051b54e9948cKristian Høgsbergextern void
6016887d042a917fa4773e4d853f50051b54e9948cKristian HøgsbergdriReleaseDrawables(struct glx_context *gc);
6116887d042a917fa4773e4d853f50051b54e9948cKristian Høgsberg
62079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzisextern const __DRIsystemTimeExtension systemTimeExtension;
63079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis
64079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzisextern void InfoMessageF(const char *f, ...);
65079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis
66079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzisextern void ErrorMessageF(const char *f, ...);
67079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis
6892bef0bfa121e0e58112ffae352c8ad9e5da6307Carl Worthextern void CriticalErrorMessageF(const char *f, ...);
6992bef0bfa121e0e58112ffae352c8ad9e5da6307Carl Worth
70079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzisextern void *driOpenDriver(const char *driverName);
71079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis
72b45f77dc4c9662a774c19db764bb8f95c4f61073Ian Romanickextern bool
73b45f77dc4c9662a774c19db764bb8f95c4f61073Ian Romanickdri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs,
74b45f77dc4c9662a774c19db764bb8f95c4f61073Ian Romanick			 unsigned *major_ver, unsigned *minor_ver,
75a8724d85f8cb2f0fb73b9c6c1f268f9084c6d473Ian Romanick			 uint32_t *flags, unsigned *api, int *reset,
76a8724d85f8cb2f0fb73b9c6c1f268f9084c6d473Ian Romanick			 unsigned *error);
77b45f77dc4c9662a774c19db764bb8f95c4f61073Ian Romanick
78079345703901b497f2c09714051b33bb2dff1b4fGeorge Sapountzis#endif /* _DRI_COMMON_H */
79