1848b8605Smrg/* 2848b8605Smrg * Copyright © 2008 Red Hat, Inc. 3848b8605Smrg * 4848b8605Smrg * Permission is hereby granted, free of charge, to any person obtaining a 5848b8605Smrg * copy of this software and associated documentation files (the "Soft- 6848b8605Smrg * ware"), to deal in the Software without restriction, including without 7848b8605Smrg * limitation the rights to use, copy, modify, merge, publish, distribute, 8848b8605Smrg * and/or sell copies of the Software, and to permit persons to whom the 9848b8605Smrg * Software is furnished to do so, provided that the above copyright 10848b8605Smrg * notice(s) and this permission notice appear in all copies of the Soft- 11848b8605Smrg * ware and that both the above copyright notice(s) and this permission 12848b8605Smrg * notice appear in supporting documentation. 13848b8605Smrg * 14848b8605Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 15848b8605Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- 16848b8605Smrg * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY 17848b8605Smrg * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN 18848b8605Smrg * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE- 19848b8605Smrg * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 20848b8605Smrg * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 21848b8605Smrg * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR- 22848b8605Smrg * MANCE OF THIS SOFTWARE. 23848b8605Smrg * 24848b8605Smrg * Except as contained in this notice, the name of a copyright holder shall 25848b8605Smrg * not be used in advertising or otherwise to promote the sale, use or 26848b8605Smrg * other dealings in this Software without prior written authorization of 27848b8605Smrg * the copyright holder. 28848b8605Smrg * 29848b8605Smrg * Authors: 30848b8605Smrg * Kristian Høgsberg (krh@redhat.com) 31848b8605Smrg */ 32848b8605Smrg 33b8e80941Smrg#ifndef DRI2_PRIV_H 34b8e80941Smrg#define DRI2_PRIV_H 35b8e80941Smrg 36b8e80941Smrg#ifdef __cplusplus 37b8e80941Smrgextern "C" { 38b8e80941Smrg#endif 39b8e80941Smrg 40848b8605Smrgstruct dri2_screen { 41848b8605Smrg struct glx_screen base; 42848b8605Smrg 43848b8605Smrg __DRIscreen *driScreen; 44848b8605Smrg __GLXDRIscreen vtable; 45848b8605Smrg const __DRIdri2Extension *dri2; 46848b8605Smrg const __DRIcoreExtension *core; 47848b8605Smrg 48848b8605Smrg const __DRI2flushExtension *f; 49848b8605Smrg const __DRI2configQueryExtension *config; 50848b8605Smrg const __DRItexBufferExtension *texBuffer; 51848b8605Smrg const __DRI2throttleExtension *throttle; 52848b8605Smrg const __DRI2rendererQueryExtension *rendererQuery; 53b8e80941Smrg const __DRI2interopExtension *interop; 54848b8605Smrg const __DRIconfig **driver_configs; 55848b8605Smrg 56848b8605Smrg void *driver; 57848b8605Smrg int fd; 58848b8605Smrg 59848b8605Smrg int show_fps_interval; 60848b8605Smrg}; 61b8e80941Smrg 62b8e80941Smrgstruct dri2_context 63b8e80941Smrg{ 64b8e80941Smrg struct glx_context base; 65b8e80941Smrg __DRIcontext *driContext; 66b8e80941Smrg}; 67b8e80941Smrg 68b8e80941Smrg_X_HIDDEN int 69b8e80941Smrgdri2_query_renderer_integer(struct glx_screen *base, int attribute, 70b8e80941Smrg unsigned int *value); 71b8e80941Smrg 72b8e80941Smrg_X_HIDDEN int 73b8e80941Smrgdri2_query_renderer_string(struct glx_screen *base, int attribute, 74b8e80941Smrg const char **value); 75b8e80941Smrg 76b8e80941Smrg_X_HIDDEN int 77b8e80941Smrgdri2_interop_query_device_info(struct glx_context *ctx, 78b8e80941Smrg struct mesa_glinterop_device_info *out); 79b8e80941Smrg 80b8e80941Smrg_X_HIDDEN int 81b8e80941Smrgdri2_interop_export_object(struct glx_context *ctx, 82b8e80941Smrg struct mesa_glinterop_export_in *in, 83b8e80941Smrg struct mesa_glinterop_export_out *out); 84b8e80941Smrg 85b8e80941Smrg#ifdef __cplusplus 86b8e80941Smrg} 87b8e80941Smrg#endif 88b8e80941Smrg 89b8e80941Smrg#endif 90