/*1* Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.2* Copyright © 2008 Red Hat, Inc.3*4* Permission is hereby granted, free of charge, to any person obtaining a5* copy of this software and associated documentation files (the "Soft-6* ware"), to deal in the Software without restriction, including without7* limitation the rights to use, copy, modify, merge, publish, distribute,8* and/or sell copies of the Software, and to permit persons to whom the9* Software is furnished to do so, provided that the above copyright10* notice(s) and this permission notice appear in all copies of the Soft-11* ware and that both the above copyright notice(s) and this permission12* notice appear in supporting documentation.13*14* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS15* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-16* ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY17* RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN18* THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE-19* QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,20* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER21* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR-22* MANCE OF THIS SOFTWARE.23*24* Except as contained in this notice, the name of a copyright holder shall25* not be used in advertising or otherwise to promote the sale, use or26* other dealings in this Software without prior written authorization of27* the copyright holder.28*29* Authors:30* Kevin E. Martin <[email protected]>31* Brian Paul <[email protected]>32* Kristian Høgsberg ([email protected])33*/3435#ifndef _DRI_COMMON_H36#define _DRI_COMMON_H3738#ifdef GLX_DIRECT_RENDERING3940#include <GL/internal/dri_interface.h>41#include <stdbool.h>42#include "loader.h"43#include "util/macros.h" /* for PRINTFLIKE */4445typedef struct __GLXDRIconfigPrivateRec __GLXDRIconfigPrivate;4647struct __GLXDRIconfigPrivateRec48{49struct glx_config base;50const __DRIconfig *driConfig;51};5253extern struct glx_config *driConvertConfigs(const __DRIcoreExtension * core,54struct glx_config * modes,55const __DRIconfig ** configs);5657extern void driDestroyConfigs(const __DRIconfig **configs);5859extern __GLXDRIdrawable *60driFetchDrawable(struct glx_context *gc, GLXDrawable glxDrawable);6162extern void63driReleaseDrawables(struct glx_context *gc);6465extern const __DRIextension **driOpenDriver(const char *driverName,66void **out_driver_handle);6768extern bool69dri2_convert_glx_attribs(unsigned num_attribs, const uint32_t *attribs,70unsigned *major_ver, unsigned *minor_ver,71uint32_t *render_type, uint32_t *flags, unsigned *api,72int *reset, int *release, unsigned *error);7374extern bool75dri2_check_no_error(uint32_t flags, struct glx_context *share_context,76int major, unsigned *error);777879extern struct glx_context *80dri_common_create_context(struct glx_screen *base,81struct glx_config *config_base,82struct glx_context *shareList,83int renderType);8485#endif /* GLX_DIRECT_RENDERING */8687#endif /* _DRI_COMMON_H */888990