1f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org/* 2f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. 3f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Copyright © 2008 Red Hat, Inc. 4f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * 5f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Permission is hereby granted, free of charge, to any person obtaining a 6f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * copy of this software and associated documentation files (the "Soft- 7f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * ware"), to deal in the Software without restriction, including without 8f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * limitation the rights to use, copy, modify, merge, publish, distribute, 9f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * and/or sell copies of the Software, and to permit persons to whom the 10f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Software is furnished to do so, provided that the above copyright 11f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * notice(s) and this permission notice appear in all copies of the Soft- 12f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * ware and that both the above copyright notice(s) and this permission 13f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * notice appear in supporting documentation. 14f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * 15f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- 17f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY 18f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN 19f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- 20f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 21f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 22f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR- 23f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * MANCE OF THIS SOFTWARE. 24f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * 25f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Except as contained in this notice, the name of a copyright holder shall 26f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * not be used in advertising or otherwise to promote the sale, use or 27f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * other dealings in this Software without prior written authorization of 28f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * the copyright holder. 29f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * 30f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Authors: 31f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Kevin E. Martin <kevin@precisioninsight.com> 32f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Brian Paul <brian@precisioninsight.com> 33f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org * Kristian Høgsberg (krh@redhat.com) 34f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org */ 35f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 36f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#ifndef _DRI_COMMON_H 37f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#define _DRI_COMMON_H 38f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 39f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#include <GL/internal/dri_interface.h> 40f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#include <stdbool.h> 41f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 42f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgtypedef struct __GLXDRIconfigPrivateRec __GLXDRIconfigPrivate; 43f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 44f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgstruct __GLXDRIconfigPrivateRec 45f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org{ 46f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org struct glx_config base; 47f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org const __DRIconfig *driConfig; 48f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org}; 49f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 50f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern struct glx_config *driConvertConfigs(const __DRIcoreExtension * core, 51f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org struct glx_config * modes, 52f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org const __DRIconfig ** configs); 53f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 54f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern void driDestroyConfigs(const __DRIconfig **configs); 55f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 56f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern __GLXDRIdrawable * 57f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgdriFetchDrawable(struct glx_context *gc, GLXDrawable glxDrawable); 58f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 59f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern void 60f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgdriReleaseDrawables(struct glx_context *gc); 61f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 62f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern const __DRIsystemTimeExtension systemTimeExtension; 63f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 64f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern void InfoMessageF(const char *f, ...); 65f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 66f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern void ErrorMessageF(const char *f, ...); 67f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 68f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern void CriticalErrorMessageF(const char *f, ...); 69f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 70f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern void *driOpenDriver(const char *driverName); 71f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 72f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgextern bool 73f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.orgdri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs, 74f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org unsigned *major_ver, unsigned *minor_ver, 75f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org uint32_t *flags, unsigned *api, int *reset, 76f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org unsigned *error); 77f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org 78f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org#endif /* _DRI_COMMON_H */ 79f2ba7591b1407a7ee9209f842c50696914dc2dedkbr@chromium.org