14642e01fSmrg#ifdef HAVE_DIX_CONFIG_H 24642e01fSmrg#include <dix-config.h> 34642e01fSmrg#endif 44642e01fSmrg 54642e01fSmrg#ifndef _GLX_screens_h_ 64642e01fSmrg#define _GLX_screens_h_ 74642e01fSmrg 84642e01fSmrg/* 94642e01fSmrg * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) 104642e01fSmrg * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. 114642e01fSmrg * 124642e01fSmrg * Permission is hereby granted, free of charge, to any person obtaining a 134642e01fSmrg * copy of this software and associated documentation files (the "Software"), 144642e01fSmrg * to deal in the Software without restriction, including without limitation 154642e01fSmrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 164642e01fSmrg * and/or sell copies of the Software, and to permit persons to whom the 174642e01fSmrg * Software is furnished to do so, subject to the following conditions: 184642e01fSmrg * 194642e01fSmrg * The above copyright notice including the dates of first publication and 204642e01fSmrg * either this permission notice or a reference to 214642e01fSmrg * http://oss.sgi.com/projects/FreeB/ 224642e01fSmrg * shall be included in all copies or substantial portions of the Software. 234642e01fSmrg * 244642e01fSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 254642e01fSmrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 264642e01fSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 274642e01fSmrg * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 284642e01fSmrg * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF 294642e01fSmrg * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 304642e01fSmrg * SOFTWARE. 314642e01fSmrg * 324642e01fSmrg * Except as contained in this notice, the name of Silicon Graphics, Inc. 334642e01fSmrg * shall not be used in advertising or otherwise to promote the sale, use or 344642e01fSmrg * other dealings in this Software without prior written authorization from 354642e01fSmrg * Silicon Graphics, Inc. 364642e01fSmrg */ 374642e01fSmrg 381b5d61b8Smrg#include "extension_string.h" 391b5d61b8Smrg#include "glxvndabi.h" 401b5d61b8Smrg 414642e01fSmrgtypedef struct __GLXconfig __GLXconfig; 424642e01fSmrgstruct __GLXconfig { 431b5d61b8Smrg /* Management */ 444642e01fSmrg __GLXconfig *next; 451b5d61b8Smrg#ifdef COMPOSITE 461b5d61b8Smrg GLboolean duplicatedForComp; 471b5d61b8Smrg#endif 484642e01fSmrg GLuint doubleBufferMode; 494642e01fSmrg GLuint stereoMode; 504642e01fSmrg 5135c4bbdfSmrg GLint redBits, greenBits, blueBits, alphaBits; /* bits per comp */ 524642e01fSmrg GLuint redMask, greenMask, blueMask, alphaMask; 5335c4bbdfSmrg GLint rgbBits; /* total bits for rgb */ 5435c4bbdfSmrg GLint indexBits; /* total bits for colorindex */ 554642e01fSmrg 564642e01fSmrg GLint accumRedBits, accumGreenBits, accumBlueBits, accumAlphaBits; 574642e01fSmrg GLint depthBits; 584642e01fSmrg GLint stencilBits; 594642e01fSmrg 604642e01fSmrg GLint numAuxBuffers; 614642e01fSmrg 624642e01fSmrg GLint level; 634642e01fSmrg 644642e01fSmrg /* GLX */ 654642e01fSmrg GLint visualID; 6635c4bbdfSmrg GLint visualType; /**< One of the GLX X visual types. (i.e., 674642e01fSmrg * \c GLX_TRUE_COLOR, etc.) 684642e01fSmrg */ 694642e01fSmrg 704642e01fSmrg /* EXT_visual_rating / GLX 1.2 */ 714642e01fSmrg GLint visualRating; 724642e01fSmrg 734642e01fSmrg /* EXT_visual_info / GLX 1.2 */ 744642e01fSmrg GLint transparentPixel; 7535c4bbdfSmrg /* colors are floats scaled to ints */ 764642e01fSmrg GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha; 774642e01fSmrg GLint transparentIndex; 784642e01fSmrg 794642e01fSmrg /* ARB_multisample / SGIS_multisample */ 804642e01fSmrg GLint sampleBuffers; 814642e01fSmrg GLint samples; 824642e01fSmrg 834642e01fSmrg /* SGIX_fbconfig / GLX 1.3 */ 844642e01fSmrg GLint drawableType; 854642e01fSmrg GLint renderType; 864642e01fSmrg GLint fbconfigID; 874642e01fSmrg 884642e01fSmrg /* SGIX_pbuffer / GLX 1.3 */ 894642e01fSmrg GLint maxPbufferWidth; 904642e01fSmrg GLint maxPbufferHeight; 914642e01fSmrg GLint maxPbufferPixels; 9235c4bbdfSmrg GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */ 9335c4bbdfSmrg GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */ 944642e01fSmrg 954642e01fSmrg /* SGIX_visual_select_group */ 964642e01fSmrg GLint visualSelectGroup; 974642e01fSmrg 984642e01fSmrg /* OML_swap_method */ 994642e01fSmrg GLint swapMethod; 1004642e01fSmrg 1014642e01fSmrg /* EXT_texture_from_pixmap */ 1024642e01fSmrg GLint bindToTextureRgb; 1034642e01fSmrg GLint bindToTextureRgba; 1044642e01fSmrg GLint bindToMipmapTexture; 1054642e01fSmrg GLint bindToTextureTargets; 1064642e01fSmrg GLint yInverted; 10735c4bbdfSmrg 10835c4bbdfSmrg /* ARB_framebuffer_sRGB */ 10935c4bbdfSmrg GLint sRGBCapable; 1104642e01fSmrg}; 1114642e01fSmrg 1124642e01fSmrgGLint glxConvertToXVisualType(int visualType); 1134642e01fSmrg 1144642e01fSmrg/* 1154642e01fSmrg** Screen dependent data. These methods are the interface between the DIX 1164642e01fSmrg** and DDX layers of the GLX server extension. The methods provide an 1174642e01fSmrg** interface for context management on a screen. 1184642e01fSmrg*/ 119c2166491Schristos#ifndef __GLXscreen 120c2166491Schristos#define __GLXscreen __GLXscreen 1214642e01fSmrgtypedef struct __GLXscreen __GLXscreen; 122c2166491Schristos#endif 1234642e01fSmrgstruct __GLXscreen { 12435c4bbdfSmrg void (*destroy) (__GLXscreen * screen); 12535c4bbdfSmrg 12635c4bbdfSmrg __GLXcontext *(*createContext) (__GLXscreen * screen, 12735c4bbdfSmrg __GLXconfig * modes, 12835c4bbdfSmrg __GLXcontext * shareContext, 12935c4bbdfSmrg unsigned num_attribs, 13035c4bbdfSmrg const uint32_t *attribs, 13135c4bbdfSmrg int *error); 13235c4bbdfSmrg 13335c4bbdfSmrg __GLXdrawable *(*createDrawable) (ClientPtr client, 13435c4bbdfSmrg __GLXscreen * context, 13535c4bbdfSmrg DrawablePtr pDraw, 13635c4bbdfSmrg XID drawId, 13735c4bbdfSmrg int type, 13835c4bbdfSmrg XID glxDrawId, __GLXconfig * modes); 13935c4bbdfSmrg int (*swapInterval) (__GLXdrawable * drawable, int interval); 1404642e01fSmrg 1414642e01fSmrg ScreenPtr pScreen; 1424642e01fSmrg 1434642e01fSmrg /* Linked list of valid fbconfigs for this screen. */ 1444642e01fSmrg __GLXconfig *fbconfigs; 1454642e01fSmrg int numFBConfigs; 1464642e01fSmrg 1474642e01fSmrg /* Subset of fbconfigs that are exposed as GLX visuals. */ 1484642e01fSmrg __GLXconfig **visuals; 1494642e01fSmrg GLint numVisuals; 1504642e01fSmrg 1514642e01fSmrg char *GLextensions; 1524642e01fSmrg char *GLXextensions; 1531b5d61b8Smrg char *glvnd; 1541b5d61b8Smrg unsigned char glx_enable_bits[__GLX_EXT_BYTES]; 1556747b715Smrg 15635c4bbdfSmrg Bool (*CloseScreen) (ScreenPtr pScreen); 1574642e01fSmrg}; 1584642e01fSmrg 15935c4bbdfSmrgvoid __glXScreenInit(__GLXscreen * screen, ScreenPtr pScreen); 16035c4bbdfSmrgvoid __glXScreenDestroy(__GLXscreen * screen); 1614642e01fSmrg 16235c4bbdfSmrg#endif /* !__GLX_screens_h__ */ 163