From 52011cfedaa930d61d8f60b283a2051093727582 Mon Sep 17 00:00:00 2001 From: marha Date: Sun, 22 May 2011 13:28:34 +0000 Subject: xserver xkeyboard-config libX11 randrproto pixman glproto mesa git update 22 May 2011 --- X11/extensions/randrproto.txt | 5241 ++++--- gl/configure.ac | 26 +- gl/glxproto.h | 5364 +++---- libX11/specs/libX11/CH01.xml | 2 +- libX11/specs/libX11/CH03.xml | 2 +- libX11/specs/libX11/CH06.xml | 2 +- libX11/specs/libX11/CH07.xml | 2 +- libX11/specs/libX11/CH08.xml | 6 +- libX11/specs/libX11/CH09.xml | 9 +- libX11/specs/libX11/CH10.xml | 4 +- libX11/specs/libX11/CH13.xml | 40 +- libX11/specs/libX11/CH14.xml | 20 +- libX11/src/xcb_io.c | 96 +- mesalib/configs/autoconf.in | 442 +- mesalib/configs/default | 2 + mesalib/configure.ac | 3948 ++--- mesalib/docs/relnotes-7.11.html | 171 +- mesalib/include/EGL/eglext.h | 796 +- mesalib/src/glsl/Makefile | 426 +- mesalib/src/mapi/glapi/gen/gl_table.py | 15 +- mesalib/src/mesa/Makefile | 460 +- mesalib/src/mesa/main/api_validate.c | 34 +- mesalib/src/mesa/main/arrayobj.c | 5 +- mesalib/src/mesa/main/blend.c | 1666 +- mesalib/src/mesa/main/blend.h | 2 +- mesalib/src/mesa/main/bufferobj.c | 15 +- mesalib/src/mesa/main/es_generator.py | 4 + mesalib/src/mesa/main/extensions.c | 2007 +-- mesalib/src/mesa/main/glapidispatch.h | 17084 +++++++++++++++------ mesalib/src/mesa/main/texgetimage.c | 1899 +-- mesalib/src/mesa/state_tracker/st_atom.c | 1 + mesalib/src/mesa/state_tracker/st_atom.h | 1 + mesalib/src/mesa/state_tracker/st_atom_sampler.c | 543 +- mesalib/src/mesa/state_tracker/st_atom_texture.c | 756 +- mesalib/src/mesa/state_tracker/st_cb_fbo.c | 1 + mesalib/src/mesa/swrast/s_span.c | 3025 ++-- mesalib/src/mesa/swrast/s_texcombine.c | 1490 +- mesalib/src/mesa/swrast/s_texfilter.c | 7025 +++++---- pixman/pixman/Makefile.am | 257 +- pixman/pixman/pixman-bits-image.c | 31 +- pixman/pixman/pixman-cpu.c | 1224 +- pixman/pixman/pixman-implementation.c | 20 +- pixman/pixman/pixman-noop.c | 148 + pixman/pixman/pixman-private.h | 3 + pixman/pixman/pixman.c | 2432 ++- xorg-server/doc/dtrace/Xserver-DTrace.xml | 1 - xorg-server/hw/xfree86/doc/README.DRIcomp | 1110 +- xorg-server/xkeyboard-config/symbols/cm | 662 +- 48 files changed, 33298 insertions(+), 25222 deletions(-) create mode 100644 pixman/pixman/pixman-noop.c diff --git a/X11/extensions/randrproto.txt b/X11/extensions/randrproto.txt index 20cac7562..746342046 100644 --- a/X11/extensions/randrproto.txt +++ b/X11/extensions/randrproto.txt @@ -1,2623 +1,2618 @@ - The X Resize, Rotate and Reflect Extension - Version 1.4.0 - 2009-10-5 - - Jim Gettys - Jim.Gettys@hp.com - Cambridge Research Laboratory - HP Labs - Hewlett Packard Company - - Keith Packard - keith.packard@intel.com - Open Source Technology Center - Intel Corporation - -1. Introduction - -The X Resize, Rotate and Reflect Extension, called RandR for short, -brings the ability to resize, rotate and reflect the root window of a -screen. It is based on the X Resize and Rotate Extension as specified -in the Proceedings of the 2001 Usenix Technical Conference [RANDR]. - -RandR as implemented and integrated into the X server differs in -one substantial fashion from the design discussed in that paper: that -is, RandR 1.0 does not implement the depth switching described in that -document, and the support described for that in the protocol in that -document and in the implementation has been removed from the -protocol described here, as it has been overtaken by events. - -These events include: - ► Modern toolkits (in this case, GTK+ 2.x) have progressed to the point - of implementing migration between screens of arbitrary depths - ► The continued advance of Moore's law has made limited amounts of VRAM - less of an issue, reducing the pressure to implement depth switching - on laptops or desktop systems - ► The continued decline of legacy toolkits whose design would have - required depth switching to support migration - ► The lack of depth switching implementation experience in the - intervening time, due to events beyond our control - -Additionally, the requirement to support depth switching might -complicate other re-engineering of the device independent part of the -X server that is currently being contemplated. - -Rather than further delaying RandR's widespread deployment for a feature -long wanted by the community (resizing of screens, particularly on laptops), -or the deployment of a protocol design that might be flawed due to lack of -implementation experience, we decided to remove depth switching from the -protocol. It may be implemented at a later time if resources and -interests permit as a revision to the protocol described here, which will -remain a stable base for applications. The protocol described here has been -implemented in the main X.org server, and more fully in the hw/kdrive -implementation in the distribution, which fully implements resizing, -rotation and reflection. - -1.2 Introduction to version 1.2 of the extension - -One of the significant limitations found in version 1.1 of the RandR -protocol was the inability to deal with the Xinerama model where multiple -monitors display portions of a common underlying screen. In this environment, -zero or more video outputs are associated with each CRT controller which -defines both a set of video timings and a 'viewport' within the larger -screen. This viewport is independent of the overall size of the screen, and -may be located anywhere within the screen. - -The effect is to decouple the reported size of the screen from the size -presented by each video output, and to permit multiple outputs to present -information for a single screen. - -To extend RandR for this model, we separate out the output, CRTC and screen -configuration information and permit them to be configured separately. For -compatibility with the 1.1 version of the protocol, we make the 1.1 requests -simultaneously affect both the screen and the (presumably sole) CRTC and -output. The set of available outputs are presented with UTF-8 encoded names -and may be connected to CRTCs as permitted by the underlying hardware. CRTC -configuration is now done with full mode information instead of just size -and refresh rate, and these modes have names. These names also use UTF-8 -encoding. New modes may also be added by the user. - -Additional requests and events are provided for this new functionality. - - ┌────────────────────────────────┬──────────┐ - ┏━━━━━━━┳───────────────┐ ╔════════╗ ╔════════╗ - ┃ 1 ┃ │ ║ A ║ ║ B ║ - ┃ ┏━━━╋━━━━━━━━━━━━━━━┫ ║ ║ ║ ║ - ┣━━━╋━━━┛ ┃ ╚════════╝ ╚════════╝ - │ ┃ 2 ┃─────────────────┐ - │ ┃ ┃ ╔═══════════════════╗ - │ ┃ ┃ ║ ║ - │ ┗━━━━━━━━━━━━━━━━━━━┫ ║ C ║ - └───────────────────────┘ ║ ║ - ┌──────┐ ┏━━━━┓ ╔══════╗ ║ ║ - │screen│ ┃CRTC┃ ║output║ ╚═══════════════════╝ - └──────┘ ┗━━━━┛ ╚══════╝ - -In this picture, the screen is covered (incompletely) by two CRTCs. CRTC1 -is connected to two outputs, A and B. CRTC2 is connected to output C. -Outputs A and B will present exactly the same region of the screen using -the same mode line. Output C will present a different (larger) region of -the screen using a different mode line. - -RandR provides information about each available CRTC and output; the -connection between CRTC and output is under application control, although -the hardware will probably impose restrictions on the possible -configurations. The protocol doesn't try to describe these restrictions, -instead it provides a mechanism to find out what combinations are supported. - -For instance, dual-link DVI gangs two CRTC outputs together to provide higher -bandwidth for large resolution screens. This is exposed in RandR by -requiring that nothing be connected to the second CRTC when driving a high -resolution screen on the first. - -1.3 Introduction to version 1.3 of the extension - -Version 1.3 builds on the changes made with version 1.2 and adds some new -capabilities without fundmentally changing the extension again. The -following features are added in this version: - - • Projective Transforms. The implementation work for general rotation - support made it trivial to add full projective transformations. These - can be used to scale the screen up/down as well as perform projector - keystone correct or other effects. - - • Panning. It was removed with RandR 1.2 because the old semantics didn't - fit any longer. With RandR 1.3 panning can be specified per crtc. - -1.4 Introduction to version 1.4 of the extension - -Version 1.4 adds a couple more capabilities to further expose the -underlying hardware to clients - - • Per-crtc pixmaps. This provides for multiple scan-out buffers - which applications can create and assign to arbitrary collections - of crtcs. - - • Sprite position and image transforms. These provide a projective - transform for both the hot spot location and the sprite image - itself for each CRTC. - - • RRSetCrtcConfigs request. This supplies a set of - crtc configurations to the server that must be applied together - or not at all. This can reduce screen flicker while also - providing the server a complete configuration for appropriate - resource management. - -The first two additions, per-crtc pixmaps and sprite transforms are -designed to solve two problems: - - 1) Screen transforms. The software transform code in the X server - uses a shadow frame buffer, adding another copy to every graphics - operation. Worse, the server has no idea about when clients are - done drawing a frame, so the user gets additional latency and - judder. - - The goal is to move this operation out to the compositing manager - which already deals with an extra copy of the frame buffer for - many operations. Have the compositing manager create and draw to a - separate pixmap for scanout. It can perform whatever transforms - are required to get the image in the right orientation for the - user. - - 2) Hardware scanout engine size limits. With a single scanout buffer - for the entire screen, it's possible for the user to ask for a - configuration which requires that scanout buffer to be larger than - the hardware is capable of scanning out from. Again, having the - compositing manager create a pixmap for each CRTC will allow for - any configuration where monitor position within the virtual space - isn't limited by the scanout limits. - -In both of these cases, the Sprite transforms are necessary to ensure -that the sprite appears at the desired spot on each CRTC and with the -right shape. - -1.99 Acknowledgements - -Our thanks to the contributors to the design found on the xpert mailing -list, in particular: - -Alan Hourihane for work on the early implementation -Andrew C. Aitchison for help with the XFree86 DDX implementation -Andy Ritger for early questions about how mergefb/Xinerama work with RandR -Carl Worth for editing the specification and Usenix paper -David Dawes for XFree86 DDX integration work -Thomas Winischhofer for the hardware-accelerated SiS rotation implementation -Matthew Tippett and Kevin Martin for splitting outputs and CRTCs to more -fully expose what video hardware can do - - ❧❧❧❧❧❧❧❧❧❧❧ - -2. Screen change model - -Screens may change dynamically, either under control of this extension, or -due to external events. Examples include: monitors being swapped, pressing a -button to switch from internal display to an external monitor on a laptop, -or, eventually, the hotplug of a display card entirely on busses such as -Cardbus or Express Card which permit hot-swap (which will require other work -in addition to this extension). - -Since the screen configuration is dynamic and asynchronous to the client and -may change at any time RandR provides mechanisms to ensure that your clients -view is up to date with the configuration possibilities of the moment and -enforces applications that wish to control the configuration to prove that -their information is up to date before honoring requests to change the -screen configuration (by requiring a timestamp on the request). - -Interested applications are notified whenever the screen configuration -changes, providing the current size of the screen and subpixel order (see -the Render extension [RENDER]), to enable proper rendering of subpixel -decimated client text to continue, along with a time stamp of the -configuration change. A client must refresh its knowledge of the screen -configuration before attempting to change the configuration after a -notification, or the request will fail. - -To avoid multiplicative explosion between orientation, reflection and sizes, -the sizes are only those sizes in the normal (0) rotation. - -Rotation and reflection and how they interact can be confusing. In Randr, -the coordinate system is rotated in a counter-clockwise direction relative -to the normal orientation. Reflection is along the window system coordinate -system, not the physical screen X and Y axis, so that rotation and -reflection do not interact. The other way to consider reflection is to is -specified in the "normal" orientation, before rotation, if you find the -other way confusing. - -We expect that most clients and toolkits will be oblivious to changes to the -screen structure, as they generally use the values in the connections Display -structure directly. By toolkits updating the values on the fly, we believe -pop-up menus and other pop up windows will position themselves correctly in -the face of screen configuration changes (the issue is ensuring that pop-ups -are visible on the reconfigured screen). - - ❧❧❧❧❧❧❧❧❧❧❧ - -3. Data Types - -The subpixel order is shared with the Render extension, and is documented -there. The only datatype defined is the screen size, defined in the normal -(0 degree) orientation. - - ❧❧❧❧❧❧❧❧❧❧❧ - -4. Errors - -Errors are sent using core X error reports. - -Output - A value for an OUTPUT argument does not name a defined OUTPUT. -CRTC - A value for a CRTC argument does not name a defined CRTC. -Mode - A value for a MODE argument does not name a defined MODE. - - ❧❧❧❧❧❧❧❧❧❧❧ - -5. Protocol Types - -RRCONFIGSTATUS { Success - InvalidConfigTime - InvalidTime - Failed } - - A value of type RRCONFIGSTATUS returned when manipulating the output - configuration or querying information from the server that has some - time-dependency. - - InvalidConfigTime indicates that the supplied configuration - timestamp does not match the current X server configuration - timestamp. Usually this means that the output configuration has - changed since the timestamp was received by the application. - - InvalidTime indicates that the supplied output reconfiguration time - is earlier than the most recent output reconfiguration request. - Generally this indicates that another application has reconfigured - the output using a later timestamp. - - Failed is returned whenever the operation is unsuccessful for some - other reason. This generally indicates that the requested output - configuration is unsupported by the hardware. The goal is to make - these limitations expressed by the protocol, but when that isn't - possible it is correct to return this error value. If, as a - implentor, you find this error code required, please submit the - hardware constraints that exist so that a future version of the - extension can correctly capture the configuration constraints in - your system. - -ROTATION { Rotate_0 - Rotate_90 - Rotate_180 - Rotate_270 - Reflect_X - Reflect_Y } - - These values are used both to indicate a set of allowed rotations - and reflections as well as to indicate a specific rotation and - reflection combination. - -RRSELECTMASK { RRScreenChangeNotifyMask - RRCrtcChangeNotifyMask (New in version 1.2) - RROutputChangeNotifyMask (New in version 1.2) - RROutputPropertyNotifyMask (New in version 1.2) } - -SIZEID { CARD16 } - -MODE { XID or None } - -CRTC { XID } - -OUTPUT { XID } - -CONNECTION { Connected, Disconnected, UnknownConnection } - - This value provides an indication of whether an output is actually - connected to a monitor or other presentation device. - -SUBPIXELORDER { SubPixelUnknown The subpixel order uses the Render - SubPixelHorizontalRGB extensions definitions; they are here - SubPixelHorizontalBGR only for convenience. - SubPixelVerticalRGB - SubPixelVerticalBGR - SubPixelNone } - -SCREENSIZE { widthInPixels, heightInPixels: CARD16 - widthInMillimeters, heightInMillimeters: CARD16 } - -MODEFLAG { HSyncPositive - HSyncNegative - VSyncPositive - VSyncNegative - Interlace - DoubleScan - CSync - CSyncPositive - CSyncNegative - HSkewPresent - BCast - PixelMultiplex - DoubleClock - ClockDivideBy2 } - -MODEINFO { id: MODE - name: STRING - width, height: CARD16 - dotClock: CARD32 - hSyncStart, hSyncEnd, hTotal, hSkew: CARD16 - vSyncStart, vSyncEnd, vTotal: CARD16 - modeFlags: SETofMODEFLAG } - -REFRESH { rates: LISTofCARD16 } - - ❧❧❧❧❧❧❧❧❧❧❧ - -5.4. Protocol Types added in version 1.4 of the extension - -SCANOUTPIXMAPINFO { format: PICTFORMAT - maxWidth, maxHeight: CARD16 - rotations: SETofROTATION } - - 'format' is the format of the pixels within the scanout - pixmap. Only 'Direct' formats are supported, this will never - be an 'Indexed' format. - - 'maxWidth' and 'maxHeight' define the largest supported - scanout pixmap. There is no minimum size; scanout pixmaps down - to 1x1 may be created. - - 'rotations' lists the set of rotations which can be provided - without additional latency or memory usage within the - environment. This typically means that they are supported - directly by the hardware. It is expected that a compositing - manager will perform other transforms as a part of the - compositing process in conjunction with the sprite transforms - described in this extension. - -SCREENFLAG { SetScreenPixmapSize - SetScreenSize - SetScreenSizeInMillimeters - SetScreenCrtcs } - -CRTCFLAG { SetCrtcPosition - SetCrtcMode - SetCrtcRotation - SetCrtcOutputs - SetCrtcSpritePositionTransform - SetCrtcSpriteImageTransform - SetCrtcPixmap - SetCrtcPixmapPosition } - -CRTCCONFIG { crtc: CRTC - set: SETofCRTCFLAG - x, y: INT16 - mode: MODE - rotation: ROTATION - sprite-position-transform: TRANSFORM - sprite-image-transform: TRANSFORM - outputs: LISTofOUTPUT - pixmap: PIXMAP or None - pixmap-x, pixmap-y: INT16 } - - If 'set' includes SetCrtcSpritePositionTransform, then - sprite-position-transform is used as in the - RRSetCrtcSpriteTransform request position-transform parameter. - - If 'set' includes SetCrtcSpriteImageTransform, then - sprite-image-transform is used as in the - RRSetCrtcSpriteTransform request image-transform parameter. - - If 'set' includes SetCrtcPixmap, then 'pixmap' specifies the - origin of the pixel data to be presented on 'crtc'. If - 'pixmap' is None, then data will be presented from the screen - pixmap. - - If 'set' includes SetCrtcPixmapPosition, then 'pixmap-x' and - 'pixmap-y' specify the origin of the scanout data within the - pixmap, the area from that location to pixmap-x + - width-of(mode), pixmap-y + height-of(mode) is what will be - seen on the connected outputs. - - If 'set' includes SetCrtcPixmap, then 'pixmap' must specify a - scanout pixmap as created by RRCreateScanoutPixmap or - None. Otherwise a Match error results. Furthermore: - - * 'pixmap' must be at least as large as the area to be - scanned out, or a Match error results. - - * If 'pixmap' is destroyed while still being used as a - scanout pixmap, then the associated CRTC will have its - scanout pixmap set back to None, the CRTC origin set back - to 0,0 (to make sure it fits) and the screen pixmap width - and height increased to be at least as big as the current - CRTC mode. - - * Future crtc changes that do not change the scanout pixmap - will cause an existing scanout pixmap to be resized to be - large enough to hold the new mode at the then-current - pixmap-x/pixmap-y location. - - If 'set' includes SetCrtcRotation then: - - * Any new or existing scanout pixmap must have had the - specified 'rotation' included as a part of its creation - parameters, or a Match error results. - - * If no scanout pixmap is in use, then the crtc must support - 'rotation' else a Value error results. - - ❧❧❧❧❧❧❧❧❧❧❧ - -6. Extension Initialization - -The name of this extension is "RANDR". - -┌─── - RRQueryVersion - client-major-version: CARD32 - client-minor-version: CARD32 - ▶ - major-version: CARD32 - minor-version: CARD32 -└─── - - The client sends the highest supported version to the server - and the server sends the highest version it supports, but no - higher than the requested version. Major versions changes can - introduce incompatibilities in existing functionality, minor - version changes introduce only backward compatible changes. - It is the clients responsibility to ensure that the server - supports a version which is compatible with its expectations. - - ❧❧❧❧❧❧❧❧❧❧❧ - -7. Extension Requests - -┌─── - RRSelectInput - window: WINDOW - enable: SETofRRSELECTMASK -└─── - Errors: Window, Value - - If 'enable' is RRScreenChangeNotifyMask, RRScreenChangeNotify events - will be sent when the screen configuration changes, either from - this protocol extension, or due to detected external screen - configuration changes. RRScreenChangeNotify may also be sent when - this request executes if the screen configuration has changed since - the client connected, to avoid race conditions. - - New for version 1.2: - - If 'enable' contains RRCrtcChangeMask, RRCrtcChangeNotify events - will be sent when a the configuration for a CRTC associated with the - screen changes, either through this protocol extension or due to - detected external changes. RRCrtcChangeNotify may also be sent when - this request executes if the CRTC configuration has changed since - the client connected, to avoid race conditions. - - If 'enable' contains RROutputChangeMask, RROutputChangeNotify events - will be sent when a the configuration for an output associated with - the screen changes, either through this protocol extension or due to - detected external changes. RROutputChangeNotify may also be sent - when this request executes if the output configuration has changed - since the client connected, to avoid race conditions. - - If 'enable' contains RROutputPropertyNotifyMask, - RROutputPropertyNotify events will be sent when properties change on - this output. - -┌─── - RRSetScreenConfig - window: WINDOW - timestamp: TIMESTAMP - config-timestamp: TIMESTAMP - size-id: SIZEID - rotation: ROTATION - rate: CARD16 - ▶ - status: RRCONFIGSTATUS - new-timestamp: TIMESTAMP - config-timestamp: TIMESTAMP - root: WINDOW - subpixelOrder: SUBPIXELORDER -└─── - Errors: Value, Match - - If 'timestamp' is less than the time when the configuration was last - successfully set, the request is ignored and InvalidTime returned in - status. - - If 'config-timestamp' is not equal to when the server's screen - configurations last changed, the request is ignored and - InvalidConfigTime returned in status. This could occur if the - screen changed since you last made a RRGetScreenInfo request, - perhaps by a different piece of display hardware being installed. - Rather than allowing an incorrect call to be executed based on stale - data, the server will ignore the request. - - 'rate' contains the desired refresh rate. If it is zero, the server - selects an appropriate rate. - - This request may fail for other indeterminate reasons, in which case - 'status' will be set to Failed and no configuration change will be - made. - - This request sets the screen to the specified size, rate, rotation - and reflection. - - When this request succeeds, 'status' contains Success and the - requested changes to configuration will have been made. - - 'new-time-stamp' contains the time at which this request was - executed. - - 'config-timestamp' contains the time when the possible screen - configurations were last changed. - - 'root' contains the root window for the screen indicated by the - window. - - 'subpixelOrder' contains the resulting subpixel order of the screen - to allow correct subpixel rendering. - - Value errors are generated when 'rotation', 'rate' or 'size-id' - are invalid. - -┌─── - RRGetScreenInfo - window: WINDOW - ▶ - rotations: SETofROTATION - root: WINDOW - timestamp: TIMESTAMP - config-timestamp: TIMESTAMP - size-id: SIZEID - rotation: ROTATION - rate: CARD16 - sizes: LISTofSCREENSIZE - refresh: LISTofREFRESH -└─── - - Errors: Window - - RRGetScreenInfo returns information about the current and available - configurations for the screen associated with 'window'. - - 'rotations' contains the set of rotations and reflections supported - by the screen. - - 'root' is the root window of the screen. - - 'config-timestamp' indicates when the screen configuration - information last changed: requests to set the screen will fail - unless the timestamp indicates that the information the client - is using is up to date, to ensure clients can be well behaved - in the face of race conditions. - - 'timestamp' indicates when the configuration was last set. - - 'size-id' indicates which size is active. - - 'rate' is the current refresh rate. This is zero when the refresh - rate is unknown or on devices for which refresh is not relevant. - - 'sizes' is the list of possible frame buffer sizes (at the normal - orientation. Each size indicates both the linear physical size of - the screen and the pixel size. - - 'refresh' is the list of refresh rates for each size. Each element - of 'sizes' has a corresponding element in 'refresh'. An empty list - indicates no known rates, or a device for which refresh is not - relevant. - - The default size of the screen (the size that would become the - current size when the server resets) is the first size in the - list. - -7.1. Extension Requests added in version 1.2 of the extension - -As introduced above, version 1.2 of the extension splits the screen size -from the crtc and output configuration, permitting the subset of the screen -presented by multiple outputs to be configured. As a separate notion, the -size of the screen itself may be arbitrarily configured within a defined -range. As crtcs and outputs are added and removed from the system, the set -returned by the extension will change so that applications can detect -dynamic changes in the display environment. - -┌─── - RRGetScreenSizeRange - window: WINDOW - ▶ - CARD16 minWidth, minHeight - CARD16 maxWidth, maxHeight -└─── - Errors: Window - - Returns the range of possible screen sizes. The screen may be set to - any size within this range. - -┌─── - RRSetScreenSize - window: WINDOW - width: CARD16 - height: CARD16 - width-in-millimeters: CARD32 - height-in-millimeters: CARD32 -└─── - Errors: Window, Match, Value - - Sets the screen to the specified size. 'width' and 'height' must be - within the range allowed by GetScreenSizeRanges, otherwise a Value - error results. All active monitors must be configured to display a - subset of the specified size, else a Match error results. - - 'width-in-millimeters' and 'height-in-millimeters' can be set to - reflect the physical size of the screen reported both through this - extension and the core protocol. They must be non-zero, or Value - error results. - - If panning is enabled, the width and height of the panning and the - tracking areas are adapted to the new size and clamped afterwards. - Disabled panning axes remain disabled. - Panning borders are disabled if their requirements are no longer met - (see RRSetPanning). - -┌─── - RRGetScreenResources - window: WINDOW - ▶ - timestamp: TIMESTAMP - config-timestamp: TIMESTAMP - crtcs: LISTofCRTC - outputs: LISTofOUTPUT - modes: LISTofMODEINFO -└─── - Errors: Window - - RRGetScreenResources returns the list of outputs and crtcs connected - to the screen associated with 'window'. - - 'timestamp' indicates when the configuration was last set. - - 'config-timestamp' indicates when the configuration information last - changed. Requests to configure the output will fail unless the - timestamp indicates that the information the client is using is up - to date, to ensure clients can be well behaved in the face of race - conditions. - - 'crtcs' contains the list of CRTCs associated with the screen. - - 'outputs' contains the list of outputs associated with the screen. - - 'modes' contains the list of modes associated with the screen - - This request explicitly asks the server to ensure that the - configuration data is up-to-date wrt the hardware. If that requires - polling, this is when such polling would take place. If the - current configuration is all that's required, use - RRGetScreenResourcesCurrent instead. - -┌─── - RRGetOutputInfo - output: OUTPUT - config-timestamp: TIMESTAMP - ▶ - status: RRCONFIGSTATUS - timestamp: TIMESTAMP - crtc: CRTC - - name: STRING - connection: CONNECTION - subpixel-order: SUBPIXELORDER - widthInMillimeters, heightInMillimeters: CARD32 - crtcs: LISTofCRTC - clones: LISTofOUTPUT - modes: LISTofMODE - num-preferred: CARD16 -└─── - Errors: Output - - RRGetOutputInfo returns information about the current and available - configurations 'output'. - - If 'config-timestamp' does not match the current configuration - timestamp (as returned by RRGetScreenResources), 'status' is set to - InvalidConfigTime and the remaining reply data is empty. Otherwise, - 'status' is set to Success. - - 'timestamp' indicates when the configuration was last set. - - 'crtc' is the current source CRTC for video data, or Disabled if the - output is not connected to any CRTC. - - 'name' is a UTF-8 encoded string designed to be presented to the - user to indicate which output this is. E.g. "S-Video" or "DVI". - - 'connection' indicates whether the hardware was able to detect a - device connected to this output. If the hardware cannot determine - whether something is connected, it will set this to - UnknownConnection. - - 'subpixel-order' contains the resulting subpixel order of the - connected device to allow correct subpixel rendering. - - 'widthInMillimeters' and 'heightInMillimeters' report the physical - size of the displayed area. If unknown, or not really fixed (e.g., - for a projector), these values are both zero. - - 'crtcs' is the list of CRTCs that this output may be connected to. - Attempting to connect this output to a different CRTC results in a - Match error. - - 'clones' is the list of outputs which may be simultaneously - connected to the same CRTC along with this output. Attempting to - connect this output with an output not in the 'clones' list - results in a Match error. - - 'modes' is the list of modes supported by this output. Attempting to - connect this output to a CRTC not using one of these modes results - in a Match error. - - The first 'num-preferred' modes in 'modes' are preferred by the - monitor in some way; for fixed-pixel devices, this would generally - indicate which modes match the resolution of the output device. - -┌─── - RRListOutputProperties - output:OUTPUT - ▶ - atoms: LISTof ATOM -└─── - Errors: Output - - This request returns the atoms of properties currently defined on - the output. - -┌─── - RRQueryOutputProperty - output: OUTPUT - property: ATOM - ▶ - pending: BOOL - range: BOOL - immutable: BOOL - valid-values: LISTofINT32 -└─── - Errors: Name, Atom, Output - - If the specified property does not exist for the specified output, - then a Name error is returned. - - If 'pending' is TRUE, changes made to property values with - RRChangeOutputProperty will be saved in the pending property value - and be automatically copied to the current value on the next - RRSetCrtcConfig request involving the named output. If 'pending' is - FALSE, changes are copied immediately. - - If 'range' is TRUE, then the valid-values list will contain - precisely two values indicating the minimum and maximum allowed - values. If 'range' is FALSE, then the valid-values list will contain - the list of possible values; attempts to set other values will - result in a Value error. - - If 'immutable' is TRUE, then the property configuration cannot be - changed by clients. Immutable properties are interpreted by the X - server. - -┌─── - RRConfigureOutputProperty - output: OUTPUT - property: ATOM - pending: BOOL - range: BOOL - valid-values: LISTofINT32 -└─── - Errors: Access, Name, Atom, Output - - If the specified property is 'immutable', an Access error is - returned. - - Otherwise, the configuration of the specified property is changed to - the values provided in this request. - - If the specified property does not exist for the specified output, - it is created with an empty value and None type. - -┌─── - RRChangeOutputProperty - output: OUTPUT - property, type: ATOM - format: {8, 16, 32} - mode: { Replace, Prepend, Append } - data: LISTofINT8 or LISTofINT16 or LISTofINT32 -└─── - Errors: Alloc, Atom, Match, Value, Output - - This request alters the value of the property for the specified - output. If the property is marked as a 'pending' property, only the - pending value of the property is changed. Otherwise, changes are - reflected in both the pending and current values of the property. - The type is uninterpreted by the server. The format specifies - whether the data should be viewed as a list of 8-bit, 16-bit, or - 32-bit quantities so that the server can correctly byte-swap as - necessary. - - If the mode is Replace, the previous property value is discarded. - If the mode is Prepend or Append, then the type and format must - match the existing property value (or a Match error results). If - the property is undefined, it is treated as defined with the correct - type and format with zero-length data. - - For Prepend, the data is tacked on to the beginning of the existing - data, and for Append, it is tacked on to the end of the existing data. - - This request generates a OutputPropertyNotify - - The lifetime of a property is not tied to the storing client. - Properties remain until explicitly deleted, until the output is - destroyed, or until server reset (see section 10). - - The maximum size of a property is server-dependent and may vary - dynamically. - -┌─── - RRDeleteOutputProperty - output: OUTPUT - property: ATOM -└─── - Errors: Atom, Output - - This request deletes the property from the specified window if the - property exists and generates a OutputPropertyNotify event unless - the property does not exist. - -┌─── - RRGetOutputProperty - output: OUTPUT - property: ATOM - type: ATOM or AnyPropertyType - long-offset, long-length: CARD32 - delete: BOOL - pending: BOOL - ▶ - type: ATOM or None - format: {0, 8, 16, 32} - bytes-after: CARD32 - value: LISTofINT8 or LISTofINT16 or LISTofINT32 -└─── - Errors: Atom, Value, Output - - If the specified property does not exist for the specified output, - then the return type is None, the format and bytes-after are zero, - and the value is empty. The delete argument is ignored in this - case. - - If the specified property exists but its type does not match the - specified type, then the return type is the actual type of the - property, the format is the actual format of the property (never - zero), the bytes-after is the length of the property in bytes (even - if the format is 16 or 32), and the value is empty. The delete - argument is ignored in this case. - - If the specified property exists and either AnyPropertyType is - specified or the specified type matches the actual type of the - property, then the return type is the actual type of the property, - the format is the actual format of the property (never zero), and - the bytes-after and value are as follows, given: - - N = actual length of the stored property in bytes - (even if the format is 16 or 32) - I = 4 × offset - T = N - I - L = MINIMUM(T, 4 × long-length) - A = N - (I + L) - - If 'pending' is true, and if the property holds a pending value, - then the value returned will be the pending value of the property - rather than the current value. The returned value starts at byte - index I in the property (indexing from 0), and its length in bytes - is L. However, it is a Value error if long-offset is given such - that L is negative. The value of bytes-after is A, giving the - number of trailing unread bytes in the stored property. If delete - is True and the bytes-after is zero, the property is also deleted - from the output, and a RROutputPropertyNotify event is generated. - -┌─── - RRCreateMode - window: WINDOW - modeinfo: MODEINFO - ▶ - mode: MODE -└─── - Errors: Window, Name, Value - - 'modeinfo' provides a new mode for outputs on the screen - associated with 'window'. If the name of 'modeinfo' names an - existing mode, a Name error is returned. If some parameter of the - mode is not valid in some other way, a Value error is returned. - - The returned 'mode' provides the id for the mode. - -┌─── - RRDestroyMode - mode: MODE -└─── - Errors: Mode, Access - - The user-defined 'mode' is destroyed. 'mode' must name a mode - defined with RRCreateMode, else an Match error is returned. If - 'mode' is in use by some CRTC or Output, then an Access error is - returned. - -┌─── - RRAddOutputMode - output: OUTPUT - mode: MODE -└─── - Errors: Output, Mode, Match - - 'output' indicates which output is to be configured. - - 'mode' specifies which mode to add. If 'mode' is not valid for - 'output', then a Match error is generated. - - This request generates OutputChangeNotify events. - -┌─── - RRDeleteOutputMode - output: OUTPUT - mode: MODE -└─── - Errors: Output, Mode - - 'output' indicates which output is to be configured. - - 'mode' specifies which mode to delete. 'mode' must have been added - with RRAddOutputMode, else an Access error is returned. 'mode' must - not be active, else a Match error is returned. - - This request generates OutputChangeNotify events. - -┌─── - RRGetCrtcInfo - crtc: CRTC - config-timestamp: TIMESTAMP - ▶ - status: RRCONFIGSTATUS - timestamp: TIMESTAMP - x, y: INT16 - width, height: CARD16 - mode: MODE - rotation: ROTATION - outputs: LISTofOUTPUT - - rotations: SETofROTATION - possible-outputs: LISTofOUTPUT -└─── - - Errors: Window - - RRGetCrtcModes returns information about the current and available - configurations for the specified crtc connected to the screen - associated with 'window'. - - If 'config-timestamp' does not match the current configuration - timestamp (as returned by RRGetScreenResources), 'status' is set to - InvalidConfigTime and the remaining reply data is empty. Otherwise, - 'status' is set to Success. - - 'timestamp' indicates when the configuration was last set. - - 'x' and 'y' indicate the position of this CRTC within the screen - region. They will be set to 0 when the CRTC is disabled. - - 'width' and 'height' indicate the size of the area within the screen - presented by this CRTC. This may be different than the size of the - mode due to rotation. They will be set to 0 when the CRTC - is disabled. - - 'mode' indicates which mode is active, or None indicating that the - CRTC has been disabled and is not displaying the screen contents. - - 'rotation' indicates the active rotation. It is set to Rotate_0 - when the CRTC is disabled. - - 'outputs' is the list of outputs currently connected to this CRTC - and is empty when the CRTC is disabled. - - 'rotations' contains the set of rotations and reflections supported - by the CRTC. - - 'possible-outputs' lists all of the outputs which may be connected - to this CRTC. - -┌─── - RRSetCrtcConfig - crtc: CRTC - timestamp: TIMESTAMP - config-timestamp: TIMESTAMP - x, y: INT16 - mode: MODE - rotation: ROTATION - outputs: LISTofOUTPUT - ▶ - status: RRCONFIGSTATUS - new-timestamp: TIMESTAMP -└─── - Errors: Value, Match - - If 'timestamp' is less than the time when the configuration was last - successfully set, the request is ignored and InvalidTime returned in - status. - - If 'config-timestamp' is not equal to when the monitor's - configuration last changed, the request is ignored and - InvalidConfigTime returned in status. This could occur if the - monitor changed since you last made a RRGetScreenInfo request, - perhaps by a different monitor being connected to the machine. - Rather than allowing an incorrect call to be executed based on stale - data, the server will ignore the request. - - 'x' and 'y' contain the desired location within the screen for this - monitor's content. 'x' and 'y' must be within the screen size, else - a Value error results. - - 'mode' is either the desired mode or None indicating the CRTC should - be disabled. If 'mode' is not one of these values, a Value - error results. 'mode' must be valid for all of the configured outputs, - else a Match error. - - 'rotation' contains the desired rotation along with which - reflections should be enabled. The rotation and reflection values - must be among those allowed for this monitor, else a Value error - results. - - 'outputs' contains the set of outputs that this CRTC should be - connected to. The set must be among the list of acceptable output - sets for this CRTC or a Match error results. - - If 'mode' is None, then 'outputs' must be empty, else a Match error - results. Conversely, if 'mode' is not None, then 'outputs' must not be - empty, else a Match error results. - - This request may fail for other indeterminate reasons, in which case - 'status' will be set to Failed and no configuration change will be - made. - - This request sets the CRTC to the specified position, mode, rotation - and reflection. The entire area of the CRTC must fit within the - screen size, else a Match error results. As an example, rotating the - screen so that a single CRTC fills the entire screen before and - after may necessitate disabling the CRTC, resizing the screen, - then re-enabling the CRTC at the new configuration to avoid an - invalid intermediate configuration. - - If panning is enabled, the width and height of the panning and the - tracking areas are clamped to the new mode size. - Disabled panning axes remain disabled. - Panning borders are disabled if their requirements are no longer met - (see RRSetPanning). - - When this request succeeds, 'status' contains Success and the - requested changes to configuration will have been made. - - 'new-time-stamp' contains the time at which this request was - executed. - -┌─── - RRGetCrtcGammaSize - crtc: CRTC - ▶ - size: CARD16 -└─── - Errors: Crtc - - This request returns the size of the gamma ramps used by 'crtc'. - -┌─── - RRGetCrtcGamma - crtc: CRTC - ▶ - red: LISTofCARD16 - green: LISTofCARD16 - blue: LISTofCARD16 -└─── - Errors: Crtc - - This request returns the currently set gamma ramps for 'crtc'. All - three lists will be the size returned by the RRGetCrtcGammaSize - request. - -┌─── - RRSetCrtcGamma - crtc: CRTC - red: LISTofCARD16 - green: LISTofCARD16 - blue: LISTofCARD16 -└─── - Errors: Crtc, Match - - This request sets the gamma ramps for 'crtc'. All three lists - must be the size returned by RRGetCrtcGammaSize else a Value error - results. - -7.2. Extension Requests added in version 1.3 of the extension - -┌─── - RRGetScreenResourcesCurrent - window: WINDOW - ▶ - timestamp: TIMESTAMP - config-timestamp: TIMESTAMP - crtcs: LISTofCRTC - outputs: LISTofOUTPUT - modes: LISTofMODEINFO -└─── - Errors: Window - - RRGetScreenResourcesCurrent returns the list of outputs and crtcs - connected to the screen associated with 'window'. - - 'timestamp' indicates when the configuration was last set. - - 'config-timestamp' indicates when the configuration information last - changed. Requests to configure the output will fail unless the - timestamp indicates that the information the client is using is up - to date, to ensure clients can be well behaved in the face of race - conditions. - - 'crtcs' contains the list of CRTCs associated with the screen. - - 'outputs' contains the list of outputs associated with the screen. - - 'modes' contains the list of modes associated with the screen. - - Unlike RRGetScreenResources, this merely returns the current - configuration, and does not poll for hardware changes. - -┌─── - RRSetCrtcTransform - crtc: CRTC - transform: TRANSFORM - filter: STRING8 - values: LISTofFIXED -└─── - Errors: Crtc, Match - - This request provides a mechanism that is more general than the - existing rotation and reflection values for describing the - transformation from frame buffer image to crtc presentation. - 'transform' is a full 2D projective transformation from screen - coordinate space to crtc coordinate space. This transformation is - applied before the rotation and reflection values to compute the - complete transform. - - 'filter' and 'values' specify a Render filter that may be used by the - server when transforming data from frame buffer to crtc. - - This request sets the transform to be used at the next - RRSetCrtcConfig request execution; it does not cause any change to - occur in the current configuration. - - When a non-identity transformation is in use, the rectangle returned - by RRGetCrtcInfo defines the bounding rectangle of the screen that is - projected to the crtc. It is this projected rectangle which must be - within the area of the screen when the mode is set. - -┌─── - RRGetCrtcTransform - crtc: CRTC - ▶ - pending-transform: TRANSFORM - pending-filter: STRING8 - pending-values: LISTofFIXED - current-transform: TRANSFORM - current-filter: STRING8 - current-values: LISTofFIXED -└─── - - This request returns the pending and current transforms for the - specified CRTC. The pending transform will be the same as the current - transform if no new pending transform has been set since the last call - to RRSetCrtcConfig. - -┌─── - RRGetPanning - crtc: CRTC - ▶ - status: RRCONFIGSTATUS - timestamp: TIMESTAMP - left, top, width, height: CARD16 - track_left, track_top, track_width, track_height: CARD16 - border_left, border_top, border_right, border_bottom: INT16 -└─── - - Errors: Crtc - - Version 1.3 adds panning support again. If multiple crtcs are active - the panning behavior can be defined per crtc individually. - RRGetPanning returns information about the currently set panning - configuration for the specified crtc. If the CRTC does not support - panning, all fields (except timestamp) will be 0. - - 'timestamp' indicates when the configuration was last set. - - All other entries are explained for RRSetPanning. - -┌─── - RRSetPanning - crtc: CRTC - timestamp: TIMESTAMP - left, top, width, height: CARD16 - track_left, track_top, track_width, track_height: CARD16 - border_left, border_top, border_right, border_bottom: INT16 - ▶ - status: RRCONFIGSTATUS - new-timestamp: TIMESTAMP -└─── - Errors: Crtc, Match - - This request sets the panning parameters. As soon as panning is - enabled, the CRTC position can change with every pointer move. - RRCrtcChangeNotify events are sent to the clients requesting those. - - If 'timestamp' is less than the time when the configuration was last - successfully set, the request is ignored and InvalidTime returned in - status. - - ┌──┳━━━━━━━━━━━━━━┳─────┬ ─ ─ ─ ─ ─ ┐ - │ ┃ CRTC ┃ │ - │ ┃ ┃ │ │ - │ ┃ X┃→ │ - │ ┃ ┃ │ │ framebuffer - │ ┗━━━━━━━━━━━━━━┛ │ - │ │ │ - │panning area │ - └───────────────────────┴ ─ ─ ─ ─ ─ ┘ - - 'left', 'top', 'width', and 'height' contain the total panning area - for this CRTC. 'width' has to be larger than or equal to the CRTC's - width or 0, and 'left'+'width' must be within the screen size, else a - Match error results. Equivalent restrictions for the height exist. - 'width' or 'height' set to 0 indicate that panning should be disabled - on the according axis. Setting 'width'/'height' to the CRTC's - width/height will disable panning on the X/Y axis as well, but - RRSetScreenSize will silently enable panning if the screen size is - increased. This does not happen if set to 0. - - ┌────────┳━━━━━━━━━━━━━━┳ ─ ─ ─ ─ ─ ┐ - │ ┃ CRTC ┃ - │ ┃ ┃ │ - │ ┃ ┃ - │ ┃ ┃ │ tracking area - │ ┗━━━━━━━━━━━━━━┫ X - │ ↓ │ ↓ │ - │panning area │ - └───────────────────────┴ ─ ─ ─ ─ ─ ┘ - - 'track_left', 'track_top', 'track_width', and 'track_height' contain - the pointer area for which the panning region is updated. For normal - use cases it should enclose the panning area minus borders, and is - typically set to either the panning area minus borders, or to the - total screen size. If set to the total screen size, the CRTC will pan - in the remaining axis even if the pointer is outside the panning area - on a different CRTC, as shown in the figure above. If the pointer is - outside the tracking area, the CRTC will not pan. Zero can be used as - an alias for the total screen size. - - ┌──┳━━━━━━━━━━━━━━┳────────────┐ - │ ┃ CRTC ┃ │ - │ ┃ ┃ │ - │ ┃ ┃→ │ - │ ┃ X←→┃ │ - │ ┃ border_right │ - │ ┗━━━━━━━━━━━━━━┛ │ - │ │ - │panning area │ - └──────────────────────────────┘ - - 'border_left', 'border_top', 'border_right', and 'border_bottom' - define the distances from the CRTC borders that will activate panning - if the pointer hits them. If the borders are 0, the screen will pan - when the pointer hits the CRTC borders (behavior of pre-RandR Xserver - panning). If the borders are positive, the screen will pan when the - pointer gets close to the CRTC borders, if they are negative, the - screen will only pan when the pointer is already way past the CRTC - borders. Negative values might confuse users and disable panning to - the very edges of the screen. Thus they are discouraged. - border_left + border_right has to be lower or equal than the CRTC's - width, else a Match error results. An equivalent restriction for the - height exists. - - Screen size changes update the panning and the tracking areas to the - new size. Both screen size changes and mode changes clamp these areas - to the current CRTC size. In these cases panning borders are disabled - if their requirements are no longer met. - - When this request succeeds, 'status' contains Success and the - requested changes to configuration will have been made. - - 'new-time-stamp' contains the time at which this request was - executed. - -┌─── - RRSetOutputPrimary - window: WINDOW - output: OUTPUT -└─── - Errors: Match, Output, Window - - RRSetOutputPrimary marks 'output' as the primary output for the - screen with the same root window as 'window'. This output's CRTC - will be sorted to the front of the list in Xinerama and RANDR - geometry requests for the benefit of older applications. The - default primary output is None, and None is a legal value to pass - to RRSetOutputPrimary. This request is expected to be used by - desktop environments to mark the screen that should hold the primary - menu bar or panel. - - As this changes the logical layout of the screen, ConfigureNotify - and RRScreenChangeNotify will be generated on the appropriate root - window when the primary output is changed by this call. This request - also generates RROutputChangeNotify events on the outputs that gained - and lost primary status. - - If an output is disconnected asynchronously (eg. due to recabling), - the primary status does not change, but RROutputChangeNotify events - will be generated if the hardware is capable of detecting this; - clients are expected to reconfigure if appropriate. - - If an output is deleted (eg. due to device hotplug), the server will - act as though None was passed to RRSetOutputPrimary, including - generating the appropriate events. - -┌─── - RRGetOutputPrimary - window: WINDOW - ▶ - output: OUTPUT -└─── - Errors: Window - - RRGetOutputPrimary returns the primary output for the screen. - - ❧❧❧❧❧❧❧❧❧❧❧ - -7.3. Extension Requests added in version 1.4 of the extension. - -┌─── - RRQueryScanoutPixmaps - window: WINDOW - ▶ - infos: LISTofSCANOUTPIXMAPINFO -└─── - Errors: Window - - This request returns information about the server support for - alternate scanout pixmaps. For each pictformat, there is a set - of rotations and a maximum supported size. The rotations here - are those provided by the scanout hardware itself, not by - software emulation. - -┌─── - RRCreateScanoutPixmap - pixmap: PIXMAP - drawable: DRAWABLE - width, height: CARD16 - format: PICTFORMAT - rotations: SETofROTATION -└─── - Errors: Drawable, Match, Value - - Creates a pixmap which can subsequently be used as a scanout - buffer for the screen associated with 'drawable'. 'rotations' - is the set of rotation values which may be used with the - resulting scanout buffer when it is associated with a CRTC. - - 'format' must be one of the supported scanout formats, or a - Match error results. - - 'width' and 'height' must be within the supported range for - the specified format or a Value error results. - - 'rotations' must be a subset of those supported for the - specified format or a Match error results. - -┌─── - RRSetCrtcSpriteTransform - crtc: CRTC - position-transform: TRANSFORM - image-transform: TRANSFORM -└─── - Sets the sprite transforms for the specified crtc, any sprites - presented on this crtc will have their positions transformed - by the position-transform matrix. Sprite images displayed on the crtc - will be transformed by the image-transform matrix. - -┌─── - RRGetCrtcSpriteTransform - crtc: CRTC - ▶ - position-transform: TRANSFORM - image-transform: TRANSFORM -└─── - Gets the sprite transforms for the specified crtc. - -┌─── - RRSetCrtcConfigs - drawable: DRAWABLE - set: SETofSCREENFLAG - screen-pixmap-width: CARD16 - screen-pixmap-height: CARD16 - screen-width: CARD16 - screen-height: CARD16 - width-in-millimeters: CARD32 - height-in-millimeters: CARD32 - configs: LISTofCRTCCONFIG - ▶ - status: RRCONFIGSTATUS -└─── - Errors: Value, Match - - This works much like RRSetScreenSize followed by a sequence of - RRSetCrtcConfig, except that the entire configuration can be set - in a single operation, either succeeding or failing without - any partial execution. - - If 'set' includes 'SetScreenPixmapSize', then - 'screen-pixmap-width' and 'screen-pixmap-height' specify the - new screen pixmap size. - - If 'set' includes 'SetScreenSize', then 'screen-width' and - 'screen-height' specify the new screen size. - - If 'set' includes 'SetScreenSizeInMillimeters', then - 'width-in-millimeters' and 'height-in-millimeters' specify - the new screen physical size. - - If 'set' includes 'SetScreenCrtcs', then 'configs' includes - the list of new CRTC configurations. - - In addition to the pre-1.4 semantics, this request adds the - ability to specific a scanout pixmap for each crtc, and - integrates the 1.4 sprite transform request as well. - - ❧❧❧❧❧❧❧❧❧❧❧ - -8. Extension Events - -Clients MAY select for ConfigureNotify on the root window to be -informed of screen changes. This may be advantageous if all your -client needs to know is the size of the root window, as it avoids -round trips to set up the extension. - -RRScreenChangeNotify is sent if RRSelectInput has requested it -whenever properties of the screen change, which may be due to external -factors, such as re-cabling a monitor, etc. - -┌─── - RRScreenChangeNotify - - rotation: ROTATION; new rotation - sequenceNumber: CARD16 low 16 bits of request seq. number - timestamp: TIMESTAMP time screen was changed - configTimestamp: TIMESTAMP time config data was changed - root: WINDOW root window of screen - window: WINDOW window requesting notification - size-id: SIZEID index of new SCREENSIZE - subpixelOrder: SUBPIXELORDER order of subpixels - widthInPixels: CARD16 width in pixels of the new SCREENSIZE - heightInPixels: CARD16 height in pixels of the new SCREENSIZE - widthInMillimeters: CARD16 width in mm of the new SCREENSIZE - heightInMillimeters: CARD16 height in mm of the new SCREENSIZE -└─── - This event is generated whenever the screen configuration is changed - and sent to requesting clients. 'timestamp' indicates when the - screen configuration was changed. 'configTimestamp' says when the - last time the configuration was changed. 'root' is the root of the - screen the change occurred on, 'window' is window selecting for this - event. 'size-id' contains the index of the current size. - - This event is sent whenever the screen's configuration changes - or if a new screen configuration becomes available that was - not available in the past. In this case (config-timestamp in - the event not being equal to the config-timestamp returned in - the last call to RRGetScreenInfo), the client MUST call - RRGetScreenInfo to update its view of possible screen - configurations to have a correct view of possible screen - organizations. - - Clients which select screen change notification events may be - sent an event immediately if the screen configuration was - changed between when they connected to the X server and - selected for notification. This is to prevent a common race - that might occur on log-in, where many applications start up - just at the time when a display manager or log in script might - be changing the screen size or configuration. - - Note that the sizes in this event reflect the new SCREENSIZE and - thus will appear rotated by the 'rotation' parameter from the sizes - of the screen itself. In other words, when rotation is 90 or 270, - widthInPixels in this event will be the same as the height value - from a ConfigureNotify that reflects the same size change. This - will probably confuse developers. - -8.1 Events added in version 1.2 of the RandR extension - -┌─── - RROutputChangeNotify: - timestamp: TIMESTAMP time screen was reconfigured - config-timestamp: TIMESTAMP time available config data was changed - window: WINDOW window requesting notification - output: OUTPUT output affected by change - crtc: CRTC connected CRTC or None - mode: MODE mode in use on CRTC or None - connection: CONNECTION connection status -└─── - - This event is generated whenever the available output configurations - have changed and is sent to requesting clients. 'timestamp' - indicates when the crtc configuration was changed by a client. - 'config-timestamp' says when the last time the available - configurations changed. 'root' is the root of the screen the change - occurred on, 'window' is window selecting for this event. The - precise change can be detected by examining the new state of the - system. - -┌─── - RROutputPropertyNotify: - window: WINDOW window requesting notification - output: OUTPUT output affected by change - atom: ATOM affected property - time: TIMESTAMP time property was changed - subpixel-order: SUBPIXELORDER order of subpixels - state: { NewValue, Deleted } new property state -└─── - - This event is reported to clients selecting RROutputPropertyChange - on the window and is generated with state NewValue when a property - of the window is changed using RRChangeOutputProperty even when - adding zero-length data and when replacing all or part of a property - with identical data. It is generated with state Deleted when a - property of the window is deleted using either - RRDeleteOutputProperty or RRGetOutputProperty. The timestamp - indicates the server time when the property was changed. - -┌─── - RRCrtcChangeNotify - timestamp: TIMESTAMP time monitor was changed - window: WINDOW window requesting notification - crtc: CRTC CRTC which changed - mode: MODE new mode - rotation: ROTATION; new rotation - x: INT16 x position of CRTC within screen - y: INT16 y position of CRTC within screen - width: CARD16 width of new mode - height: CARD16 height of new mode -└─── - This event is generated whenever the CRTC configuration is changed - and sent to requesting clients. 'timestamp' indicates when the - CRTC configuration was changed. 'window' is window selecting for this - event. 'mode' is the new mode, or None if the crtc is disabled. - 'x' and 'y' mark the location in the screen where this CRTC - is reading data. 'width' and 'height' indicate the size of the - mode. 'x', 'y, 'width' and 'height' are all zero when 'mode' is None. - - This event is sent whenever the monitor's configuration changes - or if a new monitor configuration becomes available that was - not available in the past. In this case, the client MUST call - RRGetCrtcModes to update its view of possible monitor - configurations to have a correct view of possible monitor - organizations. - - Clients which select monitor change notification events may be - sent an event immediately if the monitor configuration was - changed between when they connected to the X server and - selected for notification. This is to prevent a common race - that might occur on log-in, where many applications start up - just at the time when a display manager or log in script might - be changing the monitor size or configuration. - - ❧❧❧❧❧❧❧❧❧❧❧ - -9. Properties - -Properties are used for output specific parameters, and for announcing -static or rarely changing data. Announced data is typically -immutable. Properties are also used for evaluating new parameters -before adding them to the RandR protocol. - -The following properties are hereby declared official, and drivers SHOULD -prefix driver specific properties with '_', unless they are planned to be -added to this specification. List values, that are not declared by the table -below, and will remain driver specific or are not planned to be added to this -specification, SHOULD be prefixed with "_" as well in order to avoid name -space or semantics clashes with future extensions of these values. - -Beginning with version 1.3 of the RandR extension, certain properties -are mandatory and MUST be provided by implementations. Earlier -versions of the RandR extension MAY provide these properties as well, -as long as the semantics are not altered. Clients SHOULD fall back -gracefully to lower version functionality, though, if the driver -doesn't handle a mandatory property correctly. - -9.1 Known properties - - "Backlight" aka RR_PROPERTY_BACKLIGHT - Type: int32 - Flags: - - Range/List: 0-x (driver specific) - - This property controls the brightness on laptop panels and equivalent - displays with a backlight controller. The driver specific maximum - value MUST turn the backlight to full brightness, 1 SHOULD turn the - backlight to minimum brightness, 0 SHOULD turn the backlight off. - - "CloneList" aka RR_PROPERTY_CLONE_LIST - Type: int32 [2*n] / Atom pairs - Flags: Immutable - Range/List: 0- - - Some combinations of outputs on some cards cannot be served - independently from each other, because they are wired up to the same - encoder outputs. - This property lists all output + signal format pairs that are - driven together with this output, and thus can only be programmed in - clone mode with the same CRTC. - This property MUST be symmetric, but may change with changing signal - format. I.e. if the property for DVI-1/VGA specifies VGA-1/VGA to be - cloned, VGA-1/VGA has to list DVI-1/VGA as well. - Outputs / format pairs listed in this property MUST be included in the - CompatibilityList. - - "CompatibilityList" aka RR_PROPERTY_COMPATIBILITY_LIST - Type: int32 [2*n] / Atom pairs - Flags: Immutable - Range/List: 0- - - Some combinations of outputs on some cards cannot be served at all, - because the according encoder is only capable of driving one output at - a time. - This property lists all output + signal format pairs that can be - driven together with this output. NULL atoms specify any output / any - signal format, respectively. - This property MUST be symmetric, but may change with changing signal - format. I.e. if the property for DVI-1/TMDS specifies VGA-1/VGA to be - available, VGA-1/VGA has to list DVI-1/TMDS as well. - - "ConnectorNumber" aka RR_PROPERTY_CONNECTOR_NUMBER - Type: int32 - Flags: Immutable, Static - Range/List: 0- - - Outputs that route their signal to the same connector MUST - have the same connector number. Outputs with the same - connector number MUST route their signal to the same - connector, except if it is 0, which indicates unknown - connectivity. 1 is called the primary connector, 2 the - secondary. 3 is typically a TV connector, but that is completely - driver / hardware dependent. - Outputs with the same connector number SHOULD have the same - connector type. Meaning and client behavior for mismatching - connector types is undefined at the moment. - - "ConnectorType" aka RR_PROPERTY_CONNECTOR_TYPE - Type: int32 / Atom - Flags: Immutable, Static - Range/List: unknown VGA DVI DVI‐I DVI‐A DVI‐D HDMI Panel - TV TV-Composite TV-SVideo TV-Component - TV-SCART TV-C4 DisplayPort - - Connector type, as far as known to the driver. - Values with dashes (TV‐Composite) describe more specific versions of - the base values (TV). The former SHOULD be used if the connector is - not capable of producing other signal formats. The later SHOULD be - used if the exact connector is unknown, or the connector is a - multi‐format connector that is not described otherwise. DVI, for - instance, SHOULD be handled like a DVI‐I connector, unless additional - information is available to the user agent. PANEL describes - laptop‐internal (normally LVDS) displays. TV, TV‐SCART, TV‐Component, - and TV‐C4 with signal format VGA are valid combinations and describe - RGB TV signals. - - "EDID" aka RR_PROPERTY_RANDR_EDID - Type: int8 [n] - Flags: Immutable - Range/List: - - - Raw EDID data from the device attached to the according - output. Should include main EDID data and all extension - blocks. Previously known as EdidData. - - "SignalFormat" aka RR_PROPERTY_SIGNAL_FORMAT - Type: int32 / Atom - Flags: - - Range/List: unknown VGA TMDS LVDS Composite Composite-PAL - Composite-NTSC Composite-SECAM SVideo - Component DisplayPort - - Signal format / physical protocol format that is used for the - specified output. valid-values lists all possible formats on this - output, which SHOULD be a subset of the list above and MUST be static. - Values with dashes (Composite-PAL) describe more specific versions of - the base values (Composite) and SHOULD be used if known to the driver. - A driver MAY change this property of an output if the underlying - hardware indicates a protocol change (e.g. TV formats). Clients are - allowed to change the signal format in order to select a different - signal format (e.g. Composite etc.) or physical protocol (e.g. VGA or - TMDS on DVI-I). - Laptop panels SHOULD not be detected with this property, but rather by - ConnectorType. - - "SignalProperties" aka RR_PROPERTY_SIGNAL_FORMAT - Type: int32 [n] / Atom - Flags: - - Range/List: For Composite signals: - NTSC NTSC-M NTSC-J NTSC-N NTSC-4.43 NTSC-film - PAL PAL-B PAL-G PAL-H PAL-H PAL-I PAL-M PAL-D - PAL-N PAL-Nc PAL-L PAL-60 - SECAM SECAM-L SECAM-B SECAM-G SECAM-D SECAM-K - SECAM-H SECAM-K - For TMDS signals: - SingleLink DualLink - For DisplayPort signals: - Lane1 Lane2 Lane4 LowSpeed HiSpeed - - Properties of the signal format that is currently used for the - specified output. valid-values lists all possible properties on this - output, which SHOULD be a subset of the list above. It will change if - SignalFormat changes. Multiple properties are allowed. - Values with dashes (PAL-B) describe more specific versions of the base - values (PAL) and SHOULD be used if known to the driver. A driver MAY - change this property of an output if the underlying hardware indicates - a signal change (e.g. TV formats). Clients are allowed to change the - properties in order to select a different signal subformat. - - -9.2 Properties introduced with version 1.2 of the RandR extension - -Property Immutable Mandatory since -──────── ───────── ─────────────── -EDID yes n/a - -EDID is provided by the RandR frontend, thus not driver specific. - - -9.3 Properties introduced with version 1.3 of the RandR extension - -Property Immutable Mandatory since -──────── ───────── ─────────────── -CloneList yes not mandatory -CompatibilityList yes not mandatory -ConnectorNumber yes: static not mandatory -ConnectorType yes: static RandR 1.3 -SignalFormat no RandR 1.3 -SignalProperties no not mandatory - -9.4 Properties introduced with version 1.3.1 of the RandR extension - -Property Immutable Mandatory since -──────── ───────── ─────────────── -Backlight no not mandatory - - ❧❧❧❧❧❧❧❧❧❧❧ - -10. Extension Versioning - -The RandR extension was developed in parallel with the implementation -to ensure the feasibility of various portions of the design. As -portions of the extension are implemented, the version number of the -extension has changed to reflect the portions of the standard provided. -This document describes the version 1.2 of the specification, the -partial implementations have version numbers less than that. Here's a -list of what each version provided: - - 0.0: This prototype implemented resize and rotation in the - TinyX server Used approximately the protocol described in - the Usenix paper. Appeared in the TinyX server in - XFree86 4.2, but not in the XFree86 main server. - - 0.1: Added subpixel order, added an event for subpixel order. - This version was never checked in to XFree86 CVS. - - 1.0: Implements resize, rotation, and reflection. Implemented - both in the XFree86 main server (size change only at this - date), and fully (size change, rotation, and reflection) - in XFree86's TinyX server. - - 1.1: Added refresh rates - - 1.2: Separate screens from CRTCs and outputs, switch to full VESA - modes - - 1.3: Added cheap version of RRGetScreenResources. Added CRTC - transformations. Added panning. Added primary outputs. - Added standard properties. - -Compatibility between 0.0 and 1.0 was *NOT* preserved, and 0.0 clients -will fail against 1.0 servers. The wire encoding op-codes were -changed for GetScreenInfo to ensure this failure in a relatively -graceful way. Version 1.1 servers and clients are cross compatible with -1.0. Version 1.1 is considered to be stable and we intend upward -compatibility from this point. Version 1.2 offers an extended model of the -system with multiple output support. Version 1.3 adds a cheap version of -GetScreenResources to avoid expensive DDC operations, CRTC transformations, -panning, and the primary output concept. 1.2 and 1.3 are backward-compatible -with 1.1. - - ❧❧❧❧❧❧❧❧❧❧❧ - -11. Relationship with other extensions - -Two other extensions have a direct relationship with this extension. This -section attempts to explain how these three are supposed to work together. - -11.1 XFree86-VidModeExtension - -XFree86-VidModeExtension changes the configuration of a single monitor -attached to the screen without changing the configuration of the screen -itself. It provides the ability to specify new mode lines for the server to -use along with selecting among existing mode lines. As it uses screen -numbers instead of window identifiers, it can be used to affect multiple -monitors in a single-screen Xinerama configuration. However, the association -between screen numbers and root windows in a multi-Screen environment is not -defined by the extension. Version 2.0 of this extension added the ability to -adjust the DAC values in a TrueColor server to modify the brightness curves -of the display. - -All of the utility of this extension is subsumed by RandR version 1.2, RandR -should be used in preference to XFree86-VidModeExtension where both are -present. - -11.2 Xinerama - -Xinerama provides a mechanism for describing the relationship between the -overall screen display and monitors placed within that area. As such, it -provides the query functionality of RandR 1.2 without any of the -configuration functionality. Applications using Xinerama to discover -monitor geometry can continue to do so, with the caveat that they will not be -informed of changes when they occur. However, Xinerama configuration data -will be updated, so applications selecting for RandR notification and -re-querying the configuration with the Xinerama extension will get updated -information. It is probably better to view RandR as a superset of Xinerama -at this point and use it in preference to Xinerama where both are present. - - ❧❧❧❧❧❧❧❧❧❧❧ - -Appendix A. Protocol Encoding - -Syntactic Conventions - -This document uses the same syntactic conventions as the core X -protocol encoding document. - -A.1 Common Types - -┌─── - ROTATION - 0x0001 Rotate_0 - 0x0002 Rotate_90 - 0x0004 Rotate_180 - 0x0008 Rotate_270 - 0x0010 Reflect_X - 0x0020 Reflect_Y -└─── - Used to encode both sets of possible rotations and individual - selected rotations. - -┌─── - RRSELECTMASK - 0x0001 ScreenChangeNotifyMask - 0x0002 CrtcChangeNotifyMask Added in version 1.2 - 0x0004 OutputChangeNotifyMask Added in version 1.2 - 0x0008 OutputPropertyNotifyMask Added in version 1.2 -└─── - Event select mask for RRSelectInput - -┌─── - RRCONFIGSTATUS - 0x0 Success - 0x1 InvalidConfigTime - 0x2 InvalidTime - 0x3 Failed -└─── - Return status for requests which depend on time. - -┌─── - MODEINFO (32) Added in version 1.2 - 4 CARD32 id - 2 CARD16 width in pixels - 2 CARD16 height in pixels - 4 CARD32 dot clock - 2 CARD16 h sync start - 2 CARD16 h sync end - 2 CARD16 h total - 2 CARD16 h skew - 2 CARD16 v sync start - 2 CARD16 v sync end - 2 CARD16 v total - 2 CARD16 name length - 4 SETofMODEFLAG mode flags -└─── - - An output mode specifies the complete CRTC timings for - a specific mode. The vertical and horizontal synchronization rates - can be computed given the dot clock and the h total/v total - values. If the dot clock is zero, then all of the timing - parameters and flags are not used, and must be zero as this - indicates that the timings are unknown or otherwise unused. - The name itself will be encoded separately in each usage. - -┌─── - MODEFLAG - 0x00000001 HSyncPositive - 0x00000002 HSyncNegative - 0x00000004 VSyncPositive - 0x00000008 VSyncNegative - 0x00000010 Interlace - 0x00000020 DoubleScan - 0x00000040 CSync - 0x00000080 CSyncPositive - 0x00000100 CSyncNegative - 0x00000200 HSkewPresent - 0x00000400 BCast - 0x00000800 PixelMultiplex - 0x00001000 DoubleClock - 0x00002000 ClockDivideBy2 -└─── -┌─── - CONNECTION - 0 Connected - 1 Disconnected - 2 UnknownConnection -└─── - - -A.2 Protocol Requests - -Opcodes 1 and 3 were used in the 0.0 protocols, and will return -errors if used in version 1.0. - -┌─── - RRQueryVersion - - 1 CARD8 major opcode - 1 0 RandR opcode - 2 3 length - 4 CARD32 major version - 4 CARD32 minor version - ▶ - 1 1 Reply - 1 unused - 2 CARD16 sequence number - 4 0 reply length - 1 CARD32 major version - 1 CARD32 minor version -└─── -┌─── - RRSetScreenConfig - - 1 CARD8 major opcode - 1 2 RandR opcode - 2 6 length - 4 WINDOW window on screen to be configured - 4 TIMESTAMP timestamp - 4 TIMESTAMP config timestamp - 2 SIZEID size index - 2 ROTATION rotation/reflection - 2 CARD16 refresh rate (1.1 only) - 2 CARD16 pad - ▶ - 1 1 Reply - 1 RRCONFIGSTATUS status - 2 CARD16 sequence number - 4 0 reply length - 4 TIMESTAMP new timestamp - 4 TIMESTAMP new configuration timestamp - 4 WINDOW root - 2 SUBPIXELORDER subpixel order defined in Render - 2 CARD16 pad4 - 4 CARD32 pad5 - 4 CARD32 pad6 -└─── -┌─── - RRSelectInput - - 1 CARD8 major opcode - 1 4 RandR opcode - 2 3 length - 4 WINDOW window - 2 SETofRRSELECTMASK enable - 2 CARD16 pad -└─── -┌─── - RRGetScreenInfo - - 1 CARD8 major opcode - 1 5 RandR opcode - 2 2 length - 4 WINDOW window - ▶ - 1 1 Reply - 1 CARD8 set of Rotations - 2 CARD16 sequence number - 4 0 reply length - 4 WINDOW root window - 4 TIMESTAMP timestamp - 4 TIMESTAMP config timestamp - 2 CARD16 number of SCREENSIZE following - 2 SIZEID current size index - 2 ROTATION current rotation and reflection - 2 CARD16 current rate (added in version 1.1) - 2 CARD16 length of rate info (number of CARD16s) - 2 CARD16 pad - - SCREENSIZE - 2 CARD16 width in pixels - 2 CARD16 height in pixels - 2 CARD16 width in millimeters - 2 CARD16 height in millimeters - - REFRESH - 2 CARD16 number of rates (n) - 2n CARD16 rates -└─── - -A.2.1 Protocol Requests added with version 1.2 - -┌─── - RRGetScreenSizeRange - 1 CARD8 major opcode - 1 6 RandR opcode - 2 2 length - 4 WINDOW window - ▶ - 1 1 Reply - 1 unused - 2 CARD16 sequence number - 4 0 reply length - 2 CARD16 minWidth - 2 CARD16 minHeight - 2 CARD16 maxWidth - 2 CARD16 maxHeight - 16 unused -└─── -┌─── - RRSetScreenSize - 1 CARD8 major opcode - 1 7 RandR opcode - 2 5 length - 4 WINDOW window - 2 CARD16 width - 2 CARD16 height - 4 CARD32 width in millimeters - 4 CARD32 height in millimeters -└─── -┌─── - RRGetScreenResources - 1 CARD8 major opcode - 1 8 RandR opcode - 2 2 length - 4 WINDOW window - ▶ - 1 1 Reply - 1 unused - 2 CARD16 sequence number - 4 c+o+8m+(b+p)/4 reply length - 4 TIMESTAMP timestamp - 4 TIMESTAMP config-timestamp - 2 c number of CRTCs - 2 o number of outputs - 2 m number of modeinfos - 2 b total bytes in mode names - 8 unused - 4c LISTofCRTC crtcs - 4o LISTofOUTPUT outputs - 32m LISTofMODEINFO modeinfos - b STRING8 mode names - p unused, p=pad(b) -└─── -┌─── - RRGetOutputInfo - 1 CARD8 major opcode - 1 9 RandR opcode - 2 3 length - 4 OUTPUT output - 4 TIMESTAMP config-timestamp - ▶ - 1 1 Reply - 1 RRCONFIGSTATUS status - 2 CARD16 sequence number - 4 1+c+m+(n+p)/4 reply length - 4 TIMESTAMP timestamp - 4 CRTC current connected crtc - 4 CARD32 width in millimeters - 4 CARD32 height in millimeters - 1 CONNECTION connection - 1 SUBPIXELORDER subpixel-order - 2 c number of CRTCs - 2 m number of modes - 2 p number of preferred modes - 2 o number of clones - 2 n length of name - 4c LISTofCRTC crtcs - 4m LISTofMODE modes - 4o LISTofOUTPUT clones - n STRING8 name - p unused, p=pad(n) -└─── -┌─── - RRListOutputProperties - 1 CARD8 major opcode - 1 10 RandR opcode - 2 2 length - 4 OUTPUT output - ▶ - 1 1 Reply - 1 unused - 2 CARD16 sequence number - 4 n reply length - 2 n number of ATOMs in atoms - 22 unused - 4n LISTofATOM atoms -└─── -┌─── - RRQueryOutputProperty - 1 CARD8 major opcode - 1 11 RandR opcode - 2 3 request length - 4 OUTPUT output - 4 ATOM property - ▶ - 1 1 Reply - 1 unused - 2 CARD16 sequence number - 4 n reply length - 1 BOOL pending - 1 BOOL range - 1 BOOL immutable - 21 unused - 4n LISTofINT32 valid values -└─── -┌─── - RRConfigureOutputProperty - 1 CARD8 major opcode - 1 12 RandR opcode - 2 4+n request length - 4 OUTPUT output - 4 ATOM property - 1 BOOL pending - 1 BOOL range - 2 unused - 4n LISTofINT32 valid values -└─── -┌─── - RRChangeOutputProperty - 1 CARD8 major opcode - 1 13 RandR opcode - 2 6+(n+p)/4 request length - 4 OUTPUT output - 4 ATOM property - 4 ATOM type - 1 CARD8 format - 1 mode - 0 Replace - 1 Prepend - 2 Append - 2 unused - 4 CARD32 length of data in format units - (= n for format = 8) - (= n/2 for format = 16) - (= n/4 for format = 32) - n LISTofBYTE data - (n is a multiple of 2 for format = 16) - (n is a multiple of 4 for format = 32) - p unused, p=pad(n) -└─── -┌─── - RRDeleteOutputProperty - 1 CARD8 major opcode - 1 14 RandR opcode - 2 3 request length - 4 OUTPUT output - 4 ATOM property -└─── -┌─── - RRGetOutputProperty - 1 CARD8 major opcode - 1 15 RandR opcode - 2 7 request length - 4 OUTPUT output - 4 ATOM property - 4 ATOM type - 0 AnyPropertyType - 4 CARD32 long-offset - 4 CARD32 long-length - 1 BOOL delete - 1 BOOL pending - 2 unused - ▶ - 1 1 Reply - 1 CARD8 format - 2 CARD16 sequence number - 4 (n+p)/4 reply length - 4 ATOM type - 0 None - 4 CARD32 bytes-after - 4 CARD32 length of value in format units - (= 0 for format = 0) - (= n for format = 8) - (= n/2 for format = 16) - (= n/4 for format = 32) - 12 unused - n LISTofBYTE value - (n is zero for format = 0) - (n is a multiple of 2 for format = 16) - (n is a multiple of 4 for format = 32) - p unused, p=pad(n) -└─── -┌─── - RRCreateMode - 1 CARD8 major opcode - 1 16 RandR opcode - 2 12+(n+p)/4 length - 4 WINDOW window - 32 MODEINFO mode - n STRING8 mode name - p unused, p=pad(n) - ▶ - 1 1 Reply - 1 unused - 2 CARD16 sequence number - 4 0 reply length - 4 MODE mode - 20 unused -└─── -┌─── - RRDestroyMode - 1 CARD8 major opcode - 1 17 RandR opcode - 2 2 length - 4 MODE mode -└─── -┌─── - RRAddOutputMode - 1 CARD8 major opcode - 1 18 RandR opcode - 2 3 length - 4 OUTPUT output - 4 MODE mode -└─── -┌─── - RRDeleteOutputMode - 1 CARD8 major opcode - 1 19 RandR opcode - 2 3 length - 4 OUTPUT output - 4 MODE mode -└─── -┌─── - RRGetCrtcInfo - 1 CARD8 major opcode - 1 20 RandR opcode - 2 3 length - 4 CRTC crtc - 4 TIMESTAMP config-timestamp - ▶ - 1 1 Reply - 1 RRCONFIGSTATUS status - 2 CARD16 sequence number - 4 o+p reply length - 4 TIMESTATMP timestamp - 2 INT16 x - 2 INT16 y - 2 CARD16 width - 2 CARD16 height - 4 MODE mode - 2 ROTATION current rotation and reflection - 2 ROTATION set of possible rotations - 2 o number of outputs - 2 p number of possible outputs - 4o LISTofOUTPUT outputs - 4p LISTofOUTPUT possible outputs -└─── -┌─── - RRSetCrtcConfig - 1 CARD8 major opcode - 1 21 RandR opcode - 2 7+2n length - 4 CRTC crtc - 4 TIMESTAMP timestamp - 4 TIMESTAMP config timestamp - 2 INT16 x - 2 INT16 y - 4 MODE mode - 2 ROTATION rotation/reflection - 2 unused - 8n LISTofOUTPUT outputs - ▶ - 1 1 Reply - 1 RRCONFIGSTATUS status - 2 CARD16 sequence number - 4 0 reply length - 4 TIMESTAMP new timestamp - 20 unused -└─── -┌─── - RRGetCrtcGammaSize - 1 CARD8 major opcode - 1 22 RandR opcode - 2 2 length - 4 CRTC crtc - ▶ - 1 1 Reply - 1 unused - 2 CARD16 sequence number - 4 0 reply length - 2 CARD16 size - 22 unused -└─── -┌─── - RRGetCrtcGamma - 1 CARD8 major opcode - 1 23 RandR opcode - 2 2 length - 4 CRTC crtc - ▶ - 1 1 Reply - 1 unused - 2 CARD16 sequence number - 4 (6n+2)/4 reply length - 2 n size - 20 unused - 2n LISTofCARD16 red - 2n LISTofCARD16 green - 2n LISTofCARD16 blue - p unused, p=pad(6n) -└─── -┌─── - RRSetCrtcGamma - 1 CARD8 major opcode - 1 24 RandR opcode - 2 3+(6n+2)/4 length - 4 CRTC crtc - 2 n size - 2 unused - 2n LISTofCARD16 red - 2n LISTofCARD16 green - 2n LISTofCARD16 blue - p unused, p=pad(6n) -└─── - -A.2.2 Protocol Requests added with version 1.3 - -┌─── - RRGetScreenResourcesCurrent - 1 CARD8 major opcode - 1 25 RandR opcode - 2 2 length - 4 WINDOW window - ▶ - 1 1 Reply - 1 unused - 2 CARD16 sequence number - 4 c+o+8m+(b+p)/4 reply length - 4 TIMESTAMP timestamp - 4 TIMESTAMP config-timestamp - 2 c number of CRTCs - 2 o number of outputs - 2 m number of modeinfos - 2 b total bytes in mode names - 8 unused - 4c LISTofCRTC crtcs - 4o LISTofOUTPUT outputs - 32m LISTofMODEINFO modeinfos - b STRING8 mode names - p unused, p=pad(b) -└─── - -┌─── - RRSetCrtcTransform - 1 CARD8 major opcode - 1 26 RandR opcode - 2 12+(n+p)/4+v length - 4 CRTC crtc - 36 TRANSFORM transform - 2 CARD16 filter length - 2 unused - n STRING8 filter name - p unused, p=pad(n) - 4v FIXED filter params -└─── - -┌─── - RRGetCrtcTransform - 1 CARD8 major opcode - 1 27 RandR opcode - 2 2 length - 4 CRTC crtc - ▶ - 1 1 Reply - 1 unused - 2 CARD16 sequence number - 4 16+(pn+pnp)/4+(cn+cnp)/4+pf+cf reply length - 36 TRANSFORM pending transform - 1 BOOL has transforms - 3 unused - 36 TRANSFORM current transform - 4 unused - 2 pn pending filter name length - 2 pf pending filter num params - 2 cn current filter name length - 2 cf current filter num params - pn STRING8 pending filter name - pnp unused, pnp=pad(pn) - 4*pf FIXED pending filter params - cn STRING8 current filter name - cnp unused, cnp=pad(cn) - 4*cf FIXED current filter params -└─── - -┌─── - RRGetPanning - 1 CARD8 major opcode - 1 28 RandR opcode - 2 2 length - 4 CRTC crtc - ▶ - 1 1 Reply - 1 RRCONFIGSTATUS status - 2 CARD16 sequence number - 4 1 reply length - 4 TIMESTAMP timestamp - 2 CARD16 left - 2 CARD16 top - 2 CARD16 width - 2 CARD16 height - 2 CARD16 track_left - 2 CARD16 track_top - 2 CARD16 track_width - 2 CARD16 track_height - 2 INT16 border_left - 2 INT16 border_top - 2 INT16 border_right - 2 INT16 border_bottom -└─── -┌─── - RRSetPanning - 1 CARD8 major opcode - 1 29 RandR opcode - 2 9 length - 4 CRTC crtc - 4 TIMESTAMP timestamp - 2 CARD16 left - 2 CARD16 top - 2 CARD16 width - 2 CARD16 height - 2 CARD16 track_left - 2 CARD16 track_top - 2 CARD16 track_width - 2 CARD16 track_height - 2 INT16 border_left - 2 INT16 border_top - 2 INT16 border_right - 2 INT16 border_bottom - ▶ - 1 1 Reply - 1 RRCONFIGSTATUS status - 2 CARD16 sequence number - 4 0 reply length - 4 TIMESTAMP new timestamp - 20 unused -└─── - -┌─── - RRSetOutputPrimary - 1 CARD8 major opcode - 1 30 RandR opcode - 2 3 length - 4 WINDOW window - 4 OUTPUT output -└─── - -┌─── - RRGetOutputPrimary - 1 CARD8 major opcode - 1 31 RandR opcode - 2 2 length - 4 WINDOW window - ▶ - 1 1 Reply - 1 unused - 2 CARD16 sequence number - 4 CARD32 length - 4 OUTPUT output - 4 CARD32 pad1 - 4 CARD32 pad2 - 4 CARD32 pad3 - 4 CARD32 pad4 -└─── - -A.3 Protocol Events - -┌─── - RRScreenChangeNotify - 1 Base + 0 code - 1 ROTATION new rotation and reflection - 2 CARD16 sequence number - 4 TIMESTAMP timestamp - 4 TIMESTAMP configuration timestamp - 4 WINDOW root window - 4 WINDOW request window - 2 SIZEID size ID - 2 SUBPIXELORDER subpixel order defined in Render - 2 CARD16 width in pixels - 2 CARD16 height in pixels - 2 CARD16 width in millimeters - 2 CARD16 height in millimeters -└─── - -A.3.1 Protocol Events added with version 1.2 - -┌─── - RRCrtcChangeNotify - 1 Base + 1 code - 1 0 sub-code - 2 CARD16 sequence number - 4 TIMESTAMP timestamp - 4 WINDOW request window - 4 CRTC crtc affected - 4 MODE mode in use - 2 ROTATION new rotation and reflection - 2 unused - 2 INT16 x - 2 INT16 y - 2 CARD16 width - 2 CARD16 height -└─── -┌─── - RROutputChangeNotify - 1 Base + 1 code - 1 1 sub-code - 2 CARD16 sequence number - 4 TIMESTAMP timestamp - 4 TIMESTAMP configuration timestamp - 4 WINDOW request window - 4 OUTPUT output affected - 4 CRTC crtc in use - 4 MODE mode in use - 2 ROTATION rotation in use - 1 CONNECTION connection status - 1 SUBPIXELORDER subpixel order -└─── -┌─── - RROutputPropertyNotify - 1 Base + 1 code - 1 2 sub-code - 2 CARD16 sequence number - 4 WINDOW window - 4 OUTPUT output - 4 ATOM atom - 4 TIMESTAMP time - 1 state - 0 NewValue - 1 Deleted - 11 unused -└─── - -A.4 Protocol Errors - -┌─── - ERRORS - Base + 0 Output - Base + 1 Crtc - Base + 2 Mode -└─── - -Bibliography - -[RANDR] Gettys, Jim and Keith Packard, "The X Resize and Rotate - Extension - RandR", Proceedings of the 2001 USENIX Annual - Technical Conference, Boston, MA - -[RENDER] - Packard, Keith, "The X Rendering Extension", work in progress, - http://cgit.freedesktop.org/xorg/proto/renderproto/tree/renderproto.txt + The X Resize, Rotate and Reflect Extension + Version 1.4.0 + 2009-10-5 + + Jim Gettys + Jim.Gettys@hp.com + Cambridge Research Laboratory + HP Labs + Hewlett Packard Company + + Keith Packard + keith.packard@intel.com + Open Source Technology Center + Intel Corporation + +1. Introduction + +The X Resize, Rotate and Reflect Extension, called RandR for short, +brings the ability to resize, rotate and reflect the root window of a +screen. It is based on the X Resize and Rotate Extension as specified +in the Proceedings of the 2001 Usenix Technical Conference [RANDR]. + +RandR as implemented and integrated into the X server differs in +one substantial fashion from the design discussed in that paper: that +is, RandR 1.0 does not implement the depth switching described in that +document, and the support described for that in the protocol in that +document and in the implementation has been removed from the +protocol described here, as it has been overtaken by events. + +These events include: + ► Modern toolkits (in this case, GTK+ 2.x) have progressed to the point + of implementing migration between screens of arbitrary depths + ► The continued advance of Moore's law has made limited amounts of VRAM + less of an issue, reducing the pressure to implement depth switching + on laptops or desktop systems + ► The continued decline of legacy toolkits whose design would have + required depth switching to support migration + ► The lack of depth switching implementation experience in the + intervening time, due to events beyond our control + +Additionally, the requirement to support depth switching might +complicate other re-engineering of the device independent part of the +X server that is currently being contemplated. + +Rather than further delaying RandR's widespread deployment for a feature +long wanted by the community (resizing of screens, particularly on laptops), +or the deployment of a protocol design that might be flawed due to lack of +implementation experience, we decided to remove depth switching from the +protocol. It may be implemented at a later time if resources and +interests permit as a revision to the protocol described here, which will +remain a stable base for applications. The protocol described here has been +implemented in the main X.org server, and more fully in the hw/kdrive +implementation in the distribution, which fully implements resizing, +rotation and reflection. + +1.2 Introduction to version 1.2 of the extension + +One of the significant limitations found in version 1.1 of the RandR +protocol was the inability to deal with the Xinerama model where multiple +monitors display portions of a common underlying screen. In this environment, +zero or more video outputs are associated with each CRT controller which +defines both a set of video timings and a 'viewport' within the larger +screen. This viewport is independent of the overall size of the screen, and +may be located anywhere within the screen. + +The effect is to decouple the reported size of the screen from the size +presented by each video output, and to permit multiple outputs to present +information for a single screen. + +To extend RandR for this model, we separate out the output, CRTC and screen +configuration information and permit them to be configured separately. For +compatibility with the 1.1 version of the protocol, we make the 1.1 requests +simultaneously affect both the screen and the (presumably sole) CRTC and +output. The set of available outputs are presented with UTF-8 encoded names +and may be connected to CRTCs as permitted by the underlying hardware. CRTC +configuration is now done with full mode information instead of just size +and refresh rate, and these modes have names. These names also use UTF-8 +encoding. New modes may also be added by the user. + +Additional requests and events are provided for this new functionality. + + ┌────────────────────────────────┬──────────┐ + ┏━━━━━━━┳───────────────┐ ╔════════╗ ╔════════╗ + ┃ 1 ┃ │ ║ A ║ ║ B ║ + ┃ ┏━━━╋━━━━━━━━━━━━━━━┫ ║ ║ ║ ║ + ┣━━━╋━━━┛ ┃ ╚════════╝ ╚════════╝ + │ ┃ 2 ┃─────────────────┐ + │ ┃ ┃ ╔═══════════════════╗ + │ ┃ ┃ ║ ║ + │ ┗━━━━━━━━━━━━━━━━━━━┫ ║ C ║ + └───────────────────────┘ ║ ║ + ┌──────┐ ┏━━━━┓ ╔══════╗ ║ ║ + │screen│ ┃CRTC┃ ║output║ ╚═══════════════════╝ + └──────┘ ┗━━━━┛ ╚══════╝ + +In this picture, the screen is covered (incompletely) by two CRTCs. CRTC1 +is connected to two outputs, A and B. CRTC2 is connected to output C. +Outputs A and B will present exactly the same region of the screen using +the same mode line. Output C will present a different (larger) region of +the screen using a different mode line. + +RandR provides information about each available CRTC and output; the +connection between CRTC and output is under application control, although +the hardware will probably impose restrictions on the possible +configurations. The protocol doesn't try to describe these restrictions, +instead it provides a mechanism to find out what combinations are supported. + +1.3 Introduction to version 1.3 of the extension + +Version 1.3 builds on the changes made with version 1.2 and adds some new +capabilities without fundmentally changing the extension again. The +following features are added in this version: + + • Projective Transforms. The implementation work for general rotation + support made it trivial to add full projective transformations. These + can be used to scale the screen up/down as well as perform projector + keystone correct or other effects. + + • Panning. It was removed with RandR 1.2 because the old semantics didn't + fit any longer. With RandR 1.3 panning can be specified per crtc. + +1.4 Introduction to version 1.4 of the extension + +Version 1.4 adds a couple more capabilities to further expose the +underlying hardware to clients + + • Per-crtc pixmaps. This provides for multiple scan-out buffers + which applications can create and assign to arbitrary collections + of crtcs. + + • Sprite position and image transforms. These provide a projective + transform for both the hot spot location and the sprite image + itself for each CRTC. + + • RRSetCrtcConfigs request. This supplies a set of + crtc configurations to the server that must be applied together + or not at all. This can reduce screen flicker while also + providing the server a complete configuration for appropriate + resource management. + +The first two additions, per-crtc pixmaps and sprite transforms are +designed to solve two problems: + + 1) Screen transforms. The software transform code in the X server + uses a shadow frame buffer, adding another copy to every graphics + operation. Worse, the server has no idea about when clients are + done drawing a frame, so the user gets additional latency and + judder. + + The goal is to move this operation out to the compositing manager + which already deals with an extra copy of the frame buffer for + many operations. Have the compositing manager create and draw to a + separate pixmap for scanout. It can perform whatever transforms + are required to get the image in the right orientation for the + user. + + 2) Hardware scanout engine size limits. With a single scanout buffer + for the entire screen, it's possible for the user to ask for a + configuration which requires that scanout buffer to be larger than + the hardware is capable of scanning out from. Again, having the + compositing manager create a pixmap for each CRTC will allow for + any configuration where monitor position within the virtual space + isn't limited by the scanout limits. + +In both of these cases, the Sprite transforms are necessary to ensure +that the sprite appears at the desired spot on each CRTC and with the +right shape. + +1.99 Acknowledgements + +Our thanks to the contributors to the design found on the xpert mailing +list, in particular: + +Alan Hourihane for work on the early implementation +Andrew C. Aitchison for help with the XFree86 DDX implementation +Andy Ritger for early questions about how mergefb/Xinerama work with RandR +Carl Worth for editing the specification and Usenix paper +David Dawes for XFree86 DDX integration work +Thomas Winischhofer for the hardware-accelerated SiS rotation implementation +Matthew Tippett and Kevin Martin for splitting outputs and CRTCs to more +fully expose what video hardware can do + + ❧❧❧❧❧❧❧❧❧❧❧ + +2. Screen change model + +Screens may change dynamically, either under control of this extension, or +due to external events. Examples include: monitors being swapped, pressing a +button to switch from internal display to an external monitor on a laptop, +or, eventually, the hotplug of a display card entirely on busses such as +Cardbus or Express Card which permit hot-swap (which will require other work +in addition to this extension). + +Since the screen configuration is dynamic and asynchronous to the client and +may change at any time RandR provides mechanisms to ensure that your clients +view is up to date with the configuration possibilities of the moment and +enforces applications that wish to control the configuration to prove that +their information is up to date before honoring requests to change the +screen configuration (by requiring a timestamp on the request). + +Interested applications are notified whenever the screen configuration +changes, providing the current size of the screen and subpixel order (see +the Render extension [RENDER]), to enable proper rendering of subpixel +decimated client text to continue, along with a time stamp of the +configuration change. A client must refresh its knowledge of the screen +configuration before attempting to change the configuration after a +notification, or the request will fail. + +To avoid multiplicative explosion between orientation, reflection and sizes, +the sizes are only those sizes in the normal (0) rotation. + +Rotation and reflection and how they interact can be confusing. In Randr, +the coordinate system is rotated in a counter-clockwise direction relative +to the normal orientation. Reflection is along the window system coordinate +system, not the physical screen X and Y axis, so that rotation and +reflection do not interact. The other way to consider reflection is to is +specified in the "normal" orientation, before rotation, if you find the +other way confusing. + +We expect that most clients and toolkits will be oblivious to changes to the +screen structure, as they generally use the values in the connections Display +structure directly. By toolkits updating the values on the fly, we believe +pop-up menus and other pop up windows will position themselves correctly in +the face of screen configuration changes (the issue is ensuring that pop-ups +are visible on the reconfigured screen). + + ❧❧❧❧❧❧❧❧❧❧❧ + +3. Data Types + +The subpixel order is shared with the Render extension, and is documented +there. The only datatype defined is the screen size, defined in the normal +(0 degree) orientation. + + ❧❧❧❧❧❧❧❧❧❧❧ + +4. Errors + +Errors are sent using core X error reports. + +Output + A value for an OUTPUT argument does not name a defined OUTPUT. +CRTC + A value for a CRTC argument does not name a defined CRTC. +Mode + A value for a MODE argument does not name a defined MODE. + + ❧❧❧❧❧❧❧❧❧❧❧ + +5. Protocol Types + +RRCONFIGSTATUS { Success + InvalidConfigTime + InvalidTime + Failed } + + A value of type RRCONFIGSTATUS returned when manipulating the output + configuration or querying information from the server that has some + time-dependency. + + InvalidConfigTime indicates that the supplied configuration + timestamp does not match the current X server configuration + timestamp. Usually this means that the output configuration has + changed since the timestamp was received by the application. + + InvalidTime indicates that the supplied output reconfiguration time + is earlier than the most recent output reconfiguration request. + Generally this indicates that another application has reconfigured + the output using a later timestamp. + + Failed is returned whenever the operation is unsuccessful for some + other reason. This generally indicates that the requested output + configuration is unsupported by the hardware. The goal is to make + these limitations expressed by the protocol, but when that isn't + possible it is correct to return this error value. If, as a + implentor, you find this error code required, please submit the + hardware constraints that exist so that a future version of the + extension can correctly capture the configuration constraints in + your system. + +ROTATION { Rotate_0 + Rotate_90 + Rotate_180 + Rotate_270 + Reflect_X + Reflect_Y } + + These values are used both to indicate a set of allowed rotations + and reflections as well as to indicate a specific rotation and + reflection combination. + +RRSELECTMASK { RRScreenChangeNotifyMask + RRCrtcChangeNotifyMask (New in version 1.2) + RROutputChangeNotifyMask (New in version 1.2) + RROutputPropertyNotifyMask (New in version 1.2) } + +SIZEID { CARD16 } + +MODE { XID or None } + +CRTC { XID } + +OUTPUT { XID } + +CONNECTION { Connected, Disconnected, UnknownConnection } + + This value provides an indication of whether an output is actually + connected to a monitor or other presentation device. + +SUBPIXELORDER { SubPixelUnknown The subpixel order uses the Render + SubPixelHorizontalRGB extensions definitions; they are here + SubPixelHorizontalBGR only for convenience. + SubPixelVerticalRGB + SubPixelVerticalBGR + SubPixelNone } + +SCREENSIZE { widthInPixels, heightInPixels: CARD16 + widthInMillimeters, heightInMillimeters: CARD16 } + +MODEFLAG { HSyncPositive + HSyncNegative + VSyncPositive + VSyncNegative + Interlace + DoubleScan + CSync + CSyncPositive + CSyncNegative + HSkewPresent + BCast + PixelMultiplex + DoubleClock + ClockDivideBy2 } + +MODEINFO { id: MODE + name: STRING + width, height: CARD16 + dotClock: CARD32 + hSyncStart, hSyncEnd, hTotal, hSkew: CARD16 + vSyncStart, vSyncEnd, vTotal: CARD16 + modeFlags: SETofMODEFLAG } + +REFRESH { rates: LISTofCARD16 } + + ❧❧❧❧❧❧❧❧❧❧❧ + +5.4. Protocol Types added in version 1.4 of the extension + +SCANOUTPIXMAPINFO { format: PICTFORMAT + maxWidth, maxHeight: CARD16 + rotations: SETofROTATION } + + 'format' is the format of the pixels within the scanout + pixmap. Only 'Direct' formats are supported, this will never + be an 'Indexed' format. + + 'maxWidth' and 'maxHeight' define the largest supported + scanout pixmap. There is no minimum size; scanout pixmaps down + to 1x1 may be created. + + 'rotations' lists the set of rotations which can be provided + without additional latency or memory usage within the + environment. This typically means that they are supported + directly by the hardware. It is expected that a compositing + manager will perform other transforms as a part of the + compositing process in conjunction with the sprite transforms + described in this extension. + +SCREENFLAG { SetScreenPixmapSize + SetScreenSize + SetScreenSizeInMillimeters + SetScreenCrtcs } + +CRTCFLAG { SetCrtcPosition + SetCrtcMode + SetCrtcRotation + SetCrtcOutputs + SetCrtcSpritePositionTransform + SetCrtcSpriteImageTransform + SetCrtcPixmap + SetCrtcPixmapPosition } + +CRTCCONFIG { crtc: CRTC + set: SETofCRTCFLAG + x, y: INT16 + mode: MODE + rotation: ROTATION + sprite-position-transform: TRANSFORM + sprite-image-transform: TRANSFORM + outputs: LISTofOUTPUT + pixmap: PIXMAP or None + pixmap-x, pixmap-y: INT16 } + + If 'set' includes SetCrtcSpritePositionTransform, then + sprite-position-transform is used as in the + RRSetCrtcSpriteTransform request position-transform parameter. + + If 'set' includes SetCrtcSpriteImageTransform, then + sprite-image-transform is used as in the + RRSetCrtcSpriteTransform request image-transform parameter. + + If 'set' includes SetCrtcPixmap, then 'pixmap' specifies the + origin of the pixel data to be presented on 'crtc'. If + 'pixmap' is None, then data will be presented from the screen + pixmap. + + If 'set' includes SetCrtcPixmapPosition, then 'pixmap-x' and + 'pixmap-y' specify the origin of the scanout data within the + pixmap, the area from that location to pixmap-x + + width-of(mode), pixmap-y + height-of(mode) is what will be + seen on the connected outputs. + + If 'set' includes SetCrtcPixmap, then 'pixmap' must specify a + scanout pixmap as created by RRCreateScanoutPixmap or + None. Otherwise a Match error results. Furthermore: + + * 'pixmap' must be at least as large as the area to be + scanned out, or a Match error results. + + * If 'pixmap' is destroyed while still being used as a + scanout pixmap, then the associated CRTC will have its + scanout pixmap set back to None, the CRTC origin set back + to 0,0 (to make sure it fits) and the screen pixmap width + and height increased to be at least as big as the current + CRTC mode. + + * Future crtc changes that do not change the scanout pixmap + will cause an existing scanout pixmap to be resized to be + large enough to hold the new mode at the then-current + pixmap-x/pixmap-y location. + + If 'set' includes SetCrtcRotation then: + + * Any new or existing scanout pixmap must have had the + specified 'rotation' included as a part of its creation + parameters, or a Match error results. + + * If no scanout pixmap is in use, then the crtc must support + 'rotation' else a Value error results. + + ❧❧❧❧❧❧❧❧❧❧❧ + +6. Extension Initialization + +The name of this extension is "RANDR". + +┌─── + RRQueryVersion + client-major-version: CARD32 + client-minor-version: CARD32 + ▶ + major-version: CARD32 + minor-version: CARD32 +└─── + + The client sends the highest supported version to the server + and the server sends the highest version it supports, but no + higher than the requested version. Major versions changes can + introduce incompatibilities in existing functionality, minor + version changes introduce only backward compatible changes. + It is the clients responsibility to ensure that the server + supports a version which is compatible with its expectations. + + ❧❧❧❧❧❧❧❧❧❧❧ + +7. Extension Requests + +┌─── + RRSelectInput + window: WINDOW + enable: SETofRRSELECTMASK +└─── + Errors: Window, Value + + If 'enable' is RRScreenChangeNotifyMask, RRScreenChangeNotify events + will be sent when the screen configuration changes, either from + this protocol extension, or due to detected external screen + configuration changes. RRScreenChangeNotify may also be sent when + this request executes if the screen configuration has changed since + the client connected, to avoid race conditions. + + New for version 1.2: + + If 'enable' contains RRCrtcChangeMask, RRCrtcChangeNotify events + will be sent when a the configuration for a CRTC associated with the + screen changes, either through this protocol extension or due to + detected external changes. RRCrtcChangeNotify may also be sent when + this request executes if the CRTC configuration has changed since + the client connected, to avoid race conditions. + + If 'enable' contains RROutputChangeMask, RROutputChangeNotify events + will be sent when a the configuration for an output associated with + the screen changes, either through this protocol extension or due to + detected external changes. RROutputChangeNotify may also be sent + when this request executes if the output configuration has changed + since the client connected, to avoid race conditions. + + If 'enable' contains RROutputPropertyNotifyMask, + RROutputPropertyNotify events will be sent when properties change on + this output. + +┌─── + RRSetScreenConfig + window: WINDOW + timestamp: TIMESTAMP + config-timestamp: TIMESTAMP + size-id: SIZEID + rotation: ROTATION + rate: CARD16 + ▶ + status: RRCONFIGSTATUS + new-timestamp: TIMESTAMP + config-timestamp: TIMESTAMP + root: WINDOW + subpixelOrder: SUBPIXELORDER +└─── + Errors: Value, Match + + If 'timestamp' is less than the time when the configuration was last + successfully set, the request is ignored and InvalidTime returned in + status. + + If 'config-timestamp' is not equal to when the server's screen + configurations last changed, the request is ignored and + InvalidConfigTime returned in status. This could occur if the + screen changed since you last made a RRGetScreenInfo request, + perhaps by a different piece of display hardware being installed. + Rather than allowing an incorrect call to be executed based on stale + data, the server will ignore the request. + + 'rate' contains the desired refresh rate. If it is zero, the server + selects an appropriate rate. + + This request may fail for other indeterminate reasons, in which case + 'status' will be set to Failed and no configuration change will be + made. + + This request sets the screen to the specified size, rate, rotation + and reflection. + + When this request succeeds, 'status' contains Success and the + requested changes to configuration will have been made. + + 'new-time-stamp' contains the time at which this request was + executed. + + 'config-timestamp' contains the time when the possible screen + configurations were last changed. + + 'root' contains the root window for the screen indicated by the + window. + + 'subpixelOrder' contains the resulting subpixel order of the screen + to allow correct subpixel rendering. + + Value errors are generated when 'rotation', 'rate' or 'size-id' + are invalid. + +┌─── + RRGetScreenInfo + window: WINDOW + ▶ + rotations: SETofROTATION + root: WINDOW + timestamp: TIMESTAMP + config-timestamp: TIMESTAMP + size-id: SIZEID + rotation: ROTATION + rate: CARD16 + sizes: LISTofSCREENSIZE + refresh: LISTofREFRESH +└─── + + Errors: Window + + RRGetScreenInfo returns information about the current and available + configurations for the screen associated with 'window'. + + 'rotations' contains the set of rotations and reflections supported + by the screen. + + 'root' is the root window of the screen. + + 'config-timestamp' indicates when the screen configuration + information last changed: requests to set the screen will fail + unless the timestamp indicates that the information the client + is using is up to date, to ensure clients can be well behaved + in the face of race conditions. + + 'timestamp' indicates when the configuration was last set. + + 'size-id' indicates which size is active. + + 'rate' is the current refresh rate. This is zero when the refresh + rate is unknown or on devices for which refresh is not relevant. + + 'sizes' is the list of possible frame buffer sizes (at the normal + orientation. Each size indicates both the linear physical size of + the screen and the pixel size. + + 'refresh' is the list of refresh rates for each size. Each element + of 'sizes' has a corresponding element in 'refresh'. An empty list + indicates no known rates, or a device for which refresh is not + relevant. + + The default size of the screen (the size that would become the + current size when the server resets) is the first size in the + list. + +7.1. Extension Requests added in version 1.2 of the extension + +As introduced above, version 1.2 of the extension splits the screen size +from the crtc and output configuration, permitting the subset of the screen +presented by multiple outputs to be configured. As a separate notion, the +size of the screen itself may be arbitrarily configured within a defined +range. As crtcs and outputs are added and removed from the system, the set +returned by the extension will change so that applications can detect +dynamic changes in the display environment. + +┌─── + RRGetScreenSizeRange + window: WINDOW + ▶ + CARD16 minWidth, minHeight + CARD16 maxWidth, maxHeight +└─── + Errors: Window + + Returns the range of possible screen sizes. The screen may be set to + any size within this range. + +┌─── + RRSetScreenSize + window: WINDOW + width: CARD16 + height: CARD16 + width-in-millimeters: CARD32 + height-in-millimeters: CARD32 +└─── + Errors: Window, Match, Value + + Sets the screen to the specified size. 'width' and 'height' must be + within the range allowed by GetScreenSizeRanges, otherwise a Value + error results. All active monitors must be configured to display a + subset of the specified size, else a Match error results. + + 'width-in-millimeters' and 'height-in-millimeters' can be set to + reflect the physical size of the screen reported both through this + extension and the core protocol. They must be non-zero, or Value + error results. + + If panning is enabled, the width and height of the panning and the + tracking areas are adapted to the new size and clamped afterwards. + Disabled panning axes remain disabled. + Panning borders are disabled if their requirements are no longer met + (see RRSetPanning). + +┌─── + RRGetScreenResources + window: WINDOW + ▶ + timestamp: TIMESTAMP + config-timestamp: TIMESTAMP + crtcs: LISTofCRTC + outputs: LISTofOUTPUT + modes: LISTofMODEINFO +└─── + Errors: Window + + RRGetScreenResources returns the list of outputs and crtcs connected + to the screen associated with 'window'. + + 'timestamp' indicates when the configuration was last set. + + 'config-timestamp' indicates when the configuration information last + changed. Requests to configure the output will fail unless the + timestamp indicates that the information the client is using is up + to date, to ensure clients can be well behaved in the face of race + conditions. + + 'crtcs' contains the list of CRTCs associated with the screen. + + 'outputs' contains the list of outputs associated with the screen. + + 'modes' contains the list of modes associated with the screen + + This request explicitly asks the server to ensure that the + configuration data is up-to-date wrt the hardware. If that requires + polling, this is when such polling would take place. If the + current configuration is all that's required, use + RRGetScreenResourcesCurrent instead. + +┌─── + RRGetOutputInfo + output: OUTPUT + config-timestamp: TIMESTAMP + ▶ + status: RRCONFIGSTATUS + timestamp: TIMESTAMP + crtc: CRTC + + name: STRING + connection: CONNECTION + subpixel-order: SUBPIXELORDER + widthInMillimeters, heightInMillimeters: CARD32 + crtcs: LISTofCRTC + clones: LISTofOUTPUT + modes: LISTofMODE + num-preferred: CARD16 +└─── + Errors: Output + + RRGetOutputInfo returns information about the current and available + configurations 'output'. + + If 'config-timestamp' does not match the current configuration + timestamp (as returned by RRGetScreenResources), 'status' is set to + InvalidConfigTime and the remaining reply data is empty. Otherwise, + 'status' is set to Success. + + 'timestamp' indicates when the configuration was last set. + + 'crtc' is the current source CRTC for video data, or Disabled if the + output is not connected to any CRTC. + + 'name' is a UTF-8 encoded string designed to be presented to the + user to indicate which output this is. E.g. "S-Video" or "DVI". + + 'connection' indicates whether the hardware was able to detect a + device connected to this output. If the hardware cannot determine + whether something is connected, it will set this to + UnknownConnection. + + 'subpixel-order' contains the resulting subpixel order of the + connected device to allow correct subpixel rendering. + + 'widthInMillimeters' and 'heightInMillimeters' report the physical + size of the displayed area. If unknown, or not really fixed (e.g., + for a projector), these values are both zero. + + 'crtcs' is the list of CRTCs that this output may be connected to. + Attempting to connect this output to a different CRTC results in a + Match error. + + 'clones' is the list of outputs which may be simultaneously + connected to the same CRTC along with this output. Attempting to + connect this output with an output not in the 'clones' list + results in a Match error. + + 'modes' is the list of modes supported by this output. Attempting to + connect this output to a CRTC not using one of these modes results + in a Match error. + + The first 'num-preferred' modes in 'modes' are preferred by the + monitor in some way; for fixed-pixel devices, this would generally + indicate which modes match the resolution of the output device. + +┌─── + RRListOutputProperties + output:OUTPUT + ▶ + atoms: LISTof ATOM +└─── + Errors: Output + + This request returns the atoms of properties currently defined on + the output. + +┌─── + RRQueryOutputProperty + output: OUTPUT + property: ATOM + ▶ + pending: BOOL + range: BOOL + immutable: BOOL + valid-values: LISTofINT32 +└─── + Errors: Name, Atom, Output + + If the specified property does not exist for the specified output, + then a Name error is returned. + + If 'pending' is TRUE, changes made to property values with + RRChangeOutputProperty will be saved in the pending property value + and be automatically copied to the current value on the next + RRSetCrtcConfig request involving the named output. If 'pending' is + FALSE, changes are copied immediately. + + If 'range' is TRUE, then the valid-values list will contain + precisely two values indicating the minimum and maximum allowed + values. If 'range' is FALSE, then the valid-values list will contain + the list of possible values; attempts to set other values will + result in a Value error. + + If 'immutable' is TRUE, then the property configuration cannot be + changed by clients. Immutable properties are interpreted by the X + server. + +┌─── + RRConfigureOutputProperty + output: OUTPUT + property: ATOM + pending: BOOL + range: BOOL + valid-values: LISTofINT32 +└─── + Errors: Access, Name, Atom, Output + + If the specified property is 'immutable', an Access error is + returned. + + Otherwise, the configuration of the specified property is changed to + the values provided in this request. + + If the specified property does not exist for the specified output, + it is created with an empty value and None type. + +┌─── + RRChangeOutputProperty + output: OUTPUT + property, type: ATOM + format: {8, 16, 32} + mode: { Replace, Prepend, Append } + data: LISTofINT8 or LISTofINT16 or LISTofINT32 +└─── + Errors: Alloc, Atom, Match, Value, Output + + This request alters the value of the property for the specified + output. If the property is marked as a 'pending' property, only the + pending value of the property is changed. Otherwise, changes are + reflected in both the pending and current values of the property. + The type is uninterpreted by the server. The format specifies + whether the data should be viewed as a list of 8-bit, 16-bit, or + 32-bit quantities so that the server can correctly byte-swap as + necessary. + + If the mode is Replace, the previous property value is discarded. + If the mode is Prepend or Append, then the type and format must + match the existing property value (or a Match error results). If + the property is undefined, it is treated as defined with the correct + type and format with zero-length data. + + For Prepend, the data is tacked on to the beginning of the existing + data, and for Append, it is tacked on to the end of the existing data. + + This request generates a OutputPropertyNotify + + The lifetime of a property is not tied to the storing client. + Properties remain until explicitly deleted, until the output is + destroyed, or until server reset (see section 10). + + The maximum size of a property is server-dependent and may vary + dynamically. + +┌─── + RRDeleteOutputProperty + output: OUTPUT + property: ATOM +└─── + Errors: Atom, Output + + This request deletes the property from the specified window if the + property exists and generates a OutputPropertyNotify event unless + the property does not exist. + +┌─── + RRGetOutputProperty + output: OUTPUT + property: ATOM + type: ATOM or AnyPropertyType + long-offset, long-length: CARD32 + delete: BOOL + pending: BOOL + ▶ + type: ATOM or None + format: {0, 8, 16, 32} + bytes-after: CARD32 + value: LISTofINT8 or LISTofINT16 or LISTofINT32 +└─── + Errors: Atom, Value, Output + + If the specified property does not exist for the specified output, + then the return type is None, the format and bytes-after are zero, + and the value is empty. The delete argument is ignored in this + case. + + If the specified property exists but its type does not match the + specified type, then the return type is the actual type of the + property, the format is the actual format of the property (never + zero), the bytes-after is the length of the property in bytes (even + if the format is 16 or 32), and the value is empty. The delete + argument is ignored in this case. + + If the specified property exists and either AnyPropertyType is + specified or the specified type matches the actual type of the + property, then the return type is the actual type of the property, + the format is the actual format of the property (never zero), and + the bytes-after and value are as follows, given: + + N = actual length of the stored property in bytes + (even if the format is 16 or 32) + I = 4 × offset + T = N - I + L = MINIMUM(T, 4 × long-length) + A = N - (I + L) + + If 'pending' is true, and if the property holds a pending value, + then the value returned will be the pending value of the property + rather than the current value. The returned value starts at byte + index I in the property (indexing from 0), and its length in bytes + is L. However, it is a Value error if long-offset is given such + that L is negative. The value of bytes-after is A, giving the + number of trailing unread bytes in the stored property. If delete + is True and the bytes-after is zero, the property is also deleted + from the output, and a RROutputPropertyNotify event is generated. + +┌─── + RRCreateMode + window: WINDOW + modeinfo: MODEINFO + ▶ + mode: MODE +└─── + Errors: Window, Name, Value + + 'modeinfo' provides a new mode for outputs on the screen + associated with 'window'. If the name of 'modeinfo' names an + existing mode, a Name error is returned. If some parameter of the + mode is not valid in some other way, a Value error is returned. + + The returned 'mode' provides the id for the mode. + +┌─── + RRDestroyMode + mode: MODE +└─── + Errors: Mode, Access + + The user-defined 'mode' is destroyed. 'mode' must name a mode + defined with RRCreateMode, else an Match error is returned. If + 'mode' is in use by some CRTC or Output, then an Access error is + returned. + +┌─── + RRAddOutputMode + output: OUTPUT + mode: MODE +└─── + Errors: Output, Mode, Match + + 'output' indicates which output is to be configured. + + 'mode' specifies which mode to add. If 'mode' is not valid for + 'output', then a Match error is generated. + + This request generates OutputChangeNotify events. + +┌─── + RRDeleteOutputMode + output: OUTPUT + mode: MODE +└─── + Errors: Output, Mode + + 'output' indicates which output is to be configured. + + 'mode' specifies which mode to delete. 'mode' must have been added + with RRAddOutputMode, else an Access error is returned. 'mode' must + not be active, else a Match error is returned. + + This request generates OutputChangeNotify events. + +┌─── + RRGetCrtcInfo + crtc: CRTC + config-timestamp: TIMESTAMP + ▶ + status: RRCONFIGSTATUS + timestamp: TIMESTAMP + x, y: INT16 + width, height: CARD16 + mode: MODE + rotation: ROTATION + outputs: LISTofOUTPUT + + rotations: SETofROTATION + possible-outputs: LISTofOUTPUT +└─── + + Errors: Window + + RRGetCrtcModes returns information about the current and available + configurations for the specified crtc connected to the screen + associated with 'window'. + + If 'config-timestamp' does not match the current configuration + timestamp (as returned by RRGetScreenResources), 'status' is set to + InvalidConfigTime and the remaining reply data is empty. Otherwise, + 'status' is set to Success. + + 'timestamp' indicates when the configuration was last set. + + 'x' and 'y' indicate the position of this CRTC within the screen + region. They will be set to 0 when the CRTC is disabled. + + 'width' and 'height' indicate the size of the area within the screen + presented by this CRTC. This may be different than the size of the + mode due to rotation. They will be set to 0 when the CRTC + is disabled. + + 'mode' indicates which mode is active, or None indicating that the + CRTC has been disabled and is not displaying the screen contents. + + 'rotation' indicates the active rotation. It is set to Rotate_0 + when the CRTC is disabled. + + 'outputs' is the list of outputs currently connected to this CRTC + and is empty when the CRTC is disabled. + + 'rotations' contains the set of rotations and reflections supported + by the CRTC. + + 'possible-outputs' lists all of the outputs which may be connected + to this CRTC. + +┌─── + RRSetCrtcConfig + crtc: CRTC + timestamp: TIMESTAMP + config-timestamp: TIMESTAMP + x, y: INT16 + mode: MODE + rotation: ROTATION + outputs: LISTofOUTPUT + ▶ + status: RRCONFIGSTATUS + new-timestamp: TIMESTAMP +└─── + Errors: Value, Match + + If 'timestamp' is less than the time when the configuration was last + successfully set, the request is ignored and InvalidTime returned in + status. + + If 'config-timestamp' is not equal to when the monitor's + configuration last changed, the request is ignored and + InvalidConfigTime returned in status. This could occur if the + monitor changed since you last made a RRGetScreenInfo request, + perhaps by a different monitor being connected to the machine. + Rather than allowing an incorrect call to be executed based on stale + data, the server will ignore the request. + + 'x' and 'y' contain the desired location within the screen for this + monitor's content. 'x' and 'y' must be within the screen size, else + a Value error results. + + 'mode' is either the desired mode or None indicating the CRTC should + be disabled. If 'mode' is not one of these values, a Value + error results. 'mode' must be valid for all of the configured outputs, + else a Match error. + + 'rotation' contains the desired rotation along with which + reflections should be enabled. The rotation and reflection values + must be among those allowed for this monitor, else a Value error + results. + + 'outputs' contains the set of outputs that this CRTC should be + connected to. The set must be among the list of acceptable output + sets for this CRTC or a Match error results. + + If 'mode' is None, then 'outputs' must be empty, else a Match error + results. Conversely, if 'mode' is not None, then 'outputs' must not be + empty, else a Match error results. + + This request may fail for other indeterminate reasons, in which case + 'status' will be set to Failed and no configuration change will be + made. + + This request sets the CRTC to the specified position, mode, rotation + and reflection. The entire area of the CRTC must fit within the + screen size, else a Match error results. As an example, rotating the + screen so that a single CRTC fills the entire screen before and + after may necessitate disabling the CRTC, resizing the screen, + then re-enabling the CRTC at the new configuration to avoid an + invalid intermediate configuration. + + If panning is enabled, the width and height of the panning and the + tracking areas are clamped to the new mode size. + Disabled panning axes remain disabled. + Panning borders are disabled if their requirements are no longer met + (see RRSetPanning). + + When this request succeeds, 'status' contains Success and the + requested changes to configuration will have been made. + + 'new-time-stamp' contains the time at which this request was + executed. + +┌─── + RRGetCrtcGammaSize + crtc: CRTC + ▶ + size: CARD16 +└─── + Errors: Crtc + + This request returns the size of the gamma ramps used by 'crtc'. + +┌─── + RRGetCrtcGamma + crtc: CRTC + ▶ + red: LISTofCARD16 + green: LISTofCARD16 + blue: LISTofCARD16 +└─── + Errors: Crtc + + This request returns the currently set gamma ramps for 'crtc'. All + three lists will be the size returned by the RRGetCrtcGammaSize + request. + +┌─── + RRSetCrtcGamma + crtc: CRTC + red: LISTofCARD16 + green: LISTofCARD16 + blue: LISTofCARD16 +└─── + Errors: Crtc, Match + + This request sets the gamma ramps for 'crtc'. All three lists + must be the size returned by RRGetCrtcGammaSize else a Value error + results. + +7.2. Extension Requests added in version 1.3 of the extension + +┌─── + RRGetScreenResourcesCurrent + window: WINDOW + ▶ + timestamp: TIMESTAMP + config-timestamp: TIMESTAMP + crtcs: LISTofCRTC + outputs: LISTofOUTPUT + modes: LISTofMODEINFO +└─── + Errors: Window + + RRGetScreenResourcesCurrent returns the list of outputs and crtcs + connected to the screen associated with 'window'. + + 'timestamp' indicates when the configuration was last set. + + 'config-timestamp' indicates when the configuration information last + changed. Requests to configure the output will fail unless the + timestamp indicates that the information the client is using is up + to date, to ensure clients can be well behaved in the face of race + conditions. + + 'crtcs' contains the list of CRTCs associated with the screen. + + 'outputs' contains the list of outputs associated with the screen. + + 'modes' contains the list of modes associated with the screen. + + Unlike RRGetScreenResources, this merely returns the current + configuration, and does not poll for hardware changes. + +┌─── + RRSetCrtcTransform + crtc: CRTC + transform: TRANSFORM + filter: STRING8 + values: LISTofFIXED +└─── + Errors: Crtc, Match + + This request provides a mechanism that is more general than the + existing rotation and reflection values for describing the + transformation from frame buffer image to crtc presentation. + 'transform' is a full 2D projective transformation from screen + coordinate space to crtc coordinate space. This transformation is + applied before the rotation and reflection values to compute the + complete transform. + + 'filter' and 'values' specify a Render filter that may be used by the + server when transforming data from frame buffer to crtc. + + This request sets the transform to be used at the next + RRSetCrtcConfig request execution; it does not cause any change to + occur in the current configuration. + + When a non-identity transformation is in use, the rectangle returned + by RRGetCrtcInfo defines the bounding rectangle of the screen that is + projected to the crtc. It is this projected rectangle which must be + within the area of the screen when the mode is set. + +┌─── + RRGetCrtcTransform + crtc: CRTC + ▶ + pending-transform: TRANSFORM + pending-filter: STRING8 + pending-values: LISTofFIXED + current-transform: TRANSFORM + current-filter: STRING8 + current-values: LISTofFIXED +└─── + + This request returns the pending and current transforms for the + specified CRTC. The pending transform will be the same as the current + transform if no new pending transform has been set since the last call + to RRSetCrtcConfig. + +┌─── + RRGetPanning + crtc: CRTC + ▶ + status: RRCONFIGSTATUS + timestamp: TIMESTAMP + left, top, width, height: CARD16 + track_left, track_top, track_width, track_height: CARD16 + border_left, border_top, border_right, border_bottom: INT16 +└─── + + Errors: Crtc + + Version 1.3 adds panning support again. If multiple crtcs are active + the panning behavior can be defined per crtc individually. + RRGetPanning returns information about the currently set panning + configuration for the specified crtc. If the CRTC does not support + panning, all fields (except timestamp) will be 0. + + 'timestamp' indicates when the configuration was last set. + + All other entries are explained for RRSetPanning. + +┌─── + RRSetPanning + crtc: CRTC + timestamp: TIMESTAMP + left, top, width, height: CARD16 + track_left, track_top, track_width, track_height: CARD16 + border_left, border_top, border_right, border_bottom: INT16 + ▶ + status: RRCONFIGSTATUS + new-timestamp: TIMESTAMP +└─── + Errors: Crtc, Match + + This request sets the panning parameters. As soon as panning is + enabled, the CRTC position can change with every pointer move. + RRCrtcChangeNotify events are sent to the clients requesting those. + + If 'timestamp' is less than the time when the configuration was last + successfully set, the request is ignored and InvalidTime returned in + status. + + ┌──┳━━━━━━━━━━━━━━┳─────┬ ─ ─ ─ ─ ─ ┐ + │ ┃ CRTC ┃ │ + │ ┃ ┃ │ │ + │ ┃ X┃→ │ + │ ┃ ┃ │ │ framebuffer + │ ┗━━━━━━━━━━━━━━┛ │ + │ │ │ + │panning area │ + └───────────────────────┴ ─ ─ ─ ─ ─ ┘ + + 'left', 'top', 'width', and 'height' contain the total panning area + for this CRTC. 'width' has to be larger than or equal to the CRTC's + width or 0, and 'left'+'width' must be within the screen size, else a + Match error results. Equivalent restrictions for the height exist. + 'width' or 'height' set to 0 indicate that panning should be disabled + on the according axis. Setting 'width'/'height' to the CRTC's + width/height will disable panning on the X/Y axis as well, but + RRSetScreenSize will silently enable panning if the screen size is + increased. This does not happen if set to 0. + + ┌────────┳━━━━━━━━━━━━━━┳ ─ ─ ─ ─ ─ ┐ + │ ┃ CRTC ┃ + │ ┃ ┃ │ + │ ┃ ┃ + │ ┃ ┃ │ tracking area + │ ┗━━━━━━━━━━━━━━┫ X + │ ↓ │ ↓ │ + │panning area │ + └───────────────────────┴ ─ ─ ─ ─ ─ ┘ + + 'track_left', 'track_top', 'track_width', and 'track_height' contain + the pointer area for which the panning region is updated. For normal + use cases it should enclose the panning area minus borders, and is + typically set to either the panning area minus borders, or to the + total screen size. If set to the total screen size, the CRTC will pan + in the remaining axis even if the pointer is outside the panning area + on a different CRTC, as shown in the figure above. If the pointer is + outside the tracking area, the CRTC will not pan. Zero can be used as + an alias for the total screen size. + + ┌──┳━━━━━━━━━━━━━━┳────────────┐ + │ ┃ CRTC ┃ │ + │ ┃ ┃ │ + │ ┃ ┃→ │ + │ ┃ X←→┃ │ + │ ┃ border_right │ + │ ┗━━━━━━━━━━━━━━┛ │ + │ │ + │panning area │ + └──────────────────────────────┘ + + 'border_left', 'border_top', 'border_right', and 'border_bottom' + define the distances from the CRTC borders that will activate panning + if the pointer hits them. If the borders are 0, the screen will pan + when the pointer hits the CRTC borders (behavior of pre-RandR Xserver + panning). If the borders are positive, the screen will pan when the + pointer gets close to the CRTC borders, if they are negative, the + screen will only pan when the pointer is already way past the CRTC + borders. Negative values might confuse users and disable panning to + the very edges of the screen. Thus they are discouraged. + border_left + border_right has to be lower or equal than the CRTC's + width, else a Match error results. An equivalent restriction for the + height exists. + + Screen size changes update the panning and the tracking areas to the + new size. Both screen size changes and mode changes clamp these areas + to the current CRTC size. In these cases panning borders are disabled + if their requirements are no longer met. + + When this request succeeds, 'status' contains Success and the + requested changes to configuration will have been made. + + 'new-time-stamp' contains the time at which this request was + executed. + +┌─── + RRSetOutputPrimary + window: WINDOW + output: OUTPUT +└─── + Errors: Match, Output, Window + + RRSetOutputPrimary marks 'output' as the primary output for the + screen with the same root window as 'window'. This output's CRTC + will be sorted to the front of the list in Xinerama and RANDR + geometry requests for the benefit of older applications. The + default primary output is None, and None is a legal value to pass + to RRSetOutputPrimary. This request is expected to be used by + desktop environments to mark the screen that should hold the primary + menu bar or panel. + + As this changes the logical layout of the screen, ConfigureNotify + and RRScreenChangeNotify will be generated on the appropriate root + window when the primary output is changed by this call. This request + also generates RROutputChangeNotify events on the outputs that gained + and lost primary status. + + If an output is disconnected asynchronously (eg. due to recabling), + the primary status does not change, but RROutputChangeNotify events + will be generated if the hardware is capable of detecting this; + clients are expected to reconfigure if appropriate. + + If an output is deleted (eg. due to device hotplug), the server will + act as though None was passed to RRSetOutputPrimary, including + generating the appropriate events. + +┌─── + RRGetOutputPrimary + window: WINDOW + ▶ + output: OUTPUT +└─── + Errors: Window + + RRGetOutputPrimary returns the primary output for the screen. + + ❧❧❧❧❧❧❧❧❧❧❧ + +7.3. Extension Requests added in version 1.4 of the extension. + +┌─── + RRQueryScanoutPixmaps + window: WINDOW + ▶ + infos: LISTofSCANOUTPIXMAPINFO +└─── + Errors: Window + + This request returns information about the server support for + alternate scanout pixmaps. For each pictformat, there is a set + of rotations and a maximum supported size. The rotations here + are those provided by the scanout hardware itself, not by + software emulation. + +┌─── + RRCreateScanoutPixmap + pixmap: PIXMAP + drawable: DRAWABLE + width, height: CARD16 + format: PICTFORMAT + rotations: SETofROTATION +└─── + Errors: Drawable, Match, Value + + Creates a pixmap which can subsequently be used as a scanout + buffer for the screen associated with 'drawable'. 'rotations' + is the set of rotation values which may be used with the + resulting scanout buffer when it is associated with a CRTC. + + 'format' must be one of the supported scanout formats, or a + Match error results. + + 'width' and 'height' must be within the supported range for + the specified format or a Value error results. + + 'rotations' must be a subset of those supported for the + specified format or a Match error results. + +┌─── + RRSetCrtcSpriteTransform + crtc: CRTC + position-transform: TRANSFORM + image-transform: TRANSFORM +└─── + Sets the sprite transforms for the specified crtc, any sprites + presented on this crtc will have their positions transformed + by the position-transform matrix. Sprite images displayed on the crtc + will be transformed by the image-transform matrix. + +┌─── + RRGetCrtcSpriteTransform + crtc: CRTC + ▶ + position-transform: TRANSFORM + image-transform: TRANSFORM +└─── + Gets the sprite transforms for the specified crtc. + +┌─── + RRSetCrtcConfigs + drawable: DRAWABLE + set: SETofSCREENFLAG + screen-pixmap-width: CARD16 + screen-pixmap-height: CARD16 + screen-width: CARD16 + screen-height: CARD16 + width-in-millimeters: CARD32 + height-in-millimeters: CARD32 + configs: LISTofCRTCCONFIG + ▶ + status: RRCONFIGSTATUS +└─── + Errors: Value, Match + + This works much like RRSetScreenSize followed by a sequence of + RRSetCrtcConfig, except that the entire configuration can be set + in a single operation, either succeeding or failing without + any partial execution. + + If 'set' includes 'SetScreenPixmapSize', then + 'screen-pixmap-width' and 'screen-pixmap-height' specify the + new screen pixmap size. + + If 'set' includes 'SetScreenSize', then 'screen-width' and + 'screen-height' specify the new screen size. + + If 'set' includes 'SetScreenSizeInMillimeters', then + 'width-in-millimeters' and 'height-in-millimeters' specify + the new screen physical size. + + If 'set' includes 'SetScreenCrtcs', then 'configs' includes + the list of new CRTC configurations. + + In addition to the pre-1.4 semantics, this request adds the + ability to specific a scanout pixmap for each crtc, and + integrates the 1.4 sprite transform request as well. + + ❧❧❧❧❧❧❧❧❧❧❧ + +8. Extension Events + +Clients MAY select for ConfigureNotify on the root window to be +informed of screen changes. This may be advantageous if all your +client needs to know is the size of the root window, as it avoids +round trips to set up the extension. + +RRScreenChangeNotify is sent if RRSelectInput has requested it +whenever properties of the screen change, which may be due to external +factors, such as re-cabling a monitor, etc. + +┌─── + RRScreenChangeNotify + + rotation: ROTATION; new rotation + sequenceNumber: CARD16 low 16 bits of request seq. number + timestamp: TIMESTAMP time screen was changed + configTimestamp: TIMESTAMP time config data was changed + root: WINDOW root window of screen + window: WINDOW window requesting notification + size-id: SIZEID index of new SCREENSIZE + subpixelOrder: SUBPIXELORDER order of subpixels + widthInPixels: CARD16 width in pixels of the new SCREENSIZE + heightInPixels: CARD16 height in pixels of the new SCREENSIZE + widthInMillimeters: CARD16 width in mm of the new SCREENSIZE + heightInMillimeters: CARD16 height in mm of the new SCREENSIZE +└─── + This event is generated whenever the screen configuration is changed + and sent to requesting clients. 'timestamp' indicates when the + screen configuration was changed. 'configTimestamp' says when the + last time the configuration was changed. 'root' is the root of the + screen the change occurred on, 'window' is window selecting for this + event. 'size-id' contains the index of the current size. + + This event is sent whenever the screen's configuration changes + or if a new screen configuration becomes available that was + not available in the past. In this case (config-timestamp in + the event not being equal to the config-timestamp returned in + the last call to RRGetScreenInfo), the client MUST call + RRGetScreenInfo to update its view of possible screen + configurations to have a correct view of possible screen + organizations. + + Clients which select screen change notification events may be + sent an event immediately if the screen configuration was + changed between when they connected to the X server and + selected for notification. This is to prevent a common race + that might occur on log-in, where many applications start up + just at the time when a display manager or log in script might + be changing the screen size or configuration. + + Note that the sizes in this event reflect the new SCREENSIZE and + thus will appear rotated by the 'rotation' parameter from the sizes + of the screen itself. In other words, when rotation is 90 or 270, + widthInPixels in this event will be the same as the height value + from a ConfigureNotify that reflects the same size change. This + will probably confuse developers. + +8.1 Events added in version 1.2 of the RandR extension + +┌─── + RROutputChangeNotify: + timestamp: TIMESTAMP time screen was reconfigured + config-timestamp: TIMESTAMP time available config data was changed + window: WINDOW window requesting notification + output: OUTPUT output affected by change + crtc: CRTC connected CRTC or None + mode: MODE mode in use on CRTC or None + connection: CONNECTION connection status +└─── + + This event is generated whenever the available output configurations + have changed and is sent to requesting clients. 'timestamp' + indicates when the crtc configuration was changed by a client. + 'config-timestamp' says when the last time the available + configurations changed. 'root' is the root of the screen the change + occurred on, 'window' is window selecting for this event. The + precise change can be detected by examining the new state of the + system. + +┌─── + RROutputPropertyNotify: + window: WINDOW window requesting notification + output: OUTPUT output affected by change + atom: ATOM affected property + time: TIMESTAMP time property was changed + subpixel-order: SUBPIXELORDER order of subpixels + state: { NewValue, Deleted } new property state +└─── + + This event is reported to clients selecting RROutputPropertyChange + on the window and is generated with state NewValue when a property + of the window is changed using RRChangeOutputProperty even when + adding zero-length data and when replacing all or part of a property + with identical data. It is generated with state Deleted when a + property of the window is deleted using either + RRDeleteOutputProperty or RRGetOutputProperty. The timestamp + indicates the server time when the property was changed. + +┌─── + RRCrtcChangeNotify + timestamp: TIMESTAMP time monitor was changed + window: WINDOW window requesting notification + crtc: CRTC CRTC which changed + mode: MODE new mode + rotation: ROTATION; new rotation + x: INT16 x position of CRTC within screen + y: INT16 y position of CRTC within screen + width: CARD16 width of new mode + height: CARD16 height of new mode +└─── + This event is generated whenever the CRTC configuration is changed + and sent to requesting clients. 'timestamp' indicates when the + CRTC configuration was changed. 'window' is window selecting for this + event. 'mode' is the new mode, or None if the crtc is disabled. + 'x' and 'y' mark the location in the screen where this CRTC + is reading data. 'width' and 'height' indicate the size of the + mode. 'x', 'y, 'width' and 'height' are all zero when 'mode' is None. + + This event is sent whenever the monitor's configuration changes + or if a new monitor configuration becomes available that was + not available in the past. In this case, the client MUST call + RRGetCrtcModes to update its view of possible monitor + configurations to have a correct view of possible monitor + organizations. + + Clients which select monitor change notification events may be + sent an event immediately if the monitor configuration was + changed between when they connected to the X server and + selected for notification. This is to prevent a common race + that might occur on log-in, where many applications start up + just at the time when a display manager or log in script might + be changing the monitor size or configuration. + + ❧❧❧❧❧❧❧❧❧❧❧ + +9. Properties + +Properties are used for output specific parameters, and for announcing +static or rarely changing data. Announced data is typically +immutable. Properties are also used for evaluating new parameters +before adding them to the RandR protocol. + +The following properties are hereby declared official, and drivers SHOULD +prefix driver specific properties with '_', unless they are planned to be +added to this specification. List values, that are not declared by the table +below, and will remain driver specific or are not planned to be added to this +specification, SHOULD be prefixed with "_" as well in order to avoid name +space or semantics clashes with future extensions of these values. + +Beginning with version 1.3 of the RandR extension, certain properties +are mandatory and MUST be provided by implementations. Earlier +versions of the RandR extension MAY provide these properties as well, +as long as the semantics are not altered. Clients SHOULD fall back +gracefully to lower version functionality, though, if the driver +doesn't handle a mandatory property correctly. + +9.1 Known properties + + "Backlight" aka RR_PROPERTY_BACKLIGHT + Type: int32 + Flags: - + Range/List: 0-x (driver specific) + + This property controls the brightness on laptop panels and equivalent + displays with a backlight controller. The driver specific maximum + value MUST turn the backlight to full brightness, 1 SHOULD turn the + backlight to minimum brightness, 0 SHOULD turn the backlight off. + + "CloneList" aka RR_PROPERTY_CLONE_LIST + Type: int32 [2*n] / Atom pairs + Flags: Immutable + Range/List: 0- + + Some combinations of outputs on some cards cannot be served + independently from each other, because they are wired up to the same + encoder outputs. + This property lists all output + signal format pairs that are + driven together with this output, and thus can only be programmed in + clone mode with the same CRTC. + This property MUST be symmetric, but may change with changing signal + format. I.e. if the property for DVI-1/VGA specifies VGA-1/VGA to be + cloned, VGA-1/VGA has to list DVI-1/VGA as well. + Outputs / format pairs listed in this property MUST be included in the + CompatibilityList. + + "CompatibilityList" aka RR_PROPERTY_COMPATIBILITY_LIST + Type: int32 [2*n] / Atom pairs + Flags: Immutable + Range/List: 0- + + Some combinations of outputs on some cards cannot be served at all, + because the according encoder is only capable of driving one output at + a time. + This property lists all output + signal format pairs that can be + driven together with this output. NULL atoms specify any output / any + signal format, respectively. + This property MUST be symmetric, but may change with changing signal + format. I.e. if the property for DVI-1/TMDS specifies VGA-1/VGA to be + available, VGA-1/VGA has to list DVI-1/TMDS as well. + + "ConnectorNumber" aka RR_PROPERTY_CONNECTOR_NUMBER + Type: int32 + Flags: Immutable, Static + Range/List: 0- + + Outputs that route their signal to the same connector MUST + have the same connector number. Outputs with the same + connector number MUST route their signal to the same + connector, except if it is 0, which indicates unknown + connectivity. 1 is called the primary connector, 2 the + secondary. 3 is typically a TV connector, but that is completely + driver / hardware dependent. + Outputs with the same connector number SHOULD have the same + connector type. Meaning and client behavior for mismatching + connector types is undefined at the moment. + + "ConnectorType" aka RR_PROPERTY_CONNECTOR_TYPE + Type: int32 / Atom + Flags: Immutable, Static + Range/List: unknown VGA DVI DVI‐I DVI‐A DVI‐D HDMI Panel + TV TV-Composite TV-SVideo TV-Component + TV-SCART TV-C4 DisplayPort + + Connector type, as far as known to the driver. + Values with dashes (TV‐Composite) describe more specific versions of + the base values (TV). The former SHOULD be used if the connector is + not capable of producing other signal formats. The later SHOULD be + used if the exact connector is unknown, or the connector is a + multi‐format connector that is not described otherwise. DVI, for + instance, SHOULD be handled like a DVI‐I connector, unless additional + information is available to the user agent. PANEL describes + laptop‐internal (normally LVDS) displays. TV, TV‐SCART, TV‐Component, + and TV‐C4 with signal format VGA are valid combinations and describe + RGB TV signals. + + "EDID" aka RR_PROPERTY_RANDR_EDID + Type: int8 [n] + Flags: Immutable + Range/List: - + + Raw EDID data from the device attached to the according + output. Should include main EDID data and all extension + blocks. Previously known as EdidData. + + "SignalFormat" aka RR_PROPERTY_SIGNAL_FORMAT + Type: int32 / Atom + Flags: - + Range/List: unknown VGA TMDS LVDS Composite Composite-PAL + Composite-NTSC Composite-SECAM SVideo + Component DisplayPort + + Signal format / physical protocol format that is used for the + specified output. valid-values lists all possible formats on this + output, which SHOULD be a subset of the list above and MUST be static. + Values with dashes (Composite-PAL) describe more specific versions of + the base values (Composite) and SHOULD be used if known to the driver. + A driver MAY change this property of an output if the underlying + hardware indicates a protocol change (e.g. TV formats). Clients are + allowed to change the signal format in order to select a different + signal format (e.g. Composite etc.) or physical protocol (e.g. VGA or + TMDS on DVI-I). + Laptop panels SHOULD not be detected with this property, but rather by + ConnectorType. + + "SignalProperties" aka RR_PROPERTY_SIGNAL_FORMAT + Type: int32 [n] / Atom + Flags: - + Range/List: For Composite signals: + NTSC NTSC-M NTSC-J NTSC-N NTSC-4.43 NTSC-film + PAL PAL-B PAL-G PAL-H PAL-H PAL-I PAL-M PAL-D + PAL-N PAL-Nc PAL-L PAL-60 + SECAM SECAM-L SECAM-B SECAM-G SECAM-D SECAM-K + SECAM-H SECAM-K + For TMDS signals: + SingleLink DualLink + For DisplayPort signals: + Lane1 Lane2 Lane4 LowSpeed HiSpeed + + Properties of the signal format that is currently used for the + specified output. valid-values lists all possible properties on this + output, which SHOULD be a subset of the list above. It will change if + SignalFormat changes. Multiple properties are allowed. + Values with dashes (PAL-B) describe more specific versions of the base + values (PAL) and SHOULD be used if known to the driver. A driver MAY + change this property of an output if the underlying hardware indicates + a signal change (e.g. TV formats). Clients are allowed to change the + properties in order to select a different signal subformat. + + +9.2 Properties introduced with version 1.2 of the RandR extension + +Property Immutable Mandatory since +──────── ───────── ─────────────── +EDID yes n/a + +EDID is provided by the RandR frontend, thus not driver specific. + + +9.3 Properties introduced with version 1.3 of the RandR extension + +Property Immutable Mandatory since +──────── ───────── ─────────────── +CloneList yes not mandatory +CompatibilityList yes not mandatory +ConnectorNumber yes: static not mandatory +ConnectorType yes: static RandR 1.3 +SignalFormat no RandR 1.3 +SignalProperties no not mandatory + +9.4 Properties introduced with version 1.3.1 of the RandR extension + +Property Immutable Mandatory since +──────── ───────── ─────────────── +Backlight no not mandatory + + ❧❧❧❧❧❧❧❧❧❧❧ + +10. Extension Versioning + +The RandR extension was developed in parallel with the implementation +to ensure the feasibility of various portions of the design. As +portions of the extension are implemented, the version number of the +extension has changed to reflect the portions of the standard provided. +This document describes the version 1.2 of the specification, the +partial implementations have version numbers less than that. Here's a +list of what each version provided: + + 0.0: This prototype implemented resize and rotation in the + TinyX server Used approximately the protocol described in + the Usenix paper. Appeared in the TinyX server in + XFree86 4.2, but not in the XFree86 main server. + + 0.1: Added subpixel order, added an event for subpixel order. + This version was never checked in to XFree86 CVS. + + 1.0: Implements resize, rotation, and reflection. Implemented + both in the XFree86 main server (size change only at this + date), and fully (size change, rotation, and reflection) + in XFree86's TinyX server. + + 1.1: Added refresh rates + + 1.2: Separate screens from CRTCs and outputs, switch to full VESA + modes + + 1.3: Added cheap version of RRGetScreenResources. Added CRTC + transformations. Added panning. Added primary outputs. + Added standard properties. + +Compatibility between 0.0 and 1.0 was *NOT* preserved, and 0.0 clients +will fail against 1.0 servers. The wire encoding op-codes were +changed for GetScreenInfo to ensure this failure in a relatively +graceful way. Version 1.1 servers and clients are cross compatible with +1.0. Version 1.1 is considered to be stable and we intend upward +compatibility from this point. Version 1.2 offers an extended model of the +system with multiple output support. Version 1.3 adds a cheap version of +GetScreenResources to avoid expensive DDC operations, CRTC transformations, +panning, and the primary output concept. 1.2 and 1.3 are backward-compatible +with 1.1. + + ❧❧❧❧❧❧❧❧❧❧❧ + +11. Relationship with other extensions + +Two other extensions have a direct relationship with this extension. This +section attempts to explain how these three are supposed to work together. + +11.1 XFree86-VidModeExtension + +XFree86-VidModeExtension changes the configuration of a single monitor +attached to the screen without changing the configuration of the screen +itself. It provides the ability to specify new mode lines for the server to +use along with selecting among existing mode lines. As it uses screen +numbers instead of window identifiers, it can be used to affect multiple +monitors in a single-screen Xinerama configuration. However, the association +between screen numbers and root windows in a multi-Screen environment is not +defined by the extension. Version 2.0 of this extension added the ability to +adjust the DAC values in a TrueColor server to modify the brightness curves +of the display. + +All of the utility of this extension is subsumed by RandR version 1.2, RandR +should be used in preference to XFree86-VidModeExtension where both are +present. + +11.2 Xinerama + +Xinerama provides a mechanism for describing the relationship between the +overall screen display and monitors placed within that area. As such, it +provides the query functionality of RandR 1.2 without any of the +configuration functionality. Applications using Xinerama to discover +monitor geometry can continue to do so, with the caveat that they will not be +informed of changes when they occur. However, Xinerama configuration data +will be updated, so applications selecting for RandR notification and +re-querying the configuration with the Xinerama extension will get updated +information. It is probably better to view RandR as a superset of Xinerama +at this point and use it in preference to Xinerama where both are present. + + ❧❧❧❧❧❧❧❧❧❧❧ + +Appendix A. Protocol Encoding + +Syntactic Conventions + +This document uses the same syntactic conventions as the core X +protocol encoding document. + +A.1 Common Types + +┌─── + ROTATION + 0x0001 Rotate_0 + 0x0002 Rotate_90 + 0x0004 Rotate_180 + 0x0008 Rotate_270 + 0x0010 Reflect_X + 0x0020 Reflect_Y +└─── + Used to encode both sets of possible rotations and individual + selected rotations. + +┌─── + RRSELECTMASK + 0x0001 ScreenChangeNotifyMask + 0x0002 CrtcChangeNotifyMask Added in version 1.2 + 0x0004 OutputChangeNotifyMask Added in version 1.2 + 0x0008 OutputPropertyNotifyMask Added in version 1.2 +└─── + Event select mask for RRSelectInput + +┌─── + RRCONFIGSTATUS + 0x0 Success + 0x1 InvalidConfigTime + 0x2 InvalidTime + 0x3 Failed +└─── + Return status for requests which depend on time. + +┌─── + MODEINFO (32) Added in version 1.2 + 4 CARD32 id + 2 CARD16 width in pixels + 2 CARD16 height in pixels + 4 CARD32 dot clock + 2 CARD16 h sync start + 2 CARD16 h sync end + 2 CARD16 h total + 2 CARD16 h skew + 2 CARD16 v sync start + 2 CARD16 v sync end + 2 CARD16 v total + 2 CARD16 name length + 4 SETofMODEFLAG mode flags +└─── + + An output mode specifies the complete CRTC timings for + a specific mode. The vertical and horizontal synchronization rates + can be computed given the dot clock and the h total/v total + values. If the dot clock is zero, then all of the timing + parameters and flags are not used, and must be zero as this + indicates that the timings are unknown or otherwise unused. + The name itself will be encoded separately in each usage. + +┌─── + MODEFLAG + 0x00000001 HSyncPositive + 0x00000002 HSyncNegative + 0x00000004 VSyncPositive + 0x00000008 VSyncNegative + 0x00000010 Interlace + 0x00000020 DoubleScan + 0x00000040 CSync + 0x00000080 CSyncPositive + 0x00000100 CSyncNegative + 0x00000200 HSkewPresent + 0x00000400 BCast + 0x00000800 PixelMultiplex + 0x00001000 DoubleClock + 0x00002000 ClockDivideBy2 +└─── +┌─── + CONNECTION + 0 Connected + 1 Disconnected + 2 UnknownConnection +└─── + + +A.2 Protocol Requests + +Opcodes 1 and 3 were used in the 0.0 protocols, and will return +errors if used in version 1.0. + +┌─── + RRQueryVersion + + 1 CARD8 major opcode + 1 0 RandR opcode + 2 3 length + 4 CARD32 major version + 4 CARD32 minor version + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 1 CARD32 major version + 1 CARD32 minor version +└─── +┌─── + RRSetScreenConfig + + 1 CARD8 major opcode + 1 2 RandR opcode + 2 6 length + 4 WINDOW window on screen to be configured + 4 TIMESTAMP timestamp + 4 TIMESTAMP config timestamp + 2 SIZEID size index + 2 ROTATION rotation/reflection + 2 CARD16 refresh rate (1.1 only) + 2 CARD16 pad + ▶ + 1 1 Reply + 1 RRCONFIGSTATUS status + 2 CARD16 sequence number + 4 0 reply length + 4 TIMESTAMP new timestamp + 4 TIMESTAMP new configuration timestamp + 4 WINDOW root + 2 SUBPIXELORDER subpixel order defined in Render + 2 CARD16 pad4 + 4 CARD32 pad5 + 4 CARD32 pad6 +└─── +┌─── + RRSelectInput + + 1 CARD8 major opcode + 1 4 RandR opcode + 2 3 length + 4 WINDOW window + 2 SETofRRSELECTMASK enable + 2 CARD16 pad +└─── +┌─── + RRGetScreenInfo + + 1 CARD8 major opcode + 1 5 RandR opcode + 2 2 length + 4 WINDOW window + ▶ + 1 1 Reply + 1 CARD8 set of Rotations + 2 CARD16 sequence number + 4 0 reply length + 4 WINDOW root window + 4 TIMESTAMP timestamp + 4 TIMESTAMP config timestamp + 2 CARD16 number of SCREENSIZE following + 2 SIZEID current size index + 2 ROTATION current rotation and reflection + 2 CARD16 current rate (added in version 1.1) + 2 CARD16 length of rate info (number of CARD16s) + 2 CARD16 pad + + SCREENSIZE + 2 CARD16 width in pixels + 2 CARD16 height in pixels + 2 CARD16 width in millimeters + 2 CARD16 height in millimeters + + REFRESH + 2 CARD16 number of rates (n) + 2n CARD16 rates +└─── + +A.2.1 Protocol Requests added with version 1.2 + +┌─── + RRGetScreenSizeRange + 1 CARD8 major opcode + 1 6 RandR opcode + 2 2 length + 4 WINDOW window + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 2 CARD16 minWidth + 2 CARD16 minHeight + 2 CARD16 maxWidth + 2 CARD16 maxHeight + 16 unused +└─── +┌─── + RRSetScreenSize + 1 CARD8 major opcode + 1 7 RandR opcode + 2 5 length + 4 WINDOW window + 2 CARD16 width + 2 CARD16 height + 4 CARD32 width in millimeters + 4 CARD32 height in millimeters +└─── +┌─── + RRGetScreenResources + 1 CARD8 major opcode + 1 8 RandR opcode + 2 2 length + 4 WINDOW window + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 c+o+8m+(b+p)/4 reply length + 4 TIMESTAMP timestamp + 4 TIMESTAMP config-timestamp + 2 c number of CRTCs + 2 o number of outputs + 2 m number of modeinfos + 2 b total bytes in mode names + 8 unused + 4c LISTofCRTC crtcs + 4o LISTofOUTPUT outputs + 32m LISTofMODEINFO modeinfos + b STRING8 mode names + p unused, p=pad(b) +└─── +┌─── + RRGetOutputInfo + 1 CARD8 major opcode + 1 9 RandR opcode + 2 3 length + 4 OUTPUT output + 4 TIMESTAMP config-timestamp + ▶ + 1 1 Reply + 1 RRCONFIGSTATUS status + 2 CARD16 sequence number + 4 1+c+m+(n+p)/4 reply length + 4 TIMESTAMP timestamp + 4 CRTC current connected crtc + 4 CARD32 width in millimeters + 4 CARD32 height in millimeters + 1 CONNECTION connection + 1 SUBPIXELORDER subpixel-order + 2 c number of CRTCs + 2 m number of modes + 2 p number of preferred modes + 2 o number of clones + 2 n length of name + 4c LISTofCRTC crtcs + 4m LISTofMODE modes + 4o LISTofOUTPUT clones + n STRING8 name + p unused, p=pad(n) +└─── +┌─── + RRListOutputProperties + 1 CARD8 major opcode + 1 10 RandR opcode + 2 2 length + 4 OUTPUT output + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 n reply length + 2 n number of ATOMs in atoms + 22 unused + 4n LISTofATOM atoms +└─── +┌─── + RRQueryOutputProperty + 1 CARD8 major opcode + 1 11 RandR opcode + 2 3 request length + 4 OUTPUT output + 4 ATOM property + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 n reply length + 1 BOOL pending + 1 BOOL range + 1 BOOL immutable + 21 unused + 4n LISTofINT32 valid values +└─── +┌─── + RRConfigureOutputProperty + 1 CARD8 major opcode + 1 12 RandR opcode + 2 4+n request length + 4 OUTPUT output + 4 ATOM property + 1 BOOL pending + 1 BOOL range + 2 unused + 4n LISTofINT32 valid values +└─── +┌─── + RRChangeOutputProperty + 1 CARD8 major opcode + 1 13 RandR opcode + 2 6+(n+p)/4 request length + 4 OUTPUT output + 4 ATOM property + 4 ATOM type + 1 CARD8 format + 1 mode + 0 Replace + 1 Prepend + 2 Append + 2 unused + 4 CARD32 length of data in format units + (= n for format = 8) + (= n/2 for format = 16) + (= n/4 for format = 32) + n LISTofBYTE data + (n is a multiple of 2 for format = 16) + (n is a multiple of 4 for format = 32) + p unused, p=pad(n) +└─── +┌─── + RRDeleteOutputProperty + 1 CARD8 major opcode + 1 14 RandR opcode + 2 3 request length + 4 OUTPUT output + 4 ATOM property +└─── +┌─── + RRGetOutputProperty + 1 CARD8 major opcode + 1 15 RandR opcode + 2 7 request length + 4 OUTPUT output + 4 ATOM property + 4 ATOM type + 0 AnyPropertyType + 4 CARD32 long-offset + 4 CARD32 long-length + 1 BOOL delete + 1 BOOL pending + 2 unused + ▶ + 1 1 Reply + 1 CARD8 format + 2 CARD16 sequence number + 4 (n+p)/4 reply length + 4 ATOM type + 0 None + 4 CARD32 bytes-after + 4 CARD32 length of value in format units + (= 0 for format = 0) + (= n for format = 8) + (= n/2 for format = 16) + (= n/4 for format = 32) + 12 unused + n LISTofBYTE value + (n is zero for format = 0) + (n is a multiple of 2 for format = 16) + (n is a multiple of 4 for format = 32) + p unused, p=pad(n) +└─── +┌─── + RRCreateMode + 1 CARD8 major opcode + 1 16 RandR opcode + 2 12+(n+p)/4 length + 4 WINDOW window + 32 MODEINFO mode + n STRING8 mode name + p unused, p=pad(n) + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 4 MODE mode + 20 unused +└─── +┌─── + RRDestroyMode + 1 CARD8 major opcode + 1 17 RandR opcode + 2 2 length + 4 MODE mode +└─── +┌─── + RRAddOutputMode + 1 CARD8 major opcode + 1 18 RandR opcode + 2 3 length + 4 OUTPUT output + 4 MODE mode +└─── +┌─── + RRDeleteOutputMode + 1 CARD8 major opcode + 1 19 RandR opcode + 2 3 length + 4 OUTPUT output + 4 MODE mode +└─── +┌─── + RRGetCrtcInfo + 1 CARD8 major opcode + 1 20 RandR opcode + 2 3 length + 4 CRTC crtc + 4 TIMESTAMP config-timestamp + ▶ + 1 1 Reply + 1 RRCONFIGSTATUS status + 2 CARD16 sequence number + 4 o+p reply length + 4 TIMESTATMP timestamp + 2 INT16 x + 2 INT16 y + 2 CARD16 width + 2 CARD16 height + 4 MODE mode + 2 ROTATION current rotation and reflection + 2 ROTATION set of possible rotations + 2 o number of outputs + 2 p number of possible outputs + 4o LISTofOUTPUT outputs + 4p LISTofOUTPUT possible outputs +└─── +┌─── + RRSetCrtcConfig + 1 CARD8 major opcode + 1 21 RandR opcode + 2 7+2n length + 4 CRTC crtc + 4 TIMESTAMP timestamp + 4 TIMESTAMP config timestamp + 2 INT16 x + 2 INT16 y + 4 MODE mode + 2 ROTATION rotation/reflection + 2 unused + 8n LISTofOUTPUT outputs + ▶ + 1 1 Reply + 1 RRCONFIGSTATUS status + 2 CARD16 sequence number + 4 0 reply length + 4 TIMESTAMP new timestamp + 20 unused +└─── +┌─── + RRGetCrtcGammaSize + 1 CARD8 major opcode + 1 22 RandR opcode + 2 2 length + 4 CRTC crtc + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 0 reply length + 2 CARD16 size + 22 unused +└─── +┌─── + RRGetCrtcGamma + 1 CARD8 major opcode + 1 23 RandR opcode + 2 2 length + 4 CRTC crtc + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 (6n+2)/4 reply length + 2 n size + 20 unused + 2n LISTofCARD16 red + 2n LISTofCARD16 green + 2n LISTofCARD16 blue + p unused, p=pad(6n) +└─── +┌─── + RRSetCrtcGamma + 1 CARD8 major opcode + 1 24 RandR opcode + 2 3+(6n+2)/4 length + 4 CRTC crtc + 2 n size + 2 unused + 2n LISTofCARD16 red + 2n LISTofCARD16 green + 2n LISTofCARD16 blue + p unused, p=pad(6n) +└─── + +A.2.2 Protocol Requests added with version 1.3 + +┌─── + RRGetScreenResourcesCurrent + 1 CARD8 major opcode + 1 25 RandR opcode + 2 2 length + 4 WINDOW window + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 c+o+8m+(b+p)/4 reply length + 4 TIMESTAMP timestamp + 4 TIMESTAMP config-timestamp + 2 c number of CRTCs + 2 o number of outputs + 2 m number of modeinfos + 2 b total bytes in mode names + 8 unused + 4c LISTofCRTC crtcs + 4o LISTofOUTPUT outputs + 32m LISTofMODEINFO modeinfos + b STRING8 mode names + p unused, p=pad(b) +└─── + +┌─── + RRSetCrtcTransform + 1 CARD8 major opcode + 1 26 RandR opcode + 2 12+(n+p)/4+v length + 4 CRTC crtc + 36 TRANSFORM transform + 2 CARD16 filter length + 2 unused + n STRING8 filter name + p unused, p=pad(n) + 4v FIXED filter params +└─── + +┌─── + RRGetCrtcTransform + 1 CARD8 major opcode + 1 27 RandR opcode + 2 2 length + 4 CRTC crtc + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 16+(pn+pnp)/4+(cn+cnp)/4+pf+cf reply length + 36 TRANSFORM pending transform + 1 BOOL has transforms + 3 unused + 36 TRANSFORM current transform + 4 unused + 2 pn pending filter name length + 2 pf pending filter num params + 2 cn current filter name length + 2 cf current filter num params + pn STRING8 pending filter name + pnp unused, pnp=pad(pn) + 4*pf FIXED pending filter params + cn STRING8 current filter name + cnp unused, cnp=pad(cn) + 4*cf FIXED current filter params +└─── + +┌─── + RRGetPanning + 1 CARD8 major opcode + 1 28 RandR opcode + 2 2 length + 4 CRTC crtc + ▶ + 1 1 Reply + 1 RRCONFIGSTATUS status + 2 CARD16 sequence number + 4 1 reply length + 4 TIMESTAMP timestamp + 2 CARD16 left + 2 CARD16 top + 2 CARD16 width + 2 CARD16 height + 2 CARD16 track_left + 2 CARD16 track_top + 2 CARD16 track_width + 2 CARD16 track_height + 2 INT16 border_left + 2 INT16 border_top + 2 INT16 border_right + 2 INT16 border_bottom +└─── +┌─── + RRSetPanning + 1 CARD8 major opcode + 1 29 RandR opcode + 2 9 length + 4 CRTC crtc + 4 TIMESTAMP timestamp + 2 CARD16 left + 2 CARD16 top + 2 CARD16 width + 2 CARD16 height + 2 CARD16 track_left + 2 CARD16 track_top + 2 CARD16 track_width + 2 CARD16 track_height + 2 INT16 border_left + 2 INT16 border_top + 2 INT16 border_right + 2 INT16 border_bottom + ▶ + 1 1 Reply + 1 RRCONFIGSTATUS status + 2 CARD16 sequence number + 4 0 reply length + 4 TIMESTAMP new timestamp + 20 unused +└─── + +┌─── + RRSetOutputPrimary + 1 CARD8 major opcode + 1 30 RandR opcode + 2 3 length + 4 WINDOW window + 4 OUTPUT output +└─── + +┌─── + RRGetOutputPrimary + 1 CARD8 major opcode + 1 31 RandR opcode + 2 2 length + 4 WINDOW window + ▶ + 1 1 Reply + 1 unused + 2 CARD16 sequence number + 4 CARD32 length + 4 OUTPUT output + 4 CARD32 pad1 + 4 CARD32 pad2 + 4 CARD32 pad3 + 4 CARD32 pad4 +└─── + +A.3 Protocol Events + +┌─── + RRScreenChangeNotify + 1 Base + 0 code + 1 ROTATION new rotation and reflection + 2 CARD16 sequence number + 4 TIMESTAMP timestamp + 4 TIMESTAMP configuration timestamp + 4 WINDOW root window + 4 WINDOW request window + 2 SIZEID size ID + 2 SUBPIXELORDER subpixel order defined in Render + 2 CARD16 width in pixels + 2 CARD16 height in pixels + 2 CARD16 width in millimeters + 2 CARD16 height in millimeters +└─── + +A.3.1 Protocol Events added with version 1.2 + +┌─── + RRCrtcChangeNotify + 1 Base + 1 code + 1 0 sub-code + 2 CARD16 sequence number + 4 TIMESTAMP timestamp + 4 WINDOW request window + 4 CRTC crtc affected + 4 MODE mode in use + 2 ROTATION new rotation and reflection + 2 unused + 2 INT16 x + 2 INT16 y + 2 CARD16 width + 2 CARD16 height +└─── +┌─── + RROutputChangeNotify + 1 Base + 1 code + 1 1 sub-code + 2 CARD16 sequence number + 4 TIMESTAMP timestamp + 4 TIMESTAMP configuration timestamp + 4 WINDOW request window + 4 OUTPUT output affected + 4 CRTC crtc in use + 4 MODE mode in use + 2 ROTATION rotation in use + 1 CONNECTION connection status + 1 SUBPIXELORDER subpixel order +└─── +┌─── + RROutputPropertyNotify + 1 Base + 1 code + 1 2 sub-code + 2 CARD16 sequence number + 4 WINDOW window + 4 OUTPUT output + 4 ATOM atom + 4 TIMESTAMP time + 1 state + 0 NewValue + 1 Deleted + 11 unused +└─── + +A.4 Protocol Errors + +┌─── + ERRORS + Base + 0 Output + Base + 1 Crtc + Base + 2 Mode +└─── + +Bibliography + +[RANDR] Gettys, Jim and Keith Packard, "The X Resize and Rotate + Extension - RandR", Proceedings of the 2001 USENIX Annual + Technical Conference, Boston, MA + +[RENDER] + Packard, Keith, "The X Rendering Extension", work in progress, + http://cgit.freedesktop.org/xorg/proto/renderproto/tree/renderproto.txt diff --git a/gl/configure.ac b/gl/configure.ac index a3047e4ae..e8117bc56 100644 --- a/gl/configure.ac +++ b/gl/configure.ac @@ -1,13 +1,13 @@ -AC_PREREQ([2.60]) -AC_INIT([GLProto], [1.4.13], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) -AM_INIT_AUTOMAKE([foreign dist-bzip2]) -AM_MAINTAINER_MODE - -# Require xorg-macros: XORG_DEFAULT_OPTIONS -m4_ifndef([XORG_MACROS_VERSION], - [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])]) -XORG_MACROS_VERSION(1.3) -XORG_DEFAULT_OPTIONS - -AC_OUTPUT([Makefile - glproto.pc]) +AC_PREREQ([2.60]) +AC_INIT([GLProto], [1.4.14], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg]) +AM_INIT_AUTOMAKE([foreign dist-bzip2]) +AM_MAINTAINER_MODE + +# Require xorg-macros: XORG_DEFAULT_OPTIONS +m4_ifndef([XORG_MACROS_VERSION], + [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.3) +XORG_DEFAULT_OPTIONS + +AC_OUTPUT([Makefile + glproto.pc]) diff --git a/gl/glxproto.h b/gl/glxproto.h index 0ff44e362..89fb6d982 100644 --- a/gl/glxproto.h +++ b/gl/glxproto.h @@ -1,2675 +1,2689 @@ -#ifndef _GLX_glxproto_h_ -#define _GLX_glxproto_h_ - -/* - * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) - * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice including the dates of first publication and - * either this permission notice or a reference to - * http://oss.sgi.com/projects/FreeB/ - * shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - * - * Except as contained in this notice, the name of Silicon Graphics, Inc. - * shall not be used in advertising or otherwise to promote the sale, use or - * other dealings in this Software without prior written authorization from - * Silicon Graphics, Inc. - */ - -#include - -/*****************************************************************************/ - -/* -** Errrors. -*/ -#define GLXBadContext 0 -#define GLXBadContextState 1 -#define GLXBadDrawable 2 -#define GLXBadPixmap 3 -#define GLXBadContextTag 4 -#define GLXBadCurrentWindow 5 -#define GLXBadRenderRequest 6 -#define GLXBadLargeRequest 7 -#define GLXUnsupportedPrivateRequest 8 -#define GLXBadFBConfig 9 -#define GLXBadPbuffer 10 -#define GLXBadCurrentDrawable 11 -#define GLXBadWindow 12 -#define GLXBadProfileARB 13 - -#define __GLX_NUMBER_ERRORS 14 - -/* -** Events. -** __GLX_NUMBER_EVENTS is set to 17 to account for the BufferClobberSGIX -** event - this helps initialization if the server supports the pbuffer -** extension and the client doesn't. -*/ -#define GLX_PbufferClobber 0 -#define GLX_BufferSwapComplete 1 - -#define __GLX_NUMBER_EVENTS 17 - -#define GLX_EXTENSION_NAME "GLX" -#define GLX_EXTENSION_ALIAS "SGI-GLX" - -#define __GLX_MAX_CONTEXT_PROPS 3 - -#ifndef GLX_VENDOR -#define GLX_VENDOR 0x1 -#endif -#ifndef GLX_VERSION -#define GLX_VERSION 0x2 -#endif -#ifndef GLX_EXTENSIONS -#define GLX_EXTENSIONS 0x3 -#endif - -/*****************************************************************************/ - -/* -** For the structure definitions in this file, we must redefine these types in -** terms of Xmd.h types, which may include bitfields. All of these are -** undef'ed at the end of this file, restoring the definitions in glx.h. -*/ -#define GLXContextID CARD32 -#define GLXPixmap CARD32 -#define GLXDrawable CARD32 -#define GLXPbuffer CARD32 -#define GLXWindow CARD32 -#define GLXFBConfigID CARD32 -#define GLXFBConfigIDSGIX CARD32 -#define GLXPbufferSGIX CARD32 - -/* -** ContextTag is not exposed to the API. -*/ -typedef CARD32 GLXContextTag; - -/*****************************************************************************/ - -/* -** Sizes of basic wire types. -*/ -#define __GLX_SIZE_INT8 1 -#define __GLX_SIZE_INT16 2 -#define __GLX_SIZE_INT32 4 -#define __GLX_SIZE_CARD8 1 -#define __GLX_SIZE_CARD16 2 -#define __GLX_SIZE_CARD32 4 -#define __GLX_SIZE_FLOAT32 4 -#define __GLX_SIZE_FLOAT64 8 - -/*****************************************************************************/ - -/* Requests */ - -/* -** Render command request. A bunch of rendering commands are packed into -** a single X extension request. -*/ -typedef struct GLXRender { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - GLXContextTag contextTag B32; -} xGLXRenderReq; -#define sz_xGLXRenderReq 8 - -/* -** The maximum size that a GLXRender command can be. The value must fit -** in 16 bits and should be a multiple of 4. -*/ -#define __GLX_MAX_RENDER_CMD_SIZE 64000 - -/* -** Large render command request. A single large rendering command -** is output in multiple X extension requests. The first packet -** contains an opcode dependent header (see below) that describes -** the data that follows. -*/ -typedef struct GLXRenderLarge { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - GLXContextTag contextTag B32; - CARD16 requestNumber B16; - CARD16 requestTotal B16; - CARD32 dataBytes B32; -} xGLXRenderLargeReq; -#define sz_xGLXRenderLargeReq 16 - -/* -** GLX single request. Commands that go over as single GLX protocol -** requests use this structure. The glxCode will be one of the X_GLsop -** opcodes. -*/ -typedef struct GLXSingle { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - GLXContextTag contextTag B32; -} xGLXSingleReq; -#define sz_xGLXSingleReq 8 - -/* -** glXQueryVersion request -*/ -typedef struct GLXQueryVersion { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 majorVersion B32; - CARD32 minorVersion B32; -} xGLXQueryVersionReq; -#define sz_xGLXQueryVersionReq 12 - -/* -** glXIsDirect request -*/ -typedef struct GLXIsDirect { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - GLXContextID context B32; -} xGLXIsDirectReq; -#define sz_xGLXIsDirectReq 8 - -/* -** glXCreateContext request -*/ -typedef struct GLXCreateContext { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - GLXContextID context B32; - CARD32 visual B32; - CARD32 screen B32; - GLXContextID shareList B32; - BOOL isDirect; - CARD8 reserved1; - CARD16 reserved2 B16; -} xGLXCreateContextReq; -#define sz_xGLXCreateContextReq 24 - -/* -** glXDestroyContext request -*/ -typedef struct GLXDestroyContext { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - GLXContextID context B32; -} xGLXDestroyContextReq; -#define sz_xGLXDestroyContextReq 8 - -/* -** glXMakeCurrent request -*/ -typedef struct GLXMakeCurrent { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - GLXDrawable drawable B32; - GLXContextID context B32; - GLXContextTag oldContextTag B32; -} xGLXMakeCurrentReq; -#define sz_xGLXMakeCurrentReq 16 - -/* -** glXWaitGL request -*/ -typedef struct GLXWaitGL { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - GLXContextTag contextTag B32; -} xGLXWaitGLReq; -#define sz_xGLXWaitGLReq 8 - -/* -** glXWaitX request -*/ -typedef struct GLXWaitX { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - GLXContextTag contextTag B32; -} xGLXWaitXReq; -#define sz_xGLXWaitXReq 8 - -/* -** glXCopyContext request -*/ -typedef struct GLXCopyContext { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - GLXContextID source B32; - GLXContextID dest B32; - CARD32 mask B32; - GLXContextTag contextTag B32; -} xGLXCopyContextReq; -#define sz_xGLXCopyContextReq 20 - -/* -** glXSwapBuffers request -*/ -typedef struct GLXSwapBuffers { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - GLXContextTag contextTag B32; - GLXDrawable drawable B32; -} xGLXSwapBuffersReq; -#define sz_xGLXSwapBuffersReq 12 - -/* -** glXUseXFont request -*/ -typedef struct GLXUseXFont { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - GLXContextTag contextTag B32; - CARD32 font B32; - CARD32 first B32; - CARD32 count B32; - CARD32 listBase B32; -} xGLXUseXFontReq; -#define sz_xGLXUseXFontReq 24 - -/* -** glXCreateGLXPixmap request -*/ -typedef struct GLXCreateGLXPixmap { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 screen B32; - CARD32 visual B32; - CARD32 pixmap B32; - GLXPixmap glxpixmap B32; -} xGLXCreateGLXPixmapReq; -#define sz_xGLXCreateGLXPixmapReq 20 - -/* -** glXDestroyGLXPixmap request -*/ -typedef struct GLXDestroyGLXPixmap { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - GLXPixmap glxpixmap B32; -} xGLXDestroyGLXPixmapReq; -#define sz_xGLXDestroyGLXPixmapReq 8 - -/* -** glXGetVisualConfigs request -*/ -typedef struct GLXGetVisualConfigs { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 screen B32; -} xGLXGetVisualConfigsReq; -#define sz_xGLXGetVisualConfigsReq 8 - -/* -** glXVendorPrivate request. -*/ -typedef struct GLXVendorPrivate { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 vendorCode B32; /* vendor-specific opcode */ - GLXContextTag contextTag B32; - /* - ** More data may follow; this is just the header. - */ -} xGLXVendorPrivateReq; -#define sz_xGLXVendorPrivateReq 12 - -/* -** glXVendorPrivateWithReply request -*/ -typedef struct GLXVendorPrivateWithReply { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 vendorCode B32; /* vendor-specific opcode */ - GLXContextTag contextTag B32; - /* - ** More data may follow; this is just the header. - */ -} xGLXVendorPrivateWithReplyReq; -#define sz_xGLXVendorPrivateWithReplyReq 12 - -/* -** glXQueryExtensionsString request -*/ -typedef struct GLXQueryExtensionsString { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 screen B32; -} xGLXQueryExtensionsStringReq; -#define sz_xGLXQueryExtensionsStringReq 8 - -/* -** glXQueryServerString request -*/ -typedef struct GLXQueryServerString { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 screen B32; - CARD32 name B32; -} xGLXQueryServerStringReq; -#define sz_xGLXQueryServerStringReq 12 - -/* -** glXClientInfo request -*/ -typedef struct GLXClientInfo { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 major B32; - CARD32 minor B32; - CARD32 numbytes B32; -} xGLXClientInfoReq; -#define sz_xGLXClientInfoReq 16 - -/*** Start of GLX 1.3 requests */ - -/* -** glXGetFBConfigs request -*/ -typedef struct GLXGetFBConfigs { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 screen B32; -} xGLXGetFBConfigsReq; -#define sz_xGLXGetFBConfigsReq 8 - -/* -** glXCreatePixmap request -*/ -typedef struct GLXCreatePixmap { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 screen B32; - GLXFBConfigID fbconfig B32; - CARD32 pixmap B32; - GLXPixmap glxpixmap B32; - CARD32 numAttribs B32; - /* followed by attribute list */ -} xGLXCreatePixmapReq; -#define sz_xGLXCreatePixmapReq 24 - -/* -** glXDestroyPixmap request -*/ -typedef struct GLXDestroyPixmap { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - GLXPixmap glxpixmap B32; -} xGLXDestroyPixmapReq; -#define sz_xGLXDestroyPixmapReq 8 - -/* -** glXCreateNewContext request -*/ -typedef struct GLXCreateNewContext { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - GLXContextID context B32; - GLXFBConfigID fbconfig B32; - CARD32 screen B32; - CARD32 renderType; - GLXContextID shareList B32; - BOOL isDirect; - CARD8 reserved1; - CARD16 reserved2 B16; -} xGLXCreateNewContextReq; -#define sz_xGLXCreateNewContextReq 28 - -/* -** glXQueryContext request -*/ -typedef struct GLXQueryContext { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - GLXContextID context B32; -} xGLXQueryContextReq; -#define sz_xGLXQueryContextReq 8 - -/* -** glXMakeContextCurrent request -*/ -typedef struct GLXMakeContextCurrent { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - GLXContextTag oldContextTag B32; - GLXDrawable drawable B32; - GLXDrawable readdrawable B32; - GLXContextID context B32; -} xGLXMakeContextCurrentReq; -#define sz_xGLXMakeContextCurrentReq 20 - -/* -** glXCreatePbuffer request -*/ -typedef struct GLXCreatePbuffer { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 screen B32; - GLXFBConfigID fbconfig B32; - GLXPbuffer pbuffer B32; - CARD32 numAttribs B32; - /* followed by attribute list */ -} xGLXCreatePbufferReq; -#define sz_xGLXCreatePbufferReq 20 - -/* -** glXDestroyPbuffer request -*/ -typedef struct GLXDestroyPbuffer { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - GLXPbuffer pbuffer B32; -} xGLXDestroyPbufferReq; -#define sz_xGLXDestroyPbufferReq 8 - -/* -** glXGetDrawableAttributes request -*/ -typedef struct GLXGetDrawableAttributes { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - GLXDrawable drawable B32; -} xGLXGetDrawableAttributesReq; -#define sz_xGLXGetDrawableAttributesReq 8 - -/* -** glXChangeDrawableAttributes request -*/ -typedef struct GLXChangeDrawableAttributes { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - GLXDrawable drawable B32; - CARD32 numAttribs B32; - /* followed by attribute list */ -} xGLXChangeDrawableAttributesReq; -#define sz_xGLXChangeDrawableAttributesReq 12 - -/* -** glXCreateWindow request -*/ -typedef struct GLXCreateWindow { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 screen B32; - GLXFBConfigID fbconfig B32; - CARD32 window B32; - GLXWindow glxwindow B32; - CARD32 numAttribs B32; - /* followed by attribute list */ -} xGLXCreateWindowReq; -#define sz_xGLXCreateWindowReq 24 - -/* -** glXDestroyWindow request -*/ -typedef struct GLXDestroyWindow { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - GLXWindow glxwindow B32; -} xGLXDestroyWindowReq; -#define sz_xGLXDestroyWindowReq 8 - -/* Replies */ - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 error B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXGetErrorReply; -#define sz_xGLXGetErrorReply 32 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - GLXContextTag contextTag B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXMakeCurrentReply; -#define sz_xGLXMakeCurrentReply 32 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXReadPixelsReply; -#define sz_xGLXReadPixelsReply 32 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 width B32; - CARD32 height B32; - CARD32 depth B32; - CARD32 pad6 B32; -} xGLXGetTexImageReply; -#define sz_xGLXGetTexImageReply 32 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 width B32; - CARD32 height B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXGetSeparableFilterReply; -#define sz_xGLXGetSeparableFilterReply 32 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 width B32; - CARD32 height B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXGetConvolutionFilterReply; -#define sz_xGLXGetConvolutionFilterReply 32 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 width B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXGetHistogramReply; -#define sz_xGLXGetHistogramReply 32 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXGetMinmaxReply; -#define sz_xGLXGetMinmaxReply 32 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 retval B32; - CARD32 size B32; - CARD32 newMode B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXRenderModeReply; -#define sz_xGLXRenderModeReply 32 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 majorVersion B32; - CARD32 minorVersion B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXQueryVersionReply; -#define sz_xGLXQueryVersionReply 32 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 numVisuals B32; - CARD32 numProps B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXGetVisualConfigsReply; -#define sz_xGLXGetVisualConfigsReply 32 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - BOOL isDirect; - CARD8 pad1; - CARD16 pad2 B16; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; - CARD32 pad7 B32; -} xGLXIsDirectReply; -#define sz_xGLXIsDirectReply 32 - -/* -** This reply structure is used for all single replies. Single replies -** ship either 1 piece of data or N pieces of data. In these cases -** size indicates how much data is to be returned. -*/ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 retval B32; - CARD32 size B32; - CARD32 pad3 B32; /* NOTE: may hold a single value */ - CARD32 pad4 B32; /* NOTE: may hold half a double */ - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXSingleReply; -#define sz_xGLXSingleReply 32 - -/* -** This reply structure is used for all Vendor Private replies. Vendor -** Private replies can ship up to 24 bytes within the header or can -** be variable sized, in which case, the reply length field indicates -** the number of words of data which follow the header. -*/ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 retval B32; - CARD32 size B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXVendorPrivReply; -#define sz_xGLXVendorPrivReply 32 - -/* -** QueryExtensionsStringReply -** n indicates the number of bytes to be returned. -*/ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad1 B32; - CARD32 n B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXQueryExtensionsStringReply; -#define sz_xGLXQueryExtensionsStringReply 32 - -/* -** QueryServerString Reply struct -** n indicates the number of bytes to be returned. -*/ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad1 B32; - CARD32 n B32; - CARD32 pad3 B32; /* NOTE: may hold a single value */ - CARD32 pad4 B32; /* NOTE: may hold half a double */ - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXQueryServerStringReply; -#define sz_xGLXQueryServerStringReply 32 - -/*** Start of GLX 1.3 replies */ - -/* -** glXGetFBConfigs reply -*/ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 numFBConfigs B32; - CARD32 numAttribs B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXGetFBConfigsReply; -#define sz_xGLXGetFBConfigsReply 32 - -/* -** glXQueryContext reply -*/ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 n B32; /* number of attribute/value pairs */ - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXQueryContextReply; -#define sz_xGLXQueryContextReply 32 - -/* -** glXMakeContextCurrent reply -*/ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - GLXContextTag contextTag B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXMakeContextCurrentReply; -#define sz_xGLXMakeContextCurrentReply 32 - -/* -** glXCreateGLXPbuffer reply -** This is used only in the direct rendering case on SGIs - otherwise -** CreateGLXPbuffer has no reply. It is not part of GLX 1.3. -*/ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 success; - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXCreateGLXPbufferReply; -#define sz_xGLXCreateGLXPbufferReply 32 - -/* -** glXGetDrawableAttributes reply -*/ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 numAttribs B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXGetDrawableAttributesReply; -#define sz_xGLXGetDrawableAttributesReply 32 - -/* -** glXGetColorTable reply -*/ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad1 B32; - CARD32 pad2 B32; - CARD32 width B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXGetColorTableReply; -#define sz_xGLXGetColorTableReply 32 - -/************************************************************************/ - -/* GLX extension requests and replies */ - -/* -** glXQueryContextInfoEXT request -*/ -typedef struct GLXQueryContextInfoEXT { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 vendorCode B32; /* vendor-specific opcode */ - CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ - GLXContextID context B32; -} xGLXQueryContextInfoEXTReq; -#define sz_xGLXQueryContextInfoEXTReq 16 - -/* -** glXQueryContextInfoEXT reply -*/ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 n B32; /* number of attribute/value pairs */ - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXQueryContextInfoEXTReply; -#define sz_xGLXQueryContextInfoEXTReply 32 - -/* -** glXMakeCurrentReadSGI request -*/ -typedef struct GLXMakeCurrentReadSGI { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 vendorCode B32; /* vendor-specific opcode */ - GLXContextTag oldContextTag B32; - GLXDrawable drawable B32; - GLXDrawable readable B32; - GLXContextID context B32; -} xGLXMakeCurrentReadSGIReq; -#define sz_xGLXMakeCurrentReadSGIReq 24 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - GLXContextTag contextTag B32; - CARD32 writeVid B32; - CARD32 writeType B32; - CARD32 readVid B32; - CARD32 readType B32; - CARD32 pad6 B32; -} xGLXMakeCurrentReadSGIReply; -#define sz_xGLXMakeCurrentReadSGIReply 32 - -/* -** glXGetFBConfigsSGIX request -*/ -typedef struct GLXGetFBConfigsSGIX { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 vendorCode B32; /* vendor-specific opcode */ - CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ - CARD32 screen B32; -} xGLXGetFBConfigsSGIXReq; -#define sz_xGLXGetFBConfigsSGIXReq 16 - -/* -** glXCreateContextWithConfigSGIX request -*/ - -typedef struct GLXCreateContextWithConfigSGIX { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 vendorCode B32; /* vendor-specific opcode */ - CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ - GLXContextID context B32; - GLXFBConfigID fbconfig B32; - CARD32 screen B32; - CARD32 renderType; - GLXContextID shareList B32; - BOOL isDirect; - CARD8 reserved1; - CARD16 reserved2 B16; -} xGLXCreateContextWithConfigSGIXReq; -#define sz_xGLXCreateContextWithConfigSGIXReq 36 - -/* -** glXCreatePixmapWithConfigSGIX request -*/ - -typedef struct GLXCreateGLXPixmapWithConfigSGIX { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 vendorCode B32; /* vendor-specific opcode */ - CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ - CARD32 screen B32; - GLXFBConfigID fbconfig B32; - CARD32 pixmap B32; - GLXPixmap glxpixmap B32; -} xGLXCreateGLXPixmapWithConfigSGIXReq; -#define sz_xGLXCreateGLXPixmapWithConfigSGIXReq 28 - -/* -** glXCreateGLXPbufferSGIX request -*/ -typedef struct GLXCreateGLXPbufferSGIX { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 vendorCode B32; /* vendor-specific opcode */ - CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ - CARD32 screen B32; - GLXFBConfigID fbconfig B32; - GLXPbuffer pbuffer B32; - CARD32 width B32; - CARD32 height B32; - /* followed by attribute list */ -} xGLXCreateGLXPbufferSGIXReq; -#define sz_xGLXCreateGLXPbufferSGIXReq 32 - -/* -** glXDestroyGLXPbufferSGIX request -*/ -typedef struct GLXDestroyGLXPbuffer { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 vendorCode B32; /* vendor-specific opcode */ - CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ - GLXPbuffer pbuffer B32; -} xGLXDestroyGLXPbufferSGIXReq; -#define sz_xGLXDestroyGLXPbufferSGIXReq 16 - -/* -** glXChangeDrawableAttributesSGIX request -*/ -typedef struct GLXChangeDrawableAttributesSGIX { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 vendorCode B32; /* vendor-specific opcode */ - CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ - GLXDrawable drawable B32; - CARD32 numAttribs B32; - /* followed by attribute list */ -} xGLXChangeDrawableAttributesSGIXReq; -#define sz_xGLXChangeDrawableAttributesSGIXReq 20 - -/* -** glXGetDrawableAttributesSGIX request -*/ -typedef struct GLXGetDrawableAttributesSGIX { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 vendorCode B32; /* vendor-specific opcode */ - CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ - GLXDrawable drawable B32; -} xGLXGetDrawableAttributesSGIXReq; -#define sz_xGLXGetDrawableAttributesSGIXReq 16 - -/* -** glXGetDrawableAttributesSGIX reply -*/ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 numAttribs B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXGetDrawableAttributesSGIXReply; -#define sz_xGLXGetDrawableAttributesSGIXReply 32 - -/* -** glXJoinSwapGroupSGIX request -*/ -typedef struct GLXJoinSwapGroupSGIX { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 vendorCode B32; /* vendor-specific opcode */ - CARD32 unused B32; /* corresponds to contextTag in hdr */ - GLXDrawable drawable B32; - GLXDrawable member B32; -} xGLXJoinSwapGroupSGIXReq; -#define sz_xGLXJoinSwapGroupSGIXReq 20 - -/* -** glXBindSwapBarrierSGIX request -*/ -typedef struct GLXBindSwapBarrierSGIX { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 vendorCode B32; /* vendor-specific opcode */ - CARD32 unused B32; /* corresponds to contextTag in hdr */ - GLXDrawable drawable B32; - CARD32 barrier B32; -} xGLXBindSwapBarrierSGIXReq; -#define sz_xGLXBindSwapBarrierSGIXReq 20 - -/* -** glXQueryMaxSwapBarriersSGIX request -*/ -typedef struct GLXQueryMaxSwapBarriersSGIX { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 vendorCode B32; /* vendor-specific opcode */ - CARD32 unused B32; /* corresponds to contextTag in hdr */ - CARD32 screen B32; -} xGLXQueryMaxSwapBarriersSGIXReq; -#define sz_xGLXQueryMaxSwapBarriersSGIXReq 16 - -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 max B32; - CARD32 size B32; - CARD32 pad3 B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXQueryMaxSwapBarriersSGIXReply; -#define sz_xGLXQueryMaxSwapBarriersSGIXReply 32 - -/* -** glXQueryHyperpipeNetworkSGIX request -*/ -typedef struct GLXQueryHyperpipeNetworkSGIX { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 vendorCode B32; /* vendor-specific opcode */ - CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ - CARD32 screen B32; -} xGLXQueryHyperpipeNetworkSGIXReq; -#define sz_xGLXQueryHyperpipeNetworkSGIXReq 16 - -/* -** glXQueryHyperpipeNetworkSGIX reply -*/ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad1 B32; - CARD32 n B32; - CARD32 npipes B32; /* NOTE: may hold a single value */ - CARD32 pad4 B32; /* NOTE: may hold half a double */ - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXQueryHyperpipeNetworkSGIXReply; -#define sz_xGLXQueryHyperpipeNetworkSGIXReply 32 - -/* -** glXDestroyHyperpipeConfigSGIX request -*/ -typedef struct GLXDestroyHyperpipeConfigSGIX { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 vendorCode B32; /* vendor-specific opcode */ - CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ - CARD32 screen B32; - CARD32 hpId B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xGLXDestroyHyperpipeConfigSGIXReq; -#define sz_xGLXDestroyHyperpipeConfigSGIXReq 32 - -/* -** glXDestroyHyperpipeConfigSGIX reply -*/ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad1 B32; - CARD32 n B32; - CARD32 success B32; /* NOTE: may hold a single value */ - CARD32 pad4 B32; /* NOTE: may hold half a double */ - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXDestroyHyperpipeConfigSGIXReply; -#define sz_xGLXDestroyHyperpipeConfigSGIXReply 32 - -/* -** glXQueryHyperpipeConfigSGIX request -*/ -typedef struct GLXQueryHyperpipeConfigSGIX { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 vendorCode B32; /* vendor-specific opcode */ - CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ - CARD32 screen B32; - CARD32 hpId B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - CARD32 pad4 B32; -} xGLXQueryHyperpipeConfigSGIXReq; -#define sz_xGLXQueryHyperpipeConfigSGIXReq 32 - -/* -** glXQueryHyperpipeConfigSGIX reply -*/ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad1 B32; - CARD32 n B32; - CARD32 npipes B32; - CARD32 pad4 B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXQueryHyperpipeConfigSGIXReply; -#define sz_xGLXQueryHyperpipeConfigSGIXReply 32 - -/* -** glXHyperpipeConfigSGIX request -*/ -typedef struct { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 vendorCode B32; /* vendor-specific opcode */ - CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ - CARD32 screen B32; - CARD32 npipes B32; - CARD32 networkId B32; - CARD32 pad2 B32; - CARD32 pad3 B32; - /* followed by attribute list */ -} xGLXHyperpipeConfigSGIXReq; -#define sz_xGLXHyperpipeConfigSGIXReq 32 - -/* -** glXHyperpipeConfigSGIX reply -*/ -typedef struct { - BYTE type; /* X_Reply */ - CARD8 unused; /* not used */ - CARD16 sequenceNumber B16; - CARD32 length B32; - CARD32 pad1 B32; - CARD32 n B32; - CARD32 npipes B32; - CARD32 hpId B32; - CARD32 pad5 B32; - CARD32 pad6 B32; -} xGLXHyperpipeConfigSGIXReply; -#define sz_xGLXHyperpipeConfigSGIXReply 32 - -/* - * GLX_ARB_create_context - * GLX_ARB_create_context_profile - */ - -/* - * glXSetClientInfoARB - */ -typedef struct { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 major B32; - CARD32 minor B32; - CARD32 n0 B32; - CARD32 n1 B32; - CARD32 n2 B32; - /* - ** More data may follow; this is just the header. - */ -} xGLXSetClientInfoARB; -#define sz_xGLXSetClientInfoARB 24 - -/* -** glXCreateContextAttribsARB -*/ -typedef struct { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - GLXContextID context B32; - GLXFBConfigID fbconfig B32; - CARD32 screen; - GLXContextID shareList B32; - BOOL isDirect; - CARD8 reserved1; - CARD16 reserved2 B16; - CARD32 numAttribs B32; - /* followed by attribute list */ -} xGLXCreateContextAttribsARB; -#define sz_xGLXCreateContextAttribsARB 28 - -/* - * glXSetClientInfo2ARB - */ -typedef struct { - CARD8 reqType; - CARD8 glxCode; - CARD16 length B16; - CARD32 major B32; - CARD32 minor B32; - CARD32 n0 B32; - CARD32 n1 B32; - CARD32 n2 B32; - /* - ** More data may follow; this is just the header. - */ -} xGLXSetClientInfo2ARB; -#define sz_xGLXSetClientInfo2ARB 24 -/************************************************************************/ - -/* -** Events -*/ - -typedef struct { - BYTE type; - BYTE pad; - CARD16 sequenceNumber B16; - CARD16 event_type B16; /*** was clobber_class */ - CARD16 draw_type B16; - CARD32 drawable B32; - CARD32 buffer_mask B32; /*** was mask */ - CARD16 aux_buffer B16; - CARD16 x B16; - CARD16 y B16; - CARD16 width B16; - CARD16 height B16; - CARD16 count B16; - CARD32 unused2 B32; -} xGLXPbufferClobberEvent; - -typedef struct { - BYTE type; - BYTE pad; - CARD16 sequenceNumber B16; - CARD16 event_type B16; - CARD32 drawable; - CARD32 ust_hi B32; - CARD32 ust_lo B32; - CARD32 msc_hi B32; - CARD32 msc_lo B32; - CARD32 sbc_hi B32; - CARD32 sbc_lo B32; -} xGLXBufferSwapComplete; - -/************************************************************************/ - -/* -** Size of the standard X request header. -*/ -#define __GLX_SINGLE_HDR_SIZE sz_xGLXSingleReq -#define __GLX_VENDPRIV_HDR_SIZE sz_xGLXVendorPrivateReq - -#define __GLX_RENDER_HDR \ - CARD16 length B16; \ - CARD16 opcode B16 - -#define __GLX_RENDER_HDR_SIZE 4 - -typedef struct { - __GLX_RENDER_HDR; -} __GLXrenderHeader; - -#define __GLX_RENDER_LARGE_HDR \ - CARD32 length B32; \ - CARD32 opcode B32 - -#define __GLX_RENDER_LARGE_HDR_SIZE 8 - -typedef struct { - __GLX_RENDER_LARGE_HDR; -} __GLXrenderLargeHeader; - -/* -** The glBitmap, glPolygonStipple, glTexImage[12]D, glTexSubImage[12]D -** and glDrawPixels calls all have a pixel header transmitted after the -** Render or RenderLarge header and before their own opcode specific -** headers. -*/ -#define __GLX_PIXEL_HDR \ - BOOL swapBytes; \ - BOOL lsbFirst; \ - CARD8 reserved0; \ - CARD8 reserved1; \ - CARD32 rowLength B32; \ - CARD32 skipRows B32; \ - CARD32 skipPixels B32; \ - CARD32 alignment B32 - -#define __GLX_PIXEL_HDR_SIZE 20 - -typedef struct { - __GLX_PIXEL_HDR; -} __GLXpixelHeader; - -/* -** glTexImage[34]D and glTexSubImage[34]D calls -** all have a pixel header transmitted after the Render or RenderLarge -** header and before their own opcode specific headers. -*/ -#define __GLX_PIXEL_3D_HDR \ - BOOL swapBytes; \ - BOOL lsbFirst; \ - CARD8 reserved0; \ - CARD8 reserved1; \ - CARD32 rowLength B32; \ - CARD32 imageHeight B32; \ - CARD32 imageDepth B32; \ - CARD32 skipRows B32; \ - CARD32 skipImages B32; \ - CARD32 skipVolumes B32; \ - CARD32 skipPixels B32; \ - CARD32 alignment B32 - -#define __GLX_PIXEL_3D_HDR_SIZE 36 - -/* -** Data that is specific to a glBitmap call. The data is sent in the -** following order: -** Render or RenderLarge header -** Pixel header -** Bitmap header -*/ -#define __GLX_BITMAP_HDR \ - CARD32 width B32; \ - CARD32 height B32; \ - FLOAT32 xorig F32; \ - FLOAT32 yorig F32; \ - FLOAT32 xmove F32; \ - FLOAT32 ymove F32 - -typedef struct { - __GLX_RENDER_HDR; - __GLX_PIXEL_HDR; - __GLX_BITMAP_HDR; -} __GLXbitmapHeader; - -typedef struct { - __GLX_RENDER_LARGE_HDR; - __GLX_PIXEL_HDR; - __GLX_BITMAP_HDR; -} __GLXbitmapLargeHeader; - -typedef struct { - __GLX_PIXEL_HDR; - __GLX_BITMAP_HDR; -} __GLXdispatchBitmapHeader; - -#define __GLX_BITMAP_HDR_SIZE 24 - -#define __GLX_BITMAP_CMD_HDR_SIZE \ - (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_BITMAP_HDR_SIZE) - -#define __GLX_BITMAP_CMD_DISPATCH_HDR_SIZE \ - (__GLX_PIXEL_HDR_SIZE + __GLX_BITMAP_HDR_SIZE) - -typedef struct { - __GLX_RENDER_HDR; - __GLX_PIXEL_HDR; -} __GLXpolygonStippleHeader; - -#define __GLX_POLYGONSTIPPLE_CMD_HDR_SIZE \ - (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE) - -/* -** Data that is specific to a glTexImage1D or glTexImage2D call. The -** data is sent in the following order: -** Render or RenderLarge header -** Pixel header -** TexImage header -** When a glTexImage1D call the height field is unexamined by the server. -*/ -#define __GLX_TEXIMAGE_HDR \ - CARD32 target B32; \ - CARD32 level B32; \ - CARD32 components B32; \ - CARD32 width B32; \ - CARD32 height B32; \ - CARD32 border B32; \ - CARD32 format B32; \ - CARD32 type B32 - -#define __GLX_TEXIMAGE_HDR_SIZE 32 - -#define __GLX_TEXIMAGE_CMD_HDR_SIZE \ - (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_TEXIMAGE_HDR_SIZE) - -#define __GLX_TEXIMAGE_CMD_DISPATCH_HDR_SIZE \ - (__GLX_PIXEL_HDR_SIZE + __GLX_TEXIMAGE_HDR_SIZE) - -typedef struct { - __GLX_RENDER_HDR; - __GLX_PIXEL_HDR; - __GLX_TEXIMAGE_HDR; -} __GLXtexImageHeader; - -typedef struct { - __GLX_RENDER_LARGE_HDR; - __GLX_PIXEL_HDR; - __GLX_TEXIMAGE_HDR; -} __GLXtexImageLargeHeader; - -typedef struct { - __GLX_PIXEL_HDR; - __GLX_TEXIMAGE_HDR; -} __GLXdispatchTexImageHeader; - -/* -** Data that is specific to a glTexImage3D or glTexImage4D call. The -** data is sent in the following order: -** Render or RenderLarge header -** Pixel 3D header -** TexImage 3D header -** When a glTexImage3D call the size4d and woffset fields are unexamined -** by the server. -** Could be used by all TexImage commands and perhaps should be in the -** future. -*/ -#define __GLX_TEXIMAGE_3D_HDR \ - CARD32 target B32; \ - CARD32 level B32; \ - CARD32 internalformat B32; \ - CARD32 width B32; \ - CARD32 height B32; \ - CARD32 depth B32; \ - CARD32 size4d B32; \ - CARD32 border B32; \ - CARD32 format B32; \ - CARD32 type B32; \ - CARD32 nullimage B32 - -#define __GLX_TEXIMAGE_3D_HDR_SIZE 44 - -#define __GLX_TEXIMAGE_3D_CMD_HDR_SIZE \ - (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_3D_HDR_SIZE + \ - __GLX_TEXIMAGE_3D_HDR_SIZE) - -#define __GLX_TEXIMAGE_3D_CMD_DISPATCH_HDR_SIZE \ - (__GLX_PIXEL_3D_HDR_SIZE + __GLX_TEXIMAGE_3D_HDR_SIZE) - -typedef struct { - __GLX_RENDER_HDR; - __GLX_PIXEL_3D_HDR; - __GLX_TEXIMAGE_3D_HDR; -} __GLXtexImage3DHeader; - -typedef struct { - __GLX_RENDER_LARGE_HDR; - __GLX_PIXEL_3D_HDR; - __GLX_TEXIMAGE_3D_HDR; -} __GLXtexImage3DLargeHeader; - -typedef struct { - __GLX_PIXEL_3D_HDR; - __GLX_TEXIMAGE_3D_HDR; -} __GLXdispatchTexImage3DHeader; - -/* -** Data that is specific to a glTexSubImage1D or glTexSubImage2D call. The -** data is sent in the following order: -** Render or RenderLarge header -** Pixel header -** TexSubImage header -** When a glTexSubImage1D call is made, the yoffset and height fields -** are unexamined by the server and are considered to be padding. -*/ -#define __GLX_TEXSUBIMAGE_HDR \ - CARD32 target B32; \ - CARD32 level B32; \ - CARD32 xoffset B32; \ - CARD32 yoffset B32; \ - CARD32 width B32; \ - CARD32 height B32; \ - CARD32 format B32; \ - CARD32 type B32; \ - CARD32 nullImage \ - -#define __GLX_TEXSUBIMAGE_HDR_SIZE 36 - -#define __GLX_TEXSUBIMAGE_CMD_HDR_SIZE \ - (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_TEXSUBIMAGE_HDR_SIZE) - -#define __GLX_TEXSUBIMAGE_CMD_DISPATCH_HDR_SIZE \ - (__GLX_PIXEL_HDR_SIZE + __GLX_TEXSUBIMAGE_HDR_SIZE) - -typedef struct { - __GLX_RENDER_HDR; - __GLX_PIXEL_HDR; - __GLX_TEXSUBIMAGE_HDR; -} __GLXtexSubImageHeader; - -typedef struct { - __GLX_RENDER_LARGE_HDR; - __GLX_PIXEL_HDR; - __GLX_TEXSUBIMAGE_HDR; -} __GLXtexSubImageLargeHeader; - -typedef struct { - __GLX_PIXEL_HDR; - __GLX_TEXSUBIMAGE_HDR; -} __GLXdispatchTexSubImageHeader; - -/* -** Data that is specific to a glTexSubImage3D and 4D calls. The -** data is sent in the following order: -** Render or RenderLarge header -** Pixel 3D header -** TexSubImage 3D header -** When a glTexSubImage3D call is made, the woffset and size4d fields -** are unexamined by the server and are considered to be padding. -*/ -#define __GLX_TEXSUBIMAGE_3D_HDR \ - CARD32 target B32; \ - CARD32 level B32; \ - CARD32 xoffset B32; \ - CARD32 yoffset B32; \ - CARD32 zoffset B32; \ - CARD32 woffset B32; \ - CARD32 width B32; \ - CARD32 height B32; \ - CARD32 depth B32; \ - CARD32 size4d B32; \ - CARD32 format B32; \ - CARD32 type B32; \ - CARD32 nullImage \ - -#define __GLX_TEXSUBIMAGE_3D_HDR_SIZE 52 - -#define __GLX_TEXSUBIMAGE_3D_CMD_HDR_SIZE \ - (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_3D_HDR_SIZE + \ - __GLX_TEXSUBIMAGE_3D_HDR_SIZE) - -#define __GLX_TEXSUBIMAGE_3D_CMD_DISPATCH_HDR_SIZE \ - (__GLX_PIXEL_3D_HDR_SIZE + __GLX_TEXSUBIMAGE_3D_HDR_SIZE) - -typedef struct { - __GLX_RENDER_HDR; - __GLX_PIXEL_3D_HDR; - __GLX_TEXSUBIMAGE_3D_HDR; -} __GLXtexSubImage3DHeader; - -typedef struct { - __GLX_RENDER_LARGE_HDR; - __GLX_PIXEL_3D_HDR; - __GLX_TEXSUBIMAGE_3D_HDR; -} __GLXtexSubImage3DLargeHeader; - -typedef struct { - __GLX_PIXEL_3D_HDR; - __GLX_TEXSUBIMAGE_3D_HDR; -} __GLXdispatchTexSubImage3DHeader; - -/** - * Data that is specific to a \c glCompressedTexImage1D or - * \c glCompressedTexImage2D call. The data is sent in the following - * order: - * - Render or RenderLarge header - * - CompressedTexImage header - * - * When a \c glCompressedTexImage1D call is made, the \c height field is - * not examined by the server and is considered padding. - */ - -#define __GLX_COMPRESSED_TEXIMAGE_HDR \ - CARD32 target B32; \ - CARD32 level B32; \ - CARD32 internalFormat B32; \ - CARD32 width B32; \ - CARD32 height B32; \ - CARD32 border B32; \ - CARD32 imageSize B32 - -#define __GLX_COMPRESSED_TEXIMAGE_HDR_SIZE 28 - -#define __GLX_COMPRESSED_TEXIMAGE_CMD_HDR_SIZE \ - (__GLX_RENDER_HDR_SIZE + __GLX_COMPRESSED_TEXIMAGE_HDR_SIZE) - -#define __GLX_COMPRESSED_TEXIMAGE_DISPATCH_HDR_SIZE \ - (__GLX_COMPRESSED_TEXIMAGE_HDR_SIZE) - -typedef struct { - __GLX_RENDER_HDR; - __GLX_COMPRESSED_TEXIMAGE_HDR; -} __GLXcompressedTexImageHeader; - -typedef struct { - __GLX_RENDER_LARGE_HDR; - __GLX_COMPRESSED_TEXIMAGE_HDR; -} __GLXcompressedTexImageLargeHeader; - -typedef struct { - __GLX_COMPRESSED_TEXIMAGE_HDR; -} __GLXdispatchCompressedTexImageHeader; - -/** - * Data that is specifi to a \c glCompressedTexSubImage1D or - * \c glCompressedTexSubImage2D call. The data is sent in the following - * order: - * - Render or RenderLarge header - * - CompressedTexSubImage header - * - * When a \c glCompressedTexSubImage1D call is made, the \c yoffset and - * \c height fields are not examined by the server and are considered padding. - */ - -#define __GLX_COMPRESSED_TEXSUBIMAGE_HDR \ - CARD32 target B32; \ - CARD32 level B32; \ - CARD32 xoffset B32; \ - CARD32 yoffset B32; \ - CARD32 width B32; \ - CARD32 height B32; \ - CARD32 format B32; \ - CARD32 imageSize B32 - -#define __GLX_COMPRESSED_TEXSUBIMAGE_HDR_SIZE 32 - -#define __GLX_COMPRESSED_TEXSUBIMAGE_CMD_HDR_SIZE \ - (__GLX_RENDER_HDR_SIZE + __GLX_COMPRESSED_TEXSUBIMAGE_HDR_SIZE) - -#define __GLX_COMPRESSED_TEXSUBIMAGE_DISPATCH_HDR_SIZE \ - (__GLX_COMPRESSED_TEXSUBIMAGE_HDR_SIZE) - -typedef struct { - __GLX_RENDER_HDR; - __GLX_COMPRESSED_TEXSUBIMAGE_HDR; -} __GLXcompressedTexSubImageHeader; - -typedef struct { - __GLX_RENDER_LARGE_HDR; - __GLX_COMPRESSED_TEXSUBIMAGE_HDR; -} __GLXcompressedTexSubImageLargeHeader; - -typedef struct { - __GLX_COMPRESSED_TEXSUBIMAGE_HDR; -} __GLXdispatchCompressedTexSubImageHeader; - -/** - * Data that is specific to a \c glCompressedTexImage3D call. The data is - * sent in the following order: - * - Render or RenderLarge header - * - CompressedTexImage3D header - */ - -#define __GLX_COMPRESSED_TEXIMAGE_3D_HDR \ - CARD32 target B32; \ - CARD32 level B32; \ - CARD32 internalFormat B32; \ - CARD32 width B32; \ - CARD32 height B32; \ - CARD32 depth B32; \ - CARD32 border B32; \ - CARD32 imageSize B32 - -#define __GLX_COMPRESSED_TEXIMAGE_3D_HDR_SIZE 32 - -#define __GLX_COMPRESSED_TEXIMAGE_3D_CMD_HDR_SIZE \ - (__GLX_RENDER_HDR_SIZE + __GLX_COMPRESSED_TEXIMAGE_3D_HDR_SIZE) - -#define __GLX_COMPRESSED_TEXIMAGE_3D_DISPATCH_HDR_SIZE \ - (__GLX_COMPRESSED_TEXIMAGE_3D_HDR_SIZE) - -typedef struct { - __GLX_RENDER_HDR; - __GLX_COMPRESSED_TEXIMAGE_3D_HDR; -} __GLXcompressedTexImage3DHeader; - -typedef struct { - __GLX_RENDER_LARGE_HDR; - __GLX_COMPRESSED_TEXIMAGE_3D_HDR; -} __GLXcompressedTexImage3DLargeHeader; - -typedef struct { - __GLX_COMPRESSED_TEXIMAGE_3D_HDR; -} __GLXdispatchCompressedTexImage3DHeader; - -/** - * Data that is specifi to a \c glCompressedTexSubImage3D call. The data is - * sent in the following order: - * - Render or RenderLarge header - * - CompressedTexSubImage3D header - */ - -#define __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR \ - CARD32 target B32; \ - CARD32 level B32; \ - CARD32 xoffset B32; \ - CARD32 yoffset B32; \ - CARD32 zoffset B32; \ - CARD32 width B32; \ - CARD32 height B32; \ - CARD32 depth B32; \ - CARD32 format B32; \ - CARD32 imageSize B32 - -#define __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR_SIZE 32 - -#define __GLX_COMPRESSED_TEXSUBIMAGE_3D_CMD_HDR_SIZE \ - (__GLX_RENDER_HDR_SIZE + __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR_SIZE) - -#define __GLX_COMPRESSED_TEXSUBIMAGE_3D_DISPATCH_HDR_SIZE \ - (__GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR_SIZE) - -typedef struct { - __GLX_RENDER_HDR; - __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR; -} __GLXcompressedTexSubImage3DHeader; - -typedef struct { - __GLX_RENDER_LARGE_HDR; - __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR; -} __GLXcompressedTexSubImage3DLargeHeader; - -typedef struct { - __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR; -} __GLXdispatchCompressedTexSubImage3DHeader; - -/* -** Data that is specific to a glDrawPixels call. The data is sent in the -** following order: -** Render or RenderLarge header -** Pixel header -** DrawPixels header -*/ -#define __GLX_DRAWPIXELS_HDR \ - CARD32 width B32; \ - CARD32 height B32; \ - CARD32 format B32; \ - CARD32 type B32 - -#define __GLX_DRAWPIXELS_HDR_SIZE 16 - -#define __GLX_DRAWPIXELS_CMD_HDR_SIZE \ - (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_DRAWPIXELS_HDR_SIZE) - -#define __GLX_DRAWPIXELS_CMD_DISPATCH_HDR_SIZE \ - (__GLX_PIXEL_HDR_SIZE + __GLX_DRAWPIXELS_HDR_SIZE) - -typedef struct { - __GLX_RENDER_HDR; - __GLX_PIXEL_HDR; - __GLX_DRAWPIXELS_HDR; -} __GLXdrawPixelsHeader; - -typedef struct { - __GLX_RENDER_LARGE_HDR; - __GLX_PIXEL_HDR; - __GLX_DRAWPIXELS_HDR; -} __GLXdrawPixelsLargeHeader; - -typedef struct { - __GLX_PIXEL_HDR; - __GLX_DRAWPIXELS_HDR; -} __GLXdispatchDrawPixelsHeader; - -/* -** Data that is specific to a glConvolutionFilter1D or glConvolutionFilter2D -** call. The data is sent in the following order: -** Render or RenderLarge header -** Pixel header -** ConvolutionFilter header -** When a glConvolutionFilter1D call the height field is unexamined by the server. -*/ -#define __GLX_CONV_FILT_HDR \ - CARD32 target B32; \ - CARD32 internalformat B32; \ - CARD32 width B32; \ - CARD32 height B32; \ - CARD32 format B32; \ - CARD32 type B32 - -#define __GLX_CONV_FILT_HDR_SIZE 24 - -#define __GLX_CONV_FILT_CMD_HDR_SIZE \ - (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_CONV_FILT_HDR_SIZE) - -#define __GLX_CONV_FILT_CMD_DISPATCH_HDR_SIZE \ - (__GLX_PIXEL_HDR_SIZE + __GLX_CONV_FILT_HDR_SIZE) -typedef struct { - __GLX_RENDER_HDR; - __GLX_PIXEL_HDR; - __GLX_CONV_FILT_HDR; -} __GLXConvolutionFilterHeader; - -typedef struct { - __GLX_RENDER_LARGE_HDR; - __GLX_PIXEL_HDR; - __GLX_CONV_FILT_HDR; -} __GLXConvolutionFilterLargeHeader; - -typedef struct { - __GLX_PIXEL_HDR; - __GLX_CONV_FILT_HDR; -} __GLXdispatchConvolutionFilterHeader; - -/* -** Data that is specific to a glDrawArraysEXT call. The data is sent in the -** following order: -** Render or RenderLarge header -** Draw Arrays header -** a variable number of Component headers -** vertex data for each component type -*/ - -#define __GLX_DRAWARRAYS_HDR \ - CARD32 numVertexes B32; \ - CARD32 numComponents B32; \ - CARD32 primType B32 - -#define __GLX_DRAWARRAYS_HDR_SIZE 12 - -#define __GLX_DRAWARRAYS_CMD_HDR_SIZE \ - (__GLX_RENDER_HDR_SIZE + __GLX_DRAWARRAYS_HDR_SIZE) - -typedef struct { - __GLX_RENDER_HDR; - __GLX_DRAWARRAYS_HDR; -} __GLXdrawArraysHeader; - -typedef struct { - __GLX_RENDER_LARGE_HDR; - __GLX_DRAWARRAYS_HDR; -} __GLXdrawArraysLargeHeader; - -typedef struct { - __GLX_DRAWARRAYS_HDR; -} __GLXdispatchDrawArraysHeader; - -#define __GLX_COMPONENT_HDR \ - CARD32 datatype B32; \ - INT32 numVals B32; \ - CARD32 component B32 - -typedef struct { - __GLX_COMPONENT_HDR; -} __GLXdispatchDrawArraysComponentHeader; - -#define __GLX_COMPONENT_HDR_SIZE 12 - -/* -** Data that is specific to a glColorTable call -** The data is sent in the following order: -** Render or RenderLarge header -** Pixel header -** ColorTable header -*/ - -#define __GLX_COLOR_TABLE_HDR \ - CARD32 target B32; \ - CARD32 internalformat B32; \ - CARD32 width B32; \ - CARD32 format B32; \ - CARD32 type B32 - -#define __GLX_COLOR_TABLE_HDR_SIZE 20 - -#define __GLX_COLOR_TABLE_CMD_HDR_SIZE \ - (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_COLOR_TABLE_HDR_SIZE) - -typedef struct { - __GLX_RENDER_HDR; - __GLX_PIXEL_HDR; - __GLX_COLOR_TABLE_HDR; -} __GLXColorTableHeader; - -typedef struct { - __GLX_RENDER_LARGE_HDR; - __GLX_PIXEL_HDR; - __GLX_COLOR_TABLE_HDR; -} __GLXColorTableLargeHeader; - -typedef struct { - __GLX_PIXEL_HDR; - __GLX_COLOR_TABLE_HDR; -} __GLXdispatchColorTableHeader; - -/* -** Data that is specific to a glColorSubTable call -** The data is sent in the following order: -** Render or RenderLarge header -** Pixel header -** ColorTable header -*/ - -#define __GLX_COLOR_SUBTABLE_HDR \ - CARD32 target B32; \ - CARD32 start B32; \ - CARD32 count B32; \ - CARD32 format B32; \ - CARD32 type B32 - -#define __GLX_COLOR_SUBTABLE_HDR_SIZE 20 - -#define __GLX_COLOR_SUBTABLE_CMD_HDR_SIZE \ - (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + \ - __GLX_COLOR_SUBTABLE_HDR_SIZE) - -typedef struct { - __GLX_RENDER_HDR; - __GLX_PIXEL_HDR; - __GLX_COLOR_SUBTABLE_HDR; -} __GLXColorSubTableHeader; - -typedef struct { - __GLX_RENDER_LARGE_HDR; - __GLX_PIXEL_HDR; - __GLX_COLOR_SUBTABLE_HDR; -} __GLXColorSubTableLargeHeader; - -typedef struct { - __GLX_PIXEL_HDR; - __GLX_COLOR_SUBTABLE_HDR; -} __GLXdispatchColorSubTableHeader; - -#define GLX_WINDOW_TYPE 1 -#define GLX_PIXMAP_TYPE 2 -#define GLX_VIDEO_SOURCE_TYPE 3 -#define GLX_PBUFFER_TYPE 4 -/* 5 is for DM_PBUFFER */ -#define GLX_GLXWINDOW_TYPE 6 - -/*****************************************************************************/ - -/* -** Restore these definitions back to the typedefs in glx.h -*/ -#undef GLXContextID -#undef GLXPixmap -#undef GLXDrawable -#undef GLXPbuffer -#undef GLXWindow -#undef GLXFBConfigID -#undef GLXFBConfigIDSGIX -#undef GLXPbufferSGIX - - -/* Opcodes for GLX commands */ - -#define X_GLXRender 1 -#define X_GLXRenderLarge 2 -#define X_GLXCreateContext 3 -#define X_GLXDestroyContext 4 -#define X_GLXMakeCurrent 5 -#define X_GLXIsDirect 6 -#define X_GLXQueryVersion 7 -#define X_GLXWaitGL 8 -#define X_GLXWaitX 9 -#define X_GLXCopyContext 10 -#define X_GLXSwapBuffers 11 -#define X_GLXUseXFont 12 -#define X_GLXCreateGLXPixmap 13 -#define X_GLXGetVisualConfigs 14 -#define X_GLXDestroyGLXPixmap 15 -#define X_GLXVendorPrivate 16 -#define X_GLXVendorPrivateWithReply 17 -#define X_GLXQueryExtensionsString 18 -#define X_GLXQueryServerString 19 -#define X_GLXClientInfo 20 -#define X_GLXGetFBConfigs 21 -#define X_GLXCreatePixmap 22 -#define X_GLXDestroyPixmap 23 -#define X_GLXCreateNewContext 24 -#define X_GLXQueryContext 25 -#define X_GLXMakeContextCurrent 26 -#define X_GLXCreatePbuffer 27 -#define X_GLXDestroyPbuffer 28 -#define X_GLXGetDrawableAttributes 29 -#define X_GLXChangeDrawableAttributes 30 -#define X_GLXCreateWindow 31 -#define X_GLXDestroyWindow 32 -#define X_GLXSetClientInfoARB 33 -#define X_GLXCreateContextAtrribsARB 34 -#define X_GLXSetConfigInfo2ARB 35 - -/* Opcodes for single commands (part of GLX command space) */ - -#define X_GLsop_NewList 101 -#define X_GLsop_EndList 102 -#define X_GLsop_DeleteLists 103 -#define X_GLsop_GenLists 104 -#define X_GLsop_FeedbackBuffer 105 -#define X_GLsop_SelectBuffer 106 -#define X_GLsop_RenderMode 107 -#define X_GLsop_Finish 108 -#define X_GLsop_Flush 142 -#define X_GLsop_PixelStoref 109 -#define X_GLsop_PixelStorei 110 -#define X_GLsop_ReadPixels 111 -#define X_GLsop_GetBooleanv 112 -#define X_GLsop_GetClipPlane 113 -#define X_GLsop_GetDoublev 114 -#define X_GLsop_GetError 115 -#define X_GLsop_GetFloatv 116 -#define X_GLsop_GetIntegerv 117 -#define X_GLsop_GetLightfv 118 -#define X_GLsop_GetLightiv 119 -#define X_GLsop_GetMapdv 120 -#define X_GLsop_GetMapfv 121 -#define X_GLsop_GetMapiv 122 -#define X_GLsop_GetMaterialfv 123 -#define X_GLsop_GetMaterialiv 124 -#define X_GLsop_GetPixelMapfv 125 -#define X_GLsop_GetPixelMapuiv 126 -#define X_GLsop_GetPixelMapusv 127 -#define X_GLsop_GetPolygonStipple 128 -#define X_GLsop_GetString 129 -#define X_GLsop_GetTexEnvfv 130 -#define X_GLsop_GetTexEnviv 131 -#define X_GLsop_GetTexGendv 132 -#define X_GLsop_GetTexGenfv 133 -#define X_GLsop_GetTexGeniv 134 -#define X_GLsop_GetTexImage 135 -#define X_GLsop_GetTexParameterfv 136 -#define X_GLsop_GetTexParameteriv 137 -#define X_GLsop_GetTexLevelParameterfv 138 -#define X_GLsop_GetTexLevelParameteriv 139 -#define X_GLsop_IsEnabled 140 -#define X_GLsop_IsList 141 -#define X_GLsop_AreTexturesResident 143 -#define X_GLsop_DeleteTextures 144 -#define X_GLsop_GenTextures 145 -#define X_GLsop_IsTexture 146 -#define X_GLsop_GetColorTable 147 -#define X_GLsop_GetColorTableParameterfv 148 -#define X_GLsop_GetColorTableParameteriv 149 -#define X_GLsop_GetConvolutionFilter 150 -#define X_GLsop_GetConvolutionParameterfv 151 -#define X_GLsop_GetConvolutionParameteriv 152 -#define X_GLsop_GetSeparableFilter 153 -#define X_GLsop_GetHistogram 154 -#define X_GLsop_GetHistogramParameterfv 155 -#define X_GLsop_GetHistogramParameteriv 156 -#define X_GLsop_GetMinmax 157 -#define X_GLsop_GetMinmaxParameterfv 158 -#define X_GLsop_GetMinmaxParameteriv 159 -#define X_GLsop_GetCompressedTexImage 160 - - -/* Opcodes for rendering commands */ - -#define X_GLrop_CallList 1 -#define X_GLrop_CallLists 2 -#define X_GLrop_ListBase 3 -#define X_GLrop_Begin 4 -#define X_GLrop_Bitmap 5 -#define X_GLrop_Color3bv 6 -#define X_GLrop_Color3dv 7 -#define X_GLrop_Color3fv 8 -#define X_GLrop_Color3iv 9 -#define X_GLrop_Color3sv 10 -#define X_GLrop_Color3ubv 11 -#define X_GLrop_Color3uiv 12 -#define X_GLrop_Color3usv 13 -#define X_GLrop_Color4bv 14 -#define X_GLrop_Color4dv 15 -#define X_GLrop_Color4fv 16 -#define X_GLrop_Color4iv 17 -#define X_GLrop_Color4sv 18 -#define X_GLrop_Color4ubv 19 -#define X_GLrop_Color4uiv 20 -#define X_GLrop_Color4usv 21 -#define X_GLrop_EdgeFlagv 22 -#define X_GLrop_End 23 -#define X_GLrop_Indexdv 24 -#define X_GLrop_Indexfv 25 -#define X_GLrop_Indexiv 26 -#define X_GLrop_Indexsv 27 -#define X_GLrop_Normal3bv 28 -#define X_GLrop_Normal3dv 29 -#define X_GLrop_Normal3fv 30 -#define X_GLrop_Normal3iv 31 -#define X_GLrop_Normal3sv 32 -#define X_GLrop_RasterPos2dv 33 -#define X_GLrop_RasterPos2fv 34 -#define X_GLrop_RasterPos2iv 35 -#define X_GLrop_RasterPos2sv 36 -#define X_GLrop_RasterPos3dv 37 -#define X_GLrop_RasterPos3fv 38 -#define X_GLrop_RasterPos3iv 39 -#define X_GLrop_RasterPos3sv 40 -#define X_GLrop_RasterPos4dv 41 -#define X_GLrop_RasterPos4fv 42 -#define X_GLrop_RasterPos4iv 43 -#define X_GLrop_RasterPos4sv 44 -#define X_GLrop_Rectdv 45 -#define X_GLrop_Rectfv 46 -#define X_GLrop_Rectiv 47 -#define X_GLrop_Rectsv 48 -#define X_GLrop_TexCoord1dv 49 -#define X_GLrop_TexCoord1fv 50 -#define X_GLrop_TexCoord1iv 51 -#define X_GLrop_TexCoord1sv 52 -#define X_GLrop_TexCoord2dv 53 -#define X_GLrop_TexCoord2fv 54 -#define X_GLrop_TexCoord2iv 55 -#define X_GLrop_TexCoord2sv 56 -#define X_GLrop_TexCoord3dv 57 -#define X_GLrop_TexCoord3fv 58 -#define X_GLrop_TexCoord3iv 59 -#define X_GLrop_TexCoord3sv 60 -#define X_GLrop_TexCoord4dv 61 -#define X_GLrop_TexCoord4fv 62 -#define X_GLrop_TexCoord4iv 63 -#define X_GLrop_TexCoord4sv 64 -#define X_GLrop_Vertex2dv 65 -#define X_GLrop_Vertex2fv 66 -#define X_GLrop_Vertex2iv 67 -#define X_GLrop_Vertex2sv 68 -#define X_GLrop_Vertex3dv 69 -#define X_GLrop_Vertex3fv 70 -#define X_GLrop_Vertex3iv 71 -#define X_GLrop_Vertex3sv 72 -#define X_GLrop_Vertex4dv 73 -#define X_GLrop_Vertex4fv 74 -#define X_GLrop_Vertex4iv 75 -#define X_GLrop_Vertex4sv 76 -#define X_GLrop_ClipPlane 77 -#define X_GLrop_ColorMaterial 78 -#define X_GLrop_CullFace 79 -#define X_GLrop_Fogf 80 -#define X_GLrop_Fogfv 81 -#define X_GLrop_Fogi 82 -#define X_GLrop_Fogiv 83 -#define X_GLrop_FrontFace 84 -#define X_GLrop_Hint 85 -#define X_GLrop_Lightf 86 -#define X_GLrop_Lightfv 87 -#define X_GLrop_Lighti 88 -#define X_GLrop_Lightiv 89 -#define X_GLrop_LightModelf 90 -#define X_GLrop_LightModelfv 91 -#define X_GLrop_LightModeli 92 -#define X_GLrop_LightModeliv 93 -#define X_GLrop_LineStipple 94 -#define X_GLrop_LineWidth 95 -#define X_GLrop_Materialf 96 -#define X_GLrop_Materialfv 97 -#define X_GLrop_Materiali 98 -#define X_GLrop_Materialiv 99 -#define X_GLrop_PointSize 100 -#define X_GLrop_PolygonMode 101 -#define X_GLrop_PolygonStipple 102 -#define X_GLrop_Scissor 103 -#define X_GLrop_ShadeModel 104 -#define X_GLrop_TexParameterf 105 -#define X_GLrop_TexParameterfv 106 -#define X_GLrop_TexParameteri 107 -#define X_GLrop_TexParameteriv 108 -#define X_GLrop_TexImage1D 109 -#define X_GLrop_TexImage2D 110 -#define X_GLrop_TexEnvf 111 -#define X_GLrop_TexEnvfv 112 -#define X_GLrop_TexEnvi 113 -#define X_GLrop_TexEnviv 114 -#define X_GLrop_TexGend 115 -#define X_GLrop_TexGendv 116 -#define X_GLrop_TexGenf 117 -#define X_GLrop_TexGenfv 118 -#define X_GLrop_TexGeni 119 -#define X_GLrop_TexGeniv 120 -#define X_GLrop_InitNames 121 -#define X_GLrop_LoadName 122 -#define X_GLrop_PassThrough 123 -#define X_GLrop_PopName 124 -#define X_GLrop_PushName 125 -#define X_GLrop_DrawBuffer 126 -#define X_GLrop_Clear 127 -#define X_GLrop_ClearAccum 128 -#define X_GLrop_ClearIndex 129 -#define X_GLrop_ClearColor 130 -#define X_GLrop_ClearStencil 131 -#define X_GLrop_ClearDepth 132 -#define X_GLrop_StencilMask 133 -#define X_GLrop_ColorMask 134 -#define X_GLrop_DepthMask 135 -#define X_GLrop_IndexMask 136 -#define X_GLrop_Accum 137 -#define X_GLrop_Disable 138 -#define X_GLrop_Enable 139 -#define X_GLrop_PopAttrib 141 -#define X_GLrop_PushAttrib 142 -#define X_GLrop_Map1d 143 -#define X_GLrop_Map1f 144 -#define X_GLrop_Map2d 145 -#define X_GLrop_Map2f 146 -#define X_GLrop_MapGrid1d 147 -#define X_GLrop_MapGrid1f 148 -#define X_GLrop_MapGrid2d 149 -#define X_GLrop_MapGrid2f 150 -#define X_GLrop_EvalCoord1dv 151 -#define X_GLrop_EvalCoord1fv 152 -#define X_GLrop_EvalCoord2dv 153 -#define X_GLrop_EvalCoord2fv 154 -#define X_GLrop_EvalMesh1 155 -#define X_GLrop_EvalPoint1 156 -#define X_GLrop_EvalMesh2 157 -#define X_GLrop_EvalPoint2 158 -#define X_GLrop_AlphaFunc 159 -#define X_GLrop_BlendFunc 160 -#define X_GLrop_LogicOp 161 -#define X_GLrop_StencilFunc 162 -#define X_GLrop_StencilOp 163 -#define X_GLrop_DepthFunc 164 -#define X_GLrop_PixelZoom 165 -#define X_GLrop_PixelTransferf 166 -#define X_GLrop_PixelTransferi 167 -#define X_GLrop_PixelMapfv 168 -#define X_GLrop_PixelMapuiv 169 -#define X_GLrop_PixelMapusv 170 -#define X_GLrop_ReadBuffer 171 -#define X_GLrop_CopyPixels 172 -#define X_GLrop_DrawPixels 173 -#define X_GLrop_DepthRange 174 -#define X_GLrop_Frustum 175 -#define X_GLrop_LoadIdentity 176 -#define X_GLrop_LoadMatrixf 177 -#define X_GLrop_LoadMatrixd 178 -#define X_GLrop_MatrixMode 179 -#define X_GLrop_MultMatrixf 180 -#define X_GLrop_MultMatrixd 181 -#define X_GLrop_Ortho 182 -#define X_GLrop_PopMatrix 183 -#define X_GLrop_PushMatrix 184 -#define X_GLrop_Rotated 185 -#define X_GLrop_Rotatef 186 -#define X_GLrop_Scaled 187 -#define X_GLrop_Scalef 188 -#define X_GLrop_Translated 189 -#define X_GLrop_Translatef 190 -#define X_GLrop_Viewport 191 -#define X_GLrop_DrawArrays 193 -#define X_GLrop_PolygonOffset 192 -#define X_GLrop_CopyTexImage1D 4119 -#define X_GLrop_CopyTexImage2D 4120 -#define X_GLrop_CopyTexSubImage1D 4121 -#define X_GLrop_CopyTexSubImage2D 4122 -#define X_GLrop_TexSubImage1D 4099 -#define X_GLrop_TexSubImage2D 4100 -#define X_GLrop_BindTexture 4117 -#define X_GLrop_PrioritizeTextures 4118 -#define X_GLrop_Indexubv 194 -#define X_GLrop_BlendColor 4096 -#define X_GLrop_BlendEquation 4097 -#define X_GLrop_ColorTable 2053 -#define X_GLrop_ColorTableParameterfv 2054 -#define X_GLrop_ColorTableParameteriv 2055 -#define X_GLrop_CopyColorTable 2056 -#define X_GLrop_ColorSubTable 195 -#define X_GLrop_CopyColorSubTable 196 -#define X_GLrop_ConvolutionFilter1D 4101 -#define X_GLrop_ConvolutionFilter2D 4102 -#define X_GLrop_ConvolutionParameterf 4103 -#define X_GLrop_ConvolutionParameterfv 4104 -#define X_GLrop_ConvolutionParameteri 4105 -#define X_GLrop_ConvolutionParameteriv 4106 -#define X_GLrop_CopyConvolutionFilter1D 4107 -#define X_GLrop_CopyConvolutionFilter2D 4108 -#define X_GLrop_SeparableFilter2D 4109 -#define X_GLrop_Histogram 4110 -#define X_GLrop_Minmax 4111 -#define X_GLrop_ResetHistogram 4112 -#define X_GLrop_ResetMinmax 4113 -#define X_GLrop_TexImage3D 4114 -#define X_GLrop_TexSubImage3D 4115 -#define X_GLrop_CopyTexSubImage3D 4123 -#define X_GLrop_DrawArraysEXT 4116 - -/* Added for core GL version 1.3 */ - -#define X_GLrop_ActiveTextureARB 197 -#define X_GLrop_MultiTexCoord1dvARB 198 -#define X_GLrop_MultiTexCoord1fvARB 199 -#define X_GLrop_MultiTexCoord1ivARB 200 -#define X_GLrop_MultiTexCoord1svARB 201 -#define X_GLrop_MultiTexCoord2dvARB 202 -#define X_GLrop_MultiTexCoord2fvARB 203 -#define X_GLrop_MultiTexCoord2ivARB 204 -#define X_GLrop_MultiTexCoord2svARB 205 -#define X_GLrop_MultiTexCoord3dvARB 206 -#define X_GLrop_MultiTexCoord3fvARB 207 -#define X_GLrop_MultiTexCoord3ivARB 208 -#define X_GLrop_MultiTexCoord3svARB 209 -#define X_GLrop_MultiTexCoord4dvARB 210 -#define X_GLrop_MultiTexCoord4fvARB 211 -#define X_GLrop_MultiTexCoord4ivARB 212 -#define X_GLrop_MultiTexCoord4svARB 213 -#define X_GLrop_CompressedTexImage1D 214 -#define X_GLrop_CompressedTexImage2D 215 -#define X_GLrop_CompressedTexImage3D 216 -#define X_GLrop_CompressedTexSubImage1D 217 -#define X_GLrop_CompressedTexSubImage2D 218 -#define X_GLrop_CompressedTexSubImage3D 219 -#define X_GLrop_SampleCoverageARB 229 - -/* Added for core GL version 1.4 */ - -#define X_GLrop_WindowPos3fARB 230 -#define X_GLrop_FogCoordfv 4124 -#define X_GLrop_FogCoorddv 4125 -#define X_GLrop_PointParameterfARB 2065 -#define X_GLrop_PointParameterfvARB 2066 -#define X_GLrop_SecondaryColor3bv 4126 -#define X_GLrop_SecondaryColor3sv 4127 -#define X_GLrop_SecondaryColor3iv 4128 -#define X_GLrop_SecondaryColor3fv 4129 -#define X_GLrop_SecondaryColor3dv 4130 -#define X_GLrop_SecondaryColor3ubv 4131 -#define X_GLrop_SecondaryColor3usv 4132 -#define X_GLrop_SecondaryColor3uiv 4133 -#define X_GLrop_BlendFuncSeparate 4134 -#define X_GLrop_PointParameteri 4221 -#define X_GLrop_PointParameteriv 4222 - -/* Added for core GL version 1.5 */ -/* XXX opcodes not defined in the spec */ - -/* Opcodes for Vendor Private commands */ - - -#define X_GLvop_GetConvolutionFilterEXT 1 -#define X_GLvop_GetConvolutionParameterfvEXT 2 -#define X_GLvop_GetConvolutionParameterivEXT 3 -#define X_GLvop_GetSeparableFilterEXT 4 -#define X_GLvop_GetHistogramEXT 5 -#define X_GLvop_GetHistogramParameterfvEXT 6 -#define X_GLvop_GetHistogramParameterivEXT 7 -#define X_GLvop_GetMinmaxEXT 8 -#define X_GLvop_GetMinmaxParameterfvEXT 9 -#define X_GLvop_GetMinmaxParameterivEXT 10 -#define X_GLvop_AreTexturesResidentEXT 11 -#define X_GLvop_DeleteTexturesEXT 12 -#define X_GLvop_GenTexturesEXT 13 -#define X_GLvop_IsTextureEXT 14 -#define X_GLvop_GetCombinerInputParameterfvNV 1270 -#define X_GLvop_GetCombinerInputParameterivNV 1271 -#define X_GLvop_GetCombinerOutputParameterfvNV 1272 -#define X_GLvop_GetCombinerOutputParameterivNV 1273 -#define X_GLvop_GetFinalCombinerOutputParameterfvNV 1274 -#define X_GLvop_GetFinalCombinerOutputParameterivNV 1275 -#define X_GLvop_DeleteFenceNV 1276 -#define X_GLvop_GenFencesNV 1277 -#define X_GLvop_IsFenceNV 1278 -#define X_GLvop_TestFenceNV 1279 -#define X_GLvop_GetFenceivNV 1280 -#define X_GLvop_AreProgramsResidentNV 1293 -#define X_GLvop_DeleteProgramARB 1294 -#define X_GLvop_GenProgramsARB 1295 -#define X_GLvop_GetProgramEnvParameterfvARB 1296 -#define X_GLvop_GetProgramEnvParameterdvARB 1297 -#define X_GLvop_GetProgramEnvParameterivNV 1298 -#define X_GLvop_GetProgramStringNV 1299 -#define X_GLvop_GetTrackMatrixivNV 1300 -#define X_GLvop_GetVertexAttribdvARB 1301 -#define X_GLvop_GetVertexAttribfvARB 1302 -#define X_GLvop_GetVertexAttribivARB 1303 -#define X_GLvop_IsProgramARB 1304 -#define X_GLvop_GetProgramLocalParameterfvARB 1305 -#define X_GLvop_GetProgramLocalParameterdvARB 1306 -#define X_GLvop_GetProgramivARB 1307 -#define X_GLvop_GetProgramStringARB 1308 -#define X_GLvop_GetProgramNamedParameter4fvNV 1310 -#define X_GLvop_GetProgramNamedParameter4dvNV 1311 -#define X_GLvop_SampleMaskSGIS 2048 -#define X_GLvop_SamplePatternSGIS 2049 -#define X_GLvop_GetDetailTexFuncSGIS 4096 -#define X_GLvop_GetSharpenTexFuncSGIS 4097 -#define X_GLvop_GetColorTableSGI 4098 -#define X_GLvop_GetColorTableParameterfvSGI 4099 -#define X_GLvop_GetColorTableParameterivSGI 4100 -#define X_GLvop_GetTexFilterFuncSGIS 4101 -#define X_GLvop_GetInstrumentsSGIX 4102 -#define X_GLvop_InstrumentsBufferSGIX 4103 -#define X_GLvop_PollInstrumentsSGIX 4104 -#define X_GLvop_FlushRasterSGIX 4105 - -/* Opcodes for GLX vendor private commands */ - -#define X_GLXvop_QueryContextInfoEXT 1024 -#define X_GLXvop_BindTexImageEXT 1330 -#define X_GLXvop_ReleaseTexImageEXT 1331 -#define X_GLXvop_SwapIntervalSGI 65536 -#define X_GLXvop_MakeCurrentReadSGI 65537 -#define X_GLXvop_CreateGLXVideoSourceSGIX 65538 -#define X_GLXvop_DestroyGLXVideoSourceSGIX 65539 -#define X_GLXvop_GetFBConfigsSGIX 65540 -#define X_GLXvop_CreateContextWithConfigSGIX 65541 -#define X_GLXvop_CreateGLXPixmapWithConfigSGIX 65542 -#define X_GLXvop_CreateGLXPbufferSGIX 65543 -#define X_GLXvop_DestroyGLXPbufferSGIX 65544 -#define X_GLXvop_ChangeDrawableAttributesSGIX 65545 -#define X_GLXvop_GetDrawableAttributesSGIX 65546 -#define X_GLXvop_JoinSwapGroupSGIX 65547 -#define X_GLXvop_BindSwapBarrierSGIX 65548 -#define X_GLXvop_QueryMaxSwapBarriersSGIX 65549 -#define X_GLXvop_QueryHyperpipeNetworkSGIX 65550 -#define X_GLXvop_QueryHyperpipeConfigSGIX 65551 -#define X_GLXvop_HyperpipeConfigSGIX 65552 -#define X_GLXvop_DestroyHyperpipeConfigSGIX 65553 - -/* ARB extension opcodes */ - -/* 1. GL_ARB_multitexture - see GL 1.2 opcodes */ -/* 5. GL_ARB_multisample - see GL 1.3 opcodes */ -/* 12. GL_ARB_texture_compression - see GL 1.3 opcodes */ -/* 14. GL_ARB_point_parameters - see GL 1.4 opcodees */ - -/* 15. GL_ARB_vertex_blend */ -#define X_GLrop_WeightbvARB 220 -#define X_GLrop_WeightubvARB 221 -#define X_GLrop_WeightsvARB 222 -#define X_GLrop_WeightusvARB 223 -#define X_GLrop_WeightivARB 224 -#define X_GLrop_WeightuivARB 225 -#define X_GLrop_VertexBlendARB 226 -#define X_GLrop_WeightfvARB 227 -#define X_GLrop_WeightdvARB 228 - -/* 16. GL_ARB_matrix_palette */ -/* XXX opcodes not defined in the spec */ - -/* 25. GL_ARB_window_pos - see GL 1.4 opcodes */ - -/* 26. GL_ARB_vertex_program */ -#define X_GLrop_BindProgramARB 4180 -#define X_GLrop_ProgramEnvParameter4fvARB 4184 -#define X_GLrop_ProgramEnvParameter4dvARB 4185 -#define X_GLrop_VertexAttrib1svARB 4189 -#define X_GLrop_VertexAttrib2svARB 4190 -#define X_GLrop_VertexAttrib3svARB 4191 -#define X_GLrop_VertexAttrib4svARB 4192 -#define X_GLrop_VertexAttrib1fvARB 4193 -#define X_GLrop_VertexAttrib2fvARB 4194 -#define X_GLrop_VertexAttrib3fvARB 4195 -#define X_GLrop_VertexAttrib4fvARB 4196 -#define X_GLrop_VertexAttrib1dvARB 4197 -#define X_GLrop_VertexAttrib2dvARB 4198 -#define X_GLrop_VertexAttrib3dvARB 4199 -#define X_GLrop_ProgramLocalParameter4fvARB 4215 -#define X_GLrop_ProgramLocalParameter4dvARB 4216 -#define X_GLrop_ProgramStringARB 4217 -#define X_GLrop_VertexAttrib4dvARB 4200 -#define X_GLrop_VertexAttrib4NubvARB 4201 -#define X_GLrop_VertexAttrib4bvARB 4230 -#define X_GLrop_VertexAttrib4ivARB 4231 -#define X_GLrop_VertexAttrib4ubvARB 4232 -#define X_GLrop_VertexAttrib4usvARB 4233 -#define X_GLrop_VertexAttrib4uivARB 4234 -#define X_GLrop_VertexAttrib4NbvARB 4235 -#define X_GLrop_VertexAttrib4NsvARB 4236 -#define X_GLrop_VertexAttrib4NivARB 4237 -#define X_GLrop_VertexAttrib4NusvARB 4238 -#define X_GLrop_VertexAttrib4NuivARB 4239 - -/* 27. GL_ARB_fragment_program - see GL_ARB_vertex_program opcodes */ - -/* 29. GL_ARB_occlusion_query */ -/* XXX opcodes not defined in the spec */ - - -/* New extension opcodes */ - -/* 145. GL_EXT_secondary_color - see GL 1.4 opcodes */ - -/* 188. GL_EXT_vertex_weighting */ -#define X_GLrop_VertexWeightfvEXT 4135 - -/* 191. GL_NV_register_combiners */ -#define X_GLrop_CombinerParameterfNV 4136 -#define X_GLrop_CombinerParameterfvNV 4137 -#define X_GLrop_CombinerParameteriNV 4138 -#define X_GLrop_CombinerParameterivNV 4139 -#define X_GLrop_CombinerInputNV 4140 -#define X_GLrop_CombinerOutputNV 4141 -#define X_GLrop_FinalCombinerInputNV 4142 - -/* 222. GL_NV_fence */ -#define X_GLrop_SetFenceNV 4143 -#define X_GLrop_FinishFenceNV 4144 - -/* 227. GL_NV_register_combiners2 */ -/* XXX opcodes not defined in the spec */ - -/* 233. GL_NV_vertex_program - see also GL_ARB_vertex_program opcodes */ -#define X_GLrop_ExecuteProgramNV 4181 -#define X_GLrop_RequestResidentProgramsNV 4182 -#define X_GLrop_LoadProgamNV 4183 -#define X_GLrop_ProgramParameters4fvNV 4186 -#define X_GLrop_ProgramParameters4dvNV 4187 -#define X_GLrop_TrackMatrixNV 4188 -#define X_GLrop_VertexAttribs1svNV 4202 -#define X_GLrop_VertexAttribs2svNV 4203 -#define X_GLrop_VertexAttribs3svNV 4204 -#define X_GLrop_VertexAttribs4svNV 4205 -#define X_GLrop_VertexAttribs1fvNV 4206 -#define X_GLrop_VertexAttribs2fvNV 4207 -#define X_GLrop_VertexAttribs3fvNV 4208 -#define X_GLrop_VertexAttribs4fvNV 4209 -#define X_GLrop_VertexAttribs1dvNV 4210 -#define X_GLrop_VertexAttribs2dvNV 4211 -#define X_GLrop_VertexAttribs3dvNV 4212 -#define X_GLrop_VertexAttribs4dvNV 4213 -#define X_GLrop_VertexAttribs4ubvNV 4214 - -/* 261. GL_NV_occlusion_query */ -/* XXX opcodes not defined in the spec */ - -/* 262. GL_NV_point_sprite - see GL 1.4 opcodes */ - -/* 268. GL_EXT_stencil_two_side */ -#define X_GLrop_ActiveStencilFaceEXT 4220 - -/* 282. GL_NV_fragment_program - see also GL_NV_vertex_program and GL_ARB_vertex_program opcodes */ -#define X_GLrop_ProgramNamedParameter4fvNV 4218 -#define X_GLrop_ProgramNamedParameter4dvNV 4219 - -/* 285. GL_NV_primitive_restart */ -/* XXX opcodes not defined in the spec */ - -/* 297. GL_EXT_depth_bounds_test */ -#define X_GLrop_DepthBoundsEXT 4229 - -/* 299. GL_EXT_blend_equation_separate */ -#define X_GLrop_BlendEquationSeparateEXT 4228 - -/* 310. GL_EXT_framebuffer_object */ -#define X_GLvop_IsRenderbufferEXT 1422 -#define X_GLvop_GenRenderbuffersEXT 1423 -#define X_GLvop_GetRenderbufferParameterivEXT 1424 -#define X_GLvop_IsFramebufferEXT 1425 -#define X_GLvop_GenFramebuffersEXT 1426 -#define X_GLvop_CheckFramebufferStatusEXT 1427 -#define X_GLvop_GetFramebufferAttachmentParameterivEXT 1428 - -#endif /* _GLX_glxproto_h_ */ +#ifndef _GLX_glxproto_h_ +#define _GLX_glxproto_h_ + +/* + * SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) + * Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice including the dates of first publication and + * either this permission notice or a reference to + * http://oss.sgi.com/projects/FreeB/ + * shall be included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + * + * Except as contained in this notice, the name of Silicon Graphics, Inc. + * shall not be used in advertising or otherwise to promote the sale, use or + * other dealings in this Software without prior written authorization from + * Silicon Graphics, Inc. + */ + +#include + +/*****************************************************************************/ + +/* +** Errrors. +*/ +#define GLXBadContext 0 +#define GLXBadContextState 1 +#define GLXBadDrawable 2 +#define GLXBadPixmap 3 +#define GLXBadContextTag 4 +#define GLXBadCurrentWindow 5 +#define GLXBadRenderRequest 6 +#define GLXBadLargeRequest 7 +#define GLXUnsupportedPrivateRequest 8 +#define GLXBadFBConfig 9 +#define GLXBadPbuffer 10 +#define GLXBadCurrentDrawable 11 +#define GLXBadWindow 12 +#define GLXBadProfileARB 13 + +#define __GLX_NUMBER_ERRORS 14 + +/* +** Events. +** __GLX_NUMBER_EVENTS is set to 17 to account for the BufferClobberSGIX +** event - this helps initialization if the server supports the pbuffer +** extension and the client doesn't. +*/ +#define GLX_PbufferClobber 0 +#define GLX_BufferSwapComplete 1 + +#define __GLX_NUMBER_EVENTS 17 + +#define GLX_EXTENSION_NAME "GLX" +#define GLX_EXTENSION_ALIAS "SGI-GLX" + +#define __GLX_MAX_CONTEXT_PROPS 3 + +#ifndef GLX_VENDOR +#define GLX_VENDOR 0x1 +#endif +#ifndef GLX_VERSION +#define GLX_VERSION 0x2 +#endif +#ifndef GLX_EXTENSIONS +#define GLX_EXTENSIONS 0x3 +#endif + +/*****************************************************************************/ + +/* +** For the structure definitions in this file, we must redefine these types in +** terms of Xmd.h types, which may include bitfields. All of these are +** undef'ed at the end of this file, restoring the definitions in glx.h. +*/ +#define GLXContextID CARD32 +#define GLXPixmap CARD32 +#define GLXDrawable CARD32 +#define GLXPbuffer CARD32 +#define GLXWindow CARD32 +#define GLXFBConfigID CARD32 +#define GLXFBConfigIDSGIX CARD32 +#define GLXPbufferSGIX CARD32 + +/* +** ContextTag is not exposed to the API. +*/ +typedef CARD32 GLXContextTag; + +/*****************************************************************************/ + +/* +** Sizes of basic wire types. +*/ +#define __GLX_SIZE_INT8 1 +#define __GLX_SIZE_INT16 2 +#define __GLX_SIZE_INT32 4 +#define __GLX_SIZE_CARD8 1 +#define __GLX_SIZE_CARD16 2 +#define __GLX_SIZE_CARD32 4 +#define __GLX_SIZE_FLOAT32 4 +#define __GLX_SIZE_FLOAT64 8 + +/*****************************************************************************/ + +/* Requests */ + +/* +** Render command request. A bunch of rendering commands are packed into +** a single X extension request. +*/ +typedef struct GLXRender { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextTag contextTag B32; +} xGLXRenderReq; +#define sz_xGLXRenderReq 8 + +/* +** The maximum size that a GLXRender command can be. The value must fit +** in 16 bits and should be a multiple of 4. +*/ +#define __GLX_MAX_RENDER_CMD_SIZE 64000 + +/* +** Large render command request. A single large rendering command +** is output in multiple X extension requests. The first packet +** contains an opcode dependent header (see below) that describes +** the data that follows. +*/ +typedef struct GLXRenderLarge { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextTag contextTag B32; + CARD16 requestNumber B16; + CARD16 requestTotal B16; + CARD32 dataBytes B32; +} xGLXRenderLargeReq; +#define sz_xGLXRenderLargeReq 16 + +/* +** GLX single request. Commands that go over as single GLX protocol +** requests use this structure. The glxCode will be one of the X_GLsop +** opcodes. +*/ +typedef struct GLXSingle { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextTag contextTag B32; +} xGLXSingleReq; +#define sz_xGLXSingleReq 8 + +/* +** glXQueryVersion request +*/ +typedef struct GLXQueryVersion { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 majorVersion B32; + CARD32 minorVersion B32; +} xGLXQueryVersionReq; +#define sz_xGLXQueryVersionReq 12 + +/* +** glXIsDirect request +*/ +typedef struct GLXIsDirect { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextID context B32; +} xGLXIsDirectReq; +#define sz_xGLXIsDirectReq 8 + +/* +** glXCreateContext request +*/ +typedef struct GLXCreateContext { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextID context B32; + CARD32 visual B32; + CARD32 screen B32; + GLXContextID shareList B32; + BOOL isDirect; + CARD8 reserved1; + CARD16 reserved2 B16; +} xGLXCreateContextReq; +#define sz_xGLXCreateContextReq 24 + +/* +** glXDestroyContext request +*/ +typedef struct GLXDestroyContext { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextID context B32; +} xGLXDestroyContextReq; +#define sz_xGLXDestroyContextReq 8 + +/* +** glXMakeCurrent request +*/ +typedef struct GLXMakeCurrent { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXDrawable drawable B32; + GLXContextID context B32; + GLXContextTag oldContextTag B32; +} xGLXMakeCurrentReq; +#define sz_xGLXMakeCurrentReq 16 + +/* +** glXWaitGL request +*/ +typedef struct GLXWaitGL { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextTag contextTag B32; +} xGLXWaitGLReq; +#define sz_xGLXWaitGLReq 8 + +/* +** glXWaitX request +*/ +typedef struct GLXWaitX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextTag contextTag B32; +} xGLXWaitXReq; +#define sz_xGLXWaitXReq 8 + +/* +** glXCopyContext request +*/ +typedef struct GLXCopyContext { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextID source B32; + GLXContextID dest B32; + CARD32 mask B32; + GLXContextTag contextTag B32; +} xGLXCopyContextReq; +#define sz_xGLXCopyContextReq 20 + +/* +** glXSwapBuffers request +*/ +typedef struct GLXSwapBuffers { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextTag contextTag B32; + GLXDrawable drawable B32; +} xGLXSwapBuffersReq; +#define sz_xGLXSwapBuffersReq 12 + +/* +** glXUseXFont request +*/ +typedef struct GLXUseXFont { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextTag contextTag B32; + CARD32 font B32; + CARD32 first B32; + CARD32 count B32; + CARD32 listBase B32; +} xGLXUseXFontReq; +#define sz_xGLXUseXFontReq 24 + +/* +** glXCreateGLXPixmap request +*/ +typedef struct GLXCreateGLXPixmap { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 screen B32; + CARD32 visual B32; + CARD32 pixmap B32; + GLXPixmap glxpixmap B32; +} xGLXCreateGLXPixmapReq; +#define sz_xGLXCreateGLXPixmapReq 20 + +/* +** glXDestroyGLXPixmap request +*/ +typedef struct GLXDestroyGLXPixmap { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXPixmap glxpixmap B32; +} xGLXDestroyGLXPixmapReq; +#define sz_xGLXDestroyGLXPixmapReq 8 + +/* +** glXGetVisualConfigs request +*/ +typedef struct GLXGetVisualConfigs { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 screen B32; +} xGLXGetVisualConfigsReq; +#define sz_xGLXGetVisualConfigsReq 8 + +/* +** glXVendorPrivate request. +*/ +typedef struct GLXVendorPrivate { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + GLXContextTag contextTag B32; + /* + ** More data may follow; this is just the header. + */ +} xGLXVendorPrivateReq; +#define sz_xGLXVendorPrivateReq 12 + +/* +** glXVendorPrivateWithReply request +*/ +typedef struct GLXVendorPrivateWithReply { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + GLXContextTag contextTag B32; + /* + ** More data may follow; this is just the header. + */ +} xGLXVendorPrivateWithReplyReq; +#define sz_xGLXVendorPrivateWithReplyReq 12 + +/* +** glXQueryExtensionsString request +*/ +typedef struct GLXQueryExtensionsString { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 screen B32; +} xGLXQueryExtensionsStringReq; +#define sz_xGLXQueryExtensionsStringReq 8 + +/* +** glXQueryServerString request +*/ +typedef struct GLXQueryServerString { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 screen B32; + CARD32 name B32; +} xGLXQueryServerStringReq; +#define sz_xGLXQueryServerStringReq 12 + +/* +** glXClientInfo request +*/ +typedef struct GLXClientInfo { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 major B32; + CARD32 minor B32; + CARD32 numbytes B32; +} xGLXClientInfoReq; +#define sz_xGLXClientInfoReq 16 + +/*** Start of GLX 1.3 requests */ + +/* +** glXGetFBConfigs request +*/ +typedef struct GLXGetFBConfigs { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 screen B32; +} xGLXGetFBConfigsReq; +#define sz_xGLXGetFBConfigsReq 8 + +/* +** glXCreatePixmap request +*/ +typedef struct GLXCreatePixmap { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 screen B32; + GLXFBConfigID fbconfig B32; + CARD32 pixmap B32; + GLXPixmap glxpixmap B32; + CARD32 numAttribs B32; + /* followed by attribute list */ +} xGLXCreatePixmapReq; +#define sz_xGLXCreatePixmapReq 24 + +/* +** glXDestroyPixmap request +*/ +typedef struct GLXDestroyPixmap { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXPixmap glxpixmap B32; +} xGLXDestroyPixmapReq; +#define sz_xGLXDestroyPixmapReq 8 + +/* +** glXCreateNewContext request +*/ +typedef struct GLXCreateNewContext { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextID context B32; + GLXFBConfigID fbconfig B32; + CARD32 screen B32; + CARD32 renderType; + GLXContextID shareList B32; + BOOL isDirect; + CARD8 reserved1; + CARD16 reserved2 B16; +} xGLXCreateNewContextReq; +#define sz_xGLXCreateNewContextReq 28 + +/* +** glXQueryContext request +*/ +typedef struct GLXQueryContext { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextID context B32; +} xGLXQueryContextReq; +#define sz_xGLXQueryContextReq 8 + +/* +** glXMakeContextCurrent request +*/ +typedef struct GLXMakeContextCurrent { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextTag oldContextTag B32; + GLXDrawable drawable B32; + GLXDrawable readdrawable B32; + GLXContextID context B32; +} xGLXMakeContextCurrentReq; +#define sz_xGLXMakeContextCurrentReq 20 + +/* +** glXCreatePbuffer request +*/ +typedef struct GLXCreatePbuffer { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 screen B32; + GLXFBConfigID fbconfig B32; + GLXPbuffer pbuffer B32; + CARD32 numAttribs B32; + /* followed by attribute list */ +} xGLXCreatePbufferReq; +#define sz_xGLXCreatePbufferReq 20 + +/* +** glXDestroyPbuffer request +*/ +typedef struct GLXDestroyPbuffer { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXPbuffer pbuffer B32; +} xGLXDestroyPbufferReq; +#define sz_xGLXDestroyPbufferReq 8 + +/* +** glXGetDrawableAttributes request +*/ +typedef struct GLXGetDrawableAttributes { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXDrawable drawable B32; +} xGLXGetDrawableAttributesReq; +#define sz_xGLXGetDrawableAttributesReq 8 + +/* +** glXChangeDrawableAttributes request +*/ +typedef struct GLXChangeDrawableAttributes { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXDrawable drawable B32; + CARD32 numAttribs B32; + /* followed by attribute list */ +} xGLXChangeDrawableAttributesReq; +#define sz_xGLXChangeDrawableAttributesReq 12 + +/* +** glXCreateWindow request +*/ +typedef struct GLXCreateWindow { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 screen B32; + GLXFBConfigID fbconfig B32; + CARD32 window B32; + GLXWindow glxwindow B32; + CARD32 numAttribs B32; + /* followed by attribute list */ +} xGLXCreateWindowReq; +#define sz_xGLXCreateWindowReq 24 + +/* +** glXDestroyWindow request +*/ +typedef struct GLXDestroyWindow { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXWindow glxwindow B32; +} xGLXDestroyWindowReq; +#define sz_xGLXDestroyWindowReq 8 + +/* Replies */ + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 error B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetErrorReply; +#define sz_xGLXGetErrorReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + GLXContextTag contextTag B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXMakeCurrentReply; +#define sz_xGLXMakeCurrentReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXReadPixelsReply; +#define sz_xGLXReadPixelsReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 width B32; + CARD32 height B32; + CARD32 depth B32; + CARD32 pad6 B32; +} xGLXGetTexImageReply; +#define sz_xGLXGetTexImageReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 width B32; + CARD32 height B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetSeparableFilterReply; +#define sz_xGLXGetSeparableFilterReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 width B32; + CARD32 height B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetConvolutionFilterReply; +#define sz_xGLXGetConvolutionFilterReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 width B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetHistogramReply; +#define sz_xGLXGetHistogramReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetMinmaxReply; +#define sz_xGLXGetMinmaxReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 retval B32; + CARD32 size B32; + CARD32 newMode B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXRenderModeReply; +#define sz_xGLXRenderModeReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 majorVersion B32; + CARD32 minorVersion B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXQueryVersionReply; +#define sz_xGLXQueryVersionReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 numVisuals B32; + CARD32 numProps B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetVisualConfigsReply; +#define sz_xGLXGetVisualConfigsReply 32 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + BOOL isDirect; + CARD8 pad1; + CARD16 pad2 B16; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; + CARD32 pad7 B32; +} xGLXIsDirectReply; +#define sz_xGLXIsDirectReply 32 + +/* +** This reply structure is used for all single replies. Single replies +** ship either 1 piece of data or N pieces of data. In these cases +** size indicates how much data is to be returned. +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 retval B32; + CARD32 size B32; + CARD32 pad3 B32; /* NOTE: may hold a single value */ + CARD32 pad4 B32; /* NOTE: may hold half a double */ + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXSingleReply; +#define sz_xGLXSingleReply 32 + +/* +** This reply structure is used for all Vendor Private replies. Vendor +** Private replies can ship up to 24 bytes within the header or can +** be variable sized, in which case, the reply length field indicates +** the number of words of data which follow the header. +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 retval B32; + CARD32 size B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXVendorPrivReply; +#define sz_xGLXVendorPrivReply 32 + +/* +** QueryExtensionsStringReply +** n indicates the number of bytes to be returned. +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 n B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXQueryExtensionsStringReply; +#define sz_xGLXQueryExtensionsStringReply 32 + +/* +** QueryServerString Reply struct +** n indicates the number of bytes to be returned. +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 n B32; + CARD32 pad3 B32; /* NOTE: may hold a single value */ + CARD32 pad4 B32; /* NOTE: may hold half a double */ + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXQueryServerStringReply; +#define sz_xGLXQueryServerStringReply 32 + +/*** Start of GLX 1.3 replies */ + +/* +** glXGetFBConfigs reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 numFBConfigs B32; + CARD32 numAttribs B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetFBConfigsReply; +#define sz_xGLXGetFBConfigsReply 32 + +/* +** glXQueryContext reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 n B32; /* number of attribute/value pairs */ + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXQueryContextReply; +#define sz_xGLXQueryContextReply 32 + +/* +** glXMakeContextCurrent reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + GLXContextTag contextTag B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXMakeContextCurrentReply; +#define sz_xGLXMakeContextCurrentReply 32 + +/* +** glXCreateGLXPbuffer reply +** This is used only in the direct rendering case on SGIs - otherwise +** CreateGLXPbuffer has no reply. It is not part of GLX 1.3. +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 success; + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXCreateGLXPbufferReply; +#define sz_xGLXCreateGLXPbufferReply 32 + +/* +** glXGetDrawableAttributes reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 numAttribs B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetDrawableAttributesReply; +#define sz_xGLXGetDrawableAttributesReply 32 + +/* +** glXGetColorTable reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 pad2 B32; + CARD32 width B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetColorTableReply; +#define sz_xGLXGetColorTableReply 32 + +/************************************************************************/ + +/* GLX extension requests and replies */ + +/* +** glXQueryContextInfoEXT request +*/ +typedef struct GLXQueryContextInfoEXT { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + GLXContextID context B32; +} xGLXQueryContextInfoEXTReq; +#define sz_xGLXQueryContextInfoEXTReq 16 + +/* +** glXQueryContextInfoEXT reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 n B32; /* number of attribute/value pairs */ + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXQueryContextInfoEXTReply; +#define sz_xGLXQueryContextInfoEXTReply 32 + +/* +** glXMakeCurrentReadSGI request +*/ +typedef struct GLXMakeCurrentReadSGI { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + GLXContextTag oldContextTag B32; + GLXDrawable drawable B32; + GLXDrawable readable B32; + GLXContextID context B32; +} xGLXMakeCurrentReadSGIReq; +#define sz_xGLXMakeCurrentReadSGIReq 24 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + GLXContextTag contextTag B32; + CARD32 writeVid B32; + CARD32 writeType B32; + CARD32 readVid B32; + CARD32 readType B32; + CARD32 pad6 B32; +} xGLXMakeCurrentReadSGIReply; +#define sz_xGLXMakeCurrentReadSGIReply 32 + +/* +** glXGetFBConfigsSGIX request +*/ +typedef struct GLXGetFBConfigsSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + CARD32 screen B32; +} xGLXGetFBConfigsSGIXReq; +#define sz_xGLXGetFBConfigsSGIXReq 16 + +/* +** glXCreateContextWithConfigSGIX request +*/ + +typedef struct GLXCreateContextWithConfigSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + GLXContextID context B32; + GLXFBConfigID fbconfig B32; + CARD32 screen B32; + CARD32 renderType; + GLXContextID shareList B32; + BOOL isDirect; + CARD8 reserved1; + CARD16 reserved2 B16; +} xGLXCreateContextWithConfigSGIXReq; +#define sz_xGLXCreateContextWithConfigSGIXReq 36 + +/* +** glXCreatePixmapWithConfigSGIX request +*/ + +typedef struct GLXCreateGLXPixmapWithConfigSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + CARD32 screen B32; + GLXFBConfigID fbconfig B32; + CARD32 pixmap B32; + GLXPixmap glxpixmap B32; +} xGLXCreateGLXPixmapWithConfigSGIXReq; +#define sz_xGLXCreateGLXPixmapWithConfigSGIXReq 28 + +/* +** glXCreateGLXPbufferSGIX request +*/ +typedef struct GLXCreateGLXPbufferSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + CARD32 screen B32; + GLXFBConfigID fbconfig B32; + GLXPbuffer pbuffer B32; + CARD32 width B32; + CARD32 height B32; + /* followed by attribute list */ +} xGLXCreateGLXPbufferSGIXReq; +#define sz_xGLXCreateGLXPbufferSGIXReq 32 + +/* +** glXDestroyGLXPbufferSGIX request +*/ +typedef struct GLXDestroyGLXPbuffer { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + GLXPbuffer pbuffer B32; +} xGLXDestroyGLXPbufferSGIXReq; +#define sz_xGLXDestroyGLXPbufferSGIXReq 16 + +/* +** glXChangeDrawableAttributesSGIX request +*/ +typedef struct GLXChangeDrawableAttributesSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + GLXDrawable drawable B32; + CARD32 numAttribs B32; + /* followed by attribute list */ +} xGLXChangeDrawableAttributesSGIXReq; +#define sz_xGLXChangeDrawableAttributesSGIXReq 20 + +/* +** glXGetDrawableAttributesSGIX request +*/ +typedef struct GLXGetDrawableAttributesSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + GLXDrawable drawable B32; +} xGLXGetDrawableAttributesSGIXReq; +#define sz_xGLXGetDrawableAttributesSGIXReq 16 + +/* +** glXGetDrawableAttributesSGIX reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 numAttribs B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXGetDrawableAttributesSGIXReply; +#define sz_xGLXGetDrawableAttributesSGIXReply 32 + +/* +** glXJoinSwapGroupSGIX request +*/ +typedef struct GLXJoinSwapGroupSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 unused B32; /* corresponds to contextTag in hdr */ + GLXDrawable drawable B32; + GLXDrawable member B32; +} xGLXJoinSwapGroupSGIXReq; +#define sz_xGLXJoinSwapGroupSGIXReq 20 + +/* +** glXBindSwapBarrierSGIX request +*/ +typedef struct GLXBindSwapBarrierSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 unused B32; /* corresponds to contextTag in hdr */ + GLXDrawable drawable B32; + CARD32 barrier B32; +} xGLXBindSwapBarrierSGIXReq; +#define sz_xGLXBindSwapBarrierSGIXReq 20 + +/* +** glXQueryMaxSwapBarriersSGIX request +*/ +typedef struct GLXQueryMaxSwapBarriersSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 unused B32; /* corresponds to contextTag in hdr */ + CARD32 screen B32; +} xGLXQueryMaxSwapBarriersSGIXReq; +#define sz_xGLXQueryMaxSwapBarriersSGIXReq 16 + +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 max B32; + CARD32 size B32; + CARD32 pad3 B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXQueryMaxSwapBarriersSGIXReply; +#define sz_xGLXQueryMaxSwapBarriersSGIXReply 32 + +/* +** glXQueryHyperpipeNetworkSGIX request +*/ +typedef struct GLXQueryHyperpipeNetworkSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + CARD32 screen B32; +} xGLXQueryHyperpipeNetworkSGIXReq; +#define sz_xGLXQueryHyperpipeNetworkSGIXReq 16 + +/* +** glXQueryHyperpipeNetworkSGIX reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 n B32; + CARD32 npipes B32; /* NOTE: may hold a single value */ + CARD32 pad4 B32; /* NOTE: may hold half a double */ + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXQueryHyperpipeNetworkSGIXReply; +#define sz_xGLXQueryHyperpipeNetworkSGIXReply 32 + +/* +** glXDestroyHyperpipeConfigSGIX request +*/ +typedef struct GLXDestroyHyperpipeConfigSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + CARD32 screen B32; + CARD32 hpId B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xGLXDestroyHyperpipeConfigSGIXReq; +#define sz_xGLXDestroyHyperpipeConfigSGIXReq 32 + +/* +** glXDestroyHyperpipeConfigSGIX reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 n B32; + CARD32 success B32; /* NOTE: may hold a single value */ + CARD32 pad4 B32; /* NOTE: may hold half a double */ + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXDestroyHyperpipeConfigSGIXReply; +#define sz_xGLXDestroyHyperpipeConfigSGIXReply 32 + +/* +** glXQueryHyperpipeConfigSGIX request +*/ +typedef struct GLXQueryHyperpipeConfigSGIX { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + CARD32 screen B32; + CARD32 hpId B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + CARD32 pad4 B32; +} xGLXQueryHyperpipeConfigSGIXReq; +#define sz_xGLXQueryHyperpipeConfigSGIXReq 32 + +/* +** glXQueryHyperpipeConfigSGIX reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 n B32; + CARD32 npipes B32; + CARD32 pad4 B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXQueryHyperpipeConfigSGIXReply; +#define sz_xGLXQueryHyperpipeConfigSGIXReply 32 + +/* +** glXHyperpipeConfigSGIX request +*/ +typedef struct { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 vendorCode B32; /* vendor-specific opcode */ + CARD32 pad1 B32; /* unused; corresponds to contextTag in header */ + CARD32 screen B32; + CARD32 npipes B32; + CARD32 networkId B32; + CARD32 pad2 B32; + CARD32 pad3 B32; + /* followed by attribute list */ +} xGLXHyperpipeConfigSGIXReq; +#define sz_xGLXHyperpipeConfigSGIXReq 32 + +/* +** glXHyperpipeConfigSGIX reply +*/ +typedef struct { + BYTE type; /* X_Reply */ + CARD8 unused; /* not used */ + CARD16 sequenceNumber B16; + CARD32 length B32; + CARD32 pad1 B32; + CARD32 n B32; + CARD32 npipes B32; + CARD32 hpId B32; + CARD32 pad5 B32; + CARD32 pad6 B32; +} xGLXHyperpipeConfigSGIXReply; +#define sz_xGLXHyperpipeConfigSGIXReply 32 + +/* + * GLX_ARB_create_context + * GLX_ARB_create_context_profile + */ + +/* + * glXSetClientInfoARB + */ +typedef struct { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 major B32; + CARD32 minor B32; + CARD32 n0 B32; + CARD32 n1 B32; + CARD32 n2 B32; + /* + ** More data may follow; this is just the header. + */ +} xGLXSetClientInfoARB; +#define sz_xGLXSetClientInfoARB 24 + +/* +** glXCreateContextAttribsARB +*/ +typedef struct { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + GLXContextID context B32; + GLXFBConfigID fbconfig B32; + CARD32 screen; + GLXContextID shareList B32; + BOOL isDirect; + CARD8 reserved1; + CARD16 reserved2 B16; + CARD32 numAttribs B32; + /* followed by attribute list */ +} xGLXCreateContextAttribsARB; +#define sz_xGLXCreateContextAttribsARB 28 + +/* + * glXSetClientInfo2ARB + */ +typedef struct { + CARD8 reqType; + CARD8 glxCode; + CARD16 length B16; + CARD32 major B32; + CARD32 minor B32; + CARD32 n0 B32; + CARD32 n1 B32; + CARD32 n2 B32; + /* + ** More data may follow; this is just the header. + */ +} xGLXSetClientInfo2ARB; +#define sz_xGLXSetClientInfo2ARB 24 +/************************************************************************/ + +/* +** Events +*/ + +typedef struct { + BYTE type; + BYTE pad; + CARD16 sequenceNumber B16; + CARD16 event_type B16; /*** was clobber_class */ + CARD16 draw_type B16; + CARD32 drawable B32; + CARD32 buffer_mask B32; /*** was mask */ + CARD16 aux_buffer B16; + CARD16 x B16; + CARD16 y B16; + CARD16 width B16; + CARD16 height B16; + CARD16 count B16; + CARD32 unused2 B32; +} xGLXPbufferClobberEvent; + +typedef struct { + BYTE type; + BYTE pad; + CARD16 sequenceNumber B16; + CARD16 event_type B16; + CARD32 drawable; + CARD32 ust_hi B32; + CARD32 ust_lo B32; + CARD32 msc_hi B32; + CARD32 msc_lo B32; + CARD32 sbc_hi B32; + CARD32 sbc_lo B32; +} xGLXBufferSwapComplete; + +typedef struct { + BYTE type; + BYTE pad; + CARD16 sequenceNumber B16; + CARD16 event_type B16; + CARD16 pad2; + CARD32 drawable; + CARD32 ust_hi B32; + CARD32 ust_lo B32; + CARD32 msc_hi B32; + CARD32 msc_lo B32; + CARD32 sbc B32; +} xGLXBufferSwapComplete2; + +/************************************************************************/ + +/* +** Size of the standard X request header. +*/ +#define __GLX_SINGLE_HDR_SIZE sz_xGLXSingleReq +#define __GLX_VENDPRIV_HDR_SIZE sz_xGLXVendorPrivateReq + +#define __GLX_RENDER_HDR \ + CARD16 length B16; \ + CARD16 opcode B16 + +#define __GLX_RENDER_HDR_SIZE 4 + +typedef struct { + __GLX_RENDER_HDR; +} __GLXrenderHeader; + +#define __GLX_RENDER_LARGE_HDR \ + CARD32 length B32; \ + CARD32 opcode B32 + +#define __GLX_RENDER_LARGE_HDR_SIZE 8 + +typedef struct { + __GLX_RENDER_LARGE_HDR; +} __GLXrenderLargeHeader; + +/* +** The glBitmap, glPolygonStipple, glTexImage[12]D, glTexSubImage[12]D +** and glDrawPixels calls all have a pixel header transmitted after the +** Render or RenderLarge header and before their own opcode specific +** headers. +*/ +#define __GLX_PIXEL_HDR \ + BOOL swapBytes; \ + BOOL lsbFirst; \ + CARD8 reserved0; \ + CARD8 reserved1; \ + CARD32 rowLength B32; \ + CARD32 skipRows B32; \ + CARD32 skipPixels B32; \ + CARD32 alignment B32 + +#define __GLX_PIXEL_HDR_SIZE 20 + +typedef struct { + __GLX_PIXEL_HDR; +} __GLXpixelHeader; + +/* +** glTexImage[34]D and glTexSubImage[34]D calls +** all have a pixel header transmitted after the Render or RenderLarge +** header and before their own opcode specific headers. +*/ +#define __GLX_PIXEL_3D_HDR \ + BOOL swapBytes; \ + BOOL lsbFirst; \ + CARD8 reserved0; \ + CARD8 reserved1; \ + CARD32 rowLength B32; \ + CARD32 imageHeight B32; \ + CARD32 imageDepth B32; \ + CARD32 skipRows B32; \ + CARD32 skipImages B32; \ + CARD32 skipVolumes B32; \ + CARD32 skipPixels B32; \ + CARD32 alignment B32 + +#define __GLX_PIXEL_3D_HDR_SIZE 36 + +/* +** Data that is specific to a glBitmap call. The data is sent in the +** following order: +** Render or RenderLarge header +** Pixel header +** Bitmap header +*/ +#define __GLX_BITMAP_HDR \ + CARD32 width B32; \ + CARD32 height B32; \ + FLOAT32 xorig F32; \ + FLOAT32 yorig F32; \ + FLOAT32 xmove F32; \ + FLOAT32 ymove F32 + +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_HDR; + __GLX_BITMAP_HDR; +} __GLXbitmapHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_HDR; + __GLX_BITMAP_HDR; +} __GLXbitmapLargeHeader; + +typedef struct { + __GLX_PIXEL_HDR; + __GLX_BITMAP_HDR; +} __GLXdispatchBitmapHeader; + +#define __GLX_BITMAP_HDR_SIZE 24 + +#define __GLX_BITMAP_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_BITMAP_HDR_SIZE) + +#define __GLX_BITMAP_CMD_DISPATCH_HDR_SIZE \ + (__GLX_PIXEL_HDR_SIZE + __GLX_BITMAP_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_HDR; +} __GLXpolygonStippleHeader; + +#define __GLX_POLYGONSTIPPLE_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE) + +/* +** Data that is specific to a glTexImage1D or glTexImage2D call. The +** data is sent in the following order: +** Render or RenderLarge header +** Pixel header +** TexImage header +** When a glTexImage1D call the height field is unexamined by the server. +*/ +#define __GLX_TEXIMAGE_HDR \ + CARD32 target B32; \ + CARD32 level B32; \ + CARD32 components B32; \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 border B32; \ + CARD32 format B32; \ + CARD32 type B32 + +#define __GLX_TEXIMAGE_HDR_SIZE 32 + +#define __GLX_TEXIMAGE_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_TEXIMAGE_HDR_SIZE) + +#define __GLX_TEXIMAGE_CMD_DISPATCH_HDR_SIZE \ + (__GLX_PIXEL_HDR_SIZE + __GLX_TEXIMAGE_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_HDR; + __GLX_TEXIMAGE_HDR; +} __GLXtexImageHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_HDR; + __GLX_TEXIMAGE_HDR; +} __GLXtexImageLargeHeader; + +typedef struct { + __GLX_PIXEL_HDR; + __GLX_TEXIMAGE_HDR; +} __GLXdispatchTexImageHeader; + +/* +** Data that is specific to a glTexImage3D or glTexImage4D call. The +** data is sent in the following order: +** Render or RenderLarge header +** Pixel 3D header +** TexImage 3D header +** When a glTexImage3D call the size4d and woffset fields are unexamined +** by the server. +** Could be used by all TexImage commands and perhaps should be in the +** future. +*/ +#define __GLX_TEXIMAGE_3D_HDR \ + CARD32 target B32; \ + CARD32 level B32; \ + CARD32 internalformat B32; \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 depth B32; \ + CARD32 size4d B32; \ + CARD32 border B32; \ + CARD32 format B32; \ + CARD32 type B32; \ + CARD32 nullimage B32 + +#define __GLX_TEXIMAGE_3D_HDR_SIZE 44 + +#define __GLX_TEXIMAGE_3D_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_3D_HDR_SIZE + \ + __GLX_TEXIMAGE_3D_HDR_SIZE) + +#define __GLX_TEXIMAGE_3D_CMD_DISPATCH_HDR_SIZE \ + (__GLX_PIXEL_3D_HDR_SIZE + __GLX_TEXIMAGE_3D_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_3D_HDR; + __GLX_TEXIMAGE_3D_HDR; +} __GLXtexImage3DHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_3D_HDR; + __GLX_TEXIMAGE_3D_HDR; +} __GLXtexImage3DLargeHeader; + +typedef struct { + __GLX_PIXEL_3D_HDR; + __GLX_TEXIMAGE_3D_HDR; +} __GLXdispatchTexImage3DHeader; + +/* +** Data that is specific to a glTexSubImage1D or glTexSubImage2D call. The +** data is sent in the following order: +** Render or RenderLarge header +** Pixel header +** TexSubImage header +** When a glTexSubImage1D call is made, the yoffset and height fields +** are unexamined by the server and are considered to be padding. +*/ +#define __GLX_TEXSUBIMAGE_HDR \ + CARD32 target B32; \ + CARD32 level B32; \ + CARD32 xoffset B32; \ + CARD32 yoffset B32; \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 format B32; \ + CARD32 type B32; \ + CARD32 nullImage \ + +#define __GLX_TEXSUBIMAGE_HDR_SIZE 36 + +#define __GLX_TEXSUBIMAGE_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_TEXSUBIMAGE_HDR_SIZE) + +#define __GLX_TEXSUBIMAGE_CMD_DISPATCH_HDR_SIZE \ + (__GLX_PIXEL_HDR_SIZE + __GLX_TEXSUBIMAGE_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_HDR; + __GLX_TEXSUBIMAGE_HDR; +} __GLXtexSubImageHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_HDR; + __GLX_TEXSUBIMAGE_HDR; +} __GLXtexSubImageLargeHeader; + +typedef struct { + __GLX_PIXEL_HDR; + __GLX_TEXSUBIMAGE_HDR; +} __GLXdispatchTexSubImageHeader; + +/* +** Data that is specific to a glTexSubImage3D and 4D calls. The +** data is sent in the following order: +** Render or RenderLarge header +** Pixel 3D header +** TexSubImage 3D header +** When a glTexSubImage3D call is made, the woffset and size4d fields +** are unexamined by the server and are considered to be padding. +*/ +#define __GLX_TEXSUBIMAGE_3D_HDR \ + CARD32 target B32; \ + CARD32 level B32; \ + CARD32 xoffset B32; \ + CARD32 yoffset B32; \ + CARD32 zoffset B32; \ + CARD32 woffset B32; \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 depth B32; \ + CARD32 size4d B32; \ + CARD32 format B32; \ + CARD32 type B32; \ + CARD32 nullImage \ + +#define __GLX_TEXSUBIMAGE_3D_HDR_SIZE 52 + +#define __GLX_TEXSUBIMAGE_3D_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_3D_HDR_SIZE + \ + __GLX_TEXSUBIMAGE_3D_HDR_SIZE) + +#define __GLX_TEXSUBIMAGE_3D_CMD_DISPATCH_HDR_SIZE \ + (__GLX_PIXEL_3D_HDR_SIZE + __GLX_TEXSUBIMAGE_3D_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_3D_HDR; + __GLX_TEXSUBIMAGE_3D_HDR; +} __GLXtexSubImage3DHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_3D_HDR; + __GLX_TEXSUBIMAGE_3D_HDR; +} __GLXtexSubImage3DLargeHeader; + +typedef struct { + __GLX_PIXEL_3D_HDR; + __GLX_TEXSUBIMAGE_3D_HDR; +} __GLXdispatchTexSubImage3DHeader; + +/** + * Data that is specific to a \c glCompressedTexImage1D or + * \c glCompressedTexImage2D call. The data is sent in the following + * order: + * - Render or RenderLarge header + * - CompressedTexImage header + * + * When a \c glCompressedTexImage1D call is made, the \c height field is + * not examined by the server and is considered padding. + */ + +#define __GLX_COMPRESSED_TEXIMAGE_HDR \ + CARD32 target B32; \ + CARD32 level B32; \ + CARD32 internalFormat B32; \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 border B32; \ + CARD32 imageSize B32 + +#define __GLX_COMPRESSED_TEXIMAGE_HDR_SIZE 28 + +#define __GLX_COMPRESSED_TEXIMAGE_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_COMPRESSED_TEXIMAGE_HDR_SIZE) + +#define __GLX_COMPRESSED_TEXIMAGE_DISPATCH_HDR_SIZE \ + (__GLX_COMPRESSED_TEXIMAGE_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_COMPRESSED_TEXIMAGE_HDR; +} __GLXcompressedTexImageHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_COMPRESSED_TEXIMAGE_HDR; +} __GLXcompressedTexImageLargeHeader; + +typedef struct { + __GLX_COMPRESSED_TEXIMAGE_HDR; +} __GLXdispatchCompressedTexImageHeader; + +/** + * Data that is specifi to a \c glCompressedTexSubImage1D or + * \c glCompressedTexSubImage2D call. The data is sent in the following + * order: + * - Render or RenderLarge header + * - CompressedTexSubImage header + * + * When a \c glCompressedTexSubImage1D call is made, the \c yoffset and + * \c height fields are not examined by the server and are considered padding. + */ + +#define __GLX_COMPRESSED_TEXSUBIMAGE_HDR \ + CARD32 target B32; \ + CARD32 level B32; \ + CARD32 xoffset B32; \ + CARD32 yoffset B32; \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 format B32; \ + CARD32 imageSize B32 + +#define __GLX_COMPRESSED_TEXSUBIMAGE_HDR_SIZE 32 + +#define __GLX_COMPRESSED_TEXSUBIMAGE_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_COMPRESSED_TEXSUBIMAGE_HDR_SIZE) + +#define __GLX_COMPRESSED_TEXSUBIMAGE_DISPATCH_HDR_SIZE \ + (__GLX_COMPRESSED_TEXSUBIMAGE_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_COMPRESSED_TEXSUBIMAGE_HDR; +} __GLXcompressedTexSubImageHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_COMPRESSED_TEXSUBIMAGE_HDR; +} __GLXcompressedTexSubImageLargeHeader; + +typedef struct { + __GLX_COMPRESSED_TEXSUBIMAGE_HDR; +} __GLXdispatchCompressedTexSubImageHeader; + +/** + * Data that is specific to a \c glCompressedTexImage3D call. The data is + * sent in the following order: + * - Render or RenderLarge header + * - CompressedTexImage3D header + */ + +#define __GLX_COMPRESSED_TEXIMAGE_3D_HDR \ + CARD32 target B32; \ + CARD32 level B32; \ + CARD32 internalFormat B32; \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 depth B32; \ + CARD32 border B32; \ + CARD32 imageSize B32 + +#define __GLX_COMPRESSED_TEXIMAGE_3D_HDR_SIZE 32 + +#define __GLX_COMPRESSED_TEXIMAGE_3D_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_COMPRESSED_TEXIMAGE_3D_HDR_SIZE) + +#define __GLX_COMPRESSED_TEXIMAGE_3D_DISPATCH_HDR_SIZE \ + (__GLX_COMPRESSED_TEXIMAGE_3D_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_COMPRESSED_TEXIMAGE_3D_HDR; +} __GLXcompressedTexImage3DHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_COMPRESSED_TEXIMAGE_3D_HDR; +} __GLXcompressedTexImage3DLargeHeader; + +typedef struct { + __GLX_COMPRESSED_TEXIMAGE_3D_HDR; +} __GLXdispatchCompressedTexImage3DHeader; + +/** + * Data that is specifi to a \c glCompressedTexSubImage3D call. The data is + * sent in the following order: + * - Render or RenderLarge header + * - CompressedTexSubImage3D header + */ + +#define __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR \ + CARD32 target B32; \ + CARD32 level B32; \ + CARD32 xoffset B32; \ + CARD32 yoffset B32; \ + CARD32 zoffset B32; \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 depth B32; \ + CARD32 format B32; \ + CARD32 imageSize B32 + +#define __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR_SIZE 32 + +#define __GLX_COMPRESSED_TEXSUBIMAGE_3D_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR_SIZE) + +#define __GLX_COMPRESSED_TEXSUBIMAGE_3D_DISPATCH_HDR_SIZE \ + (__GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR; +} __GLXcompressedTexSubImage3DHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR; +} __GLXcompressedTexSubImage3DLargeHeader; + +typedef struct { + __GLX_COMPRESSED_TEXSUBIMAGE_3D_HDR; +} __GLXdispatchCompressedTexSubImage3DHeader; + +/* +** Data that is specific to a glDrawPixels call. The data is sent in the +** following order: +** Render or RenderLarge header +** Pixel header +** DrawPixels header +*/ +#define __GLX_DRAWPIXELS_HDR \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 format B32; \ + CARD32 type B32 + +#define __GLX_DRAWPIXELS_HDR_SIZE 16 + +#define __GLX_DRAWPIXELS_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_DRAWPIXELS_HDR_SIZE) + +#define __GLX_DRAWPIXELS_CMD_DISPATCH_HDR_SIZE \ + (__GLX_PIXEL_HDR_SIZE + __GLX_DRAWPIXELS_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_HDR; + __GLX_DRAWPIXELS_HDR; +} __GLXdrawPixelsHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_HDR; + __GLX_DRAWPIXELS_HDR; +} __GLXdrawPixelsLargeHeader; + +typedef struct { + __GLX_PIXEL_HDR; + __GLX_DRAWPIXELS_HDR; +} __GLXdispatchDrawPixelsHeader; + +/* +** Data that is specific to a glConvolutionFilter1D or glConvolutionFilter2D +** call. The data is sent in the following order: +** Render or RenderLarge header +** Pixel header +** ConvolutionFilter header +** When a glConvolutionFilter1D call the height field is unexamined by the server. +*/ +#define __GLX_CONV_FILT_HDR \ + CARD32 target B32; \ + CARD32 internalformat B32; \ + CARD32 width B32; \ + CARD32 height B32; \ + CARD32 format B32; \ + CARD32 type B32 + +#define __GLX_CONV_FILT_HDR_SIZE 24 + +#define __GLX_CONV_FILT_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_CONV_FILT_HDR_SIZE) + +#define __GLX_CONV_FILT_CMD_DISPATCH_HDR_SIZE \ + (__GLX_PIXEL_HDR_SIZE + __GLX_CONV_FILT_HDR_SIZE) +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_HDR; + __GLX_CONV_FILT_HDR; +} __GLXConvolutionFilterHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_HDR; + __GLX_CONV_FILT_HDR; +} __GLXConvolutionFilterLargeHeader; + +typedef struct { + __GLX_PIXEL_HDR; + __GLX_CONV_FILT_HDR; +} __GLXdispatchConvolutionFilterHeader; + +/* +** Data that is specific to a glDrawArraysEXT call. The data is sent in the +** following order: +** Render or RenderLarge header +** Draw Arrays header +** a variable number of Component headers +** vertex data for each component type +*/ + +#define __GLX_DRAWARRAYS_HDR \ + CARD32 numVertexes B32; \ + CARD32 numComponents B32; \ + CARD32 primType B32 + +#define __GLX_DRAWARRAYS_HDR_SIZE 12 + +#define __GLX_DRAWARRAYS_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_DRAWARRAYS_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_DRAWARRAYS_HDR; +} __GLXdrawArraysHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_DRAWARRAYS_HDR; +} __GLXdrawArraysLargeHeader; + +typedef struct { + __GLX_DRAWARRAYS_HDR; +} __GLXdispatchDrawArraysHeader; + +#define __GLX_COMPONENT_HDR \ + CARD32 datatype B32; \ + INT32 numVals B32; \ + CARD32 component B32 + +typedef struct { + __GLX_COMPONENT_HDR; +} __GLXdispatchDrawArraysComponentHeader; + +#define __GLX_COMPONENT_HDR_SIZE 12 + +/* +** Data that is specific to a glColorTable call +** The data is sent in the following order: +** Render or RenderLarge header +** Pixel header +** ColorTable header +*/ + +#define __GLX_COLOR_TABLE_HDR \ + CARD32 target B32; \ + CARD32 internalformat B32; \ + CARD32 width B32; \ + CARD32 format B32; \ + CARD32 type B32 + +#define __GLX_COLOR_TABLE_HDR_SIZE 20 + +#define __GLX_COLOR_TABLE_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + __GLX_COLOR_TABLE_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_HDR; + __GLX_COLOR_TABLE_HDR; +} __GLXColorTableHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_HDR; + __GLX_COLOR_TABLE_HDR; +} __GLXColorTableLargeHeader; + +typedef struct { + __GLX_PIXEL_HDR; + __GLX_COLOR_TABLE_HDR; +} __GLXdispatchColorTableHeader; + +/* +** Data that is specific to a glColorSubTable call +** The data is sent in the following order: +** Render or RenderLarge header +** Pixel header +** ColorTable header +*/ + +#define __GLX_COLOR_SUBTABLE_HDR \ + CARD32 target B32; \ + CARD32 start B32; \ + CARD32 count B32; \ + CARD32 format B32; \ + CARD32 type B32 + +#define __GLX_COLOR_SUBTABLE_HDR_SIZE 20 + +#define __GLX_COLOR_SUBTABLE_CMD_HDR_SIZE \ + (__GLX_RENDER_HDR_SIZE + __GLX_PIXEL_HDR_SIZE + \ + __GLX_COLOR_SUBTABLE_HDR_SIZE) + +typedef struct { + __GLX_RENDER_HDR; + __GLX_PIXEL_HDR; + __GLX_COLOR_SUBTABLE_HDR; +} __GLXColorSubTableHeader; + +typedef struct { + __GLX_RENDER_LARGE_HDR; + __GLX_PIXEL_HDR; + __GLX_COLOR_SUBTABLE_HDR; +} __GLXColorSubTableLargeHeader; + +typedef struct { + __GLX_PIXEL_HDR; + __GLX_COLOR_SUBTABLE_HDR; +} __GLXdispatchColorSubTableHeader; + +#define GLX_WINDOW_TYPE 1 +#define GLX_PIXMAP_TYPE 2 +#define GLX_VIDEO_SOURCE_TYPE 3 +#define GLX_PBUFFER_TYPE 4 +/* 5 is for DM_PBUFFER */ +#define GLX_GLXWINDOW_TYPE 6 + +/*****************************************************************************/ + +/* +** Restore these definitions back to the typedefs in glx.h +*/ +#undef GLXContextID +#undef GLXPixmap +#undef GLXDrawable +#undef GLXPbuffer +#undef GLXWindow +#undef GLXFBConfigID +#undef GLXFBConfigIDSGIX +#undef GLXPbufferSGIX + + +/* Opcodes for GLX commands */ + +#define X_GLXRender 1 +#define X_GLXRenderLarge 2 +#define X_GLXCreateContext 3 +#define X_GLXDestroyContext 4 +#define X_GLXMakeCurrent 5 +#define X_GLXIsDirect 6 +#define X_GLXQueryVersion 7 +#define X_GLXWaitGL 8 +#define X_GLXWaitX 9 +#define X_GLXCopyContext 10 +#define X_GLXSwapBuffers 11 +#define X_GLXUseXFont 12 +#define X_GLXCreateGLXPixmap 13 +#define X_GLXGetVisualConfigs 14 +#define X_GLXDestroyGLXPixmap 15 +#define X_GLXVendorPrivate 16 +#define X_GLXVendorPrivateWithReply 17 +#define X_GLXQueryExtensionsString 18 +#define X_GLXQueryServerString 19 +#define X_GLXClientInfo 20 +#define X_GLXGetFBConfigs 21 +#define X_GLXCreatePixmap 22 +#define X_GLXDestroyPixmap 23 +#define X_GLXCreateNewContext 24 +#define X_GLXQueryContext 25 +#define X_GLXMakeContextCurrent 26 +#define X_GLXCreatePbuffer 27 +#define X_GLXDestroyPbuffer 28 +#define X_GLXGetDrawableAttributes 29 +#define X_GLXChangeDrawableAttributes 30 +#define X_GLXCreateWindow 31 +#define X_GLXDestroyWindow 32 +#define X_GLXSetClientInfoARB 33 +#define X_GLXCreateContextAtrribsARB 34 +#define X_GLXSetConfigInfo2ARB 35 + +/* Opcodes for single commands (part of GLX command space) */ + +#define X_GLsop_NewList 101 +#define X_GLsop_EndList 102 +#define X_GLsop_DeleteLists 103 +#define X_GLsop_GenLists 104 +#define X_GLsop_FeedbackBuffer 105 +#define X_GLsop_SelectBuffer 106 +#define X_GLsop_RenderMode 107 +#define X_GLsop_Finish 108 +#define X_GLsop_Flush 142 +#define X_GLsop_PixelStoref 109 +#define X_GLsop_PixelStorei 110 +#define X_GLsop_ReadPixels 111 +#define X_GLsop_GetBooleanv 112 +#define X_GLsop_GetClipPlane 113 +#define X_GLsop_GetDoublev 114 +#define X_GLsop_GetError 115 +#define X_GLsop_GetFloatv 116 +#define X_GLsop_GetIntegerv 117 +#define X_GLsop_GetLightfv 118 +#define X_GLsop_GetLightiv 119 +#define X_GLsop_GetMapdv 120 +#define X_GLsop_GetMapfv 121 +#define X_GLsop_GetMapiv 122 +#define X_GLsop_GetMaterialfv 123 +#define X_GLsop_GetMaterialiv 124 +#define X_GLsop_GetPixelMapfv 125 +#define X_GLsop_GetPixelMapuiv 126 +#define X_GLsop_GetPixelMapusv 127 +#define X_GLsop_GetPolygonStipple 128 +#define X_GLsop_GetString 129 +#define X_GLsop_GetTexEnvfv 130 +#define X_GLsop_GetTexEnviv 131 +#define X_GLsop_GetTexGendv 132 +#define X_GLsop_GetTexGenfv 133 +#define X_GLsop_GetTexGeniv 134 +#define X_GLsop_GetTexImage 135 +#define X_GLsop_GetTexParameterfv 136 +#define X_GLsop_GetTexParameteriv 137 +#define X_GLsop_GetTexLevelParameterfv 138 +#define X_GLsop_GetTexLevelParameteriv 139 +#define X_GLsop_IsEnabled 140 +#define X_GLsop_IsList 141 +#define X_GLsop_AreTexturesResident 143 +#define X_GLsop_DeleteTextures 144 +#define X_GLsop_GenTextures 145 +#define X_GLsop_IsTexture 146 +#define X_GLsop_GetColorTable 147 +#define X_GLsop_GetColorTableParameterfv 148 +#define X_GLsop_GetColorTableParameteriv 149 +#define X_GLsop_GetConvolutionFilter 150 +#define X_GLsop_GetConvolutionParameterfv 151 +#define X_GLsop_GetConvolutionParameteriv 152 +#define X_GLsop_GetSeparableFilter 153 +#define X_GLsop_GetHistogram 154 +#define X_GLsop_GetHistogramParameterfv 155 +#define X_GLsop_GetHistogramParameteriv 156 +#define X_GLsop_GetMinmax 157 +#define X_GLsop_GetMinmaxParameterfv 158 +#define X_GLsop_GetMinmaxParameteriv 159 +#define X_GLsop_GetCompressedTexImage 160 + + +/* Opcodes for rendering commands */ + +#define X_GLrop_CallList 1 +#define X_GLrop_CallLists 2 +#define X_GLrop_ListBase 3 +#define X_GLrop_Begin 4 +#define X_GLrop_Bitmap 5 +#define X_GLrop_Color3bv 6 +#define X_GLrop_Color3dv 7 +#define X_GLrop_Color3fv 8 +#define X_GLrop_Color3iv 9 +#define X_GLrop_Color3sv 10 +#define X_GLrop_Color3ubv 11 +#define X_GLrop_Color3uiv 12 +#define X_GLrop_Color3usv 13 +#define X_GLrop_Color4bv 14 +#define X_GLrop_Color4dv 15 +#define X_GLrop_Color4fv 16 +#define X_GLrop_Color4iv 17 +#define X_GLrop_Color4sv 18 +#define X_GLrop_Color4ubv 19 +#define X_GLrop_Color4uiv 20 +#define X_GLrop_Color4usv 21 +#define X_GLrop_EdgeFlagv 22 +#define X_GLrop_End 23 +#define X_GLrop_Indexdv 24 +#define X_GLrop_Indexfv 25 +#define X_GLrop_Indexiv 26 +#define X_GLrop_Indexsv 27 +#define X_GLrop_Normal3bv 28 +#define X_GLrop_Normal3dv 29 +#define X_GLrop_Normal3fv 30 +#define X_GLrop_Normal3iv 31 +#define X_GLrop_Normal3sv 32 +#define X_GLrop_RasterPos2dv 33 +#define X_GLrop_RasterPos2fv 34 +#define X_GLrop_RasterPos2iv 35 +#define X_GLrop_RasterPos2sv 36 +#define X_GLrop_RasterPos3dv 37 +#define X_GLrop_RasterPos3fv 38 +#define X_GLrop_RasterPos3iv 39 +#define X_GLrop_RasterPos3sv 40 +#define X_GLrop_RasterPos4dv 41 +#define X_GLrop_RasterPos4fv 42 +#define X_GLrop_RasterPos4iv 43 +#define X_GLrop_RasterPos4sv 44 +#define X_GLrop_Rectdv 45 +#define X_GLrop_Rectfv 46 +#define X_GLrop_Rectiv 47 +#define X_GLrop_Rectsv 48 +#define X_GLrop_TexCoord1dv 49 +#define X_GLrop_TexCoord1fv 50 +#define X_GLrop_TexCoord1iv 51 +#define X_GLrop_TexCoord1sv 52 +#define X_GLrop_TexCoord2dv 53 +#define X_GLrop_TexCoord2fv 54 +#define X_GLrop_TexCoord2iv 55 +#define X_GLrop_TexCoord2sv 56 +#define X_GLrop_TexCoord3dv 57 +#define X_GLrop_TexCoord3fv 58 +#define X_GLrop_TexCoord3iv 59 +#define X_GLrop_TexCoord3sv 60 +#define X_GLrop_TexCoord4dv 61 +#define X_GLrop_TexCoord4fv 62 +#define X_GLrop_TexCoord4iv 63 +#define X_GLrop_TexCoord4sv 64 +#define X_GLrop_Vertex2dv 65 +#define X_GLrop_Vertex2fv 66 +#define X_GLrop_Vertex2iv 67 +#define X_GLrop_Vertex2sv 68 +#define X_GLrop_Vertex3dv 69 +#define X_GLrop_Vertex3fv 70 +#define X_GLrop_Vertex3iv 71 +#define X_GLrop_Vertex3sv 72 +#define X_GLrop_Vertex4dv 73 +#define X_GLrop_Vertex4fv 74 +#define X_GLrop_Vertex4iv 75 +#define X_GLrop_Vertex4sv 76 +#define X_GLrop_ClipPlane 77 +#define X_GLrop_ColorMaterial 78 +#define X_GLrop_CullFace 79 +#define X_GLrop_Fogf 80 +#define X_GLrop_Fogfv 81 +#define X_GLrop_Fogi 82 +#define X_GLrop_Fogiv 83 +#define X_GLrop_FrontFace 84 +#define X_GLrop_Hint 85 +#define X_GLrop_Lightf 86 +#define X_GLrop_Lightfv 87 +#define X_GLrop_Lighti 88 +#define X_GLrop_Lightiv 89 +#define X_GLrop_LightModelf 90 +#define X_GLrop_LightModelfv 91 +#define X_GLrop_LightModeli 92 +#define X_GLrop_LightModeliv 93 +#define X_GLrop_LineStipple 94 +#define X_GLrop_LineWidth 95 +#define X_GLrop_Materialf 96 +#define X_GLrop_Materialfv 97 +#define X_GLrop_Materiali 98 +#define X_GLrop_Materialiv 99 +#define X_GLrop_PointSize 100 +#define X_GLrop_PolygonMode 101 +#define X_GLrop_PolygonStipple 102 +#define X_GLrop_Scissor 103 +#define X_GLrop_ShadeModel 104 +#define X_GLrop_TexParameterf 105 +#define X_GLrop_TexParameterfv 106 +#define X_GLrop_TexParameteri 107 +#define X_GLrop_TexParameteriv 108 +#define X_GLrop_TexImage1D 109 +#define X_GLrop_TexImage2D 110 +#define X_GLrop_TexEnvf 111 +#define X_GLrop_TexEnvfv 112 +#define X_GLrop_TexEnvi 113 +#define X_GLrop_TexEnviv 114 +#define X_GLrop_TexGend 115 +#define X_GLrop_TexGendv 116 +#define X_GLrop_TexGenf 117 +#define X_GLrop_TexGenfv 118 +#define X_GLrop_TexGeni 119 +#define X_GLrop_TexGeniv 120 +#define X_GLrop_InitNames 121 +#define X_GLrop_LoadName 122 +#define X_GLrop_PassThrough 123 +#define X_GLrop_PopName 124 +#define X_GLrop_PushName 125 +#define X_GLrop_DrawBuffer 126 +#define X_GLrop_Clear 127 +#define X_GLrop_ClearAccum 128 +#define X_GLrop_ClearIndex 129 +#define X_GLrop_ClearColor 130 +#define X_GLrop_ClearStencil 131 +#define X_GLrop_ClearDepth 132 +#define X_GLrop_StencilMask 133 +#define X_GLrop_ColorMask 134 +#define X_GLrop_DepthMask 135 +#define X_GLrop_IndexMask 136 +#define X_GLrop_Accum 137 +#define X_GLrop_Disable 138 +#define X_GLrop_Enable 139 +#define X_GLrop_PopAttrib 141 +#define X_GLrop_PushAttrib 142 +#define X_GLrop_Map1d 143 +#define X_GLrop_Map1f 144 +#define X_GLrop_Map2d 145 +#define X_GLrop_Map2f 146 +#define X_GLrop_MapGrid1d 147 +#define X_GLrop_MapGrid1f 148 +#define X_GLrop_MapGrid2d 149 +#define X_GLrop_MapGrid2f 150 +#define X_GLrop_EvalCoord1dv 151 +#define X_GLrop_EvalCoord1fv 152 +#define X_GLrop_EvalCoord2dv 153 +#define X_GLrop_EvalCoord2fv 154 +#define X_GLrop_EvalMesh1 155 +#define X_GLrop_EvalPoint1 156 +#define X_GLrop_EvalMesh2 157 +#define X_GLrop_EvalPoint2 158 +#define X_GLrop_AlphaFunc 159 +#define X_GLrop_BlendFunc 160 +#define X_GLrop_LogicOp 161 +#define X_GLrop_StencilFunc 162 +#define X_GLrop_StencilOp 163 +#define X_GLrop_DepthFunc 164 +#define X_GLrop_PixelZoom 165 +#define X_GLrop_PixelTransferf 166 +#define X_GLrop_PixelTransferi 167 +#define X_GLrop_PixelMapfv 168 +#define X_GLrop_PixelMapuiv 169 +#define X_GLrop_PixelMapusv 170 +#define X_GLrop_ReadBuffer 171 +#define X_GLrop_CopyPixels 172 +#define X_GLrop_DrawPixels 173 +#define X_GLrop_DepthRange 174 +#define X_GLrop_Frustum 175 +#define X_GLrop_LoadIdentity 176 +#define X_GLrop_LoadMatrixf 177 +#define X_GLrop_LoadMatrixd 178 +#define X_GLrop_MatrixMode 179 +#define X_GLrop_MultMatrixf 180 +#define X_GLrop_MultMatrixd 181 +#define X_GLrop_Ortho 182 +#define X_GLrop_PopMatrix 183 +#define X_GLrop_PushMatrix 184 +#define X_GLrop_Rotated 185 +#define X_GLrop_Rotatef 186 +#define X_GLrop_Scaled 187 +#define X_GLrop_Scalef 188 +#define X_GLrop_Translated 189 +#define X_GLrop_Translatef 190 +#define X_GLrop_Viewport 191 +#define X_GLrop_DrawArrays 193 +#define X_GLrop_PolygonOffset 192 +#define X_GLrop_CopyTexImage1D 4119 +#define X_GLrop_CopyTexImage2D 4120 +#define X_GLrop_CopyTexSubImage1D 4121 +#define X_GLrop_CopyTexSubImage2D 4122 +#define X_GLrop_TexSubImage1D 4099 +#define X_GLrop_TexSubImage2D 4100 +#define X_GLrop_BindTexture 4117 +#define X_GLrop_PrioritizeTextures 4118 +#define X_GLrop_Indexubv 194 +#define X_GLrop_BlendColor 4096 +#define X_GLrop_BlendEquation 4097 +#define X_GLrop_ColorTable 2053 +#define X_GLrop_ColorTableParameterfv 2054 +#define X_GLrop_ColorTableParameteriv 2055 +#define X_GLrop_CopyColorTable 2056 +#define X_GLrop_ColorSubTable 195 +#define X_GLrop_CopyColorSubTable 196 +#define X_GLrop_ConvolutionFilter1D 4101 +#define X_GLrop_ConvolutionFilter2D 4102 +#define X_GLrop_ConvolutionParameterf 4103 +#define X_GLrop_ConvolutionParameterfv 4104 +#define X_GLrop_ConvolutionParameteri 4105 +#define X_GLrop_ConvolutionParameteriv 4106 +#define X_GLrop_CopyConvolutionFilter1D 4107 +#define X_GLrop_CopyConvolutionFilter2D 4108 +#define X_GLrop_SeparableFilter2D 4109 +#define X_GLrop_Histogram 4110 +#define X_GLrop_Minmax 4111 +#define X_GLrop_ResetHistogram 4112 +#define X_GLrop_ResetMinmax 4113 +#define X_GLrop_TexImage3D 4114 +#define X_GLrop_TexSubImage3D 4115 +#define X_GLrop_CopyTexSubImage3D 4123 +#define X_GLrop_DrawArraysEXT 4116 + +/* Added for core GL version 1.3 */ + +#define X_GLrop_ActiveTextureARB 197 +#define X_GLrop_MultiTexCoord1dvARB 198 +#define X_GLrop_MultiTexCoord1fvARB 199 +#define X_GLrop_MultiTexCoord1ivARB 200 +#define X_GLrop_MultiTexCoord1svARB 201 +#define X_GLrop_MultiTexCoord2dvARB 202 +#define X_GLrop_MultiTexCoord2fvARB 203 +#define X_GLrop_MultiTexCoord2ivARB 204 +#define X_GLrop_MultiTexCoord2svARB 205 +#define X_GLrop_MultiTexCoord3dvARB 206 +#define X_GLrop_MultiTexCoord3fvARB 207 +#define X_GLrop_MultiTexCoord3ivARB 208 +#define X_GLrop_MultiTexCoord3svARB 209 +#define X_GLrop_MultiTexCoord4dvARB 210 +#define X_GLrop_MultiTexCoord4fvARB 211 +#define X_GLrop_MultiTexCoord4ivARB 212 +#define X_GLrop_MultiTexCoord4svARB 213 +#define X_GLrop_CompressedTexImage1D 214 +#define X_GLrop_CompressedTexImage2D 215 +#define X_GLrop_CompressedTexImage3D 216 +#define X_GLrop_CompressedTexSubImage1D 217 +#define X_GLrop_CompressedTexSubImage2D 218 +#define X_GLrop_CompressedTexSubImage3D 219 +#define X_GLrop_SampleCoverageARB 229 + +/* Added for core GL version 1.4 */ + +#define X_GLrop_WindowPos3fARB 230 +#define X_GLrop_FogCoordfv 4124 +#define X_GLrop_FogCoorddv 4125 +#define X_GLrop_PointParameterfARB 2065 +#define X_GLrop_PointParameterfvARB 2066 +#define X_GLrop_SecondaryColor3bv 4126 +#define X_GLrop_SecondaryColor3sv 4127 +#define X_GLrop_SecondaryColor3iv 4128 +#define X_GLrop_SecondaryColor3fv 4129 +#define X_GLrop_SecondaryColor3dv 4130 +#define X_GLrop_SecondaryColor3ubv 4131 +#define X_GLrop_SecondaryColor3usv 4132 +#define X_GLrop_SecondaryColor3uiv 4133 +#define X_GLrop_BlendFuncSeparate 4134 +#define X_GLrop_PointParameteri 4221 +#define X_GLrop_PointParameteriv 4222 + +/* Added for core GL version 1.5 */ +/* XXX opcodes not defined in the spec */ + +/* Opcodes for Vendor Private commands */ + + +#define X_GLvop_GetConvolutionFilterEXT 1 +#define X_GLvop_GetConvolutionParameterfvEXT 2 +#define X_GLvop_GetConvolutionParameterivEXT 3 +#define X_GLvop_GetSeparableFilterEXT 4 +#define X_GLvop_GetHistogramEXT 5 +#define X_GLvop_GetHistogramParameterfvEXT 6 +#define X_GLvop_GetHistogramParameterivEXT 7 +#define X_GLvop_GetMinmaxEXT 8 +#define X_GLvop_GetMinmaxParameterfvEXT 9 +#define X_GLvop_GetMinmaxParameterivEXT 10 +#define X_GLvop_AreTexturesResidentEXT 11 +#define X_GLvop_DeleteTexturesEXT 12 +#define X_GLvop_GenTexturesEXT 13 +#define X_GLvop_IsTextureEXT 14 +#define X_GLvop_GetCombinerInputParameterfvNV 1270 +#define X_GLvop_GetCombinerInputParameterivNV 1271 +#define X_GLvop_GetCombinerOutputParameterfvNV 1272 +#define X_GLvop_GetCombinerOutputParameterivNV 1273 +#define X_GLvop_GetFinalCombinerOutputParameterfvNV 1274 +#define X_GLvop_GetFinalCombinerOutputParameterivNV 1275 +#define X_GLvop_DeleteFenceNV 1276 +#define X_GLvop_GenFencesNV 1277 +#define X_GLvop_IsFenceNV 1278 +#define X_GLvop_TestFenceNV 1279 +#define X_GLvop_GetFenceivNV 1280 +#define X_GLvop_AreProgramsResidentNV 1293 +#define X_GLvop_DeleteProgramARB 1294 +#define X_GLvop_GenProgramsARB 1295 +#define X_GLvop_GetProgramEnvParameterfvARB 1296 +#define X_GLvop_GetProgramEnvParameterdvARB 1297 +#define X_GLvop_GetProgramEnvParameterivNV 1298 +#define X_GLvop_GetProgramStringNV 1299 +#define X_GLvop_GetTrackMatrixivNV 1300 +#define X_GLvop_GetVertexAttribdvARB 1301 +#define X_GLvop_GetVertexAttribfvARB 1302 +#define X_GLvop_GetVertexAttribivARB 1303 +#define X_GLvop_IsProgramARB 1304 +#define X_GLvop_GetProgramLocalParameterfvARB 1305 +#define X_GLvop_GetProgramLocalParameterdvARB 1306 +#define X_GLvop_GetProgramivARB 1307 +#define X_GLvop_GetProgramStringARB 1308 +#define X_GLvop_GetProgramNamedParameter4fvNV 1310 +#define X_GLvop_GetProgramNamedParameter4dvNV 1311 +#define X_GLvop_SampleMaskSGIS 2048 +#define X_GLvop_SamplePatternSGIS 2049 +#define X_GLvop_GetDetailTexFuncSGIS 4096 +#define X_GLvop_GetSharpenTexFuncSGIS 4097 +#define X_GLvop_GetColorTableSGI 4098 +#define X_GLvop_GetColorTableParameterfvSGI 4099 +#define X_GLvop_GetColorTableParameterivSGI 4100 +#define X_GLvop_GetTexFilterFuncSGIS 4101 +#define X_GLvop_GetInstrumentsSGIX 4102 +#define X_GLvop_InstrumentsBufferSGIX 4103 +#define X_GLvop_PollInstrumentsSGIX 4104 +#define X_GLvop_FlushRasterSGIX 4105 + +/* Opcodes for GLX vendor private commands */ + +#define X_GLXvop_QueryContextInfoEXT 1024 +#define X_GLXvop_BindTexImageEXT 1330 +#define X_GLXvop_ReleaseTexImageEXT 1331 +#define X_GLXvop_SwapIntervalSGI 65536 +#define X_GLXvop_MakeCurrentReadSGI 65537 +#define X_GLXvop_CreateGLXVideoSourceSGIX 65538 +#define X_GLXvop_DestroyGLXVideoSourceSGIX 65539 +#define X_GLXvop_GetFBConfigsSGIX 65540 +#define X_GLXvop_CreateContextWithConfigSGIX 65541 +#define X_GLXvop_CreateGLXPixmapWithConfigSGIX 65542 +#define X_GLXvop_CreateGLXPbufferSGIX 65543 +#define X_GLXvop_DestroyGLXPbufferSGIX 65544 +#define X_GLXvop_ChangeDrawableAttributesSGIX 65545 +#define X_GLXvop_GetDrawableAttributesSGIX 65546 +#define X_GLXvop_JoinSwapGroupSGIX 65547 +#define X_GLXvop_BindSwapBarrierSGIX 65548 +#define X_GLXvop_QueryMaxSwapBarriersSGIX 65549 +#define X_GLXvop_QueryHyperpipeNetworkSGIX 65550 +#define X_GLXvop_QueryHyperpipeConfigSGIX 65551 +#define X_GLXvop_HyperpipeConfigSGIX 65552 +#define X_GLXvop_DestroyHyperpipeConfigSGIX 65553 + +/* ARB extension opcodes */ + +/* 1. GL_ARB_multitexture - see GL 1.2 opcodes */ +/* 5. GL_ARB_multisample - see GL 1.3 opcodes */ +/* 12. GL_ARB_texture_compression - see GL 1.3 opcodes */ +/* 14. GL_ARB_point_parameters - see GL 1.4 opcodees */ + +/* 15. GL_ARB_vertex_blend */ +#define X_GLrop_WeightbvARB 220 +#define X_GLrop_WeightubvARB 221 +#define X_GLrop_WeightsvARB 222 +#define X_GLrop_WeightusvARB 223 +#define X_GLrop_WeightivARB 224 +#define X_GLrop_WeightuivARB 225 +#define X_GLrop_VertexBlendARB 226 +#define X_GLrop_WeightfvARB 227 +#define X_GLrop_WeightdvARB 228 + +/* 16. GL_ARB_matrix_palette */ +/* XXX opcodes not defined in the spec */ + +/* 25. GL_ARB_window_pos - see GL 1.4 opcodes */ + +/* 26. GL_ARB_vertex_program */ +#define X_GLrop_BindProgramARB 4180 +#define X_GLrop_ProgramEnvParameter4fvARB 4184 +#define X_GLrop_ProgramEnvParameter4dvARB 4185 +#define X_GLrop_VertexAttrib1svARB 4189 +#define X_GLrop_VertexAttrib2svARB 4190 +#define X_GLrop_VertexAttrib3svARB 4191 +#define X_GLrop_VertexAttrib4svARB 4192 +#define X_GLrop_VertexAttrib1fvARB 4193 +#define X_GLrop_VertexAttrib2fvARB 4194 +#define X_GLrop_VertexAttrib3fvARB 4195 +#define X_GLrop_VertexAttrib4fvARB 4196 +#define X_GLrop_VertexAttrib1dvARB 4197 +#define X_GLrop_VertexAttrib2dvARB 4198 +#define X_GLrop_VertexAttrib3dvARB 4199 +#define X_GLrop_ProgramLocalParameter4fvARB 4215 +#define X_GLrop_ProgramLocalParameter4dvARB 4216 +#define X_GLrop_ProgramStringARB 4217 +#define X_GLrop_VertexAttrib4dvARB 4200 +#define X_GLrop_VertexAttrib4NubvARB 4201 +#define X_GLrop_VertexAttrib4bvARB 4230 +#define X_GLrop_VertexAttrib4ivARB 4231 +#define X_GLrop_VertexAttrib4ubvARB 4232 +#define X_GLrop_VertexAttrib4usvARB 4233 +#define X_GLrop_VertexAttrib4uivARB 4234 +#define X_GLrop_VertexAttrib4NbvARB 4235 +#define X_GLrop_VertexAttrib4NsvARB 4236 +#define X_GLrop_VertexAttrib4NivARB 4237 +#define X_GLrop_VertexAttrib4NusvARB 4238 +#define X_GLrop_VertexAttrib4NuivARB 4239 + +/* 27. GL_ARB_fragment_program - see GL_ARB_vertex_program opcodes */ + +/* 29. GL_ARB_occlusion_query */ +/* XXX opcodes not defined in the spec */ + + +/* New extension opcodes */ + +/* 145. GL_EXT_secondary_color - see GL 1.4 opcodes */ + +/* 188. GL_EXT_vertex_weighting */ +#define X_GLrop_VertexWeightfvEXT 4135 + +/* 191. GL_NV_register_combiners */ +#define X_GLrop_CombinerParameterfNV 4136 +#define X_GLrop_CombinerParameterfvNV 4137 +#define X_GLrop_CombinerParameteriNV 4138 +#define X_GLrop_CombinerParameterivNV 4139 +#define X_GLrop_CombinerInputNV 4140 +#define X_GLrop_CombinerOutputNV 4141 +#define X_GLrop_FinalCombinerInputNV 4142 + +/* 222. GL_NV_fence */ +#define X_GLrop_SetFenceNV 4143 +#define X_GLrop_FinishFenceNV 4144 + +/* 227. GL_NV_register_combiners2 */ +/* XXX opcodes not defined in the spec */ + +/* 233. GL_NV_vertex_program - see also GL_ARB_vertex_program opcodes */ +#define X_GLrop_ExecuteProgramNV 4181 +#define X_GLrop_RequestResidentProgramsNV 4182 +#define X_GLrop_LoadProgamNV 4183 +#define X_GLrop_ProgramParameters4fvNV 4186 +#define X_GLrop_ProgramParameters4dvNV 4187 +#define X_GLrop_TrackMatrixNV 4188 +#define X_GLrop_VertexAttribs1svNV 4202 +#define X_GLrop_VertexAttribs2svNV 4203 +#define X_GLrop_VertexAttribs3svNV 4204 +#define X_GLrop_VertexAttribs4svNV 4205 +#define X_GLrop_VertexAttribs1fvNV 4206 +#define X_GLrop_VertexAttribs2fvNV 4207 +#define X_GLrop_VertexAttribs3fvNV 4208 +#define X_GLrop_VertexAttribs4fvNV 4209 +#define X_GLrop_VertexAttribs1dvNV 4210 +#define X_GLrop_VertexAttribs2dvNV 4211 +#define X_GLrop_VertexAttribs3dvNV 4212 +#define X_GLrop_VertexAttribs4dvNV 4213 +#define X_GLrop_VertexAttribs4ubvNV 4214 + +/* 261. GL_NV_occlusion_query */ +/* XXX opcodes not defined in the spec */ + +/* 262. GL_NV_point_sprite - see GL 1.4 opcodes */ + +/* 268. GL_EXT_stencil_two_side */ +#define X_GLrop_ActiveStencilFaceEXT 4220 + +/* 282. GL_NV_fragment_program - see also GL_NV_vertex_program and GL_ARB_vertex_program opcodes */ +#define X_GLrop_ProgramNamedParameter4fvNV 4218 +#define X_GLrop_ProgramNamedParameter4dvNV 4219 + +/* 285. GL_NV_primitive_restart */ +/* XXX opcodes not defined in the spec */ + +/* 297. GL_EXT_depth_bounds_test */ +#define X_GLrop_DepthBoundsEXT 4229 + +/* 299. GL_EXT_blend_equation_separate */ +#define X_GLrop_BlendEquationSeparateEXT 4228 + +/* 310. GL_EXT_framebuffer_object */ +#define X_GLvop_IsRenderbufferEXT 1422 +#define X_GLvop_GenRenderbuffersEXT 1423 +#define X_GLvop_GetRenderbufferParameterivEXT 1424 +#define X_GLvop_IsFramebufferEXT 1425 +#define X_GLvop_GenFramebuffersEXT 1426 +#define X_GLvop_CheckFramebufferStatusEXT 1427 +#define X_GLvop_GetFramebufferAttachmentParameterivEXT 1428 + +#endif /* _GLX_glxproto_h_ */ diff --git a/libX11/specs/libX11/CH01.xml b/libX11/specs/libX11/CH01.xml index c8d8dcc6c..a401b9a5b 100644 --- a/libX11/specs/libX11/CH01.xml +++ b/libX11/specs/libX11/CH01.xml @@ -27,7 +27,7 @@ those provided by the toolkits for X) are built on top of the Xlib library. For further information about these higher-level libraries, see the appropriate toolkit documentation. The X Window System Protocol provides the -definitive word on the behavior of X. +definitive word on the behavior of X. Although additional information appears here, the protocol document is the ruling document. diff --git a/libX11/specs/libX11/CH03.xml b/libX11/specs/libX11/CH03.xml index c6f1c86a1..645960797 100644 --- a/libX11/specs/libX11/CH03.xml +++ b/libX11/specs/libX11/CH03.xml @@ -2295,7 +2295,7 @@ structure are: -/* Configure window value mask bits */ +/* Configure window value mask bits */ #define CWX (1<<0) #define CWY (1<<1) #define CWWidth (1<<2) diff --git a/libX11/specs/libX11/CH06.xml b/libX11/specs/libX11/CH06.xml index f60053b93..a8224d8fc 100644 --- a/libX11/specs/libX11/CH06.xml +++ b/libX11/specs/libX11/CH06.xml @@ -273,7 +273,7 @@ The following macros define standard formats. -#define XcmsUndefinedFormat 0x00000000 +#define XcmsUndefinedFormat 0x00000000 #define XcmsCIEXYZFormat 0x00000001 /* CIE XYZ */ #define XcmsCIEuvYFormat 0x00000002 /* CIE u'v'Y */ #define XcmsCIExyYFormat 0x00000003 /* CIE xyY */ diff --git a/libX11/specs/libX11/CH07.xml b/libX11/specs/libX11/CH07.xml index 14d4bd4ed..505a565a2 100644 --- a/libX11/specs/libX11/CH07.xml +++ b/libX11/specs/libX11/CH07.xml @@ -14,7 +14,7 @@ Sharing of GCs is highly discouraged because the library may cache GC state. Graphics operations can be performed to either windows or pixmaps, which collectively are -called drawables. Each drawable exists on a single screen. A GC is created for a specific screen +called drawables. Each drawable exists on a single screen. A GC is created for a specific screen and drawable depth and can only be used with drawables of matching screen and depth. diff --git a/libX11/specs/libX11/CH08.xml b/libX11/specs/libX11/CH08.xml index de768f448..6cd6679f2 100644 --- a/libX11/specs/libX11/CH08.xml +++ b/libX11/specs/libX11/CH08.xml @@ -15,9 +15,9 @@ Once you have established a connection to a display, you can use the Xlib graphi Transfer images between clients and the server -If the same drawable and GC is used for each call, Xlib batches back-to-back calls to XDraw- -Point, XDrawLine, XDrawRectangle, XFillArc, and XFillRectangle. Note that this reduces -the total number of requests sent to the server. +If the same drawable and GC is used for each call, Xlib batches back-to-back +calls to XDrawPoint, XDrawLine, XDrawRectangle, XFillArc, and XFillRectangle. +Note that this reduces the total number of requests sent to the server. Clearing Areas diff --git a/libX11/specs/libX11/CH09.xml b/libX11/specs/libX11/CH09.xml index bcb7366fd..7d0f779f1 100644 --- a/libX11/specs/libX11/CH09.xml +++ b/libX11/specs/libX11/CH09.xml @@ -5,10 +5,11 @@ Window and Session Manager Functions -Although it is difficult to categorize functions as exclusively for an application, a window man- -ager, or a session manager, the functions in this chapter are most often used by window managers -and session managers. It is not expected that these functions will be used by most application -programs. Xlib provides management functions to: +Although it is difficult to categorize functions as exclusively for an application, +a window manager, or a session manager, the functions in this chapter are most +often used by window managers and session managers. It is not expected that +these functions will be used by most application programs. Xlib provides +management functions to: diff --git a/libX11/specs/libX11/CH10.xml b/libX11/specs/libX11/CH10.xml index d94ff212b..e7b945323 100644 --- a/libX11/specs/libX11/CH10.xml +++ b/libX11/specs/libX11/CH10.xml @@ -6,8 +6,8 @@ A client application communicates with the X server through the connection you establish with -the XOpenDisplay function. A client application sends requests to the X server over this con- -nection. These requests are made by the Xlib functions that are called in the client application. +the XOpenDisplay function. A client application sends requests to the X server over this +connection. These requests are made by the Xlib functions that are called in the client application. Many Xlib functions cause the X server to generate events, and the user’s typing or moving the pointer can generate events asynchronously. The X server returns events to the client on the same connection. diff --git a/libX11/specs/libX11/CH13.xml b/libX11/specs/libX11/CH13.xml index be0918adb..e28b1b0f3 100644 --- a/libX11/specs/libX11/CH13.xml +++ b/libX11/specs/libX11/CH13.xml @@ -8,22 +8,21 @@ An internationalized application is one that is adaptable to the requirements of different native languages, local customs, and character string encodings. The process of adapting the operation to a particular native language, local custom, or string encoding is called localization. A goal of -internationalization is to permit localization without program source modifications or recompila- -tion. +internationalization is to permit localization without program source modifications or recompilation. -As one of the localization mechanisms, Xlib provides an X Input Method (XIM) functional inter- -face for internationalized text input and an X Output Method (XOM) functional interface for -internationalized text output. +As one of the localization mechanisms, Xlib provides an X Input Method (XIM) +functional interface for internationalized text input and an X Output Method +(XOM) functional interface for internationalized text output. -Internationalization in X is based on the concept of a locale. A locale defines the localized +Internationalization in X is based on the concept of a locale. A locale defines the localized behavior of a program at run time. Locales affect Xlib in its: Encoding and processing of input method text - Encoding of resource files and values + Encoding of resource files and values Encoding and imaging of text strings Encoding and decoding for inter-client text communication @@ -32,22 +31,22 @@ behavior of a program at run time. Locales affect Xlib in its: • Encoding and decoding for inter-client text communication -Characters from various languages are represented in a computer using an encoding. Different -languages have different encodings, and there are even different encodings for the same charac- -ters in the same language. +Characters from various languages are represented in a computer using an encoding. +Different languages have different encodings, and there are even different +encodings for the same characters in the same language. -This chapter defines support for localized text imaging and text input and describes the locale +This chapter defines support for localized text imaging and text input and describes the locale mechanism that controls all locale-dependent Xlib functions. Sets of functions are provided for multibyte (char *) text as well as wide character (wchar_t) text in the form supported by the host C language environment. The multibyte and wide character functions are equivalent except for the form of the text argument. -The Xlib internationalization functions are not meant to provide support for multilingual applica- -tions (mixing multiple languages within a single piece of text), but they make it possible to imple- -ment applications that work in limited fashion with more than one language in independent con- -texts. +The Xlib internationalization functions are not meant to provide support for +multilingual applications (mixing multiple languages within a single piece of text), +but they make it possible to implement applications that work in limited +fashion with more than one language in independent contexts. The remainder of this chapter discusses: @@ -55,7 +54,7 @@ The remainder of this chapter discusses: X locale management - Locale and modifier dependencies + Locale and modifier dependencies Variable argument lists Output methods Input methods @@ -9360,10 +9359,11 @@ typedef unsigned long XIMFeedback; #define XIMVisibleToBackward (1L<<9) #define XIMVisibleToCenter (1L<<10) -*† The values for XIMPrimary, XIMSecondary, and XIMTertiary were incorrectly defined in -the R5 specification. The X Consortium’s X11R5 implementation correctly implemented the val- -ues for these highlights. The value of these highlights has been corrected in this specification to -agree with the values in the Consortium’s X11R5 and X11R6 implementations. +*† The values for XIMPrimary, XIMSecondary, and XIMTertiary were incorrectly defined in +the R5 specification. The X Consortium’s X11R5 implementation correctly +implemented the values for these highlights. The value of these highlights has +been corrected in this specification to agree with the values in the +Consortium’s X11R5 and X11R6 implementations. diff --git a/libX11/specs/libX11/CH14.xml b/libX11/specs/libX11/CH14.xml index 9bfbc4f1b..2baf6d5bf 100644 --- a/libX11/specs/libX11/CH14.xml +++ b/libX11/specs/libX11/CH14.xml @@ -7,14 +7,14 @@ The Inter-Client Communication Conventions Manual, hereafter referred to as the ICCCM, details the X Consortium approved conventions that govern inter-client communications. These conventions ensure peer-to-peer client cooperation in the use of selections, cut buffers, and shared -resources as well as client cooperation with window and session managers. For further informa- -tion, see the Inter-Client Communication Conventions Manual. +resources as well as client cooperation with window and session managers. For further information, +see the Inter-Client Communication Conventions Manual. -Xlib provides a number of standard properties and programming interfaces that are ICCCM com- -pliant. The predefined atoms for some of these properties are defined in the <X11/Xatom.h> -header file, where to avoid name conflicts with user symbols their #define name has an XA_ pre- -fix. For further information about atoms and properties, see section 4.3. +Xlib provides a number of standard properties and programming interfaces that are ICCCM +compliant. The predefined atoms for some of these properties are defined in the <X11/Xatom.h> +header file, where to avoid name conflicts with user symbols their #define name has an XA_ prefix. +For further information about atoms and properties, see section 4.3. Xlib’s selection and cut buffer mechanisms provide the primary programming interfaces by which @@ -57,8 +57,7 @@ managers are: TEXT The string name of the machine on - which the client application is run- - ning. + which the client application is running. @@ -74,7 +73,7 @@ managers are: WM_COMMAND TEXT - The command and arguments, null- + The command and arguments, null separated, used to invoke the application. @@ -134,8 +133,7 @@ managers are: WM_STATE 32 Intended for communication - between window and session man- - agers only. + between window and session managers only. diff --git a/libX11/src/xcb_io.c b/libX11/src/xcb_io.c index afb0267ca..bac9bdf0b 100644 --- a/libX11/src/xcb_io.c +++ b/libX11/src/xcb_io.c @@ -15,6 +15,7 @@ #ifdef HAVE_INTTYPES_H #include #endif +#include #include #include #include @@ -22,6 +23,28 @@ #include #endif +#define xcb_fail_assert(_message, _var) { \ + unsigned int _var = 1; \ + fprintf(stderr, "[xcb] Aborting, sorry about that.\n"); \ + assert(!_var); \ +} + +#define throw_thread_fail_assert(_message, _var) { \ + fprintf(stderr, "[xcb] " _message "\n"); \ + fprintf(stderr, "[xcb] Most likely this is a multi-threaded client " \ + "and XInitThreads has not been called\n"); \ + xcb_fail_assert(_message, _var); \ +} + +/* XXX: It would probably be most useful if we stored the last-processed + * request, so we could find the offender from the message. */ +#define throw_extlib_fail_assert(_message, _var) { \ + fprintf(stderr, "[xcb] " _message "\n"); \ + fprintf(stderr, "[xcb] This is most likely caused by a broken X " \ + "extension library\n"); \ + xcb_fail_assert(_message, _var); \ +} + static void return_socket(void *closure) { Display *dpy = closure; @@ -51,9 +74,14 @@ static void require_socket(Display *dpy) * happens while Xlib does not own the socket. A * complete fix would be to make XCB's public API use * 64-bit sequence numbers. */ - assert(!(sizeof(unsigned long) > sizeof(unsigned int) - && dpy->xcb->event_owner == XlibOwnsEventQueue - && (sent - dpy->last_request_read >= (UINT64_C(1) << 32)))); + if (sizeof(unsigned long) > sizeof(unsigned int) && + dpy->xcb->event_owner == XlibOwnsEventQueue && + (sent - dpy->last_request_read >= (UINT64_C(1) << 32))) { + throw_thread_fail_assert("Sequence number wrapped " + "beyond 32 bits while Xlib " + "did not own the socket", + xcb_xlib_seq_number_wrapped); + } dpy->xcb->last_flushed = dpy->request = sent; dpy->bufmax = dpy->xcb->real_bufmax; } @@ -125,8 +153,15 @@ static PendingRequest *append_pending_request(Display *dpy, unsigned long sequen node->reply_waiter = 0; if(dpy->xcb->pending_requests_tail) { - assert(XLIB_SEQUENCE_COMPARE(dpy->xcb->pending_requests_tail->sequence, <, node->sequence)); - assert(dpy->xcb->pending_requests_tail->next == NULL); + if (XLIB_SEQUENCE_COMPARE(dpy->xcb->pending_requests_tail->sequence, + >=, node->sequence)) + throw_thread_fail_assert("Unknown sequence number " + "while appending request", + xcb_xlib_unknown_seq_number); + if (dpy->xcb->pending_requests_tail->next != NULL) + throw_thread_fail_assert("Unknown request in queue " + "while appending request", + xcb_xlib_unknown_req_pending); dpy->xcb->pending_requests_tail->next = node; } else @@ -137,15 +172,26 @@ static PendingRequest *append_pending_request(Display *dpy, unsigned long sequen static void dequeue_pending_request(Display *dpy, PendingRequest *req) { - assert(req == dpy->xcb->pending_requests); + if (req != dpy->xcb->pending_requests) + throw_thread_fail_assert("Unknown request in queue while " + "dequeuing", + xcb_xlib_unknown_req_in_deq); + dpy->xcb->pending_requests = req->next; if(!dpy->xcb->pending_requests) { - assert(req == dpy->xcb->pending_requests_tail); + if (req != dpy->xcb->pending_requests_tail) + throw_thread_fail_assert("Unknown request in queue " + "while dequeuing", + xcb_xlib_unknown_req_in_deq); dpy->xcb->pending_requests_tail = NULL; } - else - assert(XLIB_SEQUENCE_COMPARE(req->sequence, <, dpy->xcb->pending_requests->sequence)); + else if (XLIB_SEQUENCE_COMPARE(req->sequence, >=, + dpy->xcb->pending_requests->sequence)) + throw_thread_fail_assert("Unknown sequence number while " + "dequeuing request", + xcb_xlib_threads_sequence_lost); + free(req); } @@ -218,7 +264,14 @@ static xcb_generic_reply_t *poll_for_event(Display *dpy) if(!req || XLIB_SEQUENCE_COMPARE(event_sequence, <, req->sequence) || (event->response_type != X_Error && event_sequence == req->sequence)) { - assert(XLIB_SEQUENCE_COMPARE(event_sequence, <=, dpy->request)); + if (XLIB_SEQUENCE_COMPARE(event_sequence, >, + dpy->request)) + { + throw_thread_fail_assert("Unknown sequence " + "number while " + "processing queue", + xcb_xlib_threads_sequence_lost); + } dpy->last_request_read = event_sequence; dpy->xcb->next_event = NULL; return (xcb_generic_reply_t *) event; @@ -237,7 +290,12 @@ static xcb_generic_reply_t *poll_for_response(Display *dpy) !req->reply_waiter && xcb_poll_for_reply(dpy->xcb->connection, req->sequence, &response, &error)) { - assert(XLIB_SEQUENCE_COMPARE(req->sequence, <=, dpy->request)); + if(XLIB_SEQUENCE_COMPARE(req->sequence, >, dpy->request)) + { + throw_thread_fail_assert("Unknown sequence number " + "while awaiting reply", + xcb_xlib_threads_sequence_lost); + } dpy->last_request_read = req->sequence; if(response) break; @@ -512,7 +570,9 @@ Status _XReply(Display *dpy, xReply *rep, int extra, Bool discard) char *reply; PendingRequest *current; - assert(!dpy->xcb->reply_data); + if (dpy->xcb->reply_data) + throw_extlib_fail_assert("Extra reply data still left in queue", + xcb_xlib_extra_reply_data_left); if(dpy->flags & XlibDisplayIOError) return 0; @@ -568,7 +628,11 @@ Status _XReply(Display *dpy, xReply *rep, int extra, Bool discard) req->reply_waiter = 0; ConditionBroadcast(dpy, dpy->xcb->reply_notify); - assert(XLIB_SEQUENCE_COMPARE(req->sequence, <=, dpy->request)); + if(XLIB_SEQUENCE_COMPARE(req->sequence, >, dpy->request)) { + throw_thread_fail_assert("Unknown sequence number " + "while processing reply", + xcb_xlib_threads_sequence_lost); + } dpy->last_request_read = req->sequence; if(!response) dequeue_pending_request(dpy, req); @@ -665,8 +729,10 @@ int _XRead(Display *dpy, char *data, long size) assert(size >= 0); if(size == 0) return 0; - assert(dpy->xcb->reply_data != NULL); - assert(dpy->xcb->reply_consumed + size <= dpy->xcb->reply_length); + if(dpy->xcb->reply_data == NULL || + dpy->xcb->reply_consumed + size > dpy->xcb->reply_length) + throw_extlib_fail_assert("Too much data requested from _XRead", + xcb_xlib_too_much_data_requested); memcpy(data, dpy->xcb->reply_data + dpy->xcb->reply_consumed, size); dpy->xcb->reply_consumed += size; _XFreeReplyData(dpy, False); diff --git a/mesalib/configs/autoconf.in b/mesalib/configs/autoconf.in index 4e931a3a9..5119f2fed 100644 --- a/mesalib/configs/autoconf.in +++ b/mesalib/configs/autoconf.in @@ -1,219 +1,223 @@ -# Autoconf configuration - -# Pull in the defaults -include $(TOP)/configs/default - -# This is generated by configure -CONFIG_NAME = autoconf - -# Compiler and flags -CC = @CC@ -CXX = @CXX@ -OPT_FLAGS = @OPT_FLAGS@ -ARCH_FLAGS = @ARCH_FLAGS@ -ASM_FLAGS = @ASM_FLAGS@ -PIC_FLAGS = @PIC_FLAGS@ -DEFINES = @DEFINES@ -API_DEFINES = @API_DEFINES@ -SHARED_GLAPI = @SHARED_GLAPI@ -CFLAGS_NOVISIBILITY = @CPPFLAGS@ @CFLAGS@ \ - $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES) -CXXFLAGS_NOVISIBILITY = @CPPFLAGS@ @CXXFLAGS@ \ - $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) -CFLAGS = $(CFLAGS_NOVISIBILITY) @VISIBILITY_CFLAGS@ -CXXFLAGS = $(CXXFLAGS_NOVISIBILITY) @VISIBILITY_CXXFLAGS@ -LDFLAGS = @LDFLAGS@ -EXTRA_LIB_PATH = @EXTRA_LIB_PATH@ -RADEON_CFLAGS = @RADEON_CFLAGS@ -RADEON_LDFLAGS = @RADEON_LDFLAGS@ -INTEL_LIBS = @INTEL_LIBS@ -INTEL_CFLAGS = @INTEL_CFLAGS@ -X11_LIBS = @X11_LIBS@ -X11_CFLAGS = @X11_CFLAGS@ -LLVM_CFLAGS = @LLVM_CFLAGS@ -LLVM_LDFLAGS = @LLVM_LDFLAGS@ -LLVM_LIBS = @LLVM_LIBS@ -GLW_CFLAGS = @GLW_CFLAGS@ -GLUT_CFLAGS = @GLUT_CFLAGS@ -GLX_TLS = @GLX_TLS@ -DRI_CFLAGS = @DRI_CFLAGS@ -DRI_CXXFLAGS = @DRI_CXXFLAGS@ - -# dlopen -DLOPEN_LIBS = @DLOPEN_LIBS@ - -# Source selection -MESA_ASM_SOURCES = @MESA_ASM_SOURCES@ -GLAPI_ASM_SOURCES = @GLAPI_ASM_SOURCES@ - -# Misc tools and flags -MAKE = @MAKE@ -SHELL = @SHELL@ -MKLIB_OPTIONS = @MKLIB_OPTIONS@ -MKDEP = @MKDEP@ -MKDEP_OPTIONS = @MKDEP_OPTIONS@ -INSTALL = @INSTALL@ - -# Python and flags (generally only needed by the developers) -PYTHON2 = @PYTHON2@ -PYTHON_FLAGS = -t -O -O - -# Library names (base name) -GL_LIB = GL -GLU_LIB = GLU -GLUT_LIB = glut -GLW_LIB = GLw -OSMESA_LIB = @OSMESA_LIB@ -GLESv1_CM_LIB = GLESv1_CM -GLESv2_LIB = GLESv2 -VG_LIB = OpenVG -GLAPI_LIB = glapi -WAYLAND_EGL_LIB = wayland-egl - -# Library names (actual file names) -GL_LIB_NAME = @GL_LIB_NAME@ -GLU_LIB_NAME = @GLU_LIB_NAME@ -GLUT_LIB_NAME = @GLUT_LIB_NAME@ -GLW_LIB_NAME = @GLW_LIB_NAME@ -OSMESA_LIB_NAME = @OSMESA_LIB_NAME@ -EGL_LIB_NAME = @EGL_LIB_NAME@ -GLESv1_CM_LIB_NAME = @GLESv1_CM_LIB_NAME@ -GLESv2_LIB_NAME = @GLESv2_LIB_NAME@ -VG_LIB_NAME = @VG_LIB_NAME@ -GLAPI_LIB_NAME = @GLAPI_LIB_NAME@ -WAYLAND_EGL_LIB_NAME = @WAYLAND_EGL_LIB_NAME@ - -# Globs used to install the lib and all symlinks -GL_LIB_GLOB = @GL_LIB_GLOB@ -GLU_LIB_GLOB = @GLU_LIB_GLOB@ -GLUT_LIB_GLOB = @GLUT_LIB_GLOB@ -GLW_LIB_GLOB = @GLW_LIB_GLOB@ -OSMESA_LIB_GLOB = @OSMESA_LIB_GLOB@ -EGL_LIB_GLOB = @EGL_LIB_GLOB@ -GLESv1_CM_LIB_GLOB = @GLESv1_CM_LIB_GLOB@ -GLESv2_LIB_GLOB = @GLESv2_LIB_GLOB@ -VG_LIB_GLOB = @VG_LIB_GLOB@ -GLAPI_LIB_GLOB = @GLAPI_LIB_GLOB@ -WAYLAND_EGL_LIB_GLOB = @WAYLAND_EGL_LIB_GLOB@ - -# Directories to build -LIB_DIR = @LIB_DIR@ -SRC_DIRS = @SRC_DIRS@ -GLU_DIRS = @GLU_DIRS@ -DRIVER_DIRS = @DRIVER_DIRS@ -EGL_DRIVERS_DIRS = @EGL_DRIVERS_DIRS@ -GALLIUM_DIRS = @GALLIUM_DIRS@ -GALLIUM_DRIVERS_DIRS = @GALLIUM_DRIVERS_DIRS@ -GALLIUM_WINSYS_DIRS = @GALLIUM_WINSYS_DIRS@ -GALLIUM_TARGET_DIRS = @GALLIUM_TARGET_DIRS@ -GALLIUM_STATE_TRACKERS_DIRS = @GALLIUM_STATE_TRACKERS_DIRS@ -GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a -GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) - -# Driver specific build vars -DRI_DIRS = @DRI_DIRS@ -DRICORE_GLSL_LIBS = @DRICORE_GLSL_LIBS@ -DRICORE_LIBS = @DRICORE_LIBS@ -DRICORE_LIB_DEPS = @DRICORE_LIB_DEPS@ -EGL_PLATFORMS = @EGL_PLATFORMS@ -EGL_CLIENT_APIS = @EGL_CLIENT_APIS@ - -# Dependencies -X11_INCLUDES = @X11_INCLUDES@ - -# GLw motif setup -GLW_SOURCES = @GLW_SOURCES@ -MOTIF_CFLAGS = @MOTIF_CFLAGS@ - -# Library/program dependencies -GL_LIB_DEPS = $(EXTRA_LIB_PATH) @GL_LIB_DEPS@ -OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @OSMESA_MESA_DEPS@ \ - $(EXTRA_LIB_PATH) @OSMESA_LIB_DEPS@ -EGL_LIB_DEPS = $(EXTRA_LIB_PATH) @EGL_LIB_DEPS@ -GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLU_MESA_DEPS@ \ - $(EXTRA_LIB_PATH) @GLU_LIB_DEPS@ -GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLUT_MESA_DEPS@ \ - $(EXTRA_LIB_PATH) @GLUT_LIB_DEPS@ -GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLW_MESA_DEPS@ \ - $(EXTRA_LIB_PATH) @GLW_LIB_DEPS@ -APP_LIB_DEPS = $(EXTRA_LIB_PATH) @APP_LIB_DEPS@ -GLESv1_CM_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv1_CM_LIB_DEPS@ -GLESv2_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv2_LIB_DEPS@ -VG_LIB_DEPS = $(EXTRA_LIB_PATH) @VG_LIB_DEPS@ -GLAPI_LIB_DEPS = $(EXTRA_LIB_PATH) @GLAPI_LIB_DEPS@ -WAYLAND_EGL_LIB_DEPS = $(EXTRA_LIBPATH) @WAYLAND_EGL_LIB_DEPS@ - -# DRI dependencies -MESA_MODULES = @MESA_MODULES@ -DRI_LIB_DEPS = $(EXTRA_LIB_PATH) @DRI_LIB_DEPS@ -LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ -LIBDRM_LIB = @LIBDRM_LIBS@ -DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ -GLPROTO_CFLAGS = @GLPROTO_CFLAGS@ -EXPAT_INCLUDES = @EXPAT_INCLUDES@ - -# Autoconf directories -prefix = @prefix@ -exec_prefix = @exec_prefix@ -libdir = @libdir@ -includedir = @includedir@ - -# Installation directories (for make install) -INSTALL_DIR = $(prefix) -INSTALL_LIB_DIR = $(libdir) -INSTALL_INC_DIR = $(includedir) - -# DRI installation directories -DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@ - -# Where libGL will look for DRI hardware drivers -DRI_DRIVER_SEARCH_DIR = @DRI_DRIVER_SEARCH_DIR@ - -# EGL driver install directory -EGL_DRIVER_INSTALL_DIR = @EGL_DRIVER_INSTALL_DIR@ - -# Xorg driver install directory (for xorg state-tracker) -XORG_DRIVER_INSTALL_DIR = @XORG_DRIVER_INSTALL_DIR@ - -# pkg-config substitutions -GL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@ -GL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@ -GL_PC_CFLAGS = @GL_PC_CFLAGS@ -DRI_PC_REQ_PRIV = @DRI_PC_REQ_PRIV@ -GLU_PC_REQ = @GLU_PC_REQ@ -GLU_PC_REQ_PRIV = @GLU_PC_REQ_PRIV@ -GLU_PC_LIB_PRIV = @GLU_PC_LIB_PRIV@ -GLU_PC_CFLAGS = @GLU_PC_CFLAGS@ -GLUT_PC_REQ_PRIV = @GLUT_PC_REQ_PRIV@ -GLUT_PC_LIB_PRIV = @GLUT_PC_LIB_PRIV@ -GLUT_PC_CFLAGS = @GLUT_PC_CFLAGS@ -GLW_PC_REQ_PRIV = @GLW_PC_REQ_PRIV@ -GLW_PC_LIB_PRIV = @GLW_PC_LIB_PRIV@ -GLW_PC_CFLAGS = @GLW_PC_CFLAGS@ -OSMESA_PC_REQ = @OSMESA_PC_REQ@ -OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@ -GLESv1_CM_PC_LIB_PRIV = @GLESv1_CM_PC_LIB_PRIV@ -GLESv2_PC_LIB_PRIV = @GLESv2_PC_LIB_PRIV@ -EGL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@ -EGL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@ -EGL_PC_CFLAGS = @GL_PC_CFLAGS@ -WAYLAND_EGL_PC_REQ_PRIV = @WAYLAND_EGL_PC_REQ_PRIV@ -WAYLAND_EGL_PC_LIB_PRIV = @WAYLAND_EGL_PC_LIB_PRIV@ -WAYLAND_EGL_PC_CFLAGS = @WAYLAND_EGL_PC_CFLAGS@ - -XCB_DRI2_CFLAGS = @XCB_DRI2_CFLAGS@ -XCB_DRI2_LIBS = @XCB_DRI2_LIBS@ -LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@ -LIBUDEV_LIBS = @LIBUDEV_LIBS@ -WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ -WAYLAND_LIBS = @WAYLAND_LIBS@ - -MESA_LLVM = @MESA_LLVM@ - -LLVM_VERSION = @LLVM_VERSION@ -ifneq ($(LLVM_VERSION),) - HAVE_LLVM := 0x0$(subst .,0,$(LLVM_VERSION:svn=)) - DEFINES += -DHAVE_LLVM=$(HAVE_LLVM) -endif - -HAVE_XF86VIDMODE = @HAVE_XF86VIDMODE@ +# Autoconf configuration + +# Pull in the defaults +include $(TOP)/configs/default + +# This is generated by configure +CONFIG_NAME = autoconf + +# Compiler and flags +CC = @CC@ +CXX = @CXX@ +OPT_FLAGS = @OPT_FLAGS@ +ARCH_FLAGS = @ARCH_FLAGS@ +ASM_FLAGS = @ASM_FLAGS@ +PIC_FLAGS = @PIC_FLAGS@ +DEFINES = @DEFINES@ +API_DEFINES = @API_DEFINES@ +SHARED_GLAPI = @SHARED_GLAPI@ +CFLAGS_NOVISIBILITY = @CPPFLAGS@ @CFLAGS@ \ + $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(ASM_FLAGS) $(DEFINES) +CXXFLAGS_NOVISIBILITY = @CPPFLAGS@ @CXXFLAGS@ \ + $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) +CFLAGS = $(CFLAGS_NOVISIBILITY) @VISIBILITY_CFLAGS@ +CXXFLAGS = $(CXXFLAGS_NOVISIBILITY) @VISIBILITY_CXXFLAGS@ +LDFLAGS = @LDFLAGS@ +EXTRA_LIB_PATH = @EXTRA_LIB_PATH@ +RADEON_CFLAGS = @RADEON_CFLAGS@ +RADEON_LDFLAGS = @RADEON_LDFLAGS@ +INTEL_LIBS = @INTEL_LIBS@ +INTEL_CFLAGS = @INTEL_CFLAGS@ +X11_LIBS = @X11_LIBS@ +X11_CFLAGS = @X11_CFLAGS@ +LLVM_CFLAGS = @LLVM_CFLAGS@ +LLVM_LDFLAGS = @LLVM_LDFLAGS@ +LLVM_LIBS = @LLVM_LIBS@ +GLW_CFLAGS = @GLW_CFLAGS@ +GLUT_CFLAGS = @GLUT_CFLAGS@ +GLX_TLS = @GLX_TLS@ +DRI_CFLAGS = @DRI_CFLAGS@ +DRI_CXXFLAGS = @DRI_CXXFLAGS@ + +# dlopen +DLOPEN_LIBS = @DLOPEN_LIBS@ + +# Source selection +MESA_ASM_SOURCES = @MESA_ASM_SOURCES@ +GLAPI_ASM_SOURCES = @GLAPI_ASM_SOURCES@ + +# Misc tools and flags +MAKE = @MAKE@ +SHELL = @SHELL@ +MKLIB_OPTIONS = @MKLIB_OPTIONS@ +MKDEP = @MKDEP@ +MKDEP_OPTIONS = @MKDEP_OPTIONS@ +INSTALL = @INSTALL@ + +# Python and flags (generally only needed by the developers) +PYTHON2 = @PYTHON2@ +PYTHON_FLAGS = -t -O -O + +# Flex and Bison for GLSL compiler +FLEX = @FLEX@ +BISON = @BISON@ + +# Library names (base name) +GL_LIB = GL +GLU_LIB = GLU +GLUT_LIB = glut +GLW_LIB = GLw +OSMESA_LIB = @OSMESA_LIB@ +GLESv1_CM_LIB = GLESv1_CM +GLESv2_LIB = GLESv2 +VG_LIB = OpenVG +GLAPI_LIB = glapi +WAYLAND_EGL_LIB = wayland-egl + +# Library names (actual file names) +GL_LIB_NAME = @GL_LIB_NAME@ +GLU_LIB_NAME = @GLU_LIB_NAME@ +GLUT_LIB_NAME = @GLUT_LIB_NAME@ +GLW_LIB_NAME = @GLW_LIB_NAME@ +OSMESA_LIB_NAME = @OSMESA_LIB_NAME@ +EGL_LIB_NAME = @EGL_LIB_NAME@ +GLESv1_CM_LIB_NAME = @GLESv1_CM_LIB_NAME@ +GLESv2_LIB_NAME = @GLESv2_LIB_NAME@ +VG_LIB_NAME = @VG_LIB_NAME@ +GLAPI_LIB_NAME = @GLAPI_LIB_NAME@ +WAYLAND_EGL_LIB_NAME = @WAYLAND_EGL_LIB_NAME@ + +# Globs used to install the lib and all symlinks +GL_LIB_GLOB = @GL_LIB_GLOB@ +GLU_LIB_GLOB = @GLU_LIB_GLOB@ +GLUT_LIB_GLOB = @GLUT_LIB_GLOB@ +GLW_LIB_GLOB = @GLW_LIB_GLOB@ +OSMESA_LIB_GLOB = @OSMESA_LIB_GLOB@ +EGL_LIB_GLOB = @EGL_LIB_GLOB@ +GLESv1_CM_LIB_GLOB = @GLESv1_CM_LIB_GLOB@ +GLESv2_LIB_GLOB = @GLESv2_LIB_GLOB@ +VG_LIB_GLOB = @VG_LIB_GLOB@ +GLAPI_LIB_GLOB = @GLAPI_LIB_GLOB@ +WAYLAND_EGL_LIB_GLOB = @WAYLAND_EGL_LIB_GLOB@ + +# Directories to build +LIB_DIR = @LIB_DIR@ +SRC_DIRS = @SRC_DIRS@ +GLU_DIRS = @GLU_DIRS@ +DRIVER_DIRS = @DRIVER_DIRS@ +EGL_DRIVERS_DIRS = @EGL_DRIVERS_DIRS@ +GALLIUM_DIRS = @GALLIUM_DIRS@ +GALLIUM_DRIVERS_DIRS = @GALLIUM_DRIVERS_DIRS@ +GALLIUM_WINSYS_DIRS = @GALLIUM_WINSYS_DIRS@ +GALLIUM_TARGET_DIRS = @GALLIUM_TARGET_DIRS@ +GALLIUM_STATE_TRACKERS_DIRS = @GALLIUM_STATE_TRACKERS_DIRS@ +GALLIUM_AUXILIARIES = $(TOP)/src/gallium/auxiliary/libgallium.a +GALLIUM_DRIVERS = $(foreach DIR,$(GALLIUM_DRIVERS_DIRS),$(TOP)/src/gallium/drivers/$(DIR)/lib$(DIR).a) + +# Driver specific build vars +DRI_DIRS = @DRI_DIRS@ +DRICORE_GLSL_LIBS = @DRICORE_GLSL_LIBS@ +DRICORE_LIBS = @DRICORE_LIBS@ +DRICORE_LIB_DEPS = @DRICORE_LIB_DEPS@ +EGL_PLATFORMS = @EGL_PLATFORMS@ +EGL_CLIENT_APIS = @EGL_CLIENT_APIS@ + +# Dependencies +X11_INCLUDES = @X11_INCLUDES@ + +# GLw motif setup +GLW_SOURCES = @GLW_SOURCES@ +MOTIF_CFLAGS = @MOTIF_CFLAGS@ + +# Library/program dependencies +GL_LIB_DEPS = $(EXTRA_LIB_PATH) @GL_LIB_DEPS@ +OSMESA_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @OSMESA_MESA_DEPS@ \ + $(EXTRA_LIB_PATH) @OSMESA_LIB_DEPS@ +EGL_LIB_DEPS = $(EXTRA_LIB_PATH) @EGL_LIB_DEPS@ +GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLU_MESA_DEPS@ \ + $(EXTRA_LIB_PATH) @GLU_LIB_DEPS@ +GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLUT_MESA_DEPS@ \ + $(EXTRA_LIB_PATH) @GLUT_LIB_DEPS@ +GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLW_MESA_DEPS@ \ + $(EXTRA_LIB_PATH) @GLW_LIB_DEPS@ +APP_LIB_DEPS = $(EXTRA_LIB_PATH) @APP_LIB_DEPS@ +GLESv1_CM_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv1_CM_LIB_DEPS@ +GLESv2_LIB_DEPS = $(EXTRA_LIB_PATH) @GLESv2_LIB_DEPS@ +VG_LIB_DEPS = $(EXTRA_LIB_PATH) @VG_LIB_DEPS@ +GLAPI_LIB_DEPS = $(EXTRA_LIB_PATH) @GLAPI_LIB_DEPS@ +WAYLAND_EGL_LIB_DEPS = $(EXTRA_LIBPATH) @WAYLAND_EGL_LIB_DEPS@ + +# DRI dependencies +MESA_MODULES = @MESA_MODULES@ +DRI_LIB_DEPS = $(EXTRA_LIB_PATH) @DRI_LIB_DEPS@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIB = @LIBDRM_LIBS@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +GLPROTO_CFLAGS = @GLPROTO_CFLAGS@ +EXPAT_INCLUDES = @EXPAT_INCLUDES@ + +# Autoconf directories +prefix = @prefix@ +exec_prefix = @exec_prefix@ +libdir = @libdir@ +includedir = @includedir@ + +# Installation directories (for make install) +INSTALL_DIR = $(prefix) +INSTALL_LIB_DIR = $(libdir) +INSTALL_INC_DIR = $(includedir) + +# DRI installation directories +DRI_DRIVER_INSTALL_DIR = @DRI_DRIVER_INSTALL_DIR@ + +# Where libGL will look for DRI hardware drivers +DRI_DRIVER_SEARCH_DIR = @DRI_DRIVER_SEARCH_DIR@ + +# EGL driver install directory +EGL_DRIVER_INSTALL_DIR = @EGL_DRIVER_INSTALL_DIR@ + +# Xorg driver install directory (for xorg state-tracker) +XORG_DRIVER_INSTALL_DIR = @XORG_DRIVER_INSTALL_DIR@ + +# pkg-config substitutions +GL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@ +GL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@ +GL_PC_CFLAGS = @GL_PC_CFLAGS@ +DRI_PC_REQ_PRIV = @DRI_PC_REQ_PRIV@ +GLU_PC_REQ = @GLU_PC_REQ@ +GLU_PC_REQ_PRIV = @GLU_PC_REQ_PRIV@ +GLU_PC_LIB_PRIV = @GLU_PC_LIB_PRIV@ +GLU_PC_CFLAGS = @GLU_PC_CFLAGS@ +GLUT_PC_REQ_PRIV = @GLUT_PC_REQ_PRIV@ +GLUT_PC_LIB_PRIV = @GLUT_PC_LIB_PRIV@ +GLUT_PC_CFLAGS = @GLUT_PC_CFLAGS@ +GLW_PC_REQ_PRIV = @GLW_PC_REQ_PRIV@ +GLW_PC_LIB_PRIV = @GLW_PC_LIB_PRIV@ +GLW_PC_CFLAGS = @GLW_PC_CFLAGS@ +OSMESA_PC_REQ = @OSMESA_PC_REQ@ +OSMESA_PC_LIB_PRIV = @OSMESA_PC_LIB_PRIV@ +GLESv1_CM_PC_LIB_PRIV = @GLESv1_CM_PC_LIB_PRIV@ +GLESv2_PC_LIB_PRIV = @GLESv2_PC_LIB_PRIV@ +EGL_PC_REQ_PRIV = @GL_PC_REQ_PRIV@ +EGL_PC_LIB_PRIV = @GL_PC_LIB_PRIV@ +EGL_PC_CFLAGS = @GL_PC_CFLAGS@ +WAYLAND_EGL_PC_REQ_PRIV = @WAYLAND_EGL_PC_REQ_PRIV@ +WAYLAND_EGL_PC_LIB_PRIV = @WAYLAND_EGL_PC_LIB_PRIV@ +WAYLAND_EGL_PC_CFLAGS = @WAYLAND_EGL_PC_CFLAGS@ + +XCB_DRI2_CFLAGS = @XCB_DRI2_CFLAGS@ +XCB_DRI2_LIBS = @XCB_DRI2_LIBS@ +LIBUDEV_CFLAGS = @LIBUDEV_CFLAGS@ +LIBUDEV_LIBS = @LIBUDEV_LIBS@ +WAYLAND_CFLAGS = @WAYLAND_CFLAGS@ +WAYLAND_LIBS = @WAYLAND_LIBS@ + +MESA_LLVM = @MESA_LLVM@ + +LLVM_VERSION = @LLVM_VERSION@ +ifneq ($(LLVM_VERSION),) + HAVE_LLVM := 0x0$(subst .,0,$(LLVM_VERSION:svn=)) + DEFINES += -DHAVE_LLVM=$(HAVE_LLVM) +endif + +HAVE_XF86VIDMODE = @HAVE_XF86VIDMODE@ diff --git a/mesalib/configs/default b/mesalib/configs/default index 0e9166b4f..393366307 100644 --- a/mesalib/configs/default +++ b/mesalib/configs/default @@ -38,6 +38,8 @@ MKLIB_OPTIONS = MKDEP = makedepend MKDEP_OPTIONS = -fdepend MAKE = make +FLEX = flex +BISON = bison # Use MINSTALL for installing libraries, INSTALL for everything else MINSTALL = $(SHELL) $(TOP)/bin/minstall diff --git a/mesalib/configure.ac b/mesalib/configure.ac index c705d4505..a201c31ae 100644 --- a/mesalib/configure.ac +++ b/mesalib/configure.ac @@ -1,1971 +1,1977 @@ -dnl Process this file with autoconf to create configure. - -AC_PREREQ([2.59]) - -dnl Versioning - scrape the version from configs/default -m4_define([mesa_version], - [m4_esyscmd([${MAKE-make} -s -f bin/version.mk version | tr -d '\n' | tr -d '\r'])]) -m4_ifval(mesa_version,, - [m4_fatal([Failed to get the Mesa version from `make -f bin/version.mk version`])]) - -dnl Tell the user about autoconf.html in the --help output -m4_divert_once([HELP_END], [ -See docs/autoconf.html for more details on the options for Mesa.]) - -AC_INIT([Mesa],[mesa_version], - [https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa]) -AC_CONFIG_AUX_DIR([bin]) -AC_CANONICAL_HOST - -dnl Versions for external dependencies -LIBDRM_REQUIRED=2.4.24 -LIBDRM_RADEON_REQUIRED=2.4.24 -LIBDRM_INTEL_REQUIRED=2.4.24 -DRI2PROTO_REQUIRED=2.1 -GLPROTO_REQUIRED=1.4.11 -LIBDRM_XORG_REQUIRED=2.4.24 -LIBKMS_XORG_REQUIRED=1.0.0 - -dnl Check for progs -AC_PROG_CPP -AC_PROG_CC -AC_PROG_CXX -AC_CHECK_PROGS([MAKE], [gmake make]) -AC_CHECK_PROGS([PYTHON2], [python2 python]) -AC_PATH_PROG([MKDEP], [makedepend]) -AC_PATH_PROG([SED], [sed]) - -if test "x$MKDEP" = "x"; then - AC_MSG_ERROR([makedepend is required to build Mesa]) -fi - -dnl Our fallback install-sh is a symlink to minstall. Use the existing -dnl configuration in that case. -AC_PROG_INSTALL -test "x$INSTALL" = "x$ac_install_sh" && INSTALL='$(MINSTALL)' - -dnl We need a POSIX shell for parts of the build. Assume we have one -dnl in most cases. -case "$host_os" in -solaris*) - # Solaris /bin/sh is too old/non-POSIX compliant - AC_PATH_PROGS(POSIX_SHELL, [ksh93 ksh sh]) - SHELL="$POSIX_SHELL" - ;; -esac - -dnl clang is mostly GCC-compatible, but its version is much lower, -dnl so we have to check for it. -AC_MSG_CHECKING([if compiling with clang]) - -AC_COMPILE_IFELSE( -[AC_LANG_PROGRAM([], [[ -#ifndef __clang__ - not clang -#endif -]])], -[CLANG=yes], [CLANG=no]) - -AC_MSG_RESULT([$CLANG]) - -dnl If we're using GCC, make sure that it is at least version 3.3.0. Older -dnl versions are explictly not supported. -if test "x$GCC" = xyes -a "x$CLANG" = xno; then - AC_MSG_CHECKING([whether gcc version is sufficient]) - major=0 - minor=0 - - GCC_VERSION=`$CC -dumpversion` - if test $? -eq 0; then - major=`echo $GCC_VERSION | cut -d. -f1` - minor=`echo $GCC_VERSION | cut -d. -f1` - fi - - if test $major -lt 3 -o $major -eq 3 -a $minor -lt 3 ; then - AC_MSG_RESULT([no]) - AC_MSG_ERROR([If using GCC, version 3.3.0 or later is required.]) - else - AC_MSG_RESULT([yes]) - fi -fi - - -MKDEP_OPTIONS=-fdepend -dnl Ask gcc where it's keeping its secret headers -if test "x$GCC" = xyes; then - for dir in include include-fixed; do - GCC_INCLUDES=`$CC -print-file-name=$dir` - if test "x$GCC_INCLUDES" != x && \ - test "$GCC_INCLUDES" != "$dir" && \ - test -d "$GCC_INCLUDES"; then - MKDEP_OPTIONS="$MKDEP_OPTIONS -I$GCC_INCLUDES" - fi - done -fi -AC_SUBST([MKDEP_OPTIONS]) - -dnl Make sure the pkg-config macros are defined -m4_ifndef([PKG_PROG_PKG_CONFIG], - [m4_fatal([Could not locate the pkg-config autoconf macros. - These are usually located in /usr/share/aclocal/pkg.m4. If your macros - are in a different location, try setting the environment variable - ACLOCAL="aclocal -I/other/macro/dir" before running autoreconf.])]) -PKG_PROG_PKG_CONFIG() - -dnl LIB_DIR - library basename -LIB_DIR=`echo $libdir | $SED 's%.*/%%'` -AC_SUBST([LIB_DIR]) - -dnl Cache LDFLAGS so we can add EXTRA_LIB_PATH and restore it later -_SAVE_LDFLAGS="$LDFLAGS" -AC_ARG_VAR([EXTRA_LIB_PATH],[Extra -L paths for the linker]) -AC_SUBST([EXTRA_LIB_PATH]) - -dnl Cache CPPFLAGS so we can add *_INCLUDES and restore it later -_SAVE_CPPFLAGS="$CPPFLAGS" -AC_ARG_VAR([X11_INCLUDES],[Extra -I paths for X11 headers]) -AC_SUBST([X11_INCLUDES]) - -dnl Compiler macros -DEFINES="" -AC_SUBST([DEFINES]) -case "$host_os" in -linux*|*-gnu*|gnu*) - DEFINES="$DEFINES -D_GNU_SOURCE -DPTHREADS" - ;; -solaris*) - DEFINES="$DEFINES -DPTHREADS -DSVR4" - ;; -cygwin*) - DEFINES="$DEFINES -DPTHREADS" - ;; -esac - -dnl Add flags for gcc and g++ -if test "x$GCC" = xyes; then - CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -std=c99" - if test "x$CLANG" = "xno"; then - CFLAGS="$CFLAGS -ffast-math" - fi - - # Enable -fvisibility=hidden if using a gcc that supports it - save_CFLAGS="$CFLAGS" - AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden]) - VISIBILITY_CFLAGS="-fvisibility=hidden" - CFLAGS="$CFLAGS $VISIBILITY_CFLAGS" - AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]), - [VISIBILITY_CFLAGS=""; AC_MSG_RESULT([no])]); - - # Restore CFLAGS; VISIBILITY_CFLAGS are added to it where needed. - CFLAGS=$save_CFLAGS - - # Work around aliasing bugs - developers should comment this out - CFLAGS="$CFLAGS -fno-strict-aliasing" -fi -if test "x$GXX" = xyes; then - CXXFLAGS="$CXXFLAGS -Wall" - - # Enable -fvisibility=hidden if using a gcc that supports it - save_CXXFLAGS="$CXXFLAGS" - AC_MSG_CHECKING([whether $CXX supports -fvisibility=hidden]) - VISIBILITY_CXXFLAGS="-fvisibility=hidden" - CXXFLAGS="$CXXFLAGS $VISIBILITY_CXXFLAGS" - AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]), - [VISIBILITY_CXXFLAGS="" ; AC_MSG_RESULT([no])]); - - # Restore CXXFLAGS; VISIBILITY_CXXFLAGS are added to it where needed. - CXXFLAGS=$save_CXXFLAGS - - # Work around aliasing bugs - developers should comment this out - CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" -fi - -AC_SUBST([VISIBILITY_CFLAGS]) -AC_SUBST([VISIBILITY_CXXFLAGS]) - -dnl These should be unnecessary, but let the user set them if they want -AC_ARG_VAR([OPT_FLAGS], [Additional optimization flags for the compiler. - Default is to use CFLAGS.]) -AC_ARG_VAR([ARCH_FLAGS], [Additional architecture specific flags for the - compiler. Default is to use CFLAGS.]) -AC_SUBST([OPT_FLAGS]) -AC_SUBST([ARCH_FLAGS]) - -dnl -dnl Hacks to enable 32 or 64 bit build -dnl -AC_ARG_ENABLE([32-bit], - [AS_HELP_STRING([--enable-32-bit], - [build 32-bit libraries @<:@default=auto@:>@])], - [enable_32bit="$enableval"], - [enable_32bit=auto] -) -if test "x$enable_32bit" = xyes; then - if test "x$GCC" = xyes; then - CFLAGS="$CFLAGS -m32" - ARCH_FLAGS="$ARCH_FLAGS -m32" - fi - if test "x$GXX" = xyes; then - CXXFLAGS="$CXXFLAGS -m32" - fi -fi -AC_ARG_ENABLE([64-bit], - [AS_HELP_STRING([--enable-64-bit], - [build 64-bit libraries @<:@default=auto@:>@])], - [enable_64bit="$enableval"], - [enable_64bit=auto] -) -if test "x$enable_64bit" = xyes; then - if test "x$GCC" = xyes; then - CFLAGS="$CFLAGS -m64" - fi - if test "x$GXX" = xyes; then - CXXFLAGS="$CXXFLAGS -m64" - fi -fi - -dnl -dnl shared/static libraries, mimic libtool options -dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static], - [build static libraries @<:@default=disabled@:>@])], - [enable_static="$enableval"], - [enable_static=no] -) -case "x$enable_static" in -xyes|xno ) ;; -x ) enable_static=no ;; -* ) - AC_MSG_ERROR([Static library option '$enable_static' is not a valid]) - ;; -esac -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--disable-shared], - [build shared libraries @<:@default=enabled@:>@])], - [enable_shared="$enableval"], - [enable_shared=yes] -) -case "x$enable_shared" in -xyes|xno ) ;; -x ) enable_shared=yes ;; -* ) - AC_MSG_ERROR([Shared library option '$enable_shared' is not a valid]) - ;; -esac - -dnl Can't have static and shared libraries, default to static if user -dnl explicitly requested. If both disabled, set to static since shared -dnl was explicitly requirested. -case "x$enable_static$enable_shared" in -xyesyes ) - AC_MSG_WARN([Can't build static and shared libraries, disabling shared]) - enable_shared=no - ;; -xnono ) - AC_MSG_WARN([Can't disable both static and shared libraries, enabling static]) - enable_static=yes - ;; -esac - -dnl -dnl mklib options -dnl -AC_ARG_VAR([MKLIB_OPTIONS],[Options for the Mesa library script, mklib]) -if test "$enable_static" = yes; then - MKLIB_OPTIONS="$MKLIB_OPTIONS -static" -fi -AC_SUBST([MKLIB_OPTIONS]) - -dnl -dnl other compiler options -dnl -AC_ARG_ENABLE([debug], - [AS_HELP_STRING([--enable-debug], - [use debug compiler flags and macros @<:@default=disabled@:>@])], - [enable_debug="$enableval"], - [enable_debug=no] -) -if test "x$enable_debug" = xyes; then - DEFINES="$DEFINES -DDEBUG" - if test "x$GCC" = xyes; then - CFLAGS="$CFLAGS -g" - fi - if test "x$GXX" = xyes; then - CXXFLAGS="$CXXFLAGS -g" - fi -fi - -dnl -dnl library names -dnl -LIB_PREFIX_GLOB='lib' -LIB_VERSION_SEPARATOR='.' -if test "$enable_static" = yes; then - LIB_EXTENSION='a' -else - case "$host_os" in - darwin* ) - LIB_EXTENSION='dylib' ;; - cygwin* ) - dnl prefix can be 'cyg' or 'lib' - LIB_PREFIX_GLOB='???' - LIB_VERSION_SEPARATOR='-' - LIB_EXTENSION='dll' ;; - aix* ) - LIB_EXTENSION='a' ;; - * ) - LIB_EXTENSION='so' ;; - esac -fi - -dnl -dnl potentially-infringing-but-nobody-knows-for-sure stuff -dnl -AC_ARG_ENABLE([texture-float], - [AS_HELP_STRING([--enable-texture-float], - [enable floating-point textures and renderbuffers @<:@default=disabled@:>@])], - [enable_texture_float="$enableval"], - [enable_texture_float=no] -) -if test "x$enable_texture_float" = xyes; then - AC_MSG_WARN([Floating-point textures enabled.]) - AC_MSG_WARN([Please consult docs/patents.txt with your lawyer before building Mesa.]) - DEFINES="$DEFINES -DTEXTURE_FLOAT_ENABLED" -fi - -GL_LIB_NAME='lib$(GL_LIB).'${LIB_EXTENSION} -GLU_LIB_NAME='lib$(GLU_LIB).'${LIB_EXTENSION} -GLUT_LIB_NAME='lib$(GLUT_LIB).'${LIB_EXTENSION} -GLW_LIB_NAME='lib$(GLW_LIB).'${LIB_EXTENSION} -OSMESA_LIB_NAME='lib$(OSMESA_LIB).'${LIB_EXTENSION} -EGL_LIB_NAME='lib$(EGL_LIB).'${LIB_EXTENSION} -GLESv1_CM_LIB_NAME='lib$(GLESv1_CM_LIB).'${LIB_EXTENSION} -GLESv2_LIB_NAME='lib$(GLESv2_LIB).'${LIB_EXTENSION} -VG_LIB_NAME='lib$(VG_LIB).'${LIB_EXTENSION} -GLAPI_LIB_NAME='lib$(GLAPI_LIB).'${LIB_EXTENSION} -WAYLAND_EGL_LIB_NAME='lib$(WAYLAND_EGL_LIB).'${LIB_EXTENSION} - -GL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' -GLU_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLU_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' -GLUT_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLUT_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' -GLW_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLW_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' -OSMESA_LIB_GLOB=${LIB_PREFIX_GLOB}'$(OSMESA_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' -EGL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(EGL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' -EGL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(EGL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' -GLESv1_CM_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLESv1_CM_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' -GLESv2_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLESv2_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' -VG_LIB_GLOB=${LIB_PREFIX_GLOB}'$(VG_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' -GLAPI_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLAPI_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' -WAYLAND_EGL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(WAYLAND_EGL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' - -AC_SUBST([GL_LIB_NAME]) -AC_SUBST([GLU_LIB_NAME]) -AC_SUBST([GLUT_LIB_NAME]) -AC_SUBST([GLW_LIB_NAME]) -AC_SUBST([OSMESA_LIB_NAME]) -AC_SUBST([EGL_LIB_NAME]) -AC_SUBST([GLESv1_CM_LIB_NAME]) -AC_SUBST([GLESv2_LIB_NAME]) -AC_SUBST([VG_LIB_NAME]) -AC_SUBST([GLAPI_LIB_NAME]) -AC_SUBST([WAYLAND_EGL_LIB_NAME]) - -AC_SUBST([GL_LIB_GLOB]) -AC_SUBST([GLU_LIB_GLOB]) -AC_SUBST([GLUT_LIB_GLOB]) -AC_SUBST([GLW_LIB_GLOB]) -AC_SUBST([OSMESA_LIB_GLOB]) -AC_SUBST([EGL_LIB_GLOB]) -AC_SUBST([GLESv1_CM_LIB_GLOB]) -AC_SUBST([GLESv2_LIB_GLOB]) -AC_SUBST([VG_LIB_GLOB]) -AC_SUBST([GLAPI_LIB_GLOB]) -AC_SUBST([WAYLAND_EGL_LIB_GLOB]) - -dnl -dnl Arch/platform-specific settings -dnl -AC_ARG_ENABLE([asm], - [AS_HELP_STRING([--disable-asm], - [disable assembly usage @<:@default=enabled on supported plaforms@:>@])], - [enable_asm="$enableval"], - [enable_asm=yes] -) -asm_arch="" -ASM_FLAGS="" -MESA_ASM_SOURCES="" -GLAPI_ASM_SOURCES="" -AC_MSG_CHECKING([whether to enable assembly]) -test "x$enable_asm" = xno && AC_MSG_RESULT([no]) -# disable if cross compiling on x86/x86_64 since we must run gen_matypes -if test "x$enable_asm" = xyes && test "x$cross_compiling" = xyes; then - case "$host_cpu" in - i?86 | x86_64) - enable_asm=no - AC_MSG_RESULT([no, cross compiling]) - ;; - esac -fi -# check for supported arches -if test "x$enable_asm" = xyes; then - case "$host_cpu" in - i?86) - case "$host_os" in - linux* | *freebsd* | dragonfly* | *netbsd*) - test "x$enable_64bit" = xyes && asm_arch=x86_64 || asm_arch=x86 - ;; - esac - ;; - x86_64) - case "$host_os" in - linux* | *freebsd* | dragonfly* | *netbsd*) - test "x$enable_32bit" = xyes && asm_arch=x86 || asm_arch=x86_64 - ;; - esac - ;; - powerpc) - case "$host_os" in - linux*) - asm_arch=ppc - ;; - esac - ;; - sparc*) - case "$host_os" in - linux*) - asm_arch=sparc - ;; - esac - ;; - esac - - case "$asm_arch" in - x86) - ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM" - MESA_ASM_SOURCES='$(X86_SOURCES)' - GLAPI_ASM_SOURCES='$(X86_API)' - AC_MSG_RESULT([yes, x86]) - ;; - x86_64) - ASM_FLAGS="-DUSE_X86_64_ASM" - MESA_ASM_SOURCES='$(X86-64_SOURCES)' - GLAPI_ASM_SOURCES='$(X86-64_API)' - AC_MSG_RESULT([yes, x86_64]) - ;; - ppc) - ASM_FLAGS="-DUSE_PPC_ASM -DUSE_VMX_ASM" - MESA_ASM_SOURCES='$(PPC_SOURCES)' - AC_MSG_RESULT([yes, ppc]) - ;; - sparc) - ASM_FLAGS="-DUSE_SPARC_ASM" - MESA_ASM_SOURCES='$(SPARC_SOURCES)' - GLAPI_ASM_SOURCES='$(SPARC_API)' - AC_MSG_RESULT([yes, sparc]) - ;; - *) - AC_MSG_RESULT([no, platform not supported]) - ;; - esac -fi -AC_SUBST([ASM_FLAGS]) -AC_SUBST([MESA_ASM_SOURCES]) -AC_SUBST([GLAPI_ASM_SOURCES]) - -dnl PIC code macro -MESA_PIC_FLAGS - -dnl Check to see if dlopen is in default libraries (like Solaris, which -dnl has it in libc), or if libdl is needed to get it. -AC_CHECK_FUNC([dlopen], [], - [AC_CHECK_LIB([dl], [dlopen], [DLOPEN_LIBS="-ldl"])]) -AC_SUBST([DLOPEN_LIBS]) - -dnl See if posix_memalign is available -AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"]) - -dnl SELinux awareness. -AC_ARG_ENABLE([selinux], - [AS_HELP_STRING([--enable-selinux], - [Build SELinux-aware Mesa @<:@default=disabled@:>@])], - [MESA_SELINUX="$enableval"], - [MESA_SELINUX=no]) -if test "x$enable_selinux" = "xyes"; then - AC_CHECK_HEADER([selinux/selinux.h],[], - [AC_MSG_ERROR([SELinux headers not found])]) - AC_CHECK_LIB([selinux],[is_selinux_enabled],[], - [AC_MSG_ERROR([SELinux library not found])]) - SELINUX_LIBS="-lselinux" - DEFINES="$DEFINES -DMESA_SELINUX" -fi - -dnl Determine which APIs to support -AC_ARG_ENABLE([opengl], - [AS_HELP_STRING([--disable-opengl], - [disable support for standard OpenGL API @<:@default=no@:>@])], - [enable_opengl="$enableval"], - [enable_opengl=yes]) -AC_ARG_ENABLE([gles1], - [AS_HELP_STRING([--enable-gles1], - [enable support for OpenGL ES 1.x API @<:@default=no@:>@])], - [enable_gles1="$enableval"], - [enable_gles1=no]) -AC_ARG_ENABLE([gles2], - [AS_HELP_STRING([--enable-gles2], - [enable support for OpenGL ES 2.x API @<:@default=no@:>@])], - [enable_gles2="$enableval"], - [enable_gles2=no]) -AC_ARG_ENABLE([gles-overlay], - [AS_HELP_STRING([--enable-gles-overlay], - [DEPRECATED. Same as --enable-gles1 and --enable-gles2])], - [enable_gles1="$enableval"; enable_gles2="$enableval"], - []) - -AC_ARG_ENABLE([openvg], - [AS_HELP_STRING([--enable-openvg], - [enable support for OpenVG API @<:@default=no@:>@])], - [enable_openvg="$enableval"], - [enable_openvg=no]) - -dnl smooth the transition; should be removed eventually -if test "x$enable_openvg" = xno; then - case "x$with_state_trackers" in - x*vega*) - AC_MSG_WARN([vega state tracker is enabled without --enable-openvg]) - enable_openvg=yes - ;; - esac -fi - -if test "x$enable_opengl" = xno -a \ - "x$enable_gles1" = xno -a \ - "x$enable_gles2" = xno -a \ - "x$enable_openvg" = xno; then - AC_MSG_ERROR([at least one API should be enabled]) -fi - -API_DEFINES="" -if test "x$enable_opengl" = xno; then - API_DEFINES="$API_DEFINES -DFEATURE_GL=0" -else - API_DEFINES="$API_DEFINES -DFEATURE_GL=1" -fi -if test "x$enable_gles1" = xyes; then - API_DEFINES="$API_DEFINES -DFEATURE_ES1=1" -fi -if test "x$enable_gles2" = xyes; then - API_DEFINES="$API_DEFINES -DFEATURE_ES2=1" -fi -AC_SUBST([API_DEFINES]) - -AC_ARG_ENABLE([shared-glapi], - [AS_HELP_STRING([--enable-shared-glapi], - [EXPERIMENTAL. Enable shared glapi for OpenGL @<:@default=no@:>@])], - [enable_shared_glapi="$enableval"], - [enable_shared_glapi=no]) - -SHARED_GLAPI="0" -if test "x$enable_shared_glapi" = xyes; then - SHARED_GLAPI="1" -fi -AC_SUBST([SHARED_GLAPI]) - -dnl -dnl Driver configuration. Options are xlib, dri and osmesa right now. -dnl More later: fbdev, ... -dnl -default_driver="xlib" - -case "$host_os" in -linux*) - case "$host_cpu" in - i*86|x86_64|powerpc*|sparc*) default_driver="dri";; - esac - ;; -*freebsd* | dragonfly* | *netbsd*) - case "$host_cpu" in - i*86|x86_64|powerpc*|sparc*) default_driver="dri";; - esac - ;; -esac - -if test "x$enable_opengl" = xno; then - default_driver="no" -fi - -AC_ARG_WITH([driver], - [AS_HELP_STRING([--with-driver=DRIVER], - [driver for Mesa: xlib,dri,osmesa @<:@default=dri when available, or xlib@:>@])], - [mesa_driver="$withval"], - [mesa_driver="$default_driver"]) -dnl Check for valid option -case "x$mesa_driver" in -xxlib|xdri|xosmesa) - if test "x$enable_opengl" = xno; then - AC_MSG_ERROR([Driver '$mesa_driver' requires OpenGL enabled]) - fi - ;; -xno) - ;; -*) - AC_MSG_ERROR([Driver '$mesa_driver' is not a valid option]) - ;; -esac - -dnl -dnl Driver specific build directories -dnl - -dnl this variable will be prepended to SRC_DIRS and is not exported -CORE_DIRS="" - -SRC_DIRS="" -GLU_DIRS="sgi" -GALLIUM_DIRS="auxiliary drivers state_trackers" -GALLIUM_TARGET_DIRS="" -GALLIUM_WINSYS_DIRS="sw" -GALLIUM_DRIVERS_DIRS="softpipe failover galahad trace rbug noop identity" -GALLIUM_STATE_TRACKERS_DIRS="" - -# build shared-glapi if enabled for OpenGL or if OpenGL ES is enabled -case "x$enable_shared_glapi$enable_gles1$enable_gles2" in -x*yes*) - CORE_DIRS="$CORE_DIRS mapi/shared-glapi" - ;; -esac - -# build glapi if OpenGL is enabled -if test "x$enable_opengl" = xyes; then - CORE_DIRS="$CORE_DIRS mapi/glapi" -fi - -# build es1api if OpenGL ES 1.x is enabled -if test "x$enable_gles1" = xyes; then - CORE_DIRS="$CORE_DIRS mapi/es1api" -fi - -# build es2api if OpenGL ES 2.x is enabled -if test "x$enable_gles2" = xyes; then - CORE_DIRS="$CORE_DIRS mapi/es2api" -fi - -# build vgapi if OpenVG is enabled -if test "x$enable_openvg" = xyes; then - CORE_DIRS="$CORE_DIRS mapi/vgapi" -fi - -# build glsl and mesa if OpenGL or OpenGL ES is enabled -case "x$enable_opengl$enable_gles1$enable_gles2" in -x*yes*) - CORE_DIRS="$CORE_DIRS glsl mesa" - ;; -esac - -case "$mesa_driver" in -xlib) - DRIVER_DIRS="x11" - GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib" - GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS libgl-xlib" - ;; -dri) - SRC_DIRS="$SRC_DIRS glx" - DRIVER_DIRS="dri" - GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib sw/dri" - ;; -osmesa) - DRIVER_DIRS="osmesa" - ;; -no) - DRIVER_DRIS="" - ;; -esac -AC_SUBST([SRC_DIRS]) -AC_SUBST([GLU_DIRS]) -AC_SUBST([DRIVER_DIRS]) -AC_SUBST([GALLIUM_DIRS]) -AC_SUBST([GALLIUM_TARGET_DIRS]) -AC_SUBST([GALLIUM_WINSYS_DIRS]) -AC_SUBST([GALLIUM_DRIVERS_DIRS]) -AC_SUBST([GALLIUM_STATE_TRACKERS_DIRS]) -AC_SUBST([MESA_LLVM]) - -dnl -dnl Find out if X is available. The variable have_x is set if libX11 is -dnl found to mimic AC_PATH_XTRA. -dnl -if test -n "$PKG_CONFIG"; then - AC_MSG_CHECKING([pkg-config files for X11 are available]) - PKG_CHECK_EXISTS([x11],[ - x11_pkgconfig=yes - have_x=yes - ],[ - x11_pkgconfig=no - ]) - AC_MSG_RESULT([$x11_pkgconfig]) -else - x11_pkgconfig=no -fi -dnl Use the autoconf macro if no pkg-config files -if test "$x11_pkgconfig" = yes; then - PKG_CHECK_MODULES([X11], [x11]) -else - AC_PATH_XTRA - test -z "$X11_CFLAGS" && X11_CFLAGS="$X_CFLAGS" - test -z "$X11_LIBS" && X11_LIBS="$X_LIBS -lX11" - AC_SUBST([X11_CFLAGS]) - AC_SUBST([X11_LIBS]) -fi - -dnl Try to tell the user that the --x-* options are only used when -dnl pkg-config is not available. This must be right after AC_PATH_XTRA. -m4_divert_once([HELP_BEGIN], -[These options are only used when the X libraries cannot be found by the -pkg-config utility.]) - -dnl We need X for xlib and dri, so bomb now if it's not found -case "$mesa_driver" in -xlib|dri) - if test "$no_x" = yes; then - AC_MSG_ERROR([X11 development libraries needed for $mesa_driver driver]) - fi - ;; -esac - -dnl XCB - this is only used for GLX right now -AC_ARG_ENABLE([xcb], - [AS_HELP_STRING([--enable-xcb], - [use XCB for GLX @<:@default=disabled@:>@])], - [enable_xcb="$enableval"], - [enable_xcb=no]) -if test "x$enable_xcb" = xyes; then - DEFINES="$DEFINES -DUSE_XCB" -else - enable_xcb=no -fi - -dnl Direct rendering or just indirect rendering -case "$host_os" in -gnu*) - dnl Disable by default on GNU/Hurd - driglx_direct_default="no" - ;; -cygwin*) - dnl Disable by default on cygwin - driglx_direct_default="no" - ;; -*) - driglx_direct_default="yes" - ;; -esac -AC_ARG_ENABLE([driglx-direct], - [AS_HELP_STRING([--disable-driglx-direct], - [enable direct rendering in GLX and EGL for DRI \ - @<:@default=auto@:>@])], - [driglx_direct="$enableval"], - [driglx_direct="$driglx_direct_default"]) - -dnl -dnl libGL configuration per driver -dnl -case "$mesa_driver" in -xlib) - if test "$x11_pkgconfig" = yes; then - PKG_CHECK_MODULES([XLIBGL], [x11 xext]) - GL_PC_REQ_PRIV="x11 xext" - X11_INCLUDES="$X11_INCLUDES $XLIBGL_CFLAGS" - GL_LIB_DEPS="$XLIBGL_LIBS" - else - # should check these... - X11_INCLUDES="$X11_INCLUDES $X_CFLAGS" - GL_LIB_DEPS="$X_LIBS -lX11 -lXext" - GL_PC_LIB_PRIV="$GL_LIB_DEPS" - GL_PC_CFLAGS="$X11_INCLUDES" - fi - GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread" - GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread" - - # if static, move the external libraries to the programs - # and empty the libraries for libGL - if test "$enable_static" = yes; then - APP_LIB_DEPS="$APP_LIB_DEPS $GL_LIB_DEPS" - GL_LIB_DEPS="" - fi - ;; -dri|no) # these checks are still desired when there is no mesa_driver - # DRI must be shared, I think - if test "$enable_static" = yes; then - AC_MSG_ERROR([Can't use static libraries for DRI drivers]) - fi - - PKG_CHECK_MODULES([GLPROTO], [glproto >= $GLPROTO_REQUIRED]) - GL_PC_REQ_PRIV="glproto >= $GLPROTO_REQUIRED" - DRI_PC_REQ_PRIV="" - - if test x"$driglx_direct" = xyes; then - # Check for libdrm - PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED]) - PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED]) - GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED" - DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED" - fi - - # find the DRI deps for libGL - if test "$x11_pkgconfig" = yes; then - dri_modules="x11 xext xdamage xfixes" - - # add xf86vidmode if available - PKG_CHECK_MODULES([XF86VIDMODE], [xxf86vm], HAVE_XF86VIDMODE=yes, HAVE_XF86VIDMODE=no) - if test "$HAVE_XF86VIDMODE" = yes ; then - dri_modules="$dri_modules xxf86vm" - fi - - # add xcb modules if necessary - if test "$enable_xcb" = yes; then - dri_modules="$dri_modules x11-xcb xcb-glx" - fi - - PKG_CHECK_MODULES([DRIGL], [$dri_modules]) - GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV $dri_modules" - X11_INCLUDES="$X11_INCLUDES $DRIGL_CFLAGS" - GL_LIB_DEPS="$DRIGL_LIBS" - else - # should check these... - X11_INCLUDES="$X11_INCLUDES $X_CFLAGS" - GL_LIB_DEPS="$X_LIBS -lX11 -lXext -lXxf86vm -lXdamage -lXfixes" - GL_PC_LIB_PRIV="$GL_LIB_DEPS" - GL_PC_CFLAGS="$X11_INCLUDES" - - # XCB can only be used from pkg-config - if test "$enable_xcb" = yes; then - PKG_CHECK_MODULES([XCB],[x11-xcb xcb-glx]) - GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV x11-xcb xcb-glx" - X11_INCLUDES="$X11_INCLUDES $XCB_CFLAGS" - GL_LIB_DEPS="$GL_LIB_DEPS $XCB_LIBS" - fi - fi - - # need DRM libs, -lpthread, etc. - GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS" - GL_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS" - GLESv1_CM_LIB_DEPS="$LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS" - GLESv1_CM_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS" - GLESv2_LIB_DEPS="$LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS" - GLESv2_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS" - ;; -osmesa) - # No libGL for osmesa - GL_LIB_DEPS="" - ;; -esac -AC_SUBST([GL_LIB_DEPS]) -AC_SUBST([GL_PC_REQ_PRIV]) -AC_SUBST([GL_PC_LIB_PRIV]) -AC_SUBST([GL_PC_CFLAGS]) -AC_SUBST([DRI_PC_REQ_PRIV]) -AC_SUBST([GLESv1_CM_LIB_DEPS]) -AC_SUBST([GLESv1_CM_PC_LIB_PRIV]) -AC_SUBST([GLESv2_LIB_DEPS]) -AC_SUBST([GLESv2_PC_LIB_PRIV]) - -GLAPI_LIB_DEPS="-lpthread" -AC_SUBST([GLAPI_LIB_DEPS]) - - -dnl Setup default DRI CFLAGS -DRI_CFLAGS='$(CFLAGS)' -DRI_CXXFLAGS='$(CXXFLAGS)' -DRI_LIB_DEPS='$(TOP)/src/mesa/libmesa.a' -MESA_MODULES='$(TOP)/src/mesa/libmesa.a' - -AC_ARG_ENABLE([shared-dricore], - [AS_HELP_STRING([--enable-shared-dricore], - [link DRI modules with shared core DRI routines @<:@default=disabled@:>@])], - [enable_dricore="$enableval"], - [enable_dricore=no]) -if test "$mesa_driver" = dri ; then - if test "$enable_dricore" = yes ; then - if test "$GCC$GXX" != yesyes ; then - AC_MSG_WARN([Shared dricore requires GCC-compatible rpath handling. Disabling shared dricore]) - enable_dricore=no - else - DRICORE_GLSL_LIBS='$(TOP)/$(LIB_DIR)/libglsl.so' - DRICORE_LIBS='$(TOP)/$(LIB_DIR)/libdricore.so' - DRICORE_LIB_DEPS='-L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -lglsl' - DRI_LIB_DEPS='-L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -ldricore -lglsl' - DRI_CFLAGS='$(CFLAGS_NOVISIBILITY) -DUSE_DRICORE' - DRI_CXXFLAGS='$(CXXFLAGS_NOVISIBILITY) -DUSE_DRICORE' - MESA_MODULES='$(DRICORE_LIBS) $(DRICORE_GLSL_LIBS)' - fi - fi -fi -AC_SUBST([DRICORE_LIBS]) -AC_SUBST([DRICORE_GLSL_LIBS]) -AC_SUBST([DRICORE_LIB_DEPS]) -AC_SUBST([DRI_CXXFLAGS]) -AC_SUBST([DRI_CFLAGS]) -AC_SUBST([MESA_MODULES]) - -AC_SUBST([HAVE_XF86VIDMODE]) - -PKG_CHECK_MODULES([LIBDRM_RADEON], - [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED], - HAVE_LIBDRM_RADEON=yes, - HAVE_LIBDRM_RADEON=no) - -dnl -dnl More X11 setup -dnl -if test "$mesa_driver" = xlib; then - DEFINES="$DEFINES -DUSE_XSHM" -fi - -dnl -dnl TLS detection -dnl - -AC_ARG_ENABLE([glx-tls], - [AS_HELP_STRING([--enable-glx-tls], - [enable TLS support in GLX @<:@default=disabled@:>@])], - [GLX_USE_TLS="$enableval"], - [GLX_USE_TLS=no]) -AC_SUBST(GLX_TLS, ${GLX_USE_TLS}) - -AS_IF([test "x$GLX_USE_TLS" = xyes], - [DEFINES="${DEFINES} -DGLX_USE_TLS -DPTHREADS"]) - -dnl -dnl More DRI setup -dnl -dnl Directory for DRI drivers -AC_ARG_WITH([dri-driverdir], - [AS_HELP_STRING([--with-dri-driverdir=DIR], - [directory for the DRI drivers @<:@${libdir}/dri@:>@])], - [DRI_DRIVER_INSTALL_DIR="$withval"], - [DRI_DRIVER_INSTALL_DIR='${libdir}/dri']) -AC_SUBST([DRI_DRIVER_INSTALL_DIR]) -dnl Extra search path for DRI drivers -AC_ARG_WITH([dri-searchpath], - [AS_HELP_STRING([--with-dri-searchpath=DIRS...], - [semicolon delimited DRI driver search directories @<:@${libdir}/dri@:>@])], - [DRI_DRIVER_SEARCH_DIR="$withval"], - [DRI_DRIVER_SEARCH_DIR='${DRI_DRIVER_INSTALL_DIR}']) -AC_SUBST([DRI_DRIVER_SEARCH_DIR]) -dnl Which drivers to build - default is chosen by platform -AC_ARG_WITH([dri-drivers], - [AS_HELP_STRING([--with-dri-drivers@<:@=DIRS...@:>@], - [comma delimited DRI drivers list, e.g. - "swrast,i965,radeon" @<:@default=auto@:>@])], - [with_dri_drivers="$withval"], - [with_dri_drivers=yes]) -if test "x$with_dri_drivers" = x; then - with_dri_drivers=no -fi - -dnl If $with_dri_drivers is yes, directories will be added through -dnl platform checks -DRI_DIRS="" -case "$with_dri_drivers" in -no) ;; -yes) - DRI_DIRS="yes" - ;; -*) - # verify the requested driver directories exist - dri_drivers=`IFS=', '; echo $with_dri_drivers` - for driver in $dri_drivers; do - test -d "$srcdir/src/mesa/drivers/dri/$driver" || \ - AC_MSG_ERROR([DRI driver directory '$driver' doesn't exist]) - done - DRI_DIRS="$dri_drivers" - ;; -esac - -dnl Set DRI_DIRS, DEFINES and LIB_DEPS -if test "$mesa_driver" = dri -o "$mesa_driver" = no; then - # Platform specific settings and drivers to build - case "$host_os" in - linux*) - DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" - if test "x$driglx_direct" = xyes; then - DEFINES="$DEFINES -DGLX_DIRECT_RENDERING" - fi - DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS" - - case "$host_cpu" in - x86_64) - # sis is missing because they have not be converted to use - # the new interface. i810 are missing because there is no - # x86-64 system where they could *ever* be used. - if test "x$DRI_DIRS" = "xyes"; then - DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 r600 radeon \ - savage tdfx unichrome swrast" - fi - ;; - powerpc*) - # Build only the drivers for cards that exist on PowerPC. - # At some point MGA will be added, but not yet. - if test "x$DRI_DIRS" = "xyes"; then - DRI_DIRS="mach64 r128 r200 r300 r600 radeon tdfx swrast" - fi - ;; - sparc*) - # Build only the drivers for cards that exist on sparc` - if test "x$DRI_DIRS" = "xyes"; then - DRI_DIRS="mach64 r128 r200 r300 r600 radeon swrast" - fi - ;; - esac - ;; - freebsd* | dragonfly* | *netbsd*) - DEFINES="$DEFINES -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1" - DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS" - DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING" - if test "x$driglx_direct" = xyes; then - DEFINES="$DEFINES -DGLX_DIRECT_RENDERING" - fi - - if test "x$DRI_DIRS" = "xyes"; then - DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \ - unichrome savage sis swrast" - fi - ;; - gnu*) - DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" - DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS" - ;; - solaris*) - DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" - DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING" - if test "x$driglx_direct" = xyes; then - DEFINES="$DEFINES -DGLX_DIRECT_RENDERING" - fi - ;; - cygwin*) - DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" - DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING" - if test "x$driglx_direct" = xyes; then - DEFINES="$DEFINES -DGLX_DIRECT_RENDERING" - fi - if test "x$DRI_DIRS" = "xyes"; then - DRI_DIRS="swrast" - fi - ;; - esac - - # default drivers - if test "x$DRI_DIRS" = "xyes"; then - DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon \ - savage sis tdfx unichrome swrast" - fi - - DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'` - - # Check for expat - if test "$mesa_driver" = dri; then - EXPAT_INCLUDES="" - EXPAT_LIB=-lexpat - AC_ARG_WITH([expat], - [AS_HELP_STRING([--with-expat=DIR], - [expat install directory])],[ - EXPAT_INCLUDES="-I$withval/include" - CPPFLAGS="$CPPFLAGS $EXPAT_INCLUDES" - LDFLAGS="$LDFLAGS -L$withval/$LIB_DIR" - EXPAT_LIB="-L$withval/$LIB_DIR -lexpat" - ]) - AC_CHECK_HEADER([expat.h],[],[AC_MSG_ERROR([Expat required for DRI.])]) - AC_CHECK_LIB([expat],[XML_ParserCreate],[], - [AC_MSG_ERROR([Expat required for DRI.])]) - fi - - # put all the necessary libs together, including possibly libdricore - DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm -lpthread $DLOPEN_LIBS" -fi -AC_SUBST([DRI_DIRS]) -AC_SUBST([EXPAT_INCLUDES]) -AC_SUBST([DRI_LIB_DEPS]) - -case $DRI_DIRS in -*i915*|*i965*) - PKG_CHECK_MODULES([INTEL], [libdrm_intel >= $LIBDRM_INTEL_REQUIRED]) - ;; -esac - -case $DRI_DIRS in -*radeon*|*r200*|*r300*|*r600*) - if test "x$HAVE_LIBDRM_RADEON" = xyes; then - RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS" - RADEON_LDFLAGS=$LIBDRM_RADEON_LIBS - fi - ;; -esac -AC_SUBST([RADEON_CFLAGS]) -AC_SUBST([RADEON_LDFLAGS]) - - -dnl -dnl OSMesa configuration -dnl -if test "$mesa_driver" = xlib; then - default_gl_osmesa=yes -else - default_gl_osmesa=no -fi -AC_ARG_ENABLE([gl-osmesa], - [AS_HELP_STRING([--enable-gl-osmesa], - [enable OSMesa with libGL @<:@default=enabled for xlib driver@:>@])], - [gl_osmesa="$enableval"], - [gl_osmesa="$default_gl_osmesa"]) -if test "x$gl_osmesa" = xyes; then - if test "x$enable_opengl" = xno; then - AC_MSG_ERROR([OpenGL is not available for OSMesa driver]) - fi - if test "$mesa_driver" = osmesa; then - AC_MSG_ERROR([libGL is not available for OSMesa driver]) - else - DRIVER_DIRS="$DRIVER_DIRS osmesa" - fi -fi - -dnl Configure the channel bits for OSMesa (libOSMesa, libOSMesa16, ...) -AC_ARG_WITH([osmesa-bits], - [AS_HELP_STRING([--with-osmesa-bits=BITS], - [OSMesa channel bits and library name: 8, 16, 32 @<:@default=8@:>@])], - [osmesa_bits="$withval"], - [osmesa_bits=8]) -if test "$mesa_driver" != osmesa && test "x$osmesa_bits" != x8; then - AC_MSG_WARN([Ignoring OSMesa channel bits for non-OSMesa driver]) - osmesa_bits=8 -fi -case "x$osmesa_bits" in -x8) - OSMESA_LIB=OSMesa - ;; -x16|x32) - OSMESA_LIB="OSMesa$osmesa_bits" - DEFINES="$DEFINES -DCHAN_BITS=$osmesa_bits -DDEFAULT_SOFTWARE_DEPTH_BITS=31" - ;; -*) - AC_MSG_ERROR([OSMesa bits '$osmesa_bits' is not a valid option]) - ;; -esac -AC_SUBST([OSMESA_LIB]) - -case "$DRIVER_DIRS" in -*osmesa*) - # only link libraries with osmesa if shared - if test "$enable_static" = no; then - OSMESA_LIB_DEPS="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS" - else - OSMESA_LIB_DEPS="" - fi - OSMESA_MESA_DEPS="" - OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS" - ;; -esac -AC_SUBST([OSMESA_LIB_DEPS]) -AC_SUBST([OSMESA_MESA_DEPS]) -AC_SUBST([OSMESA_PC_REQ]) -AC_SUBST([OSMESA_PC_LIB_PRIV]) - -dnl -dnl EGL configuration -dnl -AC_ARG_ENABLE([egl], - [AS_HELP_STRING([--disable-egl], - [disable EGL library @<:@default=enabled@:>@])], - [enable_egl="$enableval"], - [enable_egl=yes]) -if test "x$enable_egl" = xno; then - if test "x$mesa_driver" = xno; then - AC_MSG_ERROR([cannot disable EGL when there is no mesa driver]) - fi - if test "x$enable_openvg" = xyes; then - AC_MSG_ERROR([cannot enable OpenVG without EGL]) - fi -fi -if test "x$enable_egl" = xyes; then - SRC_DIRS="$SRC_DIRS egl" - EGL_LIB_DEPS="$DLOPEN_LIBS -lpthread" - EGL_DRIVERS_DIRS="" - if test "$enable_static" != yes; then - # build egl_glx when libGL is built - if test "$mesa_driver" = xlib -o "$mesa_driver" = dri; then - EGL_DRIVERS_DIRS="glx" - fi - - PKG_CHECK_MODULES([LIBUDEV], [libudev > 150], - [have_libudev=yes],[have_libudev=no]) - if test "$mesa_driver" = dri; then - # build egl_dri2 when xcb-dri2 is available - PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb-dri2 xcb-xfixes], - [have_xcb_dri2=yes],[have_xcb_dri2=no]) - - if test "$have_xcb_dri2" = yes; then - EGL_DRIVER_DRI2=dri2 - DEFINES="$DEFINES -DHAVE_XCB_DRI2" - if test "$have_libudev" = yes; then - DEFINES="$DEFINES -DHAVE_LIBUDEV" - fi - # workaround a bug in xcb-dri2 generated by xcb-proto 1.6 - AC_CHECK_LIB(xcb-dri2, xcb_dri2_connect_alignment_pad, [], - [DEFINES="$DEFINES -DXCB_DRI2_CONNECT_DEVICE_NAME_BROKEN"]) - fi - fi - - EGL_DRIVERS_DIRS="$EGL_DRIVERS_DIRS $EGL_DRIVER_DRI2" - fi -fi -AC_SUBST([EGL_LIB_DEPS]) -AC_SUBST([EGL_DRIVERS_DIRS]) - -dnl -dnl GLU configuration -dnl -AC_ARG_ENABLE([glu], - [AS_HELP_STRING([--disable-glu], - [enable OpenGL Utility library @<:@default=enabled@:>@])], - [enable_glu="$enableval"], - [enable_glu=yes]) - -if test "x$enable_glu" = xyes -a "x$mesa_driver" = xno; then - AC_MSG_NOTICE([Disabling GLU since there is no OpenGL driver]) - enable_glu=no -fi - -if test "x$enable_glu" = xyes; then - SRC_DIRS="$SRC_DIRS glu" - - case "$mesa_driver" in - osmesa) - # Link libGLU to libOSMesa instead of libGL - GLU_LIB_DEPS="" - GLU_PC_REQ="osmesa" - if test "$enable_static" = no; then - GLU_MESA_DEPS='-l$(OSMESA_LIB)' - else - GLU_MESA_DEPS="" - fi - ;; - *) - # If static, empty GLU_LIB_DEPS and add libs for programs to link - GLU_PC_REQ="gl" - GLU_PC_LIB_PRIV="-lm" - if test "$enable_static" = no; then - GLU_LIB_DEPS="-lm" - GLU_MESA_DEPS='-l$(GL_LIB)' - else - GLU_LIB_DEPS="" - GLU_MESA_DEPS="" - APP_LIB_DEPS="$APP_LIB_DEPS -lstdc++" - fi - ;; - esac -fi -if test "$enable_static" = no; then - GLU_LIB_DEPS="$GLU_LIB_DEPS $OS_CPLUSPLUS_LIBS" -fi -GLU_PC_LIB_PRIV="$GLU_PC_LIB_PRIV $OS_CPLUSPLUS_LIBS" -AC_SUBST([GLU_LIB_DEPS]) -AC_SUBST([GLU_MESA_DEPS]) -AC_SUBST([GLU_PC_REQ]) -AC_SUBST([GLU_PC_REQ_PRIV]) -AC_SUBST([GLU_PC_LIB_PRIV]) -AC_SUBST([GLU_PC_CFLAGS]) - -dnl -dnl GLw configuration -dnl -AC_ARG_ENABLE([glw], - [AS_HELP_STRING([--disable-glw], - [enable Xt/Motif widget library @<:@default=enabled@:>@])], - [enable_glw="$enableval"], - [enable_glw=yes]) -dnl Don't build GLw on osmesa -if test "x$enable_glw" = xyes; then - case "$mesa_driver" in - osmesa|no) - AC_MSG_NOTICE([Disabling GLw since there is no OpenGL driver]) - enable_glw=no - ;; - esac -fi -AC_ARG_ENABLE([motif], - [AS_HELP_STRING([--enable-motif], - [use Motif widgets in GLw @<:@default=disabled@:>@])], - [enable_motif="$enableval"], - [enable_motif=no]) - -if test "x$enable_glw" = xyes; then - SRC_DIRS="$SRC_DIRS glw" - if test "$x11_pkgconfig" = yes; then - PKG_CHECK_MODULES([GLW],[x11 xt]) - GLW_PC_REQ_PRIV="x11 xt" - GLW_LIB_DEPS="$GLW_LIBS" - else - # should check these... - GLW_LIB_DEPS="$X_LIBS -lXt -lX11" - GLW_PC_LIB_PRIV="$GLW_LIB_DEPS" - GLW_PC_CFLAGS="$X11_INCLUDES" - fi - - GLW_SOURCES="GLwDrawA.c" - MOTIF_CFLAGS= - if test "x$enable_motif" = xyes; then - GLW_SOURCES="$GLW_SOURCES GLwMDrawA.c" - AC_PATH_PROG([MOTIF_CONFIG], [motif-config], [no]) - if test "x$MOTIF_CONFIG" != xno; then - MOTIF_CFLAGS=`$MOTIF_CONFIG --cflags` - MOTIF_LIBS=`$MOTIF_CONFIG --libs` - else - AC_CHECK_HEADER([Xm/PrimitiveP.h], [], - [AC_MSG_ERROR([Can't locate Motif headers])]) - AC_CHECK_LIB([Xm], [XmGetPixmap], [MOTIF_LIBS="-lXm"], - [AC_MSG_ERROR([Can't locate Motif Xm library])]) - fi - # MOTIF_LIBS is prepended to GLW_LIB_DEPS since Xm needs Xt/X11 - GLW_LIB_DEPS="$MOTIF_LIBS $GLW_LIB_DEPS" - GLW_PC_LIB_PRIV="$MOTIF_LIBS $GLW_PC_LIB_PRIV" - GLW_PC_CFLAGS="$MOTIF_CFLAGS $GLW_PC_CFLAGS" - fi - - # If static, empty GLW_LIB_DEPS and add libs for programs to link - GLW_PC_LIB_PRIV="$GLW_PC_LIB_PRIV" - if test "$enable_static" = no; then - GLW_MESA_DEPS='-l$(GL_LIB)' - GLW_LIB_DEPS="$GLW_LIB_DEPS" - else - APP_LIB_DEPS="$APP_LIB_DEPS $GLW_LIB_DEPS" - GLW_LIB_DEPS="" - GLW_MESA_DEPS="" - fi -fi -AC_SUBST([GLW_LIB_DEPS]) -AC_SUBST([GLW_MESA_DEPS]) -AC_SUBST([GLW_SOURCES]) -AC_SUBST([MOTIF_CFLAGS]) -AC_SUBST([GLW_PC_REQ_PRIV]) -AC_SUBST([GLW_PC_LIB_PRIV]) -AC_SUBST([GLW_PC_CFLAGS]) - -dnl -dnl GLUT configuration -dnl -if test -f "$srcdir/include/GL/glut.h"; then - default_glut=yes -else - default_glut=no -fi -AC_ARG_ENABLE([glut], - [AS_HELP_STRING([--disable-glut], - [enable GLUT library @<:@default=enabled if source available@:>@])], - [enable_glut="$enableval"], - [enable_glut="$default_glut"]) - -dnl Don't build glut on osmesa -if test "x$enable_glut" = xyes; then - case "$mesa_driver" in - osmesa|no) - AC_MSG_NOTICE([Disabling glut since there is no OpenGL driver]) - enable_glut=no - ;; - esac -fi -dnl Can't build glut if GLU not available -if test "x$enable_glu$enable_glut" = xnoyes; then - AC_MSG_WARN([Disabling glut since GLU is disabled]) - enable_glut=no -fi - -if test "x$enable_glut" = xyes; then - SRC_DIRS="$SRC_DIRS glut/glx" - if test "$x11_pkgconfig" = yes; then - PKG_CHECK_MODULES([GLUT],[x11 xmu xi]) - GLUT_PC_REQ_PRIV="x11 xmu xi" - GLUT_LIB_DEPS="$GLUT_LIBS" - else - # should check these... - GLUT_LIB_DEPS="$X_LIBS -lX11 -lXmu -lXi" - GLUT_PC_LIB_PRIV="$GLUT_LIB_DEPS" - GLUT_PC_CFLAGS="$X11_INCLUDES" - fi - if test "x$GCC" = xyes; then - GLUT_CFLAGS="$GLUT_CFLAGS -fexceptions" - fi - GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm" - GLUT_PC_LIB_PRIV="$GLUT_PC_LIB_PRIV -lm" - - # If static, empty GLUT_LIB_DEPS and add libs for programs to link - if test "$enable_static" = no; then - GLUT_MESA_DEPS='-l$(GLU_LIB) -l$(GL_LIB)' - else - APP_LIB_DEPS="$APP_LIB_DEPS $GLUT_LIB_DEPS" - GLUT_LIB_DEPS="" - GLUT_MESA_DEPS="" - fi -fi -AC_SUBST([GLUT_LIB_DEPS]) -AC_SUBST([GLUT_MESA_DEPS]) -AC_SUBST([GLUT_CFLAGS]) -AC_SUBST([GLUT_PC_REQ_PRIV]) -AC_SUBST([GLUT_PC_LIB_PRIV]) -AC_SUBST([GLUT_PC_CFLAGS]) - -dnl -dnl Program library dependencies -dnl Only libm is added here if necessary as the libraries should -dnl be pulled in by the linker -dnl -if test "x$APP_LIB_DEPS" = x; then - case "$host_os" in - solaris*) - APP_LIB_DEPS="-lX11 -lsocket -lnsl -lm" - ;; - cygwin*) - APP_LIB_DEPS="-lX11" - ;; - *) - APP_LIB_DEPS="-lm" - ;; - esac -fi -AC_SUBST([APP_LIB_DEPS]) -AC_SUBST([PROGRAM_DIRS]) - -dnl -dnl Gallium configuration -dnl -AC_ARG_ENABLE([gallium], - [AS_HELP_STRING([--disable-gallium], - [build gallium @<:@default=enabled@:>@])], - [enable_gallium="$enableval"], - [enable_gallium=yes]) -if test "x$enable_gallium" = xno -a "x$enable_openvg" = xyes; then - AC_MSG_ERROR([cannot enable OpenVG without Gallium]) -fi -if test "x$enable_gallium" = xyes; then - SRC_DIRS="$SRC_DIRS gallium gallium/winsys gallium/targets" - AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no]) -fi - -AC_SUBST([LLVM_CFLAGS]) -AC_SUBST([LLVM_LIBS]) -AC_SUBST([LLVM_LDFLAGS]) -AC_SUBST([LLVM_VERSION]) - -dnl -dnl Gallium state trackers configuration -dnl - -AC_ARG_ENABLE([gallium-egl], - [AS_HELP_STRING([--enable-gallium-egl], - [enable gallium EGL state tracker @<:@default=auto@:>@])], - [enable_gallium_egl="$enableval"], - [enable_gallium_egl=auto]) -if test "x$enable_gallium_egl" = xauto; then - case "$mesa_driver" in - dri|no) - enable_gallium_egl=$enable_egl - ;; - *) - enable_gallium_egl=$enable_openvg - ;; - esac -fi -case "x$enable_egl$enable_gallium_egl" in -xnoyes) - AC_MSG_ERROR([cannot build Gallium EGL state tracker without EGL]) -esac - -AC_ARG_WITH([state-trackers], - [AS_HELP_STRING([--with-state-trackers@<:@=DIRS...@:>@], - [comma delimited state_trackers list, e.g. - "egl,glx" @<:@default=auto@:>@])], - [with_state_trackers="$withval"], - [with_state_trackers=yes]) - -case "$with_state_trackers" in -no) - GALLIUM_STATE_TRACKERS_DIRS="" - ;; -yes) - # look at what else is built - case "$mesa_driver" in - xlib) - GALLIUM_STATE_TRACKERS_DIRS=glx - ;; - dri) - GALLIUM_STATE_TRACKERS_DIRS="dri" - HAVE_ST_DRI="yes" - # Have only tested st/xorg on 1.6.0 servers - PKG_CHECK_MODULES(XORG, [xorg-server >= 1.6.0 libdrm >= $LIBDRM_XORG_REQUIRED libkms >= $LIBKMS_XORG_REQUIRED], - HAVE_ST_XORG="yes"; GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS xorg", - HAVE_ST_XORG="no") - ;; - esac - - if test "x$enable_egl" = xyes; then - if test "$enable_openvg" = yes; then - GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS vega" - st_egl="yes" - fi - - if test "$enable_gallium_egl" = yes; then - GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS egl" - HAVE_ST_EGL="yes" - fi - fi - ;; -*) - # verify the requested state tracker exist - state_trackers="" - _state_trackers=`IFS=', '; echo $with_state_trackers` - for tracker in $_state_trackers; do - case "$tracker" in - dri) - if test "x$mesa_driver" != xdri; then - AC_MSG_ERROR([cannot build dri state tracker without mesa driver set to dri]) - fi - HAVE_ST_DRI="yes" - ;; - egl) - if test "x$enable_egl" != xyes; then - AC_MSG_ERROR([cannot build egl state tracker without EGL library]) - fi - HAVE_ST_EGL="yes" - ;; - xorg) - PKG_CHECK_MODULES([XORG], [xorg-server >= 1.6.0]) - PKG_CHECK_MODULES([LIBDRM_XORG], [libdrm >= $LIBDRM_XORG_REQUIRED]) - PKG_CHECK_MODULES([LIBKMS_XORG], [libkms >= $LIBKMS_XORG_REQUIRED]) - HAVE_ST_XORG="yes" - ;; - vega) - if test "x$enable_openvg" != xyes; then - AC_MSG_ERROR([cannot build vega state tracker without --enable-openvg]) - fi - have_st_vega="yes" - ;; - esac - - if test -n "$tracker"; then - test -d "$srcdir/src/gallium/state_trackers/$tracker" || \ - AC_MSG_ERROR([state tracker '$tracker' doesn't exist]) - if test -n "$state_trackers"; then - state_trackers="$state_trackers $tracker" - else - state_trackers="$tracker" - fi - fi - done - GALLIUM_STATE_TRACKERS_DIRS="$state_trackers" - - # append --enable-openvg/--enable-gallium-egl to --with-state-trackers - if test "x$have_st_vega" != xyes -a "x$enable_openvg" = xyes; then - AC_MSG_ERROR([--with-state-trackers specified but vega is missing]) - fi - if test "x$HAVE_ST_EGL" != xyes -a "x$enable_gallium_egl" = xyes; then - AC_MSG_ERROR([--with-state-trackers specified but egl is missing]) - fi - ;; -esac - - -EGL_CLIENT_APIS="" -VG_LIB_DEPS="" - -case "x$enable_opengl$enable_gles1$enable_gles2" in -x*yes*) - EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(GL_LIB)' - ;; -esac -if test "x$enable_openvg" = xyes; then - EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(VG_LIB)' - VG_LIB_DEPS="$VG_LIB_DEPS -lpthread" -fi - -AC_SUBST([VG_LIB_DEPS]) -AC_SUBST([EGL_CLIENT_APIS]) - -if test "x$HAVE_ST_EGL" = xyes; then - GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS egl" -fi - -if test "x$HAVE_ST_XORG" = xyes; then - PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1], - HAVE_XEXTPROTO_71="yes"; DEFINES="$DEFINES -DHAVE_XEXTPROTO_71", - HAVE_XEXTPROTO_71="no") -fi - -AC_ARG_WITH([egl-platforms], - [AS_HELP_STRING([--with-egl-platforms@<:@=DIRS...@:>@], - [comma delimited native platforms libEGL supports, e.g. - "x11,drm" @<:@default=auto@:>@])], - [with_egl_platforms="$withval"], - [with_egl_platforms=yes]) -AC_ARG_WITH([egl-displays], - [AS_HELP_STRING([--with-egl-displays@<:@=DIRS...@:>@], - [DEPRECATED. Use --with-egl-platforms instead])], - [with_egl_platforms="$withval"]) - -EGL_PLATFORMS="" -WAYLAND_EGL_LIB_DEPS="" - -case "$with_egl_platforms" in -yes) - if test "x$enable_egl" = xyes && test "x$mesa_driver" != xosmesa; then - EGL_PLATFORMS="x11" - if test "$mesa_driver" = dri; then - EGL_PLATFORMS="$EGL_PLATFORMS drm" - fi - fi - ;; -*) - if test "x$enable_egl" != xyes; then - AC_MSG_ERROR([cannot build egl state tracker without EGL library]) - fi - # verify the requested driver directories exist - egl_platforms=`IFS=', '; echo $with_egl_platforms` - for plat in $egl_platforms; do - test -d "$srcdir/src/gallium/state_trackers/egl/$plat" || \ - AC_MSG_ERROR([EGL platform '$plat' doesn't exist]) - if test "$plat" = "fbdev"; then - GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/fbdev" - fi - if test "$plat" = "wayland"; then - PKG_CHECK_MODULES([WAYLAND], [wayland-client wayland-server],, \ - [AC_MSG_ERROR([cannot find libwayland-client])]) - WAYLAND_EGL_LIB_DEPS="$WAYLAND_LIBS $LIBDRM_LIBS" - GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/wayland" - fi - done - EGL_PLATFORMS="$egl_platforms" - ;; -esac -AC_SUBST([EGL_PLATFORMS]) - -AC_SUBST([WAYLAND_EGL_LIB_DEPS]) -WAYLAND_EGL_PC_REQ_PRIV="wayland-client libdrm" -WAYLAND_EGL_PC_LIB_PRIV= -WAYLAND_EGL_PC_CFLAGS= - -AC_SUBST([WAYLAND_EGL_PC_REQ_PRIV]) -AC_SUBST([WAYLAND_EGL_PC_LIB_PRIV]) -AC_SUBST([WAYLAND_EGL_PC_CFLAGS]) - - -AC_ARG_WITH([egl-driver-dir], - [AS_HELP_STRING([--with-egl-driver-dir=DIR], - [directory for EGL drivers [[default=${libdir}/egl]]])], - [EGL_DRIVER_INSTALL_DIR="$withval"], - [EGL_DRIVER_INSTALL_DIR='${libdir}/egl']) -AC_SUBST([EGL_DRIVER_INSTALL_DIR]) - -AC_ARG_WITH([xorg-driver-dir], - [AS_HELP_STRING([--with-xorg-driver-dir=DIR], - [Default xorg driver directory[[default=${libdir}/xorg/modules/drivers]]])], - [XORG_DRIVER_INSTALL_DIR="$withval"], - [XORG_DRIVER_INSTALL_DIR="${libdir}/xorg/modules/drivers"]) -AC_SUBST([XORG_DRIVER_INSTALL_DIR]) - -AC_ARG_WITH([max-width], - [AS_HELP_STRING([--with-max-width=N], - [Maximum framebuffer width (4096)])], - [DEFINES="${DEFINES} -DMAX_WIDTH=${withval}"; - AS_IF([test "${withval}" -gt "4096"], - [AC_MSG_WARN([Large framebuffer: see s_tritemp.h comments.])])] -) -AC_ARG_WITH([max-height], - [AS_HELP_STRING([--with-max-height=N], - [Maximum framebuffer height (4096)])], - [DEFINES="${DEFINES} -DMAX_HEIGHT=${withval}"; - AS_IF([test "${withval}" -gt "4096"], - [AC_MSG_WARN([Large framebuffer: see s_tritemp.h comments.])])] -) - -dnl -dnl Gallium LLVM -dnl -AC_ARG_ENABLE([gallium-llvm], - [AS_HELP_STRING([--enable-gallium-llvm], - [build gallium LLVM support @<:@default=enabled on x86/x86_64@:>@])], - [enable_gallium_llvm="$enableval"], - [enable_gallium_llvm=auto]) -if test "x$enable_gallium_llvm" = xauto; then - case "$host_cpu" in - i*86|x86_64) enable_gallium_llvm=yes;; - esac -fi -if test "x$enable_gallium_llvm" = xyes; then - if test "x$LLVM_CONFIG" != xno; then - LLVM_VERSION=`$LLVM_CONFIG --version` - LLVM_CFLAGS=`$LLVM_CONFIG --cppflags` - LLVM_LIBS="`$LLVM_CONFIG --libs` -lstdc++" - - LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags` - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS llvmpipe" - DEFINES="$DEFINES -DGALLIUM_LLVMPIPE -D__STDC_CONSTANT_MACROS" - MESA_LLVM=1 - else - MESA_LLVM=0 - fi -else - MESA_LLVM=0 -fi - -dnl -dnl Gallium helper functions -dnl -gallium_check_st() { - if test "x$HAVE_ST_DRI" = xyes || test "x$HAVE_ST_XORG" = xyes; then - GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS $1" - fi - if test "x$HAVE_ST_DRI" = xyes && test "x$2" != x; then - GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $2" - fi - if test "x$HAVE_ST_XORG" = xyes && test "x$3" != x; then - GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $3" - fi -} - - -dnl -dnl Gallium SVGA configuration -dnl -AC_ARG_ENABLE([gallium-svga], - [AS_HELP_STRING([--enable-gallium-svga], - [build gallium SVGA @<:@default=disabled@:>@])], - [enable_gallium_svga="$enableval"], - [enable_gallium_svga=auto]) -if test "x$enable_gallium_svga" = xyes; then - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga" - gallium_check_st "svga/drm" "dri-vmwgfx" "xorg-vmwgfx" -elif test "x$enable_gallium_svga" = xauto; then - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga" -fi - -dnl -dnl Gallium i915 configuration -dnl -AC_ARG_ENABLE([gallium-i915], - [AS_HELP_STRING([--enable-gallium-i915], - [build gallium i915 @<:@default=disabled@:>@])], - [enable_gallium_i915="$enableval"], - [enable_gallium_i915=auto]) -if test "x$enable_gallium_i915" = xyes; then - GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS i915/sw" - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915" - gallium_check_st "i915/drm" "dri-i915" "xorg-i915" -elif test "x$enable_gallium_i915" = xauto; then - GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS i915/sw" - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915" -fi - -dnl -dnl Gallium i965 configuration -dnl -AC_ARG_ENABLE([gallium-i965], - [AS_HELP_STRING([--enable-gallium-i965], - [build gallium i965 @<:@default=disabled@:>@])], - [enable_gallium_i965="$enableval"], - [enable_gallium_i965=auto]) -if test "x$enable_gallium_i965" = xyes; then - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i965" - gallium_check_st "i965/drm" "dri-i965" "xorg-i965" -elif test "x$enable_gallium_i965" = xauto; then - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i965" -fi - -dnl -dnl Gallium Radeon r300g configuration -dnl -AC_ARG_ENABLE([gallium-r300], - [AS_HELP_STRING([--enable-gallium-r300], - [build gallium r300 @<:@default=build DRI driver only@:>@])], - [enable_gallium_r300="$enableval"], - [enable_gallium_r300=auto]) - -if test "$mesa_driver" != dri ; then - if test "x$enable_gallium_r300" = xauto; then - enable_gallium_r300=no - fi -fi - -if test "x$enable_gallium_r300" != xno; then - if test "x$MESA_LLVM" = x0; then - case "$host_cpu" in - i*86|x86_64) AC_MSG_ERROR([LLVM is required to build Gallium R300 on x86 and x86_64]);; - esac - fi -fi -if test "x$enable_gallium_r300" = xauto; then - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300" - gallium_check_st "radeon/drm" "dri-r300" -elif test "x$enable_gallium_r300" = xyes; then - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300" - gallium_check_st "radeon/drm" "dri-r300" "xorg-radeon" -fi - -dnl -dnl Gallium Radeon r600g configuration -dnl -AC_ARG_ENABLE([gallium-r600], - [AS_HELP_STRING([--enable-gallium-r600], - [build gallium r600 @<:@default=disabled@:>@])], - [enable_gallium_r600="$enableval"], - [enable_gallium_r600=auto]) -if test "x$enable_gallium_r600" = xyes; then - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600" - gallium_check_st "r600/drm" "dri-r600" -fi - -dnl -dnl Gallium Nouveau configuration -dnl -AC_ARG_ENABLE([gallium-nouveau], - [AS_HELP_STRING([--enable-gallium-nouveau], - [build gallium nouveau @<:@default=disabled@:>@])], - [enable_gallium_nouveau="$enableval"], - [enable_gallium_nouveau=no]) -if test "x$enable_gallium_nouveau" = xyes; then - GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nvfx nv50 nvc0" - gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau" -fi - -dnl -dnl Gallium swrast configuration -dnl -AC_ARG_ENABLE([gallium-swrast], - [AS_HELP_STRING([--enable-gallium-swrast], - [build gallium swrast @<:@default=auto@:>@])], - [enable_gallium_swrast="$enableval"], - [enable_gallium_swrast=auto]) -if test "x$enable_gallium_swrast" = xyes || test "x$enable_gallium_swrast" = xauto; then - if test "x$HAVE_ST_DRI" = xyes; then - GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri-swrast" - fi -fi - -dnl prepend CORE_DIRS to SRC_DIRS -SRC_DIRS="$CORE_DIRS $SRC_DIRS" - -dnl Restore LDFLAGS and CPPFLAGS -LDFLAGS="$_SAVE_LDFLAGS" -CPPFLAGS="$_SAVE_CPPFLAGS" - -dnl Substitute the config -AC_CONFIG_FILES([configs/autoconf]) - -dnl Replace the configs/current symlink -AC_CONFIG_COMMANDS([configs],[ -if test -f configs/current || test -L configs/current; then - rm -f configs/current -fi -ln -s autoconf configs/current -]) - -AC_OUTPUT - -dnl -dnl Output some configuration info for the user -dnl -echo "" -echo " prefix: $prefix" -echo " exec_prefix: $exec_prefix" -echo " libdir: $libdir" -echo " includedir: $includedir" - -dnl API info -echo "" -echo " OpenGL: $enable_opengl (ES1: $enable_gles1 ES2: $enable_gles2)" -echo " OpenVG: $enable_openvg" - -dnl Driver info -echo "" -echo " Driver: $mesa_driver" -if test "$mesa_driver" != no; then - if echo "$DRIVER_DIRS" | grep 'osmesa' >/dev/null 2>&1; then - echo " OSMesa: lib$OSMESA_LIB" - else - echo " OSMesa: no" - fi - if test "$mesa_driver" = dri; then - # cleanup the drivers var - dri_dirs=`echo $DRI_DIRS | $SED 's/^ *//;s/ */ /;s/ *$//'` - if test "x$DRI_DIRS" = x; then - echo " DRI drivers: no" - else - echo " DRI drivers: $dri_dirs" - fi - echo " DRI driver dir: $DRI_DRIVER_INSTALL_DIR" - echo " Use XCB: $enable_xcb" - echo " Shared dricore: $enable_dricore" - fi -fi -echo "" -echo " GLU: $enable_glu" -echo " GLw: $enable_glw (Motif: $enable_motif)" -echo " glut: $enable_glut" - -dnl EGL -echo "" -echo " EGL: $enable_egl" -if test "$enable_egl" = yes; then - echo " EGL platforms: $EGL_PLATFORMS" - - egl_drivers="" - for d in $EGL_DRIVERS_DIRS; do - egl_drivers="$egl_drivers builtin:egl_$d" - done - - if test "$enable_gallium" = yes -a "$HAVE_ST_EGL" = yes; then - echo " EGL drivers: ${egl_drivers} egl_gallium" - echo " EGL Gallium STs:$EGL_CLIENT_APIS" - else - echo " EGL drivers: $egl_drivers" - fi -fi - -echo "" -if test "x$MESA_LLVM" = x1; then - echo " llvm: yes" - echo " llvm-config: $LLVM_CONFIG" - echo " llvm-version: $LLVM_VERSION" -else - echo " llvm: no" -fi - -echo "" -if echo "$SRC_DIRS" | grep 'gallium' >/dev/null 2>&1; then - echo " Gallium: yes" - echo " Gallium dirs: $GALLIUM_DIRS" - echo " Target dirs: $GALLIUM_TARGET_DIRS" - echo " Winsys dirs: $GALLIUM_WINSYS_DIRS" - echo " Driver dirs: $GALLIUM_DRIVERS_DIRS" - echo " Trackers dirs: $GALLIUM_STATE_TRACKERS_DIRS" -else - echo " Gallium: no" -fi - -dnl Libraries -echo "" -echo " Shared libs: $enable_shared" -echo " Static libs: $enable_static" - -dnl Compiler options -# cleanup the CFLAGS/CXXFLAGS/DEFINES vars -cflags=`echo $CFLAGS $OPT_FLAGS $PIC_FLAGS $ARCH_FLAGS | \ - $SED 's/^ *//;s/ */ /;s/ *$//'` -cxxflags=`echo $CXXFLAGS $OPT_FLAGS $PIC_FLAGS $ARCH_FLAGS | \ - $SED 's/^ *//;s/ */ /;s/ *$//'` -defines=`echo $DEFINES $ASM_FLAGS | $SED 's/^ *//;s/ */ /;s/ *$//'` -echo "" -echo " CFLAGS: $cflags" -echo " CXXFLAGS: $cxxflags" -echo " Macros: $defines" -echo "" -echo " PYTHON2: $PYTHON2" - -echo "" -echo " Run '${MAKE-make}' to build Mesa" -echo "" +dnl Process this file with autoconf to create configure. + +AC_PREREQ([2.59]) + +dnl Versioning - scrape the version from configs/default +m4_define([mesa_version], + [m4_esyscmd([${MAKE-make} -s -f bin/version.mk version | tr -d '\n' | tr -d '\r'])]) +m4_ifval(mesa_version,, + [m4_fatal([Failed to get the Mesa version from `make -f bin/version.mk version`])]) + +dnl Tell the user about autoconf.html in the --help output +m4_divert_once([HELP_END], [ +See docs/autoconf.html for more details on the options for Mesa.]) + +AC_INIT([Mesa],[mesa_version], + [https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa]) +AC_CONFIG_AUX_DIR([bin]) +AC_CANONICAL_HOST + +dnl Versions for external dependencies +LIBDRM_REQUIRED=2.4.24 +LIBDRM_RADEON_REQUIRED=2.4.24 +LIBDRM_INTEL_REQUIRED=2.4.24 +DRI2PROTO_REQUIRED=2.1 +GLPROTO_REQUIRED=1.4.11 +LIBDRM_XORG_REQUIRED=2.4.24 +LIBKMS_XORG_REQUIRED=1.0.0 + +dnl Check for progs +AC_PROG_CPP +AC_PROG_CC +AC_PROG_CXX +AC_CHECK_PROGS([MAKE], [gmake make]) +AC_CHECK_PROGS([PYTHON2], [python2 python]) +AC_PATH_PROG([MKDEP], [makedepend]) +AC_PATH_PROG([SED], [sed]) + +if test "x$MKDEP" = "x"; then + AC_MSG_ERROR([makedepend is required to build Mesa]) +fi + +AC_PATH_PROG([FLEX], [flex]) +test "x$FLEX" = "x" && AC_MSG_ERROR([flex is needed to build Mesa]) + +AC_PATH_PROG([BISON], [bison]) +test "x$BISON" = "x" && AC_MSG_ERROR([bison is needed to build Mesa]) + +dnl Our fallback install-sh is a symlink to minstall. Use the existing +dnl configuration in that case. +AC_PROG_INSTALL +test "x$INSTALL" = "x$ac_install_sh" && INSTALL='$(MINSTALL)' + +dnl We need a POSIX shell for parts of the build. Assume we have one +dnl in most cases. +case "$host_os" in +solaris*) + # Solaris /bin/sh is too old/non-POSIX compliant + AC_PATH_PROGS(POSIX_SHELL, [ksh93 ksh sh]) + SHELL="$POSIX_SHELL" + ;; +esac + +dnl clang is mostly GCC-compatible, but its version is much lower, +dnl so we have to check for it. +AC_MSG_CHECKING([if compiling with clang]) + +AC_COMPILE_IFELSE( +[AC_LANG_PROGRAM([], [[ +#ifndef __clang__ + not clang +#endif +]])], +[CLANG=yes], [CLANG=no]) + +AC_MSG_RESULT([$CLANG]) + +dnl If we're using GCC, make sure that it is at least version 3.3.0. Older +dnl versions are explictly not supported. +if test "x$GCC" = xyes -a "x$CLANG" = xno; then + AC_MSG_CHECKING([whether gcc version is sufficient]) + major=0 + minor=0 + + GCC_VERSION=`$CC -dumpversion` + if test $? -eq 0; then + major=`echo $GCC_VERSION | cut -d. -f1` + minor=`echo $GCC_VERSION | cut -d. -f1` + fi + + if test $major -lt 3 -o $major -eq 3 -a $minor -lt 3 ; then + AC_MSG_RESULT([no]) + AC_MSG_ERROR([If using GCC, version 3.3.0 or later is required.]) + else + AC_MSG_RESULT([yes]) + fi +fi + + +MKDEP_OPTIONS=-fdepend +dnl Ask gcc where it's keeping its secret headers +if test "x$GCC" = xyes; then + for dir in include include-fixed; do + GCC_INCLUDES=`$CC -print-file-name=$dir` + if test "x$GCC_INCLUDES" != x && \ + test "$GCC_INCLUDES" != "$dir" && \ + test -d "$GCC_INCLUDES"; then + MKDEP_OPTIONS="$MKDEP_OPTIONS -I$GCC_INCLUDES" + fi + done +fi +AC_SUBST([MKDEP_OPTIONS]) + +dnl Make sure the pkg-config macros are defined +m4_ifndef([PKG_PROG_PKG_CONFIG], + [m4_fatal([Could not locate the pkg-config autoconf macros. + These are usually located in /usr/share/aclocal/pkg.m4. If your macros + are in a different location, try setting the environment variable + ACLOCAL="aclocal -I/other/macro/dir" before running autoreconf.])]) +PKG_PROG_PKG_CONFIG() + +dnl LIB_DIR - library basename +LIB_DIR=`echo $libdir | $SED 's%.*/%%'` +AC_SUBST([LIB_DIR]) + +dnl Cache LDFLAGS so we can add EXTRA_LIB_PATH and restore it later +_SAVE_LDFLAGS="$LDFLAGS" +AC_ARG_VAR([EXTRA_LIB_PATH],[Extra -L paths for the linker]) +AC_SUBST([EXTRA_LIB_PATH]) + +dnl Cache CPPFLAGS so we can add *_INCLUDES and restore it later +_SAVE_CPPFLAGS="$CPPFLAGS" +AC_ARG_VAR([X11_INCLUDES],[Extra -I paths for X11 headers]) +AC_SUBST([X11_INCLUDES]) + +dnl Compiler macros +DEFINES="" +AC_SUBST([DEFINES]) +case "$host_os" in +linux*|*-gnu*|gnu*) + DEFINES="$DEFINES -D_GNU_SOURCE -DPTHREADS" + ;; +solaris*) + DEFINES="$DEFINES -DPTHREADS -DSVR4" + ;; +cygwin*) + DEFINES="$DEFINES -DPTHREADS" + ;; +esac + +dnl Add flags for gcc and g++ +if test "x$GCC" = xyes; then + CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -std=c99" + if test "x$CLANG" = "xno"; then + CFLAGS="$CFLAGS -ffast-math" + fi + + # Enable -fvisibility=hidden if using a gcc that supports it + save_CFLAGS="$CFLAGS" + AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden]) + VISIBILITY_CFLAGS="-fvisibility=hidden" + CFLAGS="$CFLAGS $VISIBILITY_CFLAGS" + AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]), + [VISIBILITY_CFLAGS=""; AC_MSG_RESULT([no])]); + + # Restore CFLAGS; VISIBILITY_CFLAGS are added to it where needed. + CFLAGS=$save_CFLAGS + + # Work around aliasing bugs - developers should comment this out + CFLAGS="$CFLAGS -fno-strict-aliasing" +fi +if test "x$GXX" = xyes; then + CXXFLAGS="$CXXFLAGS -Wall" + + # Enable -fvisibility=hidden if using a gcc that supports it + save_CXXFLAGS="$CXXFLAGS" + AC_MSG_CHECKING([whether $CXX supports -fvisibility=hidden]) + VISIBILITY_CXXFLAGS="-fvisibility=hidden" + CXXFLAGS="$CXXFLAGS $VISIBILITY_CXXFLAGS" + AC_LINK_IFELSE([AC_LANG_PROGRAM()], AC_MSG_RESULT([yes]), + [VISIBILITY_CXXFLAGS="" ; AC_MSG_RESULT([no])]); + + # Restore CXXFLAGS; VISIBILITY_CXXFLAGS are added to it where needed. + CXXFLAGS=$save_CXXFLAGS + + # Work around aliasing bugs - developers should comment this out + CXXFLAGS="$CXXFLAGS -fno-strict-aliasing" +fi + +AC_SUBST([VISIBILITY_CFLAGS]) +AC_SUBST([VISIBILITY_CXXFLAGS]) + +dnl These should be unnecessary, but let the user set them if they want +AC_ARG_VAR([OPT_FLAGS], [Additional optimization flags for the compiler. + Default is to use CFLAGS.]) +AC_ARG_VAR([ARCH_FLAGS], [Additional architecture specific flags for the + compiler. Default is to use CFLAGS.]) +AC_SUBST([OPT_FLAGS]) +AC_SUBST([ARCH_FLAGS]) + +dnl +dnl Hacks to enable 32 or 64 bit build +dnl +AC_ARG_ENABLE([32-bit], + [AS_HELP_STRING([--enable-32-bit], + [build 32-bit libraries @<:@default=auto@:>@])], + [enable_32bit="$enableval"], + [enable_32bit=auto] +) +if test "x$enable_32bit" = xyes; then + if test "x$GCC" = xyes; then + CFLAGS="$CFLAGS -m32" + ARCH_FLAGS="$ARCH_FLAGS -m32" + fi + if test "x$GXX" = xyes; then + CXXFLAGS="$CXXFLAGS -m32" + fi +fi +AC_ARG_ENABLE([64-bit], + [AS_HELP_STRING([--enable-64-bit], + [build 64-bit libraries @<:@default=auto@:>@])], + [enable_64bit="$enableval"], + [enable_64bit=auto] +) +if test "x$enable_64bit" = xyes; then + if test "x$GCC" = xyes; then + CFLAGS="$CFLAGS -m64" + fi + if test "x$GXX" = xyes; then + CXXFLAGS="$CXXFLAGS -m64" + fi +fi + +dnl +dnl shared/static libraries, mimic libtool options +dnl +AC_ARG_ENABLE([static], + [AS_HELP_STRING([--enable-static], + [build static libraries @<:@default=disabled@:>@])], + [enable_static="$enableval"], + [enable_static=no] +) +case "x$enable_static" in +xyes|xno ) ;; +x ) enable_static=no ;; +* ) + AC_MSG_ERROR([Static library option '$enable_static' is not a valid]) + ;; +esac +AC_ARG_ENABLE([shared], + [AS_HELP_STRING([--disable-shared], + [build shared libraries @<:@default=enabled@:>@])], + [enable_shared="$enableval"], + [enable_shared=yes] +) +case "x$enable_shared" in +xyes|xno ) ;; +x ) enable_shared=yes ;; +* ) + AC_MSG_ERROR([Shared library option '$enable_shared' is not a valid]) + ;; +esac + +dnl Can't have static and shared libraries, default to static if user +dnl explicitly requested. If both disabled, set to static since shared +dnl was explicitly requirested. +case "x$enable_static$enable_shared" in +xyesyes ) + AC_MSG_WARN([Can't build static and shared libraries, disabling shared]) + enable_shared=no + ;; +xnono ) + AC_MSG_WARN([Can't disable both static and shared libraries, enabling static]) + enable_static=yes + ;; +esac + +dnl +dnl mklib options +dnl +AC_ARG_VAR([MKLIB_OPTIONS],[Options for the Mesa library script, mklib]) +if test "$enable_static" = yes; then + MKLIB_OPTIONS="$MKLIB_OPTIONS -static" +fi +AC_SUBST([MKLIB_OPTIONS]) + +dnl +dnl other compiler options +dnl +AC_ARG_ENABLE([debug], + [AS_HELP_STRING([--enable-debug], + [use debug compiler flags and macros @<:@default=disabled@:>@])], + [enable_debug="$enableval"], + [enable_debug=no] +) +if test "x$enable_debug" = xyes; then + DEFINES="$DEFINES -DDEBUG" + if test "x$GCC" = xyes; then + CFLAGS="$CFLAGS -g" + fi + if test "x$GXX" = xyes; then + CXXFLAGS="$CXXFLAGS -g" + fi +fi + +dnl +dnl library names +dnl +LIB_PREFIX_GLOB='lib' +LIB_VERSION_SEPARATOR='.' +if test "$enable_static" = yes; then + LIB_EXTENSION='a' +else + case "$host_os" in + darwin* ) + LIB_EXTENSION='dylib' ;; + cygwin* ) + dnl prefix can be 'cyg' or 'lib' + LIB_PREFIX_GLOB='???' + LIB_VERSION_SEPARATOR='-' + LIB_EXTENSION='dll' ;; + aix* ) + LIB_EXTENSION='a' ;; + * ) + LIB_EXTENSION='so' ;; + esac +fi + +dnl +dnl potentially-infringing-but-nobody-knows-for-sure stuff +dnl +AC_ARG_ENABLE([texture-float], + [AS_HELP_STRING([--enable-texture-float], + [enable floating-point textures and renderbuffers @<:@default=disabled@:>@])], + [enable_texture_float="$enableval"], + [enable_texture_float=no] +) +if test "x$enable_texture_float" = xyes; then + AC_MSG_WARN([Floating-point textures enabled.]) + AC_MSG_WARN([Please consult docs/patents.txt with your lawyer before building Mesa.]) + DEFINES="$DEFINES -DTEXTURE_FLOAT_ENABLED" +fi + +GL_LIB_NAME='lib$(GL_LIB).'${LIB_EXTENSION} +GLU_LIB_NAME='lib$(GLU_LIB).'${LIB_EXTENSION} +GLUT_LIB_NAME='lib$(GLUT_LIB).'${LIB_EXTENSION} +GLW_LIB_NAME='lib$(GLW_LIB).'${LIB_EXTENSION} +OSMESA_LIB_NAME='lib$(OSMESA_LIB).'${LIB_EXTENSION} +EGL_LIB_NAME='lib$(EGL_LIB).'${LIB_EXTENSION} +GLESv1_CM_LIB_NAME='lib$(GLESv1_CM_LIB).'${LIB_EXTENSION} +GLESv2_LIB_NAME='lib$(GLESv2_LIB).'${LIB_EXTENSION} +VG_LIB_NAME='lib$(VG_LIB).'${LIB_EXTENSION} +GLAPI_LIB_NAME='lib$(GLAPI_LIB).'${LIB_EXTENSION} +WAYLAND_EGL_LIB_NAME='lib$(WAYLAND_EGL_LIB).'${LIB_EXTENSION} + +GL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' +GLU_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLU_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' +GLUT_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLUT_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' +GLW_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLW_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' +OSMESA_LIB_GLOB=${LIB_PREFIX_GLOB}'$(OSMESA_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' +EGL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(EGL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' +EGL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(EGL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' +GLESv1_CM_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLESv1_CM_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' +GLESv2_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLESv2_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' +VG_LIB_GLOB=${LIB_PREFIX_GLOB}'$(VG_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' +GLAPI_LIB_GLOB=${LIB_PREFIX_GLOB}'$(GLAPI_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' +WAYLAND_EGL_LIB_GLOB=${LIB_PREFIX_GLOB}'$(WAYLAND_EGL_LIB)'${LIB_VERSION_SEPARATOR}'*'${LIB_EXTENSION}'*' + +AC_SUBST([GL_LIB_NAME]) +AC_SUBST([GLU_LIB_NAME]) +AC_SUBST([GLUT_LIB_NAME]) +AC_SUBST([GLW_LIB_NAME]) +AC_SUBST([OSMESA_LIB_NAME]) +AC_SUBST([EGL_LIB_NAME]) +AC_SUBST([GLESv1_CM_LIB_NAME]) +AC_SUBST([GLESv2_LIB_NAME]) +AC_SUBST([VG_LIB_NAME]) +AC_SUBST([GLAPI_LIB_NAME]) +AC_SUBST([WAYLAND_EGL_LIB_NAME]) + +AC_SUBST([GL_LIB_GLOB]) +AC_SUBST([GLU_LIB_GLOB]) +AC_SUBST([GLUT_LIB_GLOB]) +AC_SUBST([GLW_LIB_GLOB]) +AC_SUBST([OSMESA_LIB_GLOB]) +AC_SUBST([EGL_LIB_GLOB]) +AC_SUBST([GLESv1_CM_LIB_GLOB]) +AC_SUBST([GLESv2_LIB_GLOB]) +AC_SUBST([VG_LIB_GLOB]) +AC_SUBST([GLAPI_LIB_GLOB]) +AC_SUBST([WAYLAND_EGL_LIB_GLOB]) + +dnl +dnl Arch/platform-specific settings +dnl +AC_ARG_ENABLE([asm], + [AS_HELP_STRING([--disable-asm], + [disable assembly usage @<:@default=enabled on supported plaforms@:>@])], + [enable_asm="$enableval"], + [enable_asm=yes] +) +asm_arch="" +ASM_FLAGS="" +MESA_ASM_SOURCES="" +GLAPI_ASM_SOURCES="" +AC_MSG_CHECKING([whether to enable assembly]) +test "x$enable_asm" = xno && AC_MSG_RESULT([no]) +# disable if cross compiling on x86/x86_64 since we must run gen_matypes +if test "x$enable_asm" = xyes && test "x$cross_compiling" = xyes; then + case "$host_cpu" in + i?86 | x86_64) + enable_asm=no + AC_MSG_RESULT([no, cross compiling]) + ;; + esac +fi +# check for supported arches +if test "x$enable_asm" = xyes; then + case "$host_cpu" in + i?86) + case "$host_os" in + linux* | *freebsd* | dragonfly* | *netbsd*) + test "x$enable_64bit" = xyes && asm_arch=x86_64 || asm_arch=x86 + ;; + esac + ;; + x86_64) + case "$host_os" in + linux* | *freebsd* | dragonfly* | *netbsd*) + test "x$enable_32bit" = xyes && asm_arch=x86 || asm_arch=x86_64 + ;; + esac + ;; + powerpc) + case "$host_os" in + linux*) + asm_arch=ppc + ;; + esac + ;; + sparc*) + case "$host_os" in + linux*) + asm_arch=sparc + ;; + esac + ;; + esac + + case "$asm_arch" in + x86) + ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM" + MESA_ASM_SOURCES='$(X86_SOURCES)' + GLAPI_ASM_SOURCES='$(X86_API)' + AC_MSG_RESULT([yes, x86]) + ;; + x86_64) + ASM_FLAGS="-DUSE_X86_64_ASM" + MESA_ASM_SOURCES='$(X86-64_SOURCES)' + GLAPI_ASM_SOURCES='$(X86-64_API)' + AC_MSG_RESULT([yes, x86_64]) + ;; + ppc) + ASM_FLAGS="-DUSE_PPC_ASM -DUSE_VMX_ASM" + MESA_ASM_SOURCES='$(PPC_SOURCES)' + AC_MSG_RESULT([yes, ppc]) + ;; + sparc) + ASM_FLAGS="-DUSE_SPARC_ASM" + MESA_ASM_SOURCES='$(SPARC_SOURCES)' + GLAPI_ASM_SOURCES='$(SPARC_API)' + AC_MSG_RESULT([yes, sparc]) + ;; + *) + AC_MSG_RESULT([no, platform not supported]) + ;; + esac +fi +AC_SUBST([ASM_FLAGS]) +AC_SUBST([MESA_ASM_SOURCES]) +AC_SUBST([GLAPI_ASM_SOURCES]) + +dnl PIC code macro +MESA_PIC_FLAGS + +dnl Check to see if dlopen is in default libraries (like Solaris, which +dnl has it in libc), or if libdl is needed to get it. +AC_CHECK_FUNC([dlopen], [], + [AC_CHECK_LIB([dl], [dlopen], [DLOPEN_LIBS="-ldl"])]) +AC_SUBST([DLOPEN_LIBS]) + +dnl See if posix_memalign is available +AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"]) + +dnl SELinux awareness. +AC_ARG_ENABLE([selinux], + [AS_HELP_STRING([--enable-selinux], + [Build SELinux-aware Mesa @<:@default=disabled@:>@])], + [MESA_SELINUX="$enableval"], + [MESA_SELINUX=no]) +if test "x$enable_selinux" = "xyes"; then + AC_CHECK_HEADER([selinux/selinux.h],[], + [AC_MSG_ERROR([SELinux headers not found])]) + AC_CHECK_LIB([selinux],[is_selinux_enabled],[], + [AC_MSG_ERROR([SELinux library not found])]) + SELINUX_LIBS="-lselinux" + DEFINES="$DEFINES -DMESA_SELINUX" +fi + +dnl Determine which APIs to support +AC_ARG_ENABLE([opengl], + [AS_HELP_STRING([--disable-opengl], + [disable support for standard OpenGL API @<:@default=no@:>@])], + [enable_opengl="$enableval"], + [enable_opengl=yes]) +AC_ARG_ENABLE([gles1], + [AS_HELP_STRING([--enable-gles1], + [enable support for OpenGL ES 1.x API @<:@default=no@:>@])], + [enable_gles1="$enableval"], + [enable_gles1=no]) +AC_ARG_ENABLE([gles2], + [AS_HELP_STRING([--enable-gles2], + [enable support for OpenGL ES 2.x API @<:@default=no@:>@])], + [enable_gles2="$enableval"], + [enable_gles2=no]) +AC_ARG_ENABLE([gles-overlay], + [AS_HELP_STRING([--enable-gles-overlay], + [DEPRECATED. Same as --enable-gles1 and --enable-gles2])], + [enable_gles1="$enableval"; enable_gles2="$enableval"], + []) + +AC_ARG_ENABLE([openvg], + [AS_HELP_STRING([--enable-openvg], + [enable support for OpenVG API @<:@default=no@:>@])], + [enable_openvg="$enableval"], + [enable_openvg=no]) + +dnl smooth the transition; should be removed eventually +if test "x$enable_openvg" = xno; then + case "x$with_state_trackers" in + x*vega*) + AC_MSG_WARN([vega state tracker is enabled without --enable-openvg]) + enable_openvg=yes + ;; + esac +fi + +if test "x$enable_opengl" = xno -a \ + "x$enable_gles1" = xno -a \ + "x$enable_gles2" = xno -a \ + "x$enable_openvg" = xno; then + AC_MSG_ERROR([at least one API should be enabled]) +fi + +API_DEFINES="" +if test "x$enable_opengl" = xno; then + API_DEFINES="$API_DEFINES -DFEATURE_GL=0" +else + API_DEFINES="$API_DEFINES -DFEATURE_GL=1" +fi +if test "x$enable_gles1" = xyes; then + API_DEFINES="$API_DEFINES -DFEATURE_ES1=1" +fi +if test "x$enable_gles2" = xyes; then + API_DEFINES="$API_DEFINES -DFEATURE_ES2=1" +fi +AC_SUBST([API_DEFINES]) + +AC_ARG_ENABLE([shared-glapi], + [AS_HELP_STRING([--enable-shared-glapi], + [EXPERIMENTAL. Enable shared glapi for OpenGL @<:@default=no@:>@])], + [enable_shared_glapi="$enableval"], + [enable_shared_glapi=no]) + +SHARED_GLAPI="0" +if test "x$enable_shared_glapi" = xyes; then + SHARED_GLAPI="1" +fi +AC_SUBST([SHARED_GLAPI]) + +dnl +dnl Driver configuration. Options are xlib, dri and osmesa right now. +dnl More later: fbdev, ... +dnl +default_driver="xlib" + +case "$host_os" in +linux*) + case "$host_cpu" in + i*86|x86_64|powerpc*|sparc*) default_driver="dri";; + esac + ;; +*freebsd* | dragonfly* | *netbsd*) + case "$host_cpu" in + i*86|x86_64|powerpc*|sparc*) default_driver="dri";; + esac + ;; +esac + +if test "x$enable_opengl" = xno; then + default_driver="no" +fi + +AC_ARG_WITH([driver], + [AS_HELP_STRING([--with-driver=DRIVER], + [driver for Mesa: xlib,dri,osmesa @<:@default=dri when available, or xlib@:>@])], + [mesa_driver="$withval"], + [mesa_driver="$default_driver"]) +dnl Check for valid option +case "x$mesa_driver" in +xxlib|xdri|xosmesa) + if test "x$enable_opengl" = xno; then + AC_MSG_ERROR([Driver '$mesa_driver' requires OpenGL enabled]) + fi + ;; +xno) + ;; +*) + AC_MSG_ERROR([Driver '$mesa_driver' is not a valid option]) + ;; +esac + +dnl +dnl Driver specific build directories +dnl + +dnl this variable will be prepended to SRC_DIRS and is not exported +CORE_DIRS="" + +SRC_DIRS="" +GLU_DIRS="sgi" +GALLIUM_DIRS="auxiliary drivers state_trackers" +GALLIUM_TARGET_DIRS="" +GALLIUM_WINSYS_DIRS="sw" +GALLIUM_DRIVERS_DIRS="softpipe failover galahad trace rbug noop identity" +GALLIUM_STATE_TRACKERS_DIRS="" + +# build shared-glapi if enabled for OpenGL or if OpenGL ES is enabled +case "x$enable_shared_glapi$enable_gles1$enable_gles2" in +x*yes*) + CORE_DIRS="$CORE_DIRS mapi/shared-glapi" + ;; +esac + +# build glapi if OpenGL is enabled +if test "x$enable_opengl" = xyes; then + CORE_DIRS="$CORE_DIRS mapi/glapi" +fi + +# build es1api if OpenGL ES 1.x is enabled +if test "x$enable_gles1" = xyes; then + CORE_DIRS="$CORE_DIRS mapi/es1api" +fi + +# build es2api if OpenGL ES 2.x is enabled +if test "x$enable_gles2" = xyes; then + CORE_DIRS="$CORE_DIRS mapi/es2api" +fi + +# build vgapi if OpenVG is enabled +if test "x$enable_openvg" = xyes; then + CORE_DIRS="$CORE_DIRS mapi/vgapi" +fi + +# build glsl and mesa if OpenGL or OpenGL ES is enabled +case "x$enable_opengl$enable_gles1$enable_gles2" in +x*yes*) + CORE_DIRS="$CORE_DIRS glsl mesa" + ;; +esac + +case "$mesa_driver" in +xlib) + DRIVER_DIRS="x11" + GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib" + GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS libgl-xlib" + ;; +dri) + SRC_DIRS="$SRC_DIRS glx" + DRIVER_DIRS="dri" + GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/xlib sw/dri" + ;; +osmesa) + DRIVER_DIRS="osmesa" + ;; +no) + DRIVER_DRIS="" + ;; +esac +AC_SUBST([SRC_DIRS]) +AC_SUBST([GLU_DIRS]) +AC_SUBST([DRIVER_DIRS]) +AC_SUBST([GALLIUM_DIRS]) +AC_SUBST([GALLIUM_TARGET_DIRS]) +AC_SUBST([GALLIUM_WINSYS_DIRS]) +AC_SUBST([GALLIUM_DRIVERS_DIRS]) +AC_SUBST([GALLIUM_STATE_TRACKERS_DIRS]) +AC_SUBST([MESA_LLVM]) + +dnl +dnl Find out if X is available. The variable have_x is set if libX11 is +dnl found to mimic AC_PATH_XTRA. +dnl +if test -n "$PKG_CONFIG"; then + AC_MSG_CHECKING([pkg-config files for X11 are available]) + PKG_CHECK_EXISTS([x11],[ + x11_pkgconfig=yes + have_x=yes + ],[ + x11_pkgconfig=no + ]) + AC_MSG_RESULT([$x11_pkgconfig]) +else + x11_pkgconfig=no +fi +dnl Use the autoconf macro if no pkg-config files +if test "$x11_pkgconfig" = yes; then + PKG_CHECK_MODULES([X11], [x11]) +else + AC_PATH_XTRA + test -z "$X11_CFLAGS" && X11_CFLAGS="$X_CFLAGS" + test -z "$X11_LIBS" && X11_LIBS="$X_LIBS -lX11" + AC_SUBST([X11_CFLAGS]) + AC_SUBST([X11_LIBS]) +fi + +dnl Try to tell the user that the --x-* options are only used when +dnl pkg-config is not available. This must be right after AC_PATH_XTRA. +m4_divert_once([HELP_BEGIN], +[These options are only used when the X libraries cannot be found by the +pkg-config utility.]) + +dnl We need X for xlib and dri, so bomb now if it's not found +case "$mesa_driver" in +xlib|dri) + if test "$no_x" = yes; then + AC_MSG_ERROR([X11 development libraries needed for $mesa_driver driver]) + fi + ;; +esac + +dnl XCB - this is only used for GLX right now +AC_ARG_ENABLE([xcb], + [AS_HELP_STRING([--enable-xcb], + [use XCB for GLX @<:@default=disabled@:>@])], + [enable_xcb="$enableval"], + [enable_xcb=no]) +if test "x$enable_xcb" = xyes; then + DEFINES="$DEFINES -DUSE_XCB" +else + enable_xcb=no +fi + +dnl Direct rendering or just indirect rendering +case "$host_os" in +gnu*) + dnl Disable by default on GNU/Hurd + driglx_direct_default="no" + ;; +cygwin*) + dnl Disable by default on cygwin + driglx_direct_default="no" + ;; +*) + driglx_direct_default="yes" + ;; +esac +AC_ARG_ENABLE([driglx-direct], + [AS_HELP_STRING([--disable-driglx-direct], + [enable direct rendering in GLX and EGL for DRI \ + @<:@default=auto@:>@])], + [driglx_direct="$enableval"], + [driglx_direct="$driglx_direct_default"]) + +dnl +dnl libGL configuration per driver +dnl +case "$mesa_driver" in +xlib) + if test "$x11_pkgconfig" = yes; then + PKG_CHECK_MODULES([XLIBGL], [x11 xext]) + GL_PC_REQ_PRIV="x11 xext" + X11_INCLUDES="$X11_INCLUDES $XLIBGL_CFLAGS" + GL_LIB_DEPS="$XLIBGL_LIBS" + else + # should check these... + X11_INCLUDES="$X11_INCLUDES $X_CFLAGS" + GL_LIB_DEPS="$X_LIBS -lX11 -lXext" + GL_PC_LIB_PRIV="$GL_LIB_DEPS" + GL_PC_CFLAGS="$X11_INCLUDES" + fi + GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread" + GL_PC_LIB_PRIV="$GL_PC_LIB_PRIV $SELINUX_LIBS -lm -lpthread" + + # if static, move the external libraries to the programs + # and empty the libraries for libGL + if test "$enable_static" = yes; then + APP_LIB_DEPS="$APP_LIB_DEPS $GL_LIB_DEPS" + GL_LIB_DEPS="" + fi + ;; +dri|no) # these checks are still desired when there is no mesa_driver + # DRI must be shared, I think + if test "$enable_static" = yes; then + AC_MSG_ERROR([Can't use static libraries for DRI drivers]) + fi + + PKG_CHECK_MODULES([GLPROTO], [glproto >= $GLPROTO_REQUIRED]) + GL_PC_REQ_PRIV="glproto >= $GLPROTO_REQUIRED" + DRI_PC_REQ_PRIV="" + + if test x"$driglx_direct" = xyes; then + # Check for libdrm + PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED]) + PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED]) + GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV libdrm >= $LIBDRM_REQUIRED dri2proto >= $DRI2PROTO_REQUIRED" + DRI_PC_REQ_PRIV="libdrm >= $LIBDRM_REQUIRED" + fi + + # find the DRI deps for libGL + if test "$x11_pkgconfig" = yes; then + dri_modules="x11 xext xdamage xfixes" + + # add xf86vidmode if available + PKG_CHECK_MODULES([XF86VIDMODE], [xxf86vm], HAVE_XF86VIDMODE=yes, HAVE_XF86VIDMODE=no) + if test "$HAVE_XF86VIDMODE" = yes ; then + dri_modules="$dri_modules xxf86vm" + fi + + # add xcb modules if necessary + if test "$enable_xcb" = yes; then + dri_modules="$dri_modules x11-xcb xcb-glx" + fi + + PKG_CHECK_MODULES([DRIGL], [$dri_modules]) + GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV $dri_modules" + X11_INCLUDES="$X11_INCLUDES $DRIGL_CFLAGS" + GL_LIB_DEPS="$DRIGL_LIBS" + else + # should check these... + X11_INCLUDES="$X11_INCLUDES $X_CFLAGS" + GL_LIB_DEPS="$X_LIBS -lX11 -lXext -lXxf86vm -lXdamage -lXfixes" + GL_PC_LIB_PRIV="$GL_LIB_DEPS" + GL_PC_CFLAGS="$X11_INCLUDES" + + # XCB can only be used from pkg-config + if test "$enable_xcb" = yes; then + PKG_CHECK_MODULES([XCB],[x11-xcb xcb-glx]) + GL_PC_REQ_PRIV="$GL_PC_REQ_PRIV x11-xcb xcb-glx" + X11_INCLUDES="$X11_INCLUDES $XCB_CFLAGS" + GL_LIB_DEPS="$GL_LIB_DEPS $XCB_LIBS" + fi + fi + + # need DRM libs, -lpthread, etc. + GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS" + GL_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS" + GLESv1_CM_LIB_DEPS="$LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS" + GLESv1_CM_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS" + GLESv2_LIB_DEPS="$LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS" + GLESv2_PC_LIB_PRIV="-lm -lpthread $DLOPEN_LIBS" + ;; +osmesa) + # No libGL for osmesa + GL_LIB_DEPS="" + ;; +esac +AC_SUBST([GL_LIB_DEPS]) +AC_SUBST([GL_PC_REQ_PRIV]) +AC_SUBST([GL_PC_LIB_PRIV]) +AC_SUBST([GL_PC_CFLAGS]) +AC_SUBST([DRI_PC_REQ_PRIV]) +AC_SUBST([GLESv1_CM_LIB_DEPS]) +AC_SUBST([GLESv1_CM_PC_LIB_PRIV]) +AC_SUBST([GLESv2_LIB_DEPS]) +AC_SUBST([GLESv2_PC_LIB_PRIV]) + +GLAPI_LIB_DEPS="-lpthread" +AC_SUBST([GLAPI_LIB_DEPS]) + + +dnl Setup default DRI CFLAGS +DRI_CFLAGS='$(CFLAGS)' +DRI_CXXFLAGS='$(CXXFLAGS)' +DRI_LIB_DEPS='$(TOP)/src/mesa/libmesa.a' +MESA_MODULES='$(TOP)/src/mesa/libmesa.a' + +AC_ARG_ENABLE([shared-dricore], + [AS_HELP_STRING([--enable-shared-dricore], + [link DRI modules with shared core DRI routines @<:@default=disabled@:>@])], + [enable_dricore="$enableval"], + [enable_dricore=no]) +if test "$mesa_driver" = dri ; then + if test "$enable_dricore" = yes ; then + if test "$GCC$GXX" != yesyes ; then + AC_MSG_WARN([Shared dricore requires GCC-compatible rpath handling. Disabling shared dricore]) + enable_dricore=no + else + DRICORE_GLSL_LIBS='$(TOP)/$(LIB_DIR)/libglsl.so' + DRICORE_LIBS='$(TOP)/$(LIB_DIR)/libdricore.so' + DRICORE_LIB_DEPS='-L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -lglsl' + DRI_LIB_DEPS='-L$(TOP)/$(LIB_DIR) -Wl,-R$(DRI_DRIVER_INSTALL_DIR) -ldricore -lglsl' + DRI_CFLAGS='$(CFLAGS_NOVISIBILITY) -DUSE_DRICORE' + DRI_CXXFLAGS='$(CXXFLAGS_NOVISIBILITY) -DUSE_DRICORE' + MESA_MODULES='$(DRICORE_LIBS) $(DRICORE_GLSL_LIBS)' + fi + fi +fi +AC_SUBST([DRICORE_LIBS]) +AC_SUBST([DRICORE_GLSL_LIBS]) +AC_SUBST([DRICORE_LIB_DEPS]) +AC_SUBST([DRI_CXXFLAGS]) +AC_SUBST([DRI_CFLAGS]) +AC_SUBST([MESA_MODULES]) + +AC_SUBST([HAVE_XF86VIDMODE]) + +PKG_CHECK_MODULES([LIBDRM_RADEON], + [libdrm_radeon >= $LIBDRM_RADEON_REQUIRED], + HAVE_LIBDRM_RADEON=yes, + HAVE_LIBDRM_RADEON=no) + +dnl +dnl More X11 setup +dnl +if test "$mesa_driver" = xlib; then + DEFINES="$DEFINES -DUSE_XSHM" +fi + +dnl +dnl TLS detection +dnl + +AC_ARG_ENABLE([glx-tls], + [AS_HELP_STRING([--enable-glx-tls], + [enable TLS support in GLX @<:@default=disabled@:>@])], + [GLX_USE_TLS="$enableval"], + [GLX_USE_TLS=no]) +AC_SUBST(GLX_TLS, ${GLX_USE_TLS}) + +AS_IF([test "x$GLX_USE_TLS" = xyes], + [DEFINES="${DEFINES} -DGLX_USE_TLS -DPTHREADS"]) + +dnl +dnl More DRI setup +dnl +dnl Directory for DRI drivers +AC_ARG_WITH([dri-driverdir], + [AS_HELP_STRING([--with-dri-driverdir=DIR], + [directory for the DRI drivers @<:@${libdir}/dri@:>@])], + [DRI_DRIVER_INSTALL_DIR="$withval"], + [DRI_DRIVER_INSTALL_DIR='${libdir}/dri']) +AC_SUBST([DRI_DRIVER_INSTALL_DIR]) +dnl Extra search path for DRI drivers +AC_ARG_WITH([dri-searchpath], + [AS_HELP_STRING([--with-dri-searchpath=DIRS...], + [semicolon delimited DRI driver search directories @<:@${libdir}/dri@:>@])], + [DRI_DRIVER_SEARCH_DIR="$withval"], + [DRI_DRIVER_SEARCH_DIR='${DRI_DRIVER_INSTALL_DIR}']) +AC_SUBST([DRI_DRIVER_SEARCH_DIR]) +dnl Which drivers to build - default is chosen by platform +AC_ARG_WITH([dri-drivers], + [AS_HELP_STRING([--with-dri-drivers@<:@=DIRS...@:>@], + [comma delimited DRI drivers list, e.g. + "swrast,i965,radeon" @<:@default=auto@:>@])], + [with_dri_drivers="$withval"], + [with_dri_drivers=yes]) +if test "x$with_dri_drivers" = x; then + with_dri_drivers=no +fi + +dnl If $with_dri_drivers is yes, directories will be added through +dnl platform checks +DRI_DIRS="" +case "$with_dri_drivers" in +no) ;; +yes) + DRI_DIRS="yes" + ;; +*) + # verify the requested driver directories exist + dri_drivers=`IFS=', '; echo $with_dri_drivers` + for driver in $dri_drivers; do + test -d "$srcdir/src/mesa/drivers/dri/$driver" || \ + AC_MSG_ERROR([DRI driver directory '$driver' doesn't exist]) + done + DRI_DIRS="$dri_drivers" + ;; +esac + +dnl Set DRI_DIRS, DEFINES and LIB_DEPS +if test "$mesa_driver" = dri -o "$mesa_driver" = no; then + # Platform specific settings and drivers to build + case "$host_os" in + linux*) + DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" + if test "x$driglx_direct" = xyes; then + DEFINES="$DEFINES -DGLX_DIRECT_RENDERING" + fi + DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS" + + case "$host_cpu" in + x86_64) + # sis is missing because they have not be converted to use + # the new interface. i810 are missing because there is no + # x86-64 system where they could *ever* be used. + if test "x$DRI_DIRS" = "xyes"; then + DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 r600 radeon \ + savage tdfx unichrome swrast" + fi + ;; + powerpc*) + # Build only the drivers for cards that exist on PowerPC. + # At some point MGA will be added, but not yet. + if test "x$DRI_DIRS" = "xyes"; then + DRI_DIRS="mach64 r128 r200 r300 r600 radeon tdfx swrast" + fi + ;; + sparc*) + # Build only the drivers for cards that exist on sparc` + if test "x$DRI_DIRS" = "xyes"; then + DRI_DIRS="mach64 r128 r200 r300 r600 radeon swrast" + fi + ;; + esac + ;; + freebsd* | dragonfly* | *netbsd*) + DEFINES="$DEFINES -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1" + DEFINES="$DEFINES -DIN_DRI_DRIVER -DHAVE_ALIAS" + DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING" + if test "x$driglx_direct" = xyes; then + DEFINES="$DEFINES -DGLX_DIRECT_RENDERING" + fi + + if test "x$DRI_DIRS" = "xyes"; then + DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon tdfx \ + unichrome savage sis swrast" + fi + ;; + gnu*) + DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" + DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING -DHAVE_ALIAS" + ;; + solaris*) + DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" + DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING" + if test "x$driglx_direct" = xyes; then + DEFINES="$DEFINES -DGLX_DIRECT_RENDERING" + fi + ;; + cygwin*) + DEFINES="$DEFINES -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER" + DEFINES="$DEFINES -DGLX_INDIRECT_RENDERING" + if test "x$driglx_direct" = xyes; then + DEFINES="$DEFINES -DGLX_DIRECT_RENDERING" + fi + if test "x$DRI_DIRS" = "xyes"; then + DRI_DIRS="swrast" + fi + ;; + esac + + # default drivers + if test "x$DRI_DIRS" = "xyes"; then + DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 r600 radeon \ + savage sis tdfx unichrome swrast" + fi + + DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'` + + # Check for expat + if test "$mesa_driver" = dri; then + EXPAT_INCLUDES="" + EXPAT_LIB=-lexpat + AC_ARG_WITH([expat], + [AS_HELP_STRING([--with-expat=DIR], + [expat install directory])],[ + EXPAT_INCLUDES="-I$withval/include" + CPPFLAGS="$CPPFLAGS $EXPAT_INCLUDES" + LDFLAGS="$LDFLAGS -L$withval/$LIB_DIR" + EXPAT_LIB="-L$withval/$LIB_DIR -lexpat" + ]) + AC_CHECK_HEADER([expat.h],[],[AC_MSG_ERROR([Expat required for DRI.])]) + AC_CHECK_LIB([expat],[XML_ParserCreate],[], + [AC_MSG_ERROR([Expat required for DRI.])]) + fi + + # put all the necessary libs together, including possibly libdricore + DRI_LIB_DEPS="$DRI_LIB_DEPS $SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm -lpthread $DLOPEN_LIBS" +fi +AC_SUBST([DRI_DIRS]) +AC_SUBST([EXPAT_INCLUDES]) +AC_SUBST([DRI_LIB_DEPS]) + +case $DRI_DIRS in +*i915*|*i965*) + PKG_CHECK_MODULES([INTEL], [libdrm_intel >= $LIBDRM_INTEL_REQUIRED]) + ;; +esac + +case $DRI_DIRS in +*radeon*|*r200*|*r300*|*r600*) + if test "x$HAVE_LIBDRM_RADEON" = xyes; then + RADEON_CFLAGS="-DHAVE_LIBDRM_RADEON=1 $LIBDRM_RADEON_CFLAGS" + RADEON_LDFLAGS=$LIBDRM_RADEON_LIBS + fi + ;; +esac +AC_SUBST([RADEON_CFLAGS]) +AC_SUBST([RADEON_LDFLAGS]) + + +dnl +dnl OSMesa configuration +dnl +if test "$mesa_driver" = xlib; then + default_gl_osmesa=yes +else + default_gl_osmesa=no +fi +AC_ARG_ENABLE([gl-osmesa], + [AS_HELP_STRING([--enable-gl-osmesa], + [enable OSMesa with libGL @<:@default=enabled for xlib driver@:>@])], + [gl_osmesa="$enableval"], + [gl_osmesa="$default_gl_osmesa"]) +if test "x$gl_osmesa" = xyes; then + if test "x$enable_opengl" = xno; then + AC_MSG_ERROR([OpenGL is not available for OSMesa driver]) + fi + if test "$mesa_driver" = osmesa; then + AC_MSG_ERROR([libGL is not available for OSMesa driver]) + else + DRIVER_DIRS="$DRIVER_DIRS osmesa" + fi +fi + +dnl Configure the channel bits for OSMesa (libOSMesa, libOSMesa16, ...) +AC_ARG_WITH([osmesa-bits], + [AS_HELP_STRING([--with-osmesa-bits=BITS], + [OSMesa channel bits and library name: 8, 16, 32 @<:@default=8@:>@])], + [osmesa_bits="$withval"], + [osmesa_bits=8]) +if test "$mesa_driver" != osmesa && test "x$osmesa_bits" != x8; then + AC_MSG_WARN([Ignoring OSMesa channel bits for non-OSMesa driver]) + osmesa_bits=8 +fi +case "x$osmesa_bits" in +x8) + OSMESA_LIB=OSMesa + ;; +x16|x32) + OSMESA_LIB="OSMesa$osmesa_bits" + DEFINES="$DEFINES -DCHAN_BITS=$osmesa_bits -DDEFAULT_SOFTWARE_DEPTH_BITS=31" + ;; +*) + AC_MSG_ERROR([OSMesa bits '$osmesa_bits' is not a valid option]) + ;; +esac +AC_SUBST([OSMESA_LIB]) + +case "$DRIVER_DIRS" in +*osmesa*) + # only link libraries with osmesa if shared + if test "$enable_static" = no; then + OSMESA_LIB_DEPS="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS" + else + OSMESA_LIB_DEPS="" + fi + OSMESA_MESA_DEPS="" + OSMESA_PC_LIB_PRIV="-lm -lpthread $SELINUX_LIBS $DLOPEN_LIBS" + ;; +esac +AC_SUBST([OSMESA_LIB_DEPS]) +AC_SUBST([OSMESA_MESA_DEPS]) +AC_SUBST([OSMESA_PC_REQ]) +AC_SUBST([OSMESA_PC_LIB_PRIV]) + +dnl +dnl EGL configuration +dnl +AC_ARG_ENABLE([egl], + [AS_HELP_STRING([--disable-egl], + [disable EGL library @<:@default=enabled@:>@])], + [enable_egl="$enableval"], + [enable_egl=yes]) +if test "x$enable_egl" = xno; then + if test "x$mesa_driver" = xno; then + AC_MSG_ERROR([cannot disable EGL when there is no mesa driver]) + fi + if test "x$enable_openvg" = xyes; then + AC_MSG_ERROR([cannot enable OpenVG without EGL]) + fi +fi +if test "x$enable_egl" = xyes; then + SRC_DIRS="$SRC_DIRS egl" + EGL_LIB_DEPS="$DLOPEN_LIBS $SELINUX_LIBS -lpthread" + EGL_DRIVERS_DIRS="" + if test "$enable_static" != yes; then + # build egl_glx when libGL is built + if test "$mesa_driver" = xlib -o "$mesa_driver" = dri; then + EGL_DRIVERS_DIRS="glx" + fi + + PKG_CHECK_MODULES([LIBUDEV], [libudev > 150], + [have_libudev=yes],[have_libudev=no]) + if test "$mesa_driver" = dri; then + # build egl_dri2 when xcb-dri2 is available + PKG_CHECK_MODULES([XCB_DRI2], [x11-xcb xcb-dri2 xcb-xfixes], + [have_xcb_dri2=yes],[have_xcb_dri2=no]) + + if test "$have_xcb_dri2" = yes; then + EGL_DRIVER_DRI2=dri2 + DEFINES="$DEFINES -DHAVE_XCB_DRI2" + if test "$have_libudev" = yes; then + DEFINES="$DEFINES -DHAVE_LIBUDEV" + fi + # workaround a bug in xcb-dri2 generated by xcb-proto 1.6 + AC_CHECK_LIB(xcb-dri2, xcb_dri2_connect_alignment_pad, [], + [DEFINES="$DEFINES -DXCB_DRI2_CONNECT_DEVICE_NAME_BROKEN"]) + fi + fi + + EGL_DRIVERS_DIRS="$EGL_DRIVERS_DIRS $EGL_DRIVER_DRI2" + fi +fi +AC_SUBST([EGL_LIB_DEPS]) +AC_SUBST([EGL_DRIVERS_DIRS]) + +dnl +dnl GLU configuration +dnl +AC_ARG_ENABLE([glu], + [AS_HELP_STRING([--disable-glu], + [enable OpenGL Utility library @<:@default=enabled@:>@])], + [enable_glu="$enableval"], + [enable_glu=yes]) + +if test "x$enable_glu" = xyes -a "x$mesa_driver" = xno; then + AC_MSG_NOTICE([Disabling GLU since there is no OpenGL driver]) + enable_glu=no +fi + +if test "x$enable_glu" = xyes; then + SRC_DIRS="$SRC_DIRS glu" + + case "$mesa_driver" in + osmesa) + # Link libGLU to libOSMesa instead of libGL + GLU_LIB_DEPS="" + GLU_PC_REQ="osmesa" + if test "$enable_static" = no; then + GLU_MESA_DEPS='-l$(OSMESA_LIB)' + else + GLU_MESA_DEPS="" + fi + ;; + *) + # If static, empty GLU_LIB_DEPS and add libs for programs to link + GLU_PC_REQ="gl" + GLU_PC_LIB_PRIV="-lm" + if test "$enable_static" = no; then + GLU_LIB_DEPS="-lm" + GLU_MESA_DEPS='-l$(GL_LIB)' + else + GLU_LIB_DEPS="" + GLU_MESA_DEPS="" + APP_LIB_DEPS="$APP_LIB_DEPS -lstdc++" + fi + ;; + esac +fi +if test "$enable_static" = no; then + GLU_LIB_DEPS="$GLU_LIB_DEPS $OS_CPLUSPLUS_LIBS" +fi +GLU_PC_LIB_PRIV="$GLU_PC_LIB_PRIV $OS_CPLUSPLUS_LIBS" +AC_SUBST([GLU_LIB_DEPS]) +AC_SUBST([GLU_MESA_DEPS]) +AC_SUBST([GLU_PC_REQ]) +AC_SUBST([GLU_PC_REQ_PRIV]) +AC_SUBST([GLU_PC_LIB_PRIV]) +AC_SUBST([GLU_PC_CFLAGS]) + +dnl +dnl GLw configuration +dnl +AC_ARG_ENABLE([glw], + [AS_HELP_STRING([--disable-glw], + [enable Xt/Motif widget library @<:@default=enabled@:>@])], + [enable_glw="$enableval"], + [enable_glw=yes]) +dnl Don't build GLw on osmesa +if test "x$enable_glw" = xyes; then + case "$mesa_driver" in + osmesa|no) + AC_MSG_NOTICE([Disabling GLw since there is no OpenGL driver]) + enable_glw=no + ;; + esac +fi +AC_ARG_ENABLE([motif], + [AS_HELP_STRING([--enable-motif], + [use Motif widgets in GLw @<:@default=disabled@:>@])], + [enable_motif="$enableval"], + [enable_motif=no]) + +if test "x$enable_glw" = xyes; then + SRC_DIRS="$SRC_DIRS glw" + if test "$x11_pkgconfig" = yes; then + PKG_CHECK_MODULES([GLW],[x11 xt]) + GLW_PC_REQ_PRIV="x11 xt" + GLW_LIB_DEPS="$GLW_LIBS" + else + # should check these... + GLW_LIB_DEPS="$X_LIBS -lXt -lX11" + GLW_PC_LIB_PRIV="$GLW_LIB_DEPS" + GLW_PC_CFLAGS="$X11_INCLUDES" + fi + + GLW_SOURCES="GLwDrawA.c" + MOTIF_CFLAGS= + if test "x$enable_motif" = xyes; then + GLW_SOURCES="$GLW_SOURCES GLwMDrawA.c" + AC_PATH_PROG([MOTIF_CONFIG], [motif-config], [no]) + if test "x$MOTIF_CONFIG" != xno; then + MOTIF_CFLAGS=`$MOTIF_CONFIG --cflags` + MOTIF_LIBS=`$MOTIF_CONFIG --libs` + else + AC_CHECK_HEADER([Xm/PrimitiveP.h], [], + [AC_MSG_ERROR([Can't locate Motif headers])]) + AC_CHECK_LIB([Xm], [XmGetPixmap], [MOTIF_LIBS="-lXm"], + [AC_MSG_ERROR([Can't locate Motif Xm library])]) + fi + # MOTIF_LIBS is prepended to GLW_LIB_DEPS since Xm needs Xt/X11 + GLW_LIB_DEPS="$MOTIF_LIBS $GLW_LIB_DEPS" + GLW_PC_LIB_PRIV="$MOTIF_LIBS $GLW_PC_LIB_PRIV" + GLW_PC_CFLAGS="$MOTIF_CFLAGS $GLW_PC_CFLAGS" + fi + + # If static, empty GLW_LIB_DEPS and add libs for programs to link + GLW_PC_LIB_PRIV="$GLW_PC_LIB_PRIV" + if test "$enable_static" = no; then + GLW_MESA_DEPS='-l$(GL_LIB)' + GLW_LIB_DEPS="$GLW_LIB_DEPS" + else + APP_LIB_DEPS="$APP_LIB_DEPS $GLW_LIB_DEPS" + GLW_LIB_DEPS="" + GLW_MESA_DEPS="" + fi +fi +AC_SUBST([GLW_LIB_DEPS]) +AC_SUBST([GLW_MESA_DEPS]) +AC_SUBST([GLW_SOURCES]) +AC_SUBST([MOTIF_CFLAGS]) +AC_SUBST([GLW_PC_REQ_PRIV]) +AC_SUBST([GLW_PC_LIB_PRIV]) +AC_SUBST([GLW_PC_CFLAGS]) + +dnl +dnl GLUT configuration +dnl +if test -f "$srcdir/include/GL/glut.h"; then + default_glut=yes +else + default_glut=no +fi +AC_ARG_ENABLE([glut], + [AS_HELP_STRING([--disable-glut], + [enable GLUT library @<:@default=enabled if source available@:>@])], + [enable_glut="$enableval"], + [enable_glut="$default_glut"]) + +dnl Don't build glut on osmesa +if test "x$enable_glut" = xyes; then + case "$mesa_driver" in + osmesa|no) + AC_MSG_NOTICE([Disabling glut since there is no OpenGL driver]) + enable_glut=no + ;; + esac +fi +dnl Can't build glut if GLU not available +if test "x$enable_glu$enable_glut" = xnoyes; then + AC_MSG_WARN([Disabling glut since GLU is disabled]) + enable_glut=no +fi + +if test "x$enable_glut" = xyes; then + SRC_DIRS="$SRC_DIRS glut/glx" + if test "$x11_pkgconfig" = yes; then + PKG_CHECK_MODULES([GLUT],[x11 xmu xi]) + GLUT_PC_REQ_PRIV="x11 xmu xi" + GLUT_LIB_DEPS="$GLUT_LIBS" + else + # should check these... + GLUT_LIB_DEPS="$X_LIBS -lX11 -lXmu -lXi" + GLUT_PC_LIB_PRIV="$GLUT_LIB_DEPS" + GLUT_PC_CFLAGS="$X11_INCLUDES" + fi + if test "x$GCC" = xyes; then + GLUT_CFLAGS="$GLUT_CFLAGS -fexceptions" + fi + GLUT_LIB_DEPS="$GLUT_LIB_DEPS -lm" + GLUT_PC_LIB_PRIV="$GLUT_PC_LIB_PRIV -lm" + + # If static, empty GLUT_LIB_DEPS and add libs for programs to link + if test "$enable_static" = no; then + GLUT_MESA_DEPS='-l$(GLU_LIB) -l$(GL_LIB)' + else + APP_LIB_DEPS="$APP_LIB_DEPS $GLUT_LIB_DEPS" + GLUT_LIB_DEPS="" + GLUT_MESA_DEPS="" + fi +fi +AC_SUBST([GLUT_LIB_DEPS]) +AC_SUBST([GLUT_MESA_DEPS]) +AC_SUBST([GLUT_CFLAGS]) +AC_SUBST([GLUT_PC_REQ_PRIV]) +AC_SUBST([GLUT_PC_LIB_PRIV]) +AC_SUBST([GLUT_PC_CFLAGS]) + +dnl +dnl Program library dependencies +dnl Only libm is added here if necessary as the libraries should +dnl be pulled in by the linker +dnl +if test "x$APP_LIB_DEPS" = x; then + case "$host_os" in + solaris*) + APP_LIB_DEPS="-lX11 -lsocket -lnsl -lm" + ;; + cygwin*) + APP_LIB_DEPS="-lX11" + ;; + *) + APP_LIB_DEPS="-lm" + ;; + esac +fi +AC_SUBST([APP_LIB_DEPS]) +AC_SUBST([PROGRAM_DIRS]) + +dnl +dnl Gallium configuration +dnl +AC_ARG_ENABLE([gallium], + [AS_HELP_STRING([--disable-gallium], + [build gallium @<:@default=enabled@:>@])], + [enable_gallium="$enableval"], + [enable_gallium=yes]) +if test "x$enable_gallium" = xno -a "x$enable_openvg" = xyes; then + AC_MSG_ERROR([cannot enable OpenVG without Gallium]) +fi +if test "x$enable_gallium" = xyes; then + SRC_DIRS="$SRC_DIRS gallium gallium/winsys gallium/targets" + AC_PATH_PROG([LLVM_CONFIG], [llvm-config], [no]) +fi + +AC_SUBST([LLVM_CFLAGS]) +AC_SUBST([LLVM_LIBS]) +AC_SUBST([LLVM_LDFLAGS]) +AC_SUBST([LLVM_VERSION]) + +dnl +dnl Gallium state trackers configuration +dnl + +AC_ARG_ENABLE([gallium-egl], + [AS_HELP_STRING([--enable-gallium-egl], + [enable gallium EGL state tracker @<:@default=auto@:>@])], + [enable_gallium_egl="$enableval"], + [enable_gallium_egl=auto]) +if test "x$enable_gallium_egl" = xauto; then + case "$mesa_driver" in + dri|no) + enable_gallium_egl=$enable_egl + ;; + *) + enable_gallium_egl=$enable_openvg + ;; + esac +fi +case "x$enable_egl$enable_gallium_egl" in +xnoyes) + AC_MSG_ERROR([cannot build Gallium EGL state tracker without EGL]) +esac + +AC_ARG_WITH([state-trackers], + [AS_HELP_STRING([--with-state-trackers@<:@=DIRS...@:>@], + [comma delimited state_trackers list, e.g. + "egl,glx" @<:@default=auto@:>@])], + [with_state_trackers="$withval"], + [with_state_trackers=yes]) + +case "$with_state_trackers" in +no) + GALLIUM_STATE_TRACKERS_DIRS="" + ;; +yes) + # look at what else is built + case "$mesa_driver" in + xlib) + GALLIUM_STATE_TRACKERS_DIRS=glx + ;; + dri) + GALLIUM_STATE_TRACKERS_DIRS="dri" + HAVE_ST_DRI="yes" + # Have only tested st/xorg on 1.6.0 servers + PKG_CHECK_MODULES(XORG, [xorg-server >= 1.6.0 libdrm >= $LIBDRM_XORG_REQUIRED libkms >= $LIBKMS_XORG_REQUIRED], + HAVE_ST_XORG="yes"; GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS xorg", + HAVE_ST_XORG="no") + ;; + esac + + if test "x$enable_egl" = xyes; then + if test "$enable_openvg" = yes; then + GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS vega" + st_egl="yes" + fi + + if test "$enable_gallium_egl" = yes; then + GALLIUM_STATE_TRACKERS_DIRS="$GALLIUM_STATE_TRACKERS_DIRS egl" + HAVE_ST_EGL="yes" + fi + fi + ;; +*) + # verify the requested state tracker exist + state_trackers="" + _state_trackers=`IFS=', '; echo $with_state_trackers` + for tracker in $_state_trackers; do + case "$tracker" in + dri) + if test "x$mesa_driver" != xdri; then + AC_MSG_ERROR([cannot build dri state tracker without mesa driver set to dri]) + fi + HAVE_ST_DRI="yes" + ;; + egl) + if test "x$enable_egl" != xyes; then + AC_MSG_ERROR([cannot build egl state tracker without EGL library]) + fi + HAVE_ST_EGL="yes" + ;; + xorg) + PKG_CHECK_MODULES([XORG], [xorg-server >= 1.6.0]) + PKG_CHECK_MODULES([LIBDRM_XORG], [libdrm >= $LIBDRM_XORG_REQUIRED]) + PKG_CHECK_MODULES([LIBKMS_XORG], [libkms >= $LIBKMS_XORG_REQUIRED]) + HAVE_ST_XORG="yes" + ;; + vega) + if test "x$enable_openvg" != xyes; then + AC_MSG_ERROR([cannot build vega state tracker without --enable-openvg]) + fi + have_st_vega="yes" + ;; + esac + + if test -n "$tracker"; then + test -d "$srcdir/src/gallium/state_trackers/$tracker" || \ + AC_MSG_ERROR([state tracker '$tracker' doesn't exist]) + if test -n "$state_trackers"; then + state_trackers="$state_trackers $tracker" + else + state_trackers="$tracker" + fi + fi + done + GALLIUM_STATE_TRACKERS_DIRS="$state_trackers" + + # append --enable-openvg/--enable-gallium-egl to --with-state-trackers + if test "x$have_st_vega" != xyes -a "x$enable_openvg" = xyes; then + AC_MSG_ERROR([--with-state-trackers specified but vega is missing]) + fi + if test "x$HAVE_ST_EGL" != xyes -a "x$enable_gallium_egl" = xyes; then + AC_MSG_ERROR([--with-state-trackers specified but egl is missing]) + fi + ;; +esac + + +EGL_CLIENT_APIS="" +VG_LIB_DEPS="" + +case "x$enable_opengl$enable_gles1$enable_gles2" in +x*yes*) + EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(GL_LIB)' + ;; +esac +if test "x$enable_openvg" = xyes; then + EGL_CLIENT_APIS="$EGL_CLIENT_APIS "'$(VG_LIB)' + VG_LIB_DEPS="$VG_LIB_DEPS $SELINUX_LIBS -lpthread" +fi + +AC_SUBST([VG_LIB_DEPS]) +AC_SUBST([EGL_CLIENT_APIS]) + +if test "x$HAVE_ST_EGL" = xyes; then + GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS egl" +fi + +if test "x$HAVE_ST_XORG" = xyes; then + PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1], + HAVE_XEXTPROTO_71="yes"; DEFINES="$DEFINES -DHAVE_XEXTPROTO_71", + HAVE_XEXTPROTO_71="no") +fi + +AC_ARG_WITH([egl-platforms], + [AS_HELP_STRING([--with-egl-platforms@<:@=DIRS...@:>@], + [comma delimited native platforms libEGL supports, e.g. + "x11,drm" @<:@default=auto@:>@])], + [with_egl_platforms="$withval"], + [with_egl_platforms=yes]) +AC_ARG_WITH([egl-displays], + [AS_HELP_STRING([--with-egl-displays@<:@=DIRS...@:>@], + [DEPRECATED. Use --with-egl-platforms instead])], + [with_egl_platforms="$withval"]) + +EGL_PLATFORMS="" +WAYLAND_EGL_LIB_DEPS="" + +case "$with_egl_platforms" in +yes) + if test "x$enable_egl" = xyes && test "x$mesa_driver" != xosmesa; then + EGL_PLATFORMS="x11" + if test "$mesa_driver" = dri; then + EGL_PLATFORMS="$EGL_PLATFORMS drm" + fi + fi + ;; +*) + if test "x$enable_egl" != xyes; then + AC_MSG_ERROR([cannot build egl state tracker without EGL library]) + fi + # verify the requested driver directories exist + egl_platforms=`IFS=', '; echo $with_egl_platforms` + for plat in $egl_platforms; do + test -d "$srcdir/src/gallium/state_trackers/egl/$plat" || \ + AC_MSG_ERROR([EGL platform '$plat' doesn't exist]) + if test "$plat" = "fbdev"; then + GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/fbdev" + fi + if test "$plat" = "wayland"; then + PKG_CHECK_MODULES([WAYLAND], [wayland-client wayland-server],, \ + [AC_MSG_ERROR([cannot find libwayland-client])]) + WAYLAND_EGL_LIB_DEPS="$WAYLAND_LIBS $LIBDRM_LIBS" + GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS sw/wayland" + fi + done + EGL_PLATFORMS="$egl_platforms" + ;; +esac +AC_SUBST([EGL_PLATFORMS]) + +AC_SUBST([WAYLAND_EGL_LIB_DEPS]) +WAYLAND_EGL_PC_REQ_PRIV="wayland-client libdrm" +WAYLAND_EGL_PC_LIB_PRIV= +WAYLAND_EGL_PC_CFLAGS= + +AC_SUBST([WAYLAND_EGL_PC_REQ_PRIV]) +AC_SUBST([WAYLAND_EGL_PC_LIB_PRIV]) +AC_SUBST([WAYLAND_EGL_PC_CFLAGS]) + + +AC_ARG_WITH([egl-driver-dir], + [AS_HELP_STRING([--with-egl-driver-dir=DIR], + [directory for EGL drivers [[default=${libdir}/egl]]])], + [EGL_DRIVER_INSTALL_DIR="$withval"], + [EGL_DRIVER_INSTALL_DIR='${libdir}/egl']) +AC_SUBST([EGL_DRIVER_INSTALL_DIR]) + +AC_ARG_WITH([xorg-driver-dir], + [AS_HELP_STRING([--with-xorg-driver-dir=DIR], + [Default xorg driver directory[[default=${libdir}/xorg/modules/drivers]]])], + [XORG_DRIVER_INSTALL_DIR="$withval"], + [XORG_DRIVER_INSTALL_DIR="${libdir}/xorg/modules/drivers"]) +AC_SUBST([XORG_DRIVER_INSTALL_DIR]) + +AC_ARG_WITH([max-width], + [AS_HELP_STRING([--with-max-width=N], + [Maximum framebuffer width (4096)])], + [DEFINES="${DEFINES} -DMAX_WIDTH=${withval}"; + AS_IF([test "${withval}" -gt "4096"], + [AC_MSG_WARN([Large framebuffer: see s_tritemp.h comments.])])] +) +AC_ARG_WITH([max-height], + [AS_HELP_STRING([--with-max-height=N], + [Maximum framebuffer height (4096)])], + [DEFINES="${DEFINES} -DMAX_HEIGHT=${withval}"; + AS_IF([test "${withval}" -gt "4096"], + [AC_MSG_WARN([Large framebuffer: see s_tritemp.h comments.])])] +) + +dnl +dnl Gallium LLVM +dnl +AC_ARG_ENABLE([gallium-llvm], + [AS_HELP_STRING([--enable-gallium-llvm], + [build gallium LLVM support @<:@default=enabled on x86/x86_64@:>@])], + [enable_gallium_llvm="$enableval"], + [enable_gallium_llvm=auto]) +if test "x$enable_gallium_llvm" = xauto; then + case "$host_cpu" in + i*86|x86_64) enable_gallium_llvm=yes;; + esac +fi +if test "x$enable_gallium_llvm" = xyes; then + if test "x$LLVM_CONFIG" != xno; then + LLVM_VERSION=`$LLVM_CONFIG --version` + LLVM_CFLAGS=`$LLVM_CONFIG --cppflags` + LLVM_LIBS="`$LLVM_CONFIG --libs` -lstdc++" + + LLVM_LDFLAGS=`$LLVM_CONFIG --ldflags` + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS llvmpipe" + DEFINES="$DEFINES -DGALLIUM_LLVMPIPE -D__STDC_CONSTANT_MACROS" + MESA_LLVM=1 + else + MESA_LLVM=0 + fi +else + MESA_LLVM=0 +fi + +dnl +dnl Gallium helper functions +dnl +gallium_check_st() { + if test "x$HAVE_ST_DRI" = xyes || test "x$HAVE_ST_XORG" = xyes; then + GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS $1" + fi + if test "x$HAVE_ST_DRI" = xyes && test "x$2" != x; then + GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $2" + fi + if test "x$HAVE_ST_XORG" = xyes && test "x$3" != x; then + GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS $3" + fi +} + + +dnl +dnl Gallium SVGA configuration +dnl +AC_ARG_ENABLE([gallium-svga], + [AS_HELP_STRING([--enable-gallium-svga], + [build gallium SVGA @<:@default=disabled@:>@])], + [enable_gallium_svga="$enableval"], + [enable_gallium_svga=auto]) +if test "x$enable_gallium_svga" = xyes; then + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga" + gallium_check_st "svga/drm" "dri-vmwgfx" "xorg-vmwgfx" +elif test "x$enable_gallium_svga" = xauto; then + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS svga" +fi + +dnl +dnl Gallium i915 configuration +dnl +AC_ARG_ENABLE([gallium-i915], + [AS_HELP_STRING([--enable-gallium-i915], + [build gallium i915 @<:@default=disabled@:>@])], + [enable_gallium_i915="$enableval"], + [enable_gallium_i915=auto]) +if test "x$enable_gallium_i915" = xyes; then + GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS i915/sw" + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915" + gallium_check_st "i915/drm" "dri-i915" "xorg-i915" +elif test "x$enable_gallium_i915" = xauto; then + GALLIUM_WINSYS_DIRS="$GALLIUM_WINSYS_DIRS i915/sw" + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i915" +fi + +dnl +dnl Gallium i965 configuration +dnl +AC_ARG_ENABLE([gallium-i965], + [AS_HELP_STRING([--enable-gallium-i965], + [build gallium i965 @<:@default=disabled@:>@])], + [enable_gallium_i965="$enableval"], + [enable_gallium_i965=auto]) +if test "x$enable_gallium_i965" = xyes; then + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i965" + gallium_check_st "i965/drm" "dri-i965" "xorg-i965" +elif test "x$enable_gallium_i965" = xauto; then + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS i965" +fi + +dnl +dnl Gallium Radeon r300g configuration +dnl +AC_ARG_ENABLE([gallium-r300], + [AS_HELP_STRING([--enable-gallium-r300], + [build gallium r300 @<:@default=build DRI driver only@:>@])], + [enable_gallium_r300="$enableval"], + [enable_gallium_r300=auto]) + +if test "$mesa_driver" != dri ; then + if test "x$enable_gallium_r300" = xauto; then + enable_gallium_r300=no + fi +fi + +if test "x$enable_gallium_r300" != xno; then + if test "x$MESA_LLVM" = x0; then + case "$host_cpu" in + i*86|x86_64) AC_MSG_ERROR([LLVM is required to build Gallium R300 on x86 and x86_64]);; + esac + fi +fi +if test "x$enable_gallium_r300" = xauto; then + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300" + gallium_check_st "radeon/drm" "dri-r300" +elif test "x$enable_gallium_r300" = xyes; then + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r300" + gallium_check_st "radeon/drm" "dri-r300" "xorg-radeon" +fi + +dnl +dnl Gallium Radeon r600g configuration +dnl +AC_ARG_ENABLE([gallium-r600], + [AS_HELP_STRING([--enable-gallium-r600], + [build gallium r600 @<:@default=disabled@:>@])], + [enable_gallium_r600="$enableval"], + [enable_gallium_r600=auto]) +if test "x$enable_gallium_r600" = xyes; then + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS r600" + gallium_check_st "r600/drm" "dri-r600" +fi + +dnl +dnl Gallium Nouveau configuration +dnl +AC_ARG_ENABLE([gallium-nouveau], + [AS_HELP_STRING([--enable-gallium-nouveau], + [build gallium nouveau @<:@default=disabled@:>@])], + [enable_gallium_nouveau="$enableval"], + [enable_gallium_nouveau=no]) +if test "x$enable_gallium_nouveau" = xyes; then + GALLIUM_DRIVERS_DIRS="$GALLIUM_DRIVERS_DIRS nouveau nvfx nv50 nvc0" + gallium_check_st "nouveau/drm" "dri-nouveau" "xorg-nouveau" +fi + +dnl +dnl Gallium swrast configuration +dnl +AC_ARG_ENABLE([gallium-swrast], + [AS_HELP_STRING([--enable-gallium-swrast], + [build gallium swrast @<:@default=auto@:>@])], + [enable_gallium_swrast="$enableval"], + [enable_gallium_swrast=auto]) +if test "x$enable_gallium_swrast" = xyes || test "x$enable_gallium_swrast" = xauto; then + if test "x$HAVE_ST_DRI" = xyes; then + GALLIUM_TARGET_DIRS="$GALLIUM_TARGET_DIRS dri-swrast" + fi +fi + +dnl prepend CORE_DIRS to SRC_DIRS +SRC_DIRS="$CORE_DIRS $SRC_DIRS" + +dnl Restore LDFLAGS and CPPFLAGS +LDFLAGS="$_SAVE_LDFLAGS" +CPPFLAGS="$_SAVE_CPPFLAGS" + +dnl Substitute the config +AC_CONFIG_FILES([configs/autoconf]) + +dnl Replace the configs/current symlink +AC_CONFIG_COMMANDS([configs],[ +if test -f configs/current || test -L configs/current; then + rm -f configs/current +fi +ln -s autoconf configs/current +]) + +AC_OUTPUT + +dnl +dnl Output some configuration info for the user +dnl +echo "" +echo " prefix: $prefix" +echo " exec_prefix: $exec_prefix" +echo " libdir: $libdir" +echo " includedir: $includedir" + +dnl API info +echo "" +echo " OpenGL: $enable_opengl (ES1: $enable_gles1 ES2: $enable_gles2)" +echo " OpenVG: $enable_openvg" + +dnl Driver info +echo "" +echo " Driver: $mesa_driver" +if test "$mesa_driver" != no; then + if echo "$DRIVER_DIRS" | grep 'osmesa' >/dev/null 2>&1; then + echo " OSMesa: lib$OSMESA_LIB" + else + echo " OSMesa: no" + fi + if test "$mesa_driver" = dri; then + # cleanup the drivers var + dri_dirs=`echo $DRI_DIRS | $SED 's/^ *//;s/ */ /;s/ *$//'` + if test "x$DRI_DIRS" = x; then + echo " DRI drivers: no" + else + echo " DRI drivers: $dri_dirs" + fi + echo " DRI driver dir: $DRI_DRIVER_INSTALL_DIR" + echo " Use XCB: $enable_xcb" + echo " Shared dricore: $enable_dricore" + fi +fi +echo "" +echo " GLU: $enable_glu" +echo " GLw: $enable_glw (Motif: $enable_motif)" +echo " glut: $enable_glut" + +dnl EGL +echo "" +echo " EGL: $enable_egl" +if test "$enable_egl" = yes; then + echo " EGL platforms: $EGL_PLATFORMS" + + egl_drivers="" + for d in $EGL_DRIVERS_DIRS; do + egl_drivers="$egl_drivers builtin:egl_$d" + done + + if test "$enable_gallium" = yes -a "$HAVE_ST_EGL" = yes; then + echo " EGL drivers: ${egl_drivers} egl_gallium" + echo " EGL Gallium STs:$EGL_CLIENT_APIS" + else + echo " EGL drivers: $egl_drivers" + fi +fi + +echo "" +if test "x$MESA_LLVM" = x1; then + echo " llvm: yes" + echo " llvm-config: $LLVM_CONFIG" + echo " llvm-version: $LLVM_VERSION" +else + echo " llvm: no" +fi + +echo "" +if echo "$SRC_DIRS" | grep 'gallium' >/dev/null 2>&1; then + echo " Gallium: yes" + echo " Gallium dirs: $GALLIUM_DIRS" + echo " Target dirs: $GALLIUM_TARGET_DIRS" + echo " Winsys dirs: $GALLIUM_WINSYS_DIRS" + echo " Driver dirs: $GALLIUM_DRIVERS_DIRS" + echo " Trackers dirs: $GALLIUM_STATE_TRACKERS_DIRS" +else + echo " Gallium: no" +fi + +dnl Libraries +echo "" +echo " Shared libs: $enable_shared" +echo " Static libs: $enable_static" + +dnl Compiler options +# cleanup the CFLAGS/CXXFLAGS/DEFINES vars +cflags=`echo $CFLAGS $OPT_FLAGS $PIC_FLAGS $ARCH_FLAGS | \ + $SED 's/^ *//;s/ */ /;s/ *$//'` +cxxflags=`echo $CXXFLAGS $OPT_FLAGS $PIC_FLAGS $ARCH_FLAGS | \ + $SED 's/^ *//;s/ */ /;s/ *$//'` +defines=`echo $DEFINES $ASM_FLAGS | $SED 's/^ *//;s/ */ /;s/ *$//'` +echo "" +echo " CFLAGS: $cflags" +echo " CXXFLAGS: $cxxflags" +echo " Macros: $defines" +echo "" +echo " PYTHON2: $PYTHON2" + +echo "" +echo " Run '${MAKE-make}' to build Mesa" +echo "" diff --git a/mesalib/docs/relnotes-7.11.html b/mesalib/docs/relnotes-7.11.html index f2ff9c7c5..b80179aaf 100644 --- a/mesalib/docs/relnotes-7.11.html +++ b/mesalib/docs/relnotes-7.11.html @@ -1,85 +1,86 @@ - - - -Mesa Release Notes - - - - - - - - -

Mesa 7.11 Release Notes / (release date TBD)

- -

-Mesa 7.11 is a new development release. -People who are concerned with stability and reliability should stick -with a previous release or wait for Mesa 7.11.1. -

-

-Mesa 7.11 implements the OpenGL 2.1 API, but the version reported by -glGetString(GL_VERSION) depends on the particular driver being used. -Some drivers don't support all the features required in OpenGL 2.1. -

-

-See the Compiling/Installing page for prerequisites -for DRI hardware acceleration. -

- - -

MD5 checksums

-
-tbd
-
- - -

New features

-
    -
  • GL_ARB_ES2_compatibility (gallium drivers) -
  • GL_ARB_color_buffer_float (gallium drivers, i965) -
  • GL_ARB_draw_buffers_blend (gallium) -
  • GL_ARB_draw_instanced extension (gallium drivers, swrast) -
  • GL_ARB_instanced_arrays extension (gallium drivers) -
  • GL_ARB_occlusion_query2 (gallium drivers, swrast) -
  • GL_ARB_robustness (all drivers) -
  • GL_ARB_sampler_objects (gallium drivers) -
  • GL_ARB_seamless_cube_map (gallium r600) -
  • GL_ARB_shader_texture_lod (gallium drivers) -
  • GL_ARB_sync (gallium drivers only, intel support was in 7.6) -
  • GL_ARB_texture_compression_rgtc (gallium drivers, swrast, i965) -
  • GL_ARB_texture_float (gallium, i965) -
  • GL_EXT_packed_float (gallium r600) -
  • GL_EXT_texture_compression_latc (gallium drivers, swrast) -
  • GL_EXT_texture_compression_rgtc (gallium drivers, swrast, i965) -
  • GL_EXT_texture_shared_exponent (gallium drivers, swrast) -
  • GL_EXT_texture_sRGB_decode (gallium drivers, swrast, i965) -
  • GL_EXT_texture_snorm (gallium drivers) -
  • GL_AMD_draw_buffers_blend (alias of the ARB variant) -
  • GL_AMD_seamless_cubemap_per_texture (gallium r600) -
  • GL_AMD_shader_stencil_export (alias of the ARB variant) -
  • GL_ATI_draw_buffers (all drivers) -
  • GL_ATI_texture_compression_3dc (gallium drivers, swrast) -
  • GL_ATI_texture_float (gallium, i965) -
  • GL_NV_conditional_render (i965) -
  • GL_NV_texture_barrier (gallium drivers) -
- - -

Bug fixes

-
    -
- - -

Changes

-
    -
  • The Windows MSVC project files have been removed. -They haven't been maintained in quite a while. -Building with SCons is an alternative. -
  • Removed GL_SGI_texture_color_table support from swrast driver - the only -driver that implemented it. -
- - - - + + + +Mesa Release Notes + + + + + + + + +

Mesa 7.11 Release Notes / (release date TBD)

+ +

+Mesa 7.11 is a new development release. +People who are concerned with stability and reliability should stick +with a previous release or wait for Mesa 7.11.1. +

+

+Mesa 7.11 implements the OpenGL 2.1 API, but the version reported by +glGetString(GL_VERSION) depends on the particular driver being used. +Some drivers don't support all the features required in OpenGL 2.1. +

+

+See the Compiling/Installing page for prerequisites +for DRI hardware acceleration. +

+ + +

MD5 checksums

+
+tbd
+
+ + +

New features

+
    +
  • GL_ARB_ES2_compatibility (gallium drivers) +
  • GL_ARB_color_buffer_float (gallium drivers, i965) +
  • GL_ARB_draw_buffers_blend (gallium) +
  • GL_ARB_draw_instanced extension (gallium drivers, swrast) +
  • GL_ARB_instanced_arrays extension (gallium drivers) +
  • GL_ARB_occlusion_query2 (gallium drivers, swrast) +
  • GL_ARB_robustness (all drivers) +
  • GL_ARB_sampler_objects (gallium drivers) +
  • GL_ARB_seamless_cube_map (gallium r600) +
  • GL_ARB_shader_texture_lod (gallium drivers) +
  • GL_ARB_sync (gallium drivers only, intel support was in 7.6) +
  • GL_ARB_texture_compression_rgtc (gallium drivers, swrast, i965) +
  • GL_ARB_texture_float (gallium, i965) +
  • GL_EXT_packed_float (gallium r600) +
  • GL_EXT_texture_compression_latc (gallium drivers, swrast) +
  • GL_EXT_texture_compression_rgtc (gallium drivers, swrast, i965) +
  • GL_EXT_texture_filter_anisotropic (swrast) +
  • GL_EXT_texture_shared_exponent (gallium drivers, swrast) +
  • GL_EXT_texture_sRGB_decode (gallium drivers, swrast, i965) +
  • GL_EXT_texture_snorm (gallium drivers) +
  • GL_AMD_draw_buffers_blend (alias of the ARB variant) +
  • GL_AMD_seamless_cubemap_per_texture (gallium r600) +
  • GL_AMD_shader_stencil_export (alias of the ARB variant) +
  • GL_ATI_draw_buffers (all drivers) +
  • GL_ATI_texture_compression_3dc (gallium drivers, swrast) +
  • GL_ATI_texture_float (gallium, i965) +
  • GL_NV_conditional_render (i965) +
  • GL_NV_texture_barrier (gallium drivers) +
+ + +

Bug fixes

+
    +
+ + +

Changes

+
    +
  • The Windows MSVC project files have been removed. +They haven't been maintained in quite a while. +Building with SCons is an alternative. +
  • Removed GL_SGI_texture_color_table support from swrast driver - the only +driver that implemented it. +
+ + + + diff --git a/mesalib/include/EGL/eglext.h b/mesalib/include/EGL/eglext.h index 3ac56bd59..7d49ff68a 100644 --- a/mesalib/include/EGL/eglext.h +++ b/mesalib/include/EGL/eglext.h @@ -1,398 +1,398 @@ -#ifndef __eglext_h_ -#define __eglext_h_ - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2007-2010 The Khronos Group Inc. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and/or associated documentation files (the -** "Materials"), to deal in the Materials without restriction, including -** without limitation the rights to use, copy, modify, merge, publish, -** distribute, sublicense, and/or sell copies of the Materials, and to -** permit persons to whom the Materials are furnished to do so, subject to -** the following conditions: -** -** The above copyright notice and this permission notice shall be included -** in all copies or substantial portions of the Materials. -** -** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. -*/ - -#include - -/*************************************************************/ - -/* Header file version number */ -/* Current version at http://www.khronos.org/registry/egl/ */ -/* $Revision$ on $Date: 2010-07-27 20:12:35 -0700 (Tue, 27 Jul 2010) $ */ -#define EGL_EGLEXT_VERSION 7 - -#ifndef EGL_KHR_config_attribs -#define EGL_KHR_config_attribs 1 -#define EGL_CONFORMANT_KHR 0x3042 /* EGLConfig attribute */ -#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020 /* EGL_SURFACE_TYPE bitfield */ -#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040 /* EGL_SURFACE_TYPE bitfield */ -#endif - -#ifndef EGL_KHR_lock_surface -#define EGL_KHR_lock_surface 1 -#define EGL_READ_SURFACE_BIT_KHR 0x0001 /* EGL_LOCK_USAGE_HINT_KHR bitfield */ -#define EGL_WRITE_SURFACE_BIT_KHR 0x0002 /* EGL_LOCK_USAGE_HINT_KHR bitfield */ -#define EGL_LOCK_SURFACE_BIT_KHR 0x0080 /* EGL_SURFACE_TYPE bitfield */ -#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100 /* EGL_SURFACE_TYPE bitfield */ -#define EGL_MATCH_FORMAT_KHR 0x3043 /* EGLConfig attribute */ -#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0 /* EGL_MATCH_FORMAT_KHR value */ -#define EGL_FORMAT_RGB_565_KHR 0x30C1 /* EGL_MATCH_FORMAT_KHR value */ -#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2 /* EGL_MATCH_FORMAT_KHR value */ -#define EGL_FORMAT_RGBA_8888_KHR 0x30C3 /* EGL_MATCH_FORMAT_KHR value */ -#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4 /* eglLockSurfaceKHR attribute */ -#define EGL_LOCK_USAGE_HINT_KHR 0x30C5 /* eglLockSurfaceKHR attribute */ -#define EGL_BITMAP_POINTER_KHR 0x30C6 /* eglQuerySurface attribute */ -#define EGL_BITMAP_PITCH_KHR 0x30C7 /* eglQuerySurface attribute */ -#define EGL_BITMAP_ORIGIN_KHR 0x30C8 /* eglQuerySurface attribute */ -#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9 /* eglQuerySurface attribute */ -#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA /* eglQuerySurface attribute */ -#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB /* eglQuerySurface attribute */ -#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC /* eglQuerySurface attribute */ -#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD /* eglQuerySurface attribute */ -#define EGL_LOWER_LEFT_KHR 0x30CE /* EGL_BITMAP_ORIGIN_KHR value */ -#define EGL_UPPER_LEFT_KHR 0x30CF /* EGL_BITMAP_ORIGIN_KHR value */ -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay display, EGLSurface surface); -#endif /* EGL_EGLEXT_PROTOTYPES */ -typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface); -#endif - -#ifndef EGL_KHR_image -#define EGL_KHR_image 1 -#define EGL_NATIVE_PIXMAP_KHR 0x30B0 /* eglCreateImageKHR target */ -typedef void *EGLImageKHR; -#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0) -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image); -#endif /* EGL_EGLEXT_PROTOTYPES */ -typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image); -#endif - -#ifndef EGL_KHR_vg_parent_image -#define EGL_KHR_vg_parent_image 1 -#define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */ -#endif - -#ifndef EGL_KHR_gl_texture_2D_image -#define EGL_KHR_gl_texture_2D_image 1 -#define EGL_GL_TEXTURE_2D_KHR 0x30B1 /* eglCreateImageKHR target */ -#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC /* eglCreateImageKHR attribute */ -#endif - -#ifndef EGL_KHR_gl_texture_cubemap_image -#define EGL_KHR_gl_texture_cubemap_image 1 -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 /* eglCreateImageKHR target */ -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 /* eglCreateImageKHR target */ -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 /* eglCreateImageKHR target */ -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 /* eglCreateImageKHR target */ -#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 /* eglCreateImageKHR target */ -#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 /* eglCreateImageKHR target */ -#endif - -#ifndef EGL_KHR_gl_texture_3D_image -#define EGL_KHR_gl_texture_3D_image 1 -#define EGL_GL_TEXTURE_3D_KHR 0x30B2 /* eglCreateImageKHR target */ -#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD /* eglCreateImageKHR attribute */ -#endif - -#ifndef EGL_KHR_gl_renderbuffer_image -#define EGL_KHR_gl_renderbuffer_image 1 -#define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */ -#endif - -#ifndef EGL_MESA_drm_image -#define EGL_MESA_drm_image 1 -#define EGL_DRM_BUFFER_FORMAT_MESA 0x31D0 /* eglCreateImageKHR attribute */ -#define EGL_DRM_BUFFER_USE_MESA 0x31D1 - -/* EGL_DRM_BUFFER_FORMAT_MESA tokens */ -#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2 - -/* EGL_DRM_BUFFER_USE_MESA bits */ -#define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x0001 -#define EGL_DRM_BUFFER_USE_SHARE_MESA 0x0002 -#define EGL_DRM_BUFFER_USE_CURSOR_MESA 0x0004 - -#define EGL_DRM_BUFFER_MESA 0x31D3 /* eglCreateImageKHR target */ -#define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4 /* eglCreateImageKHR attribute */ - -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA(EGLDisplay dpy, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA(EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); -#endif -typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESA) (EGLDisplay dpy, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESA) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); -#endif - -#ifndef EGL_WL_bind_wayland_display -#define EGL_WL_bind_wayland_display 1 - -#define EGL_WAYLAND_BUFFER_WL 0x31D5 /* eglCreateImageKHR target */ -struct wl_display; -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display); -EGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display); -#endif -typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display); -#endif - -#if KHRONOS_SUPPORT_INT64 /* EGLTimeKHR requires 64-bit uint support */ -#ifndef EGL_KHR_reusable_sync -#define EGL_KHR_reusable_sync 1 - -typedef void* EGLSyncKHR; -typedef khronos_utime_nanoseconds_t EGLTimeKHR; - -#define EGL_SYNC_STATUS_KHR 0x30F1 -#define EGL_SIGNALED_KHR 0x30F2 -#define EGL_UNSIGNALED_KHR 0x30F3 -#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5 -#define EGL_CONDITION_SATISFIED_KHR 0x30F6 -#define EGL_SYNC_TYPE_KHR 0x30F7 -#define EGL_SYNC_REUSABLE_KHR 0x30FA -#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 /* eglClientWaitSyncKHR bitfield */ -#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull -#define EGL_NO_SYNC_KHR ((EGLSyncKHR)0) -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync); -EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); -EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); -EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); -#endif /* EGL_EGLEXT_PROTOTYPES */ -typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync); -typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); -#endif -#endif - -/* EGL_MESA_screen extension >>> PRELIMINARY <<< */ -#ifndef EGL_MESA_screen_surface -#define EGL_MESA_screen_surface 1 - -#define EGL_BAD_SCREEN_MESA 0x4000 -#define EGL_BAD_MODE_MESA 0x4001 -#define EGL_SCREEN_COUNT_MESA 0x4002 -#define EGL_SCREEN_POSITION_MESA 0x4003 -#define EGL_SCREEN_POSITION_GRANULARITY_MESA 0x4004 -#define EGL_MODE_ID_MESA 0x4005 -#define EGL_REFRESH_RATE_MESA 0x4006 -#define EGL_OPTIMAL_MESA 0x4007 -#define EGL_INTERLACED_MESA 0x4008 -#define EGL_SCREEN_BIT_MESA 0x08 - -typedef khronos_uint32_t EGLScreenMESA; -typedef khronos_uint32_t EGLModeMESA; - -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglChooseModeMESA(EGLDisplay dpy, EGLScreenMESA screen, const EGLint *attrib_list, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); -EGLAPI EGLBoolean EGLAPIENTRY eglGetModesMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); -EGLAPI EGLBoolean EGLAPIENTRY eglGetModeAttribMESA(EGLDisplay dpy, EGLModeMESA mode, EGLint attribute, EGLint *value); -EGLAPI EGLBoolean EGLAPIENTRY eglGetScreensMESA(EGLDisplay dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens); -EGLAPI EGLSurface EGLAPIENTRY eglCreateScreenSurfaceMESA(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); -EGLAPI EGLBoolean EGLAPIENTRY eglShowScreenSurfaceMESA(EGLDisplay dpy, EGLint screen, EGLSurface surface, EGLModeMESA mode); -EGLAPI EGLBoolean EGLAPIENTRY eglScreenPositionMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLint x, EGLint y); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryScreenMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLint attribute, EGLint *value); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryScreenSurfaceMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLSurface *surface); -EGLAPI EGLBoolean EGLAPIENTRY eglQueryScreenModeMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *mode); -EGLAPI const char * EGLAPIENTRY eglQueryModeStringMESA(EGLDisplay dpy, EGLModeMESA mode); -#endif /* EGL_EGLEXT_PROTOTYPES */ - -typedef EGLBoolean (EGLAPIENTRYP PFNEGLCHOOSEMODEMESA) (EGLDisplay dpy, EGLScreenMESA screen, const EGLint *attrib_list, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETMODESMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLGetModeATTRIBMESA) (EGLDisplay dpy, EGLModeMESA mode, EGLint attribute, EGLint *value); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSCRREENSMESA) (EGLDisplay dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens); -typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESCREENSURFACEMESA) (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSHOWSCREENSURFACEMESA) (EGLDisplay dpy, EGLint screen, EGLSurface surface, EGLModeMESA mode); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSCREENPOSIITONMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLint x, EGLint y); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSCREENMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLint attribute, EGLint *value); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSCREENSURFACEMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLSurface *surface); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSCREENMODEMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *mode); -typedef const char * (EGLAPIENTRYP PFNEGLQUERYMODESTRINGMESA) (EGLDisplay dpy, EGLModeMESA mode); - -#endif /* EGL_MESA_screen_surface */ - - -#ifndef EGL_MESA_copy_context -#define EGL_MESA_copy_context 1 - -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglCopyContextMESA(EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask); -#endif /* EGL_EGLEXT_PROTOTYPES */ - -typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOPYCONTEXTMESA) (EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask); - -#endif /* EGL_MESA_copy_context */ - -#ifndef EGL_MESA_drm_display -#define EGL_MESA_drm_display 1 - -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLDisplay EGLAPIENTRY eglGetDRMDisplayMESA(int fd); -#endif /* EGL_EGLEXT_PROTOTYPES */ - -typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETDRMDISPLAYMESA) (int fd); - -#endif /* EGL_MESA_drm_display */ - -#ifndef EGL_KHR_image_base -#define EGL_KHR_image_base 1 -/* Most interfaces defined by EGL_KHR_image_pixmap above */ -#define EGL_IMAGE_PRESERVED_KHR 0x30D2 /* eglCreateImageKHR attribute */ -#endif - -#ifndef EGL_KHR_image_pixmap -#define EGL_KHR_image_pixmap 1 -/* Interfaces defined by EGL_KHR_image above */ -#endif - -#ifndef EGL_IMG_context_priority -#define EGL_IMG_context_priority 1 -#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100 -#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101 -#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102 -#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103 -#endif - -#ifndef EGL_KHR_lock_surface2 -#define EGL_KHR_lock_surface2 1 -#define EGL_BITMAP_PIXEL_SIZE_KHR 0x3110 -#endif - -#ifndef EGL_NV_coverage_sample -#define EGL_NV_coverage_sample 1 -#define EGL_COVERAGE_BUFFERS_NV 0x30E0 -#define EGL_COVERAGE_SAMPLES_NV 0x30E1 -#endif - -#ifndef EGL_NV_depth_nonlinear -#define EGL_NV_depth_nonlinear 1 -#define EGL_DEPTH_ENCODING_NV 0x30E2 -#define EGL_DEPTH_ENCODING_NONE_NV 0 -#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3 -#endif - -#if KHRONOS_SUPPORT_INT64 /* EGLTimeNV requires 64-bit uint support */ -#ifndef EGL_NV_sync -#define EGL_NV_sync 1 -#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6 -#define EGL_SYNC_STATUS_NV 0x30E7 -#define EGL_SIGNALED_NV 0x30E8 -#define EGL_UNSIGNALED_NV 0x30E9 -#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV 0x0001 -#define EGL_FOREVER_NV 0xFFFFFFFFFFFFFFFFull -#define EGL_ALREADY_SIGNALED_NV 0x30EA -#define EGL_TIMEOUT_EXPIRED_NV 0x30EB -#define EGL_CONDITION_SATISFIED_NV 0x30EC -#define EGL_SYNC_TYPE_NV 0x30ED -#define EGL_SYNC_CONDITION_NV 0x30EE -#define EGL_SYNC_FENCE_NV 0x30EF -#define EGL_NO_SYNC_NV ((EGLSyncNV)0) -typedef void* EGLSyncNV; -typedef khronos_utime_nanoseconds_t EGLTimeNV; -#ifdef EGL_EGLEXT_PROTOTYPES -EGLSyncNV eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); -EGLBoolean eglDestroySyncNV (EGLSyncNV sync); -EGLBoolean eglFenceNV (EGLSyncNV sync); -EGLint eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); -EGLBoolean eglSignalSyncNV (EGLSyncNV sync, EGLenum mode); -EGLBoolean eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value); -#endif /* EGL_EGLEXT_PROTOTYPES */ -typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync); -typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode); -typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value); -#endif -#endif - -#if KHRONOS_SUPPORT_INT64 /* Dependent on EGL_KHR_reusable_sync which requires 64-bit uint support */ -#ifndef EGL_KHR_fence_sync -#define EGL_KHR_fence_sync 1 -/* Reuses most tokens and entry points from EGL_KHR_reusable_sync */ -#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0 -#define EGL_SYNC_CONDITION_KHR 0x30F8 -#define EGL_SYNC_FENCE_KHR 0x30F9 -#endif -#endif - -#ifndef EGL_HI_clientpixmap -#define EGL_HI_clientpixmap 1 - -/* Surface Attribute */ -#define EGL_CLIENT_PIXMAP_POINTER_HI 0x8F74 -/* - * Structure representing a client pixmap - * (pixmap's data is in client-space memory). - */ -struct EGLClientPixmapHI -{ - void* pData; - EGLint iWidth; - EGLint iHeight; - EGLint iStride; -}; - -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI(EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap); -#endif /* EGL_EGLEXT_PROTOTYPES */ -typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap); -#endif /* EGL_HI_clientpixmap */ - -#ifndef EGL_HI_colorformats -#define EGL_HI_colorformats 1 -/* Config Attribute */ -#define EGL_COLOR_FORMAT_HI 0x8F70 -/* Color Formats */ -#define EGL_COLOR_RGB_HI 0x8F71 -#define EGL_COLOR_RGBA_HI 0x8F72 -#define EGL_COLOR_ARGB_HI 0x8F73 -#endif /* EGL_HI_colorformats */ - -#ifndef EGL_NOK_swap_region -#define EGL_NOK_swap_region 1 - -#ifdef EGL_EGLEXT_PROTOTYPES -EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK(EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint* rects); -#endif - -typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOK) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint* rects); -#endif - - -#ifndef EGL_NOK_texture_from_pixmap -#define EGL_NOK_texture_from_pixmap 1 - -#define EGL_Y_INVERTED_NOK 0x307F -#endif /* EGL_NOK_texture_from_pixmap */ - - -#ifdef __cplusplus -} -#endif - -#endif +#ifndef __eglext_h_ +#define __eglext_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2007-2010 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +#include + +/*************************************************************/ + +/* Header file version number */ +/* Current version at http://www.khronos.org/registry/egl/ */ +/* $Revision$ on $Date: 2010-07-27 20:12:35 -0700 (Tue, 27 Jul 2010) $ */ +#define EGL_EGLEXT_VERSION 7 + +#ifndef EGL_KHR_config_attribs +#define EGL_KHR_config_attribs 1 +#define EGL_CONFORMANT_KHR 0x3042 /* EGLConfig attribute */ +#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020 /* EGL_SURFACE_TYPE bitfield */ +#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040 /* EGL_SURFACE_TYPE bitfield */ +#endif + +#ifndef EGL_KHR_lock_surface +#define EGL_KHR_lock_surface 1 +#define EGL_READ_SURFACE_BIT_KHR 0x0001 /* EGL_LOCK_USAGE_HINT_KHR bitfield */ +#define EGL_WRITE_SURFACE_BIT_KHR 0x0002 /* EGL_LOCK_USAGE_HINT_KHR bitfield */ +#define EGL_LOCK_SURFACE_BIT_KHR 0x0080 /* EGL_SURFACE_TYPE bitfield */ +#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100 /* EGL_SURFACE_TYPE bitfield */ +#define EGL_MATCH_FORMAT_KHR 0x3043 /* EGLConfig attribute */ +#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_FORMAT_RGB_565_KHR 0x30C1 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_FORMAT_RGBA_8888_KHR 0x30C3 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4 /* eglLockSurfaceKHR attribute */ +#define EGL_LOCK_USAGE_HINT_KHR 0x30C5 /* eglLockSurfaceKHR attribute */ +#define EGL_BITMAP_POINTER_KHR 0x30C6 /* eglQuerySurface attribute */ +#define EGL_BITMAP_PITCH_KHR 0x30C7 /* eglQuerySurface attribute */ +#define EGL_BITMAP_ORIGIN_KHR 0x30C8 /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9 /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD /* eglQuerySurface attribute */ +#define EGL_LOWER_LEFT_KHR 0x30CE /* EGL_BITMAP_ORIGIN_KHR value */ +#define EGL_UPPER_LEFT_KHR 0x30CF /* EGL_BITMAP_ORIGIN_KHR value */ +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay display, EGLSurface surface); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface); +#endif + +#ifndef EGL_KHR_image +#define EGL_KHR_image 1 +#define EGL_NATIVE_PIXMAP_KHR 0x30B0 /* eglCreateImageKHR target */ +typedef void *EGLImageKHR; +#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0) +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image); +#endif + +#ifndef EGL_KHR_vg_parent_image +#define EGL_KHR_vg_parent_image 1 +#define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */ +#endif + +#ifndef EGL_KHR_gl_texture_2D_image +#define EGL_KHR_gl_texture_2D_image 1 +#define EGL_GL_TEXTURE_2D_KHR 0x30B1 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC /* eglCreateImageKHR attribute */ +#endif + +#ifndef EGL_KHR_gl_texture_cubemap_image +#define EGL_KHR_gl_texture_cubemap_image 1 +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 /* eglCreateImageKHR target */ +#endif + +#ifndef EGL_KHR_gl_texture_3D_image +#define EGL_KHR_gl_texture_3D_image 1 +#define EGL_GL_TEXTURE_3D_KHR 0x30B2 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD /* eglCreateImageKHR attribute */ +#endif + +#ifndef EGL_KHR_gl_renderbuffer_image +#define EGL_KHR_gl_renderbuffer_image 1 +#define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */ +#endif + +#ifndef EGL_MESA_drm_image +#define EGL_MESA_drm_image 1 +#define EGL_DRM_BUFFER_FORMAT_MESA 0x31D0 /* eglCreateImageKHR attribute */ +#define EGL_DRM_BUFFER_USE_MESA 0x31D1 + +/* EGL_DRM_BUFFER_FORMAT_MESA tokens */ +#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2 + +/* EGL_DRM_BUFFER_USE_MESA bits */ +#define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x0001 +#define EGL_DRM_BUFFER_USE_SHARE_MESA 0x0002 +#define EGL_DRM_BUFFER_USE_CURSOR_MESA 0x0004 + +#define EGL_DRM_BUFFER_MESA 0x31D3 /* eglCreateImageKHR target */ +#define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4 /* eglCreateImageKHR attribute */ + +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA(EGLDisplay dpy, const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA(EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); +#endif +typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESA) (EGLDisplay dpy, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESA) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); +#endif + +#ifndef EGL_WL_bind_wayland_display +#define EGL_WL_bind_wayland_display 1 + +#define EGL_WAYLAND_BUFFER_WL 0x31D5 /* eglCreateImageKHR target */ +struct wl_display; +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display); +EGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL(EGLDisplay dpy, struct wl_display *display); +#endif +typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWL) (EGLDisplay dpy, struct wl_display *display); +#endif + +#if KHRONOS_SUPPORT_INT64 /* EGLTimeKHR requires 64-bit uint support */ +#ifndef EGL_KHR_reusable_sync +#define EGL_KHR_reusable_sync 1 + +typedef void* EGLSyncKHR; +typedef khronos_utime_nanoseconds_t EGLTimeKHR; + +#define EGL_SYNC_STATUS_KHR 0x30F1 +#define EGL_SIGNALED_KHR 0x30F2 +#define EGL_UNSIGNALED_KHR 0x30F3 +#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5 +#define EGL_CONDITION_SATISFIED_KHR 0x30F6 +#define EGL_SYNC_TYPE_KHR 0x30F7 +#define EGL_SYNC_REUSABLE_KHR 0x30FA +#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 /* eglClientWaitSyncKHR bitfield */ +#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull +#define EGL_NO_SYNC_KHR ((EGLSyncKHR)0) +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync); +EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); +EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); +EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync); +typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); +#endif +#endif + +/* EGL_MESA_screen extension >>> PRELIMINARY <<< */ +#ifndef EGL_MESA_screen_surface +#define EGL_MESA_screen_surface 1 + +#define EGL_BAD_SCREEN_MESA 0x4000 +#define EGL_BAD_MODE_MESA 0x4001 +#define EGL_SCREEN_COUNT_MESA 0x4002 +#define EGL_SCREEN_POSITION_MESA 0x4003 +#define EGL_SCREEN_POSITION_GRANULARITY_MESA 0x4004 +#define EGL_MODE_ID_MESA 0x4005 +#define EGL_REFRESH_RATE_MESA 0x4006 +#define EGL_OPTIMAL_MESA 0x4007 +#define EGL_INTERLACED_MESA 0x4008 +#define EGL_SCREEN_BIT_MESA 0x08 + +typedef khronos_uint32_t EGLScreenMESA; +typedef khronos_uint32_t EGLModeMESA; + +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLBoolean EGLAPIENTRY eglChooseModeMESA(EGLDisplay dpy, EGLScreenMESA screen, const EGLint *attrib_list, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); +EGLAPI EGLBoolean EGLAPIENTRY eglGetModesMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); +EGLAPI EGLBoolean EGLAPIENTRY eglGetModeAttribMESA(EGLDisplay dpy, EGLModeMESA mode, EGLint attribute, EGLint *value); +EGLAPI EGLBoolean EGLAPIENTRY eglGetScreensMESA(EGLDisplay dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens); +EGLAPI EGLSurface EGLAPIENTRY eglCreateScreenSurfaceMESA(EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglShowScreenSurfaceMESA(EGLDisplay dpy, EGLint screen, EGLSurface surface, EGLModeMESA mode); +EGLAPI EGLBoolean EGLAPIENTRY eglScreenPositionMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLint x, EGLint y); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryScreenMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLint attribute, EGLint *value); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryScreenSurfaceMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLSurface *surface); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryScreenModeMESA(EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *mode); +EGLAPI const char * EGLAPIENTRY eglQueryModeStringMESA(EGLDisplay dpy, EGLModeMESA mode); +#endif /* EGL_EGLEXT_PROTOTYPES */ + +typedef EGLBoolean (EGLAPIENTRYP PFNEGLCHOOSEMODEMESA) (EGLDisplay dpy, EGLScreenMESA screen, const EGLint *attrib_list, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETMODESMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *modes, EGLint modes_size, EGLint *num_modes); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLGetModeATTRIBMESA) (EGLDisplay dpy, EGLModeMESA mode, EGLint attribute, EGLint *value); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSCRREENSMESA) (EGLDisplay dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens); +typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESCREENSURFACEMESA) (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSHOWSCREENSURFACEMESA) (EGLDisplay dpy, EGLint screen, EGLSurface surface, EGLModeMESA mode); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSCREENPOSIITONMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLint x, EGLint y); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSCREENMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLint attribute, EGLint *value); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSCREENSURFACEMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLSurface *surface); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSCREENMODEMESA) (EGLDisplay dpy, EGLScreenMESA screen, EGLModeMESA *mode); +typedef const char * (EGLAPIENTRYP PFNEGLQUERYMODESTRINGMESA) (EGLDisplay dpy, EGLModeMESA mode); + +#endif /* EGL_MESA_screen_surface */ + + +#ifndef EGL_MESA_copy_context +#define EGL_MESA_copy_context 1 + +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLBoolean EGLAPIENTRY eglCopyContextMESA(EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask); +#endif /* EGL_EGLEXT_PROTOTYPES */ + +typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOPYCONTEXTMESA) (EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask); + +#endif /* EGL_MESA_copy_context */ + +#ifndef EGL_MESA_drm_display +#define EGL_MESA_drm_display 1 + +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLDisplay EGLAPIENTRY eglGetDRMDisplayMESA(int fd); +#endif /* EGL_EGLEXT_PROTOTYPES */ + +typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETDRMDISPLAYMESA) (int fd); + +#endif /* EGL_MESA_drm_display */ + +#ifndef EGL_KHR_image_base +#define EGL_KHR_image_base 1 +/* Most interfaces defined by EGL_KHR_image_pixmap above */ +#define EGL_IMAGE_PRESERVED_KHR 0x30D2 /* eglCreateImageKHR attribute */ +#endif + +#ifndef EGL_KHR_image_pixmap +#define EGL_KHR_image_pixmap 1 +/* Interfaces defined by EGL_KHR_image above */ +#endif + +#ifndef EGL_IMG_context_priority +#define EGL_IMG_context_priority 1 +#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100 +#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101 +#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102 +#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103 +#endif + +#ifndef EGL_KHR_lock_surface2 +#define EGL_KHR_lock_surface2 1 +#define EGL_BITMAP_PIXEL_SIZE_KHR 0x3110 +#endif + +#ifndef EGL_NV_coverage_sample +#define EGL_NV_coverage_sample 1 +#define EGL_COVERAGE_BUFFERS_NV 0x30E0 +#define EGL_COVERAGE_SAMPLES_NV 0x30E1 +#endif + +#ifndef EGL_NV_depth_nonlinear +#define EGL_NV_depth_nonlinear 1 +#define EGL_DEPTH_ENCODING_NV 0x30E2 +#define EGL_DEPTH_ENCODING_NONE_NV 0 +#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3 +#endif + +#if KHRONOS_SUPPORT_INT64 /* EGLTimeNV requires 64-bit uint support */ +#ifndef EGL_NV_sync +#define EGL_NV_sync 1 +#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6 +#define EGL_SYNC_STATUS_NV 0x30E7 +#define EGL_SIGNALED_NV 0x30E8 +#define EGL_UNSIGNALED_NV 0x30E9 +#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV 0x0001 +#define EGL_FOREVER_NV 0xFFFFFFFFFFFFFFFFull +#define EGL_ALREADY_SIGNALED_NV 0x30EA +#define EGL_TIMEOUT_EXPIRED_NV 0x30EB +#define EGL_CONDITION_SATISFIED_NV 0x30EC +#define EGL_SYNC_TYPE_NV 0x30ED +#define EGL_SYNC_CONDITION_NV 0x30EE +#define EGL_SYNC_FENCE_NV 0x30EF +#define EGL_NO_SYNC_NV ((EGLSyncNV)0) +typedef void* EGLSyncNV; +typedef khronos_utime_nanoseconds_t EGLTimeNV; +#ifdef EGL_EGLEXT_PROTOTYPES +EGLSyncNV eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); +EGLBoolean eglDestroySyncNV (EGLSyncNV sync); +EGLBoolean eglFenceNV (EGLSyncNV sync); +EGLint eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); +EGLBoolean eglSignalSyncNV (EGLSyncNV sync, EGLenum mode); +EGLBoolean eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync); +typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value); +#endif +#endif + +#if KHRONOS_SUPPORT_INT64 /* Dependent on EGL_KHR_reusable_sync which requires 64-bit uint support */ +#ifndef EGL_KHR_fence_sync +#define EGL_KHR_fence_sync 1 +/* Reuses most tokens and entry points from EGL_KHR_reusable_sync */ +#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0 +#define EGL_SYNC_CONDITION_KHR 0x30F8 +#define EGL_SYNC_FENCE_KHR 0x30F9 +#endif +#endif + +#ifndef EGL_HI_clientpixmap +#define EGL_HI_clientpixmap 1 + +/* Surface Attribute */ +#define EGL_CLIENT_PIXMAP_POINTER_HI 0x8F74 +/* + * Structure representing a client pixmap + * (pixmap's data is in client-space memory). + */ +struct EGLClientPixmapHI +{ + void* pData; + EGLint iWidth; + EGLint iHeight; + EGLint iStride; +}; + +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI(EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI* pixmap); +#endif /* EGL_HI_clientpixmap */ + +#ifndef EGL_HI_colorformats +#define EGL_HI_colorformats 1 +/* Config Attribute */ +#define EGL_COLOR_FORMAT_HI 0x8F70 +/* Color Formats */ +#define EGL_COLOR_RGB_HI 0x8F71 +#define EGL_COLOR_RGBA_HI 0x8F72 +#define EGL_COLOR_ARGB_HI 0x8F73 +#endif /* EGL_HI_colorformats */ + +#ifndef EGL_NOK_swap_region +#define EGL_NOK_swap_region 1 + +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK(EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint* rects); +#endif + +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOK) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint* rects); +#endif + + +#ifndef EGL_NOK_texture_from_pixmap +#define EGL_NOK_texture_from_pixmap 1 + +#define EGL_Y_INVERTED_NOK 0x307F +#endif /* EGL_NOK_texture_from_pixmap */ + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/mesalib/src/glsl/Makefile b/mesalib/src/glsl/Makefile index e4b992dbc..2e379d84b 100644 --- a/mesalib/src/glsl/Makefile +++ b/mesalib/src/glsl/Makefile @@ -1,213 +1,213 @@ - -#src/glsl/pp/Makefile - -TOP = ../.. - -include $(TOP)/configs/current - -LIBNAME = glsl - -LIBGLCPP_SOURCES = \ - glcpp/glcpp-lex.c \ - glcpp/glcpp-parse.c \ - glcpp/pp.c - -GLCPP_SOURCES = \ - $(LIBGLCPP_SOURCES) \ - ralloc.c \ - glcpp/glcpp.c - -C_SOURCES = \ - strtod.c \ - ralloc.c \ - $(LIBGLCPP_SOURCES) - -CXX_SOURCES = \ - ast_expr.cpp \ - ast_function.cpp \ - ast_to_hir.cpp \ - ast_type.cpp \ - glsl_lexer.cpp \ - glsl_parser.cpp \ - glsl_parser_extras.cpp \ - glsl_types.cpp \ - glsl_symbol_table.cpp \ - hir_field_selection.cpp \ - ir_basic_block.cpp \ - ir_clone.cpp \ - ir_constant_expression.cpp \ - ir.cpp \ - ir_expression_flattening.cpp \ - ir_function_can_inline.cpp \ - ir_function.cpp \ - ir_hierarchical_visitor.cpp \ - ir_hv_accept.cpp \ - ir_import_prototypes.cpp \ - ir_print_visitor.cpp \ - ir_reader.cpp \ - ir_rvalue_visitor.cpp \ - ir_set_program_inouts.cpp \ - ir_validate.cpp \ - ir_variable.cpp \ - ir_variable_refcount.cpp \ - linker.cpp \ - link_functions.cpp \ - loop_analysis.cpp \ - loop_controls.cpp \ - loop_unroll.cpp \ - lower_discard.cpp \ - lower_if_to_cond_assign.cpp \ - lower_instructions.cpp \ - lower_jumps.cpp \ - lower_mat_op_to_vec.cpp \ - lower_noise.cpp \ - lower_texture_projection.cpp \ - lower_variable_index_to_cond_assign.cpp \ - lower_vec_index_to_cond_assign.cpp \ - lower_vec_index_to_swizzle.cpp \ - lower_vector.cpp \ - opt_algebraic.cpp \ - opt_constant_folding.cpp \ - opt_constant_propagation.cpp \ - opt_constant_variable.cpp \ - opt_copy_propagation.cpp \ - opt_copy_propagation_elements.cpp \ - opt_dead_code.cpp \ - opt_dead_code_local.cpp \ - opt_dead_functions.cpp \ - opt_discard_simplification.cpp \ - opt_function_inlining.cpp \ - opt_if_simplification.cpp \ - opt_noop_swizzle.cpp \ - opt_redundant_jumps.cpp \ - opt_structure_splitting.cpp \ - opt_swizzle_swizzle.cpp \ - opt_tree_grafting.cpp \ - s_expression.cpp - -LIBS = \ - $(TOP)/src/glsl/libglsl.a - -APPS = glsl_compiler glcpp/glcpp - -GLSL2_C_SOURCES = \ - ../mesa/program/hash_table.c \ - ../mesa/program/symbol_table.c -GLSL2_CXX_SOURCES = \ - main.cpp - -GLSL2_OBJECTS = \ - $(GLSL2_C_SOURCES:.c=.o) \ - $(GLSL2_CXX_SOURCES:.cpp=.o) - -### Basic defines ### - -DEFINES += \ - $(LIBRARY_DEFINES) \ - $(API_DEFINES) - -GLCPP_OBJECTS = \ - $(GLCPP_SOURCES:.c=.o) \ - ../mesa/program/hash_table.o - -OBJECTS = \ - $(C_SOURCES:.c=.o) \ - $(CXX_SOURCES:.cpp=.o) - -DRICORE_OBJ_DIR = obj-visible -OBJECTS_DRICORE = $(addprefix $(DRICORE_OBJ_DIR)/,$(OBJECTS)) - -INCLUDES = \ - -I. \ - -I../mesa \ - -I../mapi \ - -I../../include \ - $(LIBRARY_INCLUDES) - -ALL_SOURCES = \ - $(C_SOURCES) \ - $(CXX_SOURCES) \ - $(GLSL2_CXX_SOURCES) \ - $(GLSL2_C_SOURCES) - -##### TARGETS ##### - -default: depend lib$(LIBNAME).a $(APPS) $(DRICORE_GLSL_LIBS) - -$(TOP)/$(LIB_DIR)/libglsl.so: $(OBJECTS_DRICORE) builtin_function.o Makefile $(TOP)/src/glsl/Makefile.template - $(MKLIB) -o $@ -linker '$(CXX)' -ldflags '$(LDFLAGS)' \ - -cplusplus -noprefix \ - -install $(TOP)/$(LIB_DIR) -id $(INSTALL_LIB_DIR)/$@.dylib \ - $(OBJECTS_DRICORE) builtin_function.o - -lib$(LIBNAME).a: $(OBJECTS) builtin_function.o Makefile $(TOP)/src/glsl/Makefile.template - $(MKLIB) -cplusplus -o $(LIBNAME) -static $(OBJECTS) builtin_function.o - -depend: $(ALL_SOURCES) Makefile - rm -f depend - touch depend - $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(ALL_SOURCES) 2> /dev/null - -# Remove .o and backup files -clean: clean-dricore - rm -f $(GLCPP_OBJECTS) $(GLSL2_OBJECTS) $(OBJECTS) lib$(LIBNAME).a depend depend.bak builtin_function.cpp builtin_function.o builtin_stubs.o builtin_compiler - -rm -f $(APPS) - -clean-dricore: - -rm -f $(DRICORE_OBJ_DIR) $(TOP)/$(LIB_DIR)/libglsl.so libglsl.so - -ifneq (,$(DRICORE_GLSL_LIBS)) -DRICORE_INSTALL_TARGET = install-dricore -endif - -# Dummy target -install: $(DRICORE_INSTALL_TARGET) - @echo -n "" - -install-dricore: default - $(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR) - $(INSTALL) -m 755 $(DRICORE_GLSL_LIBS) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR) - -##### RULES ##### - -glsl_compiler: $(GLSL2_OBJECTS) libglsl.a builtin_stubs.o - $(APP_CXX) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(GLSL2_OBJECTS) builtin_stubs.o $(LIBS) -o $@ - -glcpp: glcpp/glcpp -glcpp/glcpp: $(GLCPP_OBJECTS) - $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(GLCPP_OBJECTS) -o $@ - -.cpp.o: - $(CXX) -c $(INCLUDES) $(CXXFLAGS) $(DEFINES) $< -o $@ - -.c.o: - $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ - -$(DRICORE_OBJ_DIR)/%.o : %.cpp - @mkdir -p $(dir $@) - $(CXX) -c $(INCLUDES) $(DRI_CXXFLAGS) $(DEFINES) $< -o $@ - -$(DRICORE_OBJ_DIR)/%.o : %.c - @mkdir -p $(dir $@) - $(CC) -c $(INCLUDES) $(DRI_CFLAGS) $(DEFINES) $< -o $@ - -glsl_lexer.cpp: glsl_lexer.ll - flex --nounistd -o$@ $< - -glsl_parser.cpp: glsl_parser.yy - bison -v -o "$@" -p "_mesa_glsl_" --defines=glsl_parser.h $< - -glcpp/glcpp-lex.c: glcpp/glcpp-lex.l - flex --nounistd -o$@ $< - -glcpp/glcpp-parse.c: glcpp/glcpp-parse.y - bison -v -o "$@" --defines=glcpp/glcpp-parse.h $< - -builtin_compiler: $(GLSL2_OBJECTS) $(OBJECTS) builtin_stubs.o - $(APP_CXX) $(INCLUDES) $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) $(GLSL2_OBJECTS) builtin_stubs.o -o $@ - -builtin_function.cpp: builtins/profiles/* builtins/ir/* builtins/tools/generate_builtins.py builtins/tools/texture_builtins.py builtin_compiler - @echo Regenerating builtin_function.cpp... - $(PYTHON2) $(PYTHON_FLAGS) builtins/tools/generate_builtins.py ./builtin_compiler > builtin_function.cpp || rm -f builtin_function.cpp - --include depend + +#src/glsl/pp/Makefile + +TOP = ../.. + +include $(TOP)/configs/current + +LIBNAME = glsl + +LIBGLCPP_SOURCES = \ + glcpp/glcpp-lex.c \ + glcpp/glcpp-parse.c \ + glcpp/pp.c + +GLCPP_SOURCES = \ + $(LIBGLCPP_SOURCES) \ + ralloc.c \ + glcpp/glcpp.c + +C_SOURCES = \ + strtod.c \ + ralloc.c \ + $(LIBGLCPP_SOURCES) + +CXX_SOURCES = \ + ast_expr.cpp \ + ast_function.cpp \ + ast_to_hir.cpp \ + ast_type.cpp \ + glsl_lexer.cpp \ + glsl_parser.cpp \ + glsl_parser_extras.cpp \ + glsl_types.cpp \ + glsl_symbol_table.cpp \ + hir_field_selection.cpp \ + ir_basic_block.cpp \ + ir_clone.cpp \ + ir_constant_expression.cpp \ + ir.cpp \ + ir_expression_flattening.cpp \ + ir_function_can_inline.cpp \ + ir_function.cpp \ + ir_hierarchical_visitor.cpp \ + ir_hv_accept.cpp \ + ir_import_prototypes.cpp \ + ir_print_visitor.cpp \ + ir_reader.cpp \ + ir_rvalue_visitor.cpp \ + ir_set_program_inouts.cpp \ + ir_validate.cpp \ + ir_variable.cpp \ + ir_variable_refcount.cpp \ + linker.cpp \ + link_functions.cpp \ + loop_analysis.cpp \ + loop_controls.cpp \ + loop_unroll.cpp \ + lower_discard.cpp \ + lower_if_to_cond_assign.cpp \ + lower_instructions.cpp \ + lower_jumps.cpp \ + lower_mat_op_to_vec.cpp \ + lower_noise.cpp \ + lower_texture_projection.cpp \ + lower_variable_index_to_cond_assign.cpp \ + lower_vec_index_to_cond_assign.cpp \ + lower_vec_index_to_swizzle.cpp \ + lower_vector.cpp \ + opt_algebraic.cpp \ + opt_constant_folding.cpp \ + opt_constant_propagation.cpp \ + opt_constant_variable.cpp \ + opt_copy_propagation.cpp \ + opt_copy_propagation_elements.cpp \ + opt_dead_code.cpp \ + opt_dead_code_local.cpp \ + opt_dead_functions.cpp \ + opt_discard_simplification.cpp \ + opt_function_inlining.cpp \ + opt_if_simplification.cpp \ + opt_noop_swizzle.cpp \ + opt_redundant_jumps.cpp \ + opt_structure_splitting.cpp \ + opt_swizzle_swizzle.cpp \ + opt_tree_grafting.cpp \ + s_expression.cpp + +LIBS = \ + $(TOP)/src/glsl/libglsl.a + +APPS = glsl_compiler glcpp/glcpp + +GLSL2_C_SOURCES = \ + ../mesa/program/hash_table.c \ + ../mesa/program/symbol_table.c +GLSL2_CXX_SOURCES = \ + main.cpp + +GLSL2_OBJECTS = \ + $(GLSL2_C_SOURCES:.c=.o) \ + $(GLSL2_CXX_SOURCES:.cpp=.o) + +### Basic defines ### + +DEFINES += \ + $(LIBRARY_DEFINES) \ + $(API_DEFINES) + +GLCPP_OBJECTS = \ + $(GLCPP_SOURCES:.c=.o) \ + ../mesa/program/hash_table.o + +OBJECTS = \ + $(C_SOURCES:.c=.o) \ + $(CXX_SOURCES:.cpp=.o) + +DRICORE_OBJ_DIR = obj-visible +OBJECTS_DRICORE = $(addprefix $(DRICORE_OBJ_DIR)/,$(OBJECTS)) + +INCLUDES = \ + -I. \ + -I../mesa \ + -I../mapi \ + -I../../include \ + $(LIBRARY_INCLUDES) + +ALL_SOURCES = \ + $(C_SOURCES) \ + $(CXX_SOURCES) \ + $(GLSL2_CXX_SOURCES) \ + $(GLSL2_C_SOURCES) + +##### TARGETS ##### + +default: depend lib$(LIBNAME).a $(APPS) $(DRICORE_GLSL_LIBS) + +$(TOP)/$(LIB_DIR)/libglsl.so: $(OBJECTS_DRICORE) builtin_function.o Makefile $(TOP)/src/glsl/Makefile.template + $(MKLIB) -o $@ -linker '$(CXX)' -ldflags '$(LDFLAGS)' \ + -cplusplus -noprefix \ + -install $(TOP)/$(LIB_DIR) -id $(INSTALL_LIB_DIR)/$@.dylib \ + $(OBJECTS_DRICORE) builtin_function.o + +lib$(LIBNAME).a: $(OBJECTS) builtin_function.o Makefile $(TOP)/src/glsl/Makefile.template + $(MKLIB) -cplusplus -o $(LIBNAME) -static $(OBJECTS) builtin_function.o + +depend: $(ALL_SOURCES) Makefile + rm -f depend + touch depend + $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(ALL_SOURCES) 2> /dev/null + +# Remove .o and backup files +clean: clean-dricore + rm -f $(GLCPP_OBJECTS) $(GLSL2_OBJECTS) $(OBJECTS) lib$(LIBNAME).a depend depend.bak builtin_function.cpp builtin_function.o builtin_stubs.o builtin_compiler + -rm -f $(APPS) + +clean-dricore: + -rm -f $(DRICORE_OBJ_DIR) $(TOP)/$(LIB_DIR)/libglsl.so libglsl.so + +ifneq (,$(DRICORE_GLSL_LIBS)) +DRICORE_INSTALL_TARGET = install-dricore +endif + +# Dummy target +install: $(DRICORE_INSTALL_TARGET) + @echo -n "" + +install-dricore: default + $(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR) + $(INSTALL) -m 755 $(DRICORE_GLSL_LIBS) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR) + +##### RULES ##### + +glsl_compiler: $(GLSL2_OBJECTS) libglsl.a builtin_stubs.o + $(APP_CXX) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(GLSL2_OBJECTS) builtin_stubs.o $(LIBS) -o $@ + +glcpp: glcpp/glcpp +glcpp/glcpp: $(GLCPP_OBJECTS) + $(APP_CC) $(INCLUDES) $(CFLAGS) $(LDFLAGS) $(GLCPP_OBJECTS) -o $@ + +.cpp.o: + $(CXX) -c $(INCLUDES) $(CXXFLAGS) $(DEFINES) $< -o $@ + +.c.o: + $(CC) -c $(INCLUDES) $(CFLAGS) $(DEFINES) $< -o $@ + +$(DRICORE_OBJ_DIR)/%.o : %.cpp + @mkdir -p $(dir $@) + $(CXX) -c $(INCLUDES) $(DRI_CXXFLAGS) $(DEFINES) $< -o $@ + +$(DRICORE_OBJ_DIR)/%.o : %.c + @mkdir -p $(dir $@) + $(CC) -c $(INCLUDES) $(DRI_CFLAGS) $(DEFINES) $< -o $@ + +glsl_lexer.cpp: glsl_lexer.ll + $(FLEX) --nounistd -o$@ $< + +glsl_parser.cpp: glsl_parser.yy + $(BISON) -v -o "$@" -p "_mesa_glsl_" --defines=glsl_parser.h $< + +glcpp/glcpp-lex.c: glcpp/glcpp-lex.l + $(FLEX) --nounistd -o$@ $< + +glcpp/glcpp-parse.c: glcpp/glcpp-parse.y + $(BISON) -v -o "$@" --defines=glcpp/glcpp-parse.h $< + +builtin_compiler: $(GLSL2_OBJECTS) $(OBJECTS) builtin_stubs.o + $(APP_CXX) $(INCLUDES) $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) $(GLSL2_OBJECTS) builtin_stubs.o -o $@ + +builtin_function.cpp: builtins/profiles/* builtins/ir/* builtins/tools/generate_builtins.py builtins/tools/texture_builtins.py builtin_compiler + @echo Regenerating builtin_function.cpp... + $(PYTHON2) $(PYTHON_FLAGS) builtins/tools/generate_builtins.py ./builtin_compiler > builtin_function.cpp || rm -f builtin_function.cpp + +-include depend diff --git a/mesalib/src/mapi/glapi/gen/gl_table.py b/mesalib/src/mapi/glapi/gen/gl_table.py index 6325341b5..3f1707218 100644 --- a/mesalib/src/mapi/glapi/gen/gl_table.py +++ b/mesalib/src/mapi/glapi/gen/gl_table.py @@ -167,11 +167,18 @@ class PrintRemapTable(gl_XML.gl_print_base): for f, index in abi_functions + functions: arg_string = gl_XML.create_parameter_string( f.parameters, 0 ) - cast = '%s (GLAPIENTRYP)(%s)' % (f.return_type, arg_string) - print '#define CALL_%s(disp, parameters) CALL_by_offset(disp, (%s), _gloffset_%s, parameters)' % (f.name, cast, f.name) - print '#define GET_%s(disp) GET_by_offset(disp, _gloffset_%s)' % (f.name, f.name) - print '#define SET_%s(disp, fn) SET_by_offset(disp, _gloffset_%s, fn)' % (f.name, f.name) + print 'typedef %s (GLAPIENTRYP _glptr_%s)(%s);' % (f.return_type, f.name, arg_string) + print '#define CALL_%s(disp, parameters) \\' % (f.name) + print ' (* GET_%s(disp)) parameters' % (f.name) + print 'static INLINE _glptr_%s GET_%s(struct _glapi_table *disp) {' % (f.name, f.name) + print ' return (_glptr_%s) (GET_by_offset(disp, _gloffset_%s));' % (f.name, f.name) + print '}' + print + print 'static INLINE void SET_%s(struct _glapi_table *disp, %s (GLAPIENTRYP fn)(%s)) {' % (f.name, f.return_type, arg_string) + print ' SET_by_offset(disp, _gloffset_%s, fn);' % (f.name) + print '}' + print if alias_functions: print '' diff --git a/mesalib/src/mesa/Makefile b/mesalib/src/mesa/Makefile index 03962e9c1..e17ee3b58 100644 --- a/mesalib/src/mesa/Makefile +++ b/mesalib/src/mesa/Makefile @@ -1,230 +1,230 @@ -# src/mesa/Makefile - -TOP = ../.. -include $(TOP)/configs/current - -MESA_LIBS := libmesa.a libmesagallium.a -DEPENDS := depend - -MESA_OBJ_DIR := . -DRICORE_OBJ_DIR := objs-dricore - -include sources.mak - -# adjust object dirs -MESA_OBJECTS := $(addprefix $(MESA_OBJ_DIR)/, $(MESA_OBJECTS)) -MESA_GALLIUM_OBJECTS := $(addprefix $(MESA_OBJ_DIR)/, $(MESA_GALLIUM_OBJECTS)) - -DRICORE_OBJECTS := $(addprefix $(DRICORE_OBJ_DIR)/, $(MESA_OBJECTS)) - -# define preprocessor flags -MESA_CPPFLAGS := $(API_DEFINES) $(DEFINES) - -# append include dirs -MESA_CPPFLAGS += $(INCLUDE_DIRS) - -DRICORE_CPPFLAGS = $(MESA_CPPFLAGS) - -# tidy compiler flags -CFLAGS := $(filter-out $(DEFINES), $(CFLAGS)) -CXXFLAGS := $(filter-out $(DEFINES), $(CXXFLAGS)) - -# LLVM is needed for the state tracker -MESA_CFLAGS := $(LLVM_CFLAGS) $(CFLAGS) -DRICORE_CFLAGS := $(LLVM_CFLAGS) $(DRI_CFLAGS) - -MESA_CXXFLAGS := $(LLVM_CFLAGS) $(CXXFLAGS) -DRICORE_CXXFLAGS := $(LLVM_CFLAGS) $(DRI_CXXFLAGS) - -define mesa-cc-c - @mkdir -p $(dir $@) - $(CC) -c -o $@ $< $($(1)_CPPFLAGS) $($(1)_CFLAGS) -endef - -define mesa-cxx-c - @mkdir -p $(dir $@) - $(CXX) -c -o $@ $< $($(1)_CPPFLAGS) $($(1)_CXXFLAGS) -endef - -$(MESA_OBJ_DIR)/%.o: %.c - $(call mesa-cc-c,MESA) - -$(MESA_OBJ_DIR)/%.o: %.cpp - $(call mesa-cxx-c,MESA) - -$(MESA_OBJ_DIR)/%.o: %.S - $(call mesa-cc-c,MESA) - -$(DRICORE_OBJ_DIR)/%.o: %.c - $(call mesa-cc-c,DRICORE) - -$(DRICORE_OBJ_DIR)/%.o: %.cpp - $(call mesa-cxx-c,DRICORE) - -$(DRICORE_OBJ_DIR)/%.o: %.S - $(call mesa-cc-c,DRICORE) - -# Default: build dependencies, then asm_subdirs, GLSL built-in lib, -# then convenience libs (.a) and finally the device drivers: -default: $(DEPENDS) asm_subdirs $(MESA_LIBS) $(DRICORE_LIBS) driver_subdirs - -main/api_exec_es1.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py main/APIspec.py - $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml -V GLES1.1 > $@ - -main/api_exec_es2.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py main/APIspec.py - $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml -V GLES2.0 > $@ - -program/program_parse.tab.c program/program_parse.tab.h: program/program_parse.y - bison -v -d --output=program/program_parse.tab.c $< - -program/lex.yy.c: program/program_lexer.l - flex --never-interactive --outfile=$@ $< - -###################################################################### -# Helper libraries used by many drivers: - -# Make archive of core mesa object files -libmesa.a: $(MESA_OBJECTS) $(GLSL_LIBS) - @ $(MKLIB) -o mesa -static $(MESA_OBJECTS) $(GLSL_LIBS) - -# Shared dricore library for classic DRI drivers -$(TOP)/$(LIB_DIR)/libdricore.so: $(DRICORE_OBJECTS) $(DRICORE_GLSL_LIBS) - @$(MKLIB) -o $@ -linker '$(CXX)' -ldflags '$(LDFLAGS)' \ - -cplusplus -noprefix \ - -install $(TOP)/$(LIB_DIR) -id $(DRI_DRIVER_INSTALL_DIR)/$@.dylib \ - $(DRICORE_LIB_DEPS) $(DRICORE_OBJECTS) - -# Make archive of subset of core mesa object files for gallium -libmesagallium.a: $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS) - @ $(MKLIB) -o mesagallium -static $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS) - -###################################################################### -# Device drivers -driver_subdirs: $(MESA_LIBS) $(DRICORE_LIBS) - @ (cd drivers && $(MAKE)) - - -###################################################################### -# Assembly subdirs -asm_subdirs: - @ if echo "$(ASM_FLAGS)" | grep -q USE_X86_ASM ; then \ - (cd x86 && $(MAKE)) || exit 1 ; \ - fi - @ if echo "$(ASM_FLAGS)" | grep -q USE_X86_64_ASM ; then \ - (cd x86 && $(MAKE)) || exit 1 ; \ - (cd x86-64 && $(MAKE)) || exit 1 ; \ - fi - - -###################################################################### -# Dependency generation - -depend: $(ALL_SOURCES) - @ echo "running $(MKDEP)" - @ touch depend - @$(MKDEP) $(MKDEP_OPTIONS) -p$(MESA_OBJ_DIR)/ $(MESA_CPPFLAGS) \ - $(ALL_SOURCES) > /dev/null 2>/dev/null - -###################################################################### -# Installation rules - -# this isn't fleshed out yet but is probably the way to go in the future -new_install: - (cd drivers && $(MAKE) install) - -ifneq (,$(DRICORE_LIBS)) -DRICORE_INSTALL_TARGET = install-dricore -endif - -# XXX replace this with new_install above someday -install: default $(DRICORE_INSTALL_TARGET) - @for driver in $(DRIVER_DIRS) ; do \ - case "$$driver" in \ - osmesa) if [ "$(DRIVER_DIRS)" = osmesa ]; then \ - $(MAKE) install-headers install-osmesa || exit 1 ; \ - else \ - $(MAKE) install-osmesa || exit 1 ; \ - fi ;; \ - dri) $(MAKE) install-libgl install-dri || exit 1 ;; \ - *) $(MAKE) install-libgl || exit 1 ;; \ - esac ; \ - done - -pcedit = \ - -e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \ - -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \ - -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \ - -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \ - - -gl_pcedit = sed \ - $(pcedit) \ - -e 's,@GL_PC_REQ_PRIV@,$(GL_PC_REQ_PRIV),' \ - -e 's,@GL_PC_LIB_PRIV@,$(GL_PC_LIB_PRIV),' \ - -e 's,@GL_PC_CFLAGS@,$(GL_PC_CFLAGS),' \ - -e 's,@GLX_TLS@,$(GLX_TLS),' \ - -e 's,@GL_LIB@,$(GL_LIB),' - -gl.pc: gl.pc.in - $(gl_pcedit) $< > $@ - -osmesa_pcedit = sed \ - $(pcedit) \ - -e 's,@OSMESA_LIB@,$(OSMESA_LIB),' \ - -e 's,@OSMESA_PC_REQ@,$(OSMESA_PC_REQ),' \ - -e 's,@OSMESA_PC_LIB_PRIV@,$(OSMESA_PC_LIB_PRIV),' - -osmesa.pc: osmesa.pc.in - $(osmesa_pcedit) $< > $@ - -install-headers: - $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL - $(INSTALL) -m 644 $(TOP)/include/GL/*.h \ - $(DESTDIR)$(INSTALL_INC_DIR)/GL - -install-libgl: default gl.pc install-headers - $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR) - $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig - $(MINSTALL) $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB) \ - $(DESTDIR)$(INSTALL_LIB_DIR) - $(INSTALL) -m 644 gl.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig - -install-osmesa: default osmesa.pc - $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR) - $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig - $(MINSTALL) $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_GLOB) \ - $(DESTDIR)$(INSTALL_LIB_DIR) - $(INSTALL) -m 644 osmesa.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig - -install-dri: default - cd drivers/dri && $(MAKE) install - -# We don't need MINSTALL here because we're not installing symbolic links -install-dricore: default - $(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR) - $(INSTALL) -m 755 $(DRICORE_LIBS) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR) - - -# Emacs tags -tags: - etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h - -clean-dricore: - -rm -f libdricore.so - -rm -f $(DRICORE_LIBS) - -rm -rf $(DRICORE_OBJ_DIR) - -clean: clean-dricore - -rm -f */*.o - -rm -f */*/*.o - -rm -f depend depend.bak libmesa.a libmesagallium.a - -rm -f drivers/*/*.o - -rm -f *.pc - -@cd drivers/dri && $(MAKE) clean - -@cd drivers/x11 && $(MAKE) clean - -@cd drivers/osmesa && $(MAKE) clean - -@cd x86 && $(MAKE) clean - -@cd x86-64 && $(MAKE) clean - - --include $(DEPENDS) +# src/mesa/Makefile + +TOP = ../.. +include $(TOP)/configs/current + +MESA_LIBS := libmesa.a libmesagallium.a +DEPENDS := depend + +MESA_OBJ_DIR := . +DRICORE_OBJ_DIR := objs-dricore + +include sources.mak + +# adjust object dirs +MESA_OBJECTS := $(addprefix $(MESA_OBJ_DIR)/, $(MESA_OBJECTS)) +MESA_GALLIUM_OBJECTS := $(addprefix $(MESA_OBJ_DIR)/, $(MESA_GALLIUM_OBJECTS)) + +DRICORE_OBJECTS := $(addprefix $(DRICORE_OBJ_DIR)/, $(MESA_OBJECTS)) + +# define preprocessor flags +MESA_CPPFLAGS := $(API_DEFINES) $(DEFINES) + +# append include dirs +MESA_CPPFLAGS += $(INCLUDE_DIRS) + +DRICORE_CPPFLAGS = $(MESA_CPPFLAGS) + +# tidy compiler flags +CFLAGS := $(filter-out $(DEFINES), $(CFLAGS)) +CXXFLAGS := $(filter-out $(DEFINES), $(CXXFLAGS)) + +# LLVM is needed for the state tracker +MESA_CFLAGS := $(LLVM_CFLAGS) $(CFLAGS) +DRICORE_CFLAGS := $(LLVM_CFLAGS) $(DRI_CFLAGS) + +MESA_CXXFLAGS := $(LLVM_CFLAGS) $(CXXFLAGS) +DRICORE_CXXFLAGS := $(LLVM_CFLAGS) $(DRI_CXXFLAGS) + +define mesa-cc-c + @mkdir -p $(dir $@) + $(CC) -c -o $@ $< $($(1)_CPPFLAGS) $($(1)_CFLAGS) +endef + +define mesa-cxx-c + @mkdir -p $(dir $@) + $(CXX) -c -o $@ $< $($(1)_CPPFLAGS) $($(1)_CXXFLAGS) +endef + +$(MESA_OBJ_DIR)/%.o: %.c + $(call mesa-cc-c,MESA) + +$(MESA_OBJ_DIR)/%.o: %.cpp + $(call mesa-cxx-c,MESA) + +$(MESA_OBJ_DIR)/%.o: %.S + $(call mesa-cc-c,MESA) + +$(DRICORE_OBJ_DIR)/%.o: %.c + $(call mesa-cc-c,DRICORE) + +$(DRICORE_OBJ_DIR)/%.o: %.cpp + $(call mesa-cxx-c,DRICORE) + +$(DRICORE_OBJ_DIR)/%.o: %.S + $(call mesa-cc-c,DRICORE) + +# Default: build dependencies, then asm_subdirs, GLSL built-in lib, +# then convenience libs (.a) and finally the device drivers: +default: $(DEPENDS) asm_subdirs $(MESA_LIBS) $(DRICORE_LIBS) driver_subdirs + +main/api_exec_es1.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py main/APIspec.py + $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml -V GLES1.1 > $@ + +main/api_exec_es2.c: main/APIspec.xml main/es_generator.py main/APIspecutil.py main/APIspec.py + $(PYTHON2) $(PYTHON_FLAGS) main/es_generator.py -S main/APIspec.xml -V GLES2.0 > $@ + +program/program_parse.tab.c program/program_parse.tab.h: program/program_parse.y + $(BISON) -v -d --output=program/program_parse.tab.c $< + +program/lex.yy.c: program/program_lexer.l + $(FLEX) --never-interactive --outfile=$@ $< + +###################################################################### +# Helper libraries used by many drivers: + +# Make archive of core mesa object files +libmesa.a: $(MESA_OBJECTS) $(GLSL_LIBS) + @ $(MKLIB) -o mesa -static $(MESA_OBJECTS) $(GLSL_LIBS) + +# Shared dricore library for classic DRI drivers +$(TOP)/$(LIB_DIR)/libdricore.so: $(DRICORE_OBJECTS) $(DRICORE_GLSL_LIBS) + @$(MKLIB) -o $@ -linker '$(CXX)' -ldflags '$(LDFLAGS)' \ + -cplusplus -noprefix \ + -install $(TOP)/$(LIB_DIR) -id $(DRI_DRIVER_INSTALL_DIR)/$@.dylib \ + $(DRICORE_LIB_DEPS) $(DRICORE_OBJECTS) + +# Make archive of subset of core mesa object files for gallium +libmesagallium.a: $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS) + @ $(MKLIB) -o mesagallium -static $(MESA_GALLIUM_OBJECTS) $(GLSL_LIBS) + +###################################################################### +# Device drivers +driver_subdirs: $(MESA_LIBS) $(DRICORE_LIBS) + @ (cd drivers && $(MAKE)) + + +###################################################################### +# Assembly subdirs +asm_subdirs: + @ if echo "$(ASM_FLAGS)" | grep -q USE_X86_ASM ; then \ + (cd x86 && $(MAKE)) || exit 1 ; \ + fi + @ if echo "$(ASM_FLAGS)" | grep -q USE_X86_64_ASM ; then \ + (cd x86 && $(MAKE)) || exit 1 ; \ + (cd x86-64 && $(MAKE)) || exit 1 ; \ + fi + + +###################################################################### +# Dependency generation + +depend: $(ALL_SOURCES) + @ echo "running $(MKDEP)" + @ touch depend + @$(MKDEP) $(MKDEP_OPTIONS) -p$(MESA_OBJ_DIR)/ $(MESA_CPPFLAGS) \ + $(ALL_SOURCES) > /dev/null 2>/dev/null + +###################################################################### +# Installation rules + +# this isn't fleshed out yet but is probably the way to go in the future +new_install: + (cd drivers && $(MAKE) install) + +ifneq (,$(DRICORE_LIBS)) +DRICORE_INSTALL_TARGET = install-dricore +endif + +# XXX replace this with new_install above someday +install: default $(DRICORE_INSTALL_TARGET) + @for driver in $(DRIVER_DIRS) ; do \ + case "$$driver" in \ + osmesa) if [ "$(DRIVER_DIRS)" = osmesa ]; then \ + $(MAKE) install-headers install-osmesa || exit 1 ; \ + else \ + $(MAKE) install-osmesa || exit 1 ; \ + fi ;; \ + dri) $(MAKE) install-libgl install-dri || exit 1 ;; \ + *) $(MAKE) install-libgl || exit 1 ;; \ + esac ; \ + done + +pcedit = \ + -e 's,@INSTALL_DIR@,$(INSTALL_DIR),' \ + -e 's,@INSTALL_LIB_DIR@,$(INSTALL_LIB_DIR),' \ + -e 's,@INSTALL_INC_DIR@,$(INSTALL_INC_DIR),' \ + -e 's,@VERSION@,$(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY),' \ + + +gl_pcedit = sed \ + $(pcedit) \ + -e 's,@GL_PC_REQ_PRIV@,$(GL_PC_REQ_PRIV),' \ + -e 's,@GL_PC_LIB_PRIV@,$(GL_PC_LIB_PRIV),' \ + -e 's,@GL_PC_CFLAGS@,$(GL_PC_CFLAGS),' \ + -e 's,@GLX_TLS@,$(GLX_TLS),' \ + -e 's,@GL_LIB@,$(GL_LIB),' + +gl.pc: gl.pc.in + $(gl_pcedit) $< > $@ + +osmesa_pcedit = sed \ + $(pcedit) \ + -e 's,@OSMESA_LIB@,$(OSMESA_LIB),' \ + -e 's,@OSMESA_PC_REQ@,$(OSMESA_PC_REQ),' \ + -e 's,@OSMESA_PC_LIB_PRIV@,$(OSMESA_PC_LIB_PRIV),' + +osmesa.pc: osmesa.pc.in + $(osmesa_pcedit) $< > $@ + +install-headers: + $(INSTALL) -d $(DESTDIR)$(INSTALL_INC_DIR)/GL + $(INSTALL) -m 644 $(TOP)/include/GL/*.h \ + $(DESTDIR)$(INSTALL_INC_DIR)/GL + +install-libgl: default gl.pc install-headers + $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR) + $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig + $(MINSTALL) $(TOP)/$(LIB_DIR)/$(GL_LIB_GLOB) \ + $(DESTDIR)$(INSTALL_LIB_DIR) + $(INSTALL) -m 644 gl.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig + +install-osmesa: default osmesa.pc + $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR) + $(INSTALL) -d $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig + $(MINSTALL) $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_GLOB) \ + $(DESTDIR)$(INSTALL_LIB_DIR) + $(INSTALL) -m 644 osmesa.pc $(DESTDIR)$(INSTALL_LIB_DIR)/pkgconfig + +install-dri: default + cd drivers/dri && $(MAKE) install + +# We don't need MINSTALL here because we're not installing symbolic links +install-dricore: default + $(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR) + $(INSTALL) -m 755 $(DRICORE_LIBS) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR) + + +# Emacs tags +tags: + etags `find . -name \*.[ch]` $(TOP)/include/GL/*.h + +clean-dricore: + -rm -f libdricore.so + -rm -f $(DRICORE_LIBS) + -rm -rf $(DRICORE_OBJ_DIR) + +clean: clean-dricore + -rm -f */*.o + -rm -f */*/*.o + -rm -f depend depend.bak libmesa.a libmesagallium.a + -rm -f drivers/*/*.o + -rm -f *.pc + -@cd drivers/dri && $(MAKE) clean + -@cd drivers/x11 && $(MAKE) clean + -@cd drivers/osmesa && $(MAKE) clean + -@cd x86 && $(MAKE) clean + -@cd x86-64 && $(MAKE) clean + + +-include $(DEPENDS) diff --git a/mesalib/src/mesa/main/api_validate.c b/mesalib/src/mesa/main/api_validate.c index c583d1293..5916af9f7 100644 --- a/mesalib/src/mesa/main/api_validate.c +++ b/mesalib/src/mesa/main/api_validate.c @@ -116,17 +116,39 @@ check_valid_to_render(struct gl_context *ctx, const char *function) break; #endif -#if FEATURE_ES1 || FEATURE_GL +#if FEATURE_ES1 case API_OPENGLES: - case API_OPENGL: - /* For regular OpenGL, only draw if we have vertex positions - * (regardless of whether or not we have a vertex program/shader). */ - if (!ctx->Array.ArrayObj->Vertex.Enabled && - !ctx->Array.ArrayObj->VertexAttrib[0].Enabled) + /* For OpenGL ES, only draw if we have vertex positions + */ + if (!ctx->Array.ArrayObj->Vertex.Enabled) return GL_FALSE; break; #endif +#if FEATURE_GL + case API_OPENGL: + { + const struct gl_shader_program *vsProg = + ctx->Shader.CurrentVertexProgram; + GLboolean haveVertexShader = (vsProg && vsProg->LinkStatus); + GLboolean haveVertexProgram = ctx->VertexProgram._Enabled; + if (haveVertexShader || haveVertexProgram) { + /* Draw regardless of whether or not we have any vertex arrays. + * (Ex: could draw a point using a constant vertex pos) + */ + return GL_TRUE; + } + else { + /* Draw if we have vertex positions (GL_VERTEX_ARRAY or generic + * array [0]). + */ + return (ctx->Array.ArrayObj->Vertex.Enabled || + ctx->Array.ArrayObj->VertexAttrib[0].Enabled); + } + } + break; +#endif + default: ASSERT_NO_FEATURE(); } diff --git a/mesalib/src/mesa/main/arrayobj.c b/mesalib/src/mesa/main/arrayobj.c index ce1e277bd..8d53186c8 100644 --- a/mesalib/src/mesa/main/arrayobj.c +++ b/mesalib/src/mesa/main/arrayobj.c @@ -289,9 +289,10 @@ remove_array_object( struct gl_context *ctx, struct gl_array_object *obj ) static GLuint update_min(GLuint min, struct gl_client_array *array) { - _mesa_update_array_max_element(array); - if (array->Enabled) + if (array->Enabled) { + _mesa_update_array_max_element(array); return MIN2(min, array->_MaxElement); + } else return min; } diff --git a/mesalib/src/mesa/main/blend.c b/mesalib/src/mesa/main/blend.c index 95c101c34..94a457f58 100644 --- a/mesalib/src/mesa/main/blend.c +++ b/mesalib/src/mesa/main/blend.c @@ -1,833 +1,833 @@ -/** - * \file blend.c - * Blending operations. - */ - -/* - * Mesa 3-D graphics library - * Version: 6.5.1 - * - * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - - -#include "glheader.h" -#include "blend.h" -#include "context.h" -#include "enums.h" -#include "macros.h" -#include "mtypes.h" - - - -/** - * Check if given blend source factor is legal. - * \return GL_TRUE if legal, GL_FALSE otherwise. - */ -static GLboolean -legal_src_factor(const struct gl_context *ctx, GLenum factor) -{ - switch (factor) { - case GL_SRC_COLOR: - case GL_ONE_MINUS_SRC_COLOR: - return ctx->Extensions.NV_blend_square; - case GL_ZERO: - case GL_ONE: - case GL_DST_COLOR: - case GL_ONE_MINUS_DST_COLOR: - case GL_SRC_ALPHA: - case GL_ONE_MINUS_SRC_ALPHA: - case GL_DST_ALPHA: - case GL_ONE_MINUS_DST_ALPHA: - case GL_SRC_ALPHA_SATURATE: - case GL_CONSTANT_COLOR: - case GL_ONE_MINUS_CONSTANT_COLOR: - case GL_CONSTANT_ALPHA: - case GL_ONE_MINUS_CONSTANT_ALPHA: - return GL_TRUE; - default: - return GL_FALSE; - } -} - - -/** - * Check if given blend destination factor is legal. - * \return GL_TRUE if legal, GL_FALSE otherwise. - */ -static GLboolean -legal_dst_factor(const struct gl_context *ctx, GLenum factor) -{ - switch (factor) { - case GL_DST_COLOR: - case GL_ONE_MINUS_DST_COLOR: - return ctx->Extensions.NV_blend_square; - case GL_ZERO: - case GL_ONE: - case GL_SRC_COLOR: - case GL_ONE_MINUS_SRC_COLOR: - case GL_SRC_ALPHA: - case GL_ONE_MINUS_SRC_ALPHA: - case GL_DST_ALPHA: - case GL_ONE_MINUS_DST_ALPHA: - case GL_CONSTANT_COLOR: - case GL_ONE_MINUS_CONSTANT_COLOR: - case GL_CONSTANT_ALPHA: - case GL_ONE_MINUS_CONSTANT_ALPHA: - return GL_TRUE; - default: - return GL_FALSE; - } -} - - -/** - * Check if src/dest RGB/A blend factors are legal. If not generate - * a GL error. - * \return GL_TRUE if factors are legal, GL_FALSE otherwise. - */ -static GLboolean -validate_blend_factors(struct gl_context *ctx, const char *func, - GLenum sfactorRGB, GLenum dfactorRGB, - GLenum sfactorA, GLenum dfactorA) -{ - if (!legal_src_factor(ctx, sfactorRGB)) { - _mesa_error(ctx, GL_INVALID_ENUM, - "%s(sfactorRGB = %s)", func, - _mesa_lookup_enum_by_nr(sfactorRGB)); - return GL_FALSE; - } - - if (!legal_dst_factor(ctx, dfactorRGB)) { - _mesa_error(ctx, GL_INVALID_ENUM, - "%s(dfactorRGB = %s)", func, - _mesa_lookup_enum_by_nr(dfactorRGB)); - return GL_FALSE; - } - - if (sfactorA != sfactorRGB && !legal_src_factor(ctx, sfactorA)) { - _mesa_error(ctx, GL_INVALID_ENUM, - "%s(sfactorA = %s)", func, - _mesa_lookup_enum_by_nr(sfactorA)); - return GL_FALSE; - } - - if (dfactorA != dfactorRGB && !legal_dst_factor(ctx, dfactorA)) { - _mesa_error(ctx, GL_INVALID_ENUM, - "%s(dfactorA = %s)", func, - _mesa_lookup_enum_by_nr(dfactorA)); - return GL_FALSE; - } - - return GL_TRUE; -} - - -/** - * Specify the blending operation. - * - * \param sfactor source factor operator. - * \param dfactor destination factor operator. - * - * \sa glBlendFunc, glBlendFuncSeparateEXT - */ -void GLAPIENTRY -_mesa_BlendFunc( GLenum sfactor, GLenum dfactor ) -{ - _mesa_BlendFuncSeparateEXT(sfactor, dfactor, sfactor, dfactor); -} - - -/** - * Set the separate blend source/dest factors for all draw buffers. - * - * \param sfactorRGB RGB source factor operator. - * \param dfactorRGB RGB destination factor operator. - * \param sfactorA alpha source factor operator. - * \param dfactorA alpha destination factor operator. - */ -void GLAPIENTRY -_mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB, - GLenum sfactorA, GLenum dfactorA ) -{ - GLuint buf, numBuffers; - GLboolean changed; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glBlendFuncSeparate %s %s %s %s\n", - _mesa_lookup_enum_by_nr(sfactorRGB), - _mesa_lookup_enum_by_nr(dfactorRGB), - _mesa_lookup_enum_by_nr(sfactorA), - _mesa_lookup_enum_by_nr(dfactorA)); - - if (!validate_blend_factors(ctx, "glBlendFuncSeparate", - sfactorRGB, dfactorRGB, - sfactorA, dfactorA)) { - return; - } - - numBuffers = ctx->Extensions.ARB_draw_buffers_blend - ? ctx->Const.MaxDrawBuffers : 1; - - changed = GL_FALSE; - for (buf = 0; buf < numBuffers; buf++) { - if (ctx->Color.Blend[buf].SrcRGB != sfactorRGB || - ctx->Color.Blend[buf].DstRGB != dfactorRGB || - ctx->Color.Blend[buf].SrcA != sfactorA || - ctx->Color.Blend[buf].DstA != dfactorA) { - changed = GL_TRUE; - break; - } - } - if (!changed) - return; - - FLUSH_VERTICES(ctx, _NEW_COLOR); - - for (buf = 0; buf < numBuffers; buf++) { - ctx->Color.Blend[buf].SrcRGB = sfactorRGB; - ctx->Color.Blend[buf].DstRGB = dfactorRGB; - ctx->Color.Blend[buf].SrcA = sfactorA; - ctx->Color.Blend[buf].DstA = dfactorA; - } - ctx->Color._BlendFuncPerBuffer = GL_FALSE; - - if (ctx->Driver.BlendFuncSeparate) { - ctx->Driver.BlendFuncSeparate(ctx, sfactorRGB, dfactorRGB, - sfactorA, dfactorA); - } -} - - -#if _HAVE_FULL_GL - - -/** - * Set blend source/dest factors for one color buffer/target. - */ -void GLAPIENTRY -_mesa_BlendFunci(GLuint buf, GLenum sfactor, GLenum dfactor) -{ - _mesa_BlendFuncSeparatei(buf, sfactor, dfactor, sfactor, dfactor); -} - - -/** - * Set separate blend source/dest factors for one color buffer/target. - */ -void GLAPIENTRY -_mesa_BlendFuncSeparatei(GLuint buf, GLenum sfactorRGB, GLenum dfactorRGB, - GLenum sfactorA, GLenum dfactorA) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (!ctx->Extensions.ARB_draw_buffers_blend) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glBlendFunc[Separate]i()"); - return; - } - - if (buf >= ctx->Const.MaxDrawBuffers) { - _mesa_error(ctx, GL_INVALID_VALUE, "glBlendFuncSeparatei(buffer=%u)", - buf); - return; - } - - if (!validate_blend_factors(ctx, "glBlendFuncSeparatei", - sfactorRGB, dfactorRGB, - sfactorA, dfactorA)) { - return; - } - - if (ctx->Color.Blend[buf].SrcRGB == sfactorRGB && - ctx->Color.Blend[buf].DstRGB == dfactorRGB && - ctx->Color.Blend[buf].SrcA == sfactorA && - ctx->Color.Blend[buf].DstA == dfactorA) - return; /* no change */ - - FLUSH_VERTICES(ctx, _NEW_COLOR); - - ctx->Color.Blend[buf].SrcRGB = sfactorRGB; - ctx->Color.Blend[buf].DstRGB = dfactorRGB; - ctx->Color.Blend[buf].SrcA = sfactorA; - ctx->Color.Blend[buf].DstA = dfactorA; - ctx->Color._BlendFuncPerBuffer = GL_TRUE; - - if (ctx->Driver.BlendFuncSeparatei) { - ctx->Driver.BlendFuncSeparatei(ctx, buf, sfactorRGB, dfactorRGB, - sfactorA, dfactorA); - } -} - - -/** - * Check if given blend equation is legal. - * \return GL_TRUE if legal, GL_FALSE otherwise. - */ -static GLboolean -legal_blend_equation(const struct gl_context *ctx, - GLenum mode, GLboolean is_separate) -{ - switch (mode) { - case GL_FUNC_ADD: - return GL_TRUE; - case GL_MIN: - case GL_MAX: - return ctx->Extensions.EXT_blend_minmax; - case GL_LOGIC_OP: - /* glBlendEquationSeparate cannot take GL_LOGIC_OP as a parameter. - */ - return ctx->Extensions.EXT_blend_logic_op && !is_separate; - case GL_FUNC_SUBTRACT: - case GL_FUNC_REVERSE_SUBTRACT: - return ctx->Extensions.EXT_blend_subtract; - default: - return GL_FALSE; - } -} - - -/* This is really an extension function! */ -void GLAPIENTRY -_mesa_BlendEquation( GLenum mode ) -{ - GLuint buf, numBuffers; - GLboolean changed; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glBlendEquation(%s)\n", - _mesa_lookup_enum_by_nr(mode)); - - if (!legal_blend_equation(ctx, mode, GL_FALSE)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquation"); - return; - } - - numBuffers = ctx->Extensions.ARB_draw_buffers_blend - ? ctx->Const.MaxDrawBuffers : 1; - - changed = GL_FALSE; - for (buf = 0; buf < numBuffers; buf++) { - if (ctx->Color.Blend[buf].EquationRGB != mode || - ctx->Color.Blend[buf].EquationA != mode) { - changed = GL_TRUE; - break; - } - } - if (!changed) - return; - - FLUSH_VERTICES(ctx, _NEW_COLOR); - for (buf = 0; buf < numBuffers; buf++) { - ctx->Color.Blend[buf].EquationRGB = mode; - ctx->Color.Blend[buf].EquationA = mode; - } - ctx->Color._BlendEquationPerBuffer = GL_FALSE; - - if (ctx->Driver.BlendEquationSeparate) - (*ctx->Driver.BlendEquationSeparate)( ctx, mode, mode ); -} - - -/** - * Set blend equation for one color buffer/target. - */ -void GLAPIENTRY -_mesa_BlendEquationi(GLuint buf, GLenum mode) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glBlendEquationi(%u, %s)\n", - buf, _mesa_lookup_enum_by_nr(mode)); - - if (buf >= ctx->Const.MaxDrawBuffers) { - _mesa_error(ctx, GL_INVALID_VALUE, "glBlendFuncSeparatei(buffer=%u)", - buf); - return; - } - - if (!legal_blend_equation(ctx, mode, GL_FALSE)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationi"); - return; - } - - if (ctx->Color.Blend[buf].EquationRGB == mode && - ctx->Color.Blend[buf].EquationA == mode) - return; /* no change */ - - FLUSH_VERTICES(ctx, _NEW_COLOR); - ctx->Color.Blend[buf].EquationRGB = mode; - ctx->Color.Blend[buf].EquationA = mode; - ctx->Color._BlendEquationPerBuffer = GL_TRUE; - - if (ctx->Driver.BlendEquationSeparatei) - ctx->Driver.BlendEquationSeparatei(ctx, buf, mode, mode); -} - - -void GLAPIENTRY -_mesa_BlendEquationSeparateEXT( GLenum modeRGB, GLenum modeA ) -{ - GLuint buf, numBuffers; - GLboolean changed; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glBlendEquationSeparateEXT(%s %s)\n", - _mesa_lookup_enum_by_nr(modeRGB), - _mesa_lookup_enum_by_nr(modeA)); - - if ( (modeRGB != modeA) && !ctx->Extensions.EXT_blend_equation_separate ) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glBlendEquationSeparateEXT not supported by driver"); - return; - } - - if (!legal_blend_equation(ctx, modeRGB, GL_TRUE)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparateEXT(modeRGB)"); - return; - } - - if (!legal_blend_equation(ctx, modeA, GL_TRUE)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparateEXT(modeA)"); - return; - } - - numBuffers = ctx->Extensions.ARB_draw_buffers_blend - ? ctx->Const.MaxDrawBuffers : 1; - - changed = GL_FALSE; - for (buf = 0; buf < numBuffers; buf++) { - if (ctx->Color.Blend[buf].EquationRGB != modeRGB || - ctx->Color.Blend[buf].EquationA != modeA) { - changed = GL_TRUE; - break; - } - } - if (!changed) - return; - - FLUSH_VERTICES(ctx, _NEW_COLOR); - for (buf = 0; buf < numBuffers; buf++) { - ctx->Color.Blend[buf].EquationRGB = modeRGB; - ctx->Color.Blend[buf].EquationA = modeA; - } - ctx->Color._BlendEquationPerBuffer = GL_FALSE; - - if (ctx->Driver.BlendEquationSeparate) - ctx->Driver.BlendEquationSeparate(ctx, modeRGB, modeA); -} - - -/** - * Set separate blend equations for one color buffer/target. - */ -void -_mesa_BlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeA) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glBlendEquationSeparatei(%u, %s %s)\n", buf, - _mesa_lookup_enum_by_nr(modeRGB), - _mesa_lookup_enum_by_nr(modeA)); - - if (buf >= ctx->Const.MaxDrawBuffers) { - _mesa_error(ctx, GL_INVALID_VALUE, "glBlendEquationSeparatei(buffer=%u)", - buf); - return; - } - - if (!legal_blend_equation(ctx, modeRGB, GL_TRUE)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparatei(modeRGB)"); - return; - } - - if (!legal_blend_equation(ctx, modeA, GL_TRUE)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparatei(modeA)"); - return; - } - - if (ctx->Color.Blend[buf].EquationRGB == modeRGB && - ctx->Color.Blend[buf].EquationA == modeA) - return; /* no change */ - - FLUSH_VERTICES(ctx, _NEW_COLOR); - ctx->Color.Blend[buf].EquationRGB = modeRGB; - ctx->Color.Blend[buf].EquationA = modeA; - ctx->Color._BlendEquationPerBuffer = GL_TRUE; - - if (ctx->Driver.BlendEquationSeparatei) - ctx->Driver.BlendEquationSeparatei(ctx, buf, modeRGB, modeA); -} - - - -#endif /* _HAVE_FULL_GL */ - - -/** - * Set the blending color. - * - * \param red red color component. - * \param green green color component. - * \param blue blue color component. - * \param alpha alpha color component. - * - * \sa glBlendColor(). - * - * Clamps the parameters and updates gl_colorbuffer_attrib::BlendColor. On a - * change, flushes the vertices and notifies the driver via - * dd_function_table::BlendColor callback. - */ -void GLAPIENTRY -_mesa_BlendColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) -{ - GLfloat tmp[4]; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - tmp[0] = red; - tmp[1] = green; - tmp[2] = blue; - tmp[3] = alpha; - - if (TEST_EQ_4V(tmp, ctx->Color.BlendColorUnclamped)) - return; - - FLUSH_VERTICES(ctx, _NEW_COLOR); - COPY_4FV( ctx->Color.BlendColorUnclamped, tmp ); - - ctx->Color.BlendColor[0] = CLAMP(tmp[0], 0.0F, 1.0F); - ctx->Color.BlendColor[1] = CLAMP(tmp[1], 0.0F, 1.0F); - ctx->Color.BlendColor[2] = CLAMP(tmp[2], 0.0F, 1.0F); - ctx->Color.BlendColor[3] = CLAMP(tmp[3], 0.0F, 1.0F); - - if (ctx->Driver.BlendColor) - (*ctx->Driver.BlendColor)(ctx, ctx->Color.BlendColor); -} - - -/** - * Specify the alpha test function. - * - * \param func alpha comparison function. - * \param ref reference value. - * - * Verifies the parameters and updates gl_colorbuffer_attrib. - * On a change, flushes the vertices and notifies the driver via - * dd_function_table::AlphaFunc callback. - */ -void GLAPIENTRY -_mesa_AlphaFunc( GLenum func, GLclampf ref ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glAlphaFunc(%s, %f)\n", - _mesa_lookup_enum_by_nr(func), ref); - - switch (func) { - case GL_NEVER: - case GL_LESS: - case GL_EQUAL: - case GL_LEQUAL: - case GL_GREATER: - case GL_NOTEQUAL: - case GL_GEQUAL: - case GL_ALWAYS: - if (ctx->Color.AlphaFunc == func && ctx->Color.AlphaRefUnclamped == ref) - return; /* no change */ - - FLUSH_VERTICES(ctx, _NEW_COLOR); - ctx->Color.AlphaFunc = func; - ctx->Color.AlphaRefUnclamped = ref; - ctx->Color.AlphaRef = CLAMP(ref, 0.0F, 1.0F); - - if (ctx->Driver.AlphaFunc) - ctx->Driver.AlphaFunc(ctx, func, ctx->Color.AlphaRef); - return; - - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glAlphaFunc(func)" ); - return; - } -} - - -/** - * Specify a logic pixel operation for color index rendering. - * - * \param opcode operation. - * - * Verifies that \p opcode is a valid enum and updates -gl_colorbuffer_attrib::LogicOp. - * On a change, flushes the vertices and notifies the driver via the - * dd_function_table::LogicOpcode callback. - */ -void GLAPIENTRY -_mesa_LogicOp( GLenum opcode ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glLogicOp(%s)\n", _mesa_lookup_enum_by_nr(opcode)); - - switch (opcode) { - case GL_CLEAR: - case GL_SET: - case GL_COPY: - case GL_COPY_INVERTED: - case GL_NOOP: - case GL_INVERT: - case GL_AND: - case GL_NAND: - case GL_OR: - case GL_NOR: - case GL_XOR: - case GL_EQUIV: - case GL_AND_REVERSE: - case GL_AND_INVERTED: - case GL_OR_REVERSE: - case GL_OR_INVERTED: - break; - default: - _mesa_error( ctx, GL_INVALID_ENUM, "glLogicOp" ); - return; - } - - if (ctx->Color.LogicOp == opcode) - return; - - FLUSH_VERTICES(ctx, _NEW_COLOR); - ctx->Color.LogicOp = opcode; - - if (ctx->Driver.LogicOpcode) - ctx->Driver.LogicOpcode( ctx, opcode ); -} - -#if _HAVE_FULL_GL -void GLAPIENTRY -_mesa_IndexMask( GLuint mask ) -{ - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (ctx->Color.IndexMask == mask) - return; - - FLUSH_VERTICES(ctx, _NEW_COLOR); - ctx->Color.IndexMask = mask; -} -#endif - - -/** - * Enable or disable writing of frame buffer color components. - * - * \param red whether to mask writing of the red color component. - * \param green whether to mask writing of the green color component. - * \param blue whether to mask writing of the blue color component. - * \param alpha whether to mask writing of the alpha color component. - * - * \sa glColorMask(). - * - * Sets the appropriate value of gl_colorbuffer_attrib::ColorMask. On a - * change, flushes the vertices and notifies the driver via the - * dd_function_table::ColorMask callback. - */ -void GLAPIENTRY -_mesa_ColorMask( GLboolean red, GLboolean green, - GLboolean blue, GLboolean alpha ) -{ - GET_CURRENT_CONTEXT(ctx); - GLubyte tmp[4]; - GLuint i; - GLboolean flushed; - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glColorMask(%d, %d, %d, %d)\n", - red, green, blue, alpha); - - /* Shouldn't have any information about channel depth in core mesa - * -- should probably store these as the native booleans: - */ - tmp[RCOMP] = red ? 0xff : 0x0; - tmp[GCOMP] = green ? 0xff : 0x0; - tmp[BCOMP] = blue ? 0xff : 0x0; - tmp[ACOMP] = alpha ? 0xff : 0x0; - - flushed = GL_FALSE; - for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { - if (!TEST_EQ_4V(tmp, ctx->Color.ColorMask[i])) { - if (!flushed) { - FLUSH_VERTICES(ctx, _NEW_COLOR); - } - flushed = GL_TRUE; - COPY_4UBV(ctx->Color.ColorMask[i], tmp); - } - } - - if (ctx->Driver.ColorMask) - ctx->Driver.ColorMask( ctx, red, green, blue, alpha ); -} - - -/** - * For GL_EXT_draw_buffers2 and GL3 - */ -void GLAPIENTRY -_mesa_ColorMaskIndexed( GLuint buf, GLboolean red, GLboolean green, - GLboolean blue, GLboolean alpha ) -{ - GLubyte tmp[4]; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (MESA_VERBOSE & VERBOSE_API) - _mesa_debug(ctx, "glColorMaskIndexed %u %d %d %d %d\n", - buf, red, green, blue, alpha); - - if (buf >= ctx->Const.MaxDrawBuffers) { - _mesa_error(ctx, GL_INVALID_VALUE, "glColorMaskIndexed(buf=%u)", buf); - return; - } - - /* Shouldn't have any information about channel depth in core mesa - * -- should probably store these as the native booleans: - */ - tmp[RCOMP] = red ? 0xff : 0x0; - tmp[GCOMP] = green ? 0xff : 0x0; - tmp[BCOMP] = blue ? 0xff : 0x0; - tmp[ACOMP] = alpha ? 0xff : 0x0; - - if (TEST_EQ_4V(tmp, ctx->Color.ColorMask[buf])) - return; - - FLUSH_VERTICES(ctx, _NEW_COLOR); - COPY_4UBV(ctx->Color.ColorMask[buf], tmp); - - if (ctx->Driver.ColorMaskIndexed) - ctx->Driver.ColorMaskIndexed(ctx, buf, red, green, blue, alpha); -} - - -void GLAPIENTRY -_mesa_ClampColorARB(GLenum target, GLenum clamp) -{ - GET_CURRENT_CONTEXT(ctx); - - ASSERT_OUTSIDE_BEGIN_END(ctx); - - if (clamp != GL_TRUE && clamp != GL_FALSE && clamp != GL_FIXED_ONLY_ARB) { - _mesa_error(ctx, GL_INVALID_ENUM, "glClampColorARB(clamp)"); - return; - } - - switch (target) { - case GL_CLAMP_VERTEX_COLOR_ARB: - FLUSH_VERTICES(ctx, _NEW_LIGHT); - ctx->Light.ClampVertexColor = clamp; - break; - case GL_CLAMP_FRAGMENT_COLOR_ARB: - FLUSH_VERTICES(ctx, _NEW_FRAG_CLAMP); - ctx->Color.ClampFragmentColor = clamp; - break; - case GL_CLAMP_READ_COLOR_ARB: - FLUSH_VERTICES(ctx, _NEW_COLOR); - ctx->Color.ClampReadColor = clamp; - break; - default: - _mesa_error(ctx, GL_INVALID_ENUM, "glClampColorARB(target)"); - return; - } -} - - - - -/**********************************************************************/ -/** \name Initialization */ -/*@{*/ - -/** - * Initialization of the context's Color attribute group. - * - * \param ctx GL context. - * - * Initializes the related fields in the context color attribute group, - * __struct gl_contextRec::Color. - */ -void _mesa_init_color( struct gl_context * ctx ) -{ - GLuint i; - - /* Color buffer group */ - ctx->Color.IndexMask = ~0u; - memset(ctx->Color.ColorMask, 0xff, sizeof(ctx->Color.ColorMask)); - ctx->Color.ClearIndex = 0; - ASSIGN_4V( ctx->Color.ClearColor, 0, 0, 0, 0 ); - ASSIGN_4V( ctx->Color.ClearColorUnclamped, 0, 0, 0, 0 ); - ctx->Color.AlphaEnabled = GL_FALSE; - ctx->Color.AlphaFunc = GL_ALWAYS; - ctx->Color.AlphaRef = 0; - ctx->Color.BlendEnabled = 0x0; - for (i = 0; i < Elements(ctx->Color.Blend); i++) { - ctx->Color.Blend[i].SrcRGB = GL_ONE; - ctx->Color.Blend[i].DstRGB = GL_ZERO; - ctx->Color.Blend[i].SrcA = GL_ONE; - ctx->Color.Blend[i].DstA = GL_ZERO; - ctx->Color.Blend[i].EquationRGB = GL_FUNC_ADD; - ctx->Color.Blend[i].EquationA = GL_FUNC_ADD; - } - ASSIGN_4V( ctx->Color.BlendColor, 0.0, 0.0, 0.0, 0.0 ); - ASSIGN_4V( ctx->Color.BlendColorUnclamped, 0.0, 0.0, 0.0, 0.0 ); - ctx->Color.IndexLogicOpEnabled = GL_FALSE; - ctx->Color.ColorLogicOpEnabled = GL_FALSE; - ctx->Color._LogicOpEnabled = GL_FALSE; - ctx->Color.LogicOp = GL_COPY; - ctx->Color.DitherFlag = GL_TRUE; - - if (ctx->Visual.doubleBufferMode) { - ctx->Color.DrawBuffer[0] = GL_BACK; - } - else { - ctx->Color.DrawBuffer[0] = GL_FRONT; - } - - ctx->Color.ClampFragmentColor = GL_FIXED_ONLY_ARB; - ctx->Color._ClampFragmentColor = GL_TRUE; - ctx->Color.ClampReadColor = GL_FIXED_ONLY_ARB; - ctx->Color._ClampReadColor = GL_TRUE; -} - -/*@}*/ +/** + * \file blend.c + * Blending operations. + */ + +/* + * Mesa 3-D graphics library + * Version: 6.5.1 + * + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + + +#include "glheader.h" +#include "blend.h" +#include "context.h" +#include "enums.h" +#include "macros.h" +#include "mtypes.h" + + + +/** + * Check if given blend source factor is legal. + * \return GL_TRUE if legal, GL_FALSE otherwise. + */ +static GLboolean +legal_src_factor(const struct gl_context *ctx, GLenum factor) +{ + switch (factor) { + case GL_SRC_COLOR: + case GL_ONE_MINUS_SRC_COLOR: + return ctx->Extensions.NV_blend_square; + case GL_ZERO: + case GL_ONE: + case GL_DST_COLOR: + case GL_ONE_MINUS_DST_COLOR: + case GL_SRC_ALPHA: + case GL_ONE_MINUS_SRC_ALPHA: + case GL_DST_ALPHA: + case GL_ONE_MINUS_DST_ALPHA: + case GL_SRC_ALPHA_SATURATE: + case GL_CONSTANT_COLOR: + case GL_ONE_MINUS_CONSTANT_COLOR: + case GL_CONSTANT_ALPHA: + case GL_ONE_MINUS_CONSTANT_ALPHA: + return GL_TRUE; + default: + return GL_FALSE; + } +} + + +/** + * Check if given blend destination factor is legal. + * \return GL_TRUE if legal, GL_FALSE otherwise. + */ +static GLboolean +legal_dst_factor(const struct gl_context *ctx, GLenum factor) +{ + switch (factor) { + case GL_DST_COLOR: + case GL_ONE_MINUS_DST_COLOR: + return ctx->Extensions.NV_blend_square; + case GL_ZERO: + case GL_ONE: + case GL_SRC_COLOR: + case GL_ONE_MINUS_SRC_COLOR: + case GL_SRC_ALPHA: + case GL_ONE_MINUS_SRC_ALPHA: + case GL_DST_ALPHA: + case GL_ONE_MINUS_DST_ALPHA: + case GL_CONSTANT_COLOR: + case GL_ONE_MINUS_CONSTANT_COLOR: + case GL_CONSTANT_ALPHA: + case GL_ONE_MINUS_CONSTANT_ALPHA: + return GL_TRUE; + default: + return GL_FALSE; + } +} + + +/** + * Check if src/dest RGB/A blend factors are legal. If not generate + * a GL error. + * \return GL_TRUE if factors are legal, GL_FALSE otherwise. + */ +static GLboolean +validate_blend_factors(struct gl_context *ctx, const char *func, + GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorA, GLenum dfactorA) +{ + if (!legal_src_factor(ctx, sfactorRGB)) { + _mesa_error(ctx, GL_INVALID_ENUM, + "%s(sfactorRGB = %s)", func, + _mesa_lookup_enum_by_nr(sfactorRGB)); + return GL_FALSE; + } + + if (!legal_dst_factor(ctx, dfactorRGB)) { + _mesa_error(ctx, GL_INVALID_ENUM, + "%s(dfactorRGB = %s)", func, + _mesa_lookup_enum_by_nr(dfactorRGB)); + return GL_FALSE; + } + + if (sfactorA != sfactorRGB && !legal_src_factor(ctx, sfactorA)) { + _mesa_error(ctx, GL_INVALID_ENUM, + "%s(sfactorA = %s)", func, + _mesa_lookup_enum_by_nr(sfactorA)); + return GL_FALSE; + } + + if (dfactorA != dfactorRGB && !legal_dst_factor(ctx, dfactorA)) { + _mesa_error(ctx, GL_INVALID_ENUM, + "%s(dfactorA = %s)", func, + _mesa_lookup_enum_by_nr(dfactorA)); + return GL_FALSE; + } + + return GL_TRUE; +} + + +/** + * Specify the blending operation. + * + * \param sfactor source factor operator. + * \param dfactor destination factor operator. + * + * \sa glBlendFunc, glBlendFuncSeparateEXT + */ +void GLAPIENTRY +_mesa_BlendFunc( GLenum sfactor, GLenum dfactor ) +{ + _mesa_BlendFuncSeparateEXT(sfactor, dfactor, sfactor, dfactor); +} + + +/** + * Set the separate blend source/dest factors for all draw buffers. + * + * \param sfactorRGB RGB source factor operator. + * \param dfactorRGB RGB destination factor operator. + * \param sfactorA alpha source factor operator. + * \param dfactorA alpha destination factor operator. + */ +void GLAPIENTRY +_mesa_BlendFuncSeparateEXT( GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorA, GLenum dfactorA ) +{ + GLuint buf, numBuffers; + GLboolean changed; + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "glBlendFuncSeparate %s %s %s %s\n", + _mesa_lookup_enum_by_nr(sfactorRGB), + _mesa_lookup_enum_by_nr(dfactorRGB), + _mesa_lookup_enum_by_nr(sfactorA), + _mesa_lookup_enum_by_nr(dfactorA)); + + if (!validate_blend_factors(ctx, "glBlendFuncSeparate", + sfactorRGB, dfactorRGB, + sfactorA, dfactorA)) { + return; + } + + numBuffers = ctx->Extensions.ARB_draw_buffers_blend + ? ctx->Const.MaxDrawBuffers : 1; + + changed = GL_FALSE; + for (buf = 0; buf < numBuffers; buf++) { + if (ctx->Color.Blend[buf].SrcRGB != sfactorRGB || + ctx->Color.Blend[buf].DstRGB != dfactorRGB || + ctx->Color.Blend[buf].SrcA != sfactorA || + ctx->Color.Blend[buf].DstA != dfactorA) { + changed = GL_TRUE; + break; + } + } + if (!changed) + return; + + FLUSH_VERTICES(ctx, _NEW_COLOR); + + for (buf = 0; buf < numBuffers; buf++) { + ctx->Color.Blend[buf].SrcRGB = sfactorRGB; + ctx->Color.Blend[buf].DstRGB = dfactorRGB; + ctx->Color.Blend[buf].SrcA = sfactorA; + ctx->Color.Blend[buf].DstA = dfactorA; + } + ctx->Color._BlendFuncPerBuffer = GL_FALSE; + + if (ctx->Driver.BlendFuncSeparate) { + ctx->Driver.BlendFuncSeparate(ctx, sfactorRGB, dfactorRGB, + sfactorA, dfactorA); + } +} + + +#if _HAVE_FULL_GL + + +/** + * Set blend source/dest factors for one color buffer/target. + */ +void GLAPIENTRY +_mesa_BlendFunci(GLuint buf, GLenum sfactor, GLenum dfactor) +{ + _mesa_BlendFuncSeparatei(buf, sfactor, dfactor, sfactor, dfactor); +} + + +/** + * Set separate blend source/dest factors for one color buffer/target. + */ +void GLAPIENTRY +_mesa_BlendFuncSeparatei(GLuint buf, GLenum sfactorRGB, GLenum dfactorRGB, + GLenum sfactorA, GLenum dfactorA) +{ + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + if (!ctx->Extensions.ARB_draw_buffers_blend) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glBlendFunc[Separate]i()"); + return; + } + + if (buf >= ctx->Const.MaxDrawBuffers) { + _mesa_error(ctx, GL_INVALID_VALUE, "glBlendFuncSeparatei(buffer=%u)", + buf); + return; + } + + if (!validate_blend_factors(ctx, "glBlendFuncSeparatei", + sfactorRGB, dfactorRGB, + sfactorA, dfactorA)) { + return; + } + + if (ctx->Color.Blend[buf].SrcRGB == sfactorRGB && + ctx->Color.Blend[buf].DstRGB == dfactorRGB && + ctx->Color.Blend[buf].SrcA == sfactorA && + ctx->Color.Blend[buf].DstA == dfactorA) + return; /* no change */ + + FLUSH_VERTICES(ctx, _NEW_COLOR); + + ctx->Color.Blend[buf].SrcRGB = sfactorRGB; + ctx->Color.Blend[buf].DstRGB = dfactorRGB; + ctx->Color.Blend[buf].SrcA = sfactorA; + ctx->Color.Blend[buf].DstA = dfactorA; + ctx->Color._BlendFuncPerBuffer = GL_TRUE; + + if (ctx->Driver.BlendFuncSeparatei) { + ctx->Driver.BlendFuncSeparatei(ctx, buf, sfactorRGB, dfactorRGB, + sfactorA, dfactorA); + } +} + + +/** + * Check if given blend equation is legal. + * \return GL_TRUE if legal, GL_FALSE otherwise. + */ +static GLboolean +legal_blend_equation(const struct gl_context *ctx, + GLenum mode, GLboolean is_separate) +{ + switch (mode) { + case GL_FUNC_ADD: + return GL_TRUE; + case GL_MIN: + case GL_MAX: + return ctx->Extensions.EXT_blend_minmax; + case GL_LOGIC_OP: + /* glBlendEquationSeparate cannot take GL_LOGIC_OP as a parameter. + */ + return ctx->Extensions.EXT_blend_logic_op && !is_separate; + case GL_FUNC_SUBTRACT: + case GL_FUNC_REVERSE_SUBTRACT: + return ctx->Extensions.EXT_blend_subtract; + default: + return GL_FALSE; + } +} + + +/* This is really an extension function! */ +void GLAPIENTRY +_mesa_BlendEquation( GLenum mode ) +{ + GLuint buf, numBuffers; + GLboolean changed; + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "glBlendEquation(%s)\n", + _mesa_lookup_enum_by_nr(mode)); + + if (!legal_blend_equation(ctx, mode, GL_FALSE)) { + _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquation"); + return; + } + + numBuffers = ctx->Extensions.ARB_draw_buffers_blend + ? ctx->Const.MaxDrawBuffers : 1; + + changed = GL_FALSE; + for (buf = 0; buf < numBuffers; buf++) { + if (ctx->Color.Blend[buf].EquationRGB != mode || + ctx->Color.Blend[buf].EquationA != mode) { + changed = GL_TRUE; + break; + } + } + if (!changed) + return; + + FLUSH_VERTICES(ctx, _NEW_COLOR); + for (buf = 0; buf < numBuffers; buf++) { + ctx->Color.Blend[buf].EquationRGB = mode; + ctx->Color.Blend[buf].EquationA = mode; + } + ctx->Color._BlendEquationPerBuffer = GL_FALSE; + + if (ctx->Driver.BlendEquationSeparate) + (*ctx->Driver.BlendEquationSeparate)( ctx, mode, mode ); +} + + +/** + * Set blend equation for one color buffer/target. + */ +void GLAPIENTRY +_mesa_BlendEquationi(GLuint buf, GLenum mode) +{ + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "glBlendEquationi(%u, %s)\n", + buf, _mesa_lookup_enum_by_nr(mode)); + + if (buf >= ctx->Const.MaxDrawBuffers) { + _mesa_error(ctx, GL_INVALID_VALUE, "glBlendFuncSeparatei(buffer=%u)", + buf); + return; + } + + if (!legal_blend_equation(ctx, mode, GL_FALSE)) { + _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationi"); + return; + } + + if (ctx->Color.Blend[buf].EquationRGB == mode && + ctx->Color.Blend[buf].EquationA == mode) + return; /* no change */ + + FLUSH_VERTICES(ctx, _NEW_COLOR); + ctx->Color.Blend[buf].EquationRGB = mode; + ctx->Color.Blend[buf].EquationA = mode; + ctx->Color._BlendEquationPerBuffer = GL_TRUE; + + if (ctx->Driver.BlendEquationSeparatei) + ctx->Driver.BlendEquationSeparatei(ctx, buf, mode, mode); +} + + +void GLAPIENTRY +_mesa_BlendEquationSeparateEXT( GLenum modeRGB, GLenum modeA ) +{ + GLuint buf, numBuffers; + GLboolean changed; + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "glBlendEquationSeparateEXT(%s %s)\n", + _mesa_lookup_enum_by_nr(modeRGB), + _mesa_lookup_enum_by_nr(modeA)); + + if ( (modeRGB != modeA) && !ctx->Extensions.EXT_blend_equation_separate ) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glBlendEquationSeparateEXT not supported by driver"); + return; + } + + if (!legal_blend_equation(ctx, modeRGB, GL_TRUE)) { + _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparateEXT(modeRGB)"); + return; + } + + if (!legal_blend_equation(ctx, modeA, GL_TRUE)) { + _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparateEXT(modeA)"); + return; + } + + numBuffers = ctx->Extensions.ARB_draw_buffers_blend + ? ctx->Const.MaxDrawBuffers : 1; + + changed = GL_FALSE; + for (buf = 0; buf < numBuffers; buf++) { + if (ctx->Color.Blend[buf].EquationRGB != modeRGB || + ctx->Color.Blend[buf].EquationA != modeA) { + changed = GL_TRUE; + break; + } + } + if (!changed) + return; + + FLUSH_VERTICES(ctx, _NEW_COLOR); + for (buf = 0; buf < numBuffers; buf++) { + ctx->Color.Blend[buf].EquationRGB = modeRGB; + ctx->Color.Blend[buf].EquationA = modeA; + } + ctx->Color._BlendEquationPerBuffer = GL_FALSE; + + if (ctx->Driver.BlendEquationSeparate) + ctx->Driver.BlendEquationSeparate(ctx, modeRGB, modeA); +} + + +/** + * Set separate blend equations for one color buffer/target. + */ +void GLAPIENTRY +_mesa_BlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeA) +{ + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "glBlendEquationSeparatei(%u, %s %s)\n", buf, + _mesa_lookup_enum_by_nr(modeRGB), + _mesa_lookup_enum_by_nr(modeA)); + + if (buf >= ctx->Const.MaxDrawBuffers) { + _mesa_error(ctx, GL_INVALID_VALUE, "glBlendEquationSeparatei(buffer=%u)", + buf); + return; + } + + if (!legal_blend_equation(ctx, modeRGB, GL_TRUE)) { + _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparatei(modeRGB)"); + return; + } + + if (!legal_blend_equation(ctx, modeA, GL_TRUE)) { + _mesa_error(ctx, GL_INVALID_ENUM, "glBlendEquationSeparatei(modeA)"); + return; + } + + if (ctx->Color.Blend[buf].EquationRGB == modeRGB && + ctx->Color.Blend[buf].EquationA == modeA) + return; /* no change */ + + FLUSH_VERTICES(ctx, _NEW_COLOR); + ctx->Color.Blend[buf].EquationRGB = modeRGB; + ctx->Color.Blend[buf].EquationA = modeA; + ctx->Color._BlendEquationPerBuffer = GL_TRUE; + + if (ctx->Driver.BlendEquationSeparatei) + ctx->Driver.BlendEquationSeparatei(ctx, buf, modeRGB, modeA); +} + + + +#endif /* _HAVE_FULL_GL */ + + +/** + * Set the blending color. + * + * \param red red color component. + * \param green green color component. + * \param blue blue color component. + * \param alpha alpha color component. + * + * \sa glBlendColor(). + * + * Clamps the parameters and updates gl_colorbuffer_attrib::BlendColor. On a + * change, flushes the vertices and notifies the driver via + * dd_function_table::BlendColor callback. + */ +void GLAPIENTRY +_mesa_BlendColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ) +{ + GLfloat tmp[4]; + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + tmp[0] = red; + tmp[1] = green; + tmp[2] = blue; + tmp[3] = alpha; + + if (TEST_EQ_4V(tmp, ctx->Color.BlendColorUnclamped)) + return; + + FLUSH_VERTICES(ctx, _NEW_COLOR); + COPY_4FV( ctx->Color.BlendColorUnclamped, tmp ); + + ctx->Color.BlendColor[0] = CLAMP(tmp[0], 0.0F, 1.0F); + ctx->Color.BlendColor[1] = CLAMP(tmp[1], 0.0F, 1.0F); + ctx->Color.BlendColor[2] = CLAMP(tmp[2], 0.0F, 1.0F); + ctx->Color.BlendColor[3] = CLAMP(tmp[3], 0.0F, 1.0F); + + if (ctx->Driver.BlendColor) + (*ctx->Driver.BlendColor)(ctx, ctx->Color.BlendColor); +} + + +/** + * Specify the alpha test function. + * + * \param func alpha comparison function. + * \param ref reference value. + * + * Verifies the parameters and updates gl_colorbuffer_attrib. + * On a change, flushes the vertices and notifies the driver via + * dd_function_table::AlphaFunc callback. + */ +void GLAPIENTRY +_mesa_AlphaFunc( GLenum func, GLclampf ref ) +{ + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "glAlphaFunc(%s, %f)\n", + _mesa_lookup_enum_by_nr(func), ref); + + switch (func) { + case GL_NEVER: + case GL_LESS: + case GL_EQUAL: + case GL_LEQUAL: + case GL_GREATER: + case GL_NOTEQUAL: + case GL_GEQUAL: + case GL_ALWAYS: + if (ctx->Color.AlphaFunc == func && ctx->Color.AlphaRefUnclamped == ref) + return; /* no change */ + + FLUSH_VERTICES(ctx, _NEW_COLOR); + ctx->Color.AlphaFunc = func; + ctx->Color.AlphaRefUnclamped = ref; + ctx->Color.AlphaRef = CLAMP(ref, 0.0F, 1.0F); + + if (ctx->Driver.AlphaFunc) + ctx->Driver.AlphaFunc(ctx, func, ctx->Color.AlphaRef); + return; + + default: + _mesa_error( ctx, GL_INVALID_ENUM, "glAlphaFunc(func)" ); + return; + } +} + + +/** + * Specify a logic pixel operation for color index rendering. + * + * \param opcode operation. + * + * Verifies that \p opcode is a valid enum and updates +gl_colorbuffer_attrib::LogicOp. + * On a change, flushes the vertices and notifies the driver via the + * dd_function_table::LogicOpcode callback. + */ +void GLAPIENTRY +_mesa_LogicOp( GLenum opcode ) +{ + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "glLogicOp(%s)\n", _mesa_lookup_enum_by_nr(opcode)); + + switch (opcode) { + case GL_CLEAR: + case GL_SET: + case GL_COPY: + case GL_COPY_INVERTED: + case GL_NOOP: + case GL_INVERT: + case GL_AND: + case GL_NAND: + case GL_OR: + case GL_NOR: + case GL_XOR: + case GL_EQUIV: + case GL_AND_REVERSE: + case GL_AND_INVERTED: + case GL_OR_REVERSE: + case GL_OR_INVERTED: + break; + default: + _mesa_error( ctx, GL_INVALID_ENUM, "glLogicOp" ); + return; + } + + if (ctx->Color.LogicOp == opcode) + return; + + FLUSH_VERTICES(ctx, _NEW_COLOR); + ctx->Color.LogicOp = opcode; + + if (ctx->Driver.LogicOpcode) + ctx->Driver.LogicOpcode( ctx, opcode ); +} + +#if _HAVE_FULL_GL +void GLAPIENTRY +_mesa_IndexMask( GLuint mask ) +{ + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + if (ctx->Color.IndexMask == mask) + return; + + FLUSH_VERTICES(ctx, _NEW_COLOR); + ctx->Color.IndexMask = mask; +} +#endif + + +/** + * Enable or disable writing of frame buffer color components. + * + * \param red whether to mask writing of the red color component. + * \param green whether to mask writing of the green color component. + * \param blue whether to mask writing of the blue color component. + * \param alpha whether to mask writing of the alpha color component. + * + * \sa glColorMask(). + * + * Sets the appropriate value of gl_colorbuffer_attrib::ColorMask. On a + * change, flushes the vertices and notifies the driver via the + * dd_function_table::ColorMask callback. + */ +void GLAPIENTRY +_mesa_ColorMask( GLboolean red, GLboolean green, + GLboolean blue, GLboolean alpha ) +{ + GET_CURRENT_CONTEXT(ctx); + GLubyte tmp[4]; + GLuint i; + GLboolean flushed; + ASSERT_OUTSIDE_BEGIN_END(ctx); + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "glColorMask(%d, %d, %d, %d)\n", + red, green, blue, alpha); + + /* Shouldn't have any information about channel depth in core mesa + * -- should probably store these as the native booleans: + */ + tmp[RCOMP] = red ? 0xff : 0x0; + tmp[GCOMP] = green ? 0xff : 0x0; + tmp[BCOMP] = blue ? 0xff : 0x0; + tmp[ACOMP] = alpha ? 0xff : 0x0; + + flushed = GL_FALSE; + for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) { + if (!TEST_EQ_4V(tmp, ctx->Color.ColorMask[i])) { + if (!flushed) { + FLUSH_VERTICES(ctx, _NEW_COLOR); + } + flushed = GL_TRUE; + COPY_4UBV(ctx->Color.ColorMask[i], tmp); + } + } + + if (ctx->Driver.ColorMask) + ctx->Driver.ColorMask( ctx, red, green, blue, alpha ); +} + + +/** + * For GL_EXT_draw_buffers2 and GL3 + */ +void GLAPIENTRY +_mesa_ColorMaskIndexed( GLuint buf, GLboolean red, GLboolean green, + GLboolean blue, GLboolean alpha ) +{ + GLubyte tmp[4]; + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END(ctx); + + if (MESA_VERBOSE & VERBOSE_API) + _mesa_debug(ctx, "glColorMaskIndexed %u %d %d %d %d\n", + buf, red, green, blue, alpha); + + if (buf >= ctx->Const.MaxDrawBuffers) { + _mesa_error(ctx, GL_INVALID_VALUE, "glColorMaskIndexed(buf=%u)", buf); + return; + } + + /* Shouldn't have any information about channel depth in core mesa + * -- should probably store these as the native booleans: + */ + tmp[RCOMP] = red ? 0xff : 0x0; + tmp[GCOMP] = green ? 0xff : 0x0; + tmp[BCOMP] = blue ? 0xff : 0x0; + tmp[ACOMP] = alpha ? 0xff : 0x0; + + if (TEST_EQ_4V(tmp, ctx->Color.ColorMask[buf])) + return; + + FLUSH_VERTICES(ctx, _NEW_COLOR); + COPY_4UBV(ctx->Color.ColorMask[buf], tmp); + + if (ctx->Driver.ColorMaskIndexed) + ctx->Driver.ColorMaskIndexed(ctx, buf, red, green, blue, alpha); +} + + +void GLAPIENTRY +_mesa_ClampColorARB(GLenum target, GLenum clamp) +{ + GET_CURRENT_CONTEXT(ctx); + + ASSERT_OUTSIDE_BEGIN_END(ctx); + + if (clamp != GL_TRUE && clamp != GL_FALSE && clamp != GL_FIXED_ONLY_ARB) { + _mesa_error(ctx, GL_INVALID_ENUM, "glClampColorARB(clamp)"); + return; + } + + switch (target) { + case GL_CLAMP_VERTEX_COLOR_ARB: + FLUSH_VERTICES(ctx, _NEW_LIGHT); + ctx->Light.ClampVertexColor = clamp; + break; + case GL_CLAMP_FRAGMENT_COLOR_ARB: + FLUSH_VERTICES(ctx, _NEW_FRAG_CLAMP); + ctx->Color.ClampFragmentColor = clamp; + break; + case GL_CLAMP_READ_COLOR_ARB: + FLUSH_VERTICES(ctx, _NEW_COLOR); + ctx->Color.ClampReadColor = clamp; + break; + default: + _mesa_error(ctx, GL_INVALID_ENUM, "glClampColorARB(target)"); + return; + } +} + + + + +/**********************************************************************/ +/** \name Initialization */ +/*@{*/ + +/** + * Initialization of the context's Color attribute group. + * + * \param ctx GL context. + * + * Initializes the related fields in the context color attribute group, + * __struct gl_contextRec::Color. + */ +void _mesa_init_color( struct gl_context * ctx ) +{ + GLuint i; + + /* Color buffer group */ + ctx->Color.IndexMask = ~0u; + memset(ctx->Color.ColorMask, 0xff, sizeof(ctx->Color.ColorMask)); + ctx->Color.ClearIndex = 0; + ASSIGN_4V( ctx->Color.ClearColor, 0, 0, 0, 0 ); + ASSIGN_4V( ctx->Color.ClearColorUnclamped, 0, 0, 0, 0 ); + ctx->Color.AlphaEnabled = GL_FALSE; + ctx->Color.AlphaFunc = GL_ALWAYS; + ctx->Color.AlphaRef = 0; + ctx->Color.BlendEnabled = 0x0; + for (i = 0; i < Elements(ctx->Color.Blend); i++) { + ctx->Color.Blend[i].SrcRGB = GL_ONE; + ctx->Color.Blend[i].DstRGB = GL_ZERO; + ctx->Color.Blend[i].SrcA = GL_ONE; + ctx->Color.Blend[i].DstA = GL_ZERO; + ctx->Color.Blend[i].EquationRGB = GL_FUNC_ADD; + ctx->Color.Blend[i].EquationA = GL_FUNC_ADD; + } + ASSIGN_4V( ctx->Color.BlendColor, 0.0, 0.0, 0.0, 0.0 ); + ASSIGN_4V( ctx->Color.BlendColorUnclamped, 0.0, 0.0, 0.0, 0.0 ); + ctx->Color.IndexLogicOpEnabled = GL_FALSE; + ctx->Color.ColorLogicOpEnabled = GL_FALSE; + ctx->Color._LogicOpEnabled = GL_FALSE; + ctx->Color.LogicOp = GL_COPY; + ctx->Color.DitherFlag = GL_TRUE; + + if (ctx->Visual.doubleBufferMode) { + ctx->Color.DrawBuffer[0] = GL_BACK; + } + else { + ctx->Color.DrawBuffer[0] = GL_FRONT; + } + + ctx->Color.ClampFragmentColor = GL_FIXED_ONLY_ARB; + ctx->Color._ClampFragmentColor = GL_TRUE; + ctx->Color.ClampReadColor = GL_FIXED_ONLY_ARB; + ctx->Color._ClampReadColor = GL_TRUE; +} + +/*@}*/ diff --git a/mesalib/src/mesa/main/blend.h b/mesalib/src/mesa/main/blend.h index 7862eae71..b0a6b0135 100644 --- a/mesalib/src/mesa/main/blend.h +++ b/mesalib/src/mesa/main/blend.h @@ -68,7 +68,7 @@ extern void GLAPIENTRY _mesa_BlendEquationSeparateEXT( GLenum modeRGB, GLenum modeA ); -extern void +extern void GLAPIENTRY _mesa_BlendEquationSeparatei(GLuint buf, GLenum modeRGB, GLenum modeA); diff --git a/mesalib/src/mesa/main/bufferobj.c b/mesalib/src/mesa/main/bufferobj.c index c49437cf5..308555570 100644 --- a/mesalib/src/mesa/main/bufferobj.c +++ b/mesalib/src/mesa/main/bufferobj.c @@ -1416,14 +1416,13 @@ _mesa_MapBufferRange(GLenum target, GLintptr offset, GLsizeiptr length, return NULL; } - if (access & GL_MAP_READ_BIT) { - if ((access & GL_MAP_INVALIDATE_RANGE_BIT) || - (access & GL_MAP_INVALIDATE_BUFFER_BIT) || - (access & GL_MAP_UNSYNCHRONIZED_BIT)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glMapBufferRange(invalid access flags)"); - return NULL; - } + if ((access & GL_MAP_READ_BIT) && + (access & (GL_MAP_INVALIDATE_RANGE_BIT | + GL_MAP_INVALIDATE_BUFFER_BIT | + GL_MAP_UNSYNCHRONIZED_BIT))) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glMapBufferRange(invalid access flags)"); + return NULL; } if ((access & GL_MAP_FLUSH_EXPLICIT_BIT) && diff --git a/mesalib/src/mesa/main/es_generator.py b/mesalib/src/mesa/main/es_generator.py index 36bd14d6c..0776cf9a6 100644 --- a/mesalib/src/mesa/main/es_generator.py +++ b/mesalib/src/mesa/main/es_generator.py @@ -195,6 +195,10 @@ print """ #include "main/api_exec.h" #if FEATURE_%s + +#ifndef GLAPIENTRYP +#define GLAPIENTRYP GL_APIENTRYP +#endif """ % (versionHeader, versionExtHeader, shortname.upper()) # Everyone needs these types. diff --git a/mesalib/src/mesa/main/extensions.c b/mesalib/src/mesa/main/extensions.c index 8672ac2a7..267620a20 100644 --- a/mesalib/src/mesa/main/extensions.c +++ b/mesalib/src/mesa/main/extensions.c @@ -1,1003 +1,1004 @@ -/* - * Mesa 3-D graphics library - * Version: 7.6 - * - * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. - * Copyright (C) 2009 VMware, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/** - * \file - * \brief Extension handling - */ - - -#include "glheader.h" -#include "imports.h" -#include "context.h" -#include "extensions.h" -#include "mfeatures.h" -#include "mtypes.h" - -enum { - DISABLE = 0, - GL = 1 << API_OPENGL, - ES1 = 1 << API_OPENGLES, - ES2 = 1 << API_OPENGLES2, -}; - -/** - * \brief An element of the \c extension_table. - */ -struct extension { - /** Name of extension, such as "GL_ARB_depth_clamp". */ - const char *name; - - /** Offset (in bytes) of the corresponding member in struct gl_extensions. */ - size_t offset; - - /** Set of API's in which the extension exists, as a bitset. */ - uint8_t api_set; - - /** Year the extension was proposed or approved. Used to sort the - * extension string chronologically. */ - uint16_t year; -}; - - -/** - * Given a member \c x of struct gl_extensions, return offset of - * \c x in bytes. - */ -#define o(x) offsetof(struct gl_extensions, x) - - -/** - * \brief Table of supported OpenGL extensions for all API's. - * - * Note: The GL_MESAX_* extensions are placeholders for future ARB extensions. - */ -static const struct extension extension_table[] = { - /* ARB Extensions */ - { "GL_ARB_ES2_compatibility", o(ARB_ES2_compatibility), GL, 2009 }, - { "GL_ARB_blend_func_extended", o(ARB_blend_func_extended), GL, 2009 }, - { "GL_ARB_color_buffer_float", o(ARB_color_buffer_float), GL, 2004 }, - { "GL_ARB_copy_buffer", o(ARB_copy_buffer), GL, 2008 }, - { "GL_ARB_depth_buffer_float", o(ARB_depth_buffer_float), GL, 2008 }, - { "GL_ARB_depth_clamp", o(ARB_depth_clamp), GL, 2003 }, - { "GL_ARB_depth_texture", o(ARB_depth_texture), GL, 2001 }, - { "GL_ARB_draw_buffers", o(ARB_draw_buffers), GL, 2002 }, - { "GL_ARB_draw_buffers_blend", o(ARB_draw_buffers_blend), GL, 2009 }, - { "GL_ARB_draw_elements_base_vertex", o(ARB_draw_elements_base_vertex), GL, 2009 }, - { "GL_ARB_draw_instanced", o(ARB_draw_instanced), GL, 2008 }, - { "GL_ARB_explicit_attrib_location", o(ARB_explicit_attrib_location), GL, 2009 }, - { "GL_ARB_fragment_coord_conventions", o(ARB_fragment_coord_conventions), GL, 2009 }, - { "GL_ARB_fragment_program", o(ARB_fragment_program), GL, 2002 }, - { "GL_ARB_fragment_program_shadow", o(ARB_fragment_program_shadow), GL, 2003 }, - { "GL_ARB_fragment_shader", o(ARB_fragment_shader), GL, 2002 }, - { "GL_ARB_framebuffer_object", o(ARB_framebuffer_object), GL, 2005 }, - { "GL_ARB_framebuffer_sRGB", o(EXT_framebuffer_sRGB), GL, 1998 }, - { "GL_ARB_half_float_pixel", o(ARB_half_float_pixel), GL, 2003 }, - { "GL_ARB_half_float_vertex", o(ARB_half_float_vertex), GL, 2008 }, - { "GL_ARB_instanced_arrays", o(ARB_instanced_arrays), GL, 2008 }, - { "GL_ARB_map_buffer_range", o(ARB_map_buffer_range), GL, 2008 }, - { "GL_ARB_multisample", o(ARB_multisample), GL, 1994 }, - { "GL_ARB_multitexture", o(ARB_multitexture), GL, 1998 }, - { "GL_ARB_occlusion_query2", o(ARB_occlusion_query2), GL, 2003 }, - { "GL_ARB_occlusion_query", o(ARB_occlusion_query), GL, 2001 }, - { "GL_ARB_pixel_buffer_object", o(EXT_pixel_buffer_object), GL, 2004 }, - { "GL_ARB_point_parameters", o(EXT_point_parameters), GL, 1997 }, - { "GL_ARB_point_sprite", o(ARB_point_sprite), GL, 2003 }, - { "GL_ARB_provoking_vertex", o(EXT_provoking_vertex), GL, 2009 }, - { "GL_ARB_robustness", o(dummy_true), GL, 2010 }, - { "GL_ARB_sampler_objects", o(ARB_sampler_objects), GL, 2009 }, - { "GL_ARB_seamless_cube_map", o(ARB_seamless_cube_map), GL, 2009 }, - { "GL_ARB_shader_objects", o(ARB_shader_objects), GL, 2002 }, - { "GL_ARB_shader_stencil_export", o(ARB_shader_stencil_export), GL, 2009 }, - { "GL_ARB_shader_texture_lod", o(ARB_shader_texture_lod), GL, 2009 }, - { "GL_ARB_shading_language_100", o(ARB_shading_language_100), GL, 2003 }, - { "GL_ARB_shadow_ambient", o(ARB_shadow_ambient), GL, 2001 }, - { "GL_ARB_shadow", o(ARB_shadow), GL, 2001 }, - { "GL_ARB_sync", o(ARB_sync), GL, 2003 }, - { "GL_ARB_texture_border_clamp", o(ARB_texture_border_clamp), GL, 2000 }, - { "GL_ARB_texture_buffer_object", o(ARB_texture_buffer_object), GL, 2008 }, - { "GL_ARB_texture_compression", o(ARB_texture_compression), GL, 2000 }, - { "GL_ARB_texture_compression_rgtc", o(ARB_texture_compression_rgtc), GL, 2004 }, - { "GL_ARB_texture_cube_map", o(ARB_texture_cube_map), GL, 1999 }, - { "GL_ARB_texture_env_add", o(EXT_texture_env_add), GL, 1999 }, - { "GL_ARB_texture_env_combine", o(ARB_texture_env_combine), GL, 2001 }, - { "GL_ARB_texture_env_crossbar", o(ARB_texture_env_crossbar), GL, 2001 }, - { "GL_ARB_texture_env_dot3", o(ARB_texture_env_dot3), GL, 2001 }, - { "GL_ARB_texture_float", o(ARB_texture_float), GL, 2004 }, - { "GL_ARB_texture_mirrored_repeat", o(ARB_texture_mirrored_repeat), GL, 2001 }, - { "GL_ARB_texture_multisample", o(ARB_texture_multisample), GL, 2009 }, - { "GL_ARB_texture_non_power_of_two", o(ARB_texture_non_power_of_two), GL, 2003 }, - { "GL_ARB_texture_rectangle", o(NV_texture_rectangle), GL, 2004 }, - { "GL_ARB_texture_rgb10_a2ui", o(ARB_texture_rgb10_a2ui), GL, 2009 }, - { "GL_ARB_texture_rg", o(ARB_texture_rg), GL, 2008 }, - { "GL_ARB_texture_swizzle", o(EXT_texture_swizzle), GL, 2008 }, - { "GL_ARB_transform_feedback2", o(ARB_transform_feedback2), GL, 2010 }, - { "GL_ARB_transpose_matrix", o(ARB_transpose_matrix), GL, 1999 }, - { "GL_ARB_uniform_buffer_object", o(ARB_uniform_buffer_object), GL, 2002 }, - { "GL_ARB_vertex_array_bgra", o(EXT_vertex_array_bgra), GL, 2008 }, - { "GL_ARB_vertex_array_object", o(ARB_vertex_array_object), GL, 2006 }, - { "GL_ARB_vertex_buffer_object", o(ARB_vertex_buffer_object), GL, 2003 }, - { "GL_ARB_vertex_program", o(ARB_vertex_program), GL, 2002 }, - { "GL_ARB_vertex_shader", o(ARB_vertex_shader), GL, 2002 }, - { "GL_ARB_vertex_type_2_10_10_10_rev", o(ARB_vertex_type_2_10_10_10_rev), GL, 2009 }, - { "GL_ARB_window_pos", o(ARB_window_pos), GL, 2001 }, - /* EXT extensions */ - { "GL_EXT_abgr", o(EXT_abgr), GL, 1995 }, - { "GL_EXT_bgra", o(EXT_bgra), GL, 1995 }, - { "GL_EXT_blend_color", o(EXT_blend_color), GL, 1995 }, - { "GL_EXT_blend_equation_separate", o(EXT_blend_equation_separate), GL, 2003 }, - { "GL_EXT_blend_func_separate", o(EXT_blend_func_separate), GL, 1999 }, - { "GL_EXT_blend_logic_op", o(EXT_blend_logic_op), GL, 1995 }, - { "GL_EXT_blend_minmax", o(EXT_blend_minmax), GL | ES1 | ES2, 1995 }, - { "GL_EXT_blend_subtract", o(EXT_blend_subtract), GL, 1995 }, - { "GL_EXT_clip_volume_hint", o(EXT_clip_volume_hint), GL, 1996 }, - { "GL_EXT_compiled_vertex_array", o(EXT_compiled_vertex_array), GL, 1996 }, - { "GL_EXT_copy_texture", o(EXT_copy_texture), GL, 1995 }, - { "GL_EXT_depth_bounds_test", o(EXT_depth_bounds_test), GL, 2002 }, - { "GL_EXT_draw_buffers2", o(EXT_draw_buffers2), GL, 2006 }, - { "GL_EXT_draw_instanced", o(ARB_draw_instanced), GL, 2006 }, - { "GL_EXT_draw_range_elements", o(EXT_draw_range_elements), GL, 1997 }, - { "GL_EXT_fog_coord", o(EXT_fog_coord), GL, 1999 }, - { "GL_EXT_framebuffer_blit", o(EXT_framebuffer_blit), GL, 2005 }, - { "GL_EXT_framebuffer_multisample", o(EXT_framebuffer_multisample), GL, 2005 }, - { "GL_EXT_framebuffer_object", o(EXT_framebuffer_object), GL, 2000 }, - { "GL_EXT_framebuffer_sRGB", o(EXT_framebuffer_sRGB), GL, 1998 }, - { "GL_EXT_gpu_program_parameters", o(EXT_gpu_program_parameters), GL, 2006 }, - { "GL_EXT_gpu_shader4", o(EXT_gpu_shader4), GL, 2006 }, - { "GL_EXT_multi_draw_arrays", o(EXT_multi_draw_arrays), GL | ES1 | ES2, 1999 }, - { "GL_EXT_packed_depth_stencil", o(EXT_packed_depth_stencil), GL, 2005 }, - { "GL_EXT_packed_float", o(EXT_packed_float), GL, 2004 }, - { "GL_EXT_packed_pixels", o(EXT_packed_pixels), GL, 1997 }, - { "GL_EXT_paletted_texture", o(EXT_paletted_texture), GL, 1995 }, - { "GL_EXT_pixel_buffer_object", o(EXT_pixel_buffer_object), GL, 2004 }, - { "GL_EXT_point_parameters", o(EXT_point_parameters), GL, 1997 }, - { "GL_EXT_polygon_offset", o(EXT_polygon_offset), GL, 1995 }, - { "GL_EXT_provoking_vertex", o(EXT_provoking_vertex), GL, 2009 }, - { "GL_EXT_rescale_normal", o(EXT_rescale_normal), GL, 1997 }, - { "GL_EXT_secondary_color", o(EXT_secondary_color), GL, 1999 }, - { "GL_EXT_separate_shader_objects", o(EXT_separate_shader_objects), GL, 2008 }, - { "GL_EXT_separate_specular_color", o(EXT_separate_specular_color), GL, 1997 }, - { "GL_EXT_shadow_funcs", o(EXT_shadow_funcs), GL, 2002 }, - { "GL_EXT_shared_texture_palette", o(EXT_shared_texture_palette), GL, 2000 }, - { "GL_EXT_stencil_two_side", o(EXT_stencil_two_side), GL, 2001 }, - { "GL_EXT_stencil_wrap", o(EXT_stencil_wrap), GL, 2002 }, - { "GL_EXT_subtexture", o(EXT_subtexture), GL, 1995 }, - { "GL_EXT_texture3D", o(EXT_texture3D), GL, 1996 }, - { "GL_EXT_texture_array", o(EXT_texture_array), GL, 2006 }, - { "GL_EXT_texture_compression_dxt1", o(EXT_texture_compression_s3tc), GL | ES1 | ES2, 2004 }, - { "GL_EXT_texture_compression_latc", o(EXT_texture_compression_latc), GL, 2006 }, - { "GL_EXT_texture_compression_rgtc", o(ARB_texture_compression_rgtc), GL, 2004 }, - { "GL_EXT_texture_compression_s3tc", o(EXT_texture_compression_s3tc), GL, 2000 }, - { "GL_EXT_texture_cube_map", o(ARB_texture_cube_map), GL, 2001 }, - { "GL_EXT_texture_edge_clamp", o(SGIS_texture_edge_clamp), GL, 1997 }, - { "GL_EXT_texture_env_add", o(EXT_texture_env_add), GL, 1999 }, - { "GL_EXT_texture_env_combine", o(EXT_texture_env_combine), GL, 2006 }, - { "GL_EXT_texture_env_dot3", o(EXT_texture_env_dot3), GL, 2000 }, - { "GL_EXT_texture_filter_anisotropic", o(EXT_texture_filter_anisotropic), GL | ES1 | ES2, 1999 }, - { "GL_EXT_texture_format_BGRA8888", o(EXT_texture_format_BGRA8888), ES1 | ES2, 2009 }, - { "GL_EXT_texture_integer", o(EXT_texture_integer), GL, 2006 }, - { "GL_EXT_texture_lod_bias", o(EXT_texture_lod_bias), GL | ES1, 1999 }, - { "GL_EXT_texture_mirror_clamp", o(EXT_texture_mirror_clamp), GL, 2004 }, - { "GL_EXT_texture_object", o(EXT_texture_object), GL, 1995 }, - { "GL_EXT_texture", o(EXT_texture), GL, 1996 }, - { "GL_EXT_texture_rectangle", o(NV_texture_rectangle), GL, 2004 }, - { "GL_EXT_texture_shared_exponent", o(EXT_texture_shared_exponent), GL, 2004 }, - { "GL_EXT_texture_snorm", o(EXT_texture_snorm), GL, 2009 }, - { "GL_EXT_texture_sRGB", o(EXT_texture_sRGB), GL, 2004 }, - { "GL_EXT_texture_sRGB_decode", o(EXT_texture_sRGB_decode), GL, 2006 }, - { "GL_EXT_texture_swizzle", o(EXT_texture_swizzle), GL, 2008 }, - { "GL_EXT_texture_type_2_10_10_10_REV", o(dummy_true), ES2, 2008 }, - { "GL_EXT_timer_query", o(EXT_timer_query), GL, 2006 }, - { "GL_EXT_transform_feedback", o(EXT_transform_feedback), GL, 2011 }, - { "GL_EXT_vertex_array_bgra", o(EXT_vertex_array_bgra), GL, 2008 }, - { "GL_EXT_vertex_array", o(EXT_vertex_array), GL, 1995 }, - { "GL_EXT_vertex_array_set", o(EXT_vertex_array_set), GL, 1997 }, - - /* OES extensions */ - { "GL_OES_blend_equation_separate", o(EXT_blend_equation_separate), ES1, 2009 }, - { "GL_OES_blend_func_separate", o(EXT_blend_func_separate), ES1, 2009 }, - { "GL_OES_blend_subtract", o(EXT_blend_subtract), ES1, 2009 }, - { "GL_OES_byte_coordinates", o(dummy_true), ES1, 2002 }, - { "GL_OES_compressed_paletted_texture", o(dummy_false), DISABLE, 2003 }, - { "GL_OES_depth24", o(EXT_framebuffer_object), ES1 | ES2, 2005 }, - { "GL_OES_depth32", o(dummy_false), DISABLE, 2005 }, - { "GL_OES_depth_texture", o(ARB_depth_texture), ES2, 2006 }, -#if FEATURE_OES_draw_texture - { "GL_OES_draw_texture", o(OES_draw_texture), ES1 | ES2, 2004 }, -#endif -#if FEATURE_OES_EGL_image - /* FIXME: Mesa expects GL_OES_EGL_image to be available in OpenGL contexts. */ - { "GL_OES_EGL_image", o(OES_EGL_image), GL | ES1 | ES2, 2006 }, -#endif - { "GL_OES_element_index_uint", o(EXT_vertex_array), ES1 | ES2, 2005 }, - { "GL_OES_fbo_render_mipmap", o(EXT_framebuffer_object), ES1 | ES2, 2005 }, - { "GL_OES_fixed_point", o(dummy_true), ES1, 2002 }, - { "GL_OES_framebuffer_object", o(EXT_framebuffer_object), ES1, 2005 }, - { "GL_OES_mapbuffer", o(ARB_vertex_buffer_object), ES1 | ES2, 2005 }, - { "GL_OES_matrix_get", o(dummy_true), ES1, 2004 }, - { "GL_OES_packed_depth_stencil", o(EXT_packed_depth_stencil), ES1 | ES2, 2007 }, - { "GL_OES_point_size_array", o(dummy_true), ES1, 2004 }, - { "GL_OES_point_sprite", o(ARB_point_sprite), ES1, 2004 }, - { "GL_OES_query_matrix", o(dummy_true), ES1, 2003 }, - { "GL_OES_read_format", o(OES_read_format), GL | ES1, 2003 }, - { "GL_OES_rgb8_rgba8", o(EXT_framebuffer_object), ES1 | ES2, 2005 }, - { "GL_OES_single_precision", o(dummy_true), ES1, 2003 }, - { "GL_OES_standard_derivatives", o(OES_standard_derivatives), ES2, 2005 }, - { "GL_OES_stencil1", o(dummy_false), DISABLE, 2005 }, - { "GL_OES_stencil4", o(dummy_false), DISABLE, 2005 }, - { "GL_OES_stencil8", o(EXT_framebuffer_object), ES1 | ES2, 2005 }, - { "GL_OES_stencil_wrap", o(EXT_stencil_wrap), ES1, 2002 }, - { "GL_OES_texture_3D", o(EXT_texture3D), ES2, 2005 }, - { "GL_OES_texture_cube_map", o(ARB_texture_cube_map), ES1, 2007 }, - { "GL_OES_texture_env_crossbar", o(ARB_texture_env_crossbar), ES1, 2005 }, - { "GL_OES_texture_mirrored_repeat", o(ARB_texture_mirrored_repeat), ES1, 2005 }, - { "GL_OES_texture_npot", o(ARB_texture_non_power_of_two), ES2, 2005 }, - - /* Vendor extensions */ - { "GL_3DFX_texture_compression_FXT1", o(TDFX_texture_compression_FXT1), GL, 1999 }, - { "GL_AMD_conservative_depth", o(AMD_conservative_depth), GL, 2009 }, - { "GL_AMD_draw_buffers_blend", o(ARB_draw_buffers_blend), GL, 2009 }, - { "GL_AMD_seamless_cubemap_per_texture", o(AMD_seamless_cubemap_per_texture), GL, 2009 }, - { "GL_AMD_shader_stencil_export", o(ARB_shader_stencil_export), GL, 2009 }, - { "GL_APPLE_client_storage", o(APPLE_client_storage), GL, 2002 }, - { "GL_APPLE_object_purgeable", o(APPLE_object_purgeable), GL, 2006 }, - { "GL_APPLE_packed_pixels", o(APPLE_packed_pixels), GL, 2002 }, - { "GL_APPLE_vertex_array_object", o(APPLE_vertex_array_object), GL, 2002 }, - { "GL_ATI_blend_equation_separate", o(EXT_blend_equation_separate), GL, 2003 }, - { "GL_ATI_draw_buffers", o(ARB_draw_buffers), GL, 2002 }, - { "GL_ATI_envmap_bumpmap", o(ATI_envmap_bumpmap), GL, 2001 }, - { "GL_ATI_fragment_shader", o(ATI_fragment_shader), GL, 2001 }, - { "GL_ATI_separate_stencil", o(ATI_separate_stencil), GL, 2006 }, - { "GL_ATI_texture_compression_3dc", o(ATI_texture_compression_3dc), GL, 2004 }, - { "GL_ATI_texture_env_combine3", o(ATI_texture_env_combine3), GL, 2002 }, - { "GL_ATI_texture_float", o(ARB_texture_float), GL, 2002 }, - { "GL_ATI_texture_mirror_once", o(ATI_texture_mirror_once), GL, 2006 }, - { "GL_IBM_multimode_draw_arrays", o(IBM_multimode_draw_arrays), GL, 1998 }, - { "GL_IBM_rasterpos_clip", o(IBM_rasterpos_clip), GL, 1996 }, - { "GL_IBM_texture_mirrored_repeat", o(ARB_texture_mirrored_repeat), GL, 1998 }, - { "GL_INGR_blend_func_separate", o(EXT_blend_func_separate), GL, 1999 }, - { "GL_MESA_pack_invert", o(MESA_pack_invert), GL, 2002 }, - { "GL_MESA_resize_buffers", o(MESA_resize_buffers), GL, 1999 }, - { "GL_MESA_texture_array", o(MESA_texture_array), GL, 2007 }, - { "GL_MESA_texture_signed_rgba", o(EXT_texture_snorm), GL, 2009 }, - { "GL_MESA_window_pos", o(ARB_window_pos), GL, 2000 }, - { "GL_MESA_ycbcr_texture", o(MESA_ycbcr_texture), GL, 2002 }, - { "GL_NV_blend_square", o(NV_blend_square), GL, 1999 }, - { "GL_NV_conditional_render", o(NV_conditional_render), GL, 2008 }, - { "GL_NV_depth_clamp", o(ARB_depth_clamp), GL, 2001 }, - { "GL_NV_fragment_program", o(NV_fragment_program), GL, 2001 }, - { "GL_NV_fragment_program_option", o(NV_fragment_program_option), GL, 2005 }, - { "GL_NV_light_max_exponent", o(NV_light_max_exponent), GL, 1999 }, - { "GL_NV_packed_depth_stencil", o(EXT_packed_depth_stencil), GL, 2000 }, - { "GL_NV_point_sprite", o(NV_point_sprite), GL, 2001 }, - { "GL_NV_primitive_restart", o(NV_primitive_restart), GL, 2002 }, - { "GL_NV_texgen_reflection", o(NV_texgen_reflection), GL, 1999 }, - { "GL_NV_texture_barrier", o(NV_texture_barrier), GL, 2009 }, - { "GL_NV_texture_env_combine4", o(NV_texture_env_combine4), GL, 1999 }, - { "GL_NV_texture_rectangle", o(NV_texture_rectangle), GL, 2000 }, - { "GL_NV_vertex_program1_1", o(NV_vertex_program1_1), GL, 2001 }, - { "GL_NV_vertex_program", o(NV_vertex_program), GL, 2000 }, - { "GL_S3_s3tc", o(S3_s3tc), GL, 1999 }, - { "GL_SGIS_generate_mipmap", o(SGIS_generate_mipmap), GL, 1997 }, - { "GL_SGIS_texture_border_clamp", o(ARB_texture_border_clamp), GL, 1997 }, - { "GL_SGIS_texture_edge_clamp", o(SGIS_texture_edge_clamp), GL, 1997 }, - { "GL_SGIS_texture_lod", o(SGIS_texture_lod), GL, 1997 }, - { "GL_SUN_multi_draw_arrays", o(EXT_multi_draw_arrays), GL, 1999 }, - - { 0, 0, 0, 0 }, -}; - - -/** - * Given an extension name, lookup up the corresponding member of struct - * gl_extensions and return that member's offset (in bytes). If the name is - * not found in the \c extension_table, return 0. - * - * \param name Name of extension. - * \return Offset of member in struct gl_extensions. - */ -static size_t -name_to_offset(const char* name) -{ - const struct extension *i; - - if (name == 0) - return 0; - - for (i = extension_table; i->name != 0; ++i) { - if (strcmp(name, i->name) == 0) - return i->offset; - } - - return 0; -} - - -/** - * \brief Extensions enabled by default. - * - * These extensions are enabled by _mesa_init_extensions(). - * - * XXX: Should these defaults also apply to GLES? - */ -static const size_t default_extensions[] = { - o(ARB_copy_buffer), - o(ARB_draw_buffers), - o(ARB_multisample), - o(ARB_texture_compression), - o(ARB_transpose_matrix), - o(ARB_vertex_buffer_object), - o(ARB_window_pos), - - o(EXT_abgr), - o(EXT_bgra), - o(EXT_compiled_vertex_array), - o(EXT_copy_texture), - o(EXT_draw_range_elements), - o(EXT_multi_draw_arrays), - o(EXT_packed_pixels), - o(EXT_polygon_offset), - o(EXT_rescale_normal), - o(EXT_separate_specular_color), - o(EXT_subtexture), - o(EXT_texture), - o(EXT_texture3D), - o(EXT_texture_object), - o(EXT_vertex_array), - - o(OES_read_format), - o(OES_standard_derivatives), - - /* Vendor Extensions */ - o(APPLE_packed_pixels), - o(IBM_multimode_draw_arrays), - o(IBM_rasterpos_clip), - o(NV_light_max_exponent), - o(NV_texgen_reflection), - o(SGIS_generate_mipmap), - o(SGIS_texture_edge_clamp), - o(SGIS_texture_lod), - - 0, -}; - - -/** - * Enable all extensions suitable for a software-only renderer. - * This is a convenience function used by the XMesa, OSMesa, GGI drivers, etc. - */ -void -_mesa_enable_sw_extensions(struct gl_context *ctx) -{ - /*ctx->Extensions.ARB_copy_buffer = GL_TRUE;*/ - ctx->Extensions.ARB_depth_clamp = GL_TRUE; - ctx->Extensions.ARB_depth_texture = GL_TRUE; - /*ctx->Extensions.ARB_draw_buffers = GL_TRUE;*/ - ctx->Extensions.ARB_draw_elements_base_vertex = GL_TRUE; - ctx->Extensions.ARB_draw_instanced = GL_TRUE; - ctx->Extensions.ARB_explicit_attrib_location = GL_TRUE; - ctx->Extensions.ARB_fragment_coord_conventions = GL_TRUE; -#if FEATURE_ARB_fragment_program - ctx->Extensions.ARB_fragment_program = GL_TRUE; - ctx->Extensions.ARB_fragment_program_shadow = GL_TRUE; -#endif -#if FEATURE_ARB_fragment_shader - ctx->Extensions.ARB_fragment_shader = GL_TRUE; -#endif -#if FEATURE_ARB_framebuffer_object - ctx->Extensions.ARB_framebuffer_object = GL_TRUE; -#endif -#if FEATURE_ARB_geometry_shader4 && 0 - /* XXX re-enable when GLSL compiler again supports geometry shaders */ - ctx->Extensions.ARB_geometry_shader4 = GL_TRUE; -#endif - ctx->Extensions.ARB_half_float_pixel = GL_TRUE; - ctx->Extensions.ARB_half_float_vertex = GL_TRUE; - ctx->Extensions.ARB_map_buffer_range = GL_TRUE; - ctx->Extensions.ARB_multitexture = GL_TRUE; -#if FEATURE_queryobj - ctx->Extensions.ARB_occlusion_query = GL_TRUE; - ctx->Extensions.ARB_occlusion_query2 = GL_TRUE; -#endif - ctx->Extensions.ARB_point_sprite = GL_TRUE; -#if FEATURE_ARB_shader_objects - ctx->Extensions.ARB_shader_objects = GL_TRUE; - ctx->Extensions.EXT_separate_shader_objects = GL_TRUE; -#endif -#if FEATURE_ARB_shading_language_100 - ctx->Extensions.ARB_shading_language_100 = GL_TRUE; -#endif - ctx->Extensions.ARB_shadow = GL_TRUE; - ctx->Extensions.ARB_shadow_ambient = GL_TRUE; - ctx->Extensions.ARB_texture_border_clamp = GL_TRUE; - ctx->Extensions.ARB_texture_cube_map = GL_TRUE; - ctx->Extensions.ARB_texture_env_combine = GL_TRUE; - ctx->Extensions.ARB_texture_env_crossbar = GL_TRUE; - ctx->Extensions.ARB_texture_env_dot3 = GL_TRUE; - /*ctx->Extensions.ARB_texture_float = GL_TRUE;*/ - ctx->Extensions.ARB_texture_mirrored_repeat = GL_TRUE; - ctx->Extensions.ARB_texture_non_power_of_two = GL_TRUE; - ctx->Extensions.ARB_texture_rg = GL_TRUE; - ctx->Extensions.ARB_texture_compression_rgtc = GL_TRUE; - ctx->Extensions.ARB_vertex_array_object = GL_TRUE; -#if FEATURE_ARB_vertex_program - ctx->Extensions.ARB_vertex_program = GL_TRUE; -#endif -#if FEATURE_ARB_vertex_shader - ctx->Extensions.ARB_vertex_shader = GL_TRUE; -#endif -#if FEATURE_ARB_vertex_buffer_object - /*ctx->Extensions.ARB_vertex_buffer_object = GL_TRUE;*/ -#endif -#if FEATURE_ARB_sync - ctx->Extensions.ARB_sync = GL_TRUE; -#endif - ctx->Extensions.APPLE_vertex_array_object = GL_TRUE; -#if FEATURE_APPLE_object_purgeable - ctx->Extensions.APPLE_object_purgeable = GL_TRUE; -#endif - ctx->Extensions.ATI_envmap_bumpmap = GL_TRUE; -#if FEATURE_ATI_fragment_shader - ctx->Extensions.ATI_fragment_shader = GL_TRUE; -#endif - ctx->Extensions.ATI_texture_compression_3dc = GL_TRUE; - ctx->Extensions.ATI_texture_env_combine3 = GL_TRUE; - ctx->Extensions.ATI_texture_mirror_once = GL_TRUE; - ctx->Extensions.ATI_separate_stencil = GL_TRUE; - ctx->Extensions.EXT_blend_color = GL_TRUE; - ctx->Extensions.EXT_blend_equation_separate = GL_TRUE; - ctx->Extensions.EXT_blend_func_separate = GL_TRUE; - ctx->Extensions.EXT_blend_logic_op = GL_TRUE; - ctx->Extensions.EXT_blend_minmax = GL_TRUE; - ctx->Extensions.EXT_blend_subtract = GL_TRUE; - ctx->Extensions.EXT_depth_bounds_test = GL_TRUE; - ctx->Extensions.EXT_draw_buffers2 = GL_TRUE; - ctx->Extensions.EXT_fog_coord = GL_TRUE; -#if FEATURE_EXT_framebuffer_object - ctx->Extensions.EXT_framebuffer_object = GL_TRUE; -#endif -#if FEATURE_EXT_framebuffer_blit - ctx->Extensions.EXT_framebuffer_blit = GL_TRUE; -#endif -#if FEATURE_ARB_framebuffer_object - ctx->Extensions.EXT_framebuffer_multisample = GL_TRUE; -#endif - /*ctx->Extensions.EXT_multi_draw_arrays = GL_TRUE;*/ - ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE; - ctx->Extensions.EXT_paletted_texture = GL_TRUE; -#if FEATURE_EXT_pixel_buffer_object - ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE; -#endif - ctx->Extensions.EXT_point_parameters = GL_TRUE; - ctx->Extensions.EXT_provoking_vertex = GL_TRUE; - ctx->Extensions.EXT_shadow_funcs = GL_TRUE; - ctx->Extensions.EXT_secondary_color = GL_TRUE; - ctx->Extensions.EXT_shared_texture_palette = GL_TRUE; - ctx->Extensions.EXT_stencil_wrap = GL_TRUE; - ctx->Extensions.EXT_stencil_two_side = GL_TRUE; - ctx->Extensions.EXT_texture_array = GL_TRUE; - ctx->Extensions.EXT_texture_compression_latc = GL_TRUE; - ctx->Extensions.EXT_texture_env_add = GL_TRUE; - ctx->Extensions.EXT_texture_env_combine = GL_TRUE; - ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE; - ctx->Extensions.EXT_texture_mirror_clamp = GL_TRUE; - ctx->Extensions.EXT_texture_lod_bias = GL_TRUE; - ctx->Extensions.EXT_texture_shared_exponent = GL_TRUE; -#if FEATURE_EXT_texture_sRGB - ctx->Extensions.EXT_texture_sRGB = GL_TRUE; - ctx->Extensions.EXT_texture_sRGB_decode = GL_TRUE; -#endif - ctx->Extensions.EXT_texture_swizzle = GL_TRUE; -#if FEATURE_EXT_transform_feedback - /*ctx->Extensions.EXT_transform_feedback = GL_TRUE;*/ -#endif - ctx->Extensions.EXT_vertex_array_bgra = GL_TRUE; - /*ctx->Extensions.IBM_multimode_draw_arrays = GL_TRUE;*/ - ctx->Extensions.MESA_pack_invert = GL_TRUE; - ctx->Extensions.MESA_resize_buffers = GL_TRUE; - ctx->Extensions.MESA_texture_array = GL_TRUE; - ctx->Extensions.MESA_ycbcr_texture = GL_TRUE; - ctx->Extensions.NV_blend_square = GL_TRUE; - ctx->Extensions.NV_conditional_render = GL_TRUE; - /*ctx->Extensions.NV_light_max_exponent = GL_TRUE;*/ - ctx->Extensions.NV_point_sprite = GL_TRUE; - ctx->Extensions.NV_texture_env_combine4 = GL_TRUE; - ctx->Extensions.NV_texture_rectangle = GL_TRUE; - /*ctx->Extensions.NV_texgen_reflection = GL_TRUE;*/ -#if FEATURE_NV_vertex_program - ctx->Extensions.NV_vertex_program = GL_TRUE; - ctx->Extensions.NV_vertex_program1_1 = GL_TRUE; -#endif -#if FEATURE_NV_fragment_program - ctx->Extensions.NV_fragment_program = GL_TRUE; -#endif -#if FEATURE_NV_fragment_program && FEATURE_ARB_fragment_program - ctx->Extensions.NV_fragment_program_option = GL_TRUE; -#endif - /*ctx->Extensions.SGIS_generate_mipmap = GL_TRUE;*/ - ctx->Extensions.SGIS_texture_edge_clamp = GL_TRUE; -#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program - ctx->Extensions.EXT_gpu_program_parameters = GL_TRUE; -#endif -#if FEATURE_texture_fxt1 - _mesa_enable_extension(ctx, "GL_3DFX_texture_compression_FXT1"); -#endif -#if FEATURE_texture_s3tc - if (ctx->Mesa_DXTn) { - _mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc"); - _mesa_enable_extension(ctx, "GL_S3_s3tc"); - } -#endif -} - - -/** - * Enable common EXT extensions in the ARB_imaging subset. - */ -void -_mesa_enable_imaging_extensions(struct gl_context *ctx) -{ - ctx->Extensions.EXT_blend_color = GL_TRUE; - ctx->Extensions.EXT_blend_logic_op = GL_TRUE; - ctx->Extensions.EXT_blend_minmax = GL_TRUE; - ctx->Extensions.EXT_blend_subtract = GL_TRUE; -} - - - -/** - * Enable all OpenGL 1.3 features and extensions. - * A convenience function to be called by drivers. - */ -void -_mesa_enable_1_3_extensions(struct gl_context *ctx) -{ - /*ctx->Extensions.ARB_multisample = GL_TRUE;*/ - ctx->Extensions.ARB_multitexture = GL_TRUE; - ctx->Extensions.ARB_texture_border_clamp = GL_TRUE; - /*ctx->Extensions.ARB_texture_compression = GL_TRUE;*/ - ctx->Extensions.ARB_texture_cube_map = GL_TRUE; - ctx->Extensions.ARB_texture_env_combine = GL_TRUE; - ctx->Extensions.ARB_texture_env_dot3 = GL_TRUE; - ctx->Extensions.EXT_texture_env_add = GL_TRUE; - /*ctx->Extensions.ARB_transpose_matrix = GL_TRUE;*/ -} - - - -/** - * Enable all OpenGL 1.4 features and extensions. - * A convenience function to be called by drivers. - */ -void -_mesa_enable_1_4_extensions(struct gl_context *ctx) -{ - ctx->Extensions.ARB_depth_texture = GL_TRUE; - ctx->Extensions.ARB_shadow = GL_TRUE; - ctx->Extensions.ARB_texture_env_crossbar = GL_TRUE; - ctx->Extensions.ARB_texture_mirrored_repeat = GL_TRUE; - ctx->Extensions.ARB_window_pos = GL_TRUE; - ctx->Extensions.EXT_blend_color = GL_TRUE; - ctx->Extensions.EXT_blend_func_separate = GL_TRUE; - ctx->Extensions.EXT_blend_minmax = GL_TRUE; - ctx->Extensions.EXT_blend_subtract = GL_TRUE; - ctx->Extensions.EXT_fog_coord = GL_TRUE; - /*ctx->Extensions.EXT_multi_draw_arrays = GL_TRUE;*/ - ctx->Extensions.EXT_point_parameters = GL_TRUE; - ctx->Extensions.EXT_secondary_color = GL_TRUE; - ctx->Extensions.EXT_stencil_wrap = GL_TRUE; - ctx->Extensions.EXT_texture_lod_bias = GL_TRUE; - /*ctx->Extensions.SGIS_generate_mipmap = GL_TRUE;*/ -} - - -/** - * Enable all OpenGL 1.5 features and extensions. - * A convenience function to be called by drivers. - */ -void -_mesa_enable_1_5_extensions(struct gl_context *ctx) -{ - ctx->Extensions.ARB_occlusion_query = GL_TRUE; - /*ctx->Extensions.ARB_vertex_buffer_object = GL_TRUE;*/ - ctx->Extensions.EXT_shadow_funcs = GL_TRUE; -} - - -/** - * Enable all OpenGL 2.0 features and extensions. - * A convenience function to be called by drivers. - */ -void -_mesa_enable_2_0_extensions(struct gl_context *ctx) -{ - /*ctx->Extensions.ARB_draw_buffers = GL_TRUE;*/ -#if FEATURE_ARB_fragment_shader - ctx->Extensions.ARB_fragment_shader = GL_TRUE; -#endif - ctx->Extensions.ARB_point_sprite = GL_TRUE; - ctx->Extensions.EXT_blend_equation_separate = GL_TRUE; - ctx->Extensions.ARB_texture_non_power_of_two = GL_TRUE; -#if FEATURE_ARB_shader_objects - ctx->Extensions.ARB_shader_objects = GL_TRUE; -#endif -#if FEATURE_ARB_shading_language_100 - ctx->Extensions.ARB_shading_language_100 = GL_TRUE; -#endif - ctx->Extensions.EXT_stencil_two_side = GL_TRUE; -#if FEATURE_ARB_vertex_shader - ctx->Extensions.ARB_vertex_shader = GL_TRUE; -#endif -} - - -/** - * Enable all OpenGL 2.1 features and extensions. - * A convenience function to be called by drivers. - */ -void -_mesa_enable_2_1_extensions(struct gl_context *ctx) -{ -#if FEATURE_EXT_pixel_buffer_object - ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE; -#endif -#if FEATURE_EXT_texture_sRGB - ctx->Extensions.EXT_texture_sRGB = GL_TRUE; -#endif -} - - -/** - * Either enable or disable the named extension. - * \return GL_TRUE for success, GL_FALSE if invalid extension name - */ -static GLboolean -set_extension( struct gl_context *ctx, const char *name, GLboolean state ) -{ - size_t offset; - - if (ctx->Extensions.String) { - /* The string was already queried - can't change it now! */ - _mesa_problem(ctx, "Trying to enable/disable extension after glGetString(GL_EXTENSIONS): %s", name); - return GL_FALSE; - } - - offset = name_to_offset(name); - if (offset == 0) { - _mesa_problem(ctx, "Trying to enable/disable unknown extension %s", - name); - return GL_FALSE; - } else if (offset == o(dummy_true) && state == GL_FALSE) { - _mesa_problem(ctx, "Trying to disable a permanently enabled extension: " - "%s", name); - return GL_FALSE; - } else { - GLboolean *base = (GLboolean *) &ctx->Extensions; - base[offset] = state; - return GL_TRUE; - } -} - - -/** - * Enable the named extension. - * Typically called by drivers. - */ -void -_mesa_enable_extension( struct gl_context *ctx, const char *name ) -{ - if (!set_extension(ctx, name, GL_TRUE)) - _mesa_problem(ctx, "Trying to enable unknown extension: %s", name); -} - - -/** - * Disable the named extension. - * XXX is this really needed??? - */ -void -_mesa_disable_extension( struct gl_context *ctx, const char *name ) -{ - if (!set_extension(ctx, name, GL_FALSE)) - _mesa_problem(ctx, "Trying to disable unknown extension: %s", name); -} - - -/** - * Test if the named extension is enabled in this context. - */ -GLboolean -_mesa_extension_is_enabled( struct gl_context *ctx, const char *name ) -{ - size_t offset; - GLboolean *base; - - if (name == 0) - return GL_FALSE; - - offset = name_to_offset(name); - if (offset == 0) - return GL_FALSE; - base = (GLboolean *) &ctx->Extensions; - return base[offset]; -} - - -/** - * \brief Apply the \c MESA_EXTENSION_OVERRIDE environment variable. - * - * \c MESA_EXTENSION_OVERRIDE is a space-separated list of extensions to - * enable or disable. The list is processed thus: - * - Enable recognized extension names that are prefixed with '+'. - * - Disable recognized extension names that are prefixed with '-'. - * - Enable recognized extension names that are not prefixed. - * - Collect unrecognized extension names in a new string. - * - * \return Space-separated list of unrecognized extension names (which must - * be freed). Does not return \c NULL. - */ -static char * -get_extension_override( struct gl_context *ctx ) -{ - const char *env_const = _mesa_getenv("MESA_EXTENSION_OVERRIDE"); - char *env; - char *ext; - char *extra_exts; - int len; - - if (env_const == NULL) { - /* Return the empty string rather than NULL. This simplifies the logic - * of client functions. */ - return calloc(1, sizeof(char)); - } - - /* extra_exts: List of unrecognized extensions. */ - extra_exts = calloc(strlen(env_const), sizeof(char)); - - /* Copy env_const because strtok() is destructive. */ - env = strdup(env_const); - for (ext = strtok(env, " "); ext != NULL; ext = strtok(NULL, " ")) { - int enable; - int recognized; - switch (ext[0]) { - case '+': - enable = 1; - ++ext; - break; - case '-': - enable = 0; - ++ext; - break; - default: - enable = 1; - break; - } - recognized = set_extension(ctx, ext, enable); - if (!recognized) { - strcat(extra_exts, ext); - strcat(extra_exts, " "); - } - } - - /* Remove trailing space. */ - len = strlen(extra_exts); - if (extra_exts[len - 1] == ' ') - extra_exts[len - 1] = '\0'; - - return extra_exts; -} - - -/** - * \brief Initialize extension tables and enable default extensions. - * - * This should be called during context initialization. - * Note: Sets gl_extensions.dummy_true to true. - */ -void -_mesa_init_extensions( struct gl_context *ctx ) -{ - GLboolean *base = (GLboolean *) &ctx->Extensions; - GLboolean *sentinel = base + o(extension_sentinel); - GLboolean *i; - const size_t *j; - - /* First, turn all extensions off. */ - for (i = base; i != sentinel; ++i) - *i = GL_FALSE; - - /* Then, selectively turn default extensions on. */ - ctx->Extensions.dummy_true = GL_TRUE; - for (j = default_extensions; *j != 0; ++j) - base[*j] = GL_TRUE; -} - - -typedef unsigned short extension_index; - - -/** - * Compare two entries of the extensions table. Sorts first by year, - * then by name. - * - * Arguments are indices into extension_table. - */ -static int -extension_compare(const void *p1, const void *p2) -{ - extension_index i1 = * (const extension_index *) p1; - extension_index i2 = * (const extension_index *) p2; - const struct extension *e1 = &extension_table[i1]; - const struct extension *e2 = &extension_table[i2]; - int res; - - res = (int)e1->year - (int)e2->year; - - if (res == 0) { - res = strcmp(e1->name, e2->name); - } - - return res; -} - - -/** - * Construct the GL_EXTENSIONS string. Called the first time that - * glGetString(GL_EXTENSIONS) is called. - */ -GLubyte* -_mesa_make_extension_string(struct gl_context *ctx) -{ - /* The extension string. */ - char *exts = 0; - /* Length of extension string. */ - size_t length = 0; - /* Number of extensions */ - unsigned count; - /* Indices of the extensions sorted by year */ - extension_index *extension_indices; - /* String of extra extensions. */ - char *extra_extensions = get_extension_override(ctx); - GLboolean *base = (GLboolean *) &ctx->Extensions; - const struct extension *i; - unsigned j; - unsigned maxYear = ~0; - - /* Check if the MESA_EXTENSION_MAX_YEAR env var is set */ - { - const char *env = getenv("MESA_EXTENSION_MAX_YEAR"); - if (env) { - maxYear = atoi(env); - _mesa_debug(ctx, "Note: limiting GL extensions to %u or earlier\n", - maxYear); - } - } - - /* Compute length of the extension string. */ - count = 0; - for (i = extension_table; i->name != 0; ++i) { - if (base[i->offset] && - i->year <= maxYear && - (i->api_set & (1 << ctx->API))) { - length += strlen(i->name) + 1; /* +1 for space */ - ++count; - } - } - if (extra_extensions != NULL) - length += 1 + strlen(extra_extensions); /* +1 for space */ - - exts = (char *) calloc(length + 1, sizeof(char)); - if (exts == NULL) { - free(extra_extensions); - return NULL; - } - - extension_indices = malloc(count * sizeof(extension_index)); - if (extension_indices == NULL) { - free(exts); - free(extra_extensions); - return NULL; - } - - /* Sort extensions in chronological order because certain old applications (e.g., - * Quake3 demo) store the extension list in a static size buffer so chronologically - * order ensure that the extensions that such applications expect will fit into - * that buffer. - */ - j = 0; - for (i = extension_table; i->name != 0; ++i) { - if (base[i->offset] && - i->year <= maxYear && - (i->api_set & (1 << ctx->API))) { - extension_indices[j++] = i - extension_table; - } - } - assert(j == count); - qsort(extension_indices, count, sizeof *extension_indices, extension_compare); - - /* Build the extension string.*/ - for (j = 0; j < count; ++j) { - i = &extension_table[extension_indices[j]]; - assert(base[i->offset] && (i->api_set & (1 << ctx->API))); - strcat(exts, i->name); - strcat(exts, " "); - } - free(extension_indices); - if (extra_extensions != 0) { - strcat(exts, extra_extensions); - free(extra_extensions); - } - - return (GLubyte *) exts; -} - -/** - * Return number of enabled extensions. - */ -GLuint -_mesa_get_extension_count(struct gl_context *ctx) -{ - GLboolean *base; - const struct extension *i; - - /* only count once */ - if (ctx->Extensions.Count != 0) - return ctx->Extensions.Count; - - base = (GLboolean *) &ctx->Extensions; - for (i = extension_table; i->name != 0; ++i) { - if (base[i->offset]) { - ctx->Extensions.Count++; - } - } - return ctx->Extensions.Count; -} - -/** - * Return name of i-th enabled extension - */ -const GLubyte * -_mesa_get_enabled_extension(struct gl_context *ctx, GLuint index) -{ - const GLboolean *base; - size_t n; - const struct extension *i; - - if (index < 0) - return NULL; - - base = (GLboolean*) &ctx->Extensions; - n = 0; - for (i = extension_table; i->name != 0; ++i) { - if (n == index && base[i->offset]) { - return (GLubyte*) i->name; - } else if (base[i->offset]) { - ++n; - } - } - - return NULL; -} +/* + * Mesa 3-D graphics library + * Version: 7.6 + * + * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. + * Copyright (C) 2009 VMware, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +/** + * \file + * \brief Extension handling + */ + + +#include "glheader.h" +#include "imports.h" +#include "context.h" +#include "extensions.h" +#include "mfeatures.h" +#include "mtypes.h" + +enum { + DISABLE = 0, + GL = 1 << API_OPENGL, + ES1 = 1 << API_OPENGLES, + ES2 = 1 << API_OPENGLES2, +}; + +/** + * \brief An element of the \c extension_table. + */ +struct extension { + /** Name of extension, such as "GL_ARB_depth_clamp". */ + const char *name; + + /** Offset (in bytes) of the corresponding member in struct gl_extensions. */ + size_t offset; + + /** Set of API's in which the extension exists, as a bitset. */ + uint8_t api_set; + + /** Year the extension was proposed or approved. Used to sort the + * extension string chronologically. */ + uint16_t year; +}; + + +/** + * Given a member \c x of struct gl_extensions, return offset of + * \c x in bytes. + */ +#define o(x) offsetof(struct gl_extensions, x) + + +/** + * \brief Table of supported OpenGL extensions for all API's. + * + * Note: The GL_MESAX_* extensions are placeholders for future ARB extensions. + */ +static const struct extension extension_table[] = { + /* ARB Extensions */ + { "GL_ARB_ES2_compatibility", o(ARB_ES2_compatibility), GL, 2009 }, + { "GL_ARB_blend_func_extended", o(ARB_blend_func_extended), GL, 2009 }, + { "GL_ARB_color_buffer_float", o(ARB_color_buffer_float), GL, 2004 }, + { "GL_ARB_copy_buffer", o(ARB_copy_buffer), GL, 2008 }, + { "GL_ARB_depth_buffer_float", o(ARB_depth_buffer_float), GL, 2008 }, + { "GL_ARB_depth_clamp", o(ARB_depth_clamp), GL, 2003 }, + { "GL_ARB_depth_texture", o(ARB_depth_texture), GL, 2001 }, + { "GL_ARB_draw_buffers", o(ARB_draw_buffers), GL, 2002 }, + { "GL_ARB_draw_buffers_blend", o(ARB_draw_buffers_blend), GL, 2009 }, + { "GL_ARB_draw_elements_base_vertex", o(ARB_draw_elements_base_vertex), GL, 2009 }, + { "GL_ARB_draw_instanced", o(ARB_draw_instanced), GL, 2008 }, + { "GL_ARB_explicit_attrib_location", o(ARB_explicit_attrib_location), GL, 2009 }, + { "GL_ARB_fragment_coord_conventions", o(ARB_fragment_coord_conventions), GL, 2009 }, + { "GL_ARB_fragment_program", o(ARB_fragment_program), GL, 2002 }, + { "GL_ARB_fragment_program_shadow", o(ARB_fragment_program_shadow), GL, 2003 }, + { "GL_ARB_fragment_shader", o(ARB_fragment_shader), GL, 2002 }, + { "GL_ARB_framebuffer_object", o(ARB_framebuffer_object), GL, 2005 }, + { "GL_ARB_framebuffer_sRGB", o(EXT_framebuffer_sRGB), GL, 1998 }, + { "GL_ARB_half_float_pixel", o(ARB_half_float_pixel), GL, 2003 }, + { "GL_ARB_half_float_vertex", o(ARB_half_float_vertex), GL, 2008 }, + { "GL_ARB_instanced_arrays", o(ARB_instanced_arrays), GL, 2008 }, + { "GL_ARB_map_buffer_range", o(ARB_map_buffer_range), GL, 2008 }, + { "GL_ARB_multisample", o(ARB_multisample), GL, 1994 }, + { "GL_ARB_multitexture", o(ARB_multitexture), GL, 1998 }, + { "GL_ARB_occlusion_query2", o(ARB_occlusion_query2), GL, 2003 }, + { "GL_ARB_occlusion_query", o(ARB_occlusion_query), GL, 2001 }, + { "GL_ARB_pixel_buffer_object", o(EXT_pixel_buffer_object), GL, 2004 }, + { "GL_ARB_point_parameters", o(EXT_point_parameters), GL, 1997 }, + { "GL_ARB_point_sprite", o(ARB_point_sprite), GL, 2003 }, + { "GL_ARB_provoking_vertex", o(EXT_provoking_vertex), GL, 2009 }, + { "GL_ARB_robustness", o(dummy_true), GL, 2010 }, + { "GL_ARB_sampler_objects", o(ARB_sampler_objects), GL, 2009 }, + { "GL_ARB_seamless_cube_map", o(ARB_seamless_cube_map), GL, 2009 }, + { "GL_ARB_shader_objects", o(ARB_shader_objects), GL, 2002 }, + { "GL_ARB_shader_stencil_export", o(ARB_shader_stencil_export), GL, 2009 }, + { "GL_ARB_shader_texture_lod", o(ARB_shader_texture_lod), GL, 2009 }, + { "GL_ARB_shading_language_100", o(ARB_shading_language_100), GL, 2003 }, + { "GL_ARB_shadow_ambient", o(ARB_shadow_ambient), GL, 2001 }, + { "GL_ARB_shadow", o(ARB_shadow), GL, 2001 }, + { "GL_ARB_sync", o(ARB_sync), GL, 2003 }, + { "GL_ARB_texture_border_clamp", o(ARB_texture_border_clamp), GL, 2000 }, + { "GL_ARB_texture_buffer_object", o(ARB_texture_buffer_object), GL, 2008 }, + { "GL_ARB_texture_compression", o(ARB_texture_compression), GL, 2000 }, + { "GL_ARB_texture_compression_rgtc", o(ARB_texture_compression_rgtc), GL, 2004 }, + { "GL_ARB_texture_cube_map", o(ARB_texture_cube_map), GL, 1999 }, + { "GL_ARB_texture_env_add", o(EXT_texture_env_add), GL, 1999 }, + { "GL_ARB_texture_env_combine", o(ARB_texture_env_combine), GL, 2001 }, + { "GL_ARB_texture_env_crossbar", o(ARB_texture_env_crossbar), GL, 2001 }, + { "GL_ARB_texture_env_dot3", o(ARB_texture_env_dot3), GL, 2001 }, + { "GL_ARB_texture_float", o(ARB_texture_float), GL, 2004 }, + { "GL_ARB_texture_mirrored_repeat", o(ARB_texture_mirrored_repeat), GL, 2001 }, + { "GL_ARB_texture_multisample", o(ARB_texture_multisample), GL, 2009 }, + { "GL_ARB_texture_non_power_of_two", o(ARB_texture_non_power_of_two), GL, 2003 }, + { "GL_ARB_texture_rectangle", o(NV_texture_rectangle), GL, 2004 }, + { "GL_ARB_texture_rgb10_a2ui", o(ARB_texture_rgb10_a2ui), GL, 2009 }, + { "GL_ARB_texture_rg", o(ARB_texture_rg), GL, 2008 }, + { "GL_ARB_texture_swizzle", o(EXT_texture_swizzle), GL, 2008 }, + { "GL_ARB_transform_feedback2", o(ARB_transform_feedback2), GL, 2010 }, + { "GL_ARB_transpose_matrix", o(ARB_transpose_matrix), GL, 1999 }, + { "GL_ARB_uniform_buffer_object", o(ARB_uniform_buffer_object), GL, 2002 }, + { "GL_ARB_vertex_array_bgra", o(EXT_vertex_array_bgra), GL, 2008 }, + { "GL_ARB_vertex_array_object", o(ARB_vertex_array_object), GL, 2006 }, + { "GL_ARB_vertex_buffer_object", o(ARB_vertex_buffer_object), GL, 2003 }, + { "GL_ARB_vertex_program", o(ARB_vertex_program), GL, 2002 }, + { "GL_ARB_vertex_shader", o(ARB_vertex_shader), GL, 2002 }, + { "GL_ARB_vertex_type_2_10_10_10_rev", o(ARB_vertex_type_2_10_10_10_rev), GL, 2009 }, + { "GL_ARB_window_pos", o(ARB_window_pos), GL, 2001 }, + /* EXT extensions */ + { "GL_EXT_abgr", o(EXT_abgr), GL, 1995 }, + { "GL_EXT_bgra", o(EXT_bgra), GL, 1995 }, + { "GL_EXT_blend_color", o(EXT_blend_color), GL, 1995 }, + { "GL_EXT_blend_equation_separate", o(EXT_blend_equation_separate), GL, 2003 }, + { "GL_EXT_blend_func_separate", o(EXT_blend_func_separate), GL, 1999 }, + { "GL_EXT_blend_logic_op", o(EXT_blend_logic_op), GL, 1995 }, + { "GL_EXT_blend_minmax", o(EXT_blend_minmax), GL | ES1 | ES2, 1995 }, + { "GL_EXT_blend_subtract", o(EXT_blend_subtract), GL, 1995 }, + { "GL_EXT_clip_volume_hint", o(EXT_clip_volume_hint), GL, 1996 }, + { "GL_EXT_compiled_vertex_array", o(EXT_compiled_vertex_array), GL, 1996 }, + { "GL_EXT_copy_texture", o(EXT_copy_texture), GL, 1995 }, + { "GL_EXT_depth_bounds_test", o(EXT_depth_bounds_test), GL, 2002 }, + { "GL_EXT_draw_buffers2", o(EXT_draw_buffers2), GL, 2006 }, + { "GL_EXT_draw_instanced", o(ARB_draw_instanced), GL, 2006 }, + { "GL_EXT_draw_range_elements", o(EXT_draw_range_elements), GL, 1997 }, + { "GL_EXT_fog_coord", o(EXT_fog_coord), GL, 1999 }, + { "GL_EXT_framebuffer_blit", o(EXT_framebuffer_blit), GL, 2005 }, + { "GL_EXT_framebuffer_multisample", o(EXT_framebuffer_multisample), GL, 2005 }, + { "GL_EXT_framebuffer_object", o(EXT_framebuffer_object), GL, 2000 }, + { "GL_EXT_framebuffer_sRGB", o(EXT_framebuffer_sRGB), GL, 1998 }, + { "GL_EXT_gpu_program_parameters", o(EXT_gpu_program_parameters), GL, 2006 }, + { "GL_EXT_gpu_shader4", o(EXT_gpu_shader4), GL, 2006 }, + { "GL_EXT_multi_draw_arrays", o(EXT_multi_draw_arrays), GL | ES1 | ES2, 1999 }, + { "GL_EXT_packed_depth_stencil", o(EXT_packed_depth_stencil), GL, 2005 }, + { "GL_EXT_packed_float", o(EXT_packed_float), GL, 2004 }, + { "GL_EXT_packed_pixels", o(EXT_packed_pixels), GL, 1997 }, + { "GL_EXT_paletted_texture", o(EXT_paletted_texture), GL, 1995 }, + { "GL_EXT_pixel_buffer_object", o(EXT_pixel_buffer_object), GL, 2004 }, + { "GL_EXT_point_parameters", o(EXT_point_parameters), GL, 1997 }, + { "GL_EXT_polygon_offset", o(EXT_polygon_offset), GL, 1995 }, + { "GL_EXT_provoking_vertex", o(EXT_provoking_vertex), GL, 2009 }, + { "GL_EXT_rescale_normal", o(EXT_rescale_normal), GL, 1997 }, + { "GL_EXT_secondary_color", o(EXT_secondary_color), GL, 1999 }, + { "GL_EXT_separate_shader_objects", o(EXT_separate_shader_objects), GL, 2008 }, + { "GL_EXT_separate_specular_color", o(EXT_separate_specular_color), GL, 1997 }, + { "GL_EXT_shadow_funcs", o(EXT_shadow_funcs), GL, 2002 }, + { "GL_EXT_shared_texture_palette", o(EXT_shared_texture_palette), GL, 2000 }, + { "GL_EXT_stencil_two_side", o(EXT_stencil_two_side), GL, 2001 }, + { "GL_EXT_stencil_wrap", o(EXT_stencil_wrap), GL, 2002 }, + { "GL_EXT_subtexture", o(EXT_subtexture), GL, 1995 }, + { "GL_EXT_texture3D", o(EXT_texture3D), GL, 1996 }, + { "GL_EXT_texture_array", o(EXT_texture_array), GL, 2006 }, + { "GL_EXT_texture_compression_dxt1", o(EXT_texture_compression_s3tc), GL | ES1 | ES2, 2004 }, + { "GL_EXT_texture_compression_latc", o(EXT_texture_compression_latc), GL, 2006 }, + { "GL_EXT_texture_compression_rgtc", o(ARB_texture_compression_rgtc), GL, 2004 }, + { "GL_EXT_texture_compression_s3tc", o(EXT_texture_compression_s3tc), GL, 2000 }, + { "GL_EXT_texture_cube_map", o(ARB_texture_cube_map), GL, 2001 }, + { "GL_EXT_texture_edge_clamp", o(SGIS_texture_edge_clamp), GL, 1997 }, + { "GL_EXT_texture_env_add", o(EXT_texture_env_add), GL, 1999 }, + { "GL_EXT_texture_env_combine", o(EXT_texture_env_combine), GL, 2006 }, + { "GL_EXT_texture_env_dot3", o(EXT_texture_env_dot3), GL, 2000 }, + { "GL_EXT_texture_filter_anisotropic", o(EXT_texture_filter_anisotropic), GL | ES1 | ES2, 1999 }, + { "GL_EXT_texture_format_BGRA8888", o(EXT_texture_format_BGRA8888), ES1 | ES2, 2009 }, + { "GL_EXT_texture_integer", o(EXT_texture_integer), GL, 2006 }, + { "GL_EXT_texture_lod_bias", o(EXT_texture_lod_bias), GL | ES1, 1999 }, + { "GL_EXT_texture_mirror_clamp", o(EXT_texture_mirror_clamp), GL, 2004 }, + { "GL_EXT_texture_object", o(EXT_texture_object), GL, 1995 }, + { "GL_EXT_texture", o(EXT_texture), GL, 1996 }, + { "GL_EXT_texture_rectangle", o(NV_texture_rectangle), GL, 2004 }, + { "GL_EXT_texture_shared_exponent", o(EXT_texture_shared_exponent), GL, 2004 }, + { "GL_EXT_texture_snorm", o(EXT_texture_snorm), GL, 2009 }, + { "GL_EXT_texture_sRGB", o(EXT_texture_sRGB), GL, 2004 }, + { "GL_EXT_texture_sRGB_decode", o(EXT_texture_sRGB_decode), GL, 2006 }, + { "GL_EXT_texture_swizzle", o(EXT_texture_swizzle), GL, 2008 }, + { "GL_EXT_texture_type_2_10_10_10_REV", o(dummy_true), ES2, 2008 }, + { "GL_EXT_timer_query", o(EXT_timer_query), GL, 2006 }, + { "GL_EXT_transform_feedback", o(EXT_transform_feedback), GL, 2011 }, + { "GL_EXT_vertex_array_bgra", o(EXT_vertex_array_bgra), GL, 2008 }, + { "GL_EXT_vertex_array", o(EXT_vertex_array), GL, 1995 }, + { "GL_EXT_vertex_array_set", o(EXT_vertex_array_set), GL, 1997 }, + + /* OES extensions */ + { "GL_OES_blend_equation_separate", o(EXT_blend_equation_separate), ES1, 2009 }, + { "GL_OES_blend_func_separate", o(EXT_blend_func_separate), ES1, 2009 }, + { "GL_OES_blend_subtract", o(EXT_blend_subtract), ES1, 2009 }, + { "GL_OES_byte_coordinates", o(dummy_true), ES1, 2002 }, + { "GL_OES_compressed_paletted_texture", o(dummy_false), DISABLE, 2003 }, + { "GL_OES_depth24", o(EXT_framebuffer_object), ES1 | ES2, 2005 }, + { "GL_OES_depth32", o(dummy_false), DISABLE, 2005 }, + { "GL_OES_depth_texture", o(ARB_depth_texture), ES2, 2006 }, +#if FEATURE_OES_draw_texture + { "GL_OES_draw_texture", o(OES_draw_texture), ES1 | ES2, 2004 }, +#endif +#if FEATURE_OES_EGL_image + /* FIXME: Mesa expects GL_OES_EGL_image to be available in OpenGL contexts. */ + { "GL_OES_EGL_image", o(OES_EGL_image), GL | ES1 | ES2, 2006 }, +#endif + { "GL_OES_element_index_uint", o(EXT_vertex_array), ES1 | ES2, 2005 }, + { "GL_OES_fbo_render_mipmap", o(EXT_framebuffer_object), ES1 | ES2, 2005 }, + { "GL_OES_fixed_point", o(dummy_true), ES1, 2002 }, + { "GL_OES_framebuffer_object", o(EXT_framebuffer_object), ES1, 2005 }, + { "GL_OES_mapbuffer", o(ARB_vertex_buffer_object), ES1 | ES2, 2005 }, + { "GL_OES_matrix_get", o(dummy_true), ES1, 2004 }, + { "GL_OES_packed_depth_stencil", o(EXT_packed_depth_stencil), ES1 | ES2, 2007 }, + { "GL_OES_point_size_array", o(dummy_true), ES1, 2004 }, + { "GL_OES_point_sprite", o(ARB_point_sprite), ES1, 2004 }, + { "GL_OES_query_matrix", o(dummy_true), ES1, 2003 }, + { "GL_OES_read_format", o(OES_read_format), GL | ES1, 2003 }, + { "GL_OES_rgb8_rgba8", o(EXT_framebuffer_object), ES1 | ES2, 2005 }, + { "GL_OES_single_precision", o(dummy_true), ES1, 2003 }, + { "GL_OES_standard_derivatives", o(OES_standard_derivatives), ES2, 2005 }, + { "GL_OES_stencil1", o(dummy_false), DISABLE, 2005 }, + { "GL_OES_stencil4", o(dummy_false), DISABLE, 2005 }, + { "GL_OES_stencil8", o(EXT_framebuffer_object), ES1 | ES2, 2005 }, + { "GL_OES_stencil_wrap", o(EXT_stencil_wrap), ES1, 2002 }, + { "GL_OES_texture_3D", o(EXT_texture3D), ES2, 2005 }, + { "GL_OES_texture_cube_map", o(ARB_texture_cube_map), ES1, 2007 }, + { "GL_OES_texture_env_crossbar", o(ARB_texture_env_crossbar), ES1, 2005 }, + { "GL_OES_texture_mirrored_repeat", o(ARB_texture_mirrored_repeat), ES1, 2005 }, + { "GL_OES_texture_npot", o(ARB_texture_non_power_of_two), ES2, 2005 }, + + /* Vendor extensions */ + { "GL_3DFX_texture_compression_FXT1", o(TDFX_texture_compression_FXT1), GL, 1999 }, + { "GL_AMD_conservative_depth", o(AMD_conservative_depth), GL, 2009 }, + { "GL_AMD_draw_buffers_blend", o(ARB_draw_buffers_blend), GL, 2009 }, + { "GL_AMD_seamless_cubemap_per_texture", o(AMD_seamless_cubemap_per_texture), GL, 2009 }, + { "GL_AMD_shader_stencil_export", o(ARB_shader_stencil_export), GL, 2009 }, + { "GL_APPLE_client_storage", o(APPLE_client_storage), GL, 2002 }, + { "GL_APPLE_object_purgeable", o(APPLE_object_purgeable), GL, 2006 }, + { "GL_APPLE_packed_pixels", o(APPLE_packed_pixels), GL, 2002 }, + { "GL_APPLE_vertex_array_object", o(APPLE_vertex_array_object), GL, 2002 }, + { "GL_ATI_blend_equation_separate", o(EXT_blend_equation_separate), GL, 2003 }, + { "GL_ATI_draw_buffers", o(ARB_draw_buffers), GL, 2002 }, + { "GL_ATI_envmap_bumpmap", o(ATI_envmap_bumpmap), GL, 2001 }, + { "GL_ATI_fragment_shader", o(ATI_fragment_shader), GL, 2001 }, + { "GL_ATI_separate_stencil", o(ATI_separate_stencil), GL, 2006 }, + { "GL_ATI_texture_compression_3dc", o(ATI_texture_compression_3dc), GL, 2004 }, + { "GL_ATI_texture_env_combine3", o(ATI_texture_env_combine3), GL, 2002 }, + { "GL_ATI_texture_float", o(ARB_texture_float), GL, 2002 }, + { "GL_ATI_texture_mirror_once", o(ATI_texture_mirror_once), GL, 2006 }, + { "GL_IBM_multimode_draw_arrays", o(IBM_multimode_draw_arrays), GL, 1998 }, + { "GL_IBM_rasterpos_clip", o(IBM_rasterpos_clip), GL, 1996 }, + { "GL_IBM_texture_mirrored_repeat", o(ARB_texture_mirrored_repeat), GL, 1998 }, + { "GL_INGR_blend_func_separate", o(EXT_blend_func_separate), GL, 1999 }, + { "GL_MESA_pack_invert", o(MESA_pack_invert), GL, 2002 }, + { "GL_MESA_resize_buffers", o(MESA_resize_buffers), GL, 1999 }, + { "GL_MESA_texture_array", o(MESA_texture_array), GL, 2007 }, + { "GL_MESA_texture_signed_rgba", o(EXT_texture_snorm), GL, 2009 }, + { "GL_MESA_window_pos", o(ARB_window_pos), GL, 2000 }, + { "GL_MESA_ycbcr_texture", o(MESA_ycbcr_texture), GL, 2002 }, + { "GL_NV_blend_square", o(NV_blend_square), GL, 1999 }, + { "GL_NV_conditional_render", o(NV_conditional_render), GL, 2008 }, + { "GL_NV_depth_clamp", o(ARB_depth_clamp), GL, 2001 }, + { "GL_NV_fragment_program", o(NV_fragment_program), GL, 2001 }, + { "GL_NV_fragment_program_option", o(NV_fragment_program_option), GL, 2005 }, + { "GL_NV_light_max_exponent", o(NV_light_max_exponent), GL, 1999 }, + { "GL_NV_packed_depth_stencil", o(EXT_packed_depth_stencil), GL, 2000 }, + { "GL_NV_point_sprite", o(NV_point_sprite), GL, 2001 }, + { "GL_NV_primitive_restart", o(NV_primitive_restart), GL, 2002 }, + { "GL_NV_texgen_reflection", o(NV_texgen_reflection), GL, 1999 }, + { "GL_NV_texture_barrier", o(NV_texture_barrier), GL, 2009 }, + { "GL_NV_texture_env_combine4", o(NV_texture_env_combine4), GL, 1999 }, + { "GL_NV_texture_rectangle", o(NV_texture_rectangle), GL, 2000 }, + { "GL_NV_vertex_program1_1", o(NV_vertex_program1_1), GL, 2001 }, + { "GL_NV_vertex_program", o(NV_vertex_program), GL, 2000 }, + { "GL_S3_s3tc", o(S3_s3tc), GL, 1999 }, + { "GL_SGIS_generate_mipmap", o(SGIS_generate_mipmap), GL, 1997 }, + { "GL_SGIS_texture_border_clamp", o(ARB_texture_border_clamp), GL, 1997 }, + { "GL_SGIS_texture_edge_clamp", o(SGIS_texture_edge_clamp), GL, 1997 }, + { "GL_SGIS_texture_lod", o(SGIS_texture_lod), GL, 1997 }, + { "GL_SUN_multi_draw_arrays", o(EXT_multi_draw_arrays), GL, 1999 }, + + { 0, 0, 0, 0 }, +}; + + +/** + * Given an extension name, lookup up the corresponding member of struct + * gl_extensions and return that member's offset (in bytes). If the name is + * not found in the \c extension_table, return 0. + * + * \param name Name of extension. + * \return Offset of member in struct gl_extensions. + */ +static size_t +name_to_offset(const char* name) +{ + const struct extension *i; + + if (name == 0) + return 0; + + for (i = extension_table; i->name != 0; ++i) { + if (strcmp(name, i->name) == 0) + return i->offset; + } + + return 0; +} + + +/** + * \brief Extensions enabled by default. + * + * These extensions are enabled by _mesa_init_extensions(). + * + * XXX: Should these defaults also apply to GLES? + */ +static const size_t default_extensions[] = { + o(ARB_copy_buffer), + o(ARB_draw_buffers), + o(ARB_multisample), + o(ARB_texture_compression), + o(ARB_transpose_matrix), + o(ARB_vertex_buffer_object), + o(ARB_window_pos), + + o(EXT_abgr), + o(EXT_bgra), + o(EXT_compiled_vertex_array), + o(EXT_copy_texture), + o(EXT_draw_range_elements), + o(EXT_multi_draw_arrays), + o(EXT_packed_pixels), + o(EXT_polygon_offset), + o(EXT_rescale_normal), + o(EXT_separate_specular_color), + o(EXT_subtexture), + o(EXT_texture), + o(EXT_texture3D), + o(EXT_texture_object), + o(EXT_vertex_array), + + o(OES_read_format), + o(OES_standard_derivatives), + + /* Vendor Extensions */ + o(APPLE_packed_pixels), + o(IBM_multimode_draw_arrays), + o(IBM_rasterpos_clip), + o(NV_light_max_exponent), + o(NV_texgen_reflection), + o(SGIS_generate_mipmap), + o(SGIS_texture_edge_clamp), + o(SGIS_texture_lod), + + 0, +}; + + +/** + * Enable all extensions suitable for a software-only renderer. + * This is a convenience function used by the XMesa, OSMesa, GGI drivers, etc. + */ +void +_mesa_enable_sw_extensions(struct gl_context *ctx) +{ + /*ctx->Extensions.ARB_copy_buffer = GL_TRUE;*/ + ctx->Extensions.ARB_depth_clamp = GL_TRUE; + ctx->Extensions.ARB_depth_texture = GL_TRUE; + /*ctx->Extensions.ARB_draw_buffers = GL_TRUE;*/ + ctx->Extensions.ARB_draw_elements_base_vertex = GL_TRUE; + ctx->Extensions.ARB_draw_instanced = GL_TRUE; + ctx->Extensions.ARB_explicit_attrib_location = GL_TRUE; + ctx->Extensions.ARB_fragment_coord_conventions = GL_TRUE; +#if FEATURE_ARB_fragment_program + ctx->Extensions.ARB_fragment_program = GL_TRUE; + ctx->Extensions.ARB_fragment_program_shadow = GL_TRUE; +#endif +#if FEATURE_ARB_fragment_shader + ctx->Extensions.ARB_fragment_shader = GL_TRUE; +#endif +#if FEATURE_ARB_framebuffer_object + ctx->Extensions.ARB_framebuffer_object = GL_TRUE; +#endif +#if FEATURE_ARB_geometry_shader4 && 0 + /* XXX re-enable when GLSL compiler again supports geometry shaders */ + ctx->Extensions.ARB_geometry_shader4 = GL_TRUE; +#endif + ctx->Extensions.ARB_half_float_pixel = GL_TRUE; + ctx->Extensions.ARB_half_float_vertex = GL_TRUE; + ctx->Extensions.ARB_map_buffer_range = GL_TRUE; + ctx->Extensions.ARB_multitexture = GL_TRUE; +#if FEATURE_queryobj + ctx->Extensions.ARB_occlusion_query = GL_TRUE; + ctx->Extensions.ARB_occlusion_query2 = GL_TRUE; +#endif + ctx->Extensions.ARB_point_sprite = GL_TRUE; +#if FEATURE_ARB_shader_objects + ctx->Extensions.ARB_shader_objects = GL_TRUE; + ctx->Extensions.EXT_separate_shader_objects = GL_TRUE; +#endif +#if FEATURE_ARB_shading_language_100 + ctx->Extensions.ARB_shading_language_100 = GL_TRUE; +#endif + ctx->Extensions.ARB_shadow = GL_TRUE; + ctx->Extensions.ARB_shadow_ambient = GL_TRUE; + ctx->Extensions.ARB_texture_border_clamp = GL_TRUE; + ctx->Extensions.ARB_texture_cube_map = GL_TRUE; + ctx->Extensions.ARB_texture_env_combine = GL_TRUE; + ctx->Extensions.ARB_texture_env_crossbar = GL_TRUE; + ctx->Extensions.ARB_texture_env_dot3 = GL_TRUE; + /*ctx->Extensions.ARB_texture_float = GL_TRUE;*/ + ctx->Extensions.ARB_texture_mirrored_repeat = GL_TRUE; + ctx->Extensions.ARB_texture_non_power_of_two = GL_TRUE; + ctx->Extensions.ARB_texture_rg = GL_TRUE; + ctx->Extensions.ARB_texture_compression_rgtc = GL_TRUE; + ctx->Extensions.ARB_vertex_array_object = GL_TRUE; +#if FEATURE_ARB_vertex_program + ctx->Extensions.ARB_vertex_program = GL_TRUE; +#endif +#if FEATURE_ARB_vertex_shader + ctx->Extensions.ARB_vertex_shader = GL_TRUE; +#endif +#if FEATURE_ARB_vertex_buffer_object + /*ctx->Extensions.ARB_vertex_buffer_object = GL_TRUE;*/ +#endif +#if FEATURE_ARB_sync + ctx->Extensions.ARB_sync = GL_TRUE; +#endif + ctx->Extensions.APPLE_vertex_array_object = GL_TRUE; +#if FEATURE_APPLE_object_purgeable + ctx->Extensions.APPLE_object_purgeable = GL_TRUE; +#endif + ctx->Extensions.ATI_envmap_bumpmap = GL_TRUE; +#if FEATURE_ATI_fragment_shader + ctx->Extensions.ATI_fragment_shader = GL_TRUE; +#endif + ctx->Extensions.ATI_texture_compression_3dc = GL_TRUE; + ctx->Extensions.ATI_texture_env_combine3 = GL_TRUE; + ctx->Extensions.ATI_texture_mirror_once = GL_TRUE; + ctx->Extensions.ATI_separate_stencil = GL_TRUE; + ctx->Extensions.EXT_blend_color = GL_TRUE; + ctx->Extensions.EXT_blend_equation_separate = GL_TRUE; + ctx->Extensions.EXT_blend_func_separate = GL_TRUE; + ctx->Extensions.EXT_blend_logic_op = GL_TRUE; + ctx->Extensions.EXT_blend_minmax = GL_TRUE; + ctx->Extensions.EXT_blend_subtract = GL_TRUE; + ctx->Extensions.EXT_depth_bounds_test = GL_TRUE; + ctx->Extensions.EXT_draw_buffers2 = GL_TRUE; + ctx->Extensions.EXT_fog_coord = GL_TRUE; +#if FEATURE_EXT_framebuffer_object + ctx->Extensions.EXT_framebuffer_object = GL_TRUE; +#endif +#if FEATURE_EXT_framebuffer_blit + ctx->Extensions.EXT_framebuffer_blit = GL_TRUE; +#endif +#if FEATURE_ARB_framebuffer_object + ctx->Extensions.EXT_framebuffer_multisample = GL_TRUE; +#endif + /*ctx->Extensions.EXT_multi_draw_arrays = GL_TRUE;*/ + ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE; + ctx->Extensions.EXT_paletted_texture = GL_TRUE; +#if FEATURE_EXT_pixel_buffer_object + ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE; +#endif + ctx->Extensions.EXT_point_parameters = GL_TRUE; + ctx->Extensions.EXT_provoking_vertex = GL_TRUE; + ctx->Extensions.EXT_shadow_funcs = GL_TRUE; + ctx->Extensions.EXT_secondary_color = GL_TRUE; + ctx->Extensions.EXT_shared_texture_palette = GL_TRUE; + ctx->Extensions.EXT_stencil_wrap = GL_TRUE; + ctx->Extensions.EXT_stencil_two_side = GL_TRUE; + ctx->Extensions.EXT_texture_array = GL_TRUE; + ctx->Extensions.EXT_texture_compression_latc = GL_TRUE; + ctx->Extensions.EXT_texture_env_add = GL_TRUE; + ctx->Extensions.EXT_texture_env_combine = GL_TRUE; + ctx->Extensions.EXT_texture_env_dot3 = GL_TRUE; + ctx->Extensions.EXT_texture_filter_anisotropic = GL_TRUE; + ctx->Extensions.EXT_texture_mirror_clamp = GL_TRUE; + ctx->Extensions.EXT_texture_lod_bias = GL_TRUE; + ctx->Extensions.EXT_texture_shared_exponent = GL_TRUE; +#if FEATURE_EXT_texture_sRGB + ctx->Extensions.EXT_texture_sRGB = GL_TRUE; + ctx->Extensions.EXT_texture_sRGB_decode = GL_TRUE; +#endif + ctx->Extensions.EXT_texture_swizzle = GL_TRUE; +#if FEATURE_EXT_transform_feedback + /*ctx->Extensions.EXT_transform_feedback = GL_TRUE;*/ +#endif + ctx->Extensions.EXT_vertex_array_bgra = GL_TRUE; + /*ctx->Extensions.IBM_multimode_draw_arrays = GL_TRUE;*/ + ctx->Extensions.MESA_pack_invert = GL_TRUE; + ctx->Extensions.MESA_resize_buffers = GL_TRUE; + ctx->Extensions.MESA_texture_array = GL_TRUE; + ctx->Extensions.MESA_ycbcr_texture = GL_TRUE; + ctx->Extensions.NV_blend_square = GL_TRUE; + ctx->Extensions.NV_conditional_render = GL_TRUE; + /*ctx->Extensions.NV_light_max_exponent = GL_TRUE;*/ + ctx->Extensions.NV_point_sprite = GL_TRUE; + ctx->Extensions.NV_texture_env_combine4 = GL_TRUE; + ctx->Extensions.NV_texture_rectangle = GL_TRUE; + /*ctx->Extensions.NV_texgen_reflection = GL_TRUE;*/ +#if FEATURE_NV_vertex_program + ctx->Extensions.NV_vertex_program = GL_TRUE; + ctx->Extensions.NV_vertex_program1_1 = GL_TRUE; +#endif +#if FEATURE_NV_fragment_program + ctx->Extensions.NV_fragment_program = GL_TRUE; +#endif +#if FEATURE_NV_fragment_program && FEATURE_ARB_fragment_program + ctx->Extensions.NV_fragment_program_option = GL_TRUE; +#endif + /*ctx->Extensions.SGIS_generate_mipmap = GL_TRUE;*/ + ctx->Extensions.SGIS_texture_edge_clamp = GL_TRUE; +#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program + ctx->Extensions.EXT_gpu_program_parameters = GL_TRUE; +#endif +#if FEATURE_texture_fxt1 + _mesa_enable_extension(ctx, "GL_3DFX_texture_compression_FXT1"); +#endif +#if FEATURE_texture_s3tc + if (ctx->Mesa_DXTn) { + _mesa_enable_extension(ctx, "GL_EXT_texture_compression_s3tc"); + _mesa_enable_extension(ctx, "GL_S3_s3tc"); + } +#endif +} + + +/** + * Enable common EXT extensions in the ARB_imaging subset. + */ +void +_mesa_enable_imaging_extensions(struct gl_context *ctx) +{ + ctx->Extensions.EXT_blend_color = GL_TRUE; + ctx->Extensions.EXT_blend_logic_op = GL_TRUE; + ctx->Extensions.EXT_blend_minmax = GL_TRUE; + ctx->Extensions.EXT_blend_subtract = GL_TRUE; +} + + + +/** + * Enable all OpenGL 1.3 features and extensions. + * A convenience function to be called by drivers. + */ +void +_mesa_enable_1_3_extensions(struct gl_context *ctx) +{ + /*ctx->Extensions.ARB_multisample = GL_TRUE;*/ + ctx->Extensions.ARB_multitexture = GL_TRUE; + ctx->Extensions.ARB_texture_border_clamp = GL_TRUE; + /*ctx->Extensions.ARB_texture_compression = GL_TRUE;*/ + ctx->Extensions.ARB_texture_cube_map = GL_TRUE; + ctx->Extensions.ARB_texture_env_combine = GL_TRUE; + ctx->Extensions.ARB_texture_env_dot3 = GL_TRUE; + ctx->Extensions.EXT_texture_env_add = GL_TRUE; + /*ctx->Extensions.ARB_transpose_matrix = GL_TRUE;*/ +} + + + +/** + * Enable all OpenGL 1.4 features and extensions. + * A convenience function to be called by drivers. + */ +void +_mesa_enable_1_4_extensions(struct gl_context *ctx) +{ + ctx->Extensions.ARB_depth_texture = GL_TRUE; + ctx->Extensions.ARB_shadow = GL_TRUE; + ctx->Extensions.ARB_texture_env_crossbar = GL_TRUE; + ctx->Extensions.ARB_texture_mirrored_repeat = GL_TRUE; + ctx->Extensions.ARB_window_pos = GL_TRUE; + ctx->Extensions.EXT_blend_color = GL_TRUE; + ctx->Extensions.EXT_blend_func_separate = GL_TRUE; + ctx->Extensions.EXT_blend_minmax = GL_TRUE; + ctx->Extensions.EXT_blend_subtract = GL_TRUE; + ctx->Extensions.EXT_fog_coord = GL_TRUE; + /*ctx->Extensions.EXT_multi_draw_arrays = GL_TRUE;*/ + ctx->Extensions.EXT_point_parameters = GL_TRUE; + ctx->Extensions.EXT_secondary_color = GL_TRUE; + ctx->Extensions.EXT_stencil_wrap = GL_TRUE; + ctx->Extensions.EXT_texture_lod_bias = GL_TRUE; + /*ctx->Extensions.SGIS_generate_mipmap = GL_TRUE;*/ +} + + +/** + * Enable all OpenGL 1.5 features and extensions. + * A convenience function to be called by drivers. + */ +void +_mesa_enable_1_5_extensions(struct gl_context *ctx) +{ + ctx->Extensions.ARB_occlusion_query = GL_TRUE; + /*ctx->Extensions.ARB_vertex_buffer_object = GL_TRUE;*/ + ctx->Extensions.EXT_shadow_funcs = GL_TRUE; +} + + +/** + * Enable all OpenGL 2.0 features and extensions. + * A convenience function to be called by drivers. + */ +void +_mesa_enable_2_0_extensions(struct gl_context *ctx) +{ + /*ctx->Extensions.ARB_draw_buffers = GL_TRUE;*/ +#if FEATURE_ARB_fragment_shader + ctx->Extensions.ARB_fragment_shader = GL_TRUE; +#endif + ctx->Extensions.ARB_point_sprite = GL_TRUE; + ctx->Extensions.EXT_blend_equation_separate = GL_TRUE; + ctx->Extensions.ARB_texture_non_power_of_two = GL_TRUE; +#if FEATURE_ARB_shader_objects + ctx->Extensions.ARB_shader_objects = GL_TRUE; +#endif +#if FEATURE_ARB_shading_language_100 + ctx->Extensions.ARB_shading_language_100 = GL_TRUE; +#endif + ctx->Extensions.EXT_stencil_two_side = GL_TRUE; +#if FEATURE_ARB_vertex_shader + ctx->Extensions.ARB_vertex_shader = GL_TRUE; +#endif +} + + +/** + * Enable all OpenGL 2.1 features and extensions. + * A convenience function to be called by drivers. + */ +void +_mesa_enable_2_1_extensions(struct gl_context *ctx) +{ +#if FEATURE_EXT_pixel_buffer_object + ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE; +#endif +#if FEATURE_EXT_texture_sRGB + ctx->Extensions.EXT_texture_sRGB = GL_TRUE; +#endif +} + + +/** + * Either enable or disable the named extension. + * \return GL_TRUE for success, GL_FALSE if invalid extension name + */ +static GLboolean +set_extension( struct gl_context *ctx, const char *name, GLboolean state ) +{ + size_t offset; + + if (ctx->Extensions.String) { + /* The string was already queried - can't change it now! */ + _mesa_problem(ctx, "Trying to enable/disable extension after glGetString(GL_EXTENSIONS): %s", name); + return GL_FALSE; + } + + offset = name_to_offset(name); + if (offset == 0) { + _mesa_problem(ctx, "Trying to enable/disable unknown extension %s", + name); + return GL_FALSE; + } else if (offset == o(dummy_true) && state == GL_FALSE) { + _mesa_problem(ctx, "Trying to disable a permanently enabled extension: " + "%s", name); + return GL_FALSE; + } else { + GLboolean *base = (GLboolean *) &ctx->Extensions; + base[offset] = state; + return GL_TRUE; + } +} + + +/** + * Enable the named extension. + * Typically called by drivers. + */ +void +_mesa_enable_extension( struct gl_context *ctx, const char *name ) +{ + if (!set_extension(ctx, name, GL_TRUE)) + _mesa_problem(ctx, "Trying to enable unknown extension: %s", name); +} + + +/** + * Disable the named extension. + * XXX is this really needed??? + */ +void +_mesa_disable_extension( struct gl_context *ctx, const char *name ) +{ + if (!set_extension(ctx, name, GL_FALSE)) + _mesa_problem(ctx, "Trying to disable unknown extension: %s", name); +} + + +/** + * Test if the named extension is enabled in this context. + */ +GLboolean +_mesa_extension_is_enabled( struct gl_context *ctx, const char *name ) +{ + size_t offset; + GLboolean *base; + + if (name == 0) + return GL_FALSE; + + offset = name_to_offset(name); + if (offset == 0) + return GL_FALSE; + base = (GLboolean *) &ctx->Extensions; + return base[offset]; +} + + +/** + * \brief Apply the \c MESA_EXTENSION_OVERRIDE environment variable. + * + * \c MESA_EXTENSION_OVERRIDE is a space-separated list of extensions to + * enable or disable. The list is processed thus: + * - Enable recognized extension names that are prefixed with '+'. + * - Disable recognized extension names that are prefixed with '-'. + * - Enable recognized extension names that are not prefixed. + * - Collect unrecognized extension names in a new string. + * + * \return Space-separated list of unrecognized extension names (which must + * be freed). Does not return \c NULL. + */ +static char * +get_extension_override( struct gl_context *ctx ) +{ + const char *env_const = _mesa_getenv("MESA_EXTENSION_OVERRIDE"); + char *env; + char *ext; + char *extra_exts; + int len; + + if (env_const == NULL) { + /* Return the empty string rather than NULL. This simplifies the logic + * of client functions. */ + return calloc(1, sizeof(char)); + } + + /* extra_exts: List of unrecognized extensions. */ + extra_exts = calloc(strlen(env_const), sizeof(char)); + + /* Copy env_const because strtok() is destructive. */ + env = strdup(env_const); + for (ext = strtok(env, " "); ext != NULL; ext = strtok(NULL, " ")) { + int enable; + int recognized; + switch (ext[0]) { + case '+': + enable = 1; + ++ext; + break; + case '-': + enable = 0; + ++ext; + break; + default: + enable = 1; + break; + } + recognized = set_extension(ctx, ext, enable); + if (!recognized) { + strcat(extra_exts, ext); + strcat(extra_exts, " "); + } + } + + /* Remove trailing space. */ + len = strlen(extra_exts); + if (extra_exts[len - 1] == ' ') + extra_exts[len - 1] = '\0'; + + return extra_exts; +} + + +/** + * \brief Initialize extension tables and enable default extensions. + * + * This should be called during context initialization. + * Note: Sets gl_extensions.dummy_true to true. + */ +void +_mesa_init_extensions( struct gl_context *ctx ) +{ + GLboolean *base = (GLboolean *) &ctx->Extensions; + GLboolean *sentinel = base + o(extension_sentinel); + GLboolean *i; + const size_t *j; + + /* First, turn all extensions off. */ + for (i = base; i != sentinel; ++i) + *i = GL_FALSE; + + /* Then, selectively turn default extensions on. */ + ctx->Extensions.dummy_true = GL_TRUE; + for (j = default_extensions; *j != 0; ++j) + base[*j] = GL_TRUE; +} + + +typedef unsigned short extension_index; + + +/** + * Compare two entries of the extensions table. Sorts first by year, + * then by name. + * + * Arguments are indices into extension_table. + */ +static int +extension_compare(const void *p1, const void *p2) +{ + extension_index i1 = * (const extension_index *) p1; + extension_index i2 = * (const extension_index *) p2; + const struct extension *e1 = &extension_table[i1]; + const struct extension *e2 = &extension_table[i2]; + int res; + + res = (int)e1->year - (int)e2->year; + + if (res == 0) { + res = strcmp(e1->name, e2->name); + } + + return res; +} + + +/** + * Construct the GL_EXTENSIONS string. Called the first time that + * glGetString(GL_EXTENSIONS) is called. + */ +GLubyte* +_mesa_make_extension_string(struct gl_context *ctx) +{ + /* The extension string. */ + char *exts = 0; + /* Length of extension string. */ + size_t length = 0; + /* Number of extensions */ + unsigned count; + /* Indices of the extensions sorted by year */ + extension_index *extension_indices; + /* String of extra extensions. */ + char *extra_extensions = get_extension_override(ctx); + GLboolean *base = (GLboolean *) &ctx->Extensions; + const struct extension *i; + unsigned j; + unsigned maxYear = ~0; + + /* Check if the MESA_EXTENSION_MAX_YEAR env var is set */ + { + const char *env = getenv("MESA_EXTENSION_MAX_YEAR"); + if (env) { + maxYear = atoi(env); + _mesa_debug(ctx, "Note: limiting GL extensions to %u or earlier\n", + maxYear); + } + } + + /* Compute length of the extension string. */ + count = 0; + for (i = extension_table; i->name != 0; ++i) { + if (base[i->offset] && + i->year <= maxYear && + (i->api_set & (1 << ctx->API))) { + length += strlen(i->name) + 1; /* +1 for space */ + ++count; + } + } + if (extra_extensions != NULL) + length += 1 + strlen(extra_extensions); /* +1 for space */ + + exts = (char *) calloc(length + 1, sizeof(char)); + if (exts == NULL) { + free(extra_extensions); + return NULL; + } + + extension_indices = malloc(count * sizeof(extension_index)); + if (extension_indices == NULL) { + free(exts); + free(extra_extensions); + return NULL; + } + + /* Sort extensions in chronological order because certain old applications (e.g., + * Quake3 demo) store the extension list in a static size buffer so chronologically + * order ensure that the extensions that such applications expect will fit into + * that buffer. + */ + j = 0; + for (i = extension_table; i->name != 0; ++i) { + if (base[i->offset] && + i->year <= maxYear && + (i->api_set & (1 << ctx->API))) { + extension_indices[j++] = i - extension_table; + } + } + assert(j == count); + qsort(extension_indices, count, sizeof *extension_indices, extension_compare); + + /* Build the extension string.*/ + for (j = 0; j < count; ++j) { + i = &extension_table[extension_indices[j]]; + assert(base[i->offset] && (i->api_set & (1 << ctx->API))); + strcat(exts, i->name); + strcat(exts, " "); + } + free(extension_indices); + if (extra_extensions != 0) { + strcat(exts, extra_extensions); + free(extra_extensions); + } + + return (GLubyte *) exts; +} + +/** + * Return number of enabled extensions. + */ +GLuint +_mesa_get_extension_count(struct gl_context *ctx) +{ + GLboolean *base; + const struct extension *i; + + /* only count once */ + if (ctx->Extensions.Count != 0) + return ctx->Extensions.Count; + + base = (GLboolean *) &ctx->Extensions; + for (i = extension_table; i->name != 0; ++i) { + if (base[i->offset]) { + ctx->Extensions.Count++; + } + } + return ctx->Extensions.Count; +} + +/** + * Return name of i-th enabled extension + */ +const GLubyte * +_mesa_get_enabled_extension(struct gl_context *ctx, GLuint index) +{ + const GLboolean *base; + size_t n; + const struct extension *i; + + if (index < 0) + return NULL; + + base = (GLboolean*) &ctx->Extensions; + n = 0; + for (i = extension_table; i->name != 0; ++i) { + if (n == index && base[i->offset]) { + return (GLubyte*) i->name; + } else if (base[i->offset]) { + ++n; + } + } + + return NULL; +} diff --git a/mesalib/src/mesa/main/glapidispatch.h b/mesalib/src/mesa/main/glapidispatch.h index 93cc0122d..0987e725c 100644 --- a/mesalib/src/mesa/main/glapidispatch.h +++ b/mesalib/src/mesa/main/glapidispatch.h @@ -1,4830 +1,12254 @@ -/* DO NOT EDIT - This file generated automatically by gl_table.py (from Mesa) script */ - -/* - * (C) Copyright IBM Corporation 2005 - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sub license, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice (including the next - * paragraph) shall be included in all copies or substantial portions of the - * Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL - * IBM, - * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF - * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#if !defined( _GLAPI_DISPATCH_H_ ) -# define _GLAPI_DISPATCH_H_ - - -/* this file should not be included directly in mesa */ - -/** - * \file glapidispatch.h - * Macros for handling GL dispatch tables. - * - * For each known GL function, there are 3 macros in this file. The first - * macro is named CALL_FuncName and is used to call that GL function using - * the specified dispatch table. The other 2 macros, called GET_FuncName - * can SET_FuncName, are used to get and set the dispatch pointer for the - * named function in the specified dispatch table. - */ - -#define CALL_by_offset(disp, cast, offset, parameters) \ - (*(cast (GET_by_offset(disp, offset)))) parameters -#define GET_by_offset(disp, offset) \ - (offset >= 0) ? (((_glapi_proc *)(disp))[offset]) : NULL -#define SET_by_offset(disp, offset, fn) \ - do { \ - if ( (offset) < 0 ) { \ - /* fprintf( stderr, "[%s:%u] SET_by_offset(%p, %d, %s)!\n", */ \ - /* __func__, __LINE__, disp, offset, # fn); */ \ - /* abort(); */ \ - } \ - else { \ - ( (_glapi_proc *) (disp) )[offset] = (_glapi_proc) fn; \ - } \ - } while(0) - -/* total number of offsets below */ -#define _gloffset_COUNT 928 - -#define _gloffset_NewList 0 -#define _gloffset_EndList 1 -#define _gloffset_CallList 2 -#define _gloffset_CallLists 3 -#define _gloffset_DeleteLists 4 -#define _gloffset_GenLists 5 -#define _gloffset_ListBase 6 -#define _gloffset_Begin 7 -#define _gloffset_Bitmap 8 -#define _gloffset_Color3b 9 -#define _gloffset_Color3bv 10 -#define _gloffset_Color3d 11 -#define _gloffset_Color3dv 12 -#define _gloffset_Color3f 13 -#define _gloffset_Color3fv 14 -#define _gloffset_Color3i 15 -#define _gloffset_Color3iv 16 -#define _gloffset_Color3s 17 -#define _gloffset_Color3sv 18 -#define _gloffset_Color3ub 19 -#define _gloffset_Color3ubv 20 -#define _gloffset_Color3ui 21 -#define _gloffset_Color3uiv 22 -#define _gloffset_Color3us 23 -#define _gloffset_Color3usv 24 -#define _gloffset_Color4b 25 -#define _gloffset_Color4bv 26 -#define _gloffset_Color4d 27 -#define _gloffset_Color4dv 28 -#define _gloffset_Color4f 29 -#define _gloffset_Color4fv 30 -#define _gloffset_Color4i 31 -#define _gloffset_Color4iv 32 -#define _gloffset_Color4s 33 -#define _gloffset_Color4sv 34 -#define _gloffset_Color4ub 35 -#define _gloffset_Color4ubv 36 -#define _gloffset_Color4ui 37 -#define _gloffset_Color4uiv 38 -#define _gloffset_Color4us 39 -#define _gloffset_Color4usv 40 -#define _gloffset_EdgeFlag 41 -#define _gloffset_EdgeFlagv 42 -#define _gloffset_End 43 -#define _gloffset_Indexd 44 -#define _gloffset_Indexdv 45 -#define _gloffset_Indexf 46 -#define _gloffset_Indexfv 47 -#define _gloffset_Indexi 48 -#define _gloffset_Indexiv 49 -#define _gloffset_Indexs 50 -#define _gloffset_Indexsv 51 -#define _gloffset_Normal3b 52 -#define _gloffset_Normal3bv 53 -#define _gloffset_Normal3d 54 -#define _gloffset_Normal3dv 55 -#define _gloffset_Normal3f 56 -#define _gloffset_Normal3fv 57 -#define _gloffset_Normal3i 58 -#define _gloffset_Normal3iv 59 -#define _gloffset_Normal3s 60 -#define _gloffset_Normal3sv 61 -#define _gloffset_RasterPos2d 62 -#define _gloffset_RasterPos2dv 63 -#define _gloffset_RasterPos2f 64 -#define _gloffset_RasterPos2fv 65 -#define _gloffset_RasterPos2i 66 -#define _gloffset_RasterPos2iv 67 -#define _gloffset_RasterPos2s 68 -#define _gloffset_RasterPos2sv 69 -#define _gloffset_RasterPos3d 70 -#define _gloffset_RasterPos3dv 71 -#define _gloffset_RasterPos3f 72 -#define _gloffset_RasterPos3fv 73 -#define _gloffset_RasterPos3i 74 -#define _gloffset_RasterPos3iv 75 -#define _gloffset_RasterPos3s 76 -#define _gloffset_RasterPos3sv 77 -#define _gloffset_RasterPos4d 78 -#define _gloffset_RasterPos4dv 79 -#define _gloffset_RasterPos4f 80 -#define _gloffset_RasterPos4fv 81 -#define _gloffset_RasterPos4i 82 -#define _gloffset_RasterPos4iv 83 -#define _gloffset_RasterPos4s 84 -#define _gloffset_RasterPos4sv 85 -#define _gloffset_Rectd 86 -#define _gloffset_Rectdv 87 -#define _gloffset_Rectf 88 -#define _gloffset_Rectfv 89 -#define _gloffset_Recti 90 -#define _gloffset_Rectiv 91 -#define _gloffset_Rects 92 -#define _gloffset_Rectsv 93 -#define _gloffset_TexCoord1d 94 -#define _gloffset_TexCoord1dv 95 -#define _gloffset_TexCoord1f 96 -#define _gloffset_TexCoord1fv 97 -#define _gloffset_TexCoord1i 98 -#define _gloffset_TexCoord1iv 99 -#define _gloffset_TexCoord1s 100 -#define _gloffset_TexCoord1sv 101 -#define _gloffset_TexCoord2d 102 -#define _gloffset_TexCoord2dv 103 -#define _gloffset_TexCoord2f 104 -#define _gloffset_TexCoord2fv 105 -#define _gloffset_TexCoord2i 106 -#define _gloffset_TexCoord2iv 107 -#define _gloffset_TexCoord2s 108 -#define _gloffset_TexCoord2sv 109 -#define _gloffset_TexCoord3d 110 -#define _gloffset_TexCoord3dv 111 -#define _gloffset_TexCoord3f 112 -#define _gloffset_TexCoord3fv 113 -#define _gloffset_TexCoord3i 114 -#define _gloffset_TexCoord3iv 115 -#define _gloffset_TexCoord3s 116 -#define _gloffset_TexCoord3sv 117 -#define _gloffset_TexCoord4d 118 -#define _gloffset_TexCoord4dv 119 -#define _gloffset_TexCoord4f 120 -#define _gloffset_TexCoord4fv 121 -#define _gloffset_TexCoord4i 122 -#define _gloffset_TexCoord4iv 123 -#define _gloffset_TexCoord4s 124 -#define _gloffset_TexCoord4sv 125 -#define _gloffset_Vertex2d 126 -#define _gloffset_Vertex2dv 127 -#define _gloffset_Vertex2f 128 -#define _gloffset_Vertex2fv 129 -#define _gloffset_Vertex2i 130 -#define _gloffset_Vertex2iv 131 -#define _gloffset_Vertex2s 132 -#define _gloffset_Vertex2sv 133 -#define _gloffset_Vertex3d 134 -#define _gloffset_Vertex3dv 135 -#define _gloffset_Vertex3f 136 -#define _gloffset_Vertex3fv 137 -#define _gloffset_Vertex3i 138 -#define _gloffset_Vertex3iv 139 -#define _gloffset_Vertex3s 140 -#define _gloffset_Vertex3sv 141 -#define _gloffset_Vertex4d 142 -#define _gloffset_Vertex4dv 143 -#define _gloffset_Vertex4f 144 -#define _gloffset_Vertex4fv 145 -#define _gloffset_Vertex4i 146 -#define _gloffset_Vertex4iv 147 -#define _gloffset_Vertex4s 148 -#define _gloffset_Vertex4sv 149 -#define _gloffset_ClipPlane 150 -#define _gloffset_ColorMaterial 151 -#define _gloffset_CullFace 152 -#define _gloffset_Fogf 153 -#define _gloffset_Fogfv 154 -#define _gloffset_Fogi 155 -#define _gloffset_Fogiv 156 -#define _gloffset_FrontFace 157 -#define _gloffset_Hint 158 -#define _gloffset_Lightf 159 -#define _gloffset_Lightfv 160 -#define _gloffset_Lighti 161 -#define _gloffset_Lightiv 162 -#define _gloffset_LightModelf 163 -#define _gloffset_LightModelfv 164 -#define _gloffset_LightModeli 165 -#define _gloffset_LightModeliv 166 -#define _gloffset_LineStipple 167 -#define _gloffset_LineWidth 168 -#define _gloffset_Materialf 169 -#define _gloffset_Materialfv 170 -#define _gloffset_Materiali 171 -#define _gloffset_Materialiv 172 -#define _gloffset_PointSize 173 -#define _gloffset_PolygonMode 174 -#define _gloffset_PolygonStipple 175 -#define _gloffset_Scissor 176 -#define _gloffset_ShadeModel 177 -#define _gloffset_TexParameterf 178 -#define _gloffset_TexParameterfv 179 -#define _gloffset_TexParameteri 180 -#define _gloffset_TexParameteriv 181 -#define _gloffset_TexImage1D 182 -#define _gloffset_TexImage2D 183 -#define _gloffset_TexEnvf 184 -#define _gloffset_TexEnvfv 185 -#define _gloffset_TexEnvi 186 -#define _gloffset_TexEnviv 187 -#define _gloffset_TexGend 188 -#define _gloffset_TexGendv 189 -#define _gloffset_TexGenf 190 -#define _gloffset_TexGenfv 191 -#define _gloffset_TexGeni 192 -#define _gloffset_TexGeniv 193 -#define _gloffset_FeedbackBuffer 194 -#define _gloffset_SelectBuffer 195 -#define _gloffset_RenderMode 196 -#define _gloffset_InitNames 197 -#define _gloffset_LoadName 198 -#define _gloffset_PassThrough 199 -#define _gloffset_PopName 200 -#define _gloffset_PushName 201 -#define _gloffset_DrawBuffer 202 -#define _gloffset_Clear 203 -#define _gloffset_ClearAccum 204 -#define _gloffset_ClearIndex 205 -#define _gloffset_ClearColor 206 -#define _gloffset_ClearStencil 207 -#define _gloffset_ClearDepth 208 -#define _gloffset_StencilMask 209 -#define _gloffset_ColorMask 210 -#define _gloffset_DepthMask 211 -#define _gloffset_IndexMask 212 -#define _gloffset_Accum 213 -#define _gloffset_Disable 214 -#define _gloffset_Enable 215 -#define _gloffset_Finish 216 -#define _gloffset_Flush 217 -#define _gloffset_PopAttrib 218 -#define _gloffset_PushAttrib 219 -#define _gloffset_Map1d 220 -#define _gloffset_Map1f 221 -#define _gloffset_Map2d 222 -#define _gloffset_Map2f 223 -#define _gloffset_MapGrid1d 224 -#define _gloffset_MapGrid1f 225 -#define _gloffset_MapGrid2d 226 -#define _gloffset_MapGrid2f 227 -#define _gloffset_EvalCoord1d 228 -#define _gloffset_EvalCoord1dv 229 -#define _gloffset_EvalCoord1f 230 -#define _gloffset_EvalCoord1fv 231 -#define _gloffset_EvalCoord2d 232 -#define _gloffset_EvalCoord2dv 233 -#define _gloffset_EvalCoord2f 234 -#define _gloffset_EvalCoord2fv 235 -#define _gloffset_EvalMesh1 236 -#define _gloffset_EvalPoint1 237 -#define _gloffset_EvalMesh2 238 -#define _gloffset_EvalPoint2 239 -#define _gloffset_AlphaFunc 240 -#define _gloffset_BlendFunc 241 -#define _gloffset_LogicOp 242 -#define _gloffset_StencilFunc 243 -#define _gloffset_StencilOp 244 -#define _gloffset_DepthFunc 245 -#define _gloffset_PixelZoom 246 -#define _gloffset_PixelTransferf 247 -#define _gloffset_PixelTransferi 248 -#define _gloffset_PixelStoref 249 -#define _gloffset_PixelStorei 250 -#define _gloffset_PixelMapfv 251 -#define _gloffset_PixelMapuiv 252 -#define _gloffset_PixelMapusv 253 -#define _gloffset_ReadBuffer 254 -#define _gloffset_CopyPixels 255 -#define _gloffset_ReadPixels 256 -#define _gloffset_DrawPixels 257 -#define _gloffset_GetBooleanv 258 -#define _gloffset_GetClipPlane 259 -#define _gloffset_GetDoublev 260 -#define _gloffset_GetError 261 -#define _gloffset_GetFloatv 262 -#define _gloffset_GetIntegerv 263 -#define _gloffset_GetLightfv 264 -#define _gloffset_GetLightiv 265 -#define _gloffset_GetMapdv 266 -#define _gloffset_GetMapfv 267 -#define _gloffset_GetMapiv 268 -#define _gloffset_GetMaterialfv 269 -#define _gloffset_GetMaterialiv 270 -#define _gloffset_GetPixelMapfv 271 -#define _gloffset_GetPixelMapuiv 272 -#define _gloffset_GetPixelMapusv 273 -#define _gloffset_GetPolygonStipple 274 -#define _gloffset_GetString 275 -#define _gloffset_GetTexEnvfv 276 -#define _gloffset_GetTexEnviv 277 -#define _gloffset_GetTexGendv 278 -#define _gloffset_GetTexGenfv 279 -#define _gloffset_GetTexGeniv 280 -#define _gloffset_GetTexImage 281 -#define _gloffset_GetTexParameterfv 282 -#define _gloffset_GetTexParameteriv 283 -#define _gloffset_GetTexLevelParameterfv 284 -#define _gloffset_GetTexLevelParameteriv 285 -#define _gloffset_IsEnabled 286 -#define _gloffset_IsList 287 -#define _gloffset_DepthRange 288 -#define _gloffset_Frustum 289 -#define _gloffset_LoadIdentity 290 -#define _gloffset_LoadMatrixf 291 -#define _gloffset_LoadMatrixd 292 -#define _gloffset_MatrixMode 293 -#define _gloffset_MultMatrixf 294 -#define _gloffset_MultMatrixd 295 -#define _gloffset_Ortho 296 -#define _gloffset_PopMatrix 297 -#define _gloffset_PushMatrix 298 -#define _gloffset_Rotated 299 -#define _gloffset_Rotatef 300 -#define _gloffset_Scaled 301 -#define _gloffset_Scalef 302 -#define _gloffset_Translated 303 -#define _gloffset_Translatef 304 -#define _gloffset_Viewport 305 -#define _gloffset_ArrayElement 306 -#define _gloffset_BindTexture 307 -#define _gloffset_ColorPointer 308 -#define _gloffset_DisableClientState 309 -#define _gloffset_DrawArrays 310 -#define _gloffset_DrawElements 311 -#define _gloffset_EdgeFlagPointer 312 -#define _gloffset_EnableClientState 313 -#define _gloffset_IndexPointer 314 -#define _gloffset_Indexub 315 -#define _gloffset_Indexubv 316 -#define _gloffset_InterleavedArrays 317 -#define _gloffset_NormalPointer 318 -#define _gloffset_PolygonOffset 319 -#define _gloffset_TexCoordPointer 320 -#define _gloffset_VertexPointer 321 -#define _gloffset_AreTexturesResident 322 -#define _gloffset_CopyTexImage1D 323 -#define _gloffset_CopyTexImage2D 324 -#define _gloffset_CopyTexSubImage1D 325 -#define _gloffset_CopyTexSubImage2D 326 -#define _gloffset_DeleteTextures 327 -#define _gloffset_GenTextures 328 -#define _gloffset_GetPointerv 329 -#define _gloffset_IsTexture 330 -#define _gloffset_PrioritizeTextures 331 -#define _gloffset_TexSubImage1D 332 -#define _gloffset_TexSubImage2D 333 -#define _gloffset_PopClientAttrib 334 -#define _gloffset_PushClientAttrib 335 -#define _gloffset_BlendColor 336 -#define _gloffset_BlendEquation 337 -#define _gloffset_DrawRangeElements 338 -#define _gloffset_ColorTable 339 -#define _gloffset_ColorTableParameterfv 340 -#define _gloffset_ColorTableParameteriv 341 -#define _gloffset_CopyColorTable 342 -#define _gloffset_GetColorTable 343 -#define _gloffset_GetColorTableParameterfv 344 -#define _gloffset_GetColorTableParameteriv 345 -#define _gloffset_ColorSubTable 346 -#define _gloffset_CopyColorSubTable 347 -#define _gloffset_ConvolutionFilter1D 348 -#define _gloffset_ConvolutionFilter2D 349 -#define _gloffset_ConvolutionParameterf 350 -#define _gloffset_ConvolutionParameterfv 351 -#define _gloffset_ConvolutionParameteri 352 -#define _gloffset_ConvolutionParameteriv 353 -#define _gloffset_CopyConvolutionFilter1D 354 -#define _gloffset_CopyConvolutionFilter2D 355 -#define _gloffset_GetConvolutionFilter 356 -#define _gloffset_GetConvolutionParameterfv 357 -#define _gloffset_GetConvolutionParameteriv 358 -#define _gloffset_GetSeparableFilter 359 -#define _gloffset_SeparableFilter2D 360 -#define _gloffset_GetHistogram 361 -#define _gloffset_GetHistogramParameterfv 362 -#define _gloffset_GetHistogramParameteriv 363 -#define _gloffset_GetMinmax 364 -#define _gloffset_GetMinmaxParameterfv 365 -#define _gloffset_GetMinmaxParameteriv 366 -#define _gloffset_Histogram 367 -#define _gloffset_Minmax 368 -#define _gloffset_ResetHistogram 369 -#define _gloffset_ResetMinmax 370 -#define _gloffset_TexImage3D 371 -#define _gloffset_TexSubImage3D 372 -#define _gloffset_CopyTexSubImage3D 373 -#define _gloffset_ActiveTextureARB 374 -#define _gloffset_ClientActiveTextureARB 375 -#define _gloffset_MultiTexCoord1dARB 376 -#define _gloffset_MultiTexCoord1dvARB 377 -#define _gloffset_MultiTexCoord1fARB 378 -#define _gloffset_MultiTexCoord1fvARB 379 -#define _gloffset_MultiTexCoord1iARB 380 -#define _gloffset_MultiTexCoord1ivARB 381 -#define _gloffset_MultiTexCoord1sARB 382 -#define _gloffset_MultiTexCoord1svARB 383 -#define _gloffset_MultiTexCoord2dARB 384 -#define _gloffset_MultiTexCoord2dvARB 385 -#define _gloffset_MultiTexCoord2fARB 386 -#define _gloffset_MultiTexCoord2fvARB 387 -#define _gloffset_MultiTexCoord2iARB 388 -#define _gloffset_MultiTexCoord2ivARB 389 -#define _gloffset_MultiTexCoord2sARB 390 -#define _gloffset_MultiTexCoord2svARB 391 -#define _gloffset_MultiTexCoord3dARB 392 -#define _gloffset_MultiTexCoord3dvARB 393 -#define _gloffset_MultiTexCoord3fARB 394 -#define _gloffset_MultiTexCoord3fvARB 395 -#define _gloffset_MultiTexCoord3iARB 396 -#define _gloffset_MultiTexCoord3ivARB 397 -#define _gloffset_MultiTexCoord3sARB 398 -#define _gloffset_MultiTexCoord3svARB 399 -#define _gloffset_MultiTexCoord4dARB 400 -#define _gloffset_MultiTexCoord4dvARB 401 -#define _gloffset_MultiTexCoord4fARB 402 -#define _gloffset_MultiTexCoord4fvARB 403 -#define _gloffset_MultiTexCoord4iARB 404 -#define _gloffset_MultiTexCoord4ivARB 405 -#define _gloffset_MultiTexCoord4sARB 406 -#define _gloffset_MultiTexCoord4svARB 407 - -#if !defined(_GLAPI_USE_REMAP_TABLE) - -#define _gloffset_AttachShader 408 -#define _gloffset_CreateProgram 409 -#define _gloffset_CreateShader 410 -#define _gloffset_DeleteProgram 411 -#define _gloffset_DeleteShader 412 -#define _gloffset_DetachShader 413 -#define _gloffset_GetAttachedShaders 414 -#define _gloffset_GetProgramInfoLog 415 -#define _gloffset_GetProgramiv 416 -#define _gloffset_GetShaderInfoLog 417 -#define _gloffset_GetShaderiv 418 -#define _gloffset_IsProgram 419 -#define _gloffset_IsShader 420 -#define _gloffset_StencilFuncSeparate 421 -#define _gloffset_StencilMaskSeparate 422 -#define _gloffset_StencilOpSeparate 423 -#define _gloffset_UniformMatrix2x3fv 424 -#define _gloffset_UniformMatrix2x4fv 425 -#define _gloffset_UniformMatrix3x2fv 426 -#define _gloffset_UniformMatrix3x4fv 427 -#define _gloffset_UniformMatrix4x2fv 428 -#define _gloffset_UniformMatrix4x3fv 429 -#define _gloffset_ClampColor 430 -#define _gloffset_ClearBufferfi 431 -#define _gloffset_ClearBufferfv 432 -#define _gloffset_ClearBufferiv 433 -#define _gloffset_ClearBufferuiv 434 -#define _gloffset_GetStringi 435 -#define _gloffset_TexBuffer 436 -#define _gloffset_FramebufferTexture 437 -#define _gloffset_GetBufferParameteri64v 438 -#define _gloffset_GetInteger64i_v 439 -#define _gloffset_VertexAttribDivisor 440 -#define _gloffset_LoadTransposeMatrixdARB 441 -#define _gloffset_LoadTransposeMatrixfARB 442 -#define _gloffset_MultTransposeMatrixdARB 443 -#define _gloffset_MultTransposeMatrixfARB 444 -#define _gloffset_SampleCoverageARB 445 -#define _gloffset_CompressedTexImage1DARB 446 -#define _gloffset_CompressedTexImage2DARB 447 -#define _gloffset_CompressedTexImage3DARB 448 -#define _gloffset_CompressedTexSubImage1DARB 449 -#define _gloffset_CompressedTexSubImage2DARB 450 -#define _gloffset_CompressedTexSubImage3DARB 451 -#define _gloffset_GetCompressedTexImageARB 452 -#define _gloffset_DisableVertexAttribArrayARB 453 -#define _gloffset_EnableVertexAttribArrayARB 454 -#define _gloffset_GetProgramEnvParameterdvARB 455 -#define _gloffset_GetProgramEnvParameterfvARB 456 -#define _gloffset_GetProgramLocalParameterdvARB 457 -#define _gloffset_GetProgramLocalParameterfvARB 458 -#define _gloffset_GetProgramStringARB 459 -#define _gloffset_GetProgramivARB 460 -#define _gloffset_GetVertexAttribdvARB 461 -#define _gloffset_GetVertexAttribfvARB 462 -#define _gloffset_GetVertexAttribivARB 463 -#define _gloffset_ProgramEnvParameter4dARB 464 -#define _gloffset_ProgramEnvParameter4dvARB 465 -#define _gloffset_ProgramEnvParameter4fARB 466 -#define _gloffset_ProgramEnvParameter4fvARB 467 -#define _gloffset_ProgramLocalParameter4dARB 468 -#define _gloffset_ProgramLocalParameter4dvARB 469 -#define _gloffset_ProgramLocalParameter4fARB 470 -#define _gloffset_ProgramLocalParameter4fvARB 471 -#define _gloffset_ProgramStringARB 472 -#define _gloffset_VertexAttrib1dARB 473 -#define _gloffset_VertexAttrib1dvARB 474 -#define _gloffset_VertexAttrib1fARB 475 -#define _gloffset_VertexAttrib1fvARB 476 -#define _gloffset_VertexAttrib1sARB 477 -#define _gloffset_VertexAttrib1svARB 478 -#define _gloffset_VertexAttrib2dARB 479 -#define _gloffset_VertexAttrib2dvARB 480 -#define _gloffset_VertexAttrib2fARB 481 -#define _gloffset_VertexAttrib2fvARB 482 -#define _gloffset_VertexAttrib2sARB 483 -#define _gloffset_VertexAttrib2svARB 484 -#define _gloffset_VertexAttrib3dARB 485 -#define _gloffset_VertexAttrib3dvARB 486 -#define _gloffset_VertexAttrib3fARB 487 -#define _gloffset_VertexAttrib3fvARB 488 -#define _gloffset_VertexAttrib3sARB 489 -#define _gloffset_VertexAttrib3svARB 490 -#define _gloffset_VertexAttrib4NbvARB 491 -#define _gloffset_VertexAttrib4NivARB 492 -#define _gloffset_VertexAttrib4NsvARB 493 -#define _gloffset_VertexAttrib4NubARB 494 -#define _gloffset_VertexAttrib4NubvARB 495 -#define _gloffset_VertexAttrib4NuivARB 496 -#define _gloffset_VertexAttrib4NusvARB 497 -#define _gloffset_VertexAttrib4bvARB 498 -#define _gloffset_VertexAttrib4dARB 499 -#define _gloffset_VertexAttrib4dvARB 500 -#define _gloffset_VertexAttrib4fARB 501 -#define _gloffset_VertexAttrib4fvARB 502 -#define _gloffset_VertexAttrib4ivARB 503 -#define _gloffset_VertexAttrib4sARB 504 -#define _gloffset_VertexAttrib4svARB 505 -#define _gloffset_VertexAttrib4ubvARB 506 -#define _gloffset_VertexAttrib4uivARB 507 -#define _gloffset_VertexAttrib4usvARB 508 -#define _gloffset_VertexAttribPointerARB 509 -#define _gloffset_BindBufferARB 510 -#define _gloffset_BufferDataARB 511 -#define _gloffset_BufferSubDataARB 512 -#define _gloffset_DeleteBuffersARB 513 -#define _gloffset_GenBuffersARB 514 -#define _gloffset_GetBufferParameterivARB 515 -#define _gloffset_GetBufferPointervARB 516 -#define _gloffset_GetBufferSubDataARB 517 -#define _gloffset_IsBufferARB 518 -#define _gloffset_MapBufferARB 519 -#define _gloffset_UnmapBufferARB 520 -#define _gloffset_BeginQueryARB 521 -#define _gloffset_DeleteQueriesARB 522 -#define _gloffset_EndQueryARB 523 -#define _gloffset_GenQueriesARB 524 -#define _gloffset_GetQueryObjectivARB 525 -#define _gloffset_GetQueryObjectuivARB 526 -#define _gloffset_GetQueryivARB 527 -#define _gloffset_IsQueryARB 528 -#define _gloffset_AttachObjectARB 529 -#define _gloffset_CompileShaderARB 530 -#define _gloffset_CreateProgramObjectARB 531 -#define _gloffset_CreateShaderObjectARB 532 -#define _gloffset_DeleteObjectARB 533 -#define _gloffset_DetachObjectARB 534 -#define _gloffset_GetActiveUniformARB 535 -#define _gloffset_GetAttachedObjectsARB 536 -#define _gloffset_GetHandleARB 537 -#define _gloffset_GetInfoLogARB 538 -#define _gloffset_GetObjectParameterfvARB 539 -#define _gloffset_GetObjectParameterivARB 540 -#define _gloffset_GetShaderSourceARB 541 -#define _gloffset_GetUniformLocationARB 542 -#define _gloffset_GetUniformfvARB 543 -#define _gloffset_GetUniformivARB 544 -#define _gloffset_LinkProgramARB 545 -#define _gloffset_ShaderSourceARB 546 -#define _gloffset_Uniform1fARB 547 -#define _gloffset_Uniform1fvARB 548 -#define _gloffset_Uniform1iARB 549 -#define _gloffset_Uniform1ivARB 550 -#define _gloffset_Uniform2fARB 551 -#define _gloffset_Uniform2fvARB 552 -#define _gloffset_Uniform2iARB 553 -#define _gloffset_Uniform2ivARB 554 -#define _gloffset_Uniform3fARB 555 -#define _gloffset_Uniform3fvARB 556 -#define _gloffset_Uniform3iARB 557 -#define _gloffset_Uniform3ivARB 558 -#define _gloffset_Uniform4fARB 559 -#define _gloffset_Uniform4fvARB 560 -#define _gloffset_Uniform4iARB 561 -#define _gloffset_Uniform4ivARB 562 -#define _gloffset_UniformMatrix2fvARB 563 -#define _gloffset_UniformMatrix3fvARB 564 -#define _gloffset_UniformMatrix4fvARB 565 -#define _gloffset_UseProgramObjectARB 566 -#define _gloffset_ValidateProgramARB 567 -#define _gloffset_BindAttribLocationARB 568 -#define _gloffset_GetActiveAttribARB 569 -#define _gloffset_GetAttribLocationARB 570 -#define _gloffset_DrawBuffersARB 571 -#define _gloffset_ClampColorARB 572 -#define _gloffset_DrawArraysInstancedARB 573 -#define _gloffset_DrawElementsInstancedARB 574 -#define _gloffset_RenderbufferStorageMultisample 575 -#define _gloffset_FramebufferTextureARB 576 -#define _gloffset_FramebufferTextureFaceARB 577 -#define _gloffset_ProgramParameteriARB 578 -#define _gloffset_VertexAttribDivisorARB 579 -#define _gloffset_FlushMappedBufferRange 580 -#define _gloffset_MapBufferRange 581 -#define _gloffset_TexBufferARB 582 -#define _gloffset_BindVertexArray 583 -#define _gloffset_GenVertexArrays 584 -#define _gloffset_CopyBufferSubData 585 -#define _gloffset_ClientWaitSync 586 -#define _gloffset_DeleteSync 587 -#define _gloffset_FenceSync 588 -#define _gloffset_GetInteger64v 589 -#define _gloffset_GetSynciv 590 -#define _gloffset_IsSync 591 -#define _gloffset_WaitSync 592 -#define _gloffset_DrawElementsBaseVertex 593 -#define _gloffset_DrawRangeElementsBaseVertex 594 -#define _gloffset_MultiDrawElementsBaseVertex 595 -#define _gloffset_BlendEquationSeparateiARB 596 -#define _gloffset_BlendEquationiARB 597 -#define _gloffset_BlendFuncSeparateiARB 598 -#define _gloffset_BlendFunciARB 599 -#define _gloffset_BindSampler 600 -#define _gloffset_DeleteSamplers 601 -#define _gloffset_GenSamplers 602 -#define _gloffset_GetSamplerParameterIiv 603 -#define _gloffset_GetSamplerParameterIuiv 604 -#define _gloffset_GetSamplerParameterfv 605 -#define _gloffset_GetSamplerParameteriv 606 -#define _gloffset_IsSampler 607 -#define _gloffset_SamplerParameterIiv 608 -#define _gloffset_SamplerParameterIuiv 609 -#define _gloffset_SamplerParameterf 610 -#define _gloffset_SamplerParameterfv 611 -#define _gloffset_SamplerParameteri 612 -#define _gloffset_SamplerParameteriv 613 -#define _gloffset_BindTransformFeedback 614 -#define _gloffset_DeleteTransformFeedbacks 615 -#define _gloffset_DrawTransformFeedback 616 -#define _gloffset_GenTransformFeedbacks 617 -#define _gloffset_IsTransformFeedback 618 -#define _gloffset_PauseTransformFeedback 619 -#define _gloffset_ResumeTransformFeedback 620 -#define _gloffset_ClearDepthf 621 -#define _gloffset_DepthRangef 622 -#define _gloffset_GetShaderPrecisionFormat 623 -#define _gloffset_ReleaseShaderCompiler 624 -#define _gloffset_ShaderBinary 625 -#define _gloffset_GetGraphicsResetStatusARB 626 -#define _gloffset_GetnColorTableARB 627 -#define _gloffset_GetnCompressedTexImageARB 628 -#define _gloffset_GetnConvolutionFilterARB 629 -#define _gloffset_GetnHistogramARB 630 -#define _gloffset_GetnMapdvARB 631 -#define _gloffset_GetnMapfvARB 632 -#define _gloffset_GetnMapivARB 633 -#define _gloffset_GetnMinmaxARB 634 -#define _gloffset_GetnPixelMapfvARB 635 -#define _gloffset_GetnPixelMapuivARB 636 -#define _gloffset_GetnPixelMapusvARB 637 -#define _gloffset_GetnPolygonStippleARB 638 -#define _gloffset_GetnSeparableFilterARB 639 -#define _gloffset_GetnTexImageARB 640 -#define _gloffset_GetnUniformdvARB 641 -#define _gloffset_GetnUniformfvARB 642 -#define _gloffset_GetnUniformivARB 643 -#define _gloffset_GetnUniformuivARB 644 -#define _gloffset_ReadnPixelsARB 645 -#define _gloffset_PolygonOffsetEXT 646 -#define _gloffset_GetPixelTexGenParameterfvSGIS 647 -#define _gloffset_GetPixelTexGenParameterivSGIS 648 -#define _gloffset_PixelTexGenParameterfSGIS 649 -#define _gloffset_PixelTexGenParameterfvSGIS 650 -#define _gloffset_PixelTexGenParameteriSGIS 651 -#define _gloffset_PixelTexGenParameterivSGIS 652 -#define _gloffset_SampleMaskSGIS 653 -#define _gloffset_SamplePatternSGIS 654 -#define _gloffset_ColorPointerEXT 655 -#define _gloffset_EdgeFlagPointerEXT 656 -#define _gloffset_IndexPointerEXT 657 -#define _gloffset_NormalPointerEXT 658 -#define _gloffset_TexCoordPointerEXT 659 -#define _gloffset_VertexPointerEXT 660 -#define _gloffset_PointParameterfEXT 661 -#define _gloffset_PointParameterfvEXT 662 -#define _gloffset_LockArraysEXT 663 -#define _gloffset_UnlockArraysEXT 664 -#define _gloffset_SecondaryColor3bEXT 665 -#define _gloffset_SecondaryColor3bvEXT 666 -#define _gloffset_SecondaryColor3dEXT 667 -#define _gloffset_SecondaryColor3dvEXT 668 -#define _gloffset_SecondaryColor3fEXT 669 -#define _gloffset_SecondaryColor3fvEXT 670 -#define _gloffset_SecondaryColor3iEXT 671 -#define _gloffset_SecondaryColor3ivEXT 672 -#define _gloffset_SecondaryColor3sEXT 673 -#define _gloffset_SecondaryColor3svEXT 674 -#define _gloffset_SecondaryColor3ubEXT 675 -#define _gloffset_SecondaryColor3ubvEXT 676 -#define _gloffset_SecondaryColor3uiEXT 677 -#define _gloffset_SecondaryColor3uivEXT 678 -#define _gloffset_SecondaryColor3usEXT 679 -#define _gloffset_SecondaryColor3usvEXT 680 -#define _gloffset_SecondaryColorPointerEXT 681 -#define _gloffset_MultiDrawArraysEXT 682 -#define _gloffset_MultiDrawElementsEXT 683 -#define _gloffset_FogCoordPointerEXT 684 -#define _gloffset_FogCoorddEXT 685 -#define _gloffset_FogCoorddvEXT 686 -#define _gloffset_FogCoordfEXT 687 -#define _gloffset_FogCoordfvEXT 688 -#define _gloffset_PixelTexGenSGIX 689 -#define _gloffset_BlendFuncSeparateEXT 690 -#define _gloffset_FlushVertexArrayRangeNV 691 -#define _gloffset_VertexArrayRangeNV 692 -#define _gloffset_CombinerInputNV 693 -#define _gloffset_CombinerOutputNV 694 -#define _gloffset_CombinerParameterfNV 695 -#define _gloffset_CombinerParameterfvNV 696 -#define _gloffset_CombinerParameteriNV 697 -#define _gloffset_CombinerParameterivNV 698 -#define _gloffset_FinalCombinerInputNV 699 -#define _gloffset_GetCombinerInputParameterfvNV 700 -#define _gloffset_GetCombinerInputParameterivNV 701 -#define _gloffset_GetCombinerOutputParameterfvNV 702 -#define _gloffset_GetCombinerOutputParameterivNV 703 -#define _gloffset_GetFinalCombinerInputParameterfvNV 704 -#define _gloffset_GetFinalCombinerInputParameterivNV 705 -#define _gloffset_ResizeBuffersMESA 706 -#define _gloffset_WindowPos2dMESA 707 -#define _gloffset_WindowPos2dvMESA 708 -#define _gloffset_WindowPos2fMESA 709 -#define _gloffset_WindowPos2fvMESA 710 -#define _gloffset_WindowPos2iMESA 711 -#define _gloffset_WindowPos2ivMESA 712 -#define _gloffset_WindowPos2sMESA 713 -#define _gloffset_WindowPos2svMESA 714 -#define _gloffset_WindowPos3dMESA 715 -#define _gloffset_WindowPos3dvMESA 716 -#define _gloffset_WindowPos3fMESA 717 -#define _gloffset_WindowPos3fvMESA 718 -#define _gloffset_WindowPos3iMESA 719 -#define _gloffset_WindowPos3ivMESA 720 -#define _gloffset_WindowPos3sMESA 721 -#define _gloffset_WindowPos3svMESA 722 -#define _gloffset_WindowPos4dMESA 723 -#define _gloffset_WindowPos4dvMESA 724 -#define _gloffset_WindowPos4fMESA 725 -#define _gloffset_WindowPos4fvMESA 726 -#define _gloffset_WindowPos4iMESA 727 -#define _gloffset_WindowPos4ivMESA 728 -#define _gloffset_WindowPos4sMESA 729 -#define _gloffset_WindowPos4svMESA 730 -#define _gloffset_MultiModeDrawArraysIBM 731 -#define _gloffset_MultiModeDrawElementsIBM 732 -#define _gloffset_DeleteFencesNV 733 -#define _gloffset_FinishFenceNV 734 -#define _gloffset_GenFencesNV 735 -#define _gloffset_GetFenceivNV 736 -#define _gloffset_IsFenceNV 737 -#define _gloffset_SetFenceNV 738 -#define _gloffset_TestFenceNV 739 -#define _gloffset_AreProgramsResidentNV 740 -#define _gloffset_BindProgramNV 741 -#define _gloffset_DeleteProgramsNV 742 -#define _gloffset_ExecuteProgramNV 743 -#define _gloffset_GenProgramsNV 744 -#define _gloffset_GetProgramParameterdvNV 745 -#define _gloffset_GetProgramParameterfvNV 746 -#define _gloffset_GetProgramStringNV 747 -#define _gloffset_GetProgramivNV 748 -#define _gloffset_GetTrackMatrixivNV 749 -#define _gloffset_GetVertexAttribPointervNV 750 -#define _gloffset_GetVertexAttribdvNV 751 -#define _gloffset_GetVertexAttribfvNV 752 -#define _gloffset_GetVertexAttribivNV 753 -#define _gloffset_IsProgramNV 754 -#define _gloffset_LoadProgramNV 755 -#define _gloffset_ProgramParameters4dvNV 756 -#define _gloffset_ProgramParameters4fvNV 757 -#define _gloffset_RequestResidentProgramsNV 758 -#define _gloffset_TrackMatrixNV 759 -#define _gloffset_VertexAttrib1dNV 760 -#define _gloffset_VertexAttrib1dvNV 761 -#define _gloffset_VertexAttrib1fNV 762 -#define _gloffset_VertexAttrib1fvNV 763 -#define _gloffset_VertexAttrib1sNV 764 -#define _gloffset_VertexAttrib1svNV 765 -#define _gloffset_VertexAttrib2dNV 766 -#define _gloffset_VertexAttrib2dvNV 767 -#define _gloffset_VertexAttrib2fNV 768 -#define _gloffset_VertexAttrib2fvNV 769 -#define _gloffset_VertexAttrib2sNV 770 -#define _gloffset_VertexAttrib2svNV 771 -#define _gloffset_VertexAttrib3dNV 772 -#define _gloffset_VertexAttrib3dvNV 773 -#define _gloffset_VertexAttrib3fNV 774 -#define _gloffset_VertexAttrib3fvNV 775 -#define _gloffset_VertexAttrib3sNV 776 -#define _gloffset_VertexAttrib3svNV 777 -#define _gloffset_VertexAttrib4dNV 778 -#define _gloffset_VertexAttrib4dvNV 779 -#define _gloffset_VertexAttrib4fNV 780 -#define _gloffset_VertexAttrib4fvNV 781 -#define _gloffset_VertexAttrib4sNV 782 -#define _gloffset_VertexAttrib4svNV 783 -#define _gloffset_VertexAttrib4ubNV 784 -#define _gloffset_VertexAttrib4ubvNV 785 -#define _gloffset_VertexAttribPointerNV 786 -#define _gloffset_VertexAttribs1dvNV 787 -#define _gloffset_VertexAttribs1fvNV 788 -#define _gloffset_VertexAttribs1svNV 789 -#define _gloffset_VertexAttribs2dvNV 790 -#define _gloffset_VertexAttribs2fvNV 791 -#define _gloffset_VertexAttribs2svNV 792 -#define _gloffset_VertexAttribs3dvNV 793 -#define _gloffset_VertexAttribs3fvNV 794 -#define _gloffset_VertexAttribs3svNV 795 -#define _gloffset_VertexAttribs4dvNV 796 -#define _gloffset_VertexAttribs4fvNV 797 -#define _gloffset_VertexAttribs4svNV 798 -#define _gloffset_VertexAttribs4ubvNV 799 -#define _gloffset_GetTexBumpParameterfvATI 800 -#define _gloffset_GetTexBumpParameterivATI 801 -#define _gloffset_TexBumpParameterfvATI 802 -#define _gloffset_TexBumpParameterivATI 803 -#define _gloffset_AlphaFragmentOp1ATI 804 -#define _gloffset_AlphaFragmentOp2ATI 805 -#define _gloffset_AlphaFragmentOp3ATI 806 -#define _gloffset_BeginFragmentShaderATI 807 -#define _gloffset_BindFragmentShaderATI 808 -#define _gloffset_ColorFragmentOp1ATI 809 -#define _gloffset_ColorFragmentOp2ATI 810 -#define _gloffset_ColorFragmentOp3ATI 811 -#define _gloffset_DeleteFragmentShaderATI 812 -#define _gloffset_EndFragmentShaderATI 813 -#define _gloffset_GenFragmentShadersATI 814 -#define _gloffset_PassTexCoordATI 815 -#define _gloffset_SampleMapATI 816 -#define _gloffset_SetFragmentShaderConstantATI 817 -#define _gloffset_PointParameteriNV 818 -#define _gloffset_PointParameterivNV 819 -#define _gloffset_ActiveStencilFaceEXT 820 -#define _gloffset_BindVertexArrayAPPLE 821 -#define _gloffset_DeleteVertexArraysAPPLE 822 -#define _gloffset_GenVertexArraysAPPLE 823 -#define _gloffset_IsVertexArrayAPPLE 824 -#define _gloffset_GetProgramNamedParameterdvNV 825 -#define _gloffset_GetProgramNamedParameterfvNV 826 -#define _gloffset_ProgramNamedParameter4dNV 827 -#define _gloffset_ProgramNamedParameter4dvNV 828 -#define _gloffset_ProgramNamedParameter4fNV 829 -#define _gloffset_ProgramNamedParameter4fvNV 830 -#define _gloffset_PrimitiveRestartIndexNV 831 -#define _gloffset_PrimitiveRestartNV 832 -#define _gloffset_DepthBoundsEXT 833 -#define _gloffset_BlendEquationSeparateEXT 834 -#define _gloffset_BindFramebufferEXT 835 -#define _gloffset_BindRenderbufferEXT 836 -#define _gloffset_CheckFramebufferStatusEXT 837 -#define _gloffset_DeleteFramebuffersEXT 838 -#define _gloffset_DeleteRenderbuffersEXT 839 -#define _gloffset_FramebufferRenderbufferEXT 840 -#define _gloffset_FramebufferTexture1DEXT 841 -#define _gloffset_FramebufferTexture2DEXT 842 -#define _gloffset_FramebufferTexture3DEXT 843 -#define _gloffset_GenFramebuffersEXT 844 -#define _gloffset_GenRenderbuffersEXT 845 -#define _gloffset_GenerateMipmapEXT 846 -#define _gloffset_GetFramebufferAttachmentParameterivEXT 847 -#define _gloffset_GetRenderbufferParameterivEXT 848 -#define _gloffset_IsFramebufferEXT 849 -#define _gloffset_IsRenderbufferEXT 850 -#define _gloffset_RenderbufferStorageEXT 851 -#define _gloffset_BlitFramebufferEXT 852 -#define _gloffset_BufferParameteriAPPLE 853 -#define _gloffset_FlushMappedBufferRangeAPPLE 854 -#define _gloffset_BindFragDataLocationEXT 855 -#define _gloffset_GetFragDataLocationEXT 856 -#define _gloffset_GetUniformuivEXT 857 -#define _gloffset_GetVertexAttribIivEXT 858 -#define _gloffset_GetVertexAttribIuivEXT 859 -#define _gloffset_Uniform1uiEXT 860 -#define _gloffset_Uniform1uivEXT 861 -#define _gloffset_Uniform2uiEXT 862 -#define _gloffset_Uniform2uivEXT 863 -#define _gloffset_Uniform3uiEXT 864 -#define _gloffset_Uniform3uivEXT 865 -#define _gloffset_Uniform4uiEXT 866 -#define _gloffset_Uniform4uivEXT 867 -#define _gloffset_VertexAttribI1iEXT 868 -#define _gloffset_VertexAttribI1ivEXT 869 -#define _gloffset_VertexAttribI1uiEXT 870 -#define _gloffset_VertexAttribI1uivEXT 871 -#define _gloffset_VertexAttribI2iEXT 872 -#define _gloffset_VertexAttribI2ivEXT 873 -#define _gloffset_VertexAttribI2uiEXT 874 -#define _gloffset_VertexAttribI2uivEXT 875 -#define _gloffset_VertexAttribI3iEXT 876 -#define _gloffset_VertexAttribI3ivEXT 877 -#define _gloffset_VertexAttribI3uiEXT 878 -#define _gloffset_VertexAttribI3uivEXT 879 -#define _gloffset_VertexAttribI4bvEXT 880 -#define _gloffset_VertexAttribI4iEXT 881 -#define _gloffset_VertexAttribI4ivEXT 882 -#define _gloffset_VertexAttribI4svEXT 883 -#define _gloffset_VertexAttribI4ubvEXT 884 -#define _gloffset_VertexAttribI4uiEXT 885 -#define _gloffset_VertexAttribI4uivEXT 886 -#define _gloffset_VertexAttribI4usvEXT 887 -#define _gloffset_VertexAttribIPointerEXT 888 -#define _gloffset_FramebufferTextureLayerEXT 889 -#define _gloffset_ColorMaskIndexedEXT 890 -#define _gloffset_DisableIndexedEXT 891 -#define _gloffset_EnableIndexedEXT 892 -#define _gloffset_GetBooleanIndexedvEXT 893 -#define _gloffset_GetIntegerIndexedvEXT 894 -#define _gloffset_IsEnabledIndexedEXT 895 -#define _gloffset_ClearColorIiEXT 896 -#define _gloffset_ClearColorIuiEXT 897 -#define _gloffset_GetTexParameterIivEXT 898 -#define _gloffset_GetTexParameterIuivEXT 899 -#define _gloffset_TexParameterIivEXT 900 -#define _gloffset_TexParameterIuivEXT 901 -#define _gloffset_BeginConditionalRenderNV 902 -#define _gloffset_EndConditionalRenderNV 903 -#define _gloffset_BeginTransformFeedbackEXT 904 -#define _gloffset_BindBufferBaseEXT 905 -#define _gloffset_BindBufferOffsetEXT 906 -#define _gloffset_BindBufferRangeEXT 907 -#define _gloffset_EndTransformFeedbackEXT 908 -#define _gloffset_GetTransformFeedbackVaryingEXT 909 -#define _gloffset_TransformFeedbackVaryingsEXT 910 -#define _gloffset_ProvokingVertexEXT 911 -#define _gloffset_GetTexParameterPointervAPPLE 912 -#define _gloffset_TextureRangeAPPLE 913 -#define _gloffset_GetObjectParameterivAPPLE 914 -#define _gloffset_ObjectPurgeableAPPLE 915 -#define _gloffset_ObjectUnpurgeableAPPLE 916 -#define _gloffset_ActiveProgramEXT 917 -#define _gloffset_CreateShaderProgramEXT 918 -#define _gloffset_UseShaderProgramEXT 919 -#define _gloffset_TextureBarrierNV 920 -#define _gloffset_StencilFuncSeparateATI 921 -#define _gloffset_ProgramEnvParameters4fvEXT 922 -#define _gloffset_ProgramLocalParameters4fvEXT 923 -#define _gloffset_GetQueryObjecti64vEXT 924 -#define _gloffset_GetQueryObjectui64vEXT 925 -#define _gloffset_EGLImageTargetRenderbufferStorageOES 926 -#define _gloffset_EGLImageTargetTexture2DOES 927 - -#else /* !_GLAPI_USE_REMAP_TABLE */ - -#define driDispatchRemapTable_size 520 -extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; - -#define AttachShader_remap_index 0 -#define CreateProgram_remap_index 1 -#define CreateShader_remap_index 2 -#define DeleteProgram_remap_index 3 -#define DeleteShader_remap_index 4 -#define DetachShader_remap_index 5 -#define GetAttachedShaders_remap_index 6 -#define GetProgramInfoLog_remap_index 7 -#define GetProgramiv_remap_index 8 -#define GetShaderInfoLog_remap_index 9 -#define GetShaderiv_remap_index 10 -#define IsProgram_remap_index 11 -#define IsShader_remap_index 12 -#define StencilFuncSeparate_remap_index 13 -#define StencilMaskSeparate_remap_index 14 -#define StencilOpSeparate_remap_index 15 -#define UniformMatrix2x3fv_remap_index 16 -#define UniformMatrix2x4fv_remap_index 17 -#define UniformMatrix3x2fv_remap_index 18 -#define UniformMatrix3x4fv_remap_index 19 -#define UniformMatrix4x2fv_remap_index 20 -#define UniformMatrix4x3fv_remap_index 21 -#define ClampColor_remap_index 22 -#define ClearBufferfi_remap_index 23 -#define ClearBufferfv_remap_index 24 -#define ClearBufferiv_remap_index 25 -#define ClearBufferuiv_remap_index 26 -#define GetStringi_remap_index 27 -#define TexBuffer_remap_index 28 -#define FramebufferTexture_remap_index 29 -#define GetBufferParameteri64v_remap_index 30 -#define GetInteger64i_v_remap_index 31 -#define VertexAttribDivisor_remap_index 32 -#define LoadTransposeMatrixdARB_remap_index 33 -#define LoadTransposeMatrixfARB_remap_index 34 -#define MultTransposeMatrixdARB_remap_index 35 -#define MultTransposeMatrixfARB_remap_index 36 -#define SampleCoverageARB_remap_index 37 -#define CompressedTexImage1DARB_remap_index 38 -#define CompressedTexImage2DARB_remap_index 39 -#define CompressedTexImage3DARB_remap_index 40 -#define CompressedTexSubImage1DARB_remap_index 41 -#define CompressedTexSubImage2DARB_remap_index 42 -#define CompressedTexSubImage3DARB_remap_index 43 -#define GetCompressedTexImageARB_remap_index 44 -#define DisableVertexAttribArrayARB_remap_index 45 -#define EnableVertexAttribArrayARB_remap_index 46 -#define GetProgramEnvParameterdvARB_remap_index 47 -#define GetProgramEnvParameterfvARB_remap_index 48 -#define GetProgramLocalParameterdvARB_remap_index 49 -#define GetProgramLocalParameterfvARB_remap_index 50 -#define GetProgramStringARB_remap_index 51 -#define GetProgramivARB_remap_index 52 -#define GetVertexAttribdvARB_remap_index 53 -#define GetVertexAttribfvARB_remap_index 54 -#define GetVertexAttribivARB_remap_index 55 -#define ProgramEnvParameter4dARB_remap_index 56 -#define ProgramEnvParameter4dvARB_remap_index 57 -#define ProgramEnvParameter4fARB_remap_index 58 -#define ProgramEnvParameter4fvARB_remap_index 59 -#define ProgramLocalParameter4dARB_remap_index 60 -#define ProgramLocalParameter4dvARB_remap_index 61 -#define ProgramLocalParameter4fARB_remap_index 62 -#define ProgramLocalParameter4fvARB_remap_index 63 -#define ProgramStringARB_remap_index 64 -#define VertexAttrib1dARB_remap_index 65 -#define VertexAttrib1dvARB_remap_index 66 -#define VertexAttrib1fARB_remap_index 67 -#define VertexAttrib1fvARB_remap_index 68 -#define VertexAttrib1sARB_remap_index 69 -#define VertexAttrib1svARB_remap_index 70 -#define VertexAttrib2dARB_remap_index 71 -#define VertexAttrib2dvARB_remap_index 72 -#define VertexAttrib2fARB_remap_index 73 -#define VertexAttrib2fvARB_remap_index 74 -#define VertexAttrib2sARB_remap_index 75 -#define VertexAttrib2svARB_remap_index 76 -#define VertexAttrib3dARB_remap_index 77 -#define VertexAttrib3dvARB_remap_index 78 -#define VertexAttrib3fARB_remap_index 79 -#define VertexAttrib3fvARB_remap_index 80 -#define VertexAttrib3sARB_remap_index 81 -#define VertexAttrib3svARB_remap_index 82 -#define VertexAttrib4NbvARB_remap_index 83 -#define VertexAttrib4NivARB_remap_index 84 -#define VertexAttrib4NsvARB_remap_index 85 -#define VertexAttrib4NubARB_remap_index 86 -#define VertexAttrib4NubvARB_remap_index 87 -#define VertexAttrib4NuivARB_remap_index 88 -#define VertexAttrib4NusvARB_remap_index 89 -#define VertexAttrib4bvARB_remap_index 90 -#define VertexAttrib4dARB_remap_index 91 -#define VertexAttrib4dvARB_remap_index 92 -#define VertexAttrib4fARB_remap_index 93 -#define VertexAttrib4fvARB_remap_index 94 -#define VertexAttrib4ivARB_remap_index 95 -#define VertexAttrib4sARB_remap_index 96 -#define VertexAttrib4svARB_remap_index 97 -#define VertexAttrib4ubvARB_remap_index 98 -#define VertexAttrib4uivARB_remap_index 99 -#define VertexAttrib4usvARB_remap_index 100 -#define VertexAttribPointerARB_remap_index 101 -#define BindBufferARB_remap_index 102 -#define BufferDataARB_remap_index 103 -#define BufferSubDataARB_remap_index 104 -#define DeleteBuffersARB_remap_index 105 -#define GenBuffersARB_remap_index 106 -#define GetBufferParameterivARB_remap_index 107 -#define GetBufferPointervARB_remap_index 108 -#define GetBufferSubDataARB_remap_index 109 -#define IsBufferARB_remap_index 110 -#define MapBufferARB_remap_index 111 -#define UnmapBufferARB_remap_index 112 -#define BeginQueryARB_remap_index 113 -#define DeleteQueriesARB_remap_index 114 -#define EndQueryARB_remap_index 115 -#define GenQueriesARB_remap_index 116 -#define GetQueryObjectivARB_remap_index 117 -#define GetQueryObjectuivARB_remap_index 118 -#define GetQueryivARB_remap_index 119 -#define IsQueryARB_remap_index 120 -#define AttachObjectARB_remap_index 121 -#define CompileShaderARB_remap_index 122 -#define CreateProgramObjectARB_remap_index 123 -#define CreateShaderObjectARB_remap_index 124 -#define DeleteObjectARB_remap_index 125 -#define DetachObjectARB_remap_index 126 -#define GetActiveUniformARB_remap_index 127 -#define GetAttachedObjectsARB_remap_index 128 -#define GetHandleARB_remap_index 129 -#define GetInfoLogARB_remap_index 130 -#define GetObjectParameterfvARB_remap_index 131 -#define GetObjectParameterivARB_remap_index 132 -#define GetShaderSourceARB_remap_index 133 -#define GetUniformLocationARB_remap_index 134 -#define GetUniformfvARB_remap_index 135 -#define GetUniformivARB_remap_index 136 -#define LinkProgramARB_remap_index 137 -#define ShaderSourceARB_remap_index 138 -#define Uniform1fARB_remap_index 139 -#define Uniform1fvARB_remap_index 140 -#define Uniform1iARB_remap_index 141 -#define Uniform1ivARB_remap_index 142 -#define Uniform2fARB_remap_index 143 -#define Uniform2fvARB_remap_index 144 -#define Uniform2iARB_remap_index 145 -#define Uniform2ivARB_remap_index 146 -#define Uniform3fARB_remap_index 147 -#define Uniform3fvARB_remap_index 148 -#define Uniform3iARB_remap_index 149 -#define Uniform3ivARB_remap_index 150 -#define Uniform4fARB_remap_index 151 -#define Uniform4fvARB_remap_index 152 -#define Uniform4iARB_remap_index 153 -#define Uniform4ivARB_remap_index 154 -#define UniformMatrix2fvARB_remap_index 155 -#define UniformMatrix3fvARB_remap_index 156 -#define UniformMatrix4fvARB_remap_index 157 -#define UseProgramObjectARB_remap_index 158 -#define ValidateProgramARB_remap_index 159 -#define BindAttribLocationARB_remap_index 160 -#define GetActiveAttribARB_remap_index 161 -#define GetAttribLocationARB_remap_index 162 -#define DrawBuffersARB_remap_index 163 -#define ClampColorARB_remap_index 164 -#define DrawArraysInstancedARB_remap_index 165 -#define DrawElementsInstancedARB_remap_index 166 -#define RenderbufferStorageMultisample_remap_index 167 -#define FramebufferTextureARB_remap_index 168 -#define FramebufferTextureFaceARB_remap_index 169 -#define ProgramParameteriARB_remap_index 170 -#define VertexAttribDivisorARB_remap_index 171 -#define FlushMappedBufferRange_remap_index 172 -#define MapBufferRange_remap_index 173 -#define TexBufferARB_remap_index 174 -#define BindVertexArray_remap_index 175 -#define GenVertexArrays_remap_index 176 -#define CopyBufferSubData_remap_index 177 -#define ClientWaitSync_remap_index 178 -#define DeleteSync_remap_index 179 -#define FenceSync_remap_index 180 -#define GetInteger64v_remap_index 181 -#define GetSynciv_remap_index 182 -#define IsSync_remap_index 183 -#define WaitSync_remap_index 184 -#define DrawElementsBaseVertex_remap_index 185 -#define DrawRangeElementsBaseVertex_remap_index 186 -#define MultiDrawElementsBaseVertex_remap_index 187 -#define BlendEquationSeparateiARB_remap_index 188 -#define BlendEquationiARB_remap_index 189 -#define BlendFuncSeparateiARB_remap_index 190 -#define BlendFunciARB_remap_index 191 -#define BindSampler_remap_index 192 -#define DeleteSamplers_remap_index 193 -#define GenSamplers_remap_index 194 -#define GetSamplerParameterIiv_remap_index 195 -#define GetSamplerParameterIuiv_remap_index 196 -#define GetSamplerParameterfv_remap_index 197 -#define GetSamplerParameteriv_remap_index 198 -#define IsSampler_remap_index 199 -#define SamplerParameterIiv_remap_index 200 -#define SamplerParameterIuiv_remap_index 201 -#define SamplerParameterf_remap_index 202 -#define SamplerParameterfv_remap_index 203 -#define SamplerParameteri_remap_index 204 -#define SamplerParameteriv_remap_index 205 -#define BindTransformFeedback_remap_index 206 -#define DeleteTransformFeedbacks_remap_index 207 -#define DrawTransformFeedback_remap_index 208 -#define GenTransformFeedbacks_remap_index 209 -#define IsTransformFeedback_remap_index 210 -#define PauseTransformFeedback_remap_index 211 -#define ResumeTransformFeedback_remap_index 212 -#define ClearDepthf_remap_index 213 -#define DepthRangef_remap_index 214 -#define GetShaderPrecisionFormat_remap_index 215 -#define ReleaseShaderCompiler_remap_index 216 -#define ShaderBinary_remap_index 217 -#define GetGraphicsResetStatusARB_remap_index 218 -#define GetnColorTableARB_remap_index 219 -#define GetnCompressedTexImageARB_remap_index 220 -#define GetnConvolutionFilterARB_remap_index 221 -#define GetnHistogramARB_remap_index 222 -#define GetnMapdvARB_remap_index 223 -#define GetnMapfvARB_remap_index 224 -#define GetnMapivARB_remap_index 225 -#define GetnMinmaxARB_remap_index 226 -#define GetnPixelMapfvARB_remap_index 227 -#define GetnPixelMapuivARB_remap_index 228 -#define GetnPixelMapusvARB_remap_index 229 -#define GetnPolygonStippleARB_remap_index 230 -#define GetnSeparableFilterARB_remap_index 231 -#define GetnTexImageARB_remap_index 232 -#define GetnUniformdvARB_remap_index 233 -#define GetnUniformfvARB_remap_index 234 -#define GetnUniformivARB_remap_index 235 -#define GetnUniformuivARB_remap_index 236 -#define ReadnPixelsARB_remap_index 237 -#define PolygonOffsetEXT_remap_index 238 -#define GetPixelTexGenParameterfvSGIS_remap_index 239 -#define GetPixelTexGenParameterivSGIS_remap_index 240 -#define PixelTexGenParameterfSGIS_remap_index 241 -#define PixelTexGenParameterfvSGIS_remap_index 242 -#define PixelTexGenParameteriSGIS_remap_index 243 -#define PixelTexGenParameterivSGIS_remap_index 244 -#define SampleMaskSGIS_remap_index 245 -#define SamplePatternSGIS_remap_index 246 -#define ColorPointerEXT_remap_index 247 -#define EdgeFlagPointerEXT_remap_index 248 -#define IndexPointerEXT_remap_index 249 -#define NormalPointerEXT_remap_index 250 -#define TexCoordPointerEXT_remap_index 251 -#define VertexPointerEXT_remap_index 252 -#define PointParameterfEXT_remap_index 253 -#define PointParameterfvEXT_remap_index 254 -#define LockArraysEXT_remap_index 255 -#define UnlockArraysEXT_remap_index 256 -#define SecondaryColor3bEXT_remap_index 257 -#define SecondaryColor3bvEXT_remap_index 258 -#define SecondaryColor3dEXT_remap_index 259 -#define SecondaryColor3dvEXT_remap_index 260 -#define SecondaryColor3fEXT_remap_index 261 -#define SecondaryColor3fvEXT_remap_index 262 -#define SecondaryColor3iEXT_remap_index 263 -#define SecondaryColor3ivEXT_remap_index 264 -#define SecondaryColor3sEXT_remap_index 265 -#define SecondaryColor3svEXT_remap_index 266 -#define SecondaryColor3ubEXT_remap_index 267 -#define SecondaryColor3ubvEXT_remap_index 268 -#define SecondaryColor3uiEXT_remap_index 269 -#define SecondaryColor3uivEXT_remap_index 270 -#define SecondaryColor3usEXT_remap_index 271 -#define SecondaryColor3usvEXT_remap_index 272 -#define SecondaryColorPointerEXT_remap_index 273 -#define MultiDrawArraysEXT_remap_index 274 -#define MultiDrawElementsEXT_remap_index 275 -#define FogCoordPointerEXT_remap_index 276 -#define FogCoorddEXT_remap_index 277 -#define FogCoorddvEXT_remap_index 278 -#define FogCoordfEXT_remap_index 279 -#define FogCoordfvEXT_remap_index 280 -#define PixelTexGenSGIX_remap_index 281 -#define BlendFuncSeparateEXT_remap_index 282 -#define FlushVertexArrayRangeNV_remap_index 283 -#define VertexArrayRangeNV_remap_index 284 -#define CombinerInputNV_remap_index 285 -#define CombinerOutputNV_remap_index 286 -#define CombinerParameterfNV_remap_index 287 -#define CombinerParameterfvNV_remap_index 288 -#define CombinerParameteriNV_remap_index 289 -#define CombinerParameterivNV_remap_index 290 -#define FinalCombinerInputNV_remap_index 291 -#define GetCombinerInputParameterfvNV_remap_index 292 -#define GetCombinerInputParameterivNV_remap_index 293 -#define GetCombinerOutputParameterfvNV_remap_index 294 -#define GetCombinerOutputParameterivNV_remap_index 295 -#define GetFinalCombinerInputParameterfvNV_remap_index 296 -#define GetFinalCombinerInputParameterivNV_remap_index 297 -#define ResizeBuffersMESA_remap_index 298 -#define WindowPos2dMESA_remap_index 299 -#define WindowPos2dvMESA_remap_index 300 -#define WindowPos2fMESA_remap_index 301 -#define WindowPos2fvMESA_remap_index 302 -#define WindowPos2iMESA_remap_index 303 -#define WindowPos2ivMESA_remap_index 304 -#define WindowPos2sMESA_remap_index 305 -#define WindowPos2svMESA_remap_index 306 -#define WindowPos3dMESA_remap_index 307 -#define WindowPos3dvMESA_remap_index 308 -#define WindowPos3fMESA_remap_index 309 -#define WindowPos3fvMESA_remap_index 310 -#define WindowPos3iMESA_remap_index 311 -#define WindowPos3ivMESA_remap_index 312 -#define WindowPos3sMESA_remap_index 313 -#define WindowPos3svMESA_remap_index 314 -#define WindowPos4dMESA_remap_index 315 -#define WindowPos4dvMESA_remap_index 316 -#define WindowPos4fMESA_remap_index 317 -#define WindowPos4fvMESA_remap_index 318 -#define WindowPos4iMESA_remap_index 319 -#define WindowPos4ivMESA_remap_index 320 -#define WindowPos4sMESA_remap_index 321 -#define WindowPos4svMESA_remap_index 322 -#define MultiModeDrawArraysIBM_remap_index 323 -#define MultiModeDrawElementsIBM_remap_index 324 -#define DeleteFencesNV_remap_index 325 -#define FinishFenceNV_remap_index 326 -#define GenFencesNV_remap_index 327 -#define GetFenceivNV_remap_index 328 -#define IsFenceNV_remap_index 329 -#define SetFenceNV_remap_index 330 -#define TestFenceNV_remap_index 331 -#define AreProgramsResidentNV_remap_index 332 -#define BindProgramNV_remap_index 333 -#define DeleteProgramsNV_remap_index 334 -#define ExecuteProgramNV_remap_index 335 -#define GenProgramsNV_remap_index 336 -#define GetProgramParameterdvNV_remap_index 337 -#define GetProgramParameterfvNV_remap_index 338 -#define GetProgramStringNV_remap_index 339 -#define GetProgramivNV_remap_index 340 -#define GetTrackMatrixivNV_remap_index 341 -#define GetVertexAttribPointervNV_remap_index 342 -#define GetVertexAttribdvNV_remap_index 343 -#define GetVertexAttribfvNV_remap_index 344 -#define GetVertexAttribivNV_remap_index 345 -#define IsProgramNV_remap_index 346 -#define LoadProgramNV_remap_index 347 -#define ProgramParameters4dvNV_remap_index 348 -#define ProgramParameters4fvNV_remap_index 349 -#define RequestResidentProgramsNV_remap_index 350 -#define TrackMatrixNV_remap_index 351 -#define VertexAttrib1dNV_remap_index 352 -#define VertexAttrib1dvNV_remap_index 353 -#define VertexAttrib1fNV_remap_index 354 -#define VertexAttrib1fvNV_remap_index 355 -#define VertexAttrib1sNV_remap_index 356 -#define VertexAttrib1svNV_remap_index 357 -#define VertexAttrib2dNV_remap_index 358 -#define VertexAttrib2dvNV_remap_index 359 -#define VertexAttrib2fNV_remap_index 360 -#define VertexAttrib2fvNV_remap_index 361 -#define VertexAttrib2sNV_remap_index 362 -#define VertexAttrib2svNV_remap_index 363 -#define VertexAttrib3dNV_remap_index 364 -#define VertexAttrib3dvNV_remap_index 365 -#define VertexAttrib3fNV_remap_index 366 -#define VertexAttrib3fvNV_remap_index 367 -#define VertexAttrib3sNV_remap_index 368 -#define VertexAttrib3svNV_remap_index 369 -#define VertexAttrib4dNV_remap_index 370 -#define VertexAttrib4dvNV_remap_index 371 -#define VertexAttrib4fNV_remap_index 372 -#define VertexAttrib4fvNV_remap_index 373 -#define VertexAttrib4sNV_remap_index 374 -#define VertexAttrib4svNV_remap_index 375 -#define VertexAttrib4ubNV_remap_index 376 -#define VertexAttrib4ubvNV_remap_index 377 -#define VertexAttribPointerNV_remap_index 378 -#define VertexAttribs1dvNV_remap_index 379 -#define VertexAttribs1fvNV_remap_index 380 -#define VertexAttribs1svNV_remap_index 381 -#define VertexAttribs2dvNV_remap_index 382 -#define VertexAttribs2fvNV_remap_index 383 -#define VertexAttribs2svNV_remap_index 384 -#define VertexAttribs3dvNV_remap_index 385 -#define VertexAttribs3fvNV_remap_index 386 -#define VertexAttribs3svNV_remap_index 387 -#define VertexAttribs4dvNV_remap_index 388 -#define VertexAttribs4fvNV_remap_index 389 -#define VertexAttribs4svNV_remap_index 390 -#define VertexAttribs4ubvNV_remap_index 391 -#define GetTexBumpParameterfvATI_remap_index 392 -#define GetTexBumpParameterivATI_remap_index 393 -#define TexBumpParameterfvATI_remap_index 394 -#define TexBumpParameterivATI_remap_index 395 -#define AlphaFragmentOp1ATI_remap_index 396 -#define AlphaFragmentOp2ATI_remap_index 397 -#define AlphaFragmentOp3ATI_remap_index 398 -#define BeginFragmentShaderATI_remap_index 399 -#define BindFragmentShaderATI_remap_index 400 -#define ColorFragmentOp1ATI_remap_index 401 -#define ColorFragmentOp2ATI_remap_index 402 -#define ColorFragmentOp3ATI_remap_index 403 -#define DeleteFragmentShaderATI_remap_index 404 -#define EndFragmentShaderATI_remap_index 405 -#define GenFragmentShadersATI_remap_index 406 -#define PassTexCoordATI_remap_index 407 -#define SampleMapATI_remap_index 408 -#define SetFragmentShaderConstantATI_remap_index 409 -#define PointParameteriNV_remap_index 410 -#define PointParameterivNV_remap_index 411 -#define ActiveStencilFaceEXT_remap_index 412 -#define BindVertexArrayAPPLE_remap_index 413 -#define DeleteVertexArraysAPPLE_remap_index 414 -#define GenVertexArraysAPPLE_remap_index 415 -#define IsVertexArrayAPPLE_remap_index 416 -#define GetProgramNamedParameterdvNV_remap_index 417 -#define GetProgramNamedParameterfvNV_remap_index 418 -#define ProgramNamedParameter4dNV_remap_index 419 -#define ProgramNamedParameter4dvNV_remap_index 420 -#define ProgramNamedParameter4fNV_remap_index 421 -#define ProgramNamedParameter4fvNV_remap_index 422 -#define PrimitiveRestartIndexNV_remap_index 423 -#define PrimitiveRestartNV_remap_index 424 -#define DepthBoundsEXT_remap_index 425 -#define BlendEquationSeparateEXT_remap_index 426 -#define BindFramebufferEXT_remap_index 427 -#define BindRenderbufferEXT_remap_index 428 -#define CheckFramebufferStatusEXT_remap_index 429 -#define DeleteFramebuffersEXT_remap_index 430 -#define DeleteRenderbuffersEXT_remap_index 431 -#define FramebufferRenderbufferEXT_remap_index 432 -#define FramebufferTexture1DEXT_remap_index 433 -#define FramebufferTexture2DEXT_remap_index 434 -#define FramebufferTexture3DEXT_remap_index 435 -#define GenFramebuffersEXT_remap_index 436 -#define GenRenderbuffersEXT_remap_index 437 -#define GenerateMipmapEXT_remap_index 438 -#define GetFramebufferAttachmentParameterivEXT_remap_index 439 -#define GetRenderbufferParameterivEXT_remap_index 440 -#define IsFramebufferEXT_remap_index 441 -#define IsRenderbufferEXT_remap_index 442 -#define RenderbufferStorageEXT_remap_index 443 -#define BlitFramebufferEXT_remap_index 444 -#define BufferParameteriAPPLE_remap_index 445 -#define FlushMappedBufferRangeAPPLE_remap_index 446 -#define BindFragDataLocationEXT_remap_index 447 -#define GetFragDataLocationEXT_remap_index 448 -#define GetUniformuivEXT_remap_index 449 -#define GetVertexAttribIivEXT_remap_index 450 -#define GetVertexAttribIuivEXT_remap_index 451 -#define Uniform1uiEXT_remap_index 452 -#define Uniform1uivEXT_remap_index 453 -#define Uniform2uiEXT_remap_index 454 -#define Uniform2uivEXT_remap_index 455 -#define Uniform3uiEXT_remap_index 456 -#define Uniform3uivEXT_remap_index 457 -#define Uniform4uiEXT_remap_index 458 -#define Uniform4uivEXT_remap_index 459 -#define VertexAttribI1iEXT_remap_index 460 -#define VertexAttribI1ivEXT_remap_index 461 -#define VertexAttribI1uiEXT_remap_index 462 -#define VertexAttribI1uivEXT_remap_index 463 -#define VertexAttribI2iEXT_remap_index 464 -#define VertexAttribI2ivEXT_remap_index 465 -#define VertexAttribI2uiEXT_remap_index 466 -#define VertexAttribI2uivEXT_remap_index 467 -#define VertexAttribI3iEXT_remap_index 468 -#define VertexAttribI3ivEXT_remap_index 469 -#define VertexAttribI3uiEXT_remap_index 470 -#define VertexAttribI3uivEXT_remap_index 471 -#define VertexAttribI4bvEXT_remap_index 472 -#define VertexAttribI4iEXT_remap_index 473 -#define VertexAttribI4ivEXT_remap_index 474 -#define VertexAttribI4svEXT_remap_index 475 -#define VertexAttribI4ubvEXT_remap_index 476 -#define VertexAttribI4uiEXT_remap_index 477 -#define VertexAttribI4uivEXT_remap_index 478 -#define VertexAttribI4usvEXT_remap_index 479 -#define VertexAttribIPointerEXT_remap_index 480 -#define FramebufferTextureLayerEXT_remap_index 481 -#define ColorMaskIndexedEXT_remap_index 482 -#define DisableIndexedEXT_remap_index 483 -#define EnableIndexedEXT_remap_index 484 -#define GetBooleanIndexedvEXT_remap_index 485 -#define GetIntegerIndexedvEXT_remap_index 486 -#define IsEnabledIndexedEXT_remap_index 487 -#define ClearColorIiEXT_remap_index 488 -#define ClearColorIuiEXT_remap_index 489 -#define GetTexParameterIivEXT_remap_index 490 -#define GetTexParameterIuivEXT_remap_index 491 -#define TexParameterIivEXT_remap_index 492 -#define TexParameterIuivEXT_remap_index 493 -#define BeginConditionalRenderNV_remap_index 494 -#define EndConditionalRenderNV_remap_index 495 -#define BeginTransformFeedbackEXT_remap_index 496 -#define BindBufferBaseEXT_remap_index 497 -#define BindBufferOffsetEXT_remap_index 498 -#define BindBufferRangeEXT_remap_index 499 -#define EndTransformFeedbackEXT_remap_index 500 -#define GetTransformFeedbackVaryingEXT_remap_index 501 -#define TransformFeedbackVaryingsEXT_remap_index 502 -#define ProvokingVertexEXT_remap_index 503 -#define GetTexParameterPointervAPPLE_remap_index 504 -#define TextureRangeAPPLE_remap_index 505 -#define GetObjectParameterivAPPLE_remap_index 506 -#define ObjectPurgeableAPPLE_remap_index 507 -#define ObjectUnpurgeableAPPLE_remap_index 508 -#define ActiveProgramEXT_remap_index 509 -#define CreateShaderProgramEXT_remap_index 510 -#define UseShaderProgramEXT_remap_index 511 -#define TextureBarrierNV_remap_index 512 -#define StencilFuncSeparateATI_remap_index 513 -#define ProgramEnvParameters4fvEXT_remap_index 514 -#define ProgramLocalParameters4fvEXT_remap_index 515 -#define GetQueryObjecti64vEXT_remap_index 516 -#define GetQueryObjectui64vEXT_remap_index 517 -#define EGLImageTargetRenderbufferStorageOES_remap_index 518 -#define EGLImageTargetTexture2DOES_remap_index 519 - -#define _gloffset_AttachShader driDispatchRemapTable[AttachShader_remap_index] -#define _gloffset_CreateProgram driDispatchRemapTable[CreateProgram_remap_index] -#define _gloffset_CreateShader driDispatchRemapTable[CreateShader_remap_index] -#define _gloffset_DeleteProgram driDispatchRemapTable[DeleteProgram_remap_index] -#define _gloffset_DeleteShader driDispatchRemapTable[DeleteShader_remap_index] -#define _gloffset_DetachShader driDispatchRemapTable[DetachShader_remap_index] -#define _gloffset_GetAttachedShaders driDispatchRemapTable[GetAttachedShaders_remap_index] -#define _gloffset_GetProgramInfoLog driDispatchRemapTable[GetProgramInfoLog_remap_index] -#define _gloffset_GetProgramiv driDispatchRemapTable[GetProgramiv_remap_index] -#define _gloffset_GetShaderInfoLog driDispatchRemapTable[GetShaderInfoLog_remap_index] -#define _gloffset_GetShaderiv driDispatchRemapTable[GetShaderiv_remap_index] -#define _gloffset_IsProgram driDispatchRemapTable[IsProgram_remap_index] -#define _gloffset_IsShader driDispatchRemapTable[IsShader_remap_index] -#define _gloffset_StencilFuncSeparate driDispatchRemapTable[StencilFuncSeparate_remap_index] -#define _gloffset_StencilMaskSeparate driDispatchRemapTable[StencilMaskSeparate_remap_index] -#define _gloffset_StencilOpSeparate driDispatchRemapTable[StencilOpSeparate_remap_index] -#define _gloffset_UniformMatrix2x3fv driDispatchRemapTable[UniformMatrix2x3fv_remap_index] -#define _gloffset_UniformMatrix2x4fv driDispatchRemapTable[UniformMatrix2x4fv_remap_index] -#define _gloffset_UniformMatrix3x2fv driDispatchRemapTable[UniformMatrix3x2fv_remap_index] -#define _gloffset_UniformMatrix3x4fv driDispatchRemapTable[UniformMatrix3x4fv_remap_index] -#define _gloffset_UniformMatrix4x2fv driDispatchRemapTable[UniformMatrix4x2fv_remap_index] -#define _gloffset_UniformMatrix4x3fv driDispatchRemapTable[UniformMatrix4x3fv_remap_index] -#define _gloffset_ClampColor driDispatchRemapTable[ClampColor_remap_index] -#define _gloffset_ClearBufferfi driDispatchRemapTable[ClearBufferfi_remap_index] -#define _gloffset_ClearBufferfv driDispatchRemapTable[ClearBufferfv_remap_index] -#define _gloffset_ClearBufferiv driDispatchRemapTable[ClearBufferiv_remap_index] -#define _gloffset_ClearBufferuiv driDispatchRemapTable[ClearBufferuiv_remap_index] -#define _gloffset_GetStringi driDispatchRemapTable[GetStringi_remap_index] -#define _gloffset_TexBuffer driDispatchRemapTable[TexBuffer_remap_index] -#define _gloffset_FramebufferTexture driDispatchRemapTable[FramebufferTexture_remap_index] -#define _gloffset_GetBufferParameteri64v driDispatchRemapTable[GetBufferParameteri64v_remap_index] -#define _gloffset_GetInteger64i_v driDispatchRemapTable[GetInteger64i_v_remap_index] -#define _gloffset_VertexAttribDivisor driDispatchRemapTable[VertexAttribDivisor_remap_index] -#define _gloffset_LoadTransposeMatrixdARB driDispatchRemapTable[LoadTransposeMatrixdARB_remap_index] -#define _gloffset_LoadTransposeMatrixfARB driDispatchRemapTable[LoadTransposeMatrixfARB_remap_index] -#define _gloffset_MultTransposeMatrixdARB driDispatchRemapTable[MultTransposeMatrixdARB_remap_index] -#define _gloffset_MultTransposeMatrixfARB driDispatchRemapTable[MultTransposeMatrixfARB_remap_index] -#define _gloffset_SampleCoverageARB driDispatchRemapTable[SampleCoverageARB_remap_index] -#define _gloffset_CompressedTexImage1DARB driDispatchRemapTable[CompressedTexImage1DARB_remap_index] -#define _gloffset_CompressedTexImage2DARB driDispatchRemapTable[CompressedTexImage2DARB_remap_index] -#define _gloffset_CompressedTexImage3DARB driDispatchRemapTable[CompressedTexImage3DARB_remap_index] -#define _gloffset_CompressedTexSubImage1DARB driDispatchRemapTable[CompressedTexSubImage1DARB_remap_index] -#define _gloffset_CompressedTexSubImage2DARB driDispatchRemapTable[CompressedTexSubImage2DARB_remap_index] -#define _gloffset_CompressedTexSubImage3DARB driDispatchRemapTable[CompressedTexSubImage3DARB_remap_index] -#define _gloffset_GetCompressedTexImageARB driDispatchRemapTable[GetCompressedTexImageARB_remap_index] -#define _gloffset_DisableVertexAttribArrayARB driDispatchRemapTable[DisableVertexAttribArrayARB_remap_index] -#define _gloffset_EnableVertexAttribArrayARB driDispatchRemapTable[EnableVertexAttribArrayARB_remap_index] -#define _gloffset_GetProgramEnvParameterdvARB driDispatchRemapTable[GetProgramEnvParameterdvARB_remap_index] -#define _gloffset_GetProgramEnvParameterfvARB driDispatchRemapTable[GetProgramEnvParameterfvARB_remap_index] -#define _gloffset_GetProgramLocalParameterdvARB driDispatchRemapTable[GetProgramLocalParameterdvARB_remap_index] -#define _gloffset_GetProgramLocalParameterfvARB driDispatchRemapTable[GetProgramLocalParameterfvARB_remap_index] -#define _gloffset_GetProgramStringARB driDispatchRemapTable[GetProgramStringARB_remap_index] -#define _gloffset_GetProgramivARB driDispatchRemapTable[GetProgramivARB_remap_index] -#define _gloffset_GetVertexAttribdvARB driDispatchRemapTable[GetVertexAttribdvARB_remap_index] -#define _gloffset_GetVertexAttribfvARB driDispatchRemapTable[GetVertexAttribfvARB_remap_index] -#define _gloffset_GetVertexAttribivARB driDispatchRemapTable[GetVertexAttribivARB_remap_index] -#define _gloffset_ProgramEnvParameter4dARB driDispatchRemapTable[ProgramEnvParameter4dARB_remap_index] -#define _gloffset_ProgramEnvParameter4dvARB driDispatchRemapTable[ProgramEnvParameter4dvARB_remap_index] -#define _gloffset_ProgramEnvParameter4fARB driDispatchRemapTable[ProgramEnvParameter4fARB_remap_index] -#define _gloffset_ProgramEnvParameter4fvARB driDispatchRemapTable[ProgramEnvParameter4fvARB_remap_index] -#define _gloffset_ProgramLocalParameter4dARB driDispatchRemapTable[ProgramLocalParameter4dARB_remap_index] -#define _gloffset_ProgramLocalParameter4dvARB driDispatchRemapTable[ProgramLocalParameter4dvARB_remap_index] -#define _gloffset_ProgramLocalParameter4fARB driDispatchRemapTable[ProgramLocalParameter4fARB_remap_index] -#define _gloffset_ProgramLocalParameter4fvARB driDispatchRemapTable[ProgramLocalParameter4fvARB_remap_index] -#define _gloffset_ProgramStringARB driDispatchRemapTable[ProgramStringARB_remap_index] -#define _gloffset_VertexAttrib1dARB driDispatchRemapTable[VertexAttrib1dARB_remap_index] -#define _gloffset_VertexAttrib1dvARB driDispatchRemapTable[VertexAttrib1dvARB_remap_index] -#define _gloffset_VertexAttrib1fARB driDispatchRemapTable[VertexAttrib1fARB_remap_index] -#define _gloffset_VertexAttrib1fvARB driDispatchRemapTable[VertexAttrib1fvARB_remap_index] -#define _gloffset_VertexAttrib1sARB driDispatchRemapTable[VertexAttrib1sARB_remap_index] -#define _gloffset_VertexAttrib1svARB driDispatchRemapTable[VertexAttrib1svARB_remap_index] -#define _gloffset_VertexAttrib2dARB driDispatchRemapTable[VertexAttrib2dARB_remap_index] -#define _gloffset_VertexAttrib2dvARB driDispatchRemapTable[VertexAttrib2dvARB_remap_index] -#define _gloffset_VertexAttrib2fARB driDispatchRemapTable[VertexAttrib2fARB_remap_index] -#define _gloffset_VertexAttrib2fvARB driDispatchRemapTable[VertexAttrib2fvARB_remap_index] -#define _gloffset_VertexAttrib2sARB driDispatchRemapTable[VertexAttrib2sARB_remap_index] -#define _gloffset_VertexAttrib2svARB driDispatchRemapTable[VertexAttrib2svARB_remap_index] -#define _gloffset_VertexAttrib3dARB driDispatchRemapTable[VertexAttrib3dARB_remap_index] -#define _gloffset_VertexAttrib3dvARB driDispatchRemapTable[VertexAttrib3dvARB_remap_index] -#define _gloffset_VertexAttrib3fARB driDispatchRemapTable[VertexAttrib3fARB_remap_index] -#define _gloffset_VertexAttrib3fvARB driDispatchRemapTable[VertexAttrib3fvARB_remap_index] -#define _gloffset_VertexAttrib3sARB driDispatchRemapTable[VertexAttrib3sARB_remap_index] -#define _gloffset_VertexAttrib3svARB driDispatchRemapTable[VertexAttrib3svARB_remap_index] -#define _gloffset_VertexAttrib4NbvARB driDispatchRemapTable[VertexAttrib4NbvARB_remap_index] -#define _gloffset_VertexAttrib4NivARB driDispatchRemapTable[VertexAttrib4NivARB_remap_index] -#define _gloffset_VertexAttrib4NsvARB driDispatchRemapTable[VertexAttrib4NsvARB_remap_index] -#define _gloffset_VertexAttrib4NubARB driDispatchRemapTable[VertexAttrib4NubARB_remap_index] -#define _gloffset_VertexAttrib4NubvARB driDispatchRemapTable[VertexAttrib4NubvARB_remap_index] -#define _gloffset_VertexAttrib4NuivARB driDispatchRemapTable[VertexAttrib4NuivARB_remap_index] -#define _gloffset_VertexAttrib4NusvARB driDispatchRemapTable[VertexAttrib4NusvARB_remap_index] -#define _gloffset_VertexAttrib4bvARB driDispatchRemapTable[VertexAttrib4bvARB_remap_index] -#define _gloffset_VertexAttrib4dARB driDispatchRemapTable[VertexAttrib4dARB_remap_index] -#define _gloffset_VertexAttrib4dvARB driDispatchRemapTable[VertexAttrib4dvARB_remap_index] -#define _gloffset_VertexAttrib4fARB driDispatchRemapTable[VertexAttrib4fARB_remap_index] -#define _gloffset_VertexAttrib4fvARB driDispatchRemapTable[VertexAttrib4fvARB_remap_index] -#define _gloffset_VertexAttrib4ivARB driDispatchRemapTable[VertexAttrib4ivARB_remap_index] -#define _gloffset_VertexAttrib4sARB driDispatchRemapTable[VertexAttrib4sARB_remap_index] -#define _gloffset_VertexAttrib4svARB driDispatchRemapTable[VertexAttrib4svARB_remap_index] -#define _gloffset_VertexAttrib4ubvARB driDispatchRemapTable[VertexAttrib4ubvARB_remap_index] -#define _gloffset_VertexAttrib4uivARB driDispatchRemapTable[VertexAttrib4uivARB_remap_index] -#define _gloffset_VertexAttrib4usvARB driDispatchRemapTable[VertexAttrib4usvARB_remap_index] -#define _gloffset_VertexAttribPointerARB driDispatchRemapTable[VertexAttribPointerARB_remap_index] -#define _gloffset_BindBufferARB driDispatchRemapTable[BindBufferARB_remap_index] -#define _gloffset_BufferDataARB driDispatchRemapTable[BufferDataARB_remap_index] -#define _gloffset_BufferSubDataARB driDispatchRemapTable[BufferSubDataARB_remap_index] -#define _gloffset_DeleteBuffersARB driDispatchRemapTable[DeleteBuffersARB_remap_index] -#define _gloffset_GenBuffersARB driDispatchRemapTable[GenBuffersARB_remap_index] -#define _gloffset_GetBufferParameterivARB driDispatchRemapTable[GetBufferParameterivARB_remap_index] -#define _gloffset_GetBufferPointervARB driDispatchRemapTable[GetBufferPointervARB_remap_index] -#define _gloffset_GetBufferSubDataARB driDispatchRemapTable[GetBufferSubDataARB_remap_index] -#define _gloffset_IsBufferARB driDispatchRemapTable[IsBufferARB_remap_index] -#define _gloffset_MapBufferARB driDispatchRemapTable[MapBufferARB_remap_index] -#define _gloffset_UnmapBufferARB driDispatchRemapTable[UnmapBufferARB_remap_index] -#define _gloffset_BeginQueryARB driDispatchRemapTable[BeginQueryARB_remap_index] -#define _gloffset_DeleteQueriesARB driDispatchRemapTable[DeleteQueriesARB_remap_index] -#define _gloffset_EndQueryARB driDispatchRemapTable[EndQueryARB_remap_index] -#define _gloffset_GenQueriesARB driDispatchRemapTable[GenQueriesARB_remap_index] -#define _gloffset_GetQueryObjectivARB driDispatchRemapTable[GetQueryObjectivARB_remap_index] -#define _gloffset_GetQueryObjectuivARB driDispatchRemapTable[GetQueryObjectuivARB_remap_index] -#define _gloffset_GetQueryivARB driDispatchRemapTable[GetQueryivARB_remap_index] -#define _gloffset_IsQueryARB driDispatchRemapTable[IsQueryARB_remap_index] -#define _gloffset_AttachObjectARB driDispatchRemapTable[AttachObjectARB_remap_index] -#define _gloffset_CompileShaderARB driDispatchRemapTable[CompileShaderARB_remap_index] -#define _gloffset_CreateProgramObjectARB driDispatchRemapTable[CreateProgramObjectARB_remap_index] -#define _gloffset_CreateShaderObjectARB driDispatchRemapTable[CreateShaderObjectARB_remap_index] -#define _gloffset_DeleteObjectARB driDispatchRemapTable[DeleteObjectARB_remap_index] -#define _gloffset_DetachObjectARB driDispatchRemapTable[DetachObjectARB_remap_index] -#define _gloffset_GetActiveUniformARB driDispatchRemapTable[GetActiveUniformARB_remap_index] -#define _gloffset_GetAttachedObjectsARB driDispatchRemapTable[GetAttachedObjectsARB_remap_index] -#define _gloffset_GetHandleARB driDispatchRemapTable[GetHandleARB_remap_index] -#define _gloffset_GetInfoLogARB driDispatchRemapTable[GetInfoLogARB_remap_index] -#define _gloffset_GetObjectParameterfvARB driDispatchRemapTable[GetObjectParameterfvARB_remap_index] -#define _gloffset_GetObjectParameterivARB driDispatchRemapTable[GetObjectParameterivARB_remap_index] -#define _gloffset_GetShaderSourceARB driDispatchRemapTable[GetShaderSourceARB_remap_index] -#define _gloffset_GetUniformLocationARB driDispatchRemapTable[GetUniformLocationARB_remap_index] -#define _gloffset_GetUniformfvARB driDispatchRemapTable[GetUniformfvARB_remap_index] -#define _gloffset_GetUniformivARB driDispatchRemapTable[GetUniformivARB_remap_index] -#define _gloffset_LinkProgramARB driDispatchRemapTable[LinkProgramARB_remap_index] -#define _gloffset_ShaderSourceARB driDispatchRemapTable[ShaderSourceARB_remap_index] -#define _gloffset_Uniform1fARB driDispatchRemapTable[Uniform1fARB_remap_index] -#define _gloffset_Uniform1fvARB driDispatchRemapTable[Uniform1fvARB_remap_index] -#define _gloffset_Uniform1iARB driDispatchRemapTable[Uniform1iARB_remap_index] -#define _gloffset_Uniform1ivARB driDispatchRemapTable[Uniform1ivARB_remap_index] -#define _gloffset_Uniform2fARB driDispatchRemapTable[Uniform2fARB_remap_index] -#define _gloffset_Uniform2fvARB driDispatchRemapTable[Uniform2fvARB_remap_index] -#define _gloffset_Uniform2iARB driDispatchRemapTable[Uniform2iARB_remap_index] -#define _gloffset_Uniform2ivARB driDispatchRemapTable[Uniform2ivARB_remap_index] -#define _gloffset_Uniform3fARB driDispatchRemapTable[Uniform3fARB_remap_index] -#define _gloffset_Uniform3fvARB driDispatchRemapTable[Uniform3fvARB_remap_index] -#define _gloffset_Uniform3iARB driDispatchRemapTable[Uniform3iARB_remap_index] -#define _gloffset_Uniform3ivARB driDispatchRemapTable[Uniform3ivARB_remap_index] -#define _gloffset_Uniform4fARB driDispatchRemapTable[Uniform4fARB_remap_index] -#define _gloffset_Uniform4fvARB driDispatchRemapTable[Uniform4fvARB_remap_index] -#define _gloffset_Uniform4iARB driDispatchRemapTable[Uniform4iARB_remap_index] -#define _gloffset_Uniform4ivARB driDispatchRemapTable[Uniform4ivARB_remap_index] -#define _gloffset_UniformMatrix2fvARB driDispatchRemapTable[UniformMatrix2fvARB_remap_index] -#define _gloffset_UniformMatrix3fvARB driDispatchRemapTable[UniformMatrix3fvARB_remap_index] -#define _gloffset_UniformMatrix4fvARB driDispatchRemapTable[UniformMatrix4fvARB_remap_index] -#define _gloffset_UseProgramObjectARB driDispatchRemapTable[UseProgramObjectARB_remap_index] -#define _gloffset_ValidateProgramARB driDispatchRemapTable[ValidateProgramARB_remap_index] -#define _gloffset_BindAttribLocationARB driDispatchRemapTable[BindAttribLocationARB_remap_index] -#define _gloffset_GetActiveAttribARB driDispatchRemapTable[GetActiveAttribARB_remap_index] -#define _gloffset_GetAttribLocationARB driDispatchRemapTable[GetAttribLocationARB_remap_index] -#define _gloffset_DrawBuffersARB driDispatchRemapTable[DrawBuffersARB_remap_index] -#define _gloffset_ClampColorARB driDispatchRemapTable[ClampColorARB_remap_index] -#define _gloffset_DrawArraysInstancedARB driDispatchRemapTable[DrawArraysInstancedARB_remap_index] -#define _gloffset_DrawElementsInstancedARB driDispatchRemapTable[DrawElementsInstancedARB_remap_index] -#define _gloffset_RenderbufferStorageMultisample driDispatchRemapTable[RenderbufferStorageMultisample_remap_index] -#define _gloffset_FramebufferTextureARB driDispatchRemapTable[FramebufferTextureARB_remap_index] -#define _gloffset_FramebufferTextureFaceARB driDispatchRemapTable[FramebufferTextureFaceARB_remap_index] -#define _gloffset_ProgramParameteriARB driDispatchRemapTable[ProgramParameteriARB_remap_index] -#define _gloffset_VertexAttribDivisorARB driDispatchRemapTable[VertexAttribDivisorARB_remap_index] -#define _gloffset_FlushMappedBufferRange driDispatchRemapTable[FlushMappedBufferRange_remap_index] -#define _gloffset_MapBufferRange driDispatchRemapTable[MapBufferRange_remap_index] -#define _gloffset_TexBufferARB driDispatchRemapTable[TexBufferARB_remap_index] -#define _gloffset_BindVertexArray driDispatchRemapTable[BindVertexArray_remap_index] -#define _gloffset_GenVertexArrays driDispatchRemapTable[GenVertexArrays_remap_index] -#define _gloffset_CopyBufferSubData driDispatchRemapTable[CopyBufferSubData_remap_index] -#define _gloffset_ClientWaitSync driDispatchRemapTable[ClientWaitSync_remap_index] -#define _gloffset_DeleteSync driDispatchRemapTable[DeleteSync_remap_index] -#define _gloffset_FenceSync driDispatchRemapTable[FenceSync_remap_index] -#define _gloffset_GetInteger64v driDispatchRemapTable[GetInteger64v_remap_index] -#define _gloffset_GetSynciv driDispatchRemapTable[GetSynciv_remap_index] -#define _gloffset_IsSync driDispatchRemapTable[IsSync_remap_index] -#define _gloffset_WaitSync driDispatchRemapTable[WaitSync_remap_index] -#define _gloffset_DrawElementsBaseVertex driDispatchRemapTable[DrawElementsBaseVertex_remap_index] -#define _gloffset_DrawRangeElementsBaseVertex driDispatchRemapTable[DrawRangeElementsBaseVertex_remap_index] -#define _gloffset_MultiDrawElementsBaseVertex driDispatchRemapTable[MultiDrawElementsBaseVertex_remap_index] -#define _gloffset_BlendEquationSeparateiARB driDispatchRemapTable[BlendEquationSeparateiARB_remap_index] -#define _gloffset_BlendEquationiARB driDispatchRemapTable[BlendEquationiARB_remap_index] -#define _gloffset_BlendFuncSeparateiARB driDispatchRemapTable[BlendFuncSeparateiARB_remap_index] -#define _gloffset_BlendFunciARB driDispatchRemapTable[BlendFunciARB_remap_index] -#define _gloffset_BindSampler driDispatchRemapTable[BindSampler_remap_index] -#define _gloffset_DeleteSamplers driDispatchRemapTable[DeleteSamplers_remap_index] -#define _gloffset_GenSamplers driDispatchRemapTable[GenSamplers_remap_index] -#define _gloffset_GetSamplerParameterIiv driDispatchRemapTable[GetSamplerParameterIiv_remap_index] -#define _gloffset_GetSamplerParameterIuiv driDispatchRemapTable[GetSamplerParameterIuiv_remap_index] -#define _gloffset_GetSamplerParameterfv driDispatchRemapTable[GetSamplerParameterfv_remap_index] -#define _gloffset_GetSamplerParameteriv driDispatchRemapTable[GetSamplerParameteriv_remap_index] -#define _gloffset_IsSampler driDispatchRemapTable[IsSampler_remap_index] -#define _gloffset_SamplerParameterIiv driDispatchRemapTable[SamplerParameterIiv_remap_index] -#define _gloffset_SamplerParameterIuiv driDispatchRemapTable[SamplerParameterIuiv_remap_index] -#define _gloffset_SamplerParameterf driDispatchRemapTable[SamplerParameterf_remap_index] -#define _gloffset_SamplerParameterfv driDispatchRemapTable[SamplerParameterfv_remap_index] -#define _gloffset_SamplerParameteri driDispatchRemapTable[SamplerParameteri_remap_index] -#define _gloffset_SamplerParameteriv driDispatchRemapTable[SamplerParameteriv_remap_index] -#define _gloffset_BindTransformFeedback driDispatchRemapTable[BindTransformFeedback_remap_index] -#define _gloffset_DeleteTransformFeedbacks driDispatchRemapTable[DeleteTransformFeedbacks_remap_index] -#define _gloffset_DrawTransformFeedback driDispatchRemapTable[DrawTransformFeedback_remap_index] -#define _gloffset_GenTransformFeedbacks driDispatchRemapTable[GenTransformFeedbacks_remap_index] -#define _gloffset_IsTransformFeedback driDispatchRemapTable[IsTransformFeedback_remap_index] -#define _gloffset_PauseTransformFeedback driDispatchRemapTable[PauseTransformFeedback_remap_index] -#define _gloffset_ResumeTransformFeedback driDispatchRemapTable[ResumeTransformFeedback_remap_index] -#define _gloffset_ClearDepthf driDispatchRemapTable[ClearDepthf_remap_index] -#define _gloffset_DepthRangef driDispatchRemapTable[DepthRangef_remap_index] -#define _gloffset_GetShaderPrecisionFormat driDispatchRemapTable[GetShaderPrecisionFormat_remap_index] -#define _gloffset_ReleaseShaderCompiler driDispatchRemapTable[ReleaseShaderCompiler_remap_index] -#define _gloffset_ShaderBinary driDispatchRemapTable[ShaderBinary_remap_index] -#define _gloffset_GetGraphicsResetStatusARB driDispatchRemapTable[GetGraphicsResetStatusARB_remap_index] -#define _gloffset_GetnColorTableARB driDispatchRemapTable[GetnColorTableARB_remap_index] -#define _gloffset_GetnCompressedTexImageARB driDispatchRemapTable[GetnCompressedTexImageARB_remap_index] -#define _gloffset_GetnConvolutionFilterARB driDispatchRemapTable[GetnConvolutionFilterARB_remap_index] -#define _gloffset_GetnHistogramARB driDispatchRemapTable[GetnHistogramARB_remap_index] -#define _gloffset_GetnMapdvARB driDispatchRemapTable[GetnMapdvARB_remap_index] -#define _gloffset_GetnMapfvARB driDispatchRemapTable[GetnMapfvARB_remap_index] -#define _gloffset_GetnMapivARB driDispatchRemapTable[GetnMapivARB_remap_index] -#define _gloffset_GetnMinmaxARB driDispatchRemapTable[GetnMinmaxARB_remap_index] -#define _gloffset_GetnPixelMapfvARB driDispatchRemapTable[GetnPixelMapfvARB_remap_index] -#define _gloffset_GetnPixelMapuivARB driDispatchRemapTable[GetnPixelMapuivARB_remap_index] -#define _gloffset_GetnPixelMapusvARB driDispatchRemapTable[GetnPixelMapusvARB_remap_index] -#define _gloffset_GetnPolygonStippleARB driDispatchRemapTable[GetnPolygonStippleARB_remap_index] -#define _gloffset_GetnSeparableFilterARB driDispatchRemapTable[GetnSeparableFilterARB_remap_index] -#define _gloffset_GetnTexImageARB driDispatchRemapTable[GetnTexImageARB_remap_index] -#define _gloffset_GetnUniformdvARB driDispatchRemapTable[GetnUniformdvARB_remap_index] -#define _gloffset_GetnUniformfvARB driDispatchRemapTable[GetnUniformfvARB_remap_index] -#define _gloffset_GetnUniformivARB driDispatchRemapTable[GetnUniformivARB_remap_index] -#define _gloffset_GetnUniformuivARB driDispatchRemapTable[GetnUniformuivARB_remap_index] -#define _gloffset_ReadnPixelsARB driDispatchRemapTable[ReadnPixelsARB_remap_index] -#define _gloffset_PolygonOffsetEXT driDispatchRemapTable[PolygonOffsetEXT_remap_index] -#define _gloffset_GetPixelTexGenParameterfvSGIS driDispatchRemapTable[GetPixelTexGenParameterfvSGIS_remap_index] -#define _gloffset_GetPixelTexGenParameterivSGIS driDispatchRemapTable[GetPixelTexGenParameterivSGIS_remap_index] -#define _gloffset_PixelTexGenParameterfSGIS driDispatchRemapTable[PixelTexGenParameterfSGIS_remap_index] -#define _gloffset_PixelTexGenParameterfvSGIS driDispatchRemapTable[PixelTexGenParameterfvSGIS_remap_index] -#define _gloffset_PixelTexGenParameteriSGIS driDispatchRemapTable[PixelTexGenParameteriSGIS_remap_index] -#define _gloffset_PixelTexGenParameterivSGIS driDispatchRemapTable[PixelTexGenParameterivSGIS_remap_index] -#define _gloffset_SampleMaskSGIS driDispatchRemapTable[SampleMaskSGIS_remap_index] -#define _gloffset_SamplePatternSGIS driDispatchRemapTable[SamplePatternSGIS_remap_index] -#define _gloffset_ColorPointerEXT driDispatchRemapTable[ColorPointerEXT_remap_index] -#define _gloffset_EdgeFlagPointerEXT driDispatchRemapTable[EdgeFlagPointerEXT_remap_index] -#define _gloffset_IndexPointerEXT driDispatchRemapTable[IndexPointerEXT_remap_index] -#define _gloffset_NormalPointerEXT driDispatchRemapTable[NormalPointerEXT_remap_index] -#define _gloffset_TexCoordPointerEXT driDispatchRemapTable[TexCoordPointerEXT_remap_index] -#define _gloffset_VertexPointerEXT driDispatchRemapTable[VertexPointerEXT_remap_index] -#define _gloffset_PointParameterfEXT driDispatchRemapTable[PointParameterfEXT_remap_index] -#define _gloffset_PointParameterfvEXT driDispatchRemapTable[PointParameterfvEXT_remap_index] -#define _gloffset_LockArraysEXT driDispatchRemapTable[LockArraysEXT_remap_index] -#define _gloffset_UnlockArraysEXT driDispatchRemapTable[UnlockArraysEXT_remap_index] -#define _gloffset_SecondaryColor3bEXT driDispatchRemapTable[SecondaryColor3bEXT_remap_index] -#define _gloffset_SecondaryColor3bvEXT driDispatchRemapTable[SecondaryColor3bvEXT_remap_index] -#define _gloffset_SecondaryColor3dEXT driDispatchRemapTable[SecondaryColor3dEXT_remap_index] -#define _gloffset_SecondaryColor3dvEXT driDispatchRemapTable[SecondaryColor3dvEXT_remap_index] -#define _gloffset_SecondaryColor3fEXT driDispatchRemapTable[SecondaryColor3fEXT_remap_index] -#define _gloffset_SecondaryColor3fvEXT driDispatchRemapTable[SecondaryColor3fvEXT_remap_index] -#define _gloffset_SecondaryColor3iEXT driDispatchRemapTable[SecondaryColor3iEXT_remap_index] -#define _gloffset_SecondaryColor3ivEXT driDispatchRemapTable[SecondaryColor3ivEXT_remap_index] -#define _gloffset_SecondaryColor3sEXT driDispatchRemapTable[SecondaryColor3sEXT_remap_index] -#define _gloffset_SecondaryColor3svEXT driDispatchRemapTable[SecondaryColor3svEXT_remap_index] -#define _gloffset_SecondaryColor3ubEXT driDispatchRemapTable[SecondaryColor3ubEXT_remap_index] -#define _gloffset_SecondaryColor3ubvEXT driDispatchRemapTable[SecondaryColor3ubvEXT_remap_index] -#define _gloffset_SecondaryColor3uiEXT driDispatchRemapTable[SecondaryColor3uiEXT_remap_index] -#define _gloffset_SecondaryColor3uivEXT driDispatchRemapTable[SecondaryColor3uivEXT_remap_index] -#define _gloffset_SecondaryColor3usEXT driDispatchRemapTable[SecondaryColor3usEXT_remap_index] -#define _gloffset_SecondaryColor3usvEXT driDispatchRemapTable[SecondaryColor3usvEXT_remap_index] -#define _gloffset_SecondaryColorPointerEXT driDispatchRemapTable[SecondaryColorPointerEXT_remap_index] -#define _gloffset_MultiDrawArraysEXT driDispatchRemapTable[MultiDrawArraysEXT_remap_index] -#define _gloffset_MultiDrawElementsEXT driDispatchRemapTable[MultiDrawElementsEXT_remap_index] -#define _gloffset_FogCoordPointerEXT driDispatchRemapTable[FogCoordPointerEXT_remap_index] -#define _gloffset_FogCoorddEXT driDispatchRemapTable[FogCoorddEXT_remap_index] -#define _gloffset_FogCoorddvEXT driDispatchRemapTable[FogCoorddvEXT_remap_index] -#define _gloffset_FogCoordfEXT driDispatchRemapTable[FogCoordfEXT_remap_index] -#define _gloffset_FogCoordfvEXT driDispatchRemapTable[FogCoordfvEXT_remap_index] -#define _gloffset_PixelTexGenSGIX driDispatchRemapTable[PixelTexGenSGIX_remap_index] -#define _gloffset_BlendFuncSeparateEXT driDispatchRemapTable[BlendFuncSeparateEXT_remap_index] -#define _gloffset_FlushVertexArrayRangeNV driDispatchRemapTable[FlushVertexArrayRangeNV_remap_index] -#define _gloffset_VertexArrayRangeNV driDispatchRemapTable[VertexArrayRangeNV_remap_index] -#define _gloffset_CombinerInputNV driDispatchRemapTable[CombinerInputNV_remap_index] -#define _gloffset_CombinerOutputNV driDispatchRemapTable[CombinerOutputNV_remap_index] -#define _gloffset_CombinerParameterfNV driDispatchRemapTable[CombinerParameterfNV_remap_index] -#define _gloffset_CombinerParameterfvNV driDispatchRemapTable[CombinerParameterfvNV_remap_index] -#define _gloffset_CombinerParameteriNV driDispatchRemapTable[CombinerParameteriNV_remap_index] -#define _gloffset_CombinerParameterivNV driDispatchRemapTable[CombinerParameterivNV_remap_index] -#define _gloffset_FinalCombinerInputNV driDispatchRemapTable[FinalCombinerInputNV_remap_index] -#define _gloffset_GetCombinerInputParameterfvNV driDispatchRemapTable[GetCombinerInputParameterfvNV_remap_index] -#define _gloffset_GetCombinerInputParameterivNV driDispatchRemapTable[GetCombinerInputParameterivNV_remap_index] -#define _gloffset_GetCombinerOutputParameterfvNV driDispatchRemapTable[GetCombinerOutputParameterfvNV_remap_index] -#define _gloffset_GetCombinerOutputParameterivNV driDispatchRemapTable[GetCombinerOutputParameterivNV_remap_index] -#define _gloffset_GetFinalCombinerInputParameterfvNV driDispatchRemapTable[GetFinalCombinerInputParameterfvNV_remap_index] -#define _gloffset_GetFinalCombinerInputParameterivNV driDispatchRemapTable[GetFinalCombinerInputParameterivNV_remap_index] -#define _gloffset_ResizeBuffersMESA driDispatchRemapTable[ResizeBuffersMESA_remap_index] -#define _gloffset_WindowPos2dMESA driDispatchRemapTable[WindowPos2dMESA_remap_index] -#define _gloffset_WindowPos2dvMESA driDispatchRemapTable[WindowPos2dvMESA_remap_index] -#define _gloffset_WindowPos2fMESA driDispatchRemapTable[WindowPos2fMESA_remap_index] -#define _gloffset_WindowPos2fvMESA driDispatchRemapTable[WindowPos2fvMESA_remap_index] -#define _gloffset_WindowPos2iMESA driDispatchRemapTable[WindowPos2iMESA_remap_index] -#define _gloffset_WindowPos2ivMESA driDispatchRemapTable[WindowPos2ivMESA_remap_index] -#define _gloffset_WindowPos2sMESA driDispatchRemapTable[WindowPos2sMESA_remap_index] -#define _gloffset_WindowPos2svMESA driDispatchRemapTable[WindowPos2svMESA_remap_index] -#define _gloffset_WindowPos3dMESA driDispatchRemapTable[WindowPos3dMESA_remap_index] -#define _gloffset_WindowPos3dvMESA driDispatchRemapTable[WindowPos3dvMESA_remap_index] -#define _gloffset_WindowPos3fMESA driDispatchRemapTable[WindowPos3fMESA_remap_index] -#define _gloffset_WindowPos3fvMESA driDispatchRemapTable[WindowPos3fvMESA_remap_index] -#define _gloffset_WindowPos3iMESA driDispatchRemapTable[WindowPos3iMESA_remap_index] -#define _gloffset_WindowPos3ivMESA driDispatchRemapTable[WindowPos3ivMESA_remap_index] -#define _gloffset_WindowPos3sMESA driDispatchRemapTable[WindowPos3sMESA_remap_index] -#define _gloffset_WindowPos3svMESA driDispatchRemapTable[WindowPos3svMESA_remap_index] -#define _gloffset_WindowPos4dMESA driDispatchRemapTable[WindowPos4dMESA_remap_index] -#define _gloffset_WindowPos4dvMESA driDispatchRemapTable[WindowPos4dvMESA_remap_index] -#define _gloffset_WindowPos4fMESA driDispatchRemapTable[WindowPos4fMESA_remap_index] -#define _gloffset_WindowPos4fvMESA driDispatchRemapTable[WindowPos4fvMESA_remap_index] -#define _gloffset_WindowPos4iMESA driDispatchRemapTable[WindowPos4iMESA_remap_index] -#define _gloffset_WindowPos4ivMESA driDispatchRemapTable[WindowPos4ivMESA_remap_index] -#define _gloffset_WindowPos4sMESA driDispatchRemapTable[WindowPos4sMESA_remap_index] -#define _gloffset_WindowPos4svMESA driDispatchRemapTable[WindowPos4svMESA_remap_index] -#define _gloffset_MultiModeDrawArraysIBM driDispatchRemapTable[MultiModeDrawArraysIBM_remap_index] -#define _gloffset_MultiModeDrawElementsIBM driDispatchRemapTable[MultiModeDrawElementsIBM_remap_index] -#define _gloffset_DeleteFencesNV driDispatchRemapTable[DeleteFencesNV_remap_index] -#define _gloffset_FinishFenceNV driDispatchRemapTable[FinishFenceNV_remap_index] -#define _gloffset_GenFencesNV driDispatchRemapTable[GenFencesNV_remap_index] -#define _gloffset_GetFenceivNV driDispatchRemapTable[GetFenceivNV_remap_index] -#define _gloffset_IsFenceNV driDispatchRemapTable[IsFenceNV_remap_index] -#define _gloffset_SetFenceNV driDispatchRemapTable[SetFenceNV_remap_index] -#define _gloffset_TestFenceNV driDispatchRemapTable[TestFenceNV_remap_index] -#define _gloffset_AreProgramsResidentNV driDispatchRemapTable[AreProgramsResidentNV_remap_index] -#define _gloffset_BindProgramNV driDispatchRemapTable[BindProgramNV_remap_index] -#define _gloffset_DeleteProgramsNV driDispatchRemapTable[DeleteProgramsNV_remap_index] -#define _gloffset_ExecuteProgramNV driDispatchRemapTable[ExecuteProgramNV_remap_index] -#define _gloffset_GenProgramsNV driDispatchRemapTable[GenProgramsNV_remap_index] -#define _gloffset_GetProgramParameterdvNV driDispatchRemapTable[GetProgramParameterdvNV_remap_index] -#define _gloffset_GetProgramParameterfvNV driDispatchRemapTable[GetProgramParameterfvNV_remap_index] -#define _gloffset_GetProgramStringNV driDispatchRemapTable[GetProgramStringNV_remap_index] -#define _gloffset_GetProgramivNV driDispatchRemapTable[GetProgramivNV_remap_index] -#define _gloffset_GetTrackMatrixivNV driDispatchRemapTable[GetTrackMatrixivNV_remap_index] -#define _gloffset_GetVertexAttribPointervNV driDispatchRemapTable[GetVertexAttribPointervNV_remap_index] -#define _gloffset_GetVertexAttribdvNV driDispatchRemapTable[GetVertexAttribdvNV_remap_index] -#define _gloffset_GetVertexAttribfvNV driDispatchRemapTable[GetVertexAttribfvNV_remap_index] -#define _gloffset_GetVertexAttribivNV driDispatchRemapTable[GetVertexAttribivNV_remap_index] -#define _gloffset_IsProgramNV driDispatchRemapTable[IsProgramNV_remap_index] -#define _gloffset_LoadProgramNV driDispatchRemapTable[LoadProgramNV_remap_index] -#define _gloffset_ProgramParameters4dvNV driDispatchRemapTable[ProgramParameters4dvNV_remap_index] -#define _gloffset_ProgramParameters4fvNV driDispatchRemapTable[ProgramParameters4fvNV_remap_index] -#define _gloffset_RequestResidentProgramsNV driDispatchRemapTable[RequestResidentProgramsNV_remap_index] -#define _gloffset_TrackMatrixNV driDispatchRemapTable[TrackMatrixNV_remap_index] -#define _gloffset_VertexAttrib1dNV driDispatchRemapTable[VertexAttrib1dNV_remap_index] -#define _gloffset_VertexAttrib1dvNV driDispatchRemapTable[VertexAttrib1dvNV_remap_index] -#define _gloffset_VertexAttrib1fNV driDispatchRemapTable[VertexAttrib1fNV_remap_index] -#define _gloffset_VertexAttrib1fvNV driDispatchRemapTable[VertexAttrib1fvNV_remap_index] -#define _gloffset_VertexAttrib1sNV driDispatchRemapTable[VertexAttrib1sNV_remap_index] -#define _gloffset_VertexAttrib1svNV driDispatchRemapTable[VertexAttrib1svNV_remap_index] -#define _gloffset_VertexAttrib2dNV driDispatchRemapTable[VertexAttrib2dNV_remap_index] -#define _gloffset_VertexAttrib2dvNV driDispatchRemapTable[VertexAttrib2dvNV_remap_index] -#define _gloffset_VertexAttrib2fNV driDispatchRemapTable[VertexAttrib2fNV_remap_index] -#define _gloffset_VertexAttrib2fvNV driDispatchRemapTable[VertexAttrib2fvNV_remap_index] -#define _gloffset_VertexAttrib2sNV driDispatchRemapTable[VertexAttrib2sNV_remap_index] -#define _gloffset_VertexAttrib2svNV driDispatchRemapTable[VertexAttrib2svNV_remap_index] -#define _gloffset_VertexAttrib3dNV driDispatchRemapTable[VertexAttrib3dNV_remap_index] -#define _gloffset_VertexAttrib3dvNV driDispatchRemapTable[VertexAttrib3dvNV_remap_index] -#define _gloffset_VertexAttrib3fNV driDispatchRemapTable[VertexAttrib3fNV_remap_index] -#define _gloffset_VertexAttrib3fvNV driDispatchRemapTable[VertexAttrib3fvNV_remap_index] -#define _gloffset_VertexAttrib3sNV driDispatchRemapTable[VertexAttrib3sNV_remap_index] -#define _gloffset_VertexAttrib3svNV driDispatchRemapTable[VertexAttrib3svNV_remap_index] -#define _gloffset_VertexAttrib4dNV driDispatchRemapTable[VertexAttrib4dNV_remap_index] -#define _gloffset_VertexAttrib4dvNV driDispatchRemapTable[VertexAttrib4dvNV_remap_index] -#define _gloffset_VertexAttrib4fNV driDispatchRemapTable[VertexAttrib4fNV_remap_index] -#define _gloffset_VertexAttrib4fvNV driDispatchRemapTable[VertexAttrib4fvNV_remap_index] -#define _gloffset_VertexAttrib4sNV driDispatchRemapTable[VertexAttrib4sNV_remap_index] -#define _gloffset_VertexAttrib4svNV driDispatchRemapTable[VertexAttrib4svNV_remap_index] -#define _gloffset_VertexAttrib4ubNV driDispatchRemapTable[VertexAttrib4ubNV_remap_index] -#define _gloffset_VertexAttrib4ubvNV driDispatchRemapTable[VertexAttrib4ubvNV_remap_index] -#define _gloffset_VertexAttribPointerNV driDispatchRemapTable[VertexAttribPointerNV_remap_index] -#define _gloffset_VertexAttribs1dvNV driDispatchRemapTable[VertexAttribs1dvNV_remap_index] -#define _gloffset_VertexAttribs1fvNV driDispatchRemapTable[VertexAttribs1fvNV_remap_index] -#define _gloffset_VertexAttribs1svNV driDispatchRemapTable[VertexAttribs1svNV_remap_index] -#define _gloffset_VertexAttribs2dvNV driDispatchRemapTable[VertexAttribs2dvNV_remap_index] -#define _gloffset_VertexAttribs2fvNV driDispatchRemapTable[VertexAttribs2fvNV_remap_index] -#define _gloffset_VertexAttribs2svNV driDispatchRemapTable[VertexAttribs2svNV_remap_index] -#define _gloffset_VertexAttribs3dvNV driDispatchRemapTable[VertexAttribs3dvNV_remap_index] -#define _gloffset_VertexAttribs3fvNV driDispatchRemapTable[VertexAttribs3fvNV_remap_index] -#define _gloffset_VertexAttribs3svNV driDispatchRemapTable[VertexAttribs3svNV_remap_index] -#define _gloffset_VertexAttribs4dvNV driDispatchRemapTable[VertexAttribs4dvNV_remap_index] -#define _gloffset_VertexAttribs4fvNV driDispatchRemapTable[VertexAttribs4fvNV_remap_index] -#define _gloffset_VertexAttribs4svNV driDispatchRemapTable[VertexAttribs4svNV_remap_index] -#define _gloffset_VertexAttribs4ubvNV driDispatchRemapTable[VertexAttribs4ubvNV_remap_index] -#define _gloffset_GetTexBumpParameterfvATI driDispatchRemapTable[GetTexBumpParameterfvATI_remap_index] -#define _gloffset_GetTexBumpParameterivATI driDispatchRemapTable[GetTexBumpParameterivATI_remap_index] -#define _gloffset_TexBumpParameterfvATI driDispatchRemapTable[TexBumpParameterfvATI_remap_index] -#define _gloffset_TexBumpParameterivATI driDispatchRemapTable[TexBumpParameterivATI_remap_index] -#define _gloffset_AlphaFragmentOp1ATI driDispatchRemapTable[AlphaFragmentOp1ATI_remap_index] -#define _gloffset_AlphaFragmentOp2ATI driDispatchRemapTable[AlphaFragmentOp2ATI_remap_index] -#define _gloffset_AlphaFragmentOp3ATI driDispatchRemapTable[AlphaFragmentOp3ATI_remap_index] -#define _gloffset_BeginFragmentShaderATI driDispatchRemapTable[BeginFragmentShaderATI_remap_index] -#define _gloffset_BindFragmentShaderATI driDispatchRemapTable[BindFragmentShaderATI_remap_index] -#define _gloffset_ColorFragmentOp1ATI driDispatchRemapTable[ColorFragmentOp1ATI_remap_index] -#define _gloffset_ColorFragmentOp2ATI driDispatchRemapTable[ColorFragmentOp2ATI_remap_index] -#define _gloffset_ColorFragmentOp3ATI driDispatchRemapTable[ColorFragmentOp3ATI_remap_index] -#define _gloffset_DeleteFragmentShaderATI driDispatchRemapTable[DeleteFragmentShaderATI_remap_index] -#define _gloffset_EndFragmentShaderATI driDispatchRemapTable[EndFragmentShaderATI_remap_index] -#define _gloffset_GenFragmentShadersATI driDispatchRemapTable[GenFragmentShadersATI_remap_index] -#define _gloffset_PassTexCoordATI driDispatchRemapTable[PassTexCoordATI_remap_index] -#define _gloffset_SampleMapATI driDispatchRemapTable[SampleMapATI_remap_index] -#define _gloffset_SetFragmentShaderConstantATI driDispatchRemapTable[SetFragmentShaderConstantATI_remap_index] -#define _gloffset_PointParameteriNV driDispatchRemapTable[PointParameteriNV_remap_index] -#define _gloffset_PointParameterivNV driDispatchRemapTable[PointParameterivNV_remap_index] -#define _gloffset_ActiveStencilFaceEXT driDispatchRemapTable[ActiveStencilFaceEXT_remap_index] -#define _gloffset_BindVertexArrayAPPLE driDispatchRemapTable[BindVertexArrayAPPLE_remap_index] -#define _gloffset_DeleteVertexArraysAPPLE driDispatchRemapTable[DeleteVertexArraysAPPLE_remap_index] -#define _gloffset_GenVertexArraysAPPLE driDispatchRemapTable[GenVertexArraysAPPLE_remap_index] -#define _gloffset_IsVertexArrayAPPLE driDispatchRemapTable[IsVertexArrayAPPLE_remap_index] -#define _gloffset_GetProgramNamedParameterdvNV driDispatchRemapTable[GetProgramNamedParameterdvNV_remap_index] -#define _gloffset_GetProgramNamedParameterfvNV driDispatchRemapTable[GetProgramNamedParameterfvNV_remap_index] -#define _gloffset_ProgramNamedParameter4dNV driDispatchRemapTable[ProgramNamedParameter4dNV_remap_index] -#define _gloffset_ProgramNamedParameter4dvNV driDispatchRemapTable[ProgramNamedParameter4dvNV_remap_index] -#define _gloffset_ProgramNamedParameter4fNV driDispatchRemapTable[ProgramNamedParameter4fNV_remap_index] -#define _gloffset_ProgramNamedParameter4fvNV driDispatchRemapTable[ProgramNamedParameter4fvNV_remap_index] -#define _gloffset_PrimitiveRestartIndexNV driDispatchRemapTable[PrimitiveRestartIndexNV_remap_index] -#define _gloffset_PrimitiveRestartNV driDispatchRemapTable[PrimitiveRestartNV_remap_index] -#define _gloffset_DepthBoundsEXT driDispatchRemapTable[DepthBoundsEXT_remap_index] -#define _gloffset_BlendEquationSeparateEXT driDispatchRemapTable[BlendEquationSeparateEXT_remap_index] -#define _gloffset_BindFramebufferEXT driDispatchRemapTable[BindFramebufferEXT_remap_index] -#define _gloffset_BindRenderbufferEXT driDispatchRemapTable[BindRenderbufferEXT_remap_index] -#define _gloffset_CheckFramebufferStatusEXT driDispatchRemapTable[CheckFramebufferStatusEXT_remap_index] -#define _gloffset_DeleteFramebuffersEXT driDispatchRemapTable[DeleteFramebuffersEXT_remap_index] -#define _gloffset_DeleteRenderbuffersEXT driDispatchRemapTable[DeleteRenderbuffersEXT_remap_index] -#define _gloffset_FramebufferRenderbufferEXT driDispatchRemapTable[FramebufferRenderbufferEXT_remap_index] -#define _gloffset_FramebufferTexture1DEXT driDispatchRemapTable[FramebufferTexture1DEXT_remap_index] -#define _gloffset_FramebufferTexture2DEXT driDispatchRemapTable[FramebufferTexture2DEXT_remap_index] -#define _gloffset_FramebufferTexture3DEXT driDispatchRemapTable[FramebufferTexture3DEXT_remap_index] -#define _gloffset_GenFramebuffersEXT driDispatchRemapTable[GenFramebuffersEXT_remap_index] -#define _gloffset_GenRenderbuffersEXT driDispatchRemapTable[GenRenderbuffersEXT_remap_index] -#define _gloffset_GenerateMipmapEXT driDispatchRemapTable[GenerateMipmapEXT_remap_index] -#define _gloffset_GetFramebufferAttachmentParameterivEXT driDispatchRemapTable[GetFramebufferAttachmentParameterivEXT_remap_index] -#define _gloffset_GetRenderbufferParameterivEXT driDispatchRemapTable[GetRenderbufferParameterivEXT_remap_index] -#define _gloffset_IsFramebufferEXT driDispatchRemapTable[IsFramebufferEXT_remap_index] -#define _gloffset_IsRenderbufferEXT driDispatchRemapTable[IsRenderbufferEXT_remap_index] -#define _gloffset_RenderbufferStorageEXT driDispatchRemapTable[RenderbufferStorageEXT_remap_index] -#define _gloffset_BlitFramebufferEXT driDispatchRemapTable[BlitFramebufferEXT_remap_index] -#define _gloffset_BufferParameteriAPPLE driDispatchRemapTable[BufferParameteriAPPLE_remap_index] -#define _gloffset_FlushMappedBufferRangeAPPLE driDispatchRemapTable[FlushMappedBufferRangeAPPLE_remap_index] -#define _gloffset_BindFragDataLocationEXT driDispatchRemapTable[BindFragDataLocationEXT_remap_index] -#define _gloffset_GetFragDataLocationEXT driDispatchRemapTable[GetFragDataLocationEXT_remap_index] -#define _gloffset_GetUniformuivEXT driDispatchRemapTable[GetUniformuivEXT_remap_index] -#define _gloffset_GetVertexAttribIivEXT driDispatchRemapTable[GetVertexAttribIivEXT_remap_index] -#define _gloffset_GetVertexAttribIuivEXT driDispatchRemapTable[GetVertexAttribIuivEXT_remap_index] -#define _gloffset_Uniform1uiEXT driDispatchRemapTable[Uniform1uiEXT_remap_index] -#define _gloffset_Uniform1uivEXT driDispatchRemapTable[Uniform1uivEXT_remap_index] -#define _gloffset_Uniform2uiEXT driDispatchRemapTable[Uniform2uiEXT_remap_index] -#define _gloffset_Uniform2uivEXT driDispatchRemapTable[Uniform2uivEXT_remap_index] -#define _gloffset_Uniform3uiEXT driDispatchRemapTable[Uniform3uiEXT_remap_index] -#define _gloffset_Uniform3uivEXT driDispatchRemapTable[Uniform3uivEXT_remap_index] -#define _gloffset_Uniform4uiEXT driDispatchRemapTable[Uniform4uiEXT_remap_index] -#define _gloffset_Uniform4uivEXT driDispatchRemapTable[Uniform4uivEXT_remap_index] -#define _gloffset_VertexAttribI1iEXT driDispatchRemapTable[VertexAttribI1iEXT_remap_index] -#define _gloffset_VertexAttribI1ivEXT driDispatchRemapTable[VertexAttribI1ivEXT_remap_index] -#define _gloffset_VertexAttribI1uiEXT driDispatchRemapTable[VertexAttribI1uiEXT_remap_index] -#define _gloffset_VertexAttribI1uivEXT driDispatchRemapTable[VertexAttribI1uivEXT_remap_index] -#define _gloffset_VertexAttribI2iEXT driDispatchRemapTable[VertexAttribI2iEXT_remap_index] -#define _gloffset_VertexAttribI2ivEXT driDispatchRemapTable[VertexAttribI2ivEXT_remap_index] -#define _gloffset_VertexAttribI2uiEXT driDispatchRemapTable[VertexAttribI2uiEXT_remap_index] -#define _gloffset_VertexAttribI2uivEXT driDispatchRemapTable[VertexAttribI2uivEXT_remap_index] -#define _gloffset_VertexAttribI3iEXT driDispatchRemapTable[VertexAttribI3iEXT_remap_index] -#define _gloffset_VertexAttribI3ivEXT driDispatchRemapTable[VertexAttribI3ivEXT_remap_index] -#define _gloffset_VertexAttribI3uiEXT driDispatchRemapTable[VertexAttribI3uiEXT_remap_index] -#define _gloffset_VertexAttribI3uivEXT driDispatchRemapTable[VertexAttribI3uivEXT_remap_index] -#define _gloffset_VertexAttribI4bvEXT driDispatchRemapTable[VertexAttribI4bvEXT_remap_index] -#define _gloffset_VertexAttribI4iEXT driDispatchRemapTable[VertexAttribI4iEXT_remap_index] -#define _gloffset_VertexAttribI4ivEXT driDispatchRemapTable[VertexAttribI4ivEXT_remap_index] -#define _gloffset_VertexAttribI4svEXT driDispatchRemapTable[VertexAttribI4svEXT_remap_index] -#define _gloffset_VertexAttribI4ubvEXT driDispatchRemapTable[VertexAttribI4ubvEXT_remap_index] -#define _gloffset_VertexAttribI4uiEXT driDispatchRemapTable[VertexAttribI4uiEXT_remap_index] -#define _gloffset_VertexAttribI4uivEXT driDispatchRemapTable[VertexAttribI4uivEXT_remap_index] -#define _gloffset_VertexAttribI4usvEXT driDispatchRemapTable[VertexAttribI4usvEXT_remap_index] -#define _gloffset_VertexAttribIPointerEXT driDispatchRemapTable[VertexAttribIPointerEXT_remap_index] -#define _gloffset_FramebufferTextureLayerEXT driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index] -#define _gloffset_ColorMaskIndexedEXT driDispatchRemapTable[ColorMaskIndexedEXT_remap_index] -#define _gloffset_DisableIndexedEXT driDispatchRemapTable[DisableIndexedEXT_remap_index] -#define _gloffset_EnableIndexedEXT driDispatchRemapTable[EnableIndexedEXT_remap_index] -#define _gloffset_GetBooleanIndexedvEXT driDispatchRemapTable[GetBooleanIndexedvEXT_remap_index] -#define _gloffset_GetIntegerIndexedvEXT driDispatchRemapTable[GetIntegerIndexedvEXT_remap_index] -#define _gloffset_IsEnabledIndexedEXT driDispatchRemapTable[IsEnabledIndexedEXT_remap_index] -#define _gloffset_ClearColorIiEXT driDispatchRemapTable[ClearColorIiEXT_remap_index] -#define _gloffset_ClearColorIuiEXT driDispatchRemapTable[ClearColorIuiEXT_remap_index] -#define _gloffset_GetTexParameterIivEXT driDispatchRemapTable[GetTexParameterIivEXT_remap_index] -#define _gloffset_GetTexParameterIuivEXT driDispatchRemapTable[GetTexParameterIuivEXT_remap_index] -#define _gloffset_TexParameterIivEXT driDispatchRemapTable[TexParameterIivEXT_remap_index] -#define _gloffset_TexParameterIuivEXT driDispatchRemapTable[TexParameterIuivEXT_remap_index] -#define _gloffset_BeginConditionalRenderNV driDispatchRemapTable[BeginConditionalRenderNV_remap_index] -#define _gloffset_EndConditionalRenderNV driDispatchRemapTable[EndConditionalRenderNV_remap_index] -#define _gloffset_BeginTransformFeedbackEXT driDispatchRemapTable[BeginTransformFeedbackEXT_remap_index] -#define _gloffset_BindBufferBaseEXT driDispatchRemapTable[BindBufferBaseEXT_remap_index] -#define _gloffset_BindBufferOffsetEXT driDispatchRemapTable[BindBufferOffsetEXT_remap_index] -#define _gloffset_BindBufferRangeEXT driDispatchRemapTable[BindBufferRangeEXT_remap_index] -#define _gloffset_EndTransformFeedbackEXT driDispatchRemapTable[EndTransformFeedbackEXT_remap_index] -#define _gloffset_GetTransformFeedbackVaryingEXT driDispatchRemapTable[GetTransformFeedbackVaryingEXT_remap_index] -#define _gloffset_TransformFeedbackVaryingsEXT driDispatchRemapTable[TransformFeedbackVaryingsEXT_remap_index] -#define _gloffset_ProvokingVertexEXT driDispatchRemapTable[ProvokingVertexEXT_remap_index] -#define _gloffset_GetTexParameterPointervAPPLE driDispatchRemapTable[GetTexParameterPointervAPPLE_remap_index] -#define _gloffset_TextureRangeAPPLE driDispatchRemapTable[TextureRangeAPPLE_remap_index] -#define _gloffset_GetObjectParameterivAPPLE driDispatchRemapTable[GetObjectParameterivAPPLE_remap_index] -#define _gloffset_ObjectPurgeableAPPLE driDispatchRemapTable[ObjectPurgeableAPPLE_remap_index] -#define _gloffset_ObjectUnpurgeableAPPLE driDispatchRemapTable[ObjectUnpurgeableAPPLE_remap_index] -#define _gloffset_ActiveProgramEXT driDispatchRemapTable[ActiveProgramEXT_remap_index] -#define _gloffset_CreateShaderProgramEXT driDispatchRemapTable[CreateShaderProgramEXT_remap_index] -#define _gloffset_UseShaderProgramEXT driDispatchRemapTable[UseShaderProgramEXT_remap_index] -#define _gloffset_TextureBarrierNV driDispatchRemapTable[TextureBarrierNV_remap_index] -#define _gloffset_StencilFuncSeparateATI driDispatchRemapTable[StencilFuncSeparateATI_remap_index] -#define _gloffset_ProgramEnvParameters4fvEXT driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index] -#define _gloffset_ProgramLocalParameters4fvEXT driDispatchRemapTable[ProgramLocalParameters4fvEXT_remap_index] -#define _gloffset_GetQueryObjecti64vEXT driDispatchRemapTable[GetQueryObjecti64vEXT_remap_index] -#define _gloffset_GetQueryObjectui64vEXT driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index] -#define _gloffset_EGLImageTargetRenderbufferStorageOES driDispatchRemapTable[EGLImageTargetRenderbufferStorageOES_remap_index] -#define _gloffset_EGLImageTargetTexture2DOES driDispatchRemapTable[EGLImageTargetTexture2DOES_remap_index] - -#endif /* _GLAPI_USE_REMAP_TABLE */ - -#define CALL_NewList(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_NewList, parameters) -#define GET_NewList(disp) GET_by_offset(disp, _gloffset_NewList) -#define SET_NewList(disp, fn) SET_by_offset(disp, _gloffset_NewList, fn) -#define CALL_EndList(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndList, parameters) -#define GET_EndList(disp) GET_by_offset(disp, _gloffset_EndList) -#define SET_EndList(disp, fn) SET_by_offset(disp, _gloffset_EndList, fn) -#define CALL_CallList(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_CallList, parameters) -#define GET_CallList(disp) GET_by_offset(disp, _gloffset_CallList) -#define SET_CallList(disp, fn) SET_by_offset(disp, _gloffset_CallList, fn) -#define CALL_CallLists(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLenum, const GLvoid *)), _gloffset_CallLists, parameters) -#define GET_CallLists(disp) GET_by_offset(disp, _gloffset_CallLists) -#define SET_CallLists(disp, fn) SET_by_offset(disp, _gloffset_CallLists, fn) -#define CALL_DeleteLists(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei)), _gloffset_DeleteLists, parameters) -#define GET_DeleteLists(disp) GET_by_offset(disp, _gloffset_DeleteLists) -#define SET_DeleteLists(disp, fn) SET_by_offset(disp, _gloffset_DeleteLists, fn) -#define CALL_GenLists(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLsizei)), _gloffset_GenLists, parameters) -#define GET_GenLists(disp) GET_by_offset(disp, _gloffset_GenLists) -#define SET_GenLists(disp, fn) SET_by_offset(disp, _gloffset_GenLists, fn) -#define CALL_ListBase(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_ListBase, parameters) -#define GET_ListBase(disp) GET_by_offset(disp, _gloffset_ListBase) -#define SET_ListBase(disp, fn) SET_by_offset(disp, _gloffset_ListBase, fn) -#define CALL_Begin(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_Begin, parameters) -#define GET_Begin(disp) GET_by_offset(disp, _gloffset_Begin) -#define SET_Begin(disp, fn) SET_by_offset(disp, _gloffset_Begin, fn) -#define CALL_Bitmap(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLsizei, GLfloat, GLfloat, GLfloat, GLfloat, const GLubyte *)), _gloffset_Bitmap, parameters) -#define GET_Bitmap(disp) GET_by_offset(disp, _gloffset_Bitmap) -#define SET_Bitmap(disp, fn) SET_by_offset(disp, _gloffset_Bitmap, fn) -#define CALL_Color3b(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte)), _gloffset_Color3b, parameters) -#define GET_Color3b(disp) GET_by_offset(disp, _gloffset_Color3b) -#define SET_Color3b(disp, fn) SET_by_offset(disp, _gloffset_Color3b, fn) -#define CALL_Color3bv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_Color3bv, parameters) -#define GET_Color3bv(disp) GET_by_offset(disp, _gloffset_Color3bv) -#define SET_Color3bv(disp, fn) SET_by_offset(disp, _gloffset_Color3bv, fn) -#define CALL_Color3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Color3d, parameters) -#define GET_Color3d(disp) GET_by_offset(disp, _gloffset_Color3d) -#define SET_Color3d(disp, fn) SET_by_offset(disp, _gloffset_Color3d, fn) -#define CALL_Color3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Color3dv, parameters) -#define GET_Color3dv(disp) GET_by_offset(disp, _gloffset_Color3dv) -#define SET_Color3dv(disp, fn) SET_by_offset(disp, _gloffset_Color3dv, fn) -#define CALL_Color3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Color3f, parameters) -#define GET_Color3f(disp) GET_by_offset(disp, _gloffset_Color3f) -#define SET_Color3f(disp, fn) SET_by_offset(disp, _gloffset_Color3f, fn) -#define CALL_Color3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Color3fv, parameters) -#define GET_Color3fv(disp) GET_by_offset(disp, _gloffset_Color3fv) -#define SET_Color3fv(disp, fn) SET_by_offset(disp, _gloffset_Color3fv, fn) -#define CALL_Color3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Color3i, parameters) -#define GET_Color3i(disp) GET_by_offset(disp, _gloffset_Color3i) -#define SET_Color3i(disp, fn) SET_by_offset(disp, _gloffset_Color3i, fn) -#define CALL_Color3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Color3iv, parameters) -#define GET_Color3iv(disp) GET_by_offset(disp, _gloffset_Color3iv) -#define SET_Color3iv(disp, fn) SET_by_offset(disp, _gloffset_Color3iv, fn) -#define CALL_Color3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_Color3s, parameters) -#define GET_Color3s(disp) GET_by_offset(disp, _gloffset_Color3s) -#define SET_Color3s(disp, fn) SET_by_offset(disp, _gloffset_Color3s, fn) -#define CALL_Color3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Color3sv, parameters) -#define GET_Color3sv(disp) GET_by_offset(disp, _gloffset_Color3sv) -#define SET_Color3sv(disp, fn) SET_by_offset(disp, _gloffset_Color3sv, fn) -#define CALL_Color3ub(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte, GLubyte, GLubyte)), _gloffset_Color3ub, parameters) -#define GET_Color3ub(disp) GET_by_offset(disp, _gloffset_Color3ub) -#define SET_Color3ub(disp, fn) SET_by_offset(disp, _gloffset_Color3ub, fn) -#define CALL_Color3ubv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_Color3ubv, parameters) -#define GET_Color3ubv(disp) GET_by_offset(disp, _gloffset_Color3ubv) -#define SET_Color3ubv(disp, fn) SET_by_offset(disp, _gloffset_Color3ubv, fn) -#define CALL_Color3ui(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint)), _gloffset_Color3ui, parameters) -#define GET_Color3ui(disp) GET_by_offset(disp, _gloffset_Color3ui) -#define SET_Color3ui(disp, fn) SET_by_offset(disp, _gloffset_Color3ui, fn) -#define CALL_Color3uiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLuint *)), _gloffset_Color3uiv, parameters) -#define GET_Color3uiv(disp) GET_by_offset(disp, _gloffset_Color3uiv) -#define SET_Color3uiv(disp, fn) SET_by_offset(disp, _gloffset_Color3uiv, fn) -#define CALL_Color3us(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLushort, GLushort, GLushort)), _gloffset_Color3us, parameters) -#define GET_Color3us(disp) GET_by_offset(disp, _gloffset_Color3us) -#define SET_Color3us(disp, fn) SET_by_offset(disp, _gloffset_Color3us, fn) -#define CALL_Color3usv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLushort *)), _gloffset_Color3usv, parameters) -#define GET_Color3usv(disp) GET_by_offset(disp, _gloffset_Color3usv) -#define SET_Color3usv(disp, fn) SET_by_offset(disp, _gloffset_Color3usv, fn) -#define CALL_Color4b(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte, GLbyte)), _gloffset_Color4b, parameters) -#define GET_Color4b(disp) GET_by_offset(disp, _gloffset_Color4b) -#define SET_Color4b(disp, fn) SET_by_offset(disp, _gloffset_Color4b, fn) -#define CALL_Color4bv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_Color4bv, parameters) -#define GET_Color4bv(disp) GET_by_offset(disp, _gloffset_Color4bv) -#define SET_Color4bv(disp, fn) SET_by_offset(disp, _gloffset_Color4bv, fn) -#define CALL_Color4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Color4d, parameters) -#define GET_Color4d(disp) GET_by_offset(disp, _gloffset_Color4d) -#define SET_Color4d(disp, fn) SET_by_offset(disp, _gloffset_Color4d, fn) -#define CALL_Color4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Color4dv, parameters) -#define GET_Color4dv(disp) GET_by_offset(disp, _gloffset_Color4dv) -#define SET_Color4dv(disp, fn) SET_by_offset(disp, _gloffset_Color4dv, fn) -#define CALL_Color4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Color4f, parameters) -#define GET_Color4f(disp) GET_by_offset(disp, _gloffset_Color4f) -#define SET_Color4f(disp, fn) SET_by_offset(disp, _gloffset_Color4f, fn) -#define CALL_Color4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Color4fv, parameters) -#define GET_Color4fv(disp) GET_by_offset(disp, _gloffset_Color4fv) -#define SET_Color4fv(disp, fn) SET_by_offset(disp, _gloffset_Color4fv, fn) -#define CALL_Color4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Color4i, parameters) -#define GET_Color4i(disp) GET_by_offset(disp, _gloffset_Color4i) -#define SET_Color4i(disp, fn) SET_by_offset(disp, _gloffset_Color4i, fn) -#define CALL_Color4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Color4iv, parameters) -#define GET_Color4iv(disp) GET_by_offset(disp, _gloffset_Color4iv) -#define SET_Color4iv(disp, fn) SET_by_offset(disp, _gloffset_Color4iv, fn) -#define CALL_Color4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_Color4s, parameters) -#define GET_Color4s(disp) GET_by_offset(disp, _gloffset_Color4s) -#define SET_Color4s(disp, fn) SET_by_offset(disp, _gloffset_Color4s, fn) -#define CALL_Color4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Color4sv, parameters) -#define GET_Color4sv(disp) GET_by_offset(disp, _gloffset_Color4sv) -#define SET_Color4sv(disp, fn) SET_by_offset(disp, _gloffset_Color4sv, fn) -#define CALL_Color4ub(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte, GLubyte, GLubyte, GLubyte)), _gloffset_Color4ub, parameters) -#define GET_Color4ub(disp) GET_by_offset(disp, _gloffset_Color4ub) -#define SET_Color4ub(disp, fn) SET_by_offset(disp, _gloffset_Color4ub, fn) -#define CALL_Color4ubv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_Color4ubv, parameters) -#define GET_Color4ubv(disp) GET_by_offset(disp, _gloffset_Color4ubv) -#define SET_Color4ubv(disp, fn) SET_by_offset(disp, _gloffset_Color4ubv, fn) -#define CALL_Color4ui(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint)), _gloffset_Color4ui, parameters) -#define GET_Color4ui(disp) GET_by_offset(disp, _gloffset_Color4ui) -#define SET_Color4ui(disp, fn) SET_by_offset(disp, _gloffset_Color4ui, fn) -#define CALL_Color4uiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLuint *)), _gloffset_Color4uiv, parameters) -#define GET_Color4uiv(disp) GET_by_offset(disp, _gloffset_Color4uiv) -#define SET_Color4uiv(disp, fn) SET_by_offset(disp, _gloffset_Color4uiv, fn) -#define CALL_Color4us(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLushort, GLushort, GLushort, GLushort)), _gloffset_Color4us, parameters) -#define GET_Color4us(disp) GET_by_offset(disp, _gloffset_Color4us) -#define SET_Color4us(disp, fn) SET_by_offset(disp, _gloffset_Color4us, fn) -#define CALL_Color4usv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLushort *)), _gloffset_Color4usv, parameters) -#define GET_Color4usv(disp) GET_by_offset(disp, _gloffset_Color4usv) -#define SET_Color4usv(disp, fn) SET_by_offset(disp, _gloffset_Color4usv, fn) -#define CALL_EdgeFlag(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLboolean)), _gloffset_EdgeFlag, parameters) -#define GET_EdgeFlag(disp) GET_by_offset(disp, _gloffset_EdgeFlag) -#define SET_EdgeFlag(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlag, fn) -#define CALL_EdgeFlagv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLboolean *)), _gloffset_EdgeFlagv, parameters) -#define GET_EdgeFlagv(disp) GET_by_offset(disp, _gloffset_EdgeFlagv) -#define SET_EdgeFlagv(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlagv, fn) -#define CALL_End(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_End, parameters) -#define GET_End(disp) GET_by_offset(disp, _gloffset_End) -#define SET_End(disp, fn) SET_by_offset(disp, _gloffset_End, fn) -#define CALL_Indexd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_Indexd, parameters) -#define GET_Indexd(disp) GET_by_offset(disp, _gloffset_Indexd) -#define SET_Indexd(disp, fn) SET_by_offset(disp, _gloffset_Indexd, fn) -#define CALL_Indexdv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Indexdv, parameters) -#define GET_Indexdv(disp) GET_by_offset(disp, _gloffset_Indexdv) -#define SET_Indexdv(disp, fn) SET_by_offset(disp, _gloffset_Indexdv, fn) -#define CALL_Indexf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_Indexf, parameters) -#define GET_Indexf(disp) GET_by_offset(disp, _gloffset_Indexf) -#define SET_Indexf(disp, fn) SET_by_offset(disp, _gloffset_Indexf, fn) -#define CALL_Indexfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Indexfv, parameters) -#define GET_Indexfv(disp) GET_by_offset(disp, _gloffset_Indexfv) -#define SET_Indexfv(disp, fn) SET_by_offset(disp, _gloffset_Indexfv, fn) -#define CALL_Indexi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_Indexi, parameters) -#define GET_Indexi(disp) GET_by_offset(disp, _gloffset_Indexi) -#define SET_Indexi(disp, fn) SET_by_offset(disp, _gloffset_Indexi, fn) -#define CALL_Indexiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Indexiv, parameters) -#define GET_Indexiv(disp) GET_by_offset(disp, _gloffset_Indexiv) -#define SET_Indexiv(disp, fn) SET_by_offset(disp, _gloffset_Indexiv, fn) -#define CALL_Indexs(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort)), _gloffset_Indexs, parameters) -#define GET_Indexs(disp) GET_by_offset(disp, _gloffset_Indexs) -#define SET_Indexs(disp, fn) SET_by_offset(disp, _gloffset_Indexs, fn) -#define CALL_Indexsv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Indexsv, parameters) -#define GET_Indexsv(disp) GET_by_offset(disp, _gloffset_Indexsv) -#define SET_Indexsv(disp, fn) SET_by_offset(disp, _gloffset_Indexsv, fn) -#define CALL_Normal3b(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte)), _gloffset_Normal3b, parameters) -#define GET_Normal3b(disp) GET_by_offset(disp, _gloffset_Normal3b) -#define SET_Normal3b(disp, fn) SET_by_offset(disp, _gloffset_Normal3b, fn) -#define CALL_Normal3bv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_Normal3bv, parameters) -#define GET_Normal3bv(disp) GET_by_offset(disp, _gloffset_Normal3bv) -#define SET_Normal3bv(disp, fn) SET_by_offset(disp, _gloffset_Normal3bv, fn) -#define CALL_Normal3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Normal3d, parameters) -#define GET_Normal3d(disp) GET_by_offset(disp, _gloffset_Normal3d) -#define SET_Normal3d(disp, fn) SET_by_offset(disp, _gloffset_Normal3d, fn) -#define CALL_Normal3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Normal3dv, parameters) -#define GET_Normal3dv(disp) GET_by_offset(disp, _gloffset_Normal3dv) -#define SET_Normal3dv(disp, fn) SET_by_offset(disp, _gloffset_Normal3dv, fn) -#define CALL_Normal3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Normal3f, parameters) -#define GET_Normal3f(disp) GET_by_offset(disp, _gloffset_Normal3f) -#define SET_Normal3f(disp, fn) SET_by_offset(disp, _gloffset_Normal3f, fn) -#define CALL_Normal3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Normal3fv, parameters) -#define GET_Normal3fv(disp) GET_by_offset(disp, _gloffset_Normal3fv) -#define SET_Normal3fv(disp, fn) SET_by_offset(disp, _gloffset_Normal3fv, fn) -#define CALL_Normal3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Normal3i, parameters) -#define GET_Normal3i(disp) GET_by_offset(disp, _gloffset_Normal3i) -#define SET_Normal3i(disp, fn) SET_by_offset(disp, _gloffset_Normal3i, fn) -#define CALL_Normal3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Normal3iv, parameters) -#define GET_Normal3iv(disp) GET_by_offset(disp, _gloffset_Normal3iv) -#define SET_Normal3iv(disp, fn) SET_by_offset(disp, _gloffset_Normal3iv, fn) -#define CALL_Normal3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_Normal3s, parameters) -#define GET_Normal3s(disp) GET_by_offset(disp, _gloffset_Normal3s) -#define SET_Normal3s(disp, fn) SET_by_offset(disp, _gloffset_Normal3s, fn) -#define CALL_Normal3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Normal3sv, parameters) -#define GET_Normal3sv(disp) GET_by_offset(disp, _gloffset_Normal3sv) -#define SET_Normal3sv(disp, fn) SET_by_offset(disp, _gloffset_Normal3sv, fn) -#define CALL_RasterPos2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_RasterPos2d, parameters) -#define GET_RasterPos2d(disp) GET_by_offset(disp, _gloffset_RasterPos2d) -#define SET_RasterPos2d(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2d, fn) -#define CALL_RasterPos2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_RasterPos2dv, parameters) -#define GET_RasterPos2dv(disp) GET_by_offset(disp, _gloffset_RasterPos2dv) -#define SET_RasterPos2dv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2dv, fn) -#define CALL_RasterPos2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_RasterPos2f, parameters) -#define GET_RasterPos2f(disp) GET_by_offset(disp, _gloffset_RasterPos2f) -#define SET_RasterPos2f(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2f, fn) -#define CALL_RasterPos2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_RasterPos2fv, parameters) -#define GET_RasterPos2fv(disp) GET_by_offset(disp, _gloffset_RasterPos2fv) -#define SET_RasterPos2fv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2fv, fn) -#define CALL_RasterPos2i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_RasterPos2i, parameters) -#define GET_RasterPos2i(disp) GET_by_offset(disp, _gloffset_RasterPos2i) -#define SET_RasterPos2i(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2i, fn) -#define CALL_RasterPos2iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_RasterPos2iv, parameters) -#define GET_RasterPos2iv(disp) GET_by_offset(disp, _gloffset_RasterPos2iv) -#define SET_RasterPos2iv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2iv, fn) -#define CALL_RasterPos2s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_RasterPos2s, parameters) -#define GET_RasterPos2s(disp) GET_by_offset(disp, _gloffset_RasterPos2s) -#define SET_RasterPos2s(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2s, fn) -#define CALL_RasterPos2sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_RasterPos2sv, parameters) -#define GET_RasterPos2sv(disp) GET_by_offset(disp, _gloffset_RasterPos2sv) -#define SET_RasterPos2sv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos2sv, fn) -#define CALL_RasterPos3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_RasterPos3d, parameters) -#define GET_RasterPos3d(disp) GET_by_offset(disp, _gloffset_RasterPos3d) -#define SET_RasterPos3d(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3d, fn) -#define CALL_RasterPos3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_RasterPos3dv, parameters) -#define GET_RasterPos3dv(disp) GET_by_offset(disp, _gloffset_RasterPos3dv) -#define SET_RasterPos3dv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3dv, fn) -#define CALL_RasterPos3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_RasterPos3f, parameters) -#define GET_RasterPos3f(disp) GET_by_offset(disp, _gloffset_RasterPos3f) -#define SET_RasterPos3f(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3f, fn) -#define CALL_RasterPos3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_RasterPos3fv, parameters) -#define GET_RasterPos3fv(disp) GET_by_offset(disp, _gloffset_RasterPos3fv) -#define SET_RasterPos3fv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3fv, fn) -#define CALL_RasterPos3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_RasterPos3i, parameters) -#define GET_RasterPos3i(disp) GET_by_offset(disp, _gloffset_RasterPos3i) -#define SET_RasterPos3i(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3i, fn) -#define CALL_RasterPos3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_RasterPos3iv, parameters) -#define GET_RasterPos3iv(disp) GET_by_offset(disp, _gloffset_RasterPos3iv) -#define SET_RasterPos3iv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3iv, fn) -#define CALL_RasterPos3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_RasterPos3s, parameters) -#define GET_RasterPos3s(disp) GET_by_offset(disp, _gloffset_RasterPos3s) -#define SET_RasterPos3s(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3s, fn) -#define CALL_RasterPos3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_RasterPos3sv, parameters) -#define GET_RasterPos3sv(disp) GET_by_offset(disp, _gloffset_RasterPos3sv) -#define SET_RasterPos3sv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos3sv, fn) -#define CALL_RasterPos4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_RasterPos4d, parameters) -#define GET_RasterPos4d(disp) GET_by_offset(disp, _gloffset_RasterPos4d) -#define SET_RasterPos4d(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4d, fn) -#define CALL_RasterPos4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_RasterPos4dv, parameters) -#define GET_RasterPos4dv(disp) GET_by_offset(disp, _gloffset_RasterPos4dv) -#define SET_RasterPos4dv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4dv, fn) -#define CALL_RasterPos4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_RasterPos4f, parameters) -#define GET_RasterPos4f(disp) GET_by_offset(disp, _gloffset_RasterPos4f) -#define SET_RasterPos4f(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4f, fn) -#define CALL_RasterPos4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_RasterPos4fv, parameters) -#define GET_RasterPos4fv(disp) GET_by_offset(disp, _gloffset_RasterPos4fv) -#define SET_RasterPos4fv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4fv, fn) -#define CALL_RasterPos4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_RasterPos4i, parameters) -#define GET_RasterPos4i(disp) GET_by_offset(disp, _gloffset_RasterPos4i) -#define SET_RasterPos4i(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4i, fn) -#define CALL_RasterPos4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_RasterPos4iv, parameters) -#define GET_RasterPos4iv(disp) GET_by_offset(disp, _gloffset_RasterPos4iv) -#define SET_RasterPos4iv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4iv, fn) -#define CALL_RasterPos4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_RasterPos4s, parameters) -#define GET_RasterPos4s(disp) GET_by_offset(disp, _gloffset_RasterPos4s) -#define SET_RasterPos4s(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4s, fn) -#define CALL_RasterPos4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_RasterPos4sv, parameters) -#define GET_RasterPos4sv(disp) GET_by_offset(disp, _gloffset_RasterPos4sv) -#define SET_RasterPos4sv(disp, fn) SET_by_offset(disp, _gloffset_RasterPos4sv, fn) -#define CALL_Rectd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Rectd, parameters) -#define GET_Rectd(disp) GET_by_offset(disp, _gloffset_Rectd) -#define SET_Rectd(disp, fn) SET_by_offset(disp, _gloffset_Rectd, fn) -#define CALL_Rectdv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *, const GLdouble *)), _gloffset_Rectdv, parameters) -#define GET_Rectdv(disp) GET_by_offset(disp, _gloffset_Rectdv) -#define SET_Rectdv(disp, fn) SET_by_offset(disp, _gloffset_Rectdv, fn) -#define CALL_Rectf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Rectf, parameters) -#define GET_Rectf(disp) GET_by_offset(disp, _gloffset_Rectf) -#define SET_Rectf(disp, fn) SET_by_offset(disp, _gloffset_Rectf, fn) -#define CALL_Rectfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *, const GLfloat *)), _gloffset_Rectfv, parameters) -#define GET_Rectfv(disp) GET_by_offset(disp, _gloffset_Rectfv) -#define SET_Rectfv(disp, fn) SET_by_offset(disp, _gloffset_Rectfv, fn) -#define CALL_Recti(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Recti, parameters) -#define GET_Recti(disp) GET_by_offset(disp, _gloffset_Recti) -#define SET_Recti(disp, fn) SET_by_offset(disp, _gloffset_Recti, fn) -#define CALL_Rectiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *, const GLint *)), _gloffset_Rectiv, parameters) -#define GET_Rectiv(disp) GET_by_offset(disp, _gloffset_Rectiv) -#define SET_Rectiv(disp, fn) SET_by_offset(disp, _gloffset_Rectiv, fn) -#define CALL_Rects(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_Rects, parameters) -#define GET_Rects(disp) GET_by_offset(disp, _gloffset_Rects) -#define SET_Rects(disp, fn) SET_by_offset(disp, _gloffset_Rects, fn) -#define CALL_Rectsv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *, const GLshort *)), _gloffset_Rectsv, parameters) -#define GET_Rectsv(disp) GET_by_offset(disp, _gloffset_Rectsv) -#define SET_Rectsv(disp, fn) SET_by_offset(disp, _gloffset_Rectsv, fn) -#define CALL_TexCoord1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_TexCoord1d, parameters) -#define GET_TexCoord1d(disp) GET_by_offset(disp, _gloffset_TexCoord1d) -#define SET_TexCoord1d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1d, fn) -#define CALL_TexCoord1dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord1dv, parameters) -#define GET_TexCoord1dv(disp) GET_by_offset(disp, _gloffset_TexCoord1dv) -#define SET_TexCoord1dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1dv, fn) -#define CALL_TexCoord1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_TexCoord1f, parameters) -#define GET_TexCoord1f(disp) GET_by_offset(disp, _gloffset_TexCoord1f) -#define SET_TexCoord1f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1f, fn) -#define CALL_TexCoord1fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord1fv, parameters) -#define GET_TexCoord1fv(disp) GET_by_offset(disp, _gloffset_TexCoord1fv) -#define SET_TexCoord1fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1fv, fn) -#define CALL_TexCoord1i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_TexCoord1i, parameters) -#define GET_TexCoord1i(disp) GET_by_offset(disp, _gloffset_TexCoord1i) -#define SET_TexCoord1i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1i, fn) -#define CALL_TexCoord1iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord1iv, parameters) -#define GET_TexCoord1iv(disp) GET_by_offset(disp, _gloffset_TexCoord1iv) -#define SET_TexCoord1iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1iv, fn) -#define CALL_TexCoord1s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort)), _gloffset_TexCoord1s, parameters) -#define GET_TexCoord1s(disp) GET_by_offset(disp, _gloffset_TexCoord1s) -#define SET_TexCoord1s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1s, fn) -#define CALL_TexCoord1sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord1sv, parameters) -#define GET_TexCoord1sv(disp) GET_by_offset(disp, _gloffset_TexCoord1sv) -#define SET_TexCoord1sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord1sv, fn) -#define CALL_TexCoord2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_TexCoord2d, parameters) -#define GET_TexCoord2d(disp) GET_by_offset(disp, _gloffset_TexCoord2d) -#define SET_TexCoord2d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2d, fn) -#define CALL_TexCoord2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord2dv, parameters) -#define GET_TexCoord2dv(disp) GET_by_offset(disp, _gloffset_TexCoord2dv) -#define SET_TexCoord2dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2dv, fn) -#define CALL_TexCoord2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_TexCoord2f, parameters) -#define GET_TexCoord2f(disp) GET_by_offset(disp, _gloffset_TexCoord2f) -#define SET_TexCoord2f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2f, fn) -#define CALL_TexCoord2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord2fv, parameters) -#define GET_TexCoord2fv(disp) GET_by_offset(disp, _gloffset_TexCoord2fv) -#define SET_TexCoord2fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2fv, fn) -#define CALL_TexCoord2i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_TexCoord2i, parameters) -#define GET_TexCoord2i(disp) GET_by_offset(disp, _gloffset_TexCoord2i) -#define SET_TexCoord2i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2i, fn) -#define CALL_TexCoord2iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord2iv, parameters) -#define GET_TexCoord2iv(disp) GET_by_offset(disp, _gloffset_TexCoord2iv) -#define SET_TexCoord2iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2iv, fn) -#define CALL_TexCoord2s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_TexCoord2s, parameters) -#define GET_TexCoord2s(disp) GET_by_offset(disp, _gloffset_TexCoord2s) -#define SET_TexCoord2s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2s, fn) -#define CALL_TexCoord2sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord2sv, parameters) -#define GET_TexCoord2sv(disp) GET_by_offset(disp, _gloffset_TexCoord2sv) -#define SET_TexCoord2sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord2sv, fn) -#define CALL_TexCoord3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_TexCoord3d, parameters) -#define GET_TexCoord3d(disp) GET_by_offset(disp, _gloffset_TexCoord3d) -#define SET_TexCoord3d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3d, fn) -#define CALL_TexCoord3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord3dv, parameters) -#define GET_TexCoord3dv(disp) GET_by_offset(disp, _gloffset_TexCoord3dv) -#define SET_TexCoord3dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3dv, fn) -#define CALL_TexCoord3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_TexCoord3f, parameters) -#define GET_TexCoord3f(disp) GET_by_offset(disp, _gloffset_TexCoord3f) -#define SET_TexCoord3f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3f, fn) -#define CALL_TexCoord3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord3fv, parameters) -#define GET_TexCoord3fv(disp) GET_by_offset(disp, _gloffset_TexCoord3fv) -#define SET_TexCoord3fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3fv, fn) -#define CALL_TexCoord3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_TexCoord3i, parameters) -#define GET_TexCoord3i(disp) GET_by_offset(disp, _gloffset_TexCoord3i) -#define SET_TexCoord3i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3i, fn) -#define CALL_TexCoord3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord3iv, parameters) -#define GET_TexCoord3iv(disp) GET_by_offset(disp, _gloffset_TexCoord3iv) -#define SET_TexCoord3iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3iv, fn) -#define CALL_TexCoord3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_TexCoord3s, parameters) -#define GET_TexCoord3s(disp) GET_by_offset(disp, _gloffset_TexCoord3s) -#define SET_TexCoord3s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3s, fn) -#define CALL_TexCoord3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord3sv, parameters) -#define GET_TexCoord3sv(disp) GET_by_offset(disp, _gloffset_TexCoord3sv) -#define SET_TexCoord3sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord3sv, fn) -#define CALL_TexCoord4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_TexCoord4d, parameters) -#define GET_TexCoord4d(disp) GET_by_offset(disp, _gloffset_TexCoord4d) -#define SET_TexCoord4d(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4d, fn) -#define CALL_TexCoord4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_TexCoord4dv, parameters) -#define GET_TexCoord4dv(disp) GET_by_offset(disp, _gloffset_TexCoord4dv) -#define SET_TexCoord4dv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4dv, fn) -#define CALL_TexCoord4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_TexCoord4f, parameters) -#define GET_TexCoord4f(disp) GET_by_offset(disp, _gloffset_TexCoord4f) -#define SET_TexCoord4f(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4f, fn) -#define CALL_TexCoord4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_TexCoord4fv, parameters) -#define GET_TexCoord4fv(disp) GET_by_offset(disp, _gloffset_TexCoord4fv) -#define SET_TexCoord4fv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4fv, fn) -#define CALL_TexCoord4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_TexCoord4i, parameters) -#define GET_TexCoord4i(disp) GET_by_offset(disp, _gloffset_TexCoord4i) -#define SET_TexCoord4i(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4i, fn) -#define CALL_TexCoord4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_TexCoord4iv, parameters) -#define GET_TexCoord4iv(disp) GET_by_offset(disp, _gloffset_TexCoord4iv) -#define SET_TexCoord4iv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4iv, fn) -#define CALL_TexCoord4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_TexCoord4s, parameters) -#define GET_TexCoord4s(disp) GET_by_offset(disp, _gloffset_TexCoord4s) -#define SET_TexCoord4s(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4s, fn) -#define CALL_TexCoord4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_TexCoord4sv, parameters) -#define GET_TexCoord4sv(disp) GET_by_offset(disp, _gloffset_TexCoord4sv) -#define SET_TexCoord4sv(disp, fn) SET_by_offset(disp, _gloffset_TexCoord4sv, fn) -#define CALL_Vertex2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_Vertex2d, parameters) -#define GET_Vertex2d(disp) GET_by_offset(disp, _gloffset_Vertex2d) -#define SET_Vertex2d(disp, fn) SET_by_offset(disp, _gloffset_Vertex2d, fn) -#define CALL_Vertex2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Vertex2dv, parameters) -#define GET_Vertex2dv(disp) GET_by_offset(disp, _gloffset_Vertex2dv) -#define SET_Vertex2dv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2dv, fn) -#define CALL_Vertex2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_Vertex2f, parameters) -#define GET_Vertex2f(disp) GET_by_offset(disp, _gloffset_Vertex2f) -#define SET_Vertex2f(disp, fn) SET_by_offset(disp, _gloffset_Vertex2f, fn) -#define CALL_Vertex2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Vertex2fv, parameters) -#define GET_Vertex2fv(disp) GET_by_offset(disp, _gloffset_Vertex2fv) -#define SET_Vertex2fv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2fv, fn) -#define CALL_Vertex2i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_Vertex2i, parameters) -#define GET_Vertex2i(disp) GET_by_offset(disp, _gloffset_Vertex2i) -#define SET_Vertex2i(disp, fn) SET_by_offset(disp, _gloffset_Vertex2i, fn) -#define CALL_Vertex2iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Vertex2iv, parameters) -#define GET_Vertex2iv(disp) GET_by_offset(disp, _gloffset_Vertex2iv) -#define SET_Vertex2iv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2iv, fn) -#define CALL_Vertex2s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_Vertex2s, parameters) -#define GET_Vertex2s(disp) GET_by_offset(disp, _gloffset_Vertex2s) -#define SET_Vertex2s(disp, fn) SET_by_offset(disp, _gloffset_Vertex2s, fn) -#define CALL_Vertex2sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Vertex2sv, parameters) -#define GET_Vertex2sv(disp) GET_by_offset(disp, _gloffset_Vertex2sv) -#define SET_Vertex2sv(disp, fn) SET_by_offset(disp, _gloffset_Vertex2sv, fn) -#define CALL_Vertex3d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Vertex3d, parameters) -#define GET_Vertex3d(disp) GET_by_offset(disp, _gloffset_Vertex3d) -#define SET_Vertex3d(disp, fn) SET_by_offset(disp, _gloffset_Vertex3d, fn) -#define CALL_Vertex3dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Vertex3dv, parameters) -#define GET_Vertex3dv(disp) GET_by_offset(disp, _gloffset_Vertex3dv) -#define SET_Vertex3dv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3dv, fn) -#define CALL_Vertex3f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Vertex3f, parameters) -#define GET_Vertex3f(disp) GET_by_offset(disp, _gloffset_Vertex3f) -#define SET_Vertex3f(disp, fn) SET_by_offset(disp, _gloffset_Vertex3f, fn) -#define CALL_Vertex3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Vertex3fv, parameters) -#define GET_Vertex3fv(disp) GET_by_offset(disp, _gloffset_Vertex3fv) -#define SET_Vertex3fv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3fv, fn) -#define CALL_Vertex3i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Vertex3i, parameters) -#define GET_Vertex3i(disp) GET_by_offset(disp, _gloffset_Vertex3i) -#define SET_Vertex3i(disp, fn) SET_by_offset(disp, _gloffset_Vertex3i, fn) -#define CALL_Vertex3iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Vertex3iv, parameters) -#define GET_Vertex3iv(disp) GET_by_offset(disp, _gloffset_Vertex3iv) -#define SET_Vertex3iv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3iv, fn) -#define CALL_Vertex3s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_Vertex3s, parameters) -#define GET_Vertex3s(disp) GET_by_offset(disp, _gloffset_Vertex3s) -#define SET_Vertex3s(disp, fn) SET_by_offset(disp, _gloffset_Vertex3s, fn) -#define CALL_Vertex3sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Vertex3sv, parameters) -#define GET_Vertex3sv(disp) GET_by_offset(disp, _gloffset_Vertex3sv) -#define SET_Vertex3sv(disp, fn) SET_by_offset(disp, _gloffset_Vertex3sv, fn) -#define CALL_Vertex4d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Vertex4d, parameters) -#define GET_Vertex4d(disp) GET_by_offset(disp, _gloffset_Vertex4d) -#define SET_Vertex4d(disp, fn) SET_by_offset(disp, _gloffset_Vertex4d, fn) -#define CALL_Vertex4dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_Vertex4dv, parameters) -#define GET_Vertex4dv(disp) GET_by_offset(disp, _gloffset_Vertex4dv) -#define SET_Vertex4dv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4dv, fn) -#define CALL_Vertex4f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Vertex4f, parameters) -#define GET_Vertex4f(disp) GET_by_offset(disp, _gloffset_Vertex4f) -#define SET_Vertex4f(disp, fn) SET_by_offset(disp, _gloffset_Vertex4f, fn) -#define CALL_Vertex4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_Vertex4fv, parameters) -#define GET_Vertex4fv(disp) GET_by_offset(disp, _gloffset_Vertex4fv) -#define SET_Vertex4fv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4fv, fn) -#define CALL_Vertex4i(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Vertex4i, parameters) -#define GET_Vertex4i(disp) GET_by_offset(disp, _gloffset_Vertex4i) -#define SET_Vertex4i(disp, fn) SET_by_offset(disp, _gloffset_Vertex4i, fn) -#define CALL_Vertex4iv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_Vertex4iv, parameters) -#define GET_Vertex4iv(disp) GET_by_offset(disp, _gloffset_Vertex4iv) -#define SET_Vertex4iv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4iv, fn) -#define CALL_Vertex4s(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_Vertex4s, parameters) -#define GET_Vertex4s(disp) GET_by_offset(disp, _gloffset_Vertex4s) -#define SET_Vertex4s(disp, fn) SET_by_offset(disp, _gloffset_Vertex4s, fn) -#define CALL_Vertex4sv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_Vertex4sv, parameters) -#define GET_Vertex4sv(disp) GET_by_offset(disp, _gloffset_Vertex4sv) -#define SET_Vertex4sv(disp, fn) SET_by_offset(disp, _gloffset_Vertex4sv, fn) -#define CALL_ClipPlane(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_ClipPlane, parameters) -#define GET_ClipPlane(disp) GET_by_offset(disp, _gloffset_ClipPlane) -#define SET_ClipPlane(disp, fn) SET_by_offset(disp, _gloffset_ClipPlane, fn) -#define CALL_ColorMaterial(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_ColorMaterial, parameters) -#define GET_ColorMaterial(disp) GET_by_offset(disp, _gloffset_ColorMaterial) -#define SET_ColorMaterial(disp, fn) SET_by_offset(disp, _gloffset_ColorMaterial, fn) -#define CALL_CullFace(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_CullFace, parameters) -#define GET_CullFace(disp) GET_by_offset(disp, _gloffset_CullFace) -#define SET_CullFace(disp, fn) SET_by_offset(disp, _gloffset_CullFace, fn) -#define CALL_Fogf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_Fogf, parameters) -#define GET_Fogf(disp) GET_by_offset(disp, _gloffset_Fogf) -#define SET_Fogf(disp, fn) SET_by_offset(disp, _gloffset_Fogf, fn) -#define CALL_Fogfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_Fogfv, parameters) -#define GET_Fogfv(disp) GET_by_offset(disp, _gloffset_Fogfv) -#define SET_Fogfv(disp, fn) SET_by_offset(disp, _gloffset_Fogfv, fn) -#define CALL_Fogi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_Fogi, parameters) -#define GET_Fogi(disp) GET_by_offset(disp, _gloffset_Fogi) -#define SET_Fogi(disp, fn) SET_by_offset(disp, _gloffset_Fogi, fn) -#define CALL_Fogiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_Fogiv, parameters) -#define GET_Fogiv(disp) GET_by_offset(disp, _gloffset_Fogiv) -#define SET_Fogiv(disp, fn) SET_by_offset(disp, _gloffset_Fogiv, fn) -#define CALL_FrontFace(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_FrontFace, parameters) -#define GET_FrontFace(disp) GET_by_offset(disp, _gloffset_FrontFace) -#define SET_FrontFace(disp, fn) SET_by_offset(disp, _gloffset_FrontFace, fn) -#define CALL_Hint(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_Hint, parameters) -#define GET_Hint(disp) GET_by_offset(disp, _gloffset_Hint) -#define SET_Hint(disp, fn) SET_by_offset(disp, _gloffset_Hint, fn) -#define CALL_Lightf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_Lightf, parameters) -#define GET_Lightf(disp) GET_by_offset(disp, _gloffset_Lightf) -#define SET_Lightf(disp, fn) SET_by_offset(disp, _gloffset_Lightf, fn) -#define CALL_Lightfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_Lightfv, parameters) -#define GET_Lightfv(disp) GET_by_offset(disp, _gloffset_Lightfv) -#define SET_Lightfv(disp, fn) SET_by_offset(disp, _gloffset_Lightfv, fn) -#define CALL_Lighti(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_Lighti, parameters) -#define GET_Lighti(disp) GET_by_offset(disp, _gloffset_Lighti) -#define SET_Lighti(disp, fn) SET_by_offset(disp, _gloffset_Lighti, fn) -#define CALL_Lightiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_Lightiv, parameters) -#define GET_Lightiv(disp) GET_by_offset(disp, _gloffset_Lightiv) -#define SET_Lightiv(disp, fn) SET_by_offset(disp, _gloffset_Lightiv, fn) -#define CALL_LightModelf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_LightModelf, parameters) -#define GET_LightModelf(disp) GET_by_offset(disp, _gloffset_LightModelf) -#define SET_LightModelf(disp, fn) SET_by_offset(disp, _gloffset_LightModelf, fn) -#define CALL_LightModelfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_LightModelfv, parameters) -#define GET_LightModelfv(disp) GET_by_offset(disp, _gloffset_LightModelfv) -#define SET_LightModelfv(disp, fn) SET_by_offset(disp, _gloffset_LightModelfv, fn) -#define CALL_LightModeli(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_LightModeli, parameters) -#define GET_LightModeli(disp) GET_by_offset(disp, _gloffset_LightModeli) -#define SET_LightModeli(disp, fn) SET_by_offset(disp, _gloffset_LightModeli, fn) -#define CALL_LightModeliv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_LightModeliv, parameters) -#define GET_LightModeliv(disp) GET_by_offset(disp, _gloffset_LightModeliv) -#define SET_LightModeliv(disp, fn) SET_by_offset(disp, _gloffset_LightModeliv, fn) -#define CALL_LineStipple(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLushort)), _gloffset_LineStipple, parameters) -#define GET_LineStipple(disp) GET_by_offset(disp, _gloffset_LineStipple) -#define SET_LineStipple(disp, fn) SET_by_offset(disp, _gloffset_LineStipple, fn) -#define CALL_LineWidth(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_LineWidth, parameters) -#define GET_LineWidth(disp) GET_by_offset(disp, _gloffset_LineWidth) -#define SET_LineWidth(disp, fn) SET_by_offset(disp, _gloffset_LineWidth, fn) -#define CALL_Materialf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_Materialf, parameters) -#define GET_Materialf(disp) GET_by_offset(disp, _gloffset_Materialf) -#define SET_Materialf(disp, fn) SET_by_offset(disp, _gloffset_Materialf, fn) -#define CALL_Materialfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_Materialfv, parameters) -#define GET_Materialfv(disp) GET_by_offset(disp, _gloffset_Materialfv) -#define SET_Materialfv(disp, fn) SET_by_offset(disp, _gloffset_Materialfv, fn) -#define CALL_Materiali(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_Materiali, parameters) -#define GET_Materiali(disp) GET_by_offset(disp, _gloffset_Materiali) -#define SET_Materiali(disp, fn) SET_by_offset(disp, _gloffset_Materiali, fn) -#define CALL_Materialiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_Materialiv, parameters) -#define GET_Materialiv(disp) GET_by_offset(disp, _gloffset_Materialiv) -#define SET_Materialiv(disp, fn) SET_by_offset(disp, _gloffset_Materialiv, fn) -#define CALL_PointSize(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_PointSize, parameters) -#define GET_PointSize(disp) GET_by_offset(disp, _gloffset_PointSize) -#define SET_PointSize(disp, fn) SET_by_offset(disp, _gloffset_PointSize, fn) -#define CALL_PolygonMode(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_PolygonMode, parameters) -#define GET_PolygonMode(disp) GET_by_offset(disp, _gloffset_PolygonMode) -#define SET_PolygonMode(disp, fn) SET_by_offset(disp, _gloffset_PolygonMode, fn) -#define CALL_PolygonStipple(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_PolygonStipple, parameters) -#define GET_PolygonStipple(disp) GET_by_offset(disp, _gloffset_PolygonStipple) -#define SET_PolygonStipple(disp, fn) SET_by_offset(disp, _gloffset_PolygonStipple, fn) -#define CALL_Scissor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei)), _gloffset_Scissor, parameters) -#define GET_Scissor(disp) GET_by_offset(disp, _gloffset_Scissor) -#define SET_Scissor(disp, fn) SET_by_offset(disp, _gloffset_Scissor, fn) -#define CALL_ShadeModel(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ShadeModel, parameters) -#define GET_ShadeModel(disp) GET_by_offset(disp, _gloffset_ShadeModel) -#define SET_ShadeModel(disp, fn) SET_by_offset(disp, _gloffset_ShadeModel, fn) -#define CALL_TexParameterf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_TexParameterf, parameters) -#define GET_TexParameterf(disp) GET_by_offset(disp, _gloffset_TexParameterf) -#define SET_TexParameterf(disp, fn) SET_by_offset(disp, _gloffset_TexParameterf, fn) -#define CALL_TexParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_TexParameterfv, parameters) -#define GET_TexParameterfv(disp) GET_by_offset(disp, _gloffset_TexParameterfv) -#define SET_TexParameterfv(disp, fn) SET_by_offset(disp, _gloffset_TexParameterfv, fn) -#define CALL_TexParameteri(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_TexParameteri, parameters) -#define GET_TexParameteri(disp) GET_by_offset(disp, _gloffset_TexParameteri) -#define SET_TexParameteri(disp, fn) SET_by_offset(disp, _gloffset_TexParameteri, fn) -#define CALL_TexParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexParameteriv, parameters) -#define GET_TexParameteriv(disp) GET_by_offset(disp, _gloffset_TexParameteriv) -#define SET_TexParameteriv(disp, fn) SET_by_offset(disp, _gloffset_TexParameteriv, fn) -#define CALL_TexImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLint, GLenum, GLenum, const GLvoid *)), _gloffset_TexImage1D, parameters) -#define GET_TexImage1D(disp) GET_by_offset(disp, _gloffset_TexImage1D) -#define SET_TexImage1D(disp, fn) SET_by_offset(disp, _gloffset_TexImage1D, fn) -#define CALL_TexImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)), _gloffset_TexImage2D, parameters) -#define GET_TexImage2D(disp) GET_by_offset(disp, _gloffset_TexImage2D) -#define SET_TexImage2D(disp, fn) SET_by_offset(disp, _gloffset_TexImage2D, fn) -#define CALL_TexEnvf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_TexEnvf, parameters) -#define GET_TexEnvf(disp) GET_by_offset(disp, _gloffset_TexEnvf) -#define SET_TexEnvf(disp, fn) SET_by_offset(disp, _gloffset_TexEnvf, fn) -#define CALL_TexEnvfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_TexEnvfv, parameters) -#define GET_TexEnvfv(disp) GET_by_offset(disp, _gloffset_TexEnvfv) -#define SET_TexEnvfv(disp, fn) SET_by_offset(disp, _gloffset_TexEnvfv, fn) -#define CALL_TexEnvi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_TexEnvi, parameters) -#define GET_TexEnvi(disp) GET_by_offset(disp, _gloffset_TexEnvi) -#define SET_TexEnvi(disp, fn) SET_by_offset(disp, _gloffset_TexEnvi, fn) -#define CALL_TexEnviv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexEnviv, parameters) -#define GET_TexEnviv(disp) GET_by_offset(disp, _gloffset_TexEnviv) -#define SET_TexEnviv(disp, fn) SET_by_offset(disp, _gloffset_TexEnviv, fn) -#define CALL_TexGend(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLdouble)), _gloffset_TexGend, parameters) -#define GET_TexGend(disp) GET_by_offset(disp, _gloffset_TexGend) -#define SET_TexGend(disp, fn) SET_by_offset(disp, _gloffset_TexGend, fn) -#define CALL_TexGendv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLdouble *)), _gloffset_TexGendv, parameters) -#define GET_TexGendv(disp) GET_by_offset(disp, _gloffset_TexGendv) -#define SET_TexGendv(disp, fn) SET_by_offset(disp, _gloffset_TexGendv, fn) -#define CALL_TexGenf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_TexGenf, parameters) -#define GET_TexGenf(disp) GET_by_offset(disp, _gloffset_TexGenf) -#define SET_TexGenf(disp, fn) SET_by_offset(disp, _gloffset_TexGenf, fn) -#define CALL_TexGenfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_TexGenfv, parameters) -#define GET_TexGenfv(disp) GET_by_offset(disp, _gloffset_TexGenfv) -#define SET_TexGenfv(disp, fn) SET_by_offset(disp, _gloffset_TexGenfv, fn) -#define CALL_TexGeni(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_TexGeni, parameters) -#define GET_TexGeni(disp) GET_by_offset(disp, _gloffset_TexGeni) -#define SET_TexGeni(disp, fn) SET_by_offset(disp, _gloffset_TexGeni, fn) -#define CALL_TexGeniv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexGeniv, parameters) -#define GET_TexGeniv(disp) GET_by_offset(disp, _gloffset_TexGeniv) -#define SET_TexGeniv(disp, fn) SET_by_offset(disp, _gloffset_TexGeniv, fn) -#define CALL_FeedbackBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLenum, GLfloat *)), _gloffset_FeedbackBuffer, parameters) -#define GET_FeedbackBuffer(disp) GET_by_offset(disp, _gloffset_FeedbackBuffer) -#define SET_FeedbackBuffer(disp, fn) SET_by_offset(disp, _gloffset_FeedbackBuffer, fn) -#define CALL_SelectBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_SelectBuffer, parameters) -#define GET_SelectBuffer(disp) GET_by_offset(disp, _gloffset_SelectBuffer) -#define SET_SelectBuffer(disp, fn) SET_by_offset(disp, _gloffset_SelectBuffer, fn) -#define CALL_RenderMode(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLenum)), _gloffset_RenderMode, parameters) -#define GET_RenderMode(disp) GET_by_offset(disp, _gloffset_RenderMode) -#define SET_RenderMode(disp, fn) SET_by_offset(disp, _gloffset_RenderMode, fn) -#define CALL_InitNames(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_InitNames, parameters) -#define GET_InitNames(disp) GET_by_offset(disp, _gloffset_InitNames) -#define SET_InitNames(disp, fn) SET_by_offset(disp, _gloffset_InitNames, fn) -#define CALL_LoadName(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_LoadName, parameters) -#define GET_LoadName(disp) GET_by_offset(disp, _gloffset_LoadName) -#define SET_LoadName(disp, fn) SET_by_offset(disp, _gloffset_LoadName, fn) -#define CALL_PassThrough(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_PassThrough, parameters) -#define GET_PassThrough(disp) GET_by_offset(disp, _gloffset_PassThrough) -#define SET_PassThrough(disp, fn) SET_by_offset(disp, _gloffset_PassThrough, fn) -#define CALL_PopName(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopName, parameters) -#define GET_PopName(disp) GET_by_offset(disp, _gloffset_PopName) -#define SET_PopName(disp, fn) SET_by_offset(disp, _gloffset_PopName, fn) -#define CALL_PushName(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_PushName, parameters) -#define GET_PushName(disp) GET_by_offset(disp, _gloffset_PushName) -#define SET_PushName(disp, fn) SET_by_offset(disp, _gloffset_PushName, fn) -#define CALL_DrawBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_DrawBuffer, parameters) -#define GET_DrawBuffer(disp) GET_by_offset(disp, _gloffset_DrawBuffer) -#define SET_DrawBuffer(disp, fn) SET_by_offset(disp, _gloffset_DrawBuffer, fn) -#define CALL_Clear(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbitfield)), _gloffset_Clear, parameters) -#define GET_Clear(disp) GET_by_offset(disp, _gloffset_Clear) -#define SET_Clear(disp, fn) SET_by_offset(disp, _gloffset_Clear, fn) -#define CALL_ClearAccum(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ClearAccum, parameters) -#define GET_ClearAccum(disp) GET_by_offset(disp, _gloffset_ClearAccum) -#define SET_ClearAccum(disp, fn) SET_by_offset(disp, _gloffset_ClearAccum, fn) -#define CALL_ClearIndex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_ClearIndex, parameters) -#define GET_ClearIndex(disp) GET_by_offset(disp, _gloffset_ClearIndex) -#define SET_ClearIndex(disp, fn) SET_by_offset(disp, _gloffset_ClearIndex, fn) -#define CALL_ClearColor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLclampf, GLclampf, GLclampf)), _gloffset_ClearColor, parameters) -#define GET_ClearColor(disp) GET_by_offset(disp, _gloffset_ClearColor) -#define SET_ClearColor(disp, fn) SET_by_offset(disp, _gloffset_ClearColor, fn) -#define CALL_ClearStencil(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_ClearStencil, parameters) -#define GET_ClearStencil(disp) GET_by_offset(disp, _gloffset_ClearStencil) -#define SET_ClearStencil(disp, fn) SET_by_offset(disp, _gloffset_ClearStencil, fn) -#define CALL_ClearDepth(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampd)), _gloffset_ClearDepth, parameters) -#define GET_ClearDepth(disp) GET_by_offset(disp, _gloffset_ClearDepth) -#define SET_ClearDepth(disp, fn) SET_by_offset(disp, _gloffset_ClearDepth, fn) -#define CALL_StencilMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_StencilMask, parameters) -#define GET_StencilMask(disp) GET_by_offset(disp, _gloffset_StencilMask) -#define SET_StencilMask(disp, fn) SET_by_offset(disp, _gloffset_StencilMask, fn) -#define CALL_ColorMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLboolean, GLboolean, GLboolean, GLboolean)), _gloffset_ColorMask, parameters) -#define GET_ColorMask(disp) GET_by_offset(disp, _gloffset_ColorMask) -#define SET_ColorMask(disp, fn) SET_by_offset(disp, _gloffset_ColorMask, fn) -#define CALL_DepthMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLboolean)), _gloffset_DepthMask, parameters) -#define GET_DepthMask(disp) GET_by_offset(disp, _gloffset_DepthMask) -#define SET_DepthMask(disp, fn) SET_by_offset(disp, _gloffset_DepthMask, fn) -#define CALL_IndexMask(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_IndexMask, parameters) -#define GET_IndexMask(disp) GET_by_offset(disp, _gloffset_IndexMask) -#define SET_IndexMask(disp, fn) SET_by_offset(disp, _gloffset_IndexMask, fn) -#define CALL_Accum(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_Accum, parameters) -#define GET_Accum(disp) GET_by_offset(disp, _gloffset_Accum) -#define SET_Accum(disp, fn) SET_by_offset(disp, _gloffset_Accum, fn) -#define CALL_Disable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_Disable, parameters) -#define GET_Disable(disp) GET_by_offset(disp, _gloffset_Disable) -#define SET_Disable(disp, fn) SET_by_offset(disp, _gloffset_Disable, fn) -#define CALL_Enable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_Enable, parameters) -#define GET_Enable(disp) GET_by_offset(disp, _gloffset_Enable) -#define SET_Enable(disp, fn) SET_by_offset(disp, _gloffset_Enable, fn) -#define CALL_Finish(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_Finish, parameters) -#define GET_Finish(disp) GET_by_offset(disp, _gloffset_Finish) -#define SET_Finish(disp, fn) SET_by_offset(disp, _gloffset_Finish, fn) -#define CALL_Flush(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_Flush, parameters) -#define GET_Flush(disp) GET_by_offset(disp, _gloffset_Flush) -#define SET_Flush(disp, fn) SET_by_offset(disp, _gloffset_Flush, fn) -#define CALL_PopAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopAttrib, parameters) -#define GET_PopAttrib(disp) GET_by_offset(disp, _gloffset_PopAttrib) -#define SET_PopAttrib(disp, fn) SET_by_offset(disp, _gloffset_PopAttrib, fn) -#define CALL_PushAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbitfield)), _gloffset_PushAttrib, parameters) -#define GET_PushAttrib(disp) GET_by_offset(disp, _gloffset_PushAttrib) -#define SET_PushAttrib(disp, fn) SET_by_offset(disp, _gloffset_PushAttrib, fn) -#define CALL_Map1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLint, GLint, const GLdouble *)), _gloffset_Map1d, parameters) -#define GET_Map1d(disp) GET_by_offset(disp, _gloffset_Map1d) -#define SET_Map1d(disp, fn) SET_by_offset(disp, _gloffset_Map1d, fn) -#define CALL_Map1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLint, GLint, const GLfloat *)), _gloffset_Map1f, parameters) -#define GET_Map1f(disp) GET_by_offset(disp, _gloffset_Map1f) -#define SET_Map1f(disp, fn) SET_by_offset(disp, _gloffset_Map1f, fn) -#define CALL_Map2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *)), _gloffset_Map2d, parameters) -#define GET_Map2d(disp) GET_by_offset(disp, _gloffset_Map2d) -#define SET_Map2d(disp, fn) SET_by_offset(disp, _gloffset_Map2d, fn) -#define CALL_Map2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *)), _gloffset_Map2f, parameters) -#define GET_Map2f(disp) GET_by_offset(disp, _gloffset_Map2f) -#define SET_Map2f(disp, fn) SET_by_offset(disp, _gloffset_Map2f, fn) -#define CALL_MapGrid1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLdouble, GLdouble)), _gloffset_MapGrid1d, parameters) -#define GET_MapGrid1d(disp) GET_by_offset(disp, _gloffset_MapGrid1d) -#define SET_MapGrid1d(disp, fn) SET_by_offset(disp, _gloffset_MapGrid1d, fn) -#define CALL_MapGrid1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat)), _gloffset_MapGrid1f, parameters) -#define GET_MapGrid1f(disp) GET_by_offset(disp, _gloffset_MapGrid1f) -#define SET_MapGrid1f(disp, fn) SET_by_offset(disp, _gloffset_MapGrid1f, fn) -#define CALL_MapGrid2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLdouble, GLdouble, GLint, GLdouble, GLdouble)), _gloffset_MapGrid2d, parameters) -#define GET_MapGrid2d(disp) GET_by_offset(disp, _gloffset_MapGrid2d) -#define SET_MapGrid2d(disp, fn) SET_by_offset(disp, _gloffset_MapGrid2d, fn) -#define CALL_MapGrid2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat, GLint, GLfloat, GLfloat)), _gloffset_MapGrid2f, parameters) -#define GET_MapGrid2f(disp) GET_by_offset(disp, _gloffset_MapGrid2f) -#define SET_MapGrid2f(disp, fn) SET_by_offset(disp, _gloffset_MapGrid2f, fn) -#define CALL_EvalCoord1d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_EvalCoord1d, parameters) -#define GET_EvalCoord1d(disp) GET_by_offset(disp, _gloffset_EvalCoord1d) -#define SET_EvalCoord1d(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1d, fn) -#define CALL_EvalCoord1dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_EvalCoord1dv, parameters) -#define GET_EvalCoord1dv(disp) GET_by_offset(disp, _gloffset_EvalCoord1dv) -#define SET_EvalCoord1dv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1dv, fn) -#define CALL_EvalCoord1f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_EvalCoord1f, parameters) -#define GET_EvalCoord1f(disp) GET_by_offset(disp, _gloffset_EvalCoord1f) -#define SET_EvalCoord1f(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1f, fn) -#define CALL_EvalCoord1fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_EvalCoord1fv, parameters) -#define GET_EvalCoord1fv(disp) GET_by_offset(disp, _gloffset_EvalCoord1fv) -#define SET_EvalCoord1fv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord1fv, fn) -#define CALL_EvalCoord2d(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_EvalCoord2d, parameters) -#define GET_EvalCoord2d(disp) GET_by_offset(disp, _gloffset_EvalCoord2d) -#define SET_EvalCoord2d(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2d, fn) -#define CALL_EvalCoord2dv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_EvalCoord2dv, parameters) -#define GET_EvalCoord2dv(disp) GET_by_offset(disp, _gloffset_EvalCoord2dv) -#define SET_EvalCoord2dv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2dv, fn) -#define CALL_EvalCoord2f(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_EvalCoord2f, parameters) -#define GET_EvalCoord2f(disp) GET_by_offset(disp, _gloffset_EvalCoord2f) -#define SET_EvalCoord2f(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2f, fn) -#define CALL_EvalCoord2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_EvalCoord2fv, parameters) -#define GET_EvalCoord2fv(disp) GET_by_offset(disp, _gloffset_EvalCoord2fv) -#define SET_EvalCoord2fv(disp, fn) SET_by_offset(disp, _gloffset_EvalCoord2fv, fn) -#define CALL_EvalMesh1(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint)), _gloffset_EvalMesh1, parameters) -#define GET_EvalMesh1(disp) GET_by_offset(disp, _gloffset_EvalMesh1) -#define SET_EvalMesh1(disp, fn) SET_by_offset(disp, _gloffset_EvalMesh1, fn) -#define CALL_EvalPoint1(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_EvalPoint1, parameters) -#define GET_EvalPoint1(disp) GET_by_offset(disp, _gloffset_EvalPoint1) -#define SET_EvalPoint1(disp, fn) SET_by_offset(disp, _gloffset_EvalPoint1, fn) -#define CALL_EvalMesh2(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint)), _gloffset_EvalMesh2, parameters) -#define GET_EvalMesh2(disp) GET_by_offset(disp, _gloffset_EvalMesh2) -#define SET_EvalMesh2(disp, fn) SET_by_offset(disp, _gloffset_EvalMesh2, fn) -#define CALL_EvalPoint2(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_EvalPoint2, parameters) -#define GET_EvalPoint2(disp) GET_by_offset(disp, _gloffset_EvalPoint2) -#define SET_EvalPoint2(disp, fn) SET_by_offset(disp, _gloffset_EvalPoint2, fn) -#define CALL_AlphaFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLclampf)), _gloffset_AlphaFunc, parameters) -#define GET_AlphaFunc(disp) GET_by_offset(disp, _gloffset_AlphaFunc) -#define SET_AlphaFunc(disp, fn) SET_by_offset(disp, _gloffset_AlphaFunc, fn) -#define CALL_BlendFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_BlendFunc, parameters) -#define GET_BlendFunc(disp) GET_by_offset(disp, _gloffset_BlendFunc) -#define SET_BlendFunc(disp, fn) SET_by_offset(disp, _gloffset_BlendFunc, fn) -#define CALL_LogicOp(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_LogicOp, parameters) -#define GET_LogicOp(disp) GET_by_offset(disp, _gloffset_LogicOp) -#define SET_LogicOp(disp, fn) SET_by_offset(disp, _gloffset_LogicOp, fn) -#define CALL_StencilFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLuint)), _gloffset_StencilFunc, parameters) -#define GET_StencilFunc(disp) GET_by_offset(disp, _gloffset_StencilFunc) -#define SET_StencilFunc(disp, fn) SET_by_offset(disp, _gloffset_StencilFunc, fn) -#define CALL_StencilOp(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum)), _gloffset_StencilOp, parameters) -#define GET_StencilOp(disp) GET_by_offset(disp, _gloffset_StencilOp) -#define SET_StencilOp(disp, fn) SET_by_offset(disp, _gloffset_StencilOp, fn) -#define CALL_DepthFunc(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_DepthFunc, parameters) -#define GET_DepthFunc(disp) GET_by_offset(disp, _gloffset_DepthFunc) -#define SET_DepthFunc(disp, fn) SET_by_offset(disp, _gloffset_DepthFunc, fn) -#define CALL_PixelZoom(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_PixelZoom, parameters) -#define GET_PixelZoom(disp) GET_by_offset(disp, _gloffset_PixelZoom) -#define SET_PixelZoom(disp, fn) SET_by_offset(disp, _gloffset_PixelZoom, fn) -#define CALL_PixelTransferf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PixelTransferf, parameters) -#define GET_PixelTransferf(disp) GET_by_offset(disp, _gloffset_PixelTransferf) -#define SET_PixelTransferf(disp, fn) SET_by_offset(disp, _gloffset_PixelTransferf, fn) -#define CALL_PixelTransferi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PixelTransferi, parameters) -#define GET_PixelTransferi(disp) GET_by_offset(disp, _gloffset_PixelTransferi) -#define SET_PixelTransferi(disp, fn) SET_by_offset(disp, _gloffset_PixelTransferi, fn) -#define CALL_PixelStoref(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PixelStoref, parameters) -#define GET_PixelStoref(disp) GET_by_offset(disp, _gloffset_PixelStoref) -#define SET_PixelStoref(disp, fn) SET_by_offset(disp, _gloffset_PixelStoref, fn) -#define CALL_PixelStorei(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PixelStorei, parameters) -#define GET_PixelStorei(disp) GET_by_offset(disp, _gloffset_PixelStorei) -#define SET_PixelStorei(disp, fn) SET_by_offset(disp, _gloffset_PixelStorei, fn) -#define CALL_PixelMapfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLfloat *)), _gloffset_PixelMapfv, parameters) -#define GET_PixelMapfv(disp) GET_by_offset(disp, _gloffset_PixelMapfv) -#define SET_PixelMapfv(disp, fn) SET_by_offset(disp, _gloffset_PixelMapfv, fn) -#define CALL_PixelMapuiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLuint *)), _gloffset_PixelMapuiv, parameters) -#define GET_PixelMapuiv(disp) GET_by_offset(disp, _gloffset_PixelMapuiv) -#define SET_PixelMapuiv(disp, fn) SET_by_offset(disp, _gloffset_PixelMapuiv, fn) -#define CALL_PixelMapusv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLushort *)), _gloffset_PixelMapusv, parameters) -#define GET_PixelMapusv(disp) GET_by_offset(disp, _gloffset_PixelMapusv) -#define SET_PixelMapusv(disp, fn) SET_by_offset(disp, _gloffset_PixelMapusv, fn) -#define CALL_ReadBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ReadBuffer, parameters) -#define GET_ReadBuffer(disp) GET_by_offset(disp, _gloffset_ReadBuffer) -#define SET_ReadBuffer(disp, fn) SET_by_offset(disp, _gloffset_ReadBuffer, fn) -#define CALL_CopyPixels(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei, GLenum)), _gloffset_CopyPixels, parameters) -#define GET_CopyPixels(disp) GET_by_offset(disp, _gloffset_CopyPixels) -#define SET_CopyPixels(disp, fn) SET_by_offset(disp, _gloffset_CopyPixels, fn) -#define CALL_ReadPixels(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *)), _gloffset_ReadPixels, parameters) -#define GET_ReadPixels(disp) GET_by_offset(disp, _gloffset_ReadPixels) -#define SET_ReadPixels(disp, fn) SET_by_offset(disp, _gloffset_ReadPixels, fn) -#define CALL_DrawPixels(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_DrawPixels, parameters) -#define GET_DrawPixels(disp) GET_by_offset(disp, _gloffset_DrawPixels) -#define SET_DrawPixels(disp, fn) SET_by_offset(disp, _gloffset_DrawPixels, fn) -#define CALL_GetBooleanv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLboolean *)), _gloffset_GetBooleanv, parameters) -#define GET_GetBooleanv(disp) GET_by_offset(disp, _gloffset_GetBooleanv) -#define SET_GetBooleanv(disp, fn) SET_by_offset(disp, _gloffset_GetBooleanv, fn) -#define CALL_GetClipPlane(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble *)), _gloffset_GetClipPlane, parameters) -#define GET_GetClipPlane(disp) GET_by_offset(disp, _gloffset_GetClipPlane) -#define SET_GetClipPlane(disp, fn) SET_by_offset(disp, _gloffset_GetClipPlane, fn) -#define CALL_GetDoublev(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble *)), _gloffset_GetDoublev, parameters) -#define GET_GetDoublev(disp) GET_by_offset(disp, _gloffset_GetDoublev) -#define SET_GetDoublev(disp, fn) SET_by_offset(disp, _gloffset_GetDoublev, fn) -#define CALL_GetError(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(void)), _gloffset_GetError, parameters) -#define GET_GetError(disp) GET_by_offset(disp, _gloffset_GetError) -#define SET_GetError(disp, fn) SET_by_offset(disp, _gloffset_GetError, fn) -#define CALL_GetFloatv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetFloatv, parameters) -#define GET_GetFloatv(disp) GET_by_offset(disp, _gloffset_GetFloatv) -#define SET_GetFloatv(disp, fn) SET_by_offset(disp, _gloffset_GetFloatv, fn) -#define CALL_GetIntegerv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *)), _gloffset_GetIntegerv, parameters) -#define GET_GetIntegerv(disp) GET_by_offset(disp, _gloffset_GetIntegerv) -#define SET_GetIntegerv(disp, fn) SET_by_offset(disp, _gloffset_GetIntegerv, fn) -#define CALL_GetLightfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetLightfv, parameters) -#define GET_GetLightfv(disp) GET_by_offset(disp, _gloffset_GetLightfv) -#define SET_GetLightfv(disp, fn) SET_by_offset(disp, _gloffset_GetLightfv, fn) -#define CALL_GetLightiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetLightiv, parameters) -#define GET_GetLightiv(disp) GET_by_offset(disp, _gloffset_GetLightiv) -#define SET_GetLightiv(disp, fn) SET_by_offset(disp, _gloffset_GetLightiv, fn) -#define CALL_GetMapdv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLdouble *)), _gloffset_GetMapdv, parameters) -#define GET_GetMapdv(disp) GET_by_offset(disp, _gloffset_GetMapdv) -#define SET_GetMapdv(disp, fn) SET_by_offset(disp, _gloffset_GetMapdv, fn) -#define CALL_GetMapfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetMapfv, parameters) -#define GET_GetMapfv(disp) GET_by_offset(disp, _gloffset_GetMapfv) -#define SET_GetMapfv(disp, fn) SET_by_offset(disp, _gloffset_GetMapfv, fn) -#define CALL_GetMapiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetMapiv, parameters) -#define GET_GetMapiv(disp) GET_by_offset(disp, _gloffset_GetMapiv) -#define SET_GetMapiv(disp, fn) SET_by_offset(disp, _gloffset_GetMapiv, fn) -#define CALL_GetMaterialfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetMaterialfv, parameters) -#define GET_GetMaterialfv(disp) GET_by_offset(disp, _gloffset_GetMaterialfv) -#define SET_GetMaterialfv(disp, fn) SET_by_offset(disp, _gloffset_GetMaterialfv, fn) -#define CALL_GetMaterialiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetMaterialiv, parameters) -#define GET_GetMaterialiv(disp) GET_by_offset(disp, _gloffset_GetMaterialiv) -#define SET_GetMaterialiv(disp, fn) SET_by_offset(disp, _gloffset_GetMaterialiv, fn) -#define CALL_GetPixelMapfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetPixelMapfv, parameters) -#define GET_GetPixelMapfv(disp) GET_by_offset(disp, _gloffset_GetPixelMapfv) -#define SET_GetPixelMapfv(disp, fn) SET_by_offset(disp, _gloffset_GetPixelMapfv, fn) -#define CALL_GetPixelMapuiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint *)), _gloffset_GetPixelMapuiv, parameters) -#define GET_GetPixelMapuiv(disp) GET_by_offset(disp, _gloffset_GetPixelMapuiv) -#define SET_GetPixelMapuiv(disp, fn) SET_by_offset(disp, _gloffset_GetPixelMapuiv, fn) -#define CALL_GetPixelMapusv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLushort *)), _gloffset_GetPixelMapusv, parameters) -#define GET_GetPixelMapusv(disp) GET_by_offset(disp, _gloffset_GetPixelMapusv) -#define SET_GetPixelMapusv(disp, fn) SET_by_offset(disp, _gloffset_GetPixelMapusv, fn) -#define CALL_GetPolygonStipple(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte *)), _gloffset_GetPolygonStipple, parameters) -#define GET_GetPolygonStipple(disp) GET_by_offset(disp, _gloffset_GetPolygonStipple) -#define SET_GetPolygonStipple(disp, fn) SET_by_offset(disp, _gloffset_GetPolygonStipple, fn) -#define CALL_GetString(disp, parameters) CALL_by_offset(disp, (const GLubyte * (GLAPIENTRYP)(GLenum)), _gloffset_GetString, parameters) -#define GET_GetString(disp) GET_by_offset(disp, _gloffset_GetString) -#define SET_GetString(disp, fn) SET_by_offset(disp, _gloffset_GetString, fn) -#define CALL_GetTexEnvfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetTexEnvfv, parameters) -#define GET_GetTexEnvfv(disp) GET_by_offset(disp, _gloffset_GetTexEnvfv) -#define SET_GetTexEnvfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexEnvfv, fn) -#define CALL_GetTexEnviv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexEnviv, parameters) -#define GET_GetTexEnviv(disp) GET_by_offset(disp, _gloffset_GetTexEnviv) -#define SET_GetTexEnviv(disp, fn) SET_by_offset(disp, _gloffset_GetTexEnviv, fn) -#define CALL_GetTexGendv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLdouble *)), _gloffset_GetTexGendv, parameters) -#define GET_GetTexGendv(disp) GET_by_offset(disp, _gloffset_GetTexGendv) -#define SET_GetTexGendv(disp, fn) SET_by_offset(disp, _gloffset_GetTexGendv, fn) -#define CALL_GetTexGenfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetTexGenfv, parameters) -#define GET_GetTexGenfv(disp) GET_by_offset(disp, _gloffset_GetTexGenfv) -#define SET_GetTexGenfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexGenfv, fn) -#define CALL_GetTexGeniv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexGeniv, parameters) -#define GET_GetTexGeniv(disp) GET_by_offset(disp, _gloffset_GetTexGeniv) -#define SET_GetTexGeniv(disp, fn) SET_by_offset(disp, _gloffset_GetTexGeniv, fn) -#define CALL_GetTexImage(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLenum, GLvoid *)), _gloffset_GetTexImage, parameters) -#define GET_GetTexImage(disp) GET_by_offset(disp, _gloffset_GetTexImage) -#define SET_GetTexImage(disp, fn) SET_by_offset(disp, _gloffset_GetTexImage, fn) -#define CALL_GetTexParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetTexParameterfv, parameters) -#define GET_GetTexParameterfv(disp) GET_by_offset(disp, _gloffset_GetTexParameterfv) -#define SET_GetTexParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterfv, fn) -#define CALL_GetTexParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexParameteriv, parameters) -#define GET_GetTexParameteriv(disp) GET_by_offset(disp, _gloffset_GetTexParameteriv) -#define SET_GetTexParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameteriv, fn) -#define CALL_GetTexLevelParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLfloat *)), _gloffset_GetTexLevelParameterfv, parameters) -#define GET_GetTexLevelParameterfv(disp) GET_by_offset(disp, _gloffset_GetTexLevelParameterfv) -#define SET_GetTexLevelParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetTexLevelParameterfv, fn) -#define CALL_GetTexLevelParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLint *)), _gloffset_GetTexLevelParameteriv, parameters) -#define GET_GetTexLevelParameteriv(disp) GET_by_offset(disp, _gloffset_GetTexLevelParameteriv) -#define SET_GetTexLevelParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetTexLevelParameteriv, fn) -#define CALL_IsEnabled(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLenum)), _gloffset_IsEnabled, parameters) -#define GET_IsEnabled(disp) GET_by_offset(disp, _gloffset_IsEnabled) -#define SET_IsEnabled(disp, fn) SET_by_offset(disp, _gloffset_IsEnabled, fn) -#define CALL_IsList(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsList, parameters) -#define GET_IsList(disp) GET_by_offset(disp, _gloffset_IsList) -#define SET_IsList(disp, fn) SET_by_offset(disp, _gloffset_IsList, fn) -#define CALL_DepthRange(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampd, GLclampd)), _gloffset_DepthRange, parameters) -#define GET_DepthRange(disp) GET_by_offset(disp, _gloffset_DepthRange) -#define SET_DepthRange(disp, fn) SET_by_offset(disp, _gloffset_DepthRange, fn) -#define CALL_Frustum(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Frustum, parameters) -#define GET_Frustum(disp) GET_by_offset(disp, _gloffset_Frustum) -#define SET_Frustum(disp, fn) SET_by_offset(disp, _gloffset_Frustum, fn) -#define CALL_LoadIdentity(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_LoadIdentity, parameters) -#define GET_LoadIdentity(disp) GET_by_offset(disp, _gloffset_LoadIdentity) -#define SET_LoadIdentity(disp, fn) SET_by_offset(disp, _gloffset_LoadIdentity, fn) -#define CALL_LoadMatrixf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_LoadMatrixf, parameters) -#define GET_LoadMatrixf(disp) GET_by_offset(disp, _gloffset_LoadMatrixf) -#define SET_LoadMatrixf(disp, fn) SET_by_offset(disp, _gloffset_LoadMatrixf, fn) -#define CALL_LoadMatrixd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_LoadMatrixd, parameters) -#define GET_LoadMatrixd(disp) GET_by_offset(disp, _gloffset_LoadMatrixd) -#define SET_LoadMatrixd(disp, fn) SET_by_offset(disp, _gloffset_LoadMatrixd, fn) -#define CALL_MatrixMode(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_MatrixMode, parameters) -#define GET_MatrixMode(disp) GET_by_offset(disp, _gloffset_MatrixMode) -#define SET_MatrixMode(disp, fn) SET_by_offset(disp, _gloffset_MatrixMode, fn) -#define CALL_MultMatrixf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_MultMatrixf, parameters) -#define GET_MultMatrixf(disp) GET_by_offset(disp, _gloffset_MultMatrixf) -#define SET_MultMatrixf(disp, fn) SET_by_offset(disp, _gloffset_MultMatrixf, fn) -#define CALL_MultMatrixd(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_MultMatrixd, parameters) -#define GET_MultMatrixd(disp) GET_by_offset(disp, _gloffset_MultMatrixd) -#define SET_MultMatrixd(disp, fn) SET_by_offset(disp, _gloffset_MultMatrixd, fn) -#define CALL_Ortho(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Ortho, parameters) -#define GET_Ortho(disp) GET_by_offset(disp, _gloffset_Ortho) -#define SET_Ortho(disp, fn) SET_by_offset(disp, _gloffset_Ortho, fn) -#define CALL_PopMatrix(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopMatrix, parameters) -#define GET_PopMatrix(disp) GET_by_offset(disp, _gloffset_PopMatrix) -#define SET_PopMatrix(disp, fn) SET_by_offset(disp, _gloffset_PopMatrix, fn) -#define CALL_PushMatrix(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PushMatrix, parameters) -#define GET_PushMatrix(disp) GET_by_offset(disp, _gloffset_PushMatrix) -#define SET_PushMatrix(disp, fn) SET_by_offset(disp, _gloffset_PushMatrix, fn) -#define CALL_Rotated(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_Rotated, parameters) -#define GET_Rotated(disp) GET_by_offset(disp, _gloffset_Rotated) -#define SET_Rotated(disp, fn) SET_by_offset(disp, _gloffset_Rotated, fn) -#define CALL_Rotatef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Rotatef, parameters) -#define GET_Rotatef(disp) GET_by_offset(disp, _gloffset_Rotatef) -#define SET_Rotatef(disp, fn) SET_by_offset(disp, _gloffset_Rotatef, fn) -#define CALL_Scaled(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Scaled, parameters) -#define GET_Scaled(disp) GET_by_offset(disp, _gloffset_Scaled) -#define SET_Scaled(disp, fn) SET_by_offset(disp, _gloffset_Scaled, fn) -#define CALL_Scalef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Scalef, parameters) -#define GET_Scalef(disp) GET_by_offset(disp, _gloffset_Scalef) -#define SET_Scalef(disp, fn) SET_by_offset(disp, _gloffset_Scalef, fn) -#define CALL_Translated(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_Translated, parameters) -#define GET_Translated(disp) GET_by_offset(disp, _gloffset_Translated) -#define SET_Translated(disp, fn) SET_by_offset(disp, _gloffset_Translated, fn) -#define CALL_Translatef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_Translatef, parameters) -#define GET_Translatef(disp) GET_by_offset(disp, _gloffset_Translatef) -#define SET_Translatef(disp, fn) SET_by_offset(disp, _gloffset_Translatef, fn) -#define CALL_Viewport(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei)), _gloffset_Viewport, parameters) -#define GET_Viewport(disp) GET_by_offset(disp, _gloffset_Viewport) -#define SET_Viewport(disp, fn) SET_by_offset(disp, _gloffset_Viewport, fn) -#define CALL_ArrayElement(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint)), _gloffset_ArrayElement, parameters) -#define GET_ArrayElement(disp) GET_by_offset(disp, _gloffset_ArrayElement) -#define SET_ArrayElement(disp, fn) SET_by_offset(disp, _gloffset_ArrayElement, fn) -#define CALL_BindTexture(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindTexture, parameters) -#define GET_BindTexture(disp) GET_by_offset(disp, _gloffset_BindTexture) -#define SET_BindTexture(disp, fn) SET_by_offset(disp, _gloffset_BindTexture, fn) -#define CALL_ColorPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_ColorPointer, parameters) -#define GET_ColorPointer(disp) GET_by_offset(disp, _gloffset_ColorPointer) -#define SET_ColorPointer(disp, fn) SET_by_offset(disp, _gloffset_ColorPointer, fn) -#define CALL_DisableClientState(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_DisableClientState, parameters) -#define GET_DisableClientState(disp) GET_by_offset(disp, _gloffset_DisableClientState) -#define SET_DisableClientState(disp, fn) SET_by_offset(disp, _gloffset_DisableClientState, fn) -#define CALL_DrawArrays(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLsizei)), _gloffset_DrawArrays, parameters) -#define GET_DrawArrays(disp) GET_by_offset(disp, _gloffset_DrawArrays) -#define SET_DrawArrays(disp, fn) SET_by_offset(disp, _gloffset_DrawArrays, fn) -#define CALL_DrawElements(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, const GLvoid *)), _gloffset_DrawElements, parameters) -#define GET_DrawElements(disp) GET_by_offset(disp, _gloffset_DrawElements) -#define SET_DrawElements(disp, fn) SET_by_offset(disp, _gloffset_DrawElements, fn) -#define CALL_EdgeFlagPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLvoid *)), _gloffset_EdgeFlagPointer, parameters) -#define GET_EdgeFlagPointer(disp) GET_by_offset(disp, _gloffset_EdgeFlagPointer) -#define SET_EdgeFlagPointer(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlagPointer, fn) -#define CALL_EnableClientState(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_EnableClientState, parameters) -#define GET_EnableClientState(disp) GET_by_offset(disp, _gloffset_EnableClientState) -#define SET_EnableClientState(disp, fn) SET_by_offset(disp, _gloffset_EnableClientState, fn) -#define CALL_IndexPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_IndexPointer, parameters) -#define GET_IndexPointer(disp) GET_by_offset(disp, _gloffset_IndexPointer) -#define SET_IndexPointer(disp, fn) SET_by_offset(disp, _gloffset_IndexPointer, fn) -#define CALL_Indexub(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte)), _gloffset_Indexub, parameters) -#define GET_Indexub(disp) GET_by_offset(disp, _gloffset_Indexub) -#define SET_Indexub(disp, fn) SET_by_offset(disp, _gloffset_Indexub, fn) -#define CALL_Indexubv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_Indexubv, parameters) -#define GET_Indexubv(disp) GET_by_offset(disp, _gloffset_Indexubv) -#define SET_Indexubv(disp, fn) SET_by_offset(disp, _gloffset_Indexubv, fn) -#define CALL_InterleavedArrays(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_InterleavedArrays, parameters) -#define GET_InterleavedArrays(disp) GET_by_offset(disp, _gloffset_InterleavedArrays) -#define SET_InterleavedArrays(disp, fn) SET_by_offset(disp, _gloffset_InterleavedArrays, fn) -#define CALL_NormalPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_NormalPointer, parameters) -#define GET_NormalPointer(disp) GET_by_offset(disp, _gloffset_NormalPointer) -#define SET_NormalPointer(disp, fn) SET_by_offset(disp, _gloffset_NormalPointer, fn) -#define CALL_PolygonOffset(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_PolygonOffset, parameters) -#define GET_PolygonOffset(disp) GET_by_offset(disp, _gloffset_PolygonOffset) -#define SET_PolygonOffset(disp, fn) SET_by_offset(disp, _gloffset_PolygonOffset, fn) -#define CALL_TexCoordPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_TexCoordPointer, parameters) -#define GET_TexCoordPointer(disp) GET_by_offset(disp, _gloffset_TexCoordPointer) -#define SET_TexCoordPointer(disp, fn) SET_by_offset(disp, _gloffset_TexCoordPointer, fn) -#define CALL_VertexPointer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_VertexPointer, parameters) -#define GET_VertexPointer(disp) GET_by_offset(disp, _gloffset_VertexPointer) -#define SET_VertexPointer(disp, fn) SET_by_offset(disp, _gloffset_VertexPointer, fn) -#define CALL_AreTexturesResident(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLsizei, const GLuint *, GLboolean *)), _gloffset_AreTexturesResident, parameters) -#define GET_AreTexturesResident(disp) GET_by_offset(disp, _gloffset_AreTexturesResident) -#define SET_AreTexturesResident(disp, fn) SET_by_offset(disp, _gloffset_AreTexturesResident, fn) -#define CALL_CopyTexImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint)), _gloffset_CopyTexImage1D, parameters) -#define GET_CopyTexImage1D(disp) GET_by_offset(disp, _gloffset_CopyTexImage1D) -#define SET_CopyTexImage1D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexImage1D, fn) -#define CALL_CopyTexImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint)), _gloffset_CopyTexImage2D, parameters) -#define GET_CopyTexImage2D(disp) GET_by_offset(disp, _gloffset_CopyTexImage2D) -#define SET_CopyTexImage2D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexImage2D, fn) -#define CALL_CopyTexSubImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei)), _gloffset_CopyTexSubImage1D, parameters) -#define GET_CopyTexSubImage1D(disp) GET_by_offset(disp, _gloffset_CopyTexSubImage1D) -#define SET_CopyTexSubImage1D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexSubImage1D, fn) -#define CALL_CopyTexSubImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)), _gloffset_CopyTexSubImage2D, parameters) -#define GET_CopyTexSubImage2D(disp) GET_by_offset(disp, _gloffset_CopyTexSubImage2D) -#define SET_CopyTexSubImage2D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexSubImage2D, fn) -#define CALL_DeleteTextures(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteTextures, parameters) -#define GET_DeleteTextures(disp) GET_by_offset(disp, _gloffset_DeleteTextures) -#define SET_DeleteTextures(disp, fn) SET_by_offset(disp, _gloffset_DeleteTextures, fn) -#define CALL_GenTextures(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenTextures, parameters) -#define GET_GenTextures(disp) GET_by_offset(disp, _gloffset_GenTextures) -#define SET_GenTextures(disp, fn) SET_by_offset(disp, _gloffset_GenTextures, fn) -#define CALL_GetPointerv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLvoid **)), _gloffset_GetPointerv, parameters) -#define GET_GetPointerv(disp) GET_by_offset(disp, _gloffset_GetPointerv) -#define SET_GetPointerv(disp, fn) SET_by_offset(disp, _gloffset_GetPointerv, fn) -#define CALL_IsTexture(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsTexture, parameters) -#define GET_IsTexture(disp) GET_by_offset(disp, _gloffset_IsTexture) -#define SET_IsTexture(disp, fn) SET_by_offset(disp, _gloffset_IsTexture, fn) -#define CALL_PrioritizeTextures(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *, const GLclampf *)), _gloffset_PrioritizeTextures, parameters) -#define GET_PrioritizeTextures(disp) GET_by_offset(disp, _gloffset_PrioritizeTextures) -#define SET_PrioritizeTextures(disp, fn) SET_by_offset(disp, _gloffset_PrioritizeTextures, fn) -#define CALL_TexSubImage1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_TexSubImage1D, parameters) -#define GET_TexSubImage1D(disp) GET_by_offset(disp, _gloffset_TexSubImage1D) -#define SET_TexSubImage1D(disp, fn) SET_by_offset(disp, _gloffset_TexSubImage1D, fn) -#define CALL_TexSubImage2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_TexSubImage2D, parameters) -#define GET_TexSubImage2D(disp) GET_by_offset(disp, _gloffset_TexSubImage2D) -#define SET_TexSubImage2D(disp, fn) SET_by_offset(disp, _gloffset_TexSubImage2D, fn) -#define CALL_PopClientAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PopClientAttrib, parameters) -#define GET_PopClientAttrib(disp) GET_by_offset(disp, _gloffset_PopClientAttrib) -#define SET_PopClientAttrib(disp, fn) SET_by_offset(disp, _gloffset_PopClientAttrib, fn) -#define CALL_PushClientAttrib(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbitfield)), _gloffset_PushClientAttrib, parameters) -#define GET_PushClientAttrib(disp) GET_by_offset(disp, _gloffset_PushClientAttrib) -#define SET_PushClientAttrib(disp, fn) SET_by_offset(disp, _gloffset_PushClientAttrib, fn) -#define CALL_BlendColor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLclampf, GLclampf, GLclampf)), _gloffset_BlendColor, parameters) -#define GET_BlendColor(disp) GET_by_offset(disp, _gloffset_BlendColor) -#define SET_BlendColor(disp, fn) SET_by_offset(disp, _gloffset_BlendColor, fn) -#define CALL_BlendEquation(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_BlendEquation, parameters) -#define GET_BlendEquation(disp) GET_by_offset(disp, _gloffset_BlendEquation) -#define SET_BlendEquation(disp, fn) SET_by_offset(disp, _gloffset_BlendEquation, fn) -#define CALL_DrawRangeElements(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *)), _gloffset_DrawRangeElements, parameters) -#define GET_DrawRangeElements(disp) GET_by_offset(disp, _gloffset_DrawRangeElements) -#define SET_DrawRangeElements(disp, fn) SET_by_offset(disp, _gloffset_DrawRangeElements, fn) -#define CALL_ColorTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ColorTable, parameters) -#define GET_ColorTable(disp) GET_by_offset(disp, _gloffset_ColorTable) -#define SET_ColorTable(disp, fn) SET_by_offset(disp, _gloffset_ColorTable, fn) -#define CALL_ColorTableParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_ColorTableParameterfv, parameters) -#define GET_ColorTableParameterfv(disp) GET_by_offset(disp, _gloffset_ColorTableParameterfv) -#define SET_ColorTableParameterfv(disp, fn) SET_by_offset(disp, _gloffset_ColorTableParameterfv, fn) -#define CALL_ColorTableParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_ColorTableParameteriv, parameters) -#define GET_ColorTableParameteriv(disp) GET_by_offset(disp, _gloffset_ColorTableParameteriv) -#define SET_ColorTableParameteriv(disp, fn) SET_by_offset(disp, _gloffset_ColorTableParameteriv, fn) -#define CALL_CopyColorTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLint, GLsizei)), _gloffset_CopyColorTable, parameters) -#define GET_CopyColorTable(disp) GET_by_offset(disp, _gloffset_CopyColorTable) -#define SET_CopyColorTable(disp, fn) SET_by_offset(disp, _gloffset_CopyColorTable, fn) -#define CALL_GetColorTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLvoid *)), _gloffset_GetColorTable, parameters) -#define GET_GetColorTable(disp) GET_by_offset(disp, _gloffset_GetColorTable) -#define SET_GetColorTable(disp, fn) SET_by_offset(disp, _gloffset_GetColorTable, fn) -#define CALL_GetColorTableParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetColorTableParameterfv, parameters) -#define GET_GetColorTableParameterfv(disp) GET_by_offset(disp, _gloffset_GetColorTableParameterfv) -#define SET_GetColorTableParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetColorTableParameterfv, fn) -#define CALL_GetColorTableParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetColorTableParameteriv, parameters) -#define GET_GetColorTableParameteriv(disp) GET_by_offset(disp, _gloffset_GetColorTableParameteriv) -#define SET_GetColorTableParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetColorTableParameteriv, fn) -#define CALL_ColorSubTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ColorSubTable, parameters) -#define GET_ColorSubTable(disp) GET_by_offset(disp, _gloffset_ColorSubTable) -#define SET_ColorSubTable(disp, fn) SET_by_offset(disp, _gloffset_ColorSubTable, fn) -#define CALL_CopyColorSubTable(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLint, GLint, GLsizei)), _gloffset_CopyColorSubTable, parameters) -#define GET_CopyColorSubTable(disp) GET_by_offset(disp, _gloffset_CopyColorSubTable) -#define SET_CopyColorSubTable(disp, fn) SET_by_offset(disp, _gloffset_CopyColorSubTable, fn) -#define CALL_ConvolutionFilter1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ConvolutionFilter1D, parameters) -#define GET_ConvolutionFilter1D(disp) GET_by_offset(disp, _gloffset_ConvolutionFilter1D) -#define SET_ConvolutionFilter1D(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionFilter1D, fn) -#define CALL_ConvolutionFilter2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_ConvolutionFilter2D, parameters) -#define GET_ConvolutionFilter2D(disp) GET_by_offset(disp, _gloffset_ConvolutionFilter2D) -#define SET_ConvolutionFilter2D(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionFilter2D, fn) -#define CALL_ConvolutionParameterf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat)), _gloffset_ConvolutionParameterf, parameters) -#define GET_ConvolutionParameterf(disp) GET_by_offset(disp, _gloffset_ConvolutionParameterf) -#define SET_ConvolutionParameterf(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameterf, fn) -#define CALL_ConvolutionParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLfloat *)), _gloffset_ConvolutionParameterfv, parameters) -#define GET_ConvolutionParameterfv(disp) GET_by_offset(disp, _gloffset_ConvolutionParameterfv) -#define SET_ConvolutionParameterfv(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameterfv, fn) -#define CALL_ConvolutionParameteri(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_ConvolutionParameteri, parameters) -#define GET_ConvolutionParameteri(disp) GET_by_offset(disp, _gloffset_ConvolutionParameteri) -#define SET_ConvolutionParameteri(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameteri, fn) -#define CALL_ConvolutionParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_ConvolutionParameteriv, parameters) -#define GET_ConvolutionParameteriv(disp) GET_by_offset(disp, _gloffset_ConvolutionParameteriv) -#define SET_ConvolutionParameteriv(disp, fn) SET_by_offset(disp, _gloffset_ConvolutionParameteriv, fn) -#define CALL_CopyConvolutionFilter1D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLint, GLsizei)), _gloffset_CopyConvolutionFilter1D, parameters) -#define GET_CopyConvolutionFilter1D(disp) GET_by_offset(disp, _gloffset_CopyConvolutionFilter1D) -#define SET_CopyConvolutionFilter1D(disp, fn) SET_by_offset(disp, _gloffset_CopyConvolutionFilter1D, fn) -#define CALL_CopyConvolutionFilter2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLint, GLsizei, GLsizei)), _gloffset_CopyConvolutionFilter2D, parameters) -#define GET_CopyConvolutionFilter2D(disp) GET_by_offset(disp, _gloffset_CopyConvolutionFilter2D) -#define SET_CopyConvolutionFilter2D(disp, fn) SET_by_offset(disp, _gloffset_CopyConvolutionFilter2D, fn) -#define CALL_GetConvolutionFilter(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLvoid *)), _gloffset_GetConvolutionFilter, parameters) -#define GET_GetConvolutionFilter(disp) GET_by_offset(disp, _gloffset_GetConvolutionFilter) -#define SET_GetConvolutionFilter(disp, fn) SET_by_offset(disp, _gloffset_GetConvolutionFilter, fn) -#define CALL_GetConvolutionParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetConvolutionParameterfv, parameters) -#define GET_GetConvolutionParameterfv(disp) GET_by_offset(disp, _gloffset_GetConvolutionParameterfv) -#define SET_GetConvolutionParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetConvolutionParameterfv, fn) -#define CALL_GetConvolutionParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetConvolutionParameteriv, parameters) -#define GET_GetConvolutionParameteriv(disp) GET_by_offset(disp, _gloffset_GetConvolutionParameteriv) -#define SET_GetConvolutionParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetConvolutionParameteriv, fn) -#define CALL_GetSeparableFilter(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *)), _gloffset_GetSeparableFilter, parameters) -#define GET_GetSeparableFilter(disp) GET_by_offset(disp, _gloffset_GetSeparableFilter) -#define SET_GetSeparableFilter(disp, fn) SET_by_offset(disp, _gloffset_GetSeparableFilter, fn) -#define CALL_SeparableFilter2D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *)), _gloffset_SeparableFilter2D, parameters) -#define GET_SeparableFilter2D(disp) GET_by_offset(disp, _gloffset_SeparableFilter2D) -#define SET_SeparableFilter2D(disp, fn) SET_by_offset(disp, _gloffset_SeparableFilter2D, fn) -#define CALL_GetHistogram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLboolean, GLenum, GLenum, GLvoid *)), _gloffset_GetHistogram, parameters) -#define GET_GetHistogram(disp) GET_by_offset(disp, _gloffset_GetHistogram) -#define SET_GetHistogram(disp, fn) SET_by_offset(disp, _gloffset_GetHistogram, fn) -#define CALL_GetHistogramParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetHistogramParameterfv, parameters) -#define GET_GetHistogramParameterfv(disp) GET_by_offset(disp, _gloffset_GetHistogramParameterfv) -#define SET_GetHistogramParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetHistogramParameterfv, fn) -#define CALL_GetHistogramParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetHistogramParameteriv, parameters) -#define GET_GetHistogramParameteriv(disp) GET_by_offset(disp, _gloffset_GetHistogramParameteriv) -#define SET_GetHistogramParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetHistogramParameteriv, fn) -#define CALL_GetMinmax(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLboolean, GLenum, GLenum, GLvoid *)), _gloffset_GetMinmax, parameters) -#define GET_GetMinmax(disp) GET_by_offset(disp, _gloffset_GetMinmax) -#define SET_GetMinmax(disp, fn) SET_by_offset(disp, _gloffset_GetMinmax, fn) -#define CALL_GetMinmaxParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetMinmaxParameterfv, parameters) -#define GET_GetMinmaxParameterfv(disp) GET_by_offset(disp, _gloffset_GetMinmaxParameterfv) -#define SET_GetMinmaxParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetMinmaxParameterfv, fn) -#define CALL_GetMinmaxParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetMinmaxParameteriv, parameters) -#define GET_GetMinmaxParameteriv(disp) GET_by_offset(disp, _gloffset_GetMinmaxParameteriv) -#define SET_GetMinmaxParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetMinmaxParameteriv, fn) -#define CALL_Histogram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, GLboolean)), _gloffset_Histogram, parameters) -#define GET_Histogram(disp) GET_by_offset(disp, _gloffset_Histogram) -#define SET_Histogram(disp, fn) SET_by_offset(disp, _gloffset_Histogram, fn) -#define CALL_Minmax(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLboolean)), _gloffset_Minmax, parameters) -#define GET_Minmax(disp) GET_by_offset(disp, _gloffset_Minmax) -#define SET_Minmax(disp, fn) SET_by_offset(disp, _gloffset_Minmax, fn) -#define CALL_ResetHistogram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ResetHistogram, parameters) -#define GET_ResetHistogram(disp) GET_by_offset(disp, _gloffset_ResetHistogram) -#define SET_ResetHistogram(disp, fn) SET_by_offset(disp, _gloffset_ResetHistogram, fn) -#define CALL_ResetMinmax(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ResetMinmax, parameters) -#define GET_ResetMinmax(disp) GET_by_offset(disp, _gloffset_ResetMinmax) -#define SET_ResetMinmax(disp, fn) SET_by_offset(disp, _gloffset_ResetMinmax, fn) -#define CALL_TexImage3D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)), _gloffset_TexImage3D, parameters) -#define GET_TexImage3D(disp) GET_by_offset(disp, _gloffset_TexImage3D) -#define SET_TexImage3D(disp, fn) SET_by_offset(disp, _gloffset_TexImage3D, fn) -#define CALL_TexSubImage3D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)), _gloffset_TexSubImage3D, parameters) -#define GET_TexSubImage3D(disp) GET_by_offset(disp, _gloffset_TexSubImage3D) -#define SET_TexSubImage3D(disp, fn) SET_by_offset(disp, _gloffset_TexSubImage3D, fn) -#define CALL_CopyTexSubImage3D(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)), _gloffset_CopyTexSubImage3D, parameters) -#define GET_CopyTexSubImage3D(disp) GET_by_offset(disp, _gloffset_CopyTexSubImage3D) -#define SET_CopyTexSubImage3D(disp, fn) SET_by_offset(disp, _gloffset_CopyTexSubImage3D, fn) -#define CALL_ActiveTextureARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ActiveTextureARB, parameters) -#define GET_ActiveTextureARB(disp) GET_by_offset(disp, _gloffset_ActiveTextureARB) -#define SET_ActiveTextureARB(disp, fn) SET_by_offset(disp, _gloffset_ActiveTextureARB, fn) -#define CALL_ClientActiveTextureARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ClientActiveTextureARB, parameters) -#define GET_ClientActiveTextureARB(disp) GET_by_offset(disp, _gloffset_ClientActiveTextureARB) -#define SET_ClientActiveTextureARB(disp, fn) SET_by_offset(disp, _gloffset_ClientActiveTextureARB, fn) -#define CALL_MultiTexCoord1dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble)), _gloffset_MultiTexCoord1dARB, parameters) -#define GET_MultiTexCoord1dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1dARB) -#define SET_MultiTexCoord1dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1dARB, fn) -#define CALL_MultiTexCoord1dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord1dvARB, parameters) -#define GET_MultiTexCoord1dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1dvARB) -#define SET_MultiTexCoord1dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1dvARB, fn) -#define CALL_MultiTexCoord1fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_MultiTexCoord1fARB, parameters) -#define GET_MultiTexCoord1fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1fARB) -#define SET_MultiTexCoord1fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1fARB, fn) -#define CALL_MultiTexCoord1fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord1fvARB, parameters) -#define GET_MultiTexCoord1fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1fvARB) -#define SET_MultiTexCoord1fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1fvARB, fn) -#define CALL_MultiTexCoord1iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_MultiTexCoord1iARB, parameters) -#define GET_MultiTexCoord1iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1iARB) -#define SET_MultiTexCoord1iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1iARB, fn) -#define CALL_MultiTexCoord1ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord1ivARB, parameters) -#define GET_MultiTexCoord1ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1ivARB) -#define SET_MultiTexCoord1ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1ivARB, fn) -#define CALL_MultiTexCoord1sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort)), _gloffset_MultiTexCoord1sARB, parameters) -#define GET_MultiTexCoord1sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1sARB) -#define SET_MultiTexCoord1sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1sARB, fn) -#define CALL_MultiTexCoord1svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord1svARB, parameters) -#define GET_MultiTexCoord1svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord1svARB) -#define SET_MultiTexCoord1svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord1svARB, fn) -#define CALL_MultiTexCoord2dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble)), _gloffset_MultiTexCoord2dARB, parameters) -#define GET_MultiTexCoord2dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2dARB) -#define SET_MultiTexCoord2dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2dARB, fn) -#define CALL_MultiTexCoord2dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord2dvARB, parameters) -#define GET_MultiTexCoord2dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2dvARB) -#define SET_MultiTexCoord2dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2dvARB, fn) -#define CALL_MultiTexCoord2fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat)), _gloffset_MultiTexCoord2fARB, parameters) -#define GET_MultiTexCoord2fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2fARB) -#define SET_MultiTexCoord2fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2fARB, fn) -#define CALL_MultiTexCoord2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord2fvARB, parameters) -#define GET_MultiTexCoord2fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2fvARB) -#define SET_MultiTexCoord2fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2fvARB, fn) -#define CALL_MultiTexCoord2iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint)), _gloffset_MultiTexCoord2iARB, parameters) -#define GET_MultiTexCoord2iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2iARB) -#define SET_MultiTexCoord2iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2iARB, fn) -#define CALL_MultiTexCoord2ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord2ivARB, parameters) -#define GET_MultiTexCoord2ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2ivARB) -#define SET_MultiTexCoord2ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2ivARB, fn) -#define CALL_MultiTexCoord2sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort, GLshort)), _gloffset_MultiTexCoord2sARB, parameters) -#define GET_MultiTexCoord2sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2sARB) -#define SET_MultiTexCoord2sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2sARB, fn) -#define CALL_MultiTexCoord2svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord2svARB, parameters) -#define GET_MultiTexCoord2svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord2svARB) -#define SET_MultiTexCoord2svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord2svARB, fn) -#define CALL_MultiTexCoord3dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLdouble)), _gloffset_MultiTexCoord3dARB, parameters) -#define GET_MultiTexCoord3dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3dARB) -#define SET_MultiTexCoord3dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3dARB, fn) -#define CALL_MultiTexCoord3dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord3dvARB, parameters) -#define GET_MultiTexCoord3dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3dvARB) -#define SET_MultiTexCoord3dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3dvARB, fn) -#define CALL_MultiTexCoord3fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLfloat)), _gloffset_MultiTexCoord3fARB, parameters) -#define GET_MultiTexCoord3fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3fARB) -#define SET_MultiTexCoord3fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3fARB, fn) -#define CALL_MultiTexCoord3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord3fvARB, parameters) -#define GET_MultiTexCoord3fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3fvARB) -#define SET_MultiTexCoord3fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3fvARB, fn) -#define CALL_MultiTexCoord3iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint)), _gloffset_MultiTexCoord3iARB, parameters) -#define GET_MultiTexCoord3iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3iARB) -#define SET_MultiTexCoord3iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3iARB, fn) -#define CALL_MultiTexCoord3ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord3ivARB, parameters) -#define GET_MultiTexCoord3ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3ivARB) -#define SET_MultiTexCoord3ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3ivARB, fn) -#define CALL_MultiTexCoord3sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort, GLshort, GLshort)), _gloffset_MultiTexCoord3sARB, parameters) -#define GET_MultiTexCoord3sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3sARB) -#define SET_MultiTexCoord3sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3sARB, fn) -#define CALL_MultiTexCoord3svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord3svARB, parameters) -#define GET_MultiTexCoord3svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord3svARB) -#define SET_MultiTexCoord3svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord3svARB, fn) -#define CALL_MultiTexCoord4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_MultiTexCoord4dARB, parameters) -#define GET_MultiTexCoord4dARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4dARB) -#define SET_MultiTexCoord4dARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4dARB, fn) -#define CALL_MultiTexCoord4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLdouble *)), _gloffset_MultiTexCoord4dvARB, parameters) -#define GET_MultiTexCoord4dvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4dvARB) -#define SET_MultiTexCoord4dvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4dvARB, fn) -#define CALL_MultiTexCoord4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_MultiTexCoord4fARB, parameters) -#define GET_MultiTexCoord4fARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4fARB) -#define SET_MultiTexCoord4fARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4fARB, fn) -#define CALL_MultiTexCoord4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_MultiTexCoord4fvARB, parameters) -#define GET_MultiTexCoord4fvARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4fvARB) -#define SET_MultiTexCoord4fvARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4fvARB, fn) -#define CALL_MultiTexCoord4iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint)), _gloffset_MultiTexCoord4iARB, parameters) -#define GET_MultiTexCoord4iARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4iARB) -#define SET_MultiTexCoord4iARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4iARB, fn) -#define CALL_MultiTexCoord4ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_MultiTexCoord4ivARB, parameters) -#define GET_MultiTexCoord4ivARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4ivARB) -#define SET_MultiTexCoord4ivARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4ivARB, fn) -#define CALL_MultiTexCoord4sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLshort, GLshort, GLshort, GLshort)), _gloffset_MultiTexCoord4sARB, parameters) -#define GET_MultiTexCoord4sARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4sARB) -#define SET_MultiTexCoord4sARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4sARB, fn) -#define CALL_MultiTexCoord4svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLshort *)), _gloffset_MultiTexCoord4svARB, parameters) -#define GET_MultiTexCoord4svARB(disp) GET_by_offset(disp, _gloffset_MultiTexCoord4svARB) -#define SET_MultiTexCoord4svARB(disp, fn) SET_by_offset(disp, _gloffset_MultiTexCoord4svARB, fn) -#define CALL_AttachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_AttachShader, parameters) -#define GET_AttachShader(disp) GET_by_offset(disp, _gloffset_AttachShader) -#define SET_AttachShader(disp, fn) SET_by_offset(disp, _gloffset_AttachShader, fn) -#define CALL_CreateProgram(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(void)), _gloffset_CreateProgram, parameters) -#define GET_CreateProgram(disp) GET_by_offset(disp, _gloffset_CreateProgram) -#define SET_CreateProgram(disp, fn) SET_by_offset(disp, _gloffset_CreateProgram, fn) -#define CALL_CreateShader(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLenum)), _gloffset_CreateShader, parameters) -#define GET_CreateShader(disp) GET_by_offset(disp, _gloffset_CreateShader) -#define SET_CreateShader(disp, fn) SET_by_offset(disp, _gloffset_CreateShader, fn) -#define CALL_DeleteProgram(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DeleteProgram, parameters) -#define GET_DeleteProgram(disp) GET_by_offset(disp, _gloffset_DeleteProgram) -#define SET_DeleteProgram(disp, fn) SET_by_offset(disp, _gloffset_DeleteProgram, fn) -#define CALL_DeleteShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DeleteShader, parameters) -#define GET_DeleteShader(disp) GET_by_offset(disp, _gloffset_DeleteShader) -#define SET_DeleteShader(disp, fn) SET_by_offset(disp, _gloffset_DeleteShader, fn) -#define CALL_DetachShader(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_DetachShader, parameters) -#define GET_DetachShader(disp) GET_by_offset(disp, _gloffset_DetachShader) -#define SET_DetachShader(disp, fn) SET_by_offset(disp, _gloffset_DetachShader, fn) -#define CALL_GetAttachedShaders(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLuint *)), _gloffset_GetAttachedShaders, parameters) -#define GET_GetAttachedShaders(disp) GET_by_offset(disp, _gloffset_GetAttachedShaders) -#define SET_GetAttachedShaders(disp, fn) SET_by_offset(disp, _gloffset_GetAttachedShaders, fn) -#define CALL_GetProgramInfoLog(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLchar *)), _gloffset_GetProgramInfoLog, parameters) -#define GET_GetProgramInfoLog(disp) GET_by_offset(disp, _gloffset_GetProgramInfoLog) -#define SET_GetProgramInfoLog(disp, fn) SET_by_offset(disp, _gloffset_GetProgramInfoLog, fn) -#define CALL_GetProgramiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetProgramiv, parameters) -#define GET_GetProgramiv(disp) GET_by_offset(disp, _gloffset_GetProgramiv) -#define SET_GetProgramiv(disp, fn) SET_by_offset(disp, _gloffset_GetProgramiv, fn) -#define CALL_GetShaderInfoLog(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, GLsizei *, GLchar *)), _gloffset_GetShaderInfoLog, parameters) -#define GET_GetShaderInfoLog(disp) GET_by_offset(disp, _gloffset_GetShaderInfoLog) -#define SET_GetShaderInfoLog(disp, fn) SET_by_offset(disp, _gloffset_GetShaderInfoLog, fn) -#define CALL_GetShaderiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetShaderiv, parameters) -#define GET_GetShaderiv(disp) GET_by_offset(disp, _gloffset_GetShaderiv) -#define SET_GetShaderiv(disp, fn) SET_by_offset(disp, _gloffset_GetShaderiv, fn) -#define CALL_IsProgram(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsProgram, parameters) -#define GET_IsProgram(disp) GET_by_offset(disp, _gloffset_IsProgram) -#define SET_IsProgram(disp, fn) SET_by_offset(disp, _gloffset_IsProgram, fn) -#define CALL_IsShader(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsShader, parameters) -#define GET_IsShader(disp) GET_by_offset(disp, _gloffset_IsShader) -#define SET_IsShader(disp, fn) SET_by_offset(disp, _gloffset_IsShader, fn) -#define CALL_StencilFuncSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLuint)), _gloffset_StencilFuncSeparate, parameters) -#define GET_StencilFuncSeparate(disp) GET_by_offset(disp, _gloffset_StencilFuncSeparate) -#define SET_StencilFuncSeparate(disp, fn) SET_by_offset(disp, _gloffset_StencilFuncSeparate, fn) -#define CALL_StencilMaskSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_StencilMaskSeparate, parameters) -#define GET_StencilMaskSeparate(disp) GET_by_offset(disp, _gloffset_StencilMaskSeparate) -#define SET_StencilMaskSeparate(disp, fn) SET_by_offset(disp, _gloffset_StencilMaskSeparate, fn) -#define CALL_StencilOpSeparate(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), _gloffset_StencilOpSeparate, parameters) -#define GET_StencilOpSeparate(disp) GET_by_offset(disp, _gloffset_StencilOpSeparate) -#define SET_StencilOpSeparate(disp, fn) SET_by_offset(disp, _gloffset_StencilOpSeparate, fn) -#define CALL_UniformMatrix2x3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix2x3fv, parameters) -#define GET_UniformMatrix2x3fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix2x3fv) -#define SET_UniformMatrix2x3fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix2x3fv, fn) -#define CALL_UniformMatrix2x4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix2x4fv, parameters) -#define GET_UniformMatrix2x4fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix2x4fv) -#define SET_UniformMatrix2x4fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix2x4fv, fn) -#define CALL_UniformMatrix3x2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix3x2fv, parameters) -#define GET_UniformMatrix3x2fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix3x2fv) -#define SET_UniformMatrix3x2fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix3x2fv, fn) -#define CALL_UniformMatrix3x4fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix3x4fv, parameters) -#define GET_UniformMatrix3x4fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix3x4fv) -#define SET_UniformMatrix3x4fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix3x4fv, fn) -#define CALL_UniformMatrix4x2fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix4x2fv, parameters) -#define GET_UniformMatrix4x2fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix4x2fv) -#define SET_UniformMatrix4x2fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix4x2fv, fn) -#define CALL_UniformMatrix4x3fv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix4x3fv, parameters) -#define GET_UniformMatrix4x3fv(disp) GET_by_offset(disp, _gloffset_UniformMatrix4x3fv) -#define SET_UniformMatrix4x3fv(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix4x3fv, fn) -#define CALL_ClampColor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_ClampColor, parameters) -#define GET_ClampColor(disp) GET_by_offset(disp, _gloffset_ClampColor) -#define SET_ClampColor(disp, fn) SET_by_offset(disp, _gloffset_ClampColor, fn) -#define CALL_ClearBufferfi(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLfloat, GLint)), _gloffset_ClearBufferfi, parameters) -#define GET_ClearBufferfi(disp) GET_by_offset(disp, _gloffset_ClearBufferfi) -#define SET_ClearBufferfi(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferfi, fn) -#define CALL_ClearBufferfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, const GLfloat *)), _gloffset_ClearBufferfv, parameters) -#define GET_ClearBufferfv(disp) GET_by_offset(disp, _gloffset_ClearBufferfv) -#define SET_ClearBufferfv(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferfv, fn) -#define CALL_ClearBufferiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, const GLint *)), _gloffset_ClearBufferiv, parameters) -#define GET_ClearBufferiv(disp) GET_by_offset(disp, _gloffset_ClearBufferiv) -#define SET_ClearBufferiv(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferiv, fn) -#define CALL_ClearBufferuiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, const GLuint *)), _gloffset_ClearBufferuiv, parameters) -#define GET_ClearBufferuiv(disp) GET_by_offset(disp, _gloffset_ClearBufferuiv) -#define SET_ClearBufferuiv(disp, fn) SET_by_offset(disp, _gloffset_ClearBufferuiv, fn) -#define CALL_GetStringi(disp, parameters) CALL_by_offset(disp, (const GLubyte * (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_GetStringi, parameters) -#define GET_GetStringi(disp) GET_by_offset(disp, _gloffset_GetStringi) -#define SET_GetStringi(disp, fn) SET_by_offset(disp, _gloffset_GetStringi, fn) -#define CALL_TexBuffer(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint)), _gloffset_TexBuffer, parameters) -#define GET_TexBuffer(disp) GET_by_offset(disp, _gloffset_TexBuffer) -#define SET_TexBuffer(disp, fn) SET_by_offset(disp, _gloffset_TexBuffer, fn) -#define CALL_FramebufferTexture(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTexture, parameters) -#define GET_FramebufferTexture(disp) GET_by_offset(disp, _gloffset_FramebufferTexture) -#define SET_FramebufferTexture(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture, fn) -#define CALL_GetBufferParameteri64v(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint64 *)), _gloffset_GetBufferParameteri64v, parameters) -#define GET_GetBufferParameteri64v(disp) GET_by_offset(disp, _gloffset_GetBufferParameteri64v) -#define SET_GetBufferParameteri64v(disp, fn) SET_by_offset(disp, _gloffset_GetBufferParameteri64v, fn) -#define CALL_GetInteger64i_v(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLint64 *)), _gloffset_GetInteger64i_v, parameters) -#define GET_GetInteger64i_v(disp) GET_by_offset(disp, _gloffset_GetInteger64i_v) -#define SET_GetInteger64i_v(disp, fn) SET_by_offset(disp, _gloffset_GetInteger64i_v, fn) -#define CALL_VertexAttribDivisor(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_VertexAttribDivisor, parameters) -#define GET_VertexAttribDivisor(disp) GET_by_offset(disp, _gloffset_VertexAttribDivisor) -#define SET_VertexAttribDivisor(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribDivisor, fn) -#define CALL_LoadTransposeMatrixdARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_LoadTransposeMatrixdARB, parameters) -#define GET_LoadTransposeMatrixdARB(disp) GET_by_offset(disp, _gloffset_LoadTransposeMatrixdARB) -#define SET_LoadTransposeMatrixdARB(disp, fn) SET_by_offset(disp, _gloffset_LoadTransposeMatrixdARB, fn) -#define CALL_LoadTransposeMatrixfARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_LoadTransposeMatrixfARB, parameters) -#define GET_LoadTransposeMatrixfARB(disp) GET_by_offset(disp, _gloffset_LoadTransposeMatrixfARB) -#define SET_LoadTransposeMatrixfARB(disp, fn) SET_by_offset(disp, _gloffset_LoadTransposeMatrixfARB, fn) -#define CALL_MultTransposeMatrixdARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_MultTransposeMatrixdARB, parameters) -#define GET_MultTransposeMatrixdARB(disp) GET_by_offset(disp, _gloffset_MultTransposeMatrixdARB) -#define SET_MultTransposeMatrixdARB(disp, fn) SET_by_offset(disp, _gloffset_MultTransposeMatrixdARB, fn) -#define CALL_MultTransposeMatrixfARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_MultTransposeMatrixfARB, parameters) -#define GET_MultTransposeMatrixfARB(disp) GET_by_offset(disp, _gloffset_MultTransposeMatrixfARB) -#define SET_MultTransposeMatrixfARB(disp, fn) SET_by_offset(disp, _gloffset_MultTransposeMatrixfARB, fn) -#define CALL_SampleCoverageARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLboolean)), _gloffset_SampleCoverageARB, parameters) -#define GET_SampleCoverageARB(disp) GET_by_offset(disp, _gloffset_SampleCoverageARB) -#define SET_SampleCoverageARB(disp, fn) SET_by_offset(disp, _gloffset_SampleCoverageARB, fn) -#define CALL_CompressedTexImage1DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *)), _gloffset_CompressedTexImage1DARB, parameters) -#define GET_CompressedTexImage1DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexImage1DARB) -#define SET_CompressedTexImage1DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexImage1DARB, fn) -#define CALL_CompressedTexImage2DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)), _gloffset_CompressedTexImage2DARB, parameters) -#define GET_CompressedTexImage2DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexImage2DARB) -#define SET_CompressedTexImage2DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexImage2DARB, fn) -#define CALL_CompressedTexImage3DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)), _gloffset_CompressedTexImage3DARB, parameters) -#define GET_CompressedTexImage3DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexImage3DARB) -#define SET_CompressedTexImage3DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexImage3DARB, fn) -#define CALL_CompressedTexSubImage1DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *)), _gloffset_CompressedTexSubImage1DARB, parameters) -#define GET_CompressedTexSubImage1DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexSubImage1DARB) -#define SET_CompressedTexSubImage1DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexSubImage1DARB, fn) -#define CALL_CompressedTexSubImage2DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)), _gloffset_CompressedTexSubImage2DARB, parameters) -#define GET_CompressedTexSubImage2DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexSubImage2DARB) -#define SET_CompressedTexSubImage2DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexSubImage2DARB, fn) -#define CALL_CompressedTexSubImage3DARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)), _gloffset_CompressedTexSubImage3DARB, parameters) -#define GET_CompressedTexSubImage3DARB(disp) GET_by_offset(disp, _gloffset_CompressedTexSubImage3DARB) -#define SET_CompressedTexSubImage3DARB(disp, fn) SET_by_offset(disp, _gloffset_CompressedTexSubImage3DARB, fn) -#define CALL_GetCompressedTexImageARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLvoid *)), _gloffset_GetCompressedTexImageARB, parameters) -#define GET_GetCompressedTexImageARB(disp) GET_by_offset(disp, _gloffset_GetCompressedTexImageARB) -#define SET_GetCompressedTexImageARB(disp, fn) SET_by_offset(disp, _gloffset_GetCompressedTexImageARB, fn) -#define CALL_DisableVertexAttribArrayARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DisableVertexAttribArrayARB, parameters) -#define GET_DisableVertexAttribArrayARB(disp) GET_by_offset(disp, _gloffset_DisableVertexAttribArrayARB) -#define SET_DisableVertexAttribArrayARB(disp, fn) SET_by_offset(disp, _gloffset_DisableVertexAttribArrayARB, fn) -#define CALL_EnableVertexAttribArrayARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_EnableVertexAttribArrayARB, parameters) -#define GET_EnableVertexAttribArrayARB(disp) GET_by_offset(disp, _gloffset_EnableVertexAttribArrayARB) -#define SET_EnableVertexAttribArrayARB(disp, fn) SET_by_offset(disp, _gloffset_EnableVertexAttribArrayARB, fn) -#define CALL_GetProgramEnvParameterdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble *)), _gloffset_GetProgramEnvParameterdvARB, parameters) -#define GET_GetProgramEnvParameterdvARB(disp) GET_by_offset(disp, _gloffset_GetProgramEnvParameterdvARB) -#define SET_GetProgramEnvParameterdvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramEnvParameterdvARB, fn) -#define CALL_GetProgramEnvParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat *)), _gloffset_GetProgramEnvParameterfvARB, parameters) -#define GET_GetProgramEnvParameterfvARB(disp) GET_by_offset(disp, _gloffset_GetProgramEnvParameterfvARB) -#define SET_GetProgramEnvParameterfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramEnvParameterfvARB, fn) -#define CALL_GetProgramLocalParameterdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble *)), _gloffset_GetProgramLocalParameterdvARB, parameters) -#define GET_GetProgramLocalParameterdvARB(disp) GET_by_offset(disp, _gloffset_GetProgramLocalParameterdvARB) -#define SET_GetProgramLocalParameterdvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramLocalParameterdvARB, fn) -#define CALL_GetProgramLocalParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat *)), _gloffset_GetProgramLocalParameterfvARB, parameters) -#define GET_GetProgramLocalParameterfvARB(disp) GET_by_offset(disp, _gloffset_GetProgramLocalParameterfvARB) -#define SET_GetProgramLocalParameterfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramLocalParameterfvARB, fn) -#define CALL_GetProgramStringARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLvoid *)), _gloffset_GetProgramStringARB, parameters) -#define GET_GetProgramStringARB(disp) GET_by_offset(disp, _gloffset_GetProgramStringARB) -#define SET_GetProgramStringARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramStringARB, fn) -#define CALL_GetProgramivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetProgramivARB, parameters) -#define GET_GetProgramivARB(disp) GET_by_offset(disp, _gloffset_GetProgramivARB) -#define SET_GetProgramivARB(disp, fn) SET_by_offset(disp, _gloffset_GetProgramivARB, fn) -#define CALL_GetVertexAttribdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLdouble *)), _gloffset_GetVertexAttribdvARB, parameters) -#define GET_GetVertexAttribdvARB(disp) GET_by_offset(disp, _gloffset_GetVertexAttribdvARB) -#define SET_GetVertexAttribdvARB(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribdvARB, fn) -#define CALL_GetVertexAttribfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLfloat *)), _gloffset_GetVertexAttribfvARB, parameters) -#define GET_GetVertexAttribfvARB(disp) GET_by_offset(disp, _gloffset_GetVertexAttribfvARB) -#define SET_GetVertexAttribfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribfvARB, fn) -#define CALL_GetVertexAttribivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetVertexAttribivARB, parameters) -#define GET_GetVertexAttribivARB(disp) GET_by_offset(disp, _gloffset_GetVertexAttribivARB) -#define SET_GetVertexAttribivARB(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribivARB, fn) -#define CALL_ProgramEnvParameter4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_ProgramEnvParameter4dARB, parameters) -#define GET_ProgramEnvParameter4dARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4dARB) -#define SET_ProgramEnvParameter4dARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4dARB, fn) -#define CALL_ProgramEnvParameter4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLdouble *)), _gloffset_ProgramEnvParameter4dvARB, parameters) -#define GET_ProgramEnvParameter4dvARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4dvARB) -#define SET_ProgramEnvParameter4dvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4dvARB, fn) -#define CALL_ProgramEnvParameter4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ProgramEnvParameter4fARB, parameters) -#define GET_ProgramEnvParameter4fARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4fARB) -#define SET_ProgramEnvParameter4fARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4fARB, fn) -#define CALL_ProgramEnvParameter4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), _gloffset_ProgramEnvParameter4fvARB, parameters) -#define GET_ProgramEnvParameter4fvARB(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameter4fvARB) -#define SET_ProgramEnvParameter4fvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameter4fvARB, fn) -#define CALL_ProgramLocalParameter4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_ProgramLocalParameter4dARB, parameters) -#define GET_ProgramLocalParameter4dARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4dARB) -#define SET_ProgramLocalParameter4dARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4dARB, fn) -#define CALL_ProgramLocalParameter4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLdouble *)), _gloffset_ProgramLocalParameter4dvARB, parameters) -#define GET_ProgramLocalParameter4dvARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4dvARB) -#define SET_ProgramLocalParameter4dvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4dvARB, fn) -#define CALL_ProgramLocalParameter4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ProgramLocalParameter4fARB, parameters) -#define GET_ProgramLocalParameter4fARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4fARB) -#define SET_ProgramLocalParameter4fARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4fARB, fn) -#define CALL_ProgramLocalParameter4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), _gloffset_ProgramLocalParameter4fvARB, parameters) -#define GET_ProgramLocalParameter4fvARB(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameter4fvARB) -#define SET_ProgramLocalParameter4fvARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameter4fvARB, fn) -#define CALL_ProgramStringARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, const GLvoid *)), _gloffset_ProgramStringARB, parameters) -#define GET_ProgramStringARB(disp) GET_by_offset(disp, _gloffset_ProgramStringARB) -#define SET_ProgramStringARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramStringARB, fn) -#define CALL_VertexAttrib1dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble)), _gloffset_VertexAttrib1dARB, parameters) -#define GET_VertexAttrib1dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dARB) -#define SET_VertexAttrib1dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dARB, fn) -#define CALL_VertexAttrib1dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib1dvARB, parameters) -#define GET_VertexAttrib1dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dvARB) -#define SET_VertexAttrib1dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dvARB, fn) -#define CALL_VertexAttrib1fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat)), _gloffset_VertexAttrib1fARB, parameters) -#define GET_VertexAttrib1fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fARB) -#define SET_VertexAttrib1fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fARB, fn) -#define CALL_VertexAttrib1fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib1fvARB, parameters) -#define GET_VertexAttrib1fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fvARB) -#define SET_VertexAttrib1fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fvARB, fn) -#define CALL_VertexAttrib1sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort)), _gloffset_VertexAttrib1sARB, parameters) -#define GET_VertexAttrib1sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1sARB) -#define SET_VertexAttrib1sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1sARB, fn) -#define CALL_VertexAttrib1svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib1svARB, parameters) -#define GET_VertexAttrib1svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib1svARB) -#define SET_VertexAttrib1svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1svARB, fn) -#define CALL_VertexAttrib2dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble)), _gloffset_VertexAttrib2dARB, parameters) -#define GET_VertexAttrib2dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dARB) -#define SET_VertexAttrib2dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dARB, fn) -#define CALL_VertexAttrib2dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib2dvARB, parameters) -#define GET_VertexAttrib2dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dvARB) -#define SET_VertexAttrib2dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dvARB, fn) -#define CALL_VertexAttrib2fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat)), _gloffset_VertexAttrib2fARB, parameters) -#define GET_VertexAttrib2fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fARB) -#define SET_VertexAttrib2fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fARB, fn) -#define CALL_VertexAttrib2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib2fvARB, parameters) -#define GET_VertexAttrib2fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fvARB) -#define SET_VertexAttrib2fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fvARB, fn) -#define CALL_VertexAttrib2sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort)), _gloffset_VertexAttrib2sARB, parameters) -#define GET_VertexAttrib2sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2sARB) -#define SET_VertexAttrib2sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2sARB, fn) -#define CALL_VertexAttrib2svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib2svARB, parameters) -#define GET_VertexAttrib2svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib2svARB) -#define SET_VertexAttrib2svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2svARB, fn) -#define CALL_VertexAttrib3dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib3dARB, parameters) -#define GET_VertexAttrib3dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dARB) -#define SET_VertexAttrib3dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dARB, fn) -#define CALL_VertexAttrib3dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib3dvARB, parameters) -#define GET_VertexAttrib3dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dvARB) -#define SET_VertexAttrib3dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dvARB, fn) -#define CALL_VertexAttrib3fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib3fARB, parameters) -#define GET_VertexAttrib3fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fARB) -#define SET_VertexAttrib3fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fARB, fn) -#define CALL_VertexAttrib3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib3fvARB, parameters) -#define GET_VertexAttrib3fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fvARB) -#define SET_VertexAttrib3fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fvARB, fn) -#define CALL_VertexAttrib3sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib3sARB, parameters) -#define GET_VertexAttrib3sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3sARB) -#define SET_VertexAttrib3sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3sARB, fn) -#define CALL_VertexAttrib3svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib3svARB, parameters) -#define GET_VertexAttrib3svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib3svARB) -#define SET_VertexAttrib3svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3svARB, fn) -#define CALL_VertexAttrib4NbvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLbyte *)), _gloffset_VertexAttrib4NbvARB, parameters) -#define GET_VertexAttrib4NbvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NbvARB) -#define SET_VertexAttrib4NbvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NbvARB, fn) -#define CALL_VertexAttrib4NivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttrib4NivARB, parameters) -#define GET_VertexAttrib4NivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NivARB) -#define SET_VertexAttrib4NivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NivARB, fn) -#define CALL_VertexAttrib4NsvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib4NsvARB, parameters) -#define GET_VertexAttrib4NsvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NsvARB) -#define SET_VertexAttrib4NsvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NsvARB, fn) -#define CALL_VertexAttrib4NubARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte)), _gloffset_VertexAttrib4NubARB, parameters) -#define GET_VertexAttrib4NubARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NubARB) -#define SET_VertexAttrib4NubARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NubARB, fn) -#define CALL_VertexAttrib4NubvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttrib4NubvARB, parameters) -#define GET_VertexAttrib4NubvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NubvARB) -#define SET_VertexAttrib4NubvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NubvARB, fn) -#define CALL_VertexAttrib4NuivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttrib4NuivARB, parameters) -#define GET_VertexAttrib4NuivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NuivARB) -#define SET_VertexAttrib4NuivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NuivARB, fn) -#define CALL_VertexAttrib4NusvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLushort *)), _gloffset_VertexAttrib4NusvARB, parameters) -#define GET_VertexAttrib4NusvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4NusvARB) -#define SET_VertexAttrib4NusvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4NusvARB, fn) -#define CALL_VertexAttrib4bvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLbyte *)), _gloffset_VertexAttrib4bvARB, parameters) -#define GET_VertexAttrib4bvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4bvARB) -#define SET_VertexAttrib4bvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4bvARB, fn) -#define CALL_VertexAttrib4dARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib4dARB, parameters) -#define GET_VertexAttrib4dARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dARB) -#define SET_VertexAttrib4dARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dARB, fn) -#define CALL_VertexAttrib4dvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib4dvARB, parameters) -#define GET_VertexAttrib4dvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dvARB) -#define SET_VertexAttrib4dvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dvARB, fn) -#define CALL_VertexAttrib4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib4fARB, parameters) -#define GET_VertexAttrib4fARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fARB) -#define SET_VertexAttrib4fARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fARB, fn) -#define CALL_VertexAttrib4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib4fvARB, parameters) -#define GET_VertexAttrib4fvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fvARB) -#define SET_VertexAttrib4fvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fvARB, fn) -#define CALL_VertexAttrib4ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttrib4ivARB, parameters) -#define GET_VertexAttrib4ivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ivARB) -#define SET_VertexAttrib4ivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ivARB, fn) -#define CALL_VertexAttrib4sARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib4sARB, parameters) -#define GET_VertexAttrib4sARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4sARB) -#define SET_VertexAttrib4sARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4sARB, fn) -#define CALL_VertexAttrib4svARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib4svARB, parameters) -#define GET_VertexAttrib4svARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4svARB) -#define SET_VertexAttrib4svARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4svARB, fn) -#define CALL_VertexAttrib4ubvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttrib4ubvARB, parameters) -#define GET_VertexAttrib4ubvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ubvARB) -#define SET_VertexAttrib4ubvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ubvARB, fn) -#define CALL_VertexAttrib4uivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttrib4uivARB, parameters) -#define GET_VertexAttrib4uivARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4uivARB) -#define SET_VertexAttrib4uivARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4uivARB, fn) -#define CALL_VertexAttrib4usvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLushort *)), _gloffset_VertexAttrib4usvARB, parameters) -#define GET_VertexAttrib4usvARB(disp) GET_by_offset(disp, _gloffset_VertexAttrib4usvARB) -#define SET_VertexAttrib4usvARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4usvARB, fn) -#define CALL_VertexAttribPointerARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *)), _gloffset_VertexAttribPointerARB, parameters) -#define GET_VertexAttribPointerARB(disp) GET_by_offset(disp, _gloffset_VertexAttribPointerARB) -#define SET_VertexAttribPointerARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribPointerARB, fn) -#define CALL_BindBufferARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindBufferARB, parameters) -#define GET_BindBufferARB(disp) GET_by_offset(disp, _gloffset_BindBufferARB) -#define SET_BindBufferARB(disp, fn) SET_by_offset(disp, _gloffset_BindBufferARB, fn) -#define CALL_BufferDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizeiptrARB, const GLvoid *, GLenum)), _gloffset_BufferDataARB, parameters) -#define GET_BufferDataARB(disp) GET_by_offset(disp, _gloffset_BufferDataARB) -#define SET_BufferDataARB(disp, fn) SET_by_offset(disp, _gloffset_BufferDataARB, fn) -#define CALL_BufferSubDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *)), _gloffset_BufferSubDataARB, parameters) -#define GET_BufferSubDataARB(disp) GET_by_offset(disp, _gloffset_BufferSubDataARB) -#define SET_BufferSubDataARB(disp, fn) SET_by_offset(disp, _gloffset_BufferSubDataARB, fn) -#define CALL_DeleteBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteBuffersARB, parameters) -#define GET_DeleteBuffersARB(disp) GET_by_offset(disp, _gloffset_DeleteBuffersARB) -#define SET_DeleteBuffersARB(disp, fn) SET_by_offset(disp, _gloffset_DeleteBuffersARB, fn) -#define CALL_GenBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenBuffersARB, parameters) -#define GET_GenBuffersARB(disp) GET_by_offset(disp, _gloffset_GenBuffersARB) -#define SET_GenBuffersARB(disp, fn) SET_by_offset(disp, _gloffset_GenBuffersARB, fn) -#define CALL_GetBufferParameterivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetBufferParameterivARB, parameters) -#define GET_GetBufferParameterivARB(disp) GET_by_offset(disp, _gloffset_GetBufferParameterivARB) -#define SET_GetBufferParameterivARB(disp, fn) SET_by_offset(disp, _gloffset_GetBufferParameterivARB, fn) -#define CALL_GetBufferPointervARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLvoid **)), _gloffset_GetBufferPointervARB, parameters) -#define GET_GetBufferPointervARB(disp) GET_by_offset(disp, _gloffset_GetBufferPointervARB) -#define SET_GetBufferPointervARB(disp, fn) SET_by_offset(disp, _gloffset_GetBufferPointervARB, fn) -#define CALL_GetBufferSubDataARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *)), _gloffset_GetBufferSubDataARB, parameters) -#define GET_GetBufferSubDataARB(disp) GET_by_offset(disp, _gloffset_GetBufferSubDataARB) -#define SET_GetBufferSubDataARB(disp, fn) SET_by_offset(disp, _gloffset_GetBufferSubDataARB, fn) -#define CALL_IsBufferARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsBufferARB, parameters) -#define GET_IsBufferARB(disp) GET_by_offset(disp, _gloffset_IsBufferARB) -#define SET_IsBufferARB(disp, fn) SET_by_offset(disp, _gloffset_IsBufferARB, fn) -#define CALL_MapBufferARB(disp, parameters) CALL_by_offset(disp, (GLvoid * (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_MapBufferARB, parameters) -#define GET_MapBufferARB(disp) GET_by_offset(disp, _gloffset_MapBufferARB) -#define SET_MapBufferARB(disp, fn) SET_by_offset(disp, _gloffset_MapBufferARB, fn) -#define CALL_UnmapBufferARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLenum)), _gloffset_UnmapBufferARB, parameters) -#define GET_UnmapBufferARB(disp) GET_by_offset(disp, _gloffset_UnmapBufferARB) -#define SET_UnmapBufferARB(disp, fn) SET_by_offset(disp, _gloffset_UnmapBufferARB, fn) -#define CALL_BeginQueryARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BeginQueryARB, parameters) -#define GET_BeginQueryARB(disp) GET_by_offset(disp, _gloffset_BeginQueryARB) -#define SET_BeginQueryARB(disp, fn) SET_by_offset(disp, _gloffset_BeginQueryARB, fn) -#define CALL_DeleteQueriesARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteQueriesARB, parameters) -#define GET_DeleteQueriesARB(disp) GET_by_offset(disp, _gloffset_DeleteQueriesARB) -#define SET_DeleteQueriesARB(disp, fn) SET_by_offset(disp, _gloffset_DeleteQueriesARB, fn) -#define CALL_EndQueryARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_EndQueryARB, parameters) -#define GET_EndQueryARB(disp) GET_by_offset(disp, _gloffset_EndQueryARB) -#define SET_EndQueryARB(disp, fn) SET_by_offset(disp, _gloffset_EndQueryARB, fn) -#define CALL_GenQueriesARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenQueriesARB, parameters) -#define GET_GenQueriesARB(disp) GET_by_offset(disp, _gloffset_GenQueriesARB) -#define SET_GenQueriesARB(disp, fn) SET_by_offset(disp, _gloffset_GenQueriesARB, fn) -#define CALL_GetQueryObjectivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetQueryObjectivARB, parameters) -#define GET_GetQueryObjectivARB(disp) GET_by_offset(disp, _gloffset_GetQueryObjectivARB) -#define SET_GetQueryObjectivARB(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjectivARB, fn) -#define CALL_GetQueryObjectuivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint *)), _gloffset_GetQueryObjectuivARB, parameters) -#define GET_GetQueryObjectuivARB(disp) GET_by_offset(disp, _gloffset_GetQueryObjectuivARB) -#define SET_GetQueryObjectuivARB(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjectuivARB, fn) -#define CALL_GetQueryivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetQueryivARB, parameters) -#define GET_GetQueryivARB(disp) GET_by_offset(disp, _gloffset_GetQueryivARB) -#define SET_GetQueryivARB(disp, fn) SET_by_offset(disp, _gloffset_GetQueryivARB, fn) -#define CALL_IsQueryARB(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsQueryARB, parameters) -#define GET_IsQueryARB(disp) GET_by_offset(disp, _gloffset_IsQueryARB) -#define SET_IsQueryARB(disp, fn) SET_by_offset(disp, _gloffset_IsQueryARB, fn) -#define CALL_AttachObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLhandleARB)), _gloffset_AttachObjectARB, parameters) -#define GET_AttachObjectARB(disp) GET_by_offset(disp, _gloffset_AttachObjectARB) -#define SET_AttachObjectARB(disp, fn) SET_by_offset(disp, _gloffset_AttachObjectARB, fn) -#define CALL_CompileShaderARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_CompileShaderARB, parameters) -#define GET_CompileShaderARB(disp) GET_by_offset(disp, _gloffset_CompileShaderARB) -#define SET_CompileShaderARB(disp, fn) SET_by_offset(disp, _gloffset_CompileShaderARB, fn) -#define CALL_CreateProgramObjectARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(void)), _gloffset_CreateProgramObjectARB, parameters) -#define GET_CreateProgramObjectARB(disp) GET_by_offset(disp, _gloffset_CreateProgramObjectARB) -#define SET_CreateProgramObjectARB(disp, fn) SET_by_offset(disp, _gloffset_CreateProgramObjectARB, fn) -#define CALL_CreateShaderObjectARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(GLenum)), _gloffset_CreateShaderObjectARB, parameters) -#define GET_CreateShaderObjectARB(disp) GET_by_offset(disp, _gloffset_CreateShaderObjectARB) -#define SET_CreateShaderObjectARB(disp, fn) SET_by_offset(disp, _gloffset_CreateShaderObjectARB, fn) -#define CALL_DeleteObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_DeleteObjectARB, parameters) -#define GET_DeleteObjectARB(disp) GET_by_offset(disp, _gloffset_DeleteObjectARB) -#define SET_DeleteObjectARB(disp, fn) SET_by_offset(disp, _gloffset_DeleteObjectARB, fn) -#define CALL_DetachObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLhandleARB)), _gloffset_DetachObjectARB, parameters) -#define GET_DetachObjectARB(disp) GET_by_offset(disp, _gloffset_DetachObjectARB) -#define SET_DetachObjectARB(disp, fn) SET_by_offset(disp, _gloffset_DetachObjectARB, fn) -#define CALL_GetActiveUniformARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)), _gloffset_GetActiveUniformARB, parameters) -#define GET_GetActiveUniformARB(disp) GET_by_offset(disp, _gloffset_GetActiveUniformARB) -#define SET_GetActiveUniformARB(disp, fn) SET_by_offset(disp, _gloffset_GetActiveUniformARB, fn) -#define CALL_GetAttachedObjectsARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLhandleARB *)), _gloffset_GetAttachedObjectsARB, parameters) -#define GET_GetAttachedObjectsARB(disp) GET_by_offset(disp, _gloffset_GetAttachedObjectsARB) -#define SET_GetAttachedObjectsARB(disp, fn) SET_by_offset(disp, _gloffset_GetAttachedObjectsARB, fn) -#define CALL_GetHandleARB(disp, parameters) CALL_by_offset(disp, (GLhandleARB (GLAPIENTRYP)(GLenum)), _gloffset_GetHandleARB, parameters) -#define GET_GetHandleARB(disp) GET_by_offset(disp, _gloffset_GetHandleARB) -#define SET_GetHandleARB(disp, fn) SET_by_offset(disp, _gloffset_GetHandleARB, fn) -#define CALL_GetInfoLogARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *)), _gloffset_GetInfoLogARB, parameters) -#define GET_GetInfoLogARB(disp) GET_by_offset(disp, _gloffset_GetInfoLogARB) -#define SET_GetInfoLogARB(disp, fn) SET_by_offset(disp, _gloffset_GetInfoLogARB, fn) -#define CALL_GetObjectParameterfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLenum, GLfloat *)), _gloffset_GetObjectParameterfvARB, parameters) -#define GET_GetObjectParameterfvARB(disp) GET_by_offset(disp, _gloffset_GetObjectParameterfvARB) -#define SET_GetObjectParameterfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetObjectParameterfvARB, fn) -#define CALL_GetObjectParameterivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLenum, GLint *)), _gloffset_GetObjectParameterivARB, parameters) -#define GET_GetObjectParameterivARB(disp) GET_by_offset(disp, _gloffset_GetObjectParameterivARB) -#define SET_GetObjectParameterivARB(disp, fn) SET_by_offset(disp, _gloffset_GetObjectParameterivARB, fn) -#define CALL_GetShaderSourceARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *)), _gloffset_GetShaderSourceARB, parameters) -#define GET_GetShaderSourceARB(disp) GET_by_offset(disp, _gloffset_GetShaderSourceARB) -#define SET_GetShaderSourceARB(disp, fn) SET_by_offset(disp, _gloffset_GetShaderSourceARB, fn) -#define CALL_GetUniformLocationARB(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLhandleARB, const GLcharARB *)), _gloffset_GetUniformLocationARB, parameters) -#define GET_GetUniformLocationARB(disp) GET_by_offset(disp, _gloffset_GetUniformLocationARB) -#define SET_GetUniformLocationARB(disp, fn) SET_by_offset(disp, _gloffset_GetUniformLocationARB, fn) -#define CALL_GetUniformfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLfloat *)), _gloffset_GetUniformfvARB, parameters) -#define GET_GetUniformfvARB(disp) GET_by_offset(disp, _gloffset_GetUniformfvARB) -#define SET_GetUniformfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetUniformfvARB, fn) -#define CALL_GetUniformivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLint *)), _gloffset_GetUniformivARB, parameters) -#define GET_GetUniformivARB(disp) GET_by_offset(disp, _gloffset_GetUniformivARB) -#define SET_GetUniformivARB(disp, fn) SET_by_offset(disp, _gloffset_GetUniformivARB, fn) -#define CALL_LinkProgramARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_LinkProgramARB, parameters) -#define GET_LinkProgramARB(disp) GET_by_offset(disp, _gloffset_LinkProgramARB) -#define SET_LinkProgramARB(disp, fn) SET_by_offset(disp, _gloffset_LinkProgramARB, fn) -#define CALL_ShaderSourceARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLsizei, const GLcharARB **, const GLint *)), _gloffset_ShaderSourceARB, parameters) -#define GET_ShaderSourceARB(disp) GET_by_offset(disp, _gloffset_ShaderSourceARB) -#define SET_ShaderSourceARB(disp, fn) SET_by_offset(disp, _gloffset_ShaderSourceARB, fn) -#define CALL_Uniform1fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat)), _gloffset_Uniform1fARB, parameters) -#define GET_Uniform1fARB(disp) GET_by_offset(disp, _gloffset_Uniform1fARB) -#define SET_Uniform1fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1fARB, fn) -#define CALL_Uniform1fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform1fvARB, parameters) -#define GET_Uniform1fvARB(disp) GET_by_offset(disp, _gloffset_Uniform1fvARB) -#define SET_Uniform1fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1fvARB, fn) -#define CALL_Uniform1iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_Uniform1iARB, parameters) -#define GET_Uniform1iARB(disp) GET_by_offset(disp, _gloffset_Uniform1iARB) -#define SET_Uniform1iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1iARB, fn) -#define CALL_Uniform1ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform1ivARB, parameters) -#define GET_Uniform1ivARB(disp) GET_by_offset(disp, _gloffset_Uniform1ivARB) -#define SET_Uniform1ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform1ivARB, fn) -#define CALL_Uniform2fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat)), _gloffset_Uniform2fARB, parameters) -#define GET_Uniform2fARB(disp) GET_by_offset(disp, _gloffset_Uniform2fARB) -#define SET_Uniform2fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2fARB, fn) -#define CALL_Uniform2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform2fvARB, parameters) -#define GET_Uniform2fvARB(disp) GET_by_offset(disp, _gloffset_Uniform2fvARB) -#define SET_Uniform2fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2fvARB, fn) -#define CALL_Uniform2iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_Uniform2iARB, parameters) -#define GET_Uniform2iARB(disp) GET_by_offset(disp, _gloffset_Uniform2iARB) -#define SET_Uniform2iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2iARB, fn) -#define CALL_Uniform2ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform2ivARB, parameters) -#define GET_Uniform2ivARB(disp) GET_by_offset(disp, _gloffset_Uniform2ivARB) -#define SET_Uniform2ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform2ivARB, fn) -#define CALL_Uniform3fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat, GLfloat)), _gloffset_Uniform3fARB, parameters) -#define GET_Uniform3fARB(disp) GET_by_offset(disp, _gloffset_Uniform3fARB) -#define SET_Uniform3fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3fARB, fn) -#define CALL_Uniform3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform3fvARB, parameters) -#define GET_Uniform3fvARB(disp) GET_by_offset(disp, _gloffset_Uniform3fvARB) -#define SET_Uniform3fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3fvARB, fn) -#define CALL_Uniform3iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_Uniform3iARB, parameters) -#define GET_Uniform3iARB(disp) GET_by_offset(disp, _gloffset_Uniform3iARB) -#define SET_Uniform3iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3iARB, fn) -#define CALL_Uniform3ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform3ivARB, parameters) -#define GET_Uniform3ivARB(disp) GET_by_offset(disp, _gloffset_Uniform3ivARB) -#define SET_Uniform3ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform3ivARB, fn) -#define CALL_Uniform4fARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_Uniform4fARB, parameters) -#define GET_Uniform4fARB(disp) GET_by_offset(disp, _gloffset_Uniform4fARB) -#define SET_Uniform4fARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4fARB, fn) -#define CALL_Uniform4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLfloat *)), _gloffset_Uniform4fvARB, parameters) -#define GET_Uniform4fvARB(disp) GET_by_offset(disp, _gloffset_Uniform4fvARB) -#define SET_Uniform4fvARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4fvARB, fn) -#define CALL_Uniform4iARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint, GLint)), _gloffset_Uniform4iARB, parameters) -#define GET_Uniform4iARB(disp) GET_by_offset(disp, _gloffset_Uniform4iARB) -#define SET_Uniform4iARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4iARB, fn) -#define CALL_Uniform4ivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLint *)), _gloffset_Uniform4ivARB, parameters) -#define GET_Uniform4ivARB(disp) GET_by_offset(disp, _gloffset_Uniform4ivARB) -#define SET_Uniform4ivARB(disp, fn) SET_by_offset(disp, _gloffset_Uniform4ivARB, fn) -#define CALL_UniformMatrix2fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix2fvARB, parameters) -#define GET_UniformMatrix2fvARB(disp) GET_by_offset(disp, _gloffset_UniformMatrix2fvARB) -#define SET_UniformMatrix2fvARB(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix2fvARB, fn) -#define CALL_UniformMatrix3fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix3fvARB, parameters) -#define GET_UniformMatrix3fvARB(disp) GET_by_offset(disp, _gloffset_UniformMatrix3fvARB) -#define SET_UniformMatrix3fvARB(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix3fvARB, fn) -#define CALL_UniformMatrix4fvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, GLboolean, const GLfloat *)), _gloffset_UniformMatrix4fvARB, parameters) -#define GET_UniformMatrix4fvARB(disp) GET_by_offset(disp, _gloffset_UniformMatrix4fvARB) -#define SET_UniformMatrix4fvARB(disp, fn) SET_by_offset(disp, _gloffset_UniformMatrix4fvARB, fn) -#define CALL_UseProgramObjectARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_UseProgramObjectARB, parameters) -#define GET_UseProgramObjectARB(disp) GET_by_offset(disp, _gloffset_UseProgramObjectARB) -#define SET_UseProgramObjectARB(disp, fn) SET_by_offset(disp, _gloffset_UseProgramObjectARB, fn) -#define CALL_ValidateProgramARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB)), _gloffset_ValidateProgramARB, parameters) -#define GET_ValidateProgramARB(disp) GET_by_offset(disp, _gloffset_ValidateProgramARB) -#define SET_ValidateProgramARB(disp, fn) SET_by_offset(disp, _gloffset_ValidateProgramARB, fn) -#define CALL_BindAttribLocationARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, const GLcharARB *)), _gloffset_BindAttribLocationARB, parameters) -#define GET_BindAttribLocationARB(disp) GET_by_offset(disp, _gloffset_BindAttribLocationARB) -#define SET_BindAttribLocationARB(disp, fn) SET_by_offset(disp, _gloffset_BindAttribLocationARB, fn) -#define CALL_GetActiveAttribARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)), _gloffset_GetActiveAttribARB, parameters) -#define GET_GetActiveAttribARB(disp) GET_by_offset(disp, _gloffset_GetActiveAttribARB) -#define SET_GetActiveAttribARB(disp, fn) SET_by_offset(disp, _gloffset_GetActiveAttribARB, fn) -#define CALL_GetAttribLocationARB(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLhandleARB, const GLcharARB *)), _gloffset_GetAttribLocationARB, parameters) -#define GET_GetAttribLocationARB(disp) GET_by_offset(disp, _gloffset_GetAttribLocationARB) -#define SET_GetAttribLocationARB(disp, fn) SET_by_offset(disp, _gloffset_GetAttribLocationARB, fn) -#define CALL_DrawBuffersARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLenum *)), _gloffset_DrawBuffersARB, parameters) -#define GET_DrawBuffersARB(disp) GET_by_offset(disp, _gloffset_DrawBuffersARB) -#define SET_DrawBuffersARB(disp, fn) SET_by_offset(disp, _gloffset_DrawBuffersARB, fn) -#define CALL_ClampColorARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_ClampColorARB, parameters) -#define GET_ClampColorARB(disp) GET_by_offset(disp, _gloffset_ClampColorARB) -#define SET_ClampColorARB(disp, fn) SET_by_offset(disp, _gloffset_ClampColorARB, fn) -#define CALL_DrawArraysInstancedARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLsizei, GLsizei)), _gloffset_DrawArraysInstancedARB, parameters) -#define GET_DrawArraysInstancedARB(disp) GET_by_offset(disp, _gloffset_DrawArraysInstancedARB) -#define SET_DrawArraysInstancedARB(disp, fn) SET_by_offset(disp, _gloffset_DrawArraysInstancedARB, fn) -#define CALL_DrawElementsInstancedARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, const GLvoid *, GLsizei)), _gloffset_DrawElementsInstancedARB, parameters) -#define GET_DrawElementsInstancedARB(disp) GET_by_offset(disp, _gloffset_DrawElementsInstancedARB) -#define SET_DrawElementsInstancedARB(disp, fn) SET_by_offset(disp, _gloffset_DrawElementsInstancedARB, fn) -#define CALL_RenderbufferStorageMultisample(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, GLsizei, GLsizei)), _gloffset_RenderbufferStorageMultisample, parameters) -#define GET_RenderbufferStorageMultisample(disp) GET_by_offset(disp, _gloffset_RenderbufferStorageMultisample) -#define SET_RenderbufferStorageMultisample(disp, fn) SET_by_offset(disp, _gloffset_RenderbufferStorageMultisample, fn) -#define CALL_FramebufferTextureARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTextureARB, parameters) -#define GET_FramebufferTextureARB(disp) GET_by_offset(disp, _gloffset_FramebufferTextureARB) -#define SET_FramebufferTextureARB(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTextureARB, fn) -#define CALL_FramebufferTextureFaceARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint, GLenum)), _gloffset_FramebufferTextureFaceARB, parameters) -#define GET_FramebufferTextureFaceARB(disp) GET_by_offset(disp, _gloffset_FramebufferTextureFaceARB) -#define SET_FramebufferTextureFaceARB(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTextureFaceARB, fn) -#define CALL_ProgramParameteriARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint)), _gloffset_ProgramParameteriARB, parameters) -#define GET_ProgramParameteriARB(disp) GET_by_offset(disp, _gloffset_ProgramParameteriARB) -#define SET_ProgramParameteriARB(disp, fn) SET_by_offset(disp, _gloffset_ProgramParameteriARB, fn) -#define CALL_VertexAttribDivisorARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_VertexAttribDivisorARB, parameters) -#define GET_VertexAttribDivisorARB(disp) GET_by_offset(disp, _gloffset_VertexAttribDivisorARB) -#define SET_VertexAttribDivisorARB(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribDivisorARB, fn) -#define CALL_FlushMappedBufferRange(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptr, GLsizeiptr)), _gloffset_FlushMappedBufferRange, parameters) -#define GET_FlushMappedBufferRange(disp) GET_by_offset(disp, _gloffset_FlushMappedBufferRange) -#define SET_FlushMappedBufferRange(disp, fn) SET_by_offset(disp, _gloffset_FlushMappedBufferRange, fn) -#define CALL_MapBufferRange(disp, parameters) CALL_by_offset(disp, (GLvoid * (GLAPIENTRYP)(GLenum, GLintptr, GLsizeiptr, GLbitfield)), _gloffset_MapBufferRange, parameters) -#define GET_MapBufferRange(disp) GET_by_offset(disp, _gloffset_MapBufferRange) -#define SET_MapBufferRange(disp, fn) SET_by_offset(disp, _gloffset_MapBufferRange, fn) -#define CALL_TexBufferARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint)), _gloffset_TexBufferARB, parameters) -#define GET_TexBufferARB(disp) GET_by_offset(disp, _gloffset_TexBufferARB) -#define SET_TexBufferARB(disp, fn) SET_by_offset(disp, _gloffset_TexBufferARB, fn) -#define CALL_BindVertexArray(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_BindVertexArray, parameters) -#define GET_BindVertexArray(disp) GET_by_offset(disp, _gloffset_BindVertexArray) -#define SET_BindVertexArray(disp, fn) SET_by_offset(disp, _gloffset_BindVertexArray, fn) -#define CALL_GenVertexArrays(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenVertexArrays, parameters) -#define GET_GenVertexArrays(disp) GET_by_offset(disp, _gloffset_GenVertexArrays) -#define SET_GenVertexArrays(disp, fn) SET_by_offset(disp, _gloffset_GenVertexArrays, fn) -#define CALL_CopyBufferSubData(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr)), _gloffset_CopyBufferSubData, parameters) -#define GET_CopyBufferSubData(disp) GET_by_offset(disp, _gloffset_CopyBufferSubData) -#define SET_CopyBufferSubData(disp, fn) SET_by_offset(disp, _gloffset_CopyBufferSubData, fn) -#define CALL_ClientWaitSync(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLsync, GLbitfield, GLuint64)), _gloffset_ClientWaitSync, parameters) -#define GET_ClientWaitSync(disp) GET_by_offset(disp, _gloffset_ClientWaitSync) -#define SET_ClientWaitSync(disp, fn) SET_by_offset(disp, _gloffset_ClientWaitSync, fn) -#define CALL_DeleteSync(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsync)), _gloffset_DeleteSync, parameters) -#define GET_DeleteSync(disp) GET_by_offset(disp, _gloffset_DeleteSync) -#define SET_DeleteSync(disp, fn) SET_by_offset(disp, _gloffset_DeleteSync, fn) -#define CALL_FenceSync(disp, parameters) CALL_by_offset(disp, (GLsync (GLAPIENTRYP)(GLenum, GLbitfield)), _gloffset_FenceSync, parameters) -#define GET_FenceSync(disp) GET_by_offset(disp, _gloffset_FenceSync) -#define SET_FenceSync(disp, fn) SET_by_offset(disp, _gloffset_FenceSync, fn) -#define CALL_GetInteger64v(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint64 *)), _gloffset_GetInteger64v, parameters) -#define GET_GetInteger64v(disp) GET_by_offset(disp, _gloffset_GetInteger64v) -#define SET_GetInteger64v(disp, fn) SET_by_offset(disp, _gloffset_GetInteger64v, fn) -#define CALL_GetSynciv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsync, GLenum, GLsizei, GLsizei *, GLint *)), _gloffset_GetSynciv, parameters) -#define GET_GetSynciv(disp) GET_by_offset(disp, _gloffset_GetSynciv) -#define SET_GetSynciv(disp, fn) SET_by_offset(disp, _gloffset_GetSynciv, fn) -#define CALL_IsSync(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLsync)), _gloffset_IsSync, parameters) -#define GET_IsSync(disp) GET_by_offset(disp, _gloffset_IsSync) -#define SET_IsSync(disp, fn) SET_by_offset(disp, _gloffset_IsSync, fn) -#define CALL_WaitSync(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsync, GLbitfield, GLuint64)), _gloffset_WaitSync, parameters) -#define GET_WaitSync(disp) GET_by_offset(disp, _gloffset_WaitSync) -#define SET_WaitSync(disp, fn) SET_by_offset(disp, _gloffset_WaitSync, fn) -#define CALL_DrawElementsBaseVertex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLenum, const GLvoid *, GLint)), _gloffset_DrawElementsBaseVertex, parameters) -#define GET_DrawElementsBaseVertex(disp) GET_by_offset(disp, _gloffset_DrawElementsBaseVertex) -#define SET_DrawElementsBaseVertex(disp, fn) SET_by_offset(disp, _gloffset_DrawElementsBaseVertex, fn) -#define CALL_DrawRangeElementsBaseVertex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *, GLint)), _gloffset_DrawRangeElementsBaseVertex, parameters) -#define GET_DrawRangeElementsBaseVertex(disp) GET_by_offset(disp, _gloffset_DrawRangeElementsBaseVertex) -#define SET_DrawRangeElementsBaseVertex(disp, fn) SET_by_offset(disp, _gloffset_DrawRangeElementsBaseVertex, fn) -#define CALL_MultiDrawElementsBaseVertex(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei, const GLint *)), _gloffset_MultiDrawElementsBaseVertex, parameters) -#define GET_MultiDrawElementsBaseVertex(disp) GET_by_offset(disp, _gloffset_MultiDrawElementsBaseVertex) -#define SET_MultiDrawElementsBaseVertex(disp, fn) SET_by_offset(disp, _gloffset_MultiDrawElementsBaseVertex, fn) -#define CALL_BlendEquationSeparateiARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLenum)), _gloffset_BlendEquationSeparateiARB, parameters) -#define GET_BlendEquationSeparateiARB(disp) GET_by_offset(disp, _gloffset_BlendEquationSeparateiARB) -#define SET_BlendEquationSeparateiARB(disp, fn) SET_by_offset(disp, _gloffset_BlendEquationSeparateiARB, fn) -#define CALL_BlendEquationiARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_BlendEquationiARB, parameters) -#define GET_BlendEquationiARB(disp) GET_by_offset(disp, _gloffset_BlendEquationiARB) -#define SET_BlendEquationiARB(disp, fn) SET_by_offset(disp, _gloffset_BlendEquationiARB, fn) -#define CALL_BlendFuncSeparateiARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLenum, GLenum, GLenum)), _gloffset_BlendFuncSeparateiARB, parameters) -#define GET_BlendFuncSeparateiARB(disp) GET_by_offset(disp, _gloffset_BlendFuncSeparateiARB) -#define SET_BlendFuncSeparateiARB(disp, fn) SET_by_offset(disp, _gloffset_BlendFuncSeparateiARB, fn) -#define CALL_BlendFunciARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLenum)), _gloffset_BlendFunciARB, parameters) -#define GET_BlendFunciARB(disp) GET_by_offset(disp, _gloffset_BlendFunciARB) -#define SET_BlendFunciARB(disp, fn) SET_by_offset(disp, _gloffset_BlendFunciARB, fn) -#define CALL_BindSampler(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_BindSampler, parameters) -#define GET_BindSampler(disp) GET_by_offset(disp, _gloffset_BindSampler) -#define SET_BindSampler(disp, fn) SET_by_offset(disp, _gloffset_BindSampler, fn) -#define CALL_DeleteSamplers(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteSamplers, parameters) -#define GET_DeleteSamplers(disp) GET_by_offset(disp, _gloffset_DeleteSamplers) -#define SET_DeleteSamplers(disp, fn) SET_by_offset(disp, _gloffset_DeleteSamplers, fn) -#define CALL_GenSamplers(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenSamplers, parameters) -#define GET_GenSamplers(disp) GET_by_offset(disp, _gloffset_GenSamplers) -#define SET_GenSamplers(disp, fn) SET_by_offset(disp, _gloffset_GenSamplers, fn) -#define CALL_GetSamplerParameterIiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetSamplerParameterIiv, parameters) -#define GET_GetSamplerParameterIiv(disp) GET_by_offset(disp, _gloffset_GetSamplerParameterIiv) -#define SET_GetSamplerParameterIiv(disp, fn) SET_by_offset(disp, _gloffset_GetSamplerParameterIiv, fn) -#define CALL_GetSamplerParameterIuiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint *)), _gloffset_GetSamplerParameterIuiv, parameters) -#define GET_GetSamplerParameterIuiv(disp) GET_by_offset(disp, _gloffset_GetSamplerParameterIuiv) -#define SET_GetSamplerParameterIuiv(disp, fn) SET_by_offset(disp, _gloffset_GetSamplerParameterIuiv, fn) -#define CALL_GetSamplerParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLfloat *)), _gloffset_GetSamplerParameterfv, parameters) -#define GET_GetSamplerParameterfv(disp) GET_by_offset(disp, _gloffset_GetSamplerParameterfv) -#define SET_GetSamplerParameterfv(disp, fn) SET_by_offset(disp, _gloffset_GetSamplerParameterfv, fn) -#define CALL_GetSamplerParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetSamplerParameteriv, parameters) -#define GET_GetSamplerParameteriv(disp) GET_by_offset(disp, _gloffset_GetSamplerParameteriv) -#define SET_GetSamplerParameteriv(disp, fn) SET_by_offset(disp, _gloffset_GetSamplerParameteriv, fn) -#define CALL_IsSampler(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsSampler, parameters) -#define GET_IsSampler(disp) GET_by_offset(disp, _gloffset_IsSampler) -#define SET_IsSampler(disp, fn) SET_by_offset(disp, _gloffset_IsSampler, fn) -#define CALL_SamplerParameterIiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, const GLint *)), _gloffset_SamplerParameterIiv, parameters) -#define GET_SamplerParameterIiv(disp) GET_by_offset(disp, _gloffset_SamplerParameterIiv) -#define SET_SamplerParameterIiv(disp, fn) SET_by_offset(disp, _gloffset_SamplerParameterIiv, fn) -#define CALL_SamplerParameterIuiv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, const GLuint *)), _gloffset_SamplerParameterIuiv, parameters) -#define GET_SamplerParameterIuiv(disp) GET_by_offset(disp, _gloffset_SamplerParameterIuiv) -#define SET_SamplerParameterIuiv(disp, fn) SET_by_offset(disp, _gloffset_SamplerParameterIuiv, fn) -#define CALL_SamplerParameterf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLfloat)), _gloffset_SamplerParameterf, parameters) -#define GET_SamplerParameterf(disp) GET_by_offset(disp, _gloffset_SamplerParameterf) -#define SET_SamplerParameterf(disp, fn) SET_by_offset(disp, _gloffset_SamplerParameterf, fn) -#define CALL_SamplerParameterfv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, const GLfloat *)), _gloffset_SamplerParameterfv, parameters) -#define GET_SamplerParameterfv(disp) GET_by_offset(disp, _gloffset_SamplerParameterfv) -#define SET_SamplerParameterfv(disp, fn) SET_by_offset(disp, _gloffset_SamplerParameterfv, fn) -#define CALL_SamplerParameteri(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint)), _gloffset_SamplerParameteri, parameters) -#define GET_SamplerParameteri(disp) GET_by_offset(disp, _gloffset_SamplerParameteri) -#define SET_SamplerParameteri(disp, fn) SET_by_offset(disp, _gloffset_SamplerParameteri, fn) -#define CALL_SamplerParameteriv(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, const GLint *)), _gloffset_SamplerParameteriv, parameters) -#define GET_SamplerParameteriv(disp) GET_by_offset(disp, _gloffset_SamplerParameteriv) -#define SET_SamplerParameteriv(disp, fn) SET_by_offset(disp, _gloffset_SamplerParameteriv, fn) -#define CALL_BindTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindTransformFeedback, parameters) -#define GET_BindTransformFeedback(disp) GET_by_offset(disp, _gloffset_BindTransformFeedback) -#define SET_BindTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_BindTransformFeedback, fn) -#define CALL_DeleteTransformFeedbacks(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteTransformFeedbacks, parameters) -#define GET_DeleteTransformFeedbacks(disp) GET_by_offset(disp, _gloffset_DeleteTransformFeedbacks) -#define SET_DeleteTransformFeedbacks(disp, fn) SET_by_offset(disp, _gloffset_DeleteTransformFeedbacks, fn) -#define CALL_DrawTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_DrawTransformFeedback, parameters) -#define GET_DrawTransformFeedback(disp) GET_by_offset(disp, _gloffset_DrawTransformFeedback) -#define SET_DrawTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_DrawTransformFeedback, fn) -#define CALL_GenTransformFeedbacks(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenTransformFeedbacks, parameters) -#define GET_GenTransformFeedbacks(disp) GET_by_offset(disp, _gloffset_GenTransformFeedbacks) -#define SET_GenTransformFeedbacks(disp, fn) SET_by_offset(disp, _gloffset_GenTransformFeedbacks, fn) -#define CALL_IsTransformFeedback(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsTransformFeedback, parameters) -#define GET_IsTransformFeedback(disp) GET_by_offset(disp, _gloffset_IsTransformFeedback) -#define SET_IsTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_IsTransformFeedback, fn) -#define CALL_PauseTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PauseTransformFeedback, parameters) -#define GET_PauseTransformFeedback(disp) GET_by_offset(disp, _gloffset_PauseTransformFeedback) -#define SET_PauseTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_PauseTransformFeedback, fn) -#define CALL_ResumeTransformFeedback(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_ResumeTransformFeedback, parameters) -#define GET_ResumeTransformFeedback(disp) GET_by_offset(disp, _gloffset_ResumeTransformFeedback) -#define SET_ResumeTransformFeedback(disp, fn) SET_by_offset(disp, _gloffset_ResumeTransformFeedback, fn) -#define CALL_ClearDepthf(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf)), _gloffset_ClearDepthf, parameters) -#define GET_ClearDepthf(disp) GET_by_offset(disp, _gloffset_ClearDepthf) -#define SET_ClearDepthf(disp, fn) SET_by_offset(disp, _gloffset_ClearDepthf, fn) -#define CALL_DepthRangef(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLclampf)), _gloffset_DepthRangef, parameters) -#define GET_DepthRangef(disp) GET_by_offset(disp, _gloffset_DepthRangef) -#define SET_DepthRangef(disp, fn) SET_by_offset(disp, _gloffset_DepthRangef, fn) -#define CALL_GetShaderPrecisionFormat(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *, GLint *)), _gloffset_GetShaderPrecisionFormat, parameters) -#define GET_GetShaderPrecisionFormat(disp) GET_by_offset(disp, _gloffset_GetShaderPrecisionFormat) -#define SET_GetShaderPrecisionFormat(disp, fn) SET_by_offset(disp, _gloffset_GetShaderPrecisionFormat, fn) -#define CALL_ReleaseShaderCompiler(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_ReleaseShaderCompiler, parameters) -#define GET_ReleaseShaderCompiler(disp) GET_by_offset(disp, _gloffset_ReleaseShaderCompiler) -#define SET_ReleaseShaderCompiler(disp, fn) SET_by_offset(disp, _gloffset_ReleaseShaderCompiler, fn) -#define CALL_ShaderBinary(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *, GLenum, const GLvoid *, GLsizei)), _gloffset_ShaderBinary, parameters) -#define GET_ShaderBinary(disp) GET_by_offset(disp, _gloffset_ShaderBinary) -#define SET_ShaderBinary(disp, fn) SET_by_offset(disp, _gloffset_ShaderBinary, fn) -#define CALL_GetGraphicsResetStatusARB(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(void)), _gloffset_GetGraphicsResetStatusARB, parameters) -#define GET_GetGraphicsResetStatusARB(disp) GET_by_offset(disp, _gloffset_GetGraphicsResetStatusARB) -#define SET_GetGraphicsResetStatusARB(disp, fn) SET_by_offset(disp, _gloffset_GetGraphicsResetStatusARB, fn) -#define CALL_GetnColorTableARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLsizei, GLvoid *)), _gloffset_GetnColorTableARB, parameters) -#define GET_GetnColorTableARB(disp) GET_by_offset(disp, _gloffset_GetnColorTableARB) -#define SET_GetnColorTableARB(disp, fn) SET_by_offset(disp, _gloffset_GetnColorTableARB, fn) -#define CALL_GetnCompressedTexImageARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLsizei, GLvoid *)), _gloffset_GetnCompressedTexImageARB, parameters) -#define GET_GetnCompressedTexImageARB(disp) GET_by_offset(disp, _gloffset_GetnCompressedTexImageARB) -#define SET_GetnCompressedTexImageARB(disp, fn) SET_by_offset(disp, _gloffset_GetnCompressedTexImageARB, fn) -#define CALL_GetnConvolutionFilterARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLsizei, GLvoid *)), _gloffset_GetnConvolutionFilterARB, parameters) -#define GET_GetnConvolutionFilterARB(disp) GET_by_offset(disp, _gloffset_GetnConvolutionFilterARB) -#define SET_GetnConvolutionFilterARB(disp, fn) SET_by_offset(disp, _gloffset_GetnConvolutionFilterARB, fn) -#define CALL_GetnHistogramARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLboolean, GLenum, GLenum, GLsizei, GLvoid *)), _gloffset_GetnHistogramARB, parameters) -#define GET_GetnHistogramARB(disp) GET_by_offset(disp, _gloffset_GetnHistogramARB) -#define SET_GetnHistogramARB(disp, fn) SET_by_offset(disp, _gloffset_GetnHistogramARB, fn) -#define CALL_GetnMapdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLdouble *)), _gloffset_GetnMapdvARB, parameters) -#define GET_GetnMapdvARB(disp) GET_by_offset(disp, _gloffset_GetnMapdvARB) -#define SET_GetnMapdvARB(disp, fn) SET_by_offset(disp, _gloffset_GetnMapdvARB, fn) -#define CALL_GetnMapfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLfloat *)), _gloffset_GetnMapfvARB, parameters) -#define GET_GetnMapfvARB(disp) GET_by_offset(disp, _gloffset_GetnMapfvARB) -#define SET_GetnMapfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetnMapfvARB, fn) -#define CALL_GetnMapivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLint *)), _gloffset_GetnMapivARB, parameters) -#define GET_GetnMapivARB(disp) GET_by_offset(disp, _gloffset_GetnMapivARB) -#define SET_GetnMapivARB(disp, fn) SET_by_offset(disp, _gloffset_GetnMapivARB, fn) -#define CALL_GetnMinmaxARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLboolean, GLenum, GLenum, GLsizei, GLvoid *)), _gloffset_GetnMinmaxARB, parameters) -#define GET_GetnMinmaxARB(disp) GET_by_offset(disp, _gloffset_GetnMinmaxARB) -#define SET_GetnMinmaxARB(disp, fn) SET_by_offset(disp, _gloffset_GetnMinmaxARB, fn) -#define CALL_GetnPixelMapfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLfloat *)), _gloffset_GetnPixelMapfvARB, parameters) -#define GET_GetnPixelMapfvARB(disp) GET_by_offset(disp, _gloffset_GetnPixelMapfvARB) -#define SET_GetnPixelMapfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetnPixelMapfvARB, fn) -#define CALL_GetnPixelMapuivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLuint *)), _gloffset_GetnPixelMapuivARB, parameters) -#define GET_GetnPixelMapuivARB(disp) GET_by_offset(disp, _gloffset_GetnPixelMapuivARB) -#define SET_GetnPixelMapuivARB(disp, fn) SET_by_offset(disp, _gloffset_GetnPixelMapuivARB, fn) -#define CALL_GetnPixelMapusvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLushort *)), _gloffset_GetnPixelMapusvARB, parameters) -#define GET_GetnPixelMapusvARB(disp) GET_by_offset(disp, _gloffset_GetnPixelMapusvARB) -#define SET_GetnPixelMapusvARB(disp, fn) SET_by_offset(disp, _gloffset_GetnPixelMapusvARB, fn) -#define CALL_GetnPolygonStippleARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLubyte *)), _gloffset_GetnPolygonStippleARB, parameters) -#define GET_GetnPolygonStippleARB(disp) GET_by_offset(disp, _gloffset_GetnPolygonStippleARB) -#define SET_GetnPolygonStippleARB(disp, fn) SET_by_offset(disp, _gloffset_GetnPolygonStippleARB, fn) -#define CALL_GetnSeparableFilterARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLsizei, GLvoid *, GLsizei, GLvoid *, GLvoid *)), _gloffset_GetnSeparableFilterARB, parameters) -#define GET_GetnSeparableFilterARB(disp) GET_by_offset(disp, _gloffset_GetnSeparableFilterARB) -#define SET_GetnSeparableFilterARB(disp, fn) SET_by_offset(disp, _gloffset_GetnSeparableFilterARB, fn) -#define CALL_GetnTexImageARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint, GLenum, GLenum, GLsizei, GLvoid *)), _gloffset_GetnTexImageARB, parameters) -#define GET_GetnTexImageARB(disp) GET_by_offset(disp, _gloffset_GetnTexImageARB) -#define SET_GetnTexImageARB(disp, fn) SET_by_offset(disp, _gloffset_GetnTexImageARB, fn) -#define CALL_GetnUniformdvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLsizei, GLdouble *)), _gloffset_GetnUniformdvARB, parameters) -#define GET_GetnUniformdvARB(disp) GET_by_offset(disp, _gloffset_GetnUniformdvARB) -#define SET_GetnUniformdvARB(disp, fn) SET_by_offset(disp, _gloffset_GetnUniformdvARB, fn) -#define CALL_GetnUniformfvARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLsizei, GLfloat *)), _gloffset_GetnUniformfvARB, parameters) -#define GET_GetnUniformfvARB(disp) GET_by_offset(disp, _gloffset_GetnUniformfvARB) -#define SET_GetnUniformfvARB(disp, fn) SET_by_offset(disp, _gloffset_GetnUniformfvARB, fn) -#define CALL_GetnUniformivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLsizei, GLint *)), _gloffset_GetnUniformivARB, parameters) -#define GET_GetnUniformivARB(disp) GET_by_offset(disp, _gloffset_GetnUniformivARB) -#define SET_GetnUniformivARB(disp, fn) SET_by_offset(disp, _gloffset_GetnUniformivARB, fn) -#define CALL_GetnUniformuivARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLhandleARB, GLint, GLsizei, GLuint *)), _gloffset_GetnUniformuivARB, parameters) -#define GET_GetnUniformuivARB(disp) GET_by_offset(disp, _gloffset_GetnUniformuivARB) -#define SET_GetnUniformuivARB(disp, fn) SET_by_offset(disp, _gloffset_GetnUniformuivARB, fn) -#define CALL_ReadnPixelsARB(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLsizei, GLvoid *)), _gloffset_ReadnPixelsARB, parameters) -#define GET_ReadnPixelsARB(disp) GET_by_offset(disp, _gloffset_ReadnPixelsARB) -#define SET_ReadnPixelsARB(disp, fn) SET_by_offset(disp, _gloffset_ReadnPixelsARB, fn) -#define CALL_PolygonOffsetEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_PolygonOffsetEXT, parameters) -#define GET_PolygonOffsetEXT(disp) GET_by_offset(disp, _gloffset_PolygonOffsetEXT) -#define SET_PolygonOffsetEXT(disp, fn) SET_by_offset(disp, _gloffset_PolygonOffsetEXT, fn) -#define CALL_GetPixelTexGenParameterfvSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetPixelTexGenParameterfvSGIS, parameters) -#define GET_GetPixelTexGenParameterfvSGIS(disp) GET_by_offset(disp, _gloffset_GetPixelTexGenParameterfvSGIS) -#define SET_GetPixelTexGenParameterfvSGIS(disp, fn) SET_by_offset(disp, _gloffset_GetPixelTexGenParameterfvSGIS, fn) -#define CALL_GetPixelTexGenParameterivSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *)), _gloffset_GetPixelTexGenParameterivSGIS, parameters) -#define GET_GetPixelTexGenParameterivSGIS(disp) GET_by_offset(disp, _gloffset_GetPixelTexGenParameterivSGIS) -#define SET_GetPixelTexGenParameterivSGIS(disp, fn) SET_by_offset(disp, _gloffset_GetPixelTexGenParameterivSGIS, fn) -#define CALL_PixelTexGenParameterfSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PixelTexGenParameterfSGIS, parameters) -#define GET_PixelTexGenParameterfSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameterfSGIS) -#define SET_PixelTexGenParameterfSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameterfSGIS, fn) -#define CALL_PixelTexGenParameterfvSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_PixelTexGenParameterfvSGIS, parameters) -#define GET_PixelTexGenParameterfvSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameterfvSGIS) -#define SET_PixelTexGenParameterfvSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameterfvSGIS, fn) -#define CALL_PixelTexGenParameteriSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PixelTexGenParameteriSGIS, parameters) -#define GET_PixelTexGenParameteriSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameteriSGIS) -#define SET_PixelTexGenParameteriSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameteriSGIS, fn) -#define CALL_PixelTexGenParameterivSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_PixelTexGenParameterivSGIS, parameters) -#define GET_PixelTexGenParameterivSGIS(disp) GET_by_offset(disp, _gloffset_PixelTexGenParameterivSGIS) -#define SET_PixelTexGenParameterivSGIS(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenParameterivSGIS, fn) -#define CALL_SampleMaskSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampf, GLboolean)), _gloffset_SampleMaskSGIS, parameters) -#define GET_SampleMaskSGIS(disp) GET_by_offset(disp, _gloffset_SampleMaskSGIS) -#define SET_SampleMaskSGIS(disp, fn) SET_by_offset(disp, _gloffset_SampleMaskSGIS, fn) -#define CALL_SamplePatternSGIS(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_SamplePatternSGIS, parameters) -#define GET_SamplePatternSGIS(disp) GET_by_offset(disp, _gloffset_SamplePatternSGIS) -#define SET_SamplePatternSGIS(disp, fn) SET_by_offset(disp, _gloffset_SamplePatternSGIS, fn) -#define CALL_ColorPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_ColorPointerEXT, parameters) -#define GET_ColorPointerEXT(disp) GET_by_offset(disp, _gloffset_ColorPointerEXT) -#define SET_ColorPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_ColorPointerEXT, fn) -#define CALL_EdgeFlagPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLsizei, const GLboolean *)), _gloffset_EdgeFlagPointerEXT, parameters) -#define GET_EdgeFlagPointerEXT(disp) GET_by_offset(disp, _gloffset_EdgeFlagPointerEXT) -#define SET_EdgeFlagPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_EdgeFlagPointerEXT, fn) -#define CALL_IndexPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_IndexPointerEXT, parameters) -#define GET_IndexPointerEXT(disp) GET_by_offset(disp, _gloffset_IndexPointerEXT) -#define SET_IndexPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_IndexPointerEXT, fn) -#define CALL_NormalPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_NormalPointerEXT, parameters) -#define GET_NormalPointerEXT(disp) GET_by_offset(disp, _gloffset_NormalPointerEXT) -#define SET_NormalPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_NormalPointerEXT, fn) -#define CALL_TexCoordPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_TexCoordPointerEXT, parameters) -#define GET_TexCoordPointerEXT(disp) GET_by_offset(disp, _gloffset_TexCoordPointerEXT) -#define SET_TexCoordPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_TexCoordPointerEXT, fn) -#define CALL_VertexPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)), _gloffset_VertexPointerEXT, parameters) -#define GET_VertexPointerEXT(disp) GET_by_offset(disp, _gloffset_VertexPointerEXT) -#define SET_VertexPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexPointerEXT, fn) -#define CALL_PointParameterfEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_PointParameterfEXT, parameters) -#define GET_PointParameterfEXT(disp) GET_by_offset(disp, _gloffset_PointParameterfEXT) -#define SET_PointParameterfEXT(disp, fn) SET_by_offset(disp, _gloffset_PointParameterfEXT, fn) -#define CALL_PointParameterfvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_PointParameterfvEXT, parameters) -#define GET_PointParameterfvEXT(disp) GET_by_offset(disp, _gloffset_PointParameterfvEXT) -#define SET_PointParameterfvEXT(disp, fn) SET_by_offset(disp, _gloffset_PointParameterfvEXT, fn) -#define CALL_LockArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei)), _gloffset_LockArraysEXT, parameters) -#define GET_LockArraysEXT(disp) GET_by_offset(disp, _gloffset_LockArraysEXT) -#define SET_LockArraysEXT(disp, fn) SET_by_offset(disp, _gloffset_LockArraysEXT, fn) -#define CALL_UnlockArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_UnlockArraysEXT, parameters) -#define GET_UnlockArraysEXT(disp) GET_by_offset(disp, _gloffset_UnlockArraysEXT) -#define SET_UnlockArraysEXT(disp, fn) SET_by_offset(disp, _gloffset_UnlockArraysEXT, fn) -#define CALL_SecondaryColor3bEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLbyte, GLbyte, GLbyte)), _gloffset_SecondaryColor3bEXT, parameters) -#define GET_SecondaryColor3bEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3bEXT) -#define SET_SecondaryColor3bEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3bEXT, fn) -#define CALL_SecondaryColor3bvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLbyte *)), _gloffset_SecondaryColor3bvEXT, parameters) -#define GET_SecondaryColor3bvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3bvEXT) -#define SET_SecondaryColor3bvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3bvEXT, fn) -#define CALL_SecondaryColor3dEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_SecondaryColor3dEXT, parameters) -#define GET_SecondaryColor3dEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3dEXT) -#define SET_SecondaryColor3dEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3dEXT, fn) -#define CALL_SecondaryColor3dvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_SecondaryColor3dvEXT, parameters) -#define GET_SecondaryColor3dvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3dvEXT) -#define SET_SecondaryColor3dvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3dvEXT, fn) -#define CALL_SecondaryColor3fEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_SecondaryColor3fEXT, parameters) -#define GET_SecondaryColor3fEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3fEXT) -#define SET_SecondaryColor3fEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3fEXT, fn) -#define CALL_SecondaryColor3fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_SecondaryColor3fvEXT, parameters) -#define GET_SecondaryColor3fvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3fvEXT) -#define SET_SecondaryColor3fvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3fvEXT, fn) -#define CALL_SecondaryColor3iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_SecondaryColor3iEXT, parameters) -#define GET_SecondaryColor3iEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3iEXT) -#define SET_SecondaryColor3iEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3iEXT, fn) -#define CALL_SecondaryColor3ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_SecondaryColor3ivEXT, parameters) -#define GET_SecondaryColor3ivEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3ivEXT) -#define SET_SecondaryColor3ivEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3ivEXT, fn) -#define CALL_SecondaryColor3sEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_SecondaryColor3sEXT, parameters) -#define GET_SecondaryColor3sEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3sEXT) -#define SET_SecondaryColor3sEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3sEXT, fn) -#define CALL_SecondaryColor3svEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_SecondaryColor3svEXT, parameters) -#define GET_SecondaryColor3svEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3svEXT) -#define SET_SecondaryColor3svEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3svEXT, fn) -#define CALL_SecondaryColor3ubEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLubyte, GLubyte, GLubyte)), _gloffset_SecondaryColor3ubEXT, parameters) -#define GET_SecondaryColor3ubEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3ubEXT) -#define SET_SecondaryColor3ubEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3ubEXT, fn) -#define CALL_SecondaryColor3ubvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLubyte *)), _gloffset_SecondaryColor3ubvEXT, parameters) -#define GET_SecondaryColor3ubvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3ubvEXT) -#define SET_SecondaryColor3ubvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3ubvEXT, fn) -#define CALL_SecondaryColor3uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint)), _gloffset_SecondaryColor3uiEXT, parameters) -#define GET_SecondaryColor3uiEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3uiEXT) -#define SET_SecondaryColor3uiEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3uiEXT, fn) -#define CALL_SecondaryColor3uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLuint *)), _gloffset_SecondaryColor3uivEXT, parameters) -#define GET_SecondaryColor3uivEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3uivEXT) -#define SET_SecondaryColor3uivEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3uivEXT, fn) -#define CALL_SecondaryColor3usEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLushort, GLushort, GLushort)), _gloffset_SecondaryColor3usEXT, parameters) -#define GET_SecondaryColor3usEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3usEXT) -#define SET_SecondaryColor3usEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3usEXT, fn) -#define CALL_SecondaryColor3usvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLushort *)), _gloffset_SecondaryColor3usvEXT, parameters) -#define GET_SecondaryColor3usvEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColor3usvEXT) -#define SET_SecondaryColor3usvEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColor3usvEXT, fn) -#define CALL_SecondaryColorPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_SecondaryColorPointerEXT, parameters) -#define GET_SecondaryColorPointerEXT(disp) GET_by_offset(disp, _gloffset_SecondaryColorPointerEXT) -#define SET_SecondaryColorPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_SecondaryColorPointerEXT, fn) -#define CALL_MultiDrawArraysEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *, const GLsizei *, GLsizei)), _gloffset_MultiDrawArraysEXT, parameters) -#define GET_MultiDrawArraysEXT(disp) GET_by_offset(disp, _gloffset_MultiDrawArraysEXT) -#define SET_MultiDrawArraysEXT(disp, fn) SET_by_offset(disp, _gloffset_MultiDrawArraysEXT, fn) -#define CALL_MultiDrawElementsEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei)), _gloffset_MultiDrawElementsEXT, parameters) -#define GET_MultiDrawElementsEXT(disp) GET_by_offset(disp, _gloffset_MultiDrawElementsEXT) -#define SET_MultiDrawElementsEXT(disp, fn) SET_by_offset(disp, _gloffset_MultiDrawElementsEXT, fn) -#define CALL_FogCoordPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, const GLvoid *)), _gloffset_FogCoordPointerEXT, parameters) -#define GET_FogCoordPointerEXT(disp) GET_by_offset(disp, _gloffset_FogCoordPointerEXT) -#define SET_FogCoordPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoordPointerEXT, fn) -#define CALL_FogCoorddEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble)), _gloffset_FogCoorddEXT, parameters) -#define GET_FogCoorddEXT(disp) GET_by_offset(disp, _gloffset_FogCoorddEXT) -#define SET_FogCoorddEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoorddEXT, fn) -#define CALL_FogCoorddvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_FogCoorddvEXT, parameters) -#define GET_FogCoorddvEXT(disp) GET_by_offset(disp, _gloffset_FogCoorddvEXT) -#define SET_FogCoorddvEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoorddvEXT, fn) -#define CALL_FogCoordfEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat)), _gloffset_FogCoordfEXT, parameters) -#define GET_FogCoordfEXT(disp) GET_by_offset(disp, _gloffset_FogCoordfEXT) -#define SET_FogCoordfEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoordfEXT, fn) -#define CALL_FogCoordfvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_FogCoordfvEXT, parameters) -#define GET_FogCoordfvEXT(disp) GET_by_offset(disp, _gloffset_FogCoordfvEXT) -#define SET_FogCoordfvEXT(disp, fn) SET_by_offset(disp, _gloffset_FogCoordfvEXT, fn) -#define CALL_PixelTexGenSGIX(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_PixelTexGenSGIX, parameters) -#define GET_PixelTexGenSGIX(disp) GET_by_offset(disp, _gloffset_PixelTexGenSGIX) -#define SET_PixelTexGenSGIX(disp, fn) SET_by_offset(disp, _gloffset_PixelTexGenSGIX, fn) -#define CALL_BlendFuncSeparateEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), _gloffset_BlendFuncSeparateEXT, parameters) -#define GET_BlendFuncSeparateEXT(disp) GET_by_offset(disp, _gloffset_BlendFuncSeparateEXT) -#define SET_BlendFuncSeparateEXT(disp, fn) SET_by_offset(disp, _gloffset_BlendFuncSeparateEXT, fn) -#define CALL_FlushVertexArrayRangeNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_FlushVertexArrayRangeNV, parameters) -#define GET_FlushVertexArrayRangeNV(disp) GET_by_offset(disp, _gloffset_FlushVertexArrayRangeNV) -#define SET_FlushVertexArrayRangeNV(disp, fn) SET_by_offset(disp, _gloffset_FlushVertexArrayRangeNV, fn) -#define CALL_VertexArrayRangeNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLvoid *)), _gloffset_VertexArrayRangeNV, parameters) -#define GET_VertexArrayRangeNV(disp) GET_by_offset(disp, _gloffset_VertexArrayRangeNV) -#define SET_VertexArrayRangeNV(disp, fn) SET_by_offset(disp, _gloffset_VertexArrayRangeNV, fn) -#define CALL_CombinerInputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum)), _gloffset_CombinerInputNV, parameters) -#define GET_CombinerInputNV(disp) GET_by_offset(disp, _gloffset_CombinerInputNV) -#define SET_CombinerInputNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerInputNV, fn) -#define CALL_CombinerOutputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean)), _gloffset_CombinerOutputNV, parameters) -#define GET_CombinerOutputNV(disp) GET_by_offset(disp, _gloffset_CombinerOutputNV) -#define SET_CombinerOutputNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerOutputNV, fn) -#define CALL_CombinerParameterfNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat)), _gloffset_CombinerParameterfNV, parameters) -#define GET_CombinerParameterfNV(disp) GET_by_offset(disp, _gloffset_CombinerParameterfNV) -#define SET_CombinerParameterfNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameterfNV, fn) -#define CALL_CombinerParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_CombinerParameterfvNV, parameters) -#define GET_CombinerParameterfvNV(disp) GET_by_offset(disp, _gloffset_CombinerParameterfvNV) -#define SET_CombinerParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameterfvNV, fn) -#define CALL_CombinerParameteriNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_CombinerParameteriNV, parameters) -#define GET_CombinerParameteriNV(disp) GET_by_offset(disp, _gloffset_CombinerParameteriNV) -#define SET_CombinerParameteriNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameteriNV, fn) -#define CALL_CombinerParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_CombinerParameterivNV, parameters) -#define GET_CombinerParameterivNV(disp) GET_by_offset(disp, _gloffset_CombinerParameterivNV) -#define SET_CombinerParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_CombinerParameterivNV, fn) -#define CALL_FinalCombinerInputNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum)), _gloffset_FinalCombinerInputNV, parameters) -#define GET_FinalCombinerInputNV(disp) GET_by_offset(disp, _gloffset_FinalCombinerInputNV) -#define SET_FinalCombinerInputNV(disp, fn) SET_by_offset(disp, _gloffset_FinalCombinerInputNV, fn) -#define CALL_GetCombinerInputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLfloat *)), _gloffset_GetCombinerInputParameterfvNV, parameters) -#define GET_GetCombinerInputParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetCombinerInputParameterfvNV) -#define SET_GetCombinerInputParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerInputParameterfvNV, fn) -#define CALL_GetCombinerInputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLenum, GLint *)), _gloffset_GetCombinerInputParameterivNV, parameters) -#define GET_GetCombinerInputParameterivNV(disp) GET_by_offset(disp, _gloffset_GetCombinerInputParameterivNV) -#define SET_GetCombinerInputParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerInputParameterivNV, fn) -#define CALL_GetCombinerOutputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLfloat *)), _gloffset_GetCombinerOutputParameterfvNV, parameters) -#define GET_GetCombinerOutputParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetCombinerOutputParameterfvNV) -#define SET_GetCombinerOutputParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerOutputParameterfvNV, fn) -#define CALL_GetCombinerOutputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLint *)), _gloffset_GetCombinerOutputParameterivNV, parameters) -#define GET_GetCombinerOutputParameterivNV(disp) GET_by_offset(disp, _gloffset_GetCombinerOutputParameterivNV) -#define SET_GetCombinerOutputParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_GetCombinerOutputParameterivNV, fn) -#define CALL_GetFinalCombinerInputParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLfloat *)), _gloffset_GetFinalCombinerInputParameterfvNV, parameters) -#define GET_GetFinalCombinerInputParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterfvNV) -#define SET_GetFinalCombinerInputParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterfvNV, fn) -#define CALL_GetFinalCombinerInputParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetFinalCombinerInputParameterivNV, parameters) -#define GET_GetFinalCombinerInputParameterivNV(disp) GET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterivNV) -#define SET_GetFinalCombinerInputParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterivNV, fn) -#define CALL_ResizeBuffersMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_ResizeBuffersMESA, parameters) -#define GET_ResizeBuffersMESA(disp) GET_by_offset(disp, _gloffset_ResizeBuffersMESA) -#define SET_ResizeBuffersMESA(disp, fn) SET_by_offset(disp, _gloffset_ResizeBuffersMESA, fn) -#define CALL_WindowPos2dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble)), _gloffset_WindowPos2dMESA, parameters) -#define GET_WindowPos2dMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2dMESA) -#define SET_WindowPos2dMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2dMESA, fn) -#define CALL_WindowPos2dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_WindowPos2dvMESA, parameters) -#define GET_WindowPos2dvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2dvMESA) -#define SET_WindowPos2dvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2dvMESA, fn) -#define CALL_WindowPos2fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat)), _gloffset_WindowPos2fMESA, parameters) -#define GET_WindowPos2fMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2fMESA) -#define SET_WindowPos2fMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2fMESA, fn) -#define CALL_WindowPos2fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_WindowPos2fvMESA, parameters) -#define GET_WindowPos2fvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2fvMESA) -#define SET_WindowPos2fvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2fvMESA, fn) -#define CALL_WindowPos2iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint)), _gloffset_WindowPos2iMESA, parameters) -#define GET_WindowPos2iMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2iMESA) -#define SET_WindowPos2iMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2iMESA, fn) -#define CALL_WindowPos2ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_WindowPos2ivMESA, parameters) -#define GET_WindowPos2ivMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2ivMESA) -#define SET_WindowPos2ivMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2ivMESA, fn) -#define CALL_WindowPos2sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort)), _gloffset_WindowPos2sMESA, parameters) -#define GET_WindowPos2sMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2sMESA) -#define SET_WindowPos2sMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2sMESA, fn) -#define CALL_WindowPos2svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_WindowPos2svMESA, parameters) -#define GET_WindowPos2svMESA(disp) GET_by_offset(disp, _gloffset_WindowPos2svMESA) -#define SET_WindowPos2svMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos2svMESA, fn) -#define CALL_WindowPos3dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble)), _gloffset_WindowPos3dMESA, parameters) -#define GET_WindowPos3dMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3dMESA) -#define SET_WindowPos3dMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3dMESA, fn) -#define CALL_WindowPos3dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_WindowPos3dvMESA, parameters) -#define GET_WindowPos3dvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3dvMESA) -#define SET_WindowPos3dvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3dvMESA, fn) -#define CALL_WindowPos3fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat)), _gloffset_WindowPos3fMESA, parameters) -#define GET_WindowPos3fMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3fMESA) -#define SET_WindowPos3fMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3fMESA, fn) -#define CALL_WindowPos3fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_WindowPos3fvMESA, parameters) -#define GET_WindowPos3fvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3fvMESA) -#define SET_WindowPos3fvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3fvMESA, fn) -#define CALL_WindowPos3iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint)), _gloffset_WindowPos3iMESA, parameters) -#define GET_WindowPos3iMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3iMESA) -#define SET_WindowPos3iMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3iMESA, fn) -#define CALL_WindowPos3ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_WindowPos3ivMESA, parameters) -#define GET_WindowPos3ivMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3ivMESA) -#define SET_WindowPos3ivMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3ivMESA, fn) -#define CALL_WindowPos3sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort)), _gloffset_WindowPos3sMESA, parameters) -#define GET_WindowPos3sMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3sMESA) -#define SET_WindowPos3sMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3sMESA, fn) -#define CALL_WindowPos3svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_WindowPos3svMESA, parameters) -#define GET_WindowPos3svMESA(disp) GET_by_offset(disp, _gloffset_WindowPos3svMESA) -#define SET_WindowPos3svMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos3svMESA, fn) -#define CALL_WindowPos4dMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_WindowPos4dMESA, parameters) -#define GET_WindowPos4dMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4dMESA) -#define SET_WindowPos4dMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4dMESA, fn) -#define CALL_WindowPos4dvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLdouble *)), _gloffset_WindowPos4dvMESA, parameters) -#define GET_WindowPos4dvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4dvMESA) -#define SET_WindowPos4dvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4dvMESA, fn) -#define CALL_WindowPos4fMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_WindowPos4fMESA, parameters) -#define GET_WindowPos4fMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4fMESA) -#define SET_WindowPos4fMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4fMESA, fn) -#define CALL_WindowPos4fvMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLfloat *)), _gloffset_WindowPos4fvMESA, parameters) -#define GET_WindowPos4fvMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4fvMESA) -#define SET_WindowPos4fvMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4fvMESA, fn) -#define CALL_WindowPos4iMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_WindowPos4iMESA, parameters) -#define GET_WindowPos4iMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4iMESA) -#define SET_WindowPos4iMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4iMESA, fn) -#define CALL_WindowPos4ivMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLint *)), _gloffset_WindowPos4ivMESA, parameters) -#define GET_WindowPos4ivMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4ivMESA) -#define SET_WindowPos4ivMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4ivMESA, fn) -#define CALL_WindowPos4sMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLshort, GLshort, GLshort, GLshort)), _gloffset_WindowPos4sMESA, parameters) -#define GET_WindowPos4sMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4sMESA) -#define SET_WindowPos4sMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4sMESA, fn) -#define CALL_WindowPos4svMESA(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLshort *)), _gloffset_WindowPos4svMESA, parameters) -#define GET_WindowPos4svMESA(disp) GET_by_offset(disp, _gloffset_WindowPos4svMESA) -#define SET_WindowPos4svMESA(disp, fn) SET_by_offset(disp, _gloffset_WindowPos4svMESA, fn) -#define CALL_MultiModeDrawArraysIBM(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint)), _gloffset_MultiModeDrawArraysIBM, parameters) -#define GET_MultiModeDrawArraysIBM(disp) GET_by_offset(disp, _gloffset_MultiModeDrawArraysIBM) -#define SET_MultiModeDrawArraysIBM(disp, fn) SET_by_offset(disp, _gloffset_MultiModeDrawArraysIBM, fn) -#define CALL_MultiModeDrawElementsIBM(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(const GLenum *, const GLsizei *, GLenum, const GLvoid * const *, GLsizei, GLint)), _gloffset_MultiModeDrawElementsIBM, parameters) -#define GET_MultiModeDrawElementsIBM(disp) GET_by_offset(disp, _gloffset_MultiModeDrawElementsIBM) -#define SET_MultiModeDrawElementsIBM(disp, fn) SET_by_offset(disp, _gloffset_MultiModeDrawElementsIBM, fn) -#define CALL_DeleteFencesNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteFencesNV, parameters) -#define GET_DeleteFencesNV(disp) GET_by_offset(disp, _gloffset_DeleteFencesNV) -#define SET_DeleteFencesNV(disp, fn) SET_by_offset(disp, _gloffset_DeleteFencesNV, fn) -#define CALL_FinishFenceNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_FinishFenceNV, parameters) -#define GET_FinishFenceNV(disp) GET_by_offset(disp, _gloffset_FinishFenceNV) -#define SET_FinishFenceNV(disp, fn) SET_by_offset(disp, _gloffset_FinishFenceNV, fn) -#define CALL_GenFencesNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenFencesNV, parameters) -#define GET_GenFencesNV(disp) GET_by_offset(disp, _gloffset_GenFencesNV) -#define SET_GenFencesNV(disp, fn) SET_by_offset(disp, _gloffset_GenFencesNV, fn) -#define CALL_GetFenceivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetFenceivNV, parameters) -#define GET_GetFenceivNV(disp) GET_by_offset(disp, _gloffset_GetFenceivNV) -#define SET_GetFenceivNV(disp, fn) SET_by_offset(disp, _gloffset_GetFenceivNV, fn) -#define CALL_IsFenceNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsFenceNV, parameters) -#define GET_IsFenceNV(disp) GET_by_offset(disp, _gloffset_IsFenceNV) -#define SET_IsFenceNV(disp, fn) SET_by_offset(disp, _gloffset_IsFenceNV, fn) -#define CALL_SetFenceNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_SetFenceNV, parameters) -#define GET_SetFenceNV(disp) GET_by_offset(disp, _gloffset_SetFenceNV) -#define SET_SetFenceNV(disp, fn) SET_by_offset(disp, _gloffset_SetFenceNV, fn) -#define CALL_TestFenceNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_TestFenceNV, parameters) -#define GET_TestFenceNV(disp) GET_by_offset(disp, _gloffset_TestFenceNV) -#define SET_TestFenceNV(disp, fn) SET_by_offset(disp, _gloffset_TestFenceNV, fn) -#define CALL_AreProgramsResidentNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLsizei, const GLuint *, GLboolean *)), _gloffset_AreProgramsResidentNV, parameters) -#define GET_AreProgramsResidentNV(disp) GET_by_offset(disp, _gloffset_AreProgramsResidentNV) -#define SET_AreProgramsResidentNV(disp, fn) SET_by_offset(disp, _gloffset_AreProgramsResidentNV, fn) -#define CALL_BindProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindProgramNV, parameters) -#define GET_BindProgramNV(disp) GET_by_offset(disp, _gloffset_BindProgramNV) -#define SET_BindProgramNV(disp, fn) SET_by_offset(disp, _gloffset_BindProgramNV, fn) -#define CALL_DeleteProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteProgramsNV, parameters) -#define GET_DeleteProgramsNV(disp) GET_by_offset(disp, _gloffset_DeleteProgramsNV) -#define SET_DeleteProgramsNV(disp, fn) SET_by_offset(disp, _gloffset_DeleteProgramsNV, fn) -#define CALL_ExecuteProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, const GLfloat *)), _gloffset_ExecuteProgramNV, parameters) -#define GET_ExecuteProgramNV(disp) GET_by_offset(disp, _gloffset_ExecuteProgramNV) -#define SET_ExecuteProgramNV(disp, fn) SET_by_offset(disp, _gloffset_ExecuteProgramNV, fn) -#define CALL_GenProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenProgramsNV, parameters) -#define GET_GenProgramsNV(disp) GET_by_offset(disp, _gloffset_GenProgramsNV) -#define SET_GenProgramsNV(disp, fn) SET_by_offset(disp, _gloffset_GenProgramsNV, fn) -#define CALL_GetProgramParameterdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLdouble *)), _gloffset_GetProgramParameterdvNV, parameters) -#define GET_GetProgramParameterdvNV(disp) GET_by_offset(disp, _gloffset_GetProgramParameterdvNV) -#define SET_GetProgramParameterdvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramParameterdvNV, fn) -#define CALL_GetProgramParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLfloat *)), _gloffset_GetProgramParameterfvNV, parameters) -#define GET_GetProgramParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetProgramParameterfvNV) -#define SET_GetProgramParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramParameterfvNV, fn) -#define CALL_GetProgramStringNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLubyte *)), _gloffset_GetProgramStringNV, parameters) -#define GET_GetProgramStringNV(disp) GET_by_offset(disp, _gloffset_GetProgramStringNV) -#define SET_GetProgramStringNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramStringNV, fn) -#define CALL_GetProgramivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetProgramivNV, parameters) -#define GET_GetProgramivNV(disp) GET_by_offset(disp, _gloffset_GetProgramivNV) -#define SET_GetProgramivNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramivNV, fn) -#define CALL_GetTrackMatrixivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLint *)), _gloffset_GetTrackMatrixivNV, parameters) -#define GET_GetTrackMatrixivNV(disp) GET_by_offset(disp, _gloffset_GetTrackMatrixivNV) -#define SET_GetTrackMatrixivNV(disp, fn) SET_by_offset(disp, _gloffset_GetTrackMatrixivNV, fn) -#define CALL_GetVertexAttribPointervNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLvoid **)), _gloffset_GetVertexAttribPointervNV, parameters) -#define GET_GetVertexAttribPointervNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribPointervNV) -#define SET_GetVertexAttribPointervNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribPointervNV, fn) -#define CALL_GetVertexAttribdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLdouble *)), _gloffset_GetVertexAttribdvNV, parameters) -#define GET_GetVertexAttribdvNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribdvNV) -#define SET_GetVertexAttribdvNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribdvNV, fn) -#define CALL_GetVertexAttribfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLfloat *)), _gloffset_GetVertexAttribfvNV, parameters) -#define GET_GetVertexAttribfvNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribfvNV) -#define SET_GetVertexAttribfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribfvNV, fn) -#define CALL_GetVertexAttribivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetVertexAttribivNV, parameters) -#define GET_GetVertexAttribivNV(disp) GET_by_offset(disp, _gloffset_GetVertexAttribivNV) -#define SET_GetVertexAttribivNV(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribivNV, fn) -#define CALL_IsProgramNV(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsProgramNV, parameters) -#define GET_IsProgramNV(disp) GET_by_offset(disp, _gloffset_IsProgramNV) -#define SET_IsProgramNV(disp, fn) SET_by_offset(disp, _gloffset_IsProgramNV, fn) -#define CALL_LoadProgramNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLubyte *)), _gloffset_LoadProgramNV, parameters) -#define GET_LoadProgramNV(disp) GET_by_offset(disp, _gloffset_LoadProgramNV) -#define SET_LoadProgramNV(disp, fn) SET_by_offset(disp, _gloffset_LoadProgramNV, fn) -#define CALL_ProgramParameters4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLdouble *)), _gloffset_ProgramParameters4dvNV, parameters) -#define GET_ProgramParameters4dvNV(disp) GET_by_offset(disp, _gloffset_ProgramParameters4dvNV) -#define SET_ProgramParameters4dvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramParameters4dvNV, fn) -#define CALL_ProgramParameters4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), _gloffset_ProgramParameters4fvNV, parameters) -#define GET_ProgramParameters4fvNV(disp) GET_by_offset(disp, _gloffset_ProgramParameters4fvNV) -#define SET_ProgramParameters4fvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramParameters4fvNV, fn) -#define CALL_RequestResidentProgramsNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_RequestResidentProgramsNV, parameters) -#define GET_RequestResidentProgramsNV(disp) GET_by_offset(disp, _gloffset_RequestResidentProgramsNV) -#define SET_RequestResidentProgramsNV(disp, fn) SET_by_offset(disp, _gloffset_RequestResidentProgramsNV, fn) -#define CALL_TrackMatrixNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLenum)), _gloffset_TrackMatrixNV, parameters) -#define GET_TrackMatrixNV(disp) GET_by_offset(disp, _gloffset_TrackMatrixNV) -#define SET_TrackMatrixNV(disp, fn) SET_by_offset(disp, _gloffset_TrackMatrixNV, fn) -#define CALL_VertexAttrib1dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble)), _gloffset_VertexAttrib1dNV, parameters) -#define GET_VertexAttrib1dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dNV) -#define SET_VertexAttrib1dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dNV, fn) -#define CALL_VertexAttrib1dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib1dvNV, parameters) -#define GET_VertexAttrib1dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1dvNV) -#define SET_VertexAttrib1dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1dvNV, fn) -#define CALL_VertexAttrib1fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat)), _gloffset_VertexAttrib1fNV, parameters) -#define GET_VertexAttrib1fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fNV) -#define SET_VertexAttrib1fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fNV, fn) -#define CALL_VertexAttrib1fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib1fvNV, parameters) -#define GET_VertexAttrib1fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1fvNV) -#define SET_VertexAttrib1fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1fvNV, fn) -#define CALL_VertexAttrib1sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort)), _gloffset_VertexAttrib1sNV, parameters) -#define GET_VertexAttrib1sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1sNV) -#define SET_VertexAttrib1sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1sNV, fn) -#define CALL_VertexAttrib1svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib1svNV, parameters) -#define GET_VertexAttrib1svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib1svNV) -#define SET_VertexAttrib1svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib1svNV, fn) -#define CALL_VertexAttrib2dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble)), _gloffset_VertexAttrib2dNV, parameters) -#define GET_VertexAttrib2dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dNV) -#define SET_VertexAttrib2dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dNV, fn) -#define CALL_VertexAttrib2dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib2dvNV, parameters) -#define GET_VertexAttrib2dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2dvNV) -#define SET_VertexAttrib2dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2dvNV, fn) -#define CALL_VertexAttrib2fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat)), _gloffset_VertexAttrib2fNV, parameters) -#define GET_VertexAttrib2fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fNV) -#define SET_VertexAttrib2fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fNV, fn) -#define CALL_VertexAttrib2fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib2fvNV, parameters) -#define GET_VertexAttrib2fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2fvNV) -#define SET_VertexAttrib2fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2fvNV, fn) -#define CALL_VertexAttrib2sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort)), _gloffset_VertexAttrib2sNV, parameters) -#define GET_VertexAttrib2sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2sNV) -#define SET_VertexAttrib2sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2sNV, fn) -#define CALL_VertexAttrib2svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib2svNV, parameters) -#define GET_VertexAttrib2svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib2svNV) -#define SET_VertexAttrib2svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib2svNV, fn) -#define CALL_VertexAttrib3dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib3dNV, parameters) -#define GET_VertexAttrib3dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dNV) -#define SET_VertexAttrib3dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dNV, fn) -#define CALL_VertexAttrib3dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib3dvNV, parameters) -#define GET_VertexAttrib3dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3dvNV) -#define SET_VertexAttrib3dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3dvNV, fn) -#define CALL_VertexAttrib3fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib3fNV, parameters) -#define GET_VertexAttrib3fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fNV) -#define SET_VertexAttrib3fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fNV, fn) -#define CALL_VertexAttrib3fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib3fvNV, parameters) -#define GET_VertexAttrib3fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3fvNV) -#define SET_VertexAttrib3fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3fvNV, fn) -#define CALL_VertexAttrib3sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib3sNV, parameters) -#define GET_VertexAttrib3sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3sNV) -#define SET_VertexAttrib3sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3sNV, fn) -#define CALL_VertexAttrib3svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib3svNV, parameters) -#define GET_VertexAttrib3svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib3svNV) -#define SET_VertexAttrib3svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib3svNV, fn) -#define CALL_VertexAttrib4dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_VertexAttrib4dNV, parameters) -#define GET_VertexAttrib4dNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dNV) -#define SET_VertexAttrib4dNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dNV, fn) -#define CALL_VertexAttrib4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLdouble *)), _gloffset_VertexAttrib4dvNV, parameters) -#define GET_VertexAttrib4dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4dvNV) -#define SET_VertexAttrib4dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4dvNV, fn) -#define CALL_VertexAttrib4fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_VertexAttrib4fNV, parameters) -#define GET_VertexAttrib4fNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fNV) -#define SET_VertexAttrib4fNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fNV, fn) -#define CALL_VertexAttrib4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_VertexAttrib4fvNV, parameters) -#define GET_VertexAttrib4fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4fvNV) -#define SET_VertexAttrib4fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4fvNV, fn) -#define CALL_VertexAttrib4sNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLshort, GLshort, GLshort, GLshort)), _gloffset_VertexAttrib4sNV, parameters) -#define GET_VertexAttrib4sNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4sNV) -#define SET_VertexAttrib4sNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4sNV, fn) -#define CALL_VertexAttrib4svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttrib4svNV, parameters) -#define GET_VertexAttrib4svNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4svNV) -#define SET_VertexAttrib4svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4svNV, fn) -#define CALL_VertexAttrib4ubNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte)), _gloffset_VertexAttrib4ubNV, parameters) -#define GET_VertexAttrib4ubNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ubNV) -#define SET_VertexAttrib4ubNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ubNV, fn) -#define CALL_VertexAttrib4ubvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttrib4ubvNV, parameters) -#define GET_VertexAttrib4ubvNV(disp) GET_by_offset(disp, _gloffset_VertexAttrib4ubvNV) -#define SET_VertexAttrib4ubvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttrib4ubvNV, fn) -#define CALL_VertexAttribPointerNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_VertexAttribPointerNV, parameters) -#define GET_VertexAttribPointerNV(disp) GET_by_offset(disp, _gloffset_VertexAttribPointerNV) -#define SET_VertexAttribPointerNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribPointerNV, fn) -#define CALL_VertexAttribs1dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs1dvNV, parameters) -#define GET_VertexAttribs1dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs1dvNV) -#define SET_VertexAttribs1dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs1dvNV, fn) -#define CALL_VertexAttribs1fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs1fvNV, parameters) -#define GET_VertexAttribs1fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs1fvNV) -#define SET_VertexAttribs1fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs1fvNV, fn) -#define CALL_VertexAttribs1svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs1svNV, parameters) -#define GET_VertexAttribs1svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs1svNV) -#define SET_VertexAttribs1svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs1svNV, fn) -#define CALL_VertexAttribs2dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs2dvNV, parameters) -#define GET_VertexAttribs2dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs2dvNV) -#define SET_VertexAttribs2dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs2dvNV, fn) -#define CALL_VertexAttribs2fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs2fvNV, parameters) -#define GET_VertexAttribs2fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs2fvNV) -#define SET_VertexAttribs2fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs2fvNV, fn) -#define CALL_VertexAttribs2svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs2svNV, parameters) -#define GET_VertexAttribs2svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs2svNV) -#define SET_VertexAttribs2svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs2svNV, fn) -#define CALL_VertexAttribs3dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs3dvNV, parameters) -#define GET_VertexAttribs3dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs3dvNV) -#define SET_VertexAttribs3dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs3dvNV, fn) -#define CALL_VertexAttribs3fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs3fvNV, parameters) -#define GET_VertexAttribs3fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs3fvNV) -#define SET_VertexAttribs3fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs3fvNV, fn) -#define CALL_VertexAttribs3svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs3svNV, parameters) -#define GET_VertexAttribs3svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs3svNV) -#define SET_VertexAttribs3svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs3svNV, fn) -#define CALL_VertexAttribs4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLdouble *)), _gloffset_VertexAttribs4dvNV, parameters) -#define GET_VertexAttribs4dvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4dvNV) -#define SET_VertexAttribs4dvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4dvNV, fn) -#define CALL_VertexAttribs4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLfloat *)), _gloffset_VertexAttribs4fvNV, parameters) -#define GET_VertexAttribs4fvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4fvNV) -#define SET_VertexAttribs4fvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4fvNV, fn) -#define CALL_VertexAttribs4svNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLshort *)), _gloffset_VertexAttribs4svNV, parameters) -#define GET_VertexAttribs4svNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4svNV) -#define SET_VertexAttribs4svNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4svNV, fn) -#define CALL_VertexAttribs4ubvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *)), _gloffset_VertexAttribs4ubvNV, parameters) -#define GET_VertexAttribs4ubvNV(disp) GET_by_offset(disp, _gloffset_VertexAttribs4ubvNV) -#define SET_VertexAttribs4ubvNV(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribs4ubvNV, fn) -#define CALL_GetTexBumpParameterfvATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLfloat *)), _gloffset_GetTexBumpParameterfvATI, parameters) -#define GET_GetTexBumpParameterfvATI(disp) GET_by_offset(disp, _gloffset_GetTexBumpParameterfvATI) -#define SET_GetTexBumpParameterfvATI(disp, fn) SET_by_offset(disp, _gloffset_GetTexBumpParameterfvATI, fn) -#define CALL_GetTexBumpParameterivATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint *)), _gloffset_GetTexBumpParameterivATI, parameters) -#define GET_GetTexBumpParameterivATI(disp) GET_by_offset(disp, _gloffset_GetTexBumpParameterivATI) -#define SET_GetTexBumpParameterivATI(disp, fn) SET_by_offset(disp, _gloffset_GetTexBumpParameterivATI, fn) -#define CALL_TexBumpParameterfvATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLfloat *)), _gloffset_TexBumpParameterfvATI, parameters) -#define GET_TexBumpParameterfvATI(disp) GET_by_offset(disp, _gloffset_TexBumpParameterfvATI) -#define SET_TexBumpParameterfvATI(disp, fn) SET_by_offset(disp, _gloffset_TexBumpParameterfvATI, fn) -#define CALL_TexBumpParameterivATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_TexBumpParameterivATI, parameters) -#define GET_TexBumpParameterivATI(disp) GET_by_offset(disp, _gloffset_TexBumpParameterivATI) -#define SET_TexBumpParameterivATI(disp, fn) SET_by_offset(disp, _gloffset_TexBumpParameterivATI, fn) -#define CALL_AlphaFragmentOp1ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_AlphaFragmentOp1ATI, parameters) -#define GET_AlphaFragmentOp1ATI(disp) GET_by_offset(disp, _gloffset_AlphaFragmentOp1ATI) -#define SET_AlphaFragmentOp1ATI(disp, fn) SET_by_offset(disp, _gloffset_AlphaFragmentOp1ATI, fn) -#define CALL_AlphaFragmentOp2ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_AlphaFragmentOp2ATI, parameters) -#define GET_AlphaFragmentOp2ATI(disp) GET_by_offset(disp, _gloffset_AlphaFragmentOp2ATI) -#define SET_AlphaFragmentOp2ATI(disp, fn) SET_by_offset(disp, _gloffset_AlphaFragmentOp2ATI, fn) -#define CALL_AlphaFragmentOp3ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_AlphaFragmentOp3ATI, parameters) -#define GET_AlphaFragmentOp3ATI(disp) GET_by_offset(disp, _gloffset_AlphaFragmentOp3ATI) -#define SET_AlphaFragmentOp3ATI(disp, fn) SET_by_offset(disp, _gloffset_AlphaFragmentOp3ATI, fn) -#define CALL_BeginFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_BeginFragmentShaderATI, parameters) -#define GET_BeginFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_BeginFragmentShaderATI) -#define SET_BeginFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_BeginFragmentShaderATI, fn) -#define CALL_BindFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_BindFragmentShaderATI, parameters) -#define GET_BindFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_BindFragmentShaderATI) -#define SET_BindFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_BindFragmentShaderATI, fn) -#define CALL_ColorFragmentOp1ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_ColorFragmentOp1ATI, parameters) -#define GET_ColorFragmentOp1ATI(disp) GET_by_offset(disp, _gloffset_ColorFragmentOp1ATI) -#define SET_ColorFragmentOp1ATI(disp, fn) SET_by_offset(disp, _gloffset_ColorFragmentOp1ATI, fn) -#define CALL_ColorFragmentOp2ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_ColorFragmentOp2ATI, parameters) -#define GET_ColorFragmentOp2ATI(disp) GET_by_offset(disp, _gloffset_ColorFragmentOp2ATI) -#define SET_ColorFragmentOp2ATI(disp, fn) SET_by_offset(disp, _gloffset_ColorFragmentOp2ATI, fn) -#define CALL_ColorFragmentOp3ATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_ColorFragmentOp3ATI, parameters) -#define GET_ColorFragmentOp3ATI(disp) GET_by_offset(disp, _gloffset_ColorFragmentOp3ATI) -#define SET_ColorFragmentOp3ATI(disp, fn) SET_by_offset(disp, _gloffset_ColorFragmentOp3ATI, fn) -#define CALL_DeleteFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_DeleteFragmentShaderATI, parameters) -#define GET_DeleteFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_DeleteFragmentShaderATI) -#define SET_DeleteFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_DeleteFragmentShaderATI, fn) -#define CALL_EndFragmentShaderATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndFragmentShaderATI, parameters) -#define GET_EndFragmentShaderATI(disp) GET_by_offset(disp, _gloffset_EndFragmentShaderATI) -#define SET_EndFragmentShaderATI(disp, fn) SET_by_offset(disp, _gloffset_EndFragmentShaderATI, fn) -#define CALL_GenFragmentShadersATI(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLuint)), _gloffset_GenFragmentShadersATI, parameters) -#define GET_GenFragmentShadersATI(disp) GET_by_offset(disp, _gloffset_GenFragmentShadersATI) -#define SET_GenFragmentShadersATI(disp, fn) SET_by_offset(disp, _gloffset_GenFragmentShadersATI, fn) -#define CALL_PassTexCoordATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLenum)), _gloffset_PassTexCoordATI, parameters) -#define GET_PassTexCoordATI(disp) GET_by_offset(disp, _gloffset_PassTexCoordATI) -#define SET_PassTexCoordATI(disp, fn) SET_by_offset(disp, _gloffset_PassTexCoordATI, fn) -#define CALL_SampleMapATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLenum)), _gloffset_SampleMapATI, parameters) -#define GET_SampleMapATI(disp) GET_by_offset(disp, _gloffset_SampleMapATI) -#define SET_SampleMapATI(disp, fn) SET_by_offset(disp, _gloffset_SampleMapATI, fn) -#define CALL_SetFragmentShaderConstantATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLfloat *)), _gloffset_SetFragmentShaderConstantATI, parameters) -#define GET_SetFragmentShaderConstantATI(disp) GET_by_offset(disp, _gloffset_SetFragmentShaderConstantATI) -#define SET_SetFragmentShaderConstantATI(disp, fn) SET_by_offset(disp, _gloffset_SetFragmentShaderConstantATI, fn) -#define CALL_PointParameteriNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLint)), _gloffset_PointParameteriNV, parameters) -#define GET_PointParameteriNV(disp) GET_by_offset(disp, _gloffset_PointParameteriNV) -#define SET_PointParameteriNV(disp, fn) SET_by_offset(disp, _gloffset_PointParameteriNV, fn) -#define CALL_PointParameterivNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, const GLint *)), _gloffset_PointParameterivNV, parameters) -#define GET_PointParameterivNV(disp) GET_by_offset(disp, _gloffset_PointParameterivNV) -#define SET_PointParameterivNV(disp, fn) SET_by_offset(disp, _gloffset_PointParameterivNV, fn) -#define CALL_ActiveStencilFaceEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ActiveStencilFaceEXT, parameters) -#define GET_ActiveStencilFaceEXT(disp) GET_by_offset(disp, _gloffset_ActiveStencilFaceEXT) -#define SET_ActiveStencilFaceEXT(disp, fn) SET_by_offset(disp, _gloffset_ActiveStencilFaceEXT, fn) -#define CALL_BindVertexArrayAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_BindVertexArrayAPPLE, parameters) -#define GET_BindVertexArrayAPPLE(disp) GET_by_offset(disp, _gloffset_BindVertexArrayAPPLE) -#define SET_BindVertexArrayAPPLE(disp, fn) SET_by_offset(disp, _gloffset_BindVertexArrayAPPLE, fn) -#define CALL_DeleteVertexArraysAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteVertexArraysAPPLE, parameters) -#define GET_DeleteVertexArraysAPPLE(disp) GET_by_offset(disp, _gloffset_DeleteVertexArraysAPPLE) -#define SET_DeleteVertexArraysAPPLE(disp, fn) SET_by_offset(disp, _gloffset_DeleteVertexArraysAPPLE, fn) -#define CALL_GenVertexArraysAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenVertexArraysAPPLE, parameters) -#define GET_GenVertexArraysAPPLE(disp) GET_by_offset(disp, _gloffset_GenVertexArraysAPPLE) -#define SET_GenVertexArraysAPPLE(disp, fn) SET_by_offset(disp, _gloffset_GenVertexArraysAPPLE, fn) -#define CALL_IsVertexArrayAPPLE(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsVertexArrayAPPLE, parameters) -#define GET_IsVertexArrayAPPLE(disp) GET_by_offset(disp, _gloffset_IsVertexArrayAPPLE) -#define SET_IsVertexArrayAPPLE(disp, fn) SET_by_offset(disp, _gloffset_IsVertexArrayAPPLE, fn) -#define CALL_GetProgramNamedParameterdvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLdouble *)), _gloffset_GetProgramNamedParameterdvNV, parameters) -#define GET_GetProgramNamedParameterdvNV(disp) GET_by_offset(disp, _gloffset_GetProgramNamedParameterdvNV) -#define SET_GetProgramNamedParameterdvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramNamedParameterdvNV, fn) -#define CALL_GetProgramNamedParameterfvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLfloat *)), _gloffset_GetProgramNamedParameterfvNV, parameters) -#define GET_GetProgramNamedParameterfvNV(disp) GET_by_offset(disp, _gloffset_GetProgramNamedParameterfvNV) -#define SET_GetProgramNamedParameterfvNV(disp, fn) SET_by_offset(disp, _gloffset_GetProgramNamedParameterfvNV, fn) -#define CALL_ProgramNamedParameter4dNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble)), _gloffset_ProgramNamedParameter4dNV, parameters) -#define GET_ProgramNamedParameter4dNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4dNV) -#define SET_ProgramNamedParameter4dNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4dNV, fn) -#define CALL_ProgramNamedParameter4dvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, const GLdouble *)), _gloffset_ProgramNamedParameter4dvNV, parameters) -#define GET_ProgramNamedParameter4dvNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4dvNV) -#define SET_ProgramNamedParameter4dvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4dvNV, fn) -#define CALL_ProgramNamedParameter4fNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat)), _gloffset_ProgramNamedParameter4fNV, parameters) -#define GET_ProgramNamedParameter4fNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4fNV) -#define SET_ProgramNamedParameter4fNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4fNV, fn) -#define CALL_ProgramNamedParameter4fvNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const GLubyte *, const GLfloat *)), _gloffset_ProgramNamedParameter4fvNV, parameters) -#define GET_ProgramNamedParameter4fvNV(disp) GET_by_offset(disp, _gloffset_ProgramNamedParameter4fvNV) -#define SET_ProgramNamedParameter4fvNV(disp, fn) SET_by_offset(disp, _gloffset_ProgramNamedParameter4fvNV, fn) -#define CALL_PrimitiveRestartIndexNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_PrimitiveRestartIndexNV, parameters) -#define GET_PrimitiveRestartIndexNV(disp) GET_by_offset(disp, _gloffset_PrimitiveRestartIndexNV) -#define SET_PrimitiveRestartIndexNV(disp, fn) SET_by_offset(disp, _gloffset_PrimitiveRestartIndexNV, fn) -#define CALL_PrimitiveRestartNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_PrimitiveRestartNV, parameters) -#define GET_PrimitiveRestartNV(disp) GET_by_offset(disp, _gloffset_PrimitiveRestartNV) -#define SET_PrimitiveRestartNV(disp, fn) SET_by_offset(disp, _gloffset_PrimitiveRestartNV, fn) -#define CALL_DepthBoundsEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLclampd, GLclampd)), _gloffset_DepthBoundsEXT, parameters) -#define GET_DepthBoundsEXT(disp) GET_by_offset(disp, _gloffset_DepthBoundsEXT) -#define SET_DepthBoundsEXT(disp, fn) SET_by_offset(disp, _gloffset_DepthBoundsEXT, fn) -#define CALL_BlendEquationSeparateEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum)), _gloffset_BlendEquationSeparateEXT, parameters) -#define GET_BlendEquationSeparateEXT(disp) GET_by_offset(disp, _gloffset_BlendEquationSeparateEXT) -#define SET_BlendEquationSeparateEXT(disp, fn) SET_by_offset(disp, _gloffset_BlendEquationSeparateEXT, fn) -#define CALL_BindFramebufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindFramebufferEXT, parameters) -#define GET_BindFramebufferEXT(disp) GET_by_offset(disp, _gloffset_BindFramebufferEXT) -#define SET_BindFramebufferEXT(disp, fn) SET_by_offset(disp, _gloffset_BindFramebufferEXT, fn) -#define CALL_BindRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_BindRenderbufferEXT, parameters) -#define GET_BindRenderbufferEXT(disp) GET_by_offset(disp, _gloffset_BindRenderbufferEXT) -#define SET_BindRenderbufferEXT(disp, fn) SET_by_offset(disp, _gloffset_BindRenderbufferEXT, fn) -#define CALL_CheckFramebufferStatusEXT(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum)), _gloffset_CheckFramebufferStatusEXT, parameters) -#define GET_CheckFramebufferStatusEXT(disp) GET_by_offset(disp, _gloffset_CheckFramebufferStatusEXT) -#define SET_CheckFramebufferStatusEXT(disp, fn) SET_by_offset(disp, _gloffset_CheckFramebufferStatusEXT, fn) -#define CALL_DeleteFramebuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteFramebuffersEXT, parameters) -#define GET_DeleteFramebuffersEXT(disp) GET_by_offset(disp, _gloffset_DeleteFramebuffersEXT) -#define SET_DeleteFramebuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_DeleteFramebuffersEXT, fn) -#define CALL_DeleteRenderbuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, const GLuint *)), _gloffset_DeleteRenderbuffersEXT, parameters) -#define GET_DeleteRenderbuffersEXT(disp) GET_by_offset(disp, _gloffset_DeleteRenderbuffersEXT) -#define SET_DeleteRenderbuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_DeleteRenderbuffersEXT, fn) -#define CALL_FramebufferRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint)), _gloffset_FramebufferRenderbufferEXT, parameters) -#define GET_FramebufferRenderbufferEXT(disp) GET_by_offset(disp, _gloffset_FramebufferRenderbufferEXT) -#define SET_FramebufferRenderbufferEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferRenderbufferEXT, fn) -#define CALL_FramebufferTexture1DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTexture1DEXT, parameters) -#define GET_FramebufferTexture1DEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTexture1DEXT) -#define SET_FramebufferTexture1DEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture1DEXT, fn) -#define CALL_FramebufferTexture2DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint)), _gloffset_FramebufferTexture2DEXT, parameters) -#define GET_FramebufferTexture2DEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTexture2DEXT) -#define SET_FramebufferTexture2DEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture2DEXT, fn) -#define CALL_FramebufferTexture3DEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLuint, GLint, GLint)), _gloffset_FramebufferTexture3DEXT, parameters) -#define GET_FramebufferTexture3DEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTexture3DEXT) -#define SET_FramebufferTexture3DEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTexture3DEXT, fn) -#define CALL_GenFramebuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenFramebuffersEXT, parameters) -#define GET_GenFramebuffersEXT(disp) GET_by_offset(disp, _gloffset_GenFramebuffersEXT) -#define SET_GenFramebuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_GenFramebuffersEXT, fn) -#define CALL_GenRenderbuffersEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLsizei, GLuint *)), _gloffset_GenRenderbuffersEXT, parameters) -#define GET_GenRenderbuffersEXT(disp) GET_by_offset(disp, _gloffset_GenRenderbuffersEXT) -#define SET_GenRenderbuffersEXT(disp, fn) SET_by_offset(disp, _gloffset_GenRenderbuffersEXT, fn) -#define CALL_GenerateMipmapEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_GenerateMipmapEXT, parameters) -#define GET_GenerateMipmapEXT(disp) GET_by_offset(disp, _gloffset_GenerateMipmapEXT) -#define SET_GenerateMipmapEXT(disp, fn) SET_by_offset(disp, _gloffset_GenerateMipmapEXT, fn) -#define CALL_GetFramebufferAttachmentParameterivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLenum, GLint *)), _gloffset_GetFramebufferAttachmentParameterivEXT, parameters) -#define GET_GetFramebufferAttachmentParameterivEXT(disp) GET_by_offset(disp, _gloffset_GetFramebufferAttachmentParameterivEXT) -#define SET_GetFramebufferAttachmentParameterivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetFramebufferAttachmentParameterivEXT, fn) -#define CALL_GetRenderbufferParameterivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetRenderbufferParameterivEXT, parameters) -#define GET_GetRenderbufferParameterivEXT(disp) GET_by_offset(disp, _gloffset_GetRenderbufferParameterivEXT) -#define SET_GetRenderbufferParameterivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetRenderbufferParameterivEXT, fn) -#define CALL_IsFramebufferEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsFramebufferEXT, parameters) -#define GET_IsFramebufferEXT(disp) GET_by_offset(disp, _gloffset_IsFramebufferEXT) -#define SET_IsFramebufferEXT(disp, fn) SET_by_offset(disp, _gloffset_IsFramebufferEXT, fn) -#define CALL_IsRenderbufferEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLuint)), _gloffset_IsRenderbufferEXT, parameters) -#define GET_IsRenderbufferEXT(disp) GET_by_offset(disp, _gloffset_IsRenderbufferEXT) -#define SET_IsRenderbufferEXT(disp, fn) SET_by_offset(disp, _gloffset_IsRenderbufferEXT, fn) -#define CALL_RenderbufferStorageEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLsizei, GLsizei)), _gloffset_RenderbufferStorageEXT, parameters) -#define GET_RenderbufferStorageEXT(disp) GET_by_offset(disp, _gloffset_RenderbufferStorageEXT) -#define SET_RenderbufferStorageEXT(disp, fn) SET_by_offset(disp, _gloffset_RenderbufferStorageEXT, fn) -#define CALL_BlitFramebufferEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum)), _gloffset_BlitFramebufferEXT, parameters) -#define GET_BlitFramebufferEXT(disp) GET_by_offset(disp, _gloffset_BlitFramebufferEXT) -#define SET_BlitFramebufferEXT(disp, fn) SET_by_offset(disp, _gloffset_BlitFramebufferEXT, fn) -#define CALL_BufferParameteriAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint)), _gloffset_BufferParameteriAPPLE, parameters) -#define GET_BufferParameteriAPPLE(disp) GET_by_offset(disp, _gloffset_BufferParameteriAPPLE) -#define SET_BufferParameteriAPPLE(disp, fn) SET_by_offset(disp, _gloffset_BufferParameteriAPPLE, fn) -#define CALL_FlushMappedBufferRangeAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLintptr, GLsizeiptr)), _gloffset_FlushMappedBufferRangeAPPLE, parameters) -#define GET_FlushMappedBufferRangeAPPLE(disp) GET_by_offset(disp, _gloffset_FlushMappedBufferRangeAPPLE) -#define SET_FlushMappedBufferRangeAPPLE(disp, fn) SET_by_offset(disp, _gloffset_FlushMappedBufferRangeAPPLE, fn) -#define CALL_BindFragDataLocationEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, const GLchar *)), _gloffset_BindFragDataLocationEXT, parameters) -#define GET_BindFragDataLocationEXT(disp) GET_by_offset(disp, _gloffset_BindFragDataLocationEXT) -#define SET_BindFragDataLocationEXT(disp, fn) SET_by_offset(disp, _gloffset_BindFragDataLocationEXT, fn) -#define CALL_GetFragDataLocationEXT(disp, parameters) CALL_by_offset(disp, (GLint (GLAPIENTRYP)(GLuint, const GLchar *)), _gloffset_GetFragDataLocationEXT, parameters) -#define GET_GetFragDataLocationEXT(disp) GET_by_offset(disp, _gloffset_GetFragDataLocationEXT) -#define SET_GetFragDataLocationEXT(disp, fn) SET_by_offset(disp, _gloffset_GetFragDataLocationEXT, fn) -#define CALL_GetUniformuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLuint *)), _gloffset_GetUniformuivEXT, parameters) -#define GET_GetUniformuivEXT(disp) GET_by_offset(disp, _gloffset_GetUniformuivEXT) -#define SET_GetUniformuivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetUniformuivEXT, fn) -#define CALL_GetVertexAttribIivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint *)), _gloffset_GetVertexAttribIivEXT, parameters) -#define GET_GetVertexAttribIivEXT(disp) GET_by_offset(disp, _gloffset_GetVertexAttribIivEXT) -#define SET_GetVertexAttribIivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribIivEXT, fn) -#define CALL_GetVertexAttribIuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint *)), _gloffset_GetVertexAttribIuivEXT, parameters) -#define GET_GetVertexAttribIuivEXT(disp) GET_by_offset(disp, _gloffset_GetVertexAttribIuivEXT) -#define SET_GetVertexAttribIuivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetVertexAttribIuivEXT, fn) -#define CALL_Uniform1uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint)), _gloffset_Uniform1uiEXT, parameters) -#define GET_Uniform1uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform1uiEXT) -#define SET_Uniform1uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform1uiEXT, fn) -#define CALL_Uniform1uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform1uivEXT, parameters) -#define GET_Uniform1uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform1uivEXT) -#define SET_Uniform1uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform1uivEXT, fn) -#define CALL_Uniform2uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint, GLuint)), _gloffset_Uniform2uiEXT, parameters) -#define GET_Uniform2uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform2uiEXT) -#define SET_Uniform2uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform2uiEXT, fn) -#define CALL_Uniform2uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform2uivEXT, parameters) -#define GET_Uniform2uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform2uivEXT) -#define SET_Uniform2uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform2uivEXT, fn) -#define CALL_Uniform3uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint, GLuint, GLuint)), _gloffset_Uniform3uiEXT, parameters) -#define GET_Uniform3uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform3uiEXT) -#define SET_Uniform3uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform3uiEXT, fn) -#define CALL_Uniform3uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform3uivEXT, parameters) -#define GET_Uniform3uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform3uivEXT) -#define SET_Uniform3uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform3uivEXT, fn) -#define CALL_Uniform4uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLuint, GLuint, GLuint, GLuint)), _gloffset_Uniform4uiEXT, parameters) -#define GET_Uniform4uiEXT(disp) GET_by_offset(disp, _gloffset_Uniform4uiEXT) -#define SET_Uniform4uiEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform4uiEXT, fn) -#define CALL_Uniform4uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLsizei, const GLuint *)), _gloffset_Uniform4uivEXT, parameters) -#define GET_Uniform4uivEXT(disp) GET_by_offset(disp, _gloffset_Uniform4uivEXT) -#define SET_Uniform4uivEXT(disp, fn) SET_by_offset(disp, _gloffset_Uniform4uivEXT, fn) -#define CALL_VertexAttribI1iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint)), _gloffset_VertexAttribI1iEXT, parameters) -#define GET_VertexAttribI1iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1iEXT) -#define SET_VertexAttribI1iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1iEXT, fn) -#define CALL_VertexAttribI1ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI1ivEXT, parameters) -#define GET_VertexAttribI1ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1ivEXT) -#define SET_VertexAttribI1ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1ivEXT, fn) -#define CALL_VertexAttribI1uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint)), _gloffset_VertexAttribI1uiEXT, parameters) -#define GET_VertexAttribI1uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1uiEXT) -#define SET_VertexAttribI1uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1uiEXT, fn) -#define CALL_VertexAttribI1uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI1uivEXT, parameters) -#define GET_VertexAttribI1uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI1uivEXT) -#define SET_VertexAttribI1uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI1uivEXT, fn) -#define CALL_VertexAttribI2iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLint)), _gloffset_VertexAttribI2iEXT, parameters) -#define GET_VertexAttribI2iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2iEXT) -#define SET_VertexAttribI2iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2iEXT, fn) -#define CALL_VertexAttribI2ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI2ivEXT, parameters) -#define GET_VertexAttribI2ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2ivEXT) -#define SET_VertexAttribI2ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2ivEXT, fn) -#define CALL_VertexAttribI2uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint)), _gloffset_VertexAttribI2uiEXT, parameters) -#define GET_VertexAttribI2uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2uiEXT) -#define SET_VertexAttribI2uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2uiEXT, fn) -#define CALL_VertexAttribI2uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI2uivEXT, parameters) -#define GET_VertexAttribI2uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI2uivEXT) -#define SET_VertexAttribI2uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI2uivEXT, fn) -#define CALL_VertexAttribI3iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLint, GLint)), _gloffset_VertexAttribI3iEXT, parameters) -#define GET_VertexAttribI3iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3iEXT) -#define SET_VertexAttribI3iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3iEXT, fn) -#define CALL_VertexAttribI3ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI3ivEXT, parameters) -#define GET_VertexAttribI3ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3ivEXT) -#define SET_VertexAttribI3ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3ivEXT, fn) -#define CALL_VertexAttribI3uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint)), _gloffset_VertexAttribI3uiEXT, parameters) -#define GET_VertexAttribI3uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3uiEXT) -#define SET_VertexAttribI3uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3uiEXT, fn) -#define CALL_VertexAttribI3uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI3uivEXT, parameters) -#define GET_VertexAttribI3uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI3uivEXT) -#define SET_VertexAttribI3uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI3uivEXT, fn) -#define CALL_VertexAttribI4bvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLbyte *)), _gloffset_VertexAttribI4bvEXT, parameters) -#define GET_VertexAttribI4bvEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4bvEXT) -#define SET_VertexAttribI4bvEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4bvEXT, fn) -#define CALL_VertexAttribI4iEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLint, GLint, GLint)), _gloffset_VertexAttribI4iEXT, parameters) -#define GET_VertexAttribI4iEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4iEXT) -#define SET_VertexAttribI4iEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4iEXT, fn) -#define CALL_VertexAttribI4ivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLint *)), _gloffset_VertexAttribI4ivEXT, parameters) -#define GET_VertexAttribI4ivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4ivEXT) -#define SET_VertexAttribI4ivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4ivEXT, fn) -#define CALL_VertexAttribI4svEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLshort *)), _gloffset_VertexAttribI4svEXT, parameters) -#define GET_VertexAttribI4svEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4svEXT) -#define SET_VertexAttribI4svEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4svEXT, fn) -#define CALL_VertexAttribI4ubvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLubyte *)), _gloffset_VertexAttribI4ubvEXT, parameters) -#define GET_VertexAttribI4ubvEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4ubvEXT) -#define SET_VertexAttribI4ubvEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4ubvEXT, fn) -#define CALL_VertexAttribI4uiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint, GLuint)), _gloffset_VertexAttribI4uiEXT, parameters) -#define GET_VertexAttribI4uiEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4uiEXT) -#define SET_VertexAttribI4uiEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4uiEXT, fn) -#define CALL_VertexAttribI4uivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLuint *)), _gloffset_VertexAttribI4uivEXT, parameters) -#define GET_VertexAttribI4uivEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4uivEXT) -#define SET_VertexAttribI4uivEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4uivEXT, fn) -#define CALL_VertexAttribI4usvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, const GLushort *)), _gloffset_VertexAttribI4usvEXT, parameters) -#define GET_VertexAttribI4usvEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribI4usvEXT) -#define SET_VertexAttribI4usvEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribI4usvEXT, fn) -#define CALL_VertexAttribIPointerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLint, GLenum, GLsizei, const GLvoid *)), _gloffset_VertexAttribIPointerEXT, parameters) -#define GET_VertexAttribIPointerEXT(disp) GET_by_offset(disp, _gloffset_VertexAttribIPointerEXT) -#define SET_VertexAttribIPointerEXT(disp, fn) SET_by_offset(disp, _gloffset_VertexAttribIPointerEXT, fn) -#define CALL_FramebufferTextureLayerEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint, GLint, GLint)), _gloffset_FramebufferTextureLayerEXT, parameters) -#define GET_FramebufferTextureLayerEXT(disp) GET_by_offset(disp, _gloffset_FramebufferTextureLayerEXT) -#define SET_FramebufferTextureLayerEXT(disp, fn) SET_by_offset(disp, _gloffset_FramebufferTextureLayerEXT, fn) -#define CALL_ColorMaskIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLboolean, GLboolean, GLboolean, GLboolean)), _gloffset_ColorMaskIndexedEXT, parameters) -#define GET_ColorMaskIndexedEXT(disp) GET_by_offset(disp, _gloffset_ColorMaskIndexedEXT) -#define SET_ColorMaskIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_ColorMaskIndexedEXT, fn) -#define CALL_DisableIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_DisableIndexedEXT, parameters) -#define GET_DisableIndexedEXT(disp) GET_by_offset(disp, _gloffset_DisableIndexedEXT) -#define SET_DisableIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_DisableIndexedEXT, fn) -#define CALL_EnableIndexedEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_EnableIndexedEXT, parameters) -#define GET_EnableIndexedEXT(disp) GET_by_offset(disp, _gloffset_EnableIndexedEXT) -#define SET_EnableIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_EnableIndexedEXT, fn) -#define CALL_GetBooleanIndexedvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLboolean *)), _gloffset_GetBooleanIndexedvEXT, parameters) -#define GET_GetBooleanIndexedvEXT(disp) GET_by_offset(disp, _gloffset_GetBooleanIndexedvEXT) -#define SET_GetBooleanIndexedvEXT(disp, fn) SET_by_offset(disp, _gloffset_GetBooleanIndexedvEXT, fn) -#define CALL_GetIntegerIndexedvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLint *)), _gloffset_GetIntegerIndexedvEXT, parameters) -#define GET_GetIntegerIndexedvEXT(disp) GET_by_offset(disp, _gloffset_GetIntegerIndexedvEXT) -#define SET_GetIntegerIndexedvEXT(disp, fn) SET_by_offset(disp, _gloffset_GetIntegerIndexedvEXT, fn) -#define CALL_IsEnabledIndexedEXT(disp, parameters) CALL_by_offset(disp, (GLboolean (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_IsEnabledIndexedEXT, parameters) -#define GET_IsEnabledIndexedEXT(disp) GET_by_offset(disp, _gloffset_IsEnabledIndexedEXT) -#define SET_IsEnabledIndexedEXT(disp, fn) SET_by_offset(disp, _gloffset_IsEnabledIndexedEXT, fn) -#define CALL_ClearColorIiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLint, GLint, GLint, GLint)), _gloffset_ClearColorIiEXT, parameters) -#define GET_ClearColorIiEXT(disp) GET_by_offset(disp, _gloffset_ClearColorIiEXT) -#define SET_ClearColorIiEXT(disp, fn) SET_by_offset(disp, _gloffset_ClearColorIiEXT, fn) -#define CALL_ClearColorIuiEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLuint, GLuint)), _gloffset_ClearColorIuiEXT, parameters) -#define GET_ClearColorIuiEXT(disp) GET_by_offset(disp, _gloffset_ClearColorIuiEXT) -#define SET_ClearColorIuiEXT(disp, fn) SET_by_offset(disp, _gloffset_ClearColorIuiEXT, fn) -#define CALL_GetTexParameterIivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint *)), _gloffset_GetTexParameterIivEXT, parameters) -#define GET_GetTexParameterIivEXT(disp) GET_by_offset(disp, _gloffset_GetTexParameterIivEXT) -#define SET_GetTexParameterIivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterIivEXT, fn) -#define CALL_GetTexParameterIuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLuint *)), _gloffset_GetTexParameterIuivEXT, parameters) -#define GET_GetTexParameterIuivEXT(disp) GET_by_offset(disp, _gloffset_GetTexParameterIuivEXT) -#define SET_GetTexParameterIuivEXT(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterIuivEXT, fn) -#define CALL_TexParameterIivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLint *)), _gloffset_TexParameterIivEXT, parameters) -#define GET_TexParameterIivEXT(disp) GET_by_offset(disp, _gloffset_TexParameterIivEXT) -#define SET_TexParameterIivEXT(disp, fn) SET_by_offset(disp, _gloffset_TexParameterIivEXT, fn) -#define CALL_TexParameterIuivEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, const GLuint *)), _gloffset_TexParameterIuivEXT, parameters) -#define GET_TexParameterIuivEXT(disp) GET_by_offset(disp, _gloffset_TexParameterIuivEXT) -#define SET_TexParameterIuivEXT(disp, fn) SET_by_offset(disp, _gloffset_TexParameterIuivEXT, fn) -#define CALL_BeginConditionalRenderNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum)), _gloffset_BeginConditionalRenderNV, parameters) -#define GET_BeginConditionalRenderNV(disp) GET_by_offset(disp, _gloffset_BeginConditionalRenderNV) -#define SET_BeginConditionalRenderNV(disp, fn) SET_by_offset(disp, _gloffset_BeginConditionalRenderNV, fn) -#define CALL_EndConditionalRenderNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndConditionalRenderNV, parameters) -#define GET_EndConditionalRenderNV(disp) GET_by_offset(disp, _gloffset_EndConditionalRenderNV) -#define SET_EndConditionalRenderNV(disp, fn) SET_by_offset(disp, _gloffset_EndConditionalRenderNV, fn) -#define CALL_BeginTransformFeedbackEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_BeginTransformFeedbackEXT, parameters) -#define GET_BeginTransformFeedbackEXT(disp) GET_by_offset(disp, _gloffset_BeginTransformFeedbackEXT) -#define SET_BeginTransformFeedbackEXT(disp, fn) SET_by_offset(disp, _gloffset_BeginTransformFeedbackEXT, fn) -#define CALL_BindBufferBaseEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint)), _gloffset_BindBufferBaseEXT, parameters) -#define GET_BindBufferBaseEXT(disp) GET_by_offset(disp, _gloffset_BindBufferBaseEXT) -#define SET_BindBufferBaseEXT(disp, fn) SET_by_offset(disp, _gloffset_BindBufferBaseEXT, fn) -#define CALL_BindBufferOffsetEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLintptr)), _gloffset_BindBufferOffsetEXT, parameters) -#define GET_BindBufferOffsetEXT(disp) GET_by_offset(disp, _gloffset_BindBufferOffsetEXT) -#define SET_BindBufferOffsetEXT(disp, fn) SET_by_offset(disp, _gloffset_BindBufferOffsetEXT, fn) -#define CALL_BindBufferRangeEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLuint, GLintptr, GLsizeiptr)), _gloffset_BindBufferRangeEXT, parameters) -#define GET_BindBufferRangeEXT(disp) GET_by_offset(disp, _gloffset_BindBufferRangeEXT) -#define SET_BindBufferRangeEXT(disp, fn) SET_by_offset(disp, _gloffset_BindBufferRangeEXT, fn) -#define CALL_EndTransformFeedbackEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_EndTransformFeedbackEXT, parameters) -#define GET_EndTransformFeedbackEXT(disp) GET_by_offset(disp, _gloffset_EndTransformFeedbackEXT) -#define SET_EndTransformFeedbackEXT(disp, fn) SET_by_offset(disp, _gloffset_EndTransformFeedbackEXT, fn) -#define CALL_GetTransformFeedbackVaryingEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *)), _gloffset_GetTransformFeedbackVaryingEXT, parameters) -#define GET_GetTransformFeedbackVaryingEXT(disp) GET_by_offset(disp, _gloffset_GetTransformFeedbackVaryingEXT) -#define SET_GetTransformFeedbackVaryingEXT(disp, fn) SET_by_offset(disp, _gloffset_GetTransformFeedbackVaryingEXT, fn) -#define CALL_TransformFeedbackVaryingsEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLsizei, const char **, GLenum)), _gloffset_TransformFeedbackVaryingsEXT, parameters) -#define GET_TransformFeedbackVaryingsEXT(disp) GET_by_offset(disp, _gloffset_TransformFeedbackVaryingsEXT) -#define SET_TransformFeedbackVaryingsEXT(disp, fn) SET_by_offset(disp, _gloffset_TransformFeedbackVaryingsEXT, fn) -#define CALL_ProvokingVertexEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum)), _gloffset_ProvokingVertexEXT, parameters) -#define GET_ProvokingVertexEXT(disp) GET_by_offset(disp, _gloffset_ProvokingVertexEXT) -#define SET_ProvokingVertexEXT(disp, fn) SET_by_offset(disp, _gloffset_ProvokingVertexEXT, fn) -#define CALL_GetTexParameterPointervAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLvoid **)), _gloffset_GetTexParameterPointervAPPLE, parameters) -#define GET_GetTexParameterPointervAPPLE(disp) GET_by_offset(disp, _gloffset_GetTexParameterPointervAPPLE) -#define SET_GetTexParameterPointervAPPLE(disp, fn) SET_by_offset(disp, _gloffset_GetTexParameterPointervAPPLE, fn) -#define CALL_TextureRangeAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLsizei, GLvoid *)), _gloffset_TextureRangeAPPLE, parameters) -#define GET_TextureRangeAPPLE(disp) GET_by_offset(disp, _gloffset_TextureRangeAPPLE) -#define SET_TextureRangeAPPLE(disp, fn) SET_by_offset(disp, _gloffset_TextureRangeAPPLE, fn) -#define CALL_GetObjectParameterivAPPLE(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLenum, GLint *)), _gloffset_GetObjectParameterivAPPLE, parameters) -#define GET_GetObjectParameterivAPPLE(disp) GET_by_offset(disp, _gloffset_GetObjectParameterivAPPLE) -#define SET_GetObjectParameterivAPPLE(disp, fn) SET_by_offset(disp, _gloffset_GetObjectParameterivAPPLE, fn) -#define CALL_ObjectPurgeableAPPLE(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum, GLuint, GLenum)), _gloffset_ObjectPurgeableAPPLE, parameters) -#define GET_ObjectPurgeableAPPLE(disp) GET_by_offset(disp, _gloffset_ObjectPurgeableAPPLE) -#define SET_ObjectPurgeableAPPLE(disp, fn) SET_by_offset(disp, _gloffset_ObjectPurgeableAPPLE, fn) -#define CALL_ObjectUnpurgeableAPPLE(disp, parameters) CALL_by_offset(disp, (GLenum (GLAPIENTRYP)(GLenum, GLuint, GLenum)), _gloffset_ObjectUnpurgeableAPPLE, parameters) -#define GET_ObjectUnpurgeableAPPLE(disp) GET_by_offset(disp, _gloffset_ObjectUnpurgeableAPPLE) -#define SET_ObjectUnpurgeableAPPLE(disp, fn) SET_by_offset(disp, _gloffset_ObjectUnpurgeableAPPLE, fn) -#define CALL_ActiveProgramEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint)), _gloffset_ActiveProgramEXT, parameters) -#define GET_ActiveProgramEXT(disp) GET_by_offset(disp, _gloffset_ActiveProgramEXT) -#define SET_ActiveProgramEXT(disp, fn) SET_by_offset(disp, _gloffset_ActiveProgramEXT, fn) -#define CALL_CreateShaderProgramEXT(disp, parameters) CALL_by_offset(disp, (GLuint (GLAPIENTRYP)(GLenum, const GLchar *)), _gloffset_CreateShaderProgramEXT, parameters) -#define GET_CreateShaderProgramEXT(disp) GET_by_offset(disp, _gloffset_CreateShaderProgramEXT) -#define SET_CreateShaderProgramEXT(disp, fn) SET_by_offset(disp, _gloffset_CreateShaderProgramEXT, fn) -#define CALL_UseShaderProgramEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint)), _gloffset_UseShaderProgramEXT, parameters) -#define GET_UseShaderProgramEXT(disp) GET_by_offset(disp, _gloffset_UseShaderProgramEXT) -#define SET_UseShaderProgramEXT(disp, fn) SET_by_offset(disp, _gloffset_UseShaderProgramEXT, fn) -#define CALL_TextureBarrierNV(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(void)), _gloffset_TextureBarrierNV, parameters) -#define GET_TextureBarrierNV(disp) GET_by_offset(disp, _gloffset_TextureBarrierNV) -#define SET_TextureBarrierNV(disp, fn) SET_by_offset(disp, _gloffset_TextureBarrierNV, fn) -#define CALL_StencilFuncSeparateATI(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLenum, GLint, GLuint)), _gloffset_StencilFuncSeparateATI, parameters) -#define GET_StencilFuncSeparateATI(disp) GET_by_offset(disp, _gloffset_StencilFuncSeparateATI) -#define SET_StencilFuncSeparateATI(disp, fn) SET_by_offset(disp, _gloffset_StencilFuncSeparateATI, fn) -#define CALL_ProgramEnvParameters4fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), _gloffset_ProgramEnvParameters4fvEXT, parameters) -#define GET_ProgramEnvParameters4fvEXT(disp) GET_by_offset(disp, _gloffset_ProgramEnvParameters4fvEXT) -#define SET_ProgramEnvParameters4fvEXT(disp, fn) SET_by_offset(disp, _gloffset_ProgramEnvParameters4fvEXT, fn) -#define CALL_ProgramLocalParameters4fvEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLuint, GLsizei, const GLfloat *)), _gloffset_ProgramLocalParameters4fvEXT, parameters) -#define GET_ProgramLocalParameters4fvEXT(disp) GET_by_offset(disp, _gloffset_ProgramLocalParameters4fvEXT) -#define SET_ProgramLocalParameters4fvEXT(disp, fn) SET_by_offset(disp, _gloffset_ProgramLocalParameters4fvEXT, fn) -#define CALL_GetQueryObjecti64vEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLint64EXT *)), _gloffset_GetQueryObjecti64vEXT, parameters) -#define GET_GetQueryObjecti64vEXT(disp) GET_by_offset(disp, _gloffset_GetQueryObjecti64vEXT) -#define SET_GetQueryObjecti64vEXT(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjecti64vEXT, fn) -#define CALL_GetQueryObjectui64vEXT(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLuint, GLenum, GLuint64EXT *)), _gloffset_GetQueryObjectui64vEXT, parameters) -#define GET_GetQueryObjectui64vEXT(disp) GET_by_offset(disp, _gloffset_GetQueryObjectui64vEXT) -#define SET_GetQueryObjectui64vEXT(disp, fn) SET_by_offset(disp, _gloffset_GetQueryObjectui64vEXT, fn) -#define CALL_EGLImageTargetRenderbufferStorageOES(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLvoid *)), _gloffset_EGLImageTargetRenderbufferStorageOES, parameters) -#define GET_EGLImageTargetRenderbufferStorageOES(disp) GET_by_offset(disp, _gloffset_EGLImageTargetRenderbufferStorageOES) -#define SET_EGLImageTargetRenderbufferStorageOES(disp, fn) SET_by_offset(disp, _gloffset_EGLImageTargetRenderbufferStorageOES, fn) -#define CALL_EGLImageTargetTexture2DOES(disp, parameters) CALL_by_offset(disp, (void (GLAPIENTRYP)(GLenum, GLvoid *)), _gloffset_EGLImageTargetTexture2DOES, parameters) -#define GET_EGLImageTargetTexture2DOES(disp) GET_by_offset(disp, _gloffset_EGLImageTargetTexture2DOES) -#define SET_EGLImageTargetTexture2DOES(disp, fn) SET_by_offset(disp, _gloffset_EGLImageTargetTexture2DOES, fn) - -#endif /* !defined( _GLAPI_DISPATCH_H_ ) */ +/* DO NOT EDIT - This file generated automatically by gl_table.py (from Mesa) script */ + +/* + * (C) Copyright IBM Corporation 2005 + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sub license, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * IBM, + * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +#if !defined( _GLAPI_DISPATCH_H_ ) +# define _GLAPI_DISPATCH_H_ + + +/* this file should not be included directly in mesa */ + +/** + * \file glapidispatch.h + * Macros for handling GL dispatch tables. + * + * For each known GL function, there are 3 macros in this file. The first + * macro is named CALL_FuncName and is used to call that GL function using + * the specified dispatch table. The other 2 macros, called GET_FuncName + * can SET_FuncName, are used to get and set the dispatch pointer for the + * named function in the specified dispatch table. + */ + +#define CALL_by_offset(disp, cast, offset, parameters) \ + (*(cast (GET_by_offset(disp, offset)))) parameters +#define GET_by_offset(disp, offset) \ + (offset >= 0) ? (((_glapi_proc *)(disp))[offset]) : NULL +#define SET_by_offset(disp, offset, fn) \ + do { \ + if ( (offset) < 0 ) { \ + /* fprintf( stderr, "[%s:%u] SET_by_offset(%p, %d, %s)!\n", */ \ + /* __func__, __LINE__, disp, offset, # fn); */ \ + /* abort(); */ \ + } \ + else { \ + ( (_glapi_proc *) (disp) )[offset] = (_glapi_proc) fn; \ + } \ + } while(0) + +/* total number of offsets below */ +#define _gloffset_COUNT 928 + +#define _gloffset_NewList 0 +#define _gloffset_EndList 1 +#define _gloffset_CallList 2 +#define _gloffset_CallLists 3 +#define _gloffset_DeleteLists 4 +#define _gloffset_GenLists 5 +#define _gloffset_ListBase 6 +#define _gloffset_Begin 7 +#define _gloffset_Bitmap 8 +#define _gloffset_Color3b 9 +#define _gloffset_Color3bv 10 +#define _gloffset_Color3d 11 +#define _gloffset_Color3dv 12 +#define _gloffset_Color3f 13 +#define _gloffset_Color3fv 14 +#define _gloffset_Color3i 15 +#define _gloffset_Color3iv 16 +#define _gloffset_Color3s 17 +#define _gloffset_Color3sv 18 +#define _gloffset_Color3ub 19 +#define _gloffset_Color3ubv 20 +#define _gloffset_Color3ui 21 +#define _gloffset_Color3uiv 22 +#define _gloffset_Color3us 23 +#define _gloffset_Color3usv 24 +#define _gloffset_Color4b 25 +#define _gloffset_Color4bv 26 +#define _gloffset_Color4d 27 +#define _gloffset_Color4dv 28 +#define _gloffset_Color4f 29 +#define _gloffset_Color4fv 30 +#define _gloffset_Color4i 31 +#define _gloffset_Color4iv 32 +#define _gloffset_Color4s 33 +#define _gloffset_Color4sv 34 +#define _gloffset_Color4ub 35 +#define _gloffset_Color4ubv 36 +#define _gloffset_Color4ui 37 +#define _gloffset_Color4uiv 38 +#define _gloffset_Color4us 39 +#define _gloffset_Color4usv 40 +#define _gloffset_EdgeFlag 41 +#define _gloffset_EdgeFlagv 42 +#define _gloffset_End 43 +#define _gloffset_Indexd 44 +#define _gloffset_Indexdv 45 +#define _gloffset_Indexf 46 +#define _gloffset_Indexfv 47 +#define _gloffset_Indexi 48 +#define _gloffset_Indexiv 49 +#define _gloffset_Indexs 50 +#define _gloffset_Indexsv 51 +#define _gloffset_Normal3b 52 +#define _gloffset_Normal3bv 53 +#define _gloffset_Normal3d 54 +#define _gloffset_Normal3dv 55 +#define _gloffset_Normal3f 56 +#define _gloffset_Normal3fv 57 +#define _gloffset_Normal3i 58 +#define _gloffset_Normal3iv 59 +#define _gloffset_Normal3s 60 +#define _gloffset_Normal3sv 61 +#define _gloffset_RasterPos2d 62 +#define _gloffset_RasterPos2dv 63 +#define _gloffset_RasterPos2f 64 +#define _gloffset_RasterPos2fv 65 +#define _gloffset_RasterPos2i 66 +#define _gloffset_RasterPos2iv 67 +#define _gloffset_RasterPos2s 68 +#define _gloffset_RasterPos2sv 69 +#define _gloffset_RasterPos3d 70 +#define _gloffset_RasterPos3dv 71 +#define _gloffset_RasterPos3f 72 +#define _gloffset_RasterPos3fv 73 +#define _gloffset_RasterPos3i 74 +#define _gloffset_RasterPos3iv 75 +#define _gloffset_RasterPos3s 76 +#define _gloffset_RasterPos3sv 77 +#define _gloffset_RasterPos4d 78 +#define _gloffset_RasterPos4dv 79 +#define _gloffset_RasterPos4f 80 +#define _gloffset_RasterPos4fv 81 +#define _gloffset_RasterPos4i 82 +#define _gloffset_RasterPos4iv 83 +#define _gloffset_RasterPos4s 84 +#define _gloffset_RasterPos4sv 85 +#define _gloffset_Rectd 86 +#define _gloffset_Rectdv 87 +#define _gloffset_Rectf 88 +#define _gloffset_Rectfv 89 +#define _gloffset_Recti 90 +#define _gloffset_Rectiv 91 +#define _gloffset_Rects 92 +#define _gloffset_Rectsv 93 +#define _gloffset_TexCoord1d 94 +#define _gloffset_TexCoord1dv 95 +#define _gloffset_TexCoord1f 96 +#define _gloffset_TexCoord1fv 97 +#define _gloffset_TexCoord1i 98 +#define _gloffset_TexCoord1iv 99 +#define _gloffset_TexCoord1s 100 +#define _gloffset_TexCoord1sv 101 +#define _gloffset_TexCoord2d 102 +#define _gloffset_TexCoord2dv 103 +#define _gloffset_TexCoord2f 104 +#define _gloffset_TexCoord2fv 105 +#define _gloffset_TexCoord2i 106 +#define _gloffset_TexCoord2iv 107 +#define _gloffset_TexCoord2s 108 +#define _gloffset_TexCoord2sv 109 +#define _gloffset_TexCoord3d 110 +#define _gloffset_TexCoord3dv 111 +#define _gloffset_TexCoord3f 112 +#define _gloffset_TexCoord3fv 113 +#define _gloffset_TexCoord3i 114 +#define _gloffset_TexCoord3iv 115 +#define _gloffset_TexCoord3s 116 +#define _gloffset_TexCoord3sv 117 +#define _gloffset_TexCoord4d 118 +#define _gloffset_TexCoord4dv 119 +#define _gloffset_TexCoord4f 120 +#define _gloffset_TexCoord4fv 121 +#define _gloffset_TexCoord4i 122 +#define _gloffset_TexCoord4iv 123 +#define _gloffset_TexCoord4s 124 +#define _gloffset_TexCoord4sv 125 +#define _gloffset_Vertex2d 126 +#define _gloffset_Vertex2dv 127 +#define _gloffset_Vertex2f 128 +#define _gloffset_Vertex2fv 129 +#define _gloffset_Vertex2i 130 +#define _gloffset_Vertex2iv 131 +#define _gloffset_Vertex2s 132 +#define _gloffset_Vertex2sv 133 +#define _gloffset_Vertex3d 134 +#define _gloffset_Vertex3dv 135 +#define _gloffset_Vertex3f 136 +#define _gloffset_Vertex3fv 137 +#define _gloffset_Vertex3i 138 +#define _gloffset_Vertex3iv 139 +#define _gloffset_Vertex3s 140 +#define _gloffset_Vertex3sv 141 +#define _gloffset_Vertex4d 142 +#define _gloffset_Vertex4dv 143 +#define _gloffset_Vertex4f 144 +#define _gloffset_Vertex4fv 145 +#define _gloffset_Vertex4i 146 +#define _gloffset_Vertex4iv 147 +#define _gloffset_Vertex4s 148 +#define _gloffset_Vertex4sv 149 +#define _gloffset_ClipPlane 150 +#define _gloffset_ColorMaterial 151 +#define _gloffset_CullFace 152 +#define _gloffset_Fogf 153 +#define _gloffset_Fogfv 154 +#define _gloffset_Fogi 155 +#define _gloffset_Fogiv 156 +#define _gloffset_FrontFace 157 +#define _gloffset_Hint 158 +#define _gloffset_Lightf 159 +#define _gloffset_Lightfv 160 +#define _gloffset_Lighti 161 +#define _gloffset_Lightiv 162 +#define _gloffset_LightModelf 163 +#define _gloffset_LightModelfv 164 +#define _gloffset_LightModeli 165 +#define _gloffset_LightModeliv 166 +#define _gloffset_LineStipple 167 +#define _gloffset_LineWidth 168 +#define _gloffset_Materialf 169 +#define _gloffset_Materialfv 170 +#define _gloffset_Materiali 171 +#define _gloffset_Materialiv 172 +#define _gloffset_PointSize 173 +#define _gloffset_PolygonMode 174 +#define _gloffset_PolygonStipple 175 +#define _gloffset_Scissor 176 +#define _gloffset_ShadeModel 177 +#define _gloffset_TexParameterf 178 +#define _gloffset_TexParameterfv 179 +#define _gloffset_TexParameteri 180 +#define _gloffset_TexParameteriv 181 +#define _gloffset_TexImage1D 182 +#define _gloffset_TexImage2D 183 +#define _gloffset_TexEnvf 184 +#define _gloffset_TexEnvfv 185 +#define _gloffset_TexEnvi 186 +#define _gloffset_TexEnviv 187 +#define _gloffset_TexGend 188 +#define _gloffset_TexGendv 189 +#define _gloffset_TexGenf 190 +#define _gloffset_TexGenfv 191 +#define _gloffset_TexGeni 192 +#define _gloffset_TexGeniv 193 +#define _gloffset_FeedbackBuffer 194 +#define _gloffset_SelectBuffer 195 +#define _gloffset_RenderMode 196 +#define _gloffset_InitNames 197 +#define _gloffset_LoadName 198 +#define _gloffset_PassThrough 199 +#define _gloffset_PopName 200 +#define _gloffset_PushName 201 +#define _gloffset_DrawBuffer 202 +#define _gloffset_Clear 203 +#define _gloffset_ClearAccum 204 +#define _gloffset_ClearIndex 205 +#define _gloffset_ClearColor 206 +#define _gloffset_ClearStencil 207 +#define _gloffset_ClearDepth 208 +#define _gloffset_StencilMask 209 +#define _gloffset_ColorMask 210 +#define _gloffset_DepthMask 211 +#define _gloffset_IndexMask 212 +#define _gloffset_Accum 213 +#define _gloffset_Disable 214 +#define _gloffset_Enable 215 +#define _gloffset_Finish 216 +#define _gloffset_Flush 217 +#define _gloffset_PopAttrib 218 +#define _gloffset_PushAttrib 219 +#define _gloffset_Map1d 220 +#define _gloffset_Map1f 221 +#define _gloffset_Map2d 222 +#define _gloffset_Map2f 223 +#define _gloffset_MapGrid1d 224 +#define _gloffset_MapGrid1f 225 +#define _gloffset_MapGrid2d 226 +#define _gloffset_MapGrid2f 227 +#define _gloffset_EvalCoord1d 228 +#define _gloffset_EvalCoord1dv 229 +#define _gloffset_EvalCoord1f 230 +#define _gloffset_EvalCoord1fv 231 +#define _gloffset_EvalCoord2d 232 +#define _gloffset_EvalCoord2dv 233 +#define _gloffset_EvalCoord2f 234 +#define _gloffset_EvalCoord2fv 235 +#define _gloffset_EvalMesh1 236 +#define _gloffset_EvalPoint1 237 +#define _gloffset_EvalMesh2 238 +#define _gloffset_EvalPoint2 239 +#define _gloffset_AlphaFunc 240 +#define _gloffset_BlendFunc 241 +#define _gloffset_LogicOp 242 +#define _gloffset_StencilFunc 243 +#define _gloffset_StencilOp 244 +#define _gloffset_DepthFunc 245 +#define _gloffset_PixelZoom 246 +#define _gloffset_PixelTransferf 247 +#define _gloffset_PixelTransferi 248 +#define _gloffset_PixelStoref 249 +#define _gloffset_PixelStorei 250 +#define _gloffset_PixelMapfv 251 +#define _gloffset_PixelMapuiv 252 +#define _gloffset_PixelMapusv 253 +#define _gloffset_ReadBuffer 254 +#define _gloffset_CopyPixels 255 +#define _gloffset_ReadPixels 256 +#define _gloffset_DrawPixels 257 +#define _gloffset_GetBooleanv 258 +#define _gloffset_GetClipPlane 259 +#define _gloffset_GetDoublev 260 +#define _gloffset_GetError 261 +#define _gloffset_GetFloatv 262 +#define _gloffset_GetIntegerv 263 +#define _gloffset_GetLightfv 264 +#define _gloffset_GetLightiv 265 +#define _gloffset_GetMapdv 266 +#define _gloffset_GetMapfv 267 +#define _gloffset_GetMapiv 268 +#define _gloffset_GetMaterialfv 269 +#define _gloffset_GetMaterialiv 270 +#define _gloffset_GetPixelMapfv 271 +#define _gloffset_GetPixelMapuiv 272 +#define _gloffset_GetPixelMapusv 273 +#define _gloffset_GetPolygonStipple 274 +#define _gloffset_GetString 275 +#define _gloffset_GetTexEnvfv 276 +#define _gloffset_GetTexEnviv 277 +#define _gloffset_GetTexGendv 278 +#define _gloffset_GetTexGenfv 279 +#define _gloffset_GetTexGeniv 280 +#define _gloffset_GetTexImage 281 +#define _gloffset_GetTexParameterfv 282 +#define _gloffset_GetTexParameteriv 283 +#define _gloffset_GetTexLevelParameterfv 284 +#define _gloffset_GetTexLevelParameteriv 285 +#define _gloffset_IsEnabled 286 +#define _gloffset_IsList 287 +#define _gloffset_DepthRange 288 +#define _gloffset_Frustum 289 +#define _gloffset_LoadIdentity 290 +#define _gloffset_LoadMatrixf 291 +#define _gloffset_LoadMatrixd 292 +#define _gloffset_MatrixMode 293 +#define _gloffset_MultMatrixf 294 +#define _gloffset_MultMatrixd 295 +#define _gloffset_Ortho 296 +#define _gloffset_PopMatrix 297 +#define _gloffset_PushMatrix 298 +#define _gloffset_Rotated 299 +#define _gloffset_Rotatef 300 +#define _gloffset_Scaled 301 +#define _gloffset_Scalef 302 +#define _gloffset_Translated 303 +#define _gloffset_Translatef 304 +#define _gloffset_Viewport 305 +#define _gloffset_ArrayElement 306 +#define _gloffset_BindTexture 307 +#define _gloffset_ColorPointer 308 +#define _gloffset_DisableClientState 309 +#define _gloffset_DrawArrays 310 +#define _gloffset_DrawElements 311 +#define _gloffset_EdgeFlagPointer 312 +#define _gloffset_EnableClientState 313 +#define _gloffset_IndexPointer 314 +#define _gloffset_Indexub 315 +#define _gloffset_Indexubv 316 +#define _gloffset_InterleavedArrays 317 +#define _gloffset_NormalPointer 318 +#define _gloffset_PolygonOffset 319 +#define _gloffset_TexCoordPointer 320 +#define _gloffset_VertexPointer 321 +#define _gloffset_AreTexturesResident 322 +#define _gloffset_CopyTexImage1D 323 +#define _gloffset_CopyTexImage2D 324 +#define _gloffset_CopyTexSubImage1D 325 +#define _gloffset_CopyTexSubImage2D 326 +#define _gloffset_DeleteTextures 327 +#define _gloffset_GenTextures 328 +#define _gloffset_GetPointerv 329 +#define _gloffset_IsTexture 330 +#define _gloffset_PrioritizeTextures 331 +#define _gloffset_TexSubImage1D 332 +#define _gloffset_TexSubImage2D 333 +#define _gloffset_PopClientAttrib 334 +#define _gloffset_PushClientAttrib 335 +#define _gloffset_BlendColor 336 +#define _gloffset_BlendEquation 337 +#define _gloffset_DrawRangeElements 338 +#define _gloffset_ColorTable 339 +#define _gloffset_ColorTableParameterfv 340 +#define _gloffset_ColorTableParameteriv 341 +#define _gloffset_CopyColorTable 342 +#define _gloffset_GetColorTable 343 +#define _gloffset_GetColorTableParameterfv 344 +#define _gloffset_GetColorTableParameteriv 345 +#define _gloffset_ColorSubTable 346 +#define _gloffset_CopyColorSubTable 347 +#define _gloffset_ConvolutionFilter1D 348 +#define _gloffset_ConvolutionFilter2D 349 +#define _gloffset_ConvolutionParameterf 350 +#define _gloffset_ConvolutionParameterfv 351 +#define _gloffset_ConvolutionParameteri 352 +#define _gloffset_ConvolutionParameteriv 353 +#define _gloffset_CopyConvolutionFilter1D 354 +#define _gloffset_CopyConvolutionFilter2D 355 +#define _gloffset_GetConvolutionFilter 356 +#define _gloffset_GetConvolutionParameterfv 357 +#define _gloffset_GetConvolutionParameteriv 358 +#define _gloffset_GetSeparableFilter 359 +#define _gloffset_SeparableFilter2D 360 +#define _gloffset_GetHistogram 361 +#define _gloffset_GetHistogramParameterfv 362 +#define _gloffset_GetHistogramParameteriv 363 +#define _gloffset_GetMinmax 364 +#define _gloffset_GetMinmaxParameterfv 365 +#define _gloffset_GetMinmaxParameteriv 366 +#define _gloffset_Histogram 367 +#define _gloffset_Minmax 368 +#define _gloffset_ResetHistogram 369 +#define _gloffset_ResetMinmax 370 +#define _gloffset_TexImage3D 371 +#define _gloffset_TexSubImage3D 372 +#define _gloffset_CopyTexSubImage3D 373 +#define _gloffset_ActiveTextureARB 374 +#define _gloffset_ClientActiveTextureARB 375 +#define _gloffset_MultiTexCoord1dARB 376 +#define _gloffset_MultiTexCoord1dvARB 377 +#define _gloffset_MultiTexCoord1fARB 378 +#define _gloffset_MultiTexCoord1fvARB 379 +#define _gloffset_MultiTexCoord1iARB 380 +#define _gloffset_MultiTexCoord1ivARB 381 +#define _gloffset_MultiTexCoord1sARB 382 +#define _gloffset_MultiTexCoord1svARB 383 +#define _gloffset_MultiTexCoord2dARB 384 +#define _gloffset_MultiTexCoord2dvARB 385 +#define _gloffset_MultiTexCoord2fARB 386 +#define _gloffset_MultiTexCoord2fvARB 387 +#define _gloffset_MultiTexCoord2iARB 388 +#define _gloffset_MultiTexCoord2ivARB 389 +#define _gloffset_MultiTexCoord2sARB 390 +#define _gloffset_MultiTexCoord2svARB 391 +#define _gloffset_MultiTexCoord3dARB 392 +#define _gloffset_MultiTexCoord3dvARB 393 +#define _gloffset_MultiTexCoord3fARB 394 +#define _gloffset_MultiTexCoord3fvARB 395 +#define _gloffset_MultiTexCoord3iARB 396 +#define _gloffset_MultiTexCoord3ivARB 397 +#define _gloffset_MultiTexCoord3sARB 398 +#define _gloffset_MultiTexCoord3svARB 399 +#define _gloffset_MultiTexCoord4dARB 400 +#define _gloffset_MultiTexCoord4dvARB 401 +#define _gloffset_MultiTexCoord4fARB 402 +#define _gloffset_MultiTexCoord4fvARB 403 +#define _gloffset_MultiTexCoord4iARB 404 +#define _gloffset_MultiTexCoord4ivARB 405 +#define _gloffset_MultiTexCoord4sARB 406 +#define _gloffset_MultiTexCoord4svARB 407 + +#if !defined(_GLAPI_USE_REMAP_TABLE) + +#define _gloffset_AttachShader 408 +#define _gloffset_CreateProgram 409 +#define _gloffset_CreateShader 410 +#define _gloffset_DeleteProgram 411 +#define _gloffset_DeleteShader 412 +#define _gloffset_DetachShader 413 +#define _gloffset_GetAttachedShaders 414 +#define _gloffset_GetProgramInfoLog 415 +#define _gloffset_GetProgramiv 416 +#define _gloffset_GetShaderInfoLog 417 +#define _gloffset_GetShaderiv 418 +#define _gloffset_IsProgram 419 +#define _gloffset_IsShader 420 +#define _gloffset_StencilFuncSeparate 421 +#define _gloffset_StencilMaskSeparate 422 +#define _gloffset_StencilOpSeparate 423 +#define _gloffset_UniformMatrix2x3fv 424 +#define _gloffset_UniformMatrix2x4fv 425 +#define _gloffset_UniformMatrix3x2fv 426 +#define _gloffset_UniformMatrix3x4fv 427 +#define _gloffset_UniformMatrix4x2fv 428 +#define _gloffset_UniformMatrix4x3fv 429 +#define _gloffset_ClampColor 430 +#define _gloffset_ClearBufferfi 431 +#define _gloffset_ClearBufferfv 432 +#define _gloffset_ClearBufferiv 433 +#define _gloffset_ClearBufferuiv 434 +#define _gloffset_GetStringi 435 +#define _gloffset_TexBuffer 436 +#define _gloffset_FramebufferTexture 437 +#define _gloffset_GetBufferParameteri64v 438 +#define _gloffset_GetInteger64i_v 439 +#define _gloffset_VertexAttribDivisor 440 +#define _gloffset_LoadTransposeMatrixdARB 441 +#define _gloffset_LoadTransposeMatrixfARB 442 +#define _gloffset_MultTransposeMatrixdARB 443 +#define _gloffset_MultTransposeMatrixfARB 444 +#define _gloffset_SampleCoverageARB 445 +#define _gloffset_CompressedTexImage1DARB 446 +#define _gloffset_CompressedTexImage2DARB 447 +#define _gloffset_CompressedTexImage3DARB 448 +#define _gloffset_CompressedTexSubImage1DARB 449 +#define _gloffset_CompressedTexSubImage2DARB 450 +#define _gloffset_CompressedTexSubImage3DARB 451 +#define _gloffset_GetCompressedTexImageARB 452 +#define _gloffset_DisableVertexAttribArrayARB 453 +#define _gloffset_EnableVertexAttribArrayARB 454 +#define _gloffset_GetProgramEnvParameterdvARB 455 +#define _gloffset_GetProgramEnvParameterfvARB 456 +#define _gloffset_GetProgramLocalParameterdvARB 457 +#define _gloffset_GetProgramLocalParameterfvARB 458 +#define _gloffset_GetProgramStringARB 459 +#define _gloffset_GetProgramivARB 460 +#define _gloffset_GetVertexAttribdvARB 461 +#define _gloffset_GetVertexAttribfvARB 462 +#define _gloffset_GetVertexAttribivARB 463 +#define _gloffset_ProgramEnvParameter4dARB 464 +#define _gloffset_ProgramEnvParameter4dvARB 465 +#define _gloffset_ProgramEnvParameter4fARB 466 +#define _gloffset_ProgramEnvParameter4fvARB 467 +#define _gloffset_ProgramLocalParameter4dARB 468 +#define _gloffset_ProgramLocalParameter4dvARB 469 +#define _gloffset_ProgramLocalParameter4fARB 470 +#define _gloffset_ProgramLocalParameter4fvARB 471 +#define _gloffset_ProgramStringARB 472 +#define _gloffset_VertexAttrib1dARB 473 +#define _gloffset_VertexAttrib1dvARB 474 +#define _gloffset_VertexAttrib1fARB 475 +#define _gloffset_VertexAttrib1fvARB 476 +#define _gloffset_VertexAttrib1sARB 477 +#define _gloffset_VertexAttrib1svARB 478 +#define _gloffset_VertexAttrib2dARB 479 +#define _gloffset_VertexAttrib2dvARB 480 +#define _gloffset_VertexAttrib2fARB 481 +#define _gloffset_VertexAttrib2fvARB 482 +#define _gloffset_VertexAttrib2sARB 483 +#define _gloffset_VertexAttrib2svARB 484 +#define _gloffset_VertexAttrib3dARB 485 +#define _gloffset_VertexAttrib3dvARB 486 +#define _gloffset_VertexAttrib3fARB 487 +#define _gloffset_VertexAttrib3fvARB 488 +#define _gloffset_VertexAttrib3sARB 489 +#define _gloffset_VertexAttrib3svARB 490 +#define _gloffset_VertexAttrib4NbvARB 491 +#define _gloffset_VertexAttrib4NivARB 492 +#define _gloffset_VertexAttrib4NsvARB 493 +#define _gloffset_VertexAttrib4NubARB 494 +#define _gloffset_VertexAttrib4NubvARB 495 +#define _gloffset_VertexAttrib4NuivARB 496 +#define _gloffset_VertexAttrib4NusvARB 497 +#define _gloffset_VertexAttrib4bvARB 498 +#define _gloffset_VertexAttrib4dARB 499 +#define _gloffset_VertexAttrib4dvARB 500 +#define _gloffset_VertexAttrib4fARB 501 +#define _gloffset_VertexAttrib4fvARB 502 +#define _gloffset_VertexAttrib4ivARB 503 +#define _gloffset_VertexAttrib4sARB 504 +#define _gloffset_VertexAttrib4svARB 505 +#define _gloffset_VertexAttrib4ubvARB 506 +#define _gloffset_VertexAttrib4uivARB 507 +#define _gloffset_VertexAttrib4usvARB 508 +#define _gloffset_VertexAttribPointerARB 509 +#define _gloffset_BindBufferARB 510 +#define _gloffset_BufferDataARB 511 +#define _gloffset_BufferSubDataARB 512 +#define _gloffset_DeleteBuffersARB 513 +#define _gloffset_GenBuffersARB 514 +#define _gloffset_GetBufferParameterivARB 515 +#define _gloffset_GetBufferPointervARB 516 +#define _gloffset_GetBufferSubDataARB 517 +#define _gloffset_IsBufferARB 518 +#define _gloffset_MapBufferARB 519 +#define _gloffset_UnmapBufferARB 520 +#define _gloffset_BeginQueryARB 521 +#define _gloffset_DeleteQueriesARB 522 +#define _gloffset_EndQueryARB 523 +#define _gloffset_GenQueriesARB 524 +#define _gloffset_GetQueryObjectivARB 525 +#define _gloffset_GetQueryObjectuivARB 526 +#define _gloffset_GetQueryivARB 527 +#define _gloffset_IsQueryARB 528 +#define _gloffset_AttachObjectARB 529 +#define _gloffset_CompileShaderARB 530 +#define _gloffset_CreateProgramObjectARB 531 +#define _gloffset_CreateShaderObjectARB 532 +#define _gloffset_DeleteObjectARB 533 +#define _gloffset_DetachObjectARB 534 +#define _gloffset_GetActiveUniformARB 535 +#define _gloffset_GetAttachedObjectsARB 536 +#define _gloffset_GetHandleARB 537 +#define _gloffset_GetInfoLogARB 538 +#define _gloffset_GetObjectParameterfvARB 539 +#define _gloffset_GetObjectParameterivARB 540 +#define _gloffset_GetShaderSourceARB 541 +#define _gloffset_GetUniformLocationARB 542 +#define _gloffset_GetUniformfvARB 543 +#define _gloffset_GetUniformivARB 544 +#define _gloffset_LinkProgramARB 545 +#define _gloffset_ShaderSourceARB 546 +#define _gloffset_Uniform1fARB 547 +#define _gloffset_Uniform1fvARB 548 +#define _gloffset_Uniform1iARB 549 +#define _gloffset_Uniform1ivARB 550 +#define _gloffset_Uniform2fARB 551 +#define _gloffset_Uniform2fvARB 552 +#define _gloffset_Uniform2iARB 553 +#define _gloffset_Uniform2ivARB 554 +#define _gloffset_Uniform3fARB 555 +#define _gloffset_Uniform3fvARB 556 +#define _gloffset_Uniform3iARB 557 +#define _gloffset_Uniform3ivARB 558 +#define _gloffset_Uniform4fARB 559 +#define _gloffset_Uniform4fvARB 560 +#define _gloffset_Uniform4iARB 561 +#define _gloffset_Uniform4ivARB 562 +#define _gloffset_UniformMatrix2fvARB 563 +#define _gloffset_UniformMatrix3fvARB 564 +#define _gloffset_UniformMatrix4fvARB 565 +#define _gloffset_UseProgramObjectARB 566 +#define _gloffset_ValidateProgramARB 567 +#define _gloffset_BindAttribLocationARB 568 +#define _gloffset_GetActiveAttribARB 569 +#define _gloffset_GetAttribLocationARB 570 +#define _gloffset_DrawBuffersARB 571 +#define _gloffset_ClampColorARB 572 +#define _gloffset_DrawArraysInstancedARB 573 +#define _gloffset_DrawElementsInstancedARB 574 +#define _gloffset_RenderbufferStorageMultisample 575 +#define _gloffset_FramebufferTextureARB 576 +#define _gloffset_FramebufferTextureFaceARB 577 +#define _gloffset_ProgramParameteriARB 578 +#define _gloffset_VertexAttribDivisorARB 579 +#define _gloffset_FlushMappedBufferRange 580 +#define _gloffset_MapBufferRange 581 +#define _gloffset_TexBufferARB 582 +#define _gloffset_BindVertexArray 583 +#define _gloffset_GenVertexArrays 584 +#define _gloffset_CopyBufferSubData 585 +#define _gloffset_ClientWaitSync 586 +#define _gloffset_DeleteSync 587 +#define _gloffset_FenceSync 588 +#define _gloffset_GetInteger64v 589 +#define _gloffset_GetSynciv 590 +#define _gloffset_IsSync 591 +#define _gloffset_WaitSync 592 +#define _gloffset_DrawElementsBaseVertex 593 +#define _gloffset_DrawRangeElementsBaseVertex 594 +#define _gloffset_MultiDrawElementsBaseVertex 595 +#define _gloffset_BlendEquationSeparateiARB 596 +#define _gloffset_BlendEquationiARB 597 +#define _gloffset_BlendFuncSeparateiARB 598 +#define _gloffset_BlendFunciARB 599 +#define _gloffset_BindSampler 600 +#define _gloffset_DeleteSamplers 601 +#define _gloffset_GenSamplers 602 +#define _gloffset_GetSamplerParameterIiv 603 +#define _gloffset_GetSamplerParameterIuiv 604 +#define _gloffset_GetSamplerParameterfv 605 +#define _gloffset_GetSamplerParameteriv 606 +#define _gloffset_IsSampler 607 +#define _gloffset_SamplerParameterIiv 608 +#define _gloffset_SamplerParameterIuiv 609 +#define _gloffset_SamplerParameterf 610 +#define _gloffset_SamplerParameterfv 611 +#define _gloffset_SamplerParameteri 612 +#define _gloffset_SamplerParameteriv 613 +#define _gloffset_BindTransformFeedback 614 +#define _gloffset_DeleteTransformFeedbacks 615 +#define _gloffset_DrawTransformFeedback 616 +#define _gloffset_GenTransformFeedbacks 617 +#define _gloffset_IsTransformFeedback 618 +#define _gloffset_PauseTransformFeedback 619 +#define _gloffset_ResumeTransformFeedback 620 +#define _gloffset_ClearDepthf 621 +#define _gloffset_DepthRangef 622 +#define _gloffset_GetShaderPrecisionFormat 623 +#define _gloffset_ReleaseShaderCompiler 624 +#define _gloffset_ShaderBinary 625 +#define _gloffset_GetGraphicsResetStatusARB 626 +#define _gloffset_GetnColorTableARB 627 +#define _gloffset_GetnCompressedTexImageARB 628 +#define _gloffset_GetnConvolutionFilterARB 629 +#define _gloffset_GetnHistogramARB 630 +#define _gloffset_GetnMapdvARB 631 +#define _gloffset_GetnMapfvARB 632 +#define _gloffset_GetnMapivARB 633 +#define _gloffset_GetnMinmaxARB 634 +#define _gloffset_GetnPixelMapfvARB 635 +#define _gloffset_GetnPixelMapuivARB 636 +#define _gloffset_GetnPixelMapusvARB 637 +#define _gloffset_GetnPolygonStippleARB 638 +#define _gloffset_GetnSeparableFilterARB 639 +#define _gloffset_GetnTexImageARB 640 +#define _gloffset_GetnUniformdvARB 641 +#define _gloffset_GetnUniformfvARB 642 +#define _gloffset_GetnUniformivARB 643 +#define _gloffset_GetnUniformuivARB 644 +#define _gloffset_ReadnPixelsARB 645 +#define _gloffset_PolygonOffsetEXT 646 +#define _gloffset_GetPixelTexGenParameterfvSGIS 647 +#define _gloffset_GetPixelTexGenParameterivSGIS 648 +#define _gloffset_PixelTexGenParameterfSGIS 649 +#define _gloffset_PixelTexGenParameterfvSGIS 650 +#define _gloffset_PixelTexGenParameteriSGIS 651 +#define _gloffset_PixelTexGenParameterivSGIS 652 +#define _gloffset_SampleMaskSGIS 653 +#define _gloffset_SamplePatternSGIS 654 +#define _gloffset_ColorPointerEXT 655 +#define _gloffset_EdgeFlagPointerEXT 656 +#define _gloffset_IndexPointerEXT 657 +#define _gloffset_NormalPointerEXT 658 +#define _gloffset_TexCoordPointerEXT 659 +#define _gloffset_VertexPointerEXT 660 +#define _gloffset_PointParameterfEXT 661 +#define _gloffset_PointParameterfvEXT 662 +#define _gloffset_LockArraysEXT 663 +#define _gloffset_UnlockArraysEXT 664 +#define _gloffset_SecondaryColor3bEXT 665 +#define _gloffset_SecondaryColor3bvEXT 666 +#define _gloffset_SecondaryColor3dEXT 667 +#define _gloffset_SecondaryColor3dvEXT 668 +#define _gloffset_SecondaryColor3fEXT 669 +#define _gloffset_SecondaryColor3fvEXT 670 +#define _gloffset_SecondaryColor3iEXT 671 +#define _gloffset_SecondaryColor3ivEXT 672 +#define _gloffset_SecondaryColor3sEXT 673 +#define _gloffset_SecondaryColor3svEXT 674 +#define _gloffset_SecondaryColor3ubEXT 675 +#define _gloffset_SecondaryColor3ubvEXT 676 +#define _gloffset_SecondaryColor3uiEXT 677 +#define _gloffset_SecondaryColor3uivEXT 678 +#define _gloffset_SecondaryColor3usEXT 679 +#define _gloffset_SecondaryColor3usvEXT 680 +#define _gloffset_SecondaryColorPointerEXT 681 +#define _gloffset_MultiDrawArraysEXT 682 +#define _gloffset_MultiDrawElementsEXT 683 +#define _gloffset_FogCoordPointerEXT 684 +#define _gloffset_FogCoorddEXT 685 +#define _gloffset_FogCoorddvEXT 686 +#define _gloffset_FogCoordfEXT 687 +#define _gloffset_FogCoordfvEXT 688 +#define _gloffset_PixelTexGenSGIX 689 +#define _gloffset_BlendFuncSeparateEXT 690 +#define _gloffset_FlushVertexArrayRangeNV 691 +#define _gloffset_VertexArrayRangeNV 692 +#define _gloffset_CombinerInputNV 693 +#define _gloffset_CombinerOutputNV 694 +#define _gloffset_CombinerParameterfNV 695 +#define _gloffset_CombinerParameterfvNV 696 +#define _gloffset_CombinerParameteriNV 697 +#define _gloffset_CombinerParameterivNV 698 +#define _gloffset_FinalCombinerInputNV 699 +#define _gloffset_GetCombinerInputParameterfvNV 700 +#define _gloffset_GetCombinerInputParameterivNV 701 +#define _gloffset_GetCombinerOutputParameterfvNV 702 +#define _gloffset_GetCombinerOutputParameterivNV 703 +#define _gloffset_GetFinalCombinerInputParameterfvNV 704 +#define _gloffset_GetFinalCombinerInputParameterivNV 705 +#define _gloffset_ResizeBuffersMESA 706 +#define _gloffset_WindowPos2dMESA 707 +#define _gloffset_WindowPos2dvMESA 708 +#define _gloffset_WindowPos2fMESA 709 +#define _gloffset_WindowPos2fvMESA 710 +#define _gloffset_WindowPos2iMESA 711 +#define _gloffset_WindowPos2ivMESA 712 +#define _gloffset_WindowPos2sMESA 713 +#define _gloffset_WindowPos2svMESA 714 +#define _gloffset_WindowPos3dMESA 715 +#define _gloffset_WindowPos3dvMESA 716 +#define _gloffset_WindowPos3fMESA 717 +#define _gloffset_WindowPos3fvMESA 718 +#define _gloffset_WindowPos3iMESA 719 +#define _gloffset_WindowPos3ivMESA 720 +#define _gloffset_WindowPos3sMESA 721 +#define _gloffset_WindowPos3svMESA 722 +#define _gloffset_WindowPos4dMESA 723 +#define _gloffset_WindowPos4dvMESA 724 +#define _gloffset_WindowPos4fMESA 725 +#define _gloffset_WindowPos4fvMESA 726 +#define _gloffset_WindowPos4iMESA 727 +#define _gloffset_WindowPos4ivMESA 728 +#define _gloffset_WindowPos4sMESA 729 +#define _gloffset_WindowPos4svMESA 730 +#define _gloffset_MultiModeDrawArraysIBM 731 +#define _gloffset_MultiModeDrawElementsIBM 732 +#define _gloffset_DeleteFencesNV 733 +#define _gloffset_FinishFenceNV 734 +#define _gloffset_GenFencesNV 735 +#define _gloffset_GetFenceivNV 736 +#define _gloffset_IsFenceNV 737 +#define _gloffset_SetFenceNV 738 +#define _gloffset_TestFenceNV 739 +#define _gloffset_AreProgramsResidentNV 740 +#define _gloffset_BindProgramNV 741 +#define _gloffset_DeleteProgramsNV 742 +#define _gloffset_ExecuteProgramNV 743 +#define _gloffset_GenProgramsNV 744 +#define _gloffset_GetProgramParameterdvNV 745 +#define _gloffset_GetProgramParameterfvNV 746 +#define _gloffset_GetProgramStringNV 747 +#define _gloffset_GetProgramivNV 748 +#define _gloffset_GetTrackMatrixivNV 749 +#define _gloffset_GetVertexAttribPointervNV 750 +#define _gloffset_GetVertexAttribdvNV 751 +#define _gloffset_GetVertexAttribfvNV 752 +#define _gloffset_GetVertexAttribivNV 753 +#define _gloffset_IsProgramNV 754 +#define _gloffset_LoadProgramNV 755 +#define _gloffset_ProgramParameters4dvNV 756 +#define _gloffset_ProgramParameters4fvNV 757 +#define _gloffset_RequestResidentProgramsNV 758 +#define _gloffset_TrackMatrixNV 759 +#define _gloffset_VertexAttrib1dNV 760 +#define _gloffset_VertexAttrib1dvNV 761 +#define _gloffset_VertexAttrib1fNV 762 +#define _gloffset_VertexAttrib1fvNV 763 +#define _gloffset_VertexAttrib1sNV 764 +#define _gloffset_VertexAttrib1svNV 765 +#define _gloffset_VertexAttrib2dNV 766 +#define _gloffset_VertexAttrib2dvNV 767 +#define _gloffset_VertexAttrib2fNV 768 +#define _gloffset_VertexAttrib2fvNV 769 +#define _gloffset_VertexAttrib2sNV 770 +#define _gloffset_VertexAttrib2svNV 771 +#define _gloffset_VertexAttrib3dNV 772 +#define _gloffset_VertexAttrib3dvNV 773 +#define _gloffset_VertexAttrib3fNV 774 +#define _gloffset_VertexAttrib3fvNV 775 +#define _gloffset_VertexAttrib3sNV 776 +#define _gloffset_VertexAttrib3svNV 777 +#define _gloffset_VertexAttrib4dNV 778 +#define _gloffset_VertexAttrib4dvNV 779 +#define _gloffset_VertexAttrib4fNV 780 +#define _gloffset_VertexAttrib4fvNV 781 +#define _gloffset_VertexAttrib4sNV 782 +#define _gloffset_VertexAttrib4svNV 783 +#define _gloffset_VertexAttrib4ubNV 784 +#define _gloffset_VertexAttrib4ubvNV 785 +#define _gloffset_VertexAttribPointerNV 786 +#define _gloffset_VertexAttribs1dvNV 787 +#define _gloffset_VertexAttribs1fvNV 788 +#define _gloffset_VertexAttribs1svNV 789 +#define _gloffset_VertexAttribs2dvNV 790 +#define _gloffset_VertexAttribs2fvNV 791 +#define _gloffset_VertexAttribs2svNV 792 +#define _gloffset_VertexAttribs3dvNV 793 +#define _gloffset_VertexAttribs3fvNV 794 +#define _gloffset_VertexAttribs3svNV 795 +#define _gloffset_VertexAttribs4dvNV 796 +#define _gloffset_VertexAttribs4fvNV 797 +#define _gloffset_VertexAttribs4svNV 798 +#define _gloffset_VertexAttribs4ubvNV 799 +#define _gloffset_GetTexBumpParameterfvATI 800 +#define _gloffset_GetTexBumpParameterivATI 801 +#define _gloffset_TexBumpParameterfvATI 802 +#define _gloffset_TexBumpParameterivATI 803 +#define _gloffset_AlphaFragmentOp1ATI 804 +#define _gloffset_AlphaFragmentOp2ATI 805 +#define _gloffset_AlphaFragmentOp3ATI 806 +#define _gloffset_BeginFragmentShaderATI 807 +#define _gloffset_BindFragmentShaderATI 808 +#define _gloffset_ColorFragmentOp1ATI 809 +#define _gloffset_ColorFragmentOp2ATI 810 +#define _gloffset_ColorFragmentOp3ATI 811 +#define _gloffset_DeleteFragmentShaderATI 812 +#define _gloffset_EndFragmentShaderATI 813 +#define _gloffset_GenFragmentShadersATI 814 +#define _gloffset_PassTexCoordATI 815 +#define _gloffset_SampleMapATI 816 +#define _gloffset_SetFragmentShaderConstantATI 817 +#define _gloffset_PointParameteriNV 818 +#define _gloffset_PointParameterivNV 819 +#define _gloffset_ActiveStencilFaceEXT 820 +#define _gloffset_BindVertexArrayAPPLE 821 +#define _gloffset_DeleteVertexArraysAPPLE 822 +#define _gloffset_GenVertexArraysAPPLE 823 +#define _gloffset_IsVertexArrayAPPLE 824 +#define _gloffset_GetProgramNamedParameterdvNV 825 +#define _gloffset_GetProgramNamedParameterfvNV 826 +#define _gloffset_ProgramNamedParameter4dNV 827 +#define _gloffset_ProgramNamedParameter4dvNV 828 +#define _gloffset_ProgramNamedParameter4fNV 829 +#define _gloffset_ProgramNamedParameter4fvNV 830 +#define _gloffset_PrimitiveRestartIndexNV 831 +#define _gloffset_PrimitiveRestartNV 832 +#define _gloffset_DepthBoundsEXT 833 +#define _gloffset_BlendEquationSeparateEXT 834 +#define _gloffset_BindFramebufferEXT 835 +#define _gloffset_BindRenderbufferEXT 836 +#define _gloffset_CheckFramebufferStatusEXT 837 +#define _gloffset_DeleteFramebuffersEXT 838 +#define _gloffset_DeleteRenderbuffersEXT 839 +#define _gloffset_FramebufferRenderbufferEXT 840 +#define _gloffset_FramebufferTexture1DEXT 841 +#define _gloffset_FramebufferTexture2DEXT 842 +#define _gloffset_FramebufferTexture3DEXT 843 +#define _gloffset_GenFramebuffersEXT 844 +#define _gloffset_GenRenderbuffersEXT 845 +#define _gloffset_GenerateMipmapEXT 846 +#define _gloffset_GetFramebufferAttachmentParameterivEXT 847 +#define _gloffset_GetRenderbufferParameterivEXT 848 +#define _gloffset_IsFramebufferEXT 849 +#define _gloffset_IsRenderbufferEXT 850 +#define _gloffset_RenderbufferStorageEXT 851 +#define _gloffset_BlitFramebufferEXT 852 +#define _gloffset_BufferParameteriAPPLE 853 +#define _gloffset_FlushMappedBufferRangeAPPLE 854 +#define _gloffset_BindFragDataLocationEXT 855 +#define _gloffset_GetFragDataLocationEXT 856 +#define _gloffset_GetUniformuivEXT 857 +#define _gloffset_GetVertexAttribIivEXT 858 +#define _gloffset_GetVertexAttribIuivEXT 859 +#define _gloffset_Uniform1uiEXT 860 +#define _gloffset_Uniform1uivEXT 861 +#define _gloffset_Uniform2uiEXT 862 +#define _gloffset_Uniform2uivEXT 863 +#define _gloffset_Uniform3uiEXT 864 +#define _gloffset_Uniform3uivEXT 865 +#define _gloffset_Uniform4uiEXT 866 +#define _gloffset_Uniform4uivEXT 867 +#define _gloffset_VertexAttribI1iEXT 868 +#define _gloffset_VertexAttribI1ivEXT 869 +#define _gloffset_VertexAttribI1uiEXT 870 +#define _gloffset_VertexAttribI1uivEXT 871 +#define _gloffset_VertexAttribI2iEXT 872 +#define _gloffset_VertexAttribI2ivEXT 873 +#define _gloffset_VertexAttribI2uiEXT 874 +#define _gloffset_VertexAttribI2uivEXT 875 +#define _gloffset_VertexAttribI3iEXT 876 +#define _gloffset_VertexAttribI3ivEXT 877 +#define _gloffset_VertexAttribI3uiEXT 878 +#define _gloffset_VertexAttribI3uivEXT 879 +#define _gloffset_VertexAttribI4bvEXT 880 +#define _gloffset_VertexAttribI4iEXT 881 +#define _gloffset_VertexAttribI4ivEXT 882 +#define _gloffset_VertexAttribI4svEXT 883 +#define _gloffset_VertexAttribI4ubvEXT 884 +#define _gloffset_VertexAttribI4uiEXT 885 +#define _gloffset_VertexAttribI4uivEXT 886 +#define _gloffset_VertexAttribI4usvEXT 887 +#define _gloffset_VertexAttribIPointerEXT 888 +#define _gloffset_FramebufferTextureLayerEXT 889 +#define _gloffset_ColorMaskIndexedEXT 890 +#define _gloffset_DisableIndexedEXT 891 +#define _gloffset_EnableIndexedEXT 892 +#define _gloffset_GetBooleanIndexedvEXT 893 +#define _gloffset_GetIntegerIndexedvEXT 894 +#define _gloffset_IsEnabledIndexedEXT 895 +#define _gloffset_ClearColorIiEXT 896 +#define _gloffset_ClearColorIuiEXT 897 +#define _gloffset_GetTexParameterIivEXT 898 +#define _gloffset_GetTexParameterIuivEXT 899 +#define _gloffset_TexParameterIivEXT 900 +#define _gloffset_TexParameterIuivEXT 901 +#define _gloffset_BeginConditionalRenderNV 902 +#define _gloffset_EndConditionalRenderNV 903 +#define _gloffset_BeginTransformFeedbackEXT 904 +#define _gloffset_BindBufferBaseEXT 905 +#define _gloffset_BindBufferOffsetEXT 906 +#define _gloffset_BindBufferRangeEXT 907 +#define _gloffset_EndTransformFeedbackEXT 908 +#define _gloffset_GetTransformFeedbackVaryingEXT 909 +#define _gloffset_TransformFeedbackVaryingsEXT 910 +#define _gloffset_ProvokingVertexEXT 911 +#define _gloffset_GetTexParameterPointervAPPLE 912 +#define _gloffset_TextureRangeAPPLE 913 +#define _gloffset_GetObjectParameterivAPPLE 914 +#define _gloffset_ObjectPurgeableAPPLE 915 +#define _gloffset_ObjectUnpurgeableAPPLE 916 +#define _gloffset_ActiveProgramEXT 917 +#define _gloffset_CreateShaderProgramEXT 918 +#define _gloffset_UseShaderProgramEXT 919 +#define _gloffset_TextureBarrierNV 920 +#define _gloffset_StencilFuncSeparateATI 921 +#define _gloffset_ProgramEnvParameters4fvEXT 922 +#define _gloffset_ProgramLocalParameters4fvEXT 923 +#define _gloffset_GetQueryObjecti64vEXT 924 +#define _gloffset_GetQueryObjectui64vEXT 925 +#define _gloffset_EGLImageTargetRenderbufferStorageOES 926 +#define _gloffset_EGLImageTargetTexture2DOES 927 + +#else /* !_GLAPI_USE_REMAP_TABLE */ + +#define driDispatchRemapTable_size 520 +extern int driDispatchRemapTable[ driDispatchRemapTable_size ]; + +#define AttachShader_remap_index 0 +#define CreateProgram_remap_index 1 +#define CreateShader_remap_index 2 +#define DeleteProgram_remap_index 3 +#define DeleteShader_remap_index 4 +#define DetachShader_remap_index 5 +#define GetAttachedShaders_remap_index 6 +#define GetProgramInfoLog_remap_index 7 +#define GetProgramiv_remap_index 8 +#define GetShaderInfoLog_remap_index 9 +#define GetShaderiv_remap_index 10 +#define IsProgram_remap_index 11 +#define IsShader_remap_index 12 +#define StencilFuncSeparate_remap_index 13 +#define StencilMaskSeparate_remap_index 14 +#define StencilOpSeparate_remap_index 15 +#define UniformMatrix2x3fv_remap_index 16 +#define UniformMatrix2x4fv_remap_index 17 +#define UniformMatrix3x2fv_remap_index 18 +#define UniformMatrix3x4fv_remap_index 19 +#define UniformMatrix4x2fv_remap_index 20 +#define UniformMatrix4x3fv_remap_index 21 +#define ClampColor_remap_index 22 +#define ClearBufferfi_remap_index 23 +#define ClearBufferfv_remap_index 24 +#define ClearBufferiv_remap_index 25 +#define ClearBufferuiv_remap_index 26 +#define GetStringi_remap_index 27 +#define TexBuffer_remap_index 28 +#define FramebufferTexture_remap_index 29 +#define GetBufferParameteri64v_remap_index 30 +#define GetInteger64i_v_remap_index 31 +#define VertexAttribDivisor_remap_index 32 +#define LoadTransposeMatrixdARB_remap_index 33 +#define LoadTransposeMatrixfARB_remap_index 34 +#define MultTransposeMatrixdARB_remap_index 35 +#define MultTransposeMatrixfARB_remap_index 36 +#define SampleCoverageARB_remap_index 37 +#define CompressedTexImage1DARB_remap_index 38 +#define CompressedTexImage2DARB_remap_index 39 +#define CompressedTexImage3DARB_remap_index 40 +#define CompressedTexSubImage1DARB_remap_index 41 +#define CompressedTexSubImage2DARB_remap_index 42 +#define CompressedTexSubImage3DARB_remap_index 43 +#define GetCompressedTexImageARB_remap_index 44 +#define DisableVertexAttribArrayARB_remap_index 45 +#define EnableVertexAttribArrayARB_remap_index 46 +#define GetProgramEnvParameterdvARB_remap_index 47 +#define GetProgramEnvParameterfvARB_remap_index 48 +#define GetProgramLocalParameterdvARB_remap_index 49 +#define GetProgramLocalParameterfvARB_remap_index 50 +#define GetProgramStringARB_remap_index 51 +#define GetProgramivARB_remap_index 52 +#define GetVertexAttribdvARB_remap_index 53 +#define GetVertexAttribfvARB_remap_index 54 +#define GetVertexAttribivARB_remap_index 55 +#define ProgramEnvParameter4dARB_remap_index 56 +#define ProgramEnvParameter4dvARB_remap_index 57 +#define ProgramEnvParameter4fARB_remap_index 58 +#define ProgramEnvParameter4fvARB_remap_index 59 +#define ProgramLocalParameter4dARB_remap_index 60 +#define ProgramLocalParameter4dvARB_remap_index 61 +#define ProgramLocalParameter4fARB_remap_index 62 +#define ProgramLocalParameter4fvARB_remap_index 63 +#define ProgramStringARB_remap_index 64 +#define VertexAttrib1dARB_remap_index 65 +#define VertexAttrib1dvARB_remap_index 66 +#define VertexAttrib1fARB_remap_index 67 +#define VertexAttrib1fvARB_remap_index 68 +#define VertexAttrib1sARB_remap_index 69 +#define VertexAttrib1svARB_remap_index 70 +#define VertexAttrib2dARB_remap_index 71 +#define VertexAttrib2dvARB_remap_index 72 +#define VertexAttrib2fARB_remap_index 73 +#define VertexAttrib2fvARB_remap_index 74 +#define VertexAttrib2sARB_remap_index 75 +#define VertexAttrib2svARB_remap_index 76 +#define VertexAttrib3dARB_remap_index 77 +#define VertexAttrib3dvARB_remap_index 78 +#define VertexAttrib3fARB_remap_index 79 +#define VertexAttrib3fvARB_remap_index 80 +#define VertexAttrib3sARB_remap_index 81 +#define VertexAttrib3svARB_remap_index 82 +#define VertexAttrib4NbvARB_remap_index 83 +#define VertexAttrib4NivARB_remap_index 84 +#define VertexAttrib4NsvARB_remap_index 85 +#define VertexAttrib4NubARB_remap_index 86 +#define VertexAttrib4NubvARB_remap_index 87 +#define VertexAttrib4NuivARB_remap_index 88 +#define VertexAttrib4NusvARB_remap_index 89 +#define VertexAttrib4bvARB_remap_index 90 +#define VertexAttrib4dARB_remap_index 91 +#define VertexAttrib4dvARB_remap_index 92 +#define VertexAttrib4fARB_remap_index 93 +#define VertexAttrib4fvARB_remap_index 94 +#define VertexAttrib4ivARB_remap_index 95 +#define VertexAttrib4sARB_remap_index 96 +#define VertexAttrib4svARB_remap_index 97 +#define VertexAttrib4ubvARB_remap_index 98 +#define VertexAttrib4uivARB_remap_index 99 +#define VertexAttrib4usvARB_remap_index 100 +#define VertexAttribPointerARB_remap_index 101 +#define BindBufferARB_remap_index 102 +#define BufferDataARB_remap_index 103 +#define BufferSubDataARB_remap_index 104 +#define DeleteBuffersARB_remap_index 105 +#define GenBuffersARB_remap_index 106 +#define GetBufferParameterivARB_remap_index 107 +#define GetBufferPointervARB_remap_index 108 +#define GetBufferSubDataARB_remap_index 109 +#define IsBufferARB_remap_index 110 +#define MapBufferARB_remap_index 111 +#define UnmapBufferARB_remap_index 112 +#define BeginQueryARB_remap_index 113 +#define DeleteQueriesARB_remap_index 114 +#define EndQueryARB_remap_index 115 +#define GenQueriesARB_remap_index 116 +#define GetQueryObjectivARB_remap_index 117 +#define GetQueryObjectuivARB_remap_index 118 +#define GetQueryivARB_remap_index 119 +#define IsQueryARB_remap_index 120 +#define AttachObjectARB_remap_index 121 +#define CompileShaderARB_remap_index 122 +#define CreateProgramObjectARB_remap_index 123 +#define CreateShaderObjectARB_remap_index 124 +#define DeleteObjectARB_remap_index 125 +#define DetachObjectARB_remap_index 126 +#define GetActiveUniformARB_remap_index 127 +#define GetAttachedObjectsARB_remap_index 128 +#define GetHandleARB_remap_index 129 +#define GetInfoLogARB_remap_index 130 +#define GetObjectParameterfvARB_remap_index 131 +#define GetObjectParameterivARB_remap_index 132 +#define GetShaderSourceARB_remap_index 133 +#define GetUniformLocationARB_remap_index 134 +#define GetUniformfvARB_remap_index 135 +#define GetUniformivARB_remap_index 136 +#define LinkProgramARB_remap_index 137 +#define ShaderSourceARB_remap_index 138 +#define Uniform1fARB_remap_index 139 +#define Uniform1fvARB_remap_index 140 +#define Uniform1iARB_remap_index 141 +#define Uniform1ivARB_remap_index 142 +#define Uniform2fARB_remap_index 143 +#define Uniform2fvARB_remap_index 144 +#define Uniform2iARB_remap_index 145 +#define Uniform2ivARB_remap_index 146 +#define Uniform3fARB_remap_index 147 +#define Uniform3fvARB_remap_index 148 +#define Uniform3iARB_remap_index 149 +#define Uniform3ivARB_remap_index 150 +#define Uniform4fARB_remap_index 151 +#define Uniform4fvARB_remap_index 152 +#define Uniform4iARB_remap_index 153 +#define Uniform4ivARB_remap_index 154 +#define UniformMatrix2fvARB_remap_index 155 +#define UniformMatrix3fvARB_remap_index 156 +#define UniformMatrix4fvARB_remap_index 157 +#define UseProgramObjectARB_remap_index 158 +#define ValidateProgramARB_remap_index 159 +#define BindAttribLocationARB_remap_index 160 +#define GetActiveAttribARB_remap_index 161 +#define GetAttribLocationARB_remap_index 162 +#define DrawBuffersARB_remap_index 163 +#define ClampColorARB_remap_index 164 +#define DrawArraysInstancedARB_remap_index 165 +#define DrawElementsInstancedARB_remap_index 166 +#define RenderbufferStorageMultisample_remap_index 167 +#define FramebufferTextureARB_remap_index 168 +#define FramebufferTextureFaceARB_remap_index 169 +#define ProgramParameteriARB_remap_index 170 +#define VertexAttribDivisorARB_remap_index 171 +#define FlushMappedBufferRange_remap_index 172 +#define MapBufferRange_remap_index 173 +#define TexBufferARB_remap_index 174 +#define BindVertexArray_remap_index 175 +#define GenVertexArrays_remap_index 176 +#define CopyBufferSubData_remap_index 177 +#define ClientWaitSync_remap_index 178 +#define DeleteSync_remap_index 179 +#define FenceSync_remap_index 180 +#define GetInteger64v_remap_index 181 +#define GetSynciv_remap_index 182 +#define IsSync_remap_index 183 +#define WaitSync_remap_index 184 +#define DrawElementsBaseVertex_remap_index 185 +#define DrawRangeElementsBaseVertex_remap_index 186 +#define MultiDrawElementsBaseVertex_remap_index 187 +#define BlendEquationSeparateiARB_remap_index 188 +#define BlendEquationiARB_remap_index 189 +#define BlendFuncSeparateiARB_remap_index 190 +#define BlendFunciARB_remap_index 191 +#define BindSampler_remap_index 192 +#define DeleteSamplers_remap_index 193 +#define GenSamplers_remap_index 194 +#define GetSamplerParameterIiv_remap_index 195 +#define GetSamplerParameterIuiv_remap_index 196 +#define GetSamplerParameterfv_remap_index 197 +#define GetSamplerParameteriv_remap_index 198 +#define IsSampler_remap_index 199 +#define SamplerParameterIiv_remap_index 200 +#define SamplerParameterIuiv_remap_index 201 +#define SamplerParameterf_remap_index 202 +#define SamplerParameterfv_remap_index 203 +#define SamplerParameteri_remap_index 204 +#define SamplerParameteriv_remap_index 205 +#define BindTransformFeedback_remap_index 206 +#define DeleteTransformFeedbacks_remap_index 207 +#define DrawTransformFeedback_remap_index 208 +#define GenTransformFeedbacks_remap_index 209 +#define IsTransformFeedback_remap_index 210 +#define PauseTransformFeedback_remap_index 211 +#define ResumeTransformFeedback_remap_index 212 +#define ClearDepthf_remap_index 213 +#define DepthRangef_remap_index 214 +#define GetShaderPrecisionFormat_remap_index 215 +#define ReleaseShaderCompiler_remap_index 216 +#define ShaderBinary_remap_index 217 +#define GetGraphicsResetStatusARB_remap_index 218 +#define GetnColorTableARB_remap_index 219 +#define GetnCompressedTexImageARB_remap_index 220 +#define GetnConvolutionFilterARB_remap_index 221 +#define GetnHistogramARB_remap_index 222 +#define GetnMapdvARB_remap_index 223 +#define GetnMapfvARB_remap_index 224 +#define GetnMapivARB_remap_index 225 +#define GetnMinmaxARB_remap_index 226 +#define GetnPixelMapfvARB_remap_index 227 +#define GetnPixelMapuivARB_remap_index 228 +#define GetnPixelMapusvARB_remap_index 229 +#define GetnPolygonStippleARB_remap_index 230 +#define GetnSeparableFilterARB_remap_index 231 +#define GetnTexImageARB_remap_index 232 +#define GetnUniformdvARB_remap_index 233 +#define GetnUniformfvARB_remap_index 234 +#define GetnUniformivARB_remap_index 235 +#define GetnUniformuivARB_remap_index 236 +#define ReadnPixelsARB_remap_index 237 +#define PolygonOffsetEXT_remap_index 238 +#define GetPixelTexGenParameterfvSGIS_remap_index 239 +#define GetPixelTexGenParameterivSGIS_remap_index 240 +#define PixelTexGenParameterfSGIS_remap_index 241 +#define PixelTexGenParameterfvSGIS_remap_index 242 +#define PixelTexGenParameteriSGIS_remap_index 243 +#define PixelTexGenParameterivSGIS_remap_index 244 +#define SampleMaskSGIS_remap_index 245 +#define SamplePatternSGIS_remap_index 246 +#define ColorPointerEXT_remap_index 247 +#define EdgeFlagPointerEXT_remap_index 248 +#define IndexPointerEXT_remap_index 249 +#define NormalPointerEXT_remap_index 250 +#define TexCoordPointerEXT_remap_index 251 +#define VertexPointerEXT_remap_index 252 +#define PointParameterfEXT_remap_index 253 +#define PointParameterfvEXT_remap_index 254 +#define LockArraysEXT_remap_index 255 +#define UnlockArraysEXT_remap_index 256 +#define SecondaryColor3bEXT_remap_index 257 +#define SecondaryColor3bvEXT_remap_index 258 +#define SecondaryColor3dEXT_remap_index 259 +#define SecondaryColor3dvEXT_remap_index 260 +#define SecondaryColor3fEXT_remap_index 261 +#define SecondaryColor3fvEXT_remap_index 262 +#define SecondaryColor3iEXT_remap_index 263 +#define SecondaryColor3ivEXT_remap_index 264 +#define SecondaryColor3sEXT_remap_index 265 +#define SecondaryColor3svEXT_remap_index 266 +#define SecondaryColor3ubEXT_remap_index 267 +#define SecondaryColor3ubvEXT_remap_index 268 +#define SecondaryColor3uiEXT_remap_index 269 +#define SecondaryColor3uivEXT_remap_index 270 +#define SecondaryColor3usEXT_remap_index 271 +#define SecondaryColor3usvEXT_remap_index 272 +#define SecondaryColorPointerEXT_remap_index 273 +#define MultiDrawArraysEXT_remap_index 274 +#define MultiDrawElementsEXT_remap_index 275 +#define FogCoordPointerEXT_remap_index 276 +#define FogCoorddEXT_remap_index 277 +#define FogCoorddvEXT_remap_index 278 +#define FogCoordfEXT_remap_index 279 +#define FogCoordfvEXT_remap_index 280 +#define PixelTexGenSGIX_remap_index 281 +#define BlendFuncSeparateEXT_remap_index 282 +#define FlushVertexArrayRangeNV_remap_index 283 +#define VertexArrayRangeNV_remap_index 284 +#define CombinerInputNV_remap_index 285 +#define CombinerOutputNV_remap_index 286 +#define CombinerParameterfNV_remap_index 287 +#define CombinerParameterfvNV_remap_index 288 +#define CombinerParameteriNV_remap_index 289 +#define CombinerParameterivNV_remap_index 290 +#define FinalCombinerInputNV_remap_index 291 +#define GetCombinerInputParameterfvNV_remap_index 292 +#define GetCombinerInputParameterivNV_remap_index 293 +#define GetCombinerOutputParameterfvNV_remap_index 294 +#define GetCombinerOutputParameterivNV_remap_index 295 +#define GetFinalCombinerInputParameterfvNV_remap_index 296 +#define GetFinalCombinerInputParameterivNV_remap_index 297 +#define ResizeBuffersMESA_remap_index 298 +#define WindowPos2dMESA_remap_index 299 +#define WindowPos2dvMESA_remap_index 300 +#define WindowPos2fMESA_remap_index 301 +#define WindowPos2fvMESA_remap_index 302 +#define WindowPos2iMESA_remap_index 303 +#define WindowPos2ivMESA_remap_index 304 +#define WindowPos2sMESA_remap_index 305 +#define WindowPos2svMESA_remap_index 306 +#define WindowPos3dMESA_remap_index 307 +#define WindowPos3dvMESA_remap_index 308 +#define WindowPos3fMESA_remap_index 309 +#define WindowPos3fvMESA_remap_index 310 +#define WindowPos3iMESA_remap_index 311 +#define WindowPos3ivMESA_remap_index 312 +#define WindowPos3sMESA_remap_index 313 +#define WindowPos3svMESA_remap_index 314 +#define WindowPos4dMESA_remap_index 315 +#define WindowPos4dvMESA_remap_index 316 +#define WindowPos4fMESA_remap_index 317 +#define WindowPos4fvMESA_remap_index 318 +#define WindowPos4iMESA_remap_index 319 +#define WindowPos4ivMESA_remap_index 320 +#define WindowPos4sMESA_remap_index 321 +#define WindowPos4svMESA_remap_index 322 +#define MultiModeDrawArraysIBM_remap_index 323 +#define MultiModeDrawElementsIBM_remap_index 324 +#define DeleteFencesNV_remap_index 325 +#define FinishFenceNV_remap_index 326 +#define GenFencesNV_remap_index 327 +#define GetFenceivNV_remap_index 328 +#define IsFenceNV_remap_index 329 +#define SetFenceNV_remap_index 330 +#define TestFenceNV_remap_index 331 +#define AreProgramsResidentNV_remap_index 332 +#define BindProgramNV_remap_index 333 +#define DeleteProgramsNV_remap_index 334 +#define ExecuteProgramNV_remap_index 335 +#define GenProgramsNV_remap_index 336 +#define GetProgramParameterdvNV_remap_index 337 +#define GetProgramParameterfvNV_remap_index 338 +#define GetProgramStringNV_remap_index 339 +#define GetProgramivNV_remap_index 340 +#define GetTrackMatrixivNV_remap_index 341 +#define GetVertexAttribPointervNV_remap_index 342 +#define GetVertexAttribdvNV_remap_index 343 +#define GetVertexAttribfvNV_remap_index 344 +#define GetVertexAttribivNV_remap_index 345 +#define IsProgramNV_remap_index 346 +#define LoadProgramNV_remap_index 347 +#define ProgramParameters4dvNV_remap_index 348 +#define ProgramParameters4fvNV_remap_index 349 +#define RequestResidentProgramsNV_remap_index 350 +#define TrackMatrixNV_remap_index 351 +#define VertexAttrib1dNV_remap_index 352 +#define VertexAttrib1dvNV_remap_index 353 +#define VertexAttrib1fNV_remap_index 354 +#define VertexAttrib1fvNV_remap_index 355 +#define VertexAttrib1sNV_remap_index 356 +#define VertexAttrib1svNV_remap_index 357 +#define VertexAttrib2dNV_remap_index 358 +#define VertexAttrib2dvNV_remap_index 359 +#define VertexAttrib2fNV_remap_index 360 +#define VertexAttrib2fvNV_remap_index 361 +#define VertexAttrib2sNV_remap_index 362 +#define VertexAttrib2svNV_remap_index 363 +#define VertexAttrib3dNV_remap_index 364 +#define VertexAttrib3dvNV_remap_index 365 +#define VertexAttrib3fNV_remap_index 366 +#define VertexAttrib3fvNV_remap_index 367 +#define VertexAttrib3sNV_remap_index 368 +#define VertexAttrib3svNV_remap_index 369 +#define VertexAttrib4dNV_remap_index 370 +#define VertexAttrib4dvNV_remap_index 371 +#define VertexAttrib4fNV_remap_index 372 +#define VertexAttrib4fvNV_remap_index 373 +#define VertexAttrib4sNV_remap_index 374 +#define VertexAttrib4svNV_remap_index 375 +#define VertexAttrib4ubNV_remap_index 376 +#define VertexAttrib4ubvNV_remap_index 377 +#define VertexAttribPointerNV_remap_index 378 +#define VertexAttribs1dvNV_remap_index 379 +#define VertexAttribs1fvNV_remap_index 380 +#define VertexAttribs1svNV_remap_index 381 +#define VertexAttribs2dvNV_remap_index 382 +#define VertexAttribs2fvNV_remap_index 383 +#define VertexAttribs2svNV_remap_index 384 +#define VertexAttribs3dvNV_remap_index 385 +#define VertexAttribs3fvNV_remap_index 386 +#define VertexAttribs3svNV_remap_index 387 +#define VertexAttribs4dvNV_remap_index 388 +#define VertexAttribs4fvNV_remap_index 389 +#define VertexAttribs4svNV_remap_index 390 +#define VertexAttribs4ubvNV_remap_index 391 +#define GetTexBumpParameterfvATI_remap_index 392 +#define GetTexBumpParameterivATI_remap_index 393 +#define TexBumpParameterfvATI_remap_index 394 +#define TexBumpParameterivATI_remap_index 395 +#define AlphaFragmentOp1ATI_remap_index 396 +#define AlphaFragmentOp2ATI_remap_index 397 +#define AlphaFragmentOp3ATI_remap_index 398 +#define BeginFragmentShaderATI_remap_index 399 +#define BindFragmentShaderATI_remap_index 400 +#define ColorFragmentOp1ATI_remap_index 401 +#define ColorFragmentOp2ATI_remap_index 402 +#define ColorFragmentOp3ATI_remap_index 403 +#define DeleteFragmentShaderATI_remap_index 404 +#define EndFragmentShaderATI_remap_index 405 +#define GenFragmentShadersATI_remap_index 406 +#define PassTexCoordATI_remap_index 407 +#define SampleMapATI_remap_index 408 +#define SetFragmentShaderConstantATI_remap_index 409 +#define PointParameteriNV_remap_index 410 +#define PointParameterivNV_remap_index 411 +#define ActiveStencilFaceEXT_remap_index 412 +#define BindVertexArrayAPPLE_remap_index 413 +#define DeleteVertexArraysAPPLE_remap_index 414 +#define GenVertexArraysAPPLE_remap_index 415 +#define IsVertexArrayAPPLE_remap_index 416 +#define GetProgramNamedParameterdvNV_remap_index 417 +#define GetProgramNamedParameterfvNV_remap_index 418 +#define ProgramNamedParameter4dNV_remap_index 419 +#define ProgramNamedParameter4dvNV_remap_index 420 +#define ProgramNamedParameter4fNV_remap_index 421 +#define ProgramNamedParameter4fvNV_remap_index 422 +#define PrimitiveRestartIndexNV_remap_index 423 +#define PrimitiveRestartNV_remap_index 424 +#define DepthBoundsEXT_remap_index 425 +#define BlendEquationSeparateEXT_remap_index 426 +#define BindFramebufferEXT_remap_index 427 +#define BindRenderbufferEXT_remap_index 428 +#define CheckFramebufferStatusEXT_remap_index 429 +#define DeleteFramebuffersEXT_remap_index 430 +#define DeleteRenderbuffersEXT_remap_index 431 +#define FramebufferRenderbufferEXT_remap_index 432 +#define FramebufferTexture1DEXT_remap_index 433 +#define FramebufferTexture2DEXT_remap_index 434 +#define FramebufferTexture3DEXT_remap_index 435 +#define GenFramebuffersEXT_remap_index 436 +#define GenRenderbuffersEXT_remap_index 437 +#define GenerateMipmapEXT_remap_index 438 +#define GetFramebufferAttachmentParameterivEXT_remap_index 439 +#define GetRenderbufferParameterivEXT_remap_index 440 +#define IsFramebufferEXT_remap_index 441 +#define IsRenderbufferEXT_remap_index 442 +#define RenderbufferStorageEXT_remap_index 443 +#define BlitFramebufferEXT_remap_index 444 +#define BufferParameteriAPPLE_remap_index 445 +#define FlushMappedBufferRangeAPPLE_remap_index 446 +#define BindFragDataLocationEXT_remap_index 447 +#define GetFragDataLocationEXT_remap_index 448 +#define GetUniformuivEXT_remap_index 449 +#define GetVertexAttribIivEXT_remap_index 450 +#define GetVertexAttribIuivEXT_remap_index 451 +#define Uniform1uiEXT_remap_index 452 +#define Uniform1uivEXT_remap_index 453 +#define Uniform2uiEXT_remap_index 454 +#define Uniform2uivEXT_remap_index 455 +#define Uniform3uiEXT_remap_index 456 +#define Uniform3uivEXT_remap_index 457 +#define Uniform4uiEXT_remap_index 458 +#define Uniform4uivEXT_remap_index 459 +#define VertexAttribI1iEXT_remap_index 460 +#define VertexAttribI1ivEXT_remap_index 461 +#define VertexAttribI1uiEXT_remap_index 462 +#define VertexAttribI1uivEXT_remap_index 463 +#define VertexAttribI2iEXT_remap_index 464 +#define VertexAttribI2ivEXT_remap_index 465 +#define VertexAttribI2uiEXT_remap_index 466 +#define VertexAttribI2uivEXT_remap_index 467 +#define VertexAttribI3iEXT_remap_index 468 +#define VertexAttribI3ivEXT_remap_index 469 +#define VertexAttribI3uiEXT_remap_index 470 +#define VertexAttribI3uivEXT_remap_index 471 +#define VertexAttribI4bvEXT_remap_index 472 +#define VertexAttribI4iEXT_remap_index 473 +#define VertexAttribI4ivEXT_remap_index 474 +#define VertexAttribI4svEXT_remap_index 475 +#define VertexAttribI4ubvEXT_remap_index 476 +#define VertexAttribI4uiEXT_remap_index 477 +#define VertexAttribI4uivEXT_remap_index 478 +#define VertexAttribI4usvEXT_remap_index 479 +#define VertexAttribIPointerEXT_remap_index 480 +#define FramebufferTextureLayerEXT_remap_index 481 +#define ColorMaskIndexedEXT_remap_index 482 +#define DisableIndexedEXT_remap_index 483 +#define EnableIndexedEXT_remap_index 484 +#define GetBooleanIndexedvEXT_remap_index 485 +#define GetIntegerIndexedvEXT_remap_index 486 +#define IsEnabledIndexedEXT_remap_index 487 +#define ClearColorIiEXT_remap_index 488 +#define ClearColorIuiEXT_remap_index 489 +#define GetTexParameterIivEXT_remap_index 490 +#define GetTexParameterIuivEXT_remap_index 491 +#define TexParameterIivEXT_remap_index 492 +#define TexParameterIuivEXT_remap_index 493 +#define BeginConditionalRenderNV_remap_index 494 +#define EndConditionalRenderNV_remap_index 495 +#define BeginTransformFeedbackEXT_remap_index 496 +#define BindBufferBaseEXT_remap_index 497 +#define BindBufferOffsetEXT_remap_index 498 +#define BindBufferRangeEXT_remap_index 499 +#define EndTransformFeedbackEXT_remap_index 500 +#define GetTransformFeedbackVaryingEXT_remap_index 501 +#define TransformFeedbackVaryingsEXT_remap_index 502 +#define ProvokingVertexEXT_remap_index 503 +#define GetTexParameterPointervAPPLE_remap_index 504 +#define TextureRangeAPPLE_remap_index 505 +#define GetObjectParameterivAPPLE_remap_index 506 +#define ObjectPurgeableAPPLE_remap_index 507 +#define ObjectUnpurgeableAPPLE_remap_index 508 +#define ActiveProgramEXT_remap_index 509 +#define CreateShaderProgramEXT_remap_index 510 +#define UseShaderProgramEXT_remap_index 511 +#define TextureBarrierNV_remap_index 512 +#define StencilFuncSeparateATI_remap_index 513 +#define ProgramEnvParameters4fvEXT_remap_index 514 +#define ProgramLocalParameters4fvEXT_remap_index 515 +#define GetQueryObjecti64vEXT_remap_index 516 +#define GetQueryObjectui64vEXT_remap_index 517 +#define EGLImageTargetRenderbufferStorageOES_remap_index 518 +#define EGLImageTargetTexture2DOES_remap_index 519 + +#define _gloffset_AttachShader driDispatchRemapTable[AttachShader_remap_index] +#define _gloffset_CreateProgram driDispatchRemapTable[CreateProgram_remap_index] +#define _gloffset_CreateShader driDispatchRemapTable[CreateShader_remap_index] +#define _gloffset_DeleteProgram driDispatchRemapTable[DeleteProgram_remap_index] +#define _gloffset_DeleteShader driDispatchRemapTable[DeleteShader_remap_index] +#define _gloffset_DetachShader driDispatchRemapTable[DetachShader_remap_index] +#define _gloffset_GetAttachedShaders driDispatchRemapTable[GetAttachedShaders_remap_index] +#define _gloffset_GetProgramInfoLog driDispatchRemapTable[GetProgramInfoLog_remap_index] +#define _gloffset_GetProgramiv driDispatchRemapTable[GetProgramiv_remap_index] +#define _gloffset_GetShaderInfoLog driDispatchRemapTable[GetShaderInfoLog_remap_index] +#define _gloffset_GetShaderiv driDispatchRemapTable[GetShaderiv_remap_index] +#define _gloffset_IsProgram driDispatchRemapTable[IsProgram_remap_index] +#define _gloffset_IsShader driDispatchRemapTable[IsShader_remap_index] +#define _gloffset_StencilFuncSeparate driDispatchRemapTable[StencilFuncSeparate_remap_index] +#define _gloffset_StencilMaskSeparate driDispatchRemapTable[StencilMaskSeparate_remap_index] +#define _gloffset_StencilOpSeparate driDispatchRemapTable[StencilOpSeparate_remap_index] +#define _gloffset_UniformMatrix2x3fv driDispatchRemapTable[UniformMatrix2x3fv_remap_index] +#define _gloffset_UniformMatrix2x4fv driDispatchRemapTable[UniformMatrix2x4fv_remap_index] +#define _gloffset_UniformMatrix3x2fv driDispatchRemapTable[UniformMatrix3x2fv_remap_index] +#define _gloffset_UniformMatrix3x4fv driDispatchRemapTable[UniformMatrix3x4fv_remap_index] +#define _gloffset_UniformMatrix4x2fv driDispatchRemapTable[UniformMatrix4x2fv_remap_index] +#define _gloffset_UniformMatrix4x3fv driDispatchRemapTable[UniformMatrix4x3fv_remap_index] +#define _gloffset_ClampColor driDispatchRemapTable[ClampColor_remap_index] +#define _gloffset_ClearBufferfi driDispatchRemapTable[ClearBufferfi_remap_index] +#define _gloffset_ClearBufferfv driDispatchRemapTable[ClearBufferfv_remap_index] +#define _gloffset_ClearBufferiv driDispatchRemapTable[ClearBufferiv_remap_index] +#define _gloffset_ClearBufferuiv driDispatchRemapTable[ClearBufferuiv_remap_index] +#define _gloffset_GetStringi driDispatchRemapTable[GetStringi_remap_index] +#define _gloffset_TexBuffer driDispatchRemapTable[TexBuffer_remap_index] +#define _gloffset_FramebufferTexture driDispatchRemapTable[FramebufferTexture_remap_index] +#define _gloffset_GetBufferParameteri64v driDispatchRemapTable[GetBufferParameteri64v_remap_index] +#define _gloffset_GetInteger64i_v driDispatchRemapTable[GetInteger64i_v_remap_index] +#define _gloffset_VertexAttribDivisor driDispatchRemapTable[VertexAttribDivisor_remap_index] +#define _gloffset_LoadTransposeMatrixdARB driDispatchRemapTable[LoadTransposeMatrixdARB_remap_index] +#define _gloffset_LoadTransposeMatrixfARB driDispatchRemapTable[LoadTransposeMatrixfARB_remap_index] +#define _gloffset_MultTransposeMatrixdARB driDispatchRemapTable[MultTransposeMatrixdARB_remap_index] +#define _gloffset_MultTransposeMatrixfARB driDispatchRemapTable[MultTransposeMatrixfARB_remap_index] +#define _gloffset_SampleCoverageARB driDispatchRemapTable[SampleCoverageARB_remap_index] +#define _gloffset_CompressedTexImage1DARB driDispatchRemapTable[CompressedTexImage1DARB_remap_index] +#define _gloffset_CompressedTexImage2DARB driDispatchRemapTable[CompressedTexImage2DARB_remap_index] +#define _gloffset_CompressedTexImage3DARB driDispatchRemapTable[CompressedTexImage3DARB_remap_index] +#define _gloffset_CompressedTexSubImage1DARB driDispatchRemapTable[CompressedTexSubImage1DARB_remap_index] +#define _gloffset_CompressedTexSubImage2DARB driDispatchRemapTable[CompressedTexSubImage2DARB_remap_index] +#define _gloffset_CompressedTexSubImage3DARB driDispatchRemapTable[CompressedTexSubImage3DARB_remap_index] +#define _gloffset_GetCompressedTexImageARB driDispatchRemapTable[GetCompressedTexImageARB_remap_index] +#define _gloffset_DisableVertexAttribArrayARB driDispatchRemapTable[DisableVertexAttribArrayARB_remap_index] +#define _gloffset_EnableVertexAttribArrayARB driDispatchRemapTable[EnableVertexAttribArrayARB_remap_index] +#define _gloffset_GetProgramEnvParameterdvARB driDispatchRemapTable[GetProgramEnvParameterdvARB_remap_index] +#define _gloffset_GetProgramEnvParameterfvARB driDispatchRemapTable[GetProgramEnvParameterfvARB_remap_index] +#define _gloffset_GetProgramLocalParameterdvARB driDispatchRemapTable[GetProgramLocalParameterdvARB_remap_index] +#define _gloffset_GetProgramLocalParameterfvARB driDispatchRemapTable[GetProgramLocalParameterfvARB_remap_index] +#define _gloffset_GetProgramStringARB driDispatchRemapTable[GetProgramStringARB_remap_index] +#define _gloffset_GetProgramivARB driDispatchRemapTable[GetProgramivARB_remap_index] +#define _gloffset_GetVertexAttribdvARB driDispatchRemapTable[GetVertexAttribdvARB_remap_index] +#define _gloffset_GetVertexAttribfvARB driDispatchRemapTable[GetVertexAttribfvARB_remap_index] +#define _gloffset_GetVertexAttribivARB driDispatchRemapTable[GetVertexAttribivARB_remap_index] +#define _gloffset_ProgramEnvParameter4dARB driDispatchRemapTable[ProgramEnvParameter4dARB_remap_index] +#define _gloffset_ProgramEnvParameter4dvARB driDispatchRemapTable[ProgramEnvParameter4dvARB_remap_index] +#define _gloffset_ProgramEnvParameter4fARB driDispatchRemapTable[ProgramEnvParameter4fARB_remap_index] +#define _gloffset_ProgramEnvParameter4fvARB driDispatchRemapTable[ProgramEnvParameter4fvARB_remap_index] +#define _gloffset_ProgramLocalParameter4dARB driDispatchRemapTable[ProgramLocalParameter4dARB_remap_index] +#define _gloffset_ProgramLocalParameter4dvARB driDispatchRemapTable[ProgramLocalParameter4dvARB_remap_index] +#define _gloffset_ProgramLocalParameter4fARB driDispatchRemapTable[ProgramLocalParameter4fARB_remap_index] +#define _gloffset_ProgramLocalParameter4fvARB driDispatchRemapTable[ProgramLocalParameter4fvARB_remap_index] +#define _gloffset_ProgramStringARB driDispatchRemapTable[ProgramStringARB_remap_index] +#define _gloffset_VertexAttrib1dARB driDispatchRemapTable[VertexAttrib1dARB_remap_index] +#define _gloffset_VertexAttrib1dvARB driDispatchRemapTable[VertexAttrib1dvARB_remap_index] +#define _gloffset_VertexAttrib1fARB driDispatchRemapTable[VertexAttrib1fARB_remap_index] +#define _gloffset_VertexAttrib1fvARB driDispatchRemapTable[VertexAttrib1fvARB_remap_index] +#define _gloffset_VertexAttrib1sARB driDispatchRemapTable[VertexAttrib1sARB_remap_index] +#define _gloffset_VertexAttrib1svARB driDispatchRemapTable[VertexAttrib1svARB_remap_index] +#define _gloffset_VertexAttrib2dARB driDispatchRemapTable[VertexAttrib2dARB_remap_index] +#define _gloffset_VertexAttrib2dvARB driDispatchRemapTable[VertexAttrib2dvARB_remap_index] +#define _gloffset_VertexAttrib2fARB driDispatchRemapTable[VertexAttrib2fARB_remap_index] +#define _gloffset_VertexAttrib2fvARB driDispatchRemapTable[VertexAttrib2fvARB_remap_index] +#define _gloffset_VertexAttrib2sARB driDispatchRemapTable[VertexAttrib2sARB_remap_index] +#define _gloffset_VertexAttrib2svARB driDispatchRemapTable[VertexAttrib2svARB_remap_index] +#define _gloffset_VertexAttrib3dARB driDispatchRemapTable[VertexAttrib3dARB_remap_index] +#define _gloffset_VertexAttrib3dvARB driDispatchRemapTable[VertexAttrib3dvARB_remap_index] +#define _gloffset_VertexAttrib3fARB driDispatchRemapTable[VertexAttrib3fARB_remap_index] +#define _gloffset_VertexAttrib3fvARB driDispatchRemapTable[VertexAttrib3fvARB_remap_index] +#define _gloffset_VertexAttrib3sARB driDispatchRemapTable[VertexAttrib3sARB_remap_index] +#define _gloffset_VertexAttrib3svARB driDispatchRemapTable[VertexAttrib3svARB_remap_index] +#define _gloffset_VertexAttrib4NbvARB driDispatchRemapTable[VertexAttrib4NbvARB_remap_index] +#define _gloffset_VertexAttrib4NivARB driDispatchRemapTable[VertexAttrib4NivARB_remap_index] +#define _gloffset_VertexAttrib4NsvARB driDispatchRemapTable[VertexAttrib4NsvARB_remap_index] +#define _gloffset_VertexAttrib4NubARB driDispatchRemapTable[VertexAttrib4NubARB_remap_index] +#define _gloffset_VertexAttrib4NubvARB driDispatchRemapTable[VertexAttrib4NubvARB_remap_index] +#define _gloffset_VertexAttrib4NuivARB driDispatchRemapTable[VertexAttrib4NuivARB_remap_index] +#define _gloffset_VertexAttrib4NusvARB driDispatchRemapTable[VertexAttrib4NusvARB_remap_index] +#define _gloffset_VertexAttrib4bvARB driDispatchRemapTable[VertexAttrib4bvARB_remap_index] +#define _gloffset_VertexAttrib4dARB driDispatchRemapTable[VertexAttrib4dARB_remap_index] +#define _gloffset_VertexAttrib4dvARB driDispatchRemapTable[VertexAttrib4dvARB_remap_index] +#define _gloffset_VertexAttrib4fARB driDispatchRemapTable[VertexAttrib4fARB_remap_index] +#define _gloffset_VertexAttrib4fvARB driDispatchRemapTable[VertexAttrib4fvARB_remap_index] +#define _gloffset_VertexAttrib4ivARB driDispatchRemapTable[VertexAttrib4ivARB_remap_index] +#define _gloffset_VertexAttrib4sARB driDispatchRemapTable[VertexAttrib4sARB_remap_index] +#define _gloffset_VertexAttrib4svARB driDispatchRemapTable[VertexAttrib4svARB_remap_index] +#define _gloffset_VertexAttrib4ubvARB driDispatchRemapTable[VertexAttrib4ubvARB_remap_index] +#define _gloffset_VertexAttrib4uivARB driDispatchRemapTable[VertexAttrib4uivARB_remap_index] +#define _gloffset_VertexAttrib4usvARB driDispatchRemapTable[VertexAttrib4usvARB_remap_index] +#define _gloffset_VertexAttribPointerARB driDispatchRemapTable[VertexAttribPointerARB_remap_index] +#define _gloffset_BindBufferARB driDispatchRemapTable[BindBufferARB_remap_index] +#define _gloffset_BufferDataARB driDispatchRemapTable[BufferDataARB_remap_index] +#define _gloffset_BufferSubDataARB driDispatchRemapTable[BufferSubDataARB_remap_index] +#define _gloffset_DeleteBuffersARB driDispatchRemapTable[DeleteBuffersARB_remap_index] +#define _gloffset_GenBuffersARB driDispatchRemapTable[GenBuffersARB_remap_index] +#define _gloffset_GetBufferParameterivARB driDispatchRemapTable[GetBufferParameterivARB_remap_index] +#define _gloffset_GetBufferPointervARB driDispatchRemapTable[GetBufferPointervARB_remap_index] +#define _gloffset_GetBufferSubDataARB driDispatchRemapTable[GetBufferSubDataARB_remap_index] +#define _gloffset_IsBufferARB driDispatchRemapTable[IsBufferARB_remap_index] +#define _gloffset_MapBufferARB driDispatchRemapTable[MapBufferARB_remap_index] +#define _gloffset_UnmapBufferARB driDispatchRemapTable[UnmapBufferARB_remap_index] +#define _gloffset_BeginQueryARB driDispatchRemapTable[BeginQueryARB_remap_index] +#define _gloffset_DeleteQueriesARB driDispatchRemapTable[DeleteQueriesARB_remap_index] +#define _gloffset_EndQueryARB driDispatchRemapTable[EndQueryARB_remap_index] +#define _gloffset_GenQueriesARB driDispatchRemapTable[GenQueriesARB_remap_index] +#define _gloffset_GetQueryObjectivARB driDispatchRemapTable[GetQueryObjectivARB_remap_index] +#define _gloffset_GetQueryObjectuivARB driDispatchRemapTable[GetQueryObjectuivARB_remap_index] +#define _gloffset_GetQueryivARB driDispatchRemapTable[GetQueryivARB_remap_index] +#define _gloffset_IsQueryARB driDispatchRemapTable[IsQueryARB_remap_index] +#define _gloffset_AttachObjectARB driDispatchRemapTable[AttachObjectARB_remap_index] +#define _gloffset_CompileShaderARB driDispatchRemapTable[CompileShaderARB_remap_index] +#define _gloffset_CreateProgramObjectARB driDispatchRemapTable[CreateProgramObjectARB_remap_index] +#define _gloffset_CreateShaderObjectARB driDispatchRemapTable[CreateShaderObjectARB_remap_index] +#define _gloffset_DeleteObjectARB driDispatchRemapTable[DeleteObjectARB_remap_index] +#define _gloffset_DetachObjectARB driDispatchRemapTable[DetachObjectARB_remap_index] +#define _gloffset_GetActiveUniformARB driDispatchRemapTable[GetActiveUniformARB_remap_index] +#define _gloffset_GetAttachedObjectsARB driDispatchRemapTable[GetAttachedObjectsARB_remap_index] +#define _gloffset_GetHandleARB driDispatchRemapTable[GetHandleARB_remap_index] +#define _gloffset_GetInfoLogARB driDispatchRemapTable[GetInfoLogARB_remap_index] +#define _gloffset_GetObjectParameterfvARB driDispatchRemapTable[GetObjectParameterfvARB_remap_index] +#define _gloffset_GetObjectParameterivARB driDispatchRemapTable[GetObjectParameterivARB_remap_index] +#define _gloffset_GetShaderSourceARB driDispatchRemapTable[GetShaderSourceARB_remap_index] +#define _gloffset_GetUniformLocationARB driDispatchRemapTable[GetUniformLocationARB_remap_index] +#define _gloffset_GetUniformfvARB driDispatchRemapTable[GetUniformfvARB_remap_index] +#define _gloffset_GetUniformivARB driDispatchRemapTable[GetUniformivARB_remap_index] +#define _gloffset_LinkProgramARB driDispatchRemapTable[LinkProgramARB_remap_index] +#define _gloffset_ShaderSourceARB driDispatchRemapTable[ShaderSourceARB_remap_index] +#define _gloffset_Uniform1fARB driDispatchRemapTable[Uniform1fARB_remap_index] +#define _gloffset_Uniform1fvARB driDispatchRemapTable[Uniform1fvARB_remap_index] +#define _gloffset_Uniform1iARB driDispatchRemapTable[Uniform1iARB_remap_index] +#define _gloffset_Uniform1ivARB driDispatchRemapTable[Uniform1ivARB_remap_index] +#define _gloffset_Uniform2fARB driDispatchRemapTable[Uniform2fARB_remap_index] +#define _gloffset_Uniform2fvARB driDispatchRemapTable[Uniform2fvARB_remap_index] +#define _gloffset_Uniform2iARB driDispatchRemapTable[Uniform2iARB_remap_index] +#define _gloffset_Uniform2ivARB driDispatchRemapTable[Uniform2ivARB_remap_index] +#define _gloffset_Uniform3fARB driDispatchRemapTable[Uniform3fARB_remap_index] +#define _gloffset_Uniform3fvARB driDispatchRemapTable[Uniform3fvARB_remap_index] +#define _gloffset_Uniform3iARB driDispatchRemapTable[Uniform3iARB_remap_index] +#define _gloffset_Uniform3ivARB driDispatchRemapTable[Uniform3ivARB_remap_index] +#define _gloffset_Uniform4fARB driDispatchRemapTable[Uniform4fARB_remap_index] +#define _gloffset_Uniform4fvARB driDispatchRemapTable[Uniform4fvARB_remap_index] +#define _gloffset_Uniform4iARB driDispatchRemapTable[Uniform4iARB_remap_index] +#define _gloffset_Uniform4ivARB driDispatchRemapTable[Uniform4ivARB_remap_index] +#define _gloffset_UniformMatrix2fvARB driDispatchRemapTable[UniformMatrix2fvARB_remap_index] +#define _gloffset_UniformMatrix3fvARB driDispatchRemapTable[UniformMatrix3fvARB_remap_index] +#define _gloffset_UniformMatrix4fvARB driDispatchRemapTable[UniformMatrix4fvARB_remap_index] +#define _gloffset_UseProgramObjectARB driDispatchRemapTable[UseProgramObjectARB_remap_index] +#define _gloffset_ValidateProgramARB driDispatchRemapTable[ValidateProgramARB_remap_index] +#define _gloffset_BindAttribLocationARB driDispatchRemapTable[BindAttribLocationARB_remap_index] +#define _gloffset_GetActiveAttribARB driDispatchRemapTable[GetActiveAttribARB_remap_index] +#define _gloffset_GetAttribLocationARB driDispatchRemapTable[GetAttribLocationARB_remap_index] +#define _gloffset_DrawBuffersARB driDispatchRemapTable[DrawBuffersARB_remap_index] +#define _gloffset_ClampColorARB driDispatchRemapTable[ClampColorARB_remap_index] +#define _gloffset_DrawArraysInstancedARB driDispatchRemapTable[DrawArraysInstancedARB_remap_index] +#define _gloffset_DrawElementsInstancedARB driDispatchRemapTable[DrawElementsInstancedARB_remap_index] +#define _gloffset_RenderbufferStorageMultisample driDispatchRemapTable[RenderbufferStorageMultisample_remap_index] +#define _gloffset_FramebufferTextureARB driDispatchRemapTable[FramebufferTextureARB_remap_index] +#define _gloffset_FramebufferTextureFaceARB driDispatchRemapTable[FramebufferTextureFaceARB_remap_index] +#define _gloffset_ProgramParameteriARB driDispatchRemapTable[ProgramParameteriARB_remap_index] +#define _gloffset_VertexAttribDivisorARB driDispatchRemapTable[VertexAttribDivisorARB_remap_index] +#define _gloffset_FlushMappedBufferRange driDispatchRemapTable[FlushMappedBufferRange_remap_index] +#define _gloffset_MapBufferRange driDispatchRemapTable[MapBufferRange_remap_index] +#define _gloffset_TexBufferARB driDispatchRemapTable[TexBufferARB_remap_index] +#define _gloffset_BindVertexArray driDispatchRemapTable[BindVertexArray_remap_index] +#define _gloffset_GenVertexArrays driDispatchRemapTable[GenVertexArrays_remap_index] +#define _gloffset_CopyBufferSubData driDispatchRemapTable[CopyBufferSubData_remap_index] +#define _gloffset_ClientWaitSync driDispatchRemapTable[ClientWaitSync_remap_index] +#define _gloffset_DeleteSync driDispatchRemapTable[DeleteSync_remap_index] +#define _gloffset_FenceSync driDispatchRemapTable[FenceSync_remap_index] +#define _gloffset_GetInteger64v driDispatchRemapTable[GetInteger64v_remap_index] +#define _gloffset_GetSynciv driDispatchRemapTable[GetSynciv_remap_index] +#define _gloffset_IsSync driDispatchRemapTable[IsSync_remap_index] +#define _gloffset_WaitSync driDispatchRemapTable[WaitSync_remap_index] +#define _gloffset_DrawElementsBaseVertex driDispatchRemapTable[DrawElementsBaseVertex_remap_index] +#define _gloffset_DrawRangeElementsBaseVertex driDispatchRemapTable[DrawRangeElementsBaseVertex_remap_index] +#define _gloffset_MultiDrawElementsBaseVertex driDispatchRemapTable[MultiDrawElementsBaseVertex_remap_index] +#define _gloffset_BlendEquationSeparateiARB driDispatchRemapTable[BlendEquationSeparateiARB_remap_index] +#define _gloffset_BlendEquationiARB driDispatchRemapTable[BlendEquationiARB_remap_index] +#define _gloffset_BlendFuncSeparateiARB driDispatchRemapTable[BlendFuncSeparateiARB_remap_index] +#define _gloffset_BlendFunciARB driDispatchRemapTable[BlendFunciARB_remap_index] +#define _gloffset_BindSampler driDispatchRemapTable[BindSampler_remap_index] +#define _gloffset_DeleteSamplers driDispatchRemapTable[DeleteSamplers_remap_index] +#define _gloffset_GenSamplers driDispatchRemapTable[GenSamplers_remap_index] +#define _gloffset_GetSamplerParameterIiv driDispatchRemapTable[GetSamplerParameterIiv_remap_index] +#define _gloffset_GetSamplerParameterIuiv driDispatchRemapTable[GetSamplerParameterIuiv_remap_index] +#define _gloffset_GetSamplerParameterfv driDispatchRemapTable[GetSamplerParameterfv_remap_index] +#define _gloffset_GetSamplerParameteriv driDispatchRemapTable[GetSamplerParameteriv_remap_index] +#define _gloffset_IsSampler driDispatchRemapTable[IsSampler_remap_index] +#define _gloffset_SamplerParameterIiv driDispatchRemapTable[SamplerParameterIiv_remap_index] +#define _gloffset_SamplerParameterIuiv driDispatchRemapTable[SamplerParameterIuiv_remap_index] +#define _gloffset_SamplerParameterf driDispatchRemapTable[SamplerParameterf_remap_index] +#define _gloffset_SamplerParameterfv driDispatchRemapTable[SamplerParameterfv_remap_index] +#define _gloffset_SamplerParameteri driDispatchRemapTable[SamplerParameteri_remap_index] +#define _gloffset_SamplerParameteriv driDispatchRemapTable[SamplerParameteriv_remap_index] +#define _gloffset_BindTransformFeedback driDispatchRemapTable[BindTransformFeedback_remap_index] +#define _gloffset_DeleteTransformFeedbacks driDispatchRemapTable[DeleteTransformFeedbacks_remap_index] +#define _gloffset_DrawTransformFeedback driDispatchRemapTable[DrawTransformFeedback_remap_index] +#define _gloffset_GenTransformFeedbacks driDispatchRemapTable[GenTransformFeedbacks_remap_index] +#define _gloffset_IsTransformFeedback driDispatchRemapTable[IsTransformFeedback_remap_index] +#define _gloffset_PauseTransformFeedback driDispatchRemapTable[PauseTransformFeedback_remap_index] +#define _gloffset_ResumeTransformFeedback driDispatchRemapTable[ResumeTransformFeedback_remap_index] +#define _gloffset_ClearDepthf driDispatchRemapTable[ClearDepthf_remap_index] +#define _gloffset_DepthRangef driDispatchRemapTable[DepthRangef_remap_index] +#define _gloffset_GetShaderPrecisionFormat driDispatchRemapTable[GetShaderPrecisionFormat_remap_index] +#define _gloffset_ReleaseShaderCompiler driDispatchRemapTable[ReleaseShaderCompiler_remap_index] +#define _gloffset_ShaderBinary driDispatchRemapTable[ShaderBinary_remap_index] +#define _gloffset_GetGraphicsResetStatusARB driDispatchRemapTable[GetGraphicsResetStatusARB_remap_index] +#define _gloffset_GetnColorTableARB driDispatchRemapTable[GetnColorTableARB_remap_index] +#define _gloffset_GetnCompressedTexImageARB driDispatchRemapTable[GetnCompressedTexImageARB_remap_index] +#define _gloffset_GetnConvolutionFilterARB driDispatchRemapTable[GetnConvolutionFilterARB_remap_index] +#define _gloffset_GetnHistogramARB driDispatchRemapTable[GetnHistogramARB_remap_index] +#define _gloffset_GetnMapdvARB driDispatchRemapTable[GetnMapdvARB_remap_index] +#define _gloffset_GetnMapfvARB driDispatchRemapTable[GetnMapfvARB_remap_index] +#define _gloffset_GetnMapivARB driDispatchRemapTable[GetnMapivARB_remap_index] +#define _gloffset_GetnMinmaxARB driDispatchRemapTable[GetnMinmaxARB_remap_index] +#define _gloffset_GetnPixelMapfvARB driDispatchRemapTable[GetnPixelMapfvARB_remap_index] +#define _gloffset_GetnPixelMapuivARB driDispatchRemapTable[GetnPixelMapuivARB_remap_index] +#define _gloffset_GetnPixelMapusvARB driDispatchRemapTable[GetnPixelMapusvARB_remap_index] +#define _gloffset_GetnPolygonStippleARB driDispatchRemapTable[GetnPolygonStippleARB_remap_index] +#define _gloffset_GetnSeparableFilterARB driDispatchRemapTable[GetnSeparableFilterARB_remap_index] +#define _gloffset_GetnTexImageARB driDispatchRemapTable[GetnTexImageARB_remap_index] +#define _gloffset_GetnUniformdvARB driDispatchRemapTable[GetnUniformdvARB_remap_index] +#define _gloffset_GetnUniformfvARB driDispatchRemapTable[GetnUniformfvARB_remap_index] +#define _gloffset_GetnUniformivARB driDispatchRemapTable[GetnUniformivARB_remap_index] +#define _gloffset_GetnUniformuivARB driDispatchRemapTable[GetnUniformuivARB_remap_index] +#define _gloffset_ReadnPixelsARB driDispatchRemapTable[ReadnPixelsARB_remap_index] +#define _gloffset_PolygonOffsetEXT driDispatchRemapTable[PolygonOffsetEXT_remap_index] +#define _gloffset_GetPixelTexGenParameterfvSGIS driDispatchRemapTable[GetPixelTexGenParameterfvSGIS_remap_index] +#define _gloffset_GetPixelTexGenParameterivSGIS driDispatchRemapTable[GetPixelTexGenParameterivSGIS_remap_index] +#define _gloffset_PixelTexGenParameterfSGIS driDispatchRemapTable[PixelTexGenParameterfSGIS_remap_index] +#define _gloffset_PixelTexGenParameterfvSGIS driDispatchRemapTable[PixelTexGenParameterfvSGIS_remap_index] +#define _gloffset_PixelTexGenParameteriSGIS driDispatchRemapTable[PixelTexGenParameteriSGIS_remap_index] +#define _gloffset_PixelTexGenParameterivSGIS driDispatchRemapTable[PixelTexGenParameterivSGIS_remap_index] +#define _gloffset_SampleMaskSGIS driDispatchRemapTable[SampleMaskSGIS_remap_index] +#define _gloffset_SamplePatternSGIS driDispatchRemapTable[SamplePatternSGIS_remap_index] +#define _gloffset_ColorPointerEXT driDispatchRemapTable[ColorPointerEXT_remap_index] +#define _gloffset_EdgeFlagPointerEXT driDispatchRemapTable[EdgeFlagPointerEXT_remap_index] +#define _gloffset_IndexPointerEXT driDispatchRemapTable[IndexPointerEXT_remap_index] +#define _gloffset_NormalPointerEXT driDispatchRemapTable[NormalPointerEXT_remap_index] +#define _gloffset_TexCoordPointerEXT driDispatchRemapTable[TexCoordPointerEXT_remap_index] +#define _gloffset_VertexPointerEXT driDispatchRemapTable[VertexPointerEXT_remap_index] +#define _gloffset_PointParameterfEXT driDispatchRemapTable[PointParameterfEXT_remap_index] +#define _gloffset_PointParameterfvEXT driDispatchRemapTable[PointParameterfvEXT_remap_index] +#define _gloffset_LockArraysEXT driDispatchRemapTable[LockArraysEXT_remap_index] +#define _gloffset_UnlockArraysEXT driDispatchRemapTable[UnlockArraysEXT_remap_index] +#define _gloffset_SecondaryColor3bEXT driDispatchRemapTable[SecondaryColor3bEXT_remap_index] +#define _gloffset_SecondaryColor3bvEXT driDispatchRemapTable[SecondaryColor3bvEXT_remap_index] +#define _gloffset_SecondaryColor3dEXT driDispatchRemapTable[SecondaryColor3dEXT_remap_index] +#define _gloffset_SecondaryColor3dvEXT driDispatchRemapTable[SecondaryColor3dvEXT_remap_index] +#define _gloffset_SecondaryColor3fEXT driDispatchRemapTable[SecondaryColor3fEXT_remap_index] +#define _gloffset_SecondaryColor3fvEXT driDispatchRemapTable[SecondaryColor3fvEXT_remap_index] +#define _gloffset_SecondaryColor3iEXT driDispatchRemapTable[SecondaryColor3iEXT_remap_index] +#define _gloffset_SecondaryColor3ivEXT driDispatchRemapTable[SecondaryColor3ivEXT_remap_index] +#define _gloffset_SecondaryColor3sEXT driDispatchRemapTable[SecondaryColor3sEXT_remap_index] +#define _gloffset_SecondaryColor3svEXT driDispatchRemapTable[SecondaryColor3svEXT_remap_index] +#define _gloffset_SecondaryColor3ubEXT driDispatchRemapTable[SecondaryColor3ubEXT_remap_index] +#define _gloffset_SecondaryColor3ubvEXT driDispatchRemapTable[SecondaryColor3ubvEXT_remap_index] +#define _gloffset_SecondaryColor3uiEXT driDispatchRemapTable[SecondaryColor3uiEXT_remap_index] +#define _gloffset_SecondaryColor3uivEXT driDispatchRemapTable[SecondaryColor3uivEXT_remap_index] +#define _gloffset_SecondaryColor3usEXT driDispatchRemapTable[SecondaryColor3usEXT_remap_index] +#define _gloffset_SecondaryColor3usvEXT driDispatchRemapTable[SecondaryColor3usvEXT_remap_index] +#define _gloffset_SecondaryColorPointerEXT driDispatchRemapTable[SecondaryColorPointerEXT_remap_index] +#define _gloffset_MultiDrawArraysEXT driDispatchRemapTable[MultiDrawArraysEXT_remap_index] +#define _gloffset_MultiDrawElementsEXT driDispatchRemapTable[MultiDrawElementsEXT_remap_index] +#define _gloffset_FogCoordPointerEXT driDispatchRemapTable[FogCoordPointerEXT_remap_index] +#define _gloffset_FogCoorddEXT driDispatchRemapTable[FogCoorddEXT_remap_index] +#define _gloffset_FogCoorddvEXT driDispatchRemapTable[FogCoorddvEXT_remap_index] +#define _gloffset_FogCoordfEXT driDispatchRemapTable[FogCoordfEXT_remap_index] +#define _gloffset_FogCoordfvEXT driDispatchRemapTable[FogCoordfvEXT_remap_index] +#define _gloffset_PixelTexGenSGIX driDispatchRemapTable[PixelTexGenSGIX_remap_index] +#define _gloffset_BlendFuncSeparateEXT driDispatchRemapTable[BlendFuncSeparateEXT_remap_index] +#define _gloffset_FlushVertexArrayRangeNV driDispatchRemapTable[FlushVertexArrayRangeNV_remap_index] +#define _gloffset_VertexArrayRangeNV driDispatchRemapTable[VertexArrayRangeNV_remap_index] +#define _gloffset_CombinerInputNV driDispatchRemapTable[CombinerInputNV_remap_index] +#define _gloffset_CombinerOutputNV driDispatchRemapTable[CombinerOutputNV_remap_index] +#define _gloffset_CombinerParameterfNV driDispatchRemapTable[CombinerParameterfNV_remap_index] +#define _gloffset_CombinerParameterfvNV driDispatchRemapTable[CombinerParameterfvNV_remap_index] +#define _gloffset_CombinerParameteriNV driDispatchRemapTable[CombinerParameteriNV_remap_index] +#define _gloffset_CombinerParameterivNV driDispatchRemapTable[CombinerParameterivNV_remap_index] +#define _gloffset_FinalCombinerInputNV driDispatchRemapTable[FinalCombinerInputNV_remap_index] +#define _gloffset_GetCombinerInputParameterfvNV driDispatchRemapTable[GetCombinerInputParameterfvNV_remap_index] +#define _gloffset_GetCombinerInputParameterivNV driDispatchRemapTable[GetCombinerInputParameterivNV_remap_index] +#define _gloffset_GetCombinerOutputParameterfvNV driDispatchRemapTable[GetCombinerOutputParameterfvNV_remap_index] +#define _gloffset_GetCombinerOutputParameterivNV driDispatchRemapTable[GetCombinerOutputParameterivNV_remap_index] +#define _gloffset_GetFinalCombinerInputParameterfvNV driDispatchRemapTable[GetFinalCombinerInputParameterfvNV_remap_index] +#define _gloffset_GetFinalCombinerInputParameterivNV driDispatchRemapTable[GetFinalCombinerInputParameterivNV_remap_index] +#define _gloffset_ResizeBuffersMESA driDispatchRemapTable[ResizeBuffersMESA_remap_index] +#define _gloffset_WindowPos2dMESA driDispatchRemapTable[WindowPos2dMESA_remap_index] +#define _gloffset_WindowPos2dvMESA driDispatchRemapTable[WindowPos2dvMESA_remap_index] +#define _gloffset_WindowPos2fMESA driDispatchRemapTable[WindowPos2fMESA_remap_index] +#define _gloffset_WindowPos2fvMESA driDispatchRemapTable[WindowPos2fvMESA_remap_index] +#define _gloffset_WindowPos2iMESA driDispatchRemapTable[WindowPos2iMESA_remap_index] +#define _gloffset_WindowPos2ivMESA driDispatchRemapTable[WindowPos2ivMESA_remap_index] +#define _gloffset_WindowPos2sMESA driDispatchRemapTable[WindowPos2sMESA_remap_index] +#define _gloffset_WindowPos2svMESA driDispatchRemapTable[WindowPos2svMESA_remap_index] +#define _gloffset_WindowPos3dMESA driDispatchRemapTable[WindowPos3dMESA_remap_index] +#define _gloffset_WindowPos3dvMESA driDispatchRemapTable[WindowPos3dvMESA_remap_index] +#define _gloffset_WindowPos3fMESA driDispatchRemapTable[WindowPos3fMESA_remap_index] +#define _gloffset_WindowPos3fvMESA driDispatchRemapTable[WindowPos3fvMESA_remap_index] +#define _gloffset_WindowPos3iMESA driDispatchRemapTable[WindowPos3iMESA_remap_index] +#define _gloffset_WindowPos3ivMESA driDispatchRemapTable[WindowPos3ivMESA_remap_index] +#define _gloffset_WindowPos3sMESA driDispatchRemapTable[WindowPos3sMESA_remap_index] +#define _gloffset_WindowPos3svMESA driDispatchRemapTable[WindowPos3svMESA_remap_index] +#define _gloffset_WindowPos4dMESA driDispatchRemapTable[WindowPos4dMESA_remap_index] +#define _gloffset_WindowPos4dvMESA driDispatchRemapTable[WindowPos4dvMESA_remap_index] +#define _gloffset_WindowPos4fMESA driDispatchRemapTable[WindowPos4fMESA_remap_index] +#define _gloffset_WindowPos4fvMESA driDispatchRemapTable[WindowPos4fvMESA_remap_index] +#define _gloffset_WindowPos4iMESA driDispatchRemapTable[WindowPos4iMESA_remap_index] +#define _gloffset_WindowPos4ivMESA driDispatchRemapTable[WindowPos4ivMESA_remap_index] +#define _gloffset_WindowPos4sMESA driDispatchRemapTable[WindowPos4sMESA_remap_index] +#define _gloffset_WindowPos4svMESA driDispatchRemapTable[WindowPos4svMESA_remap_index] +#define _gloffset_MultiModeDrawArraysIBM driDispatchRemapTable[MultiModeDrawArraysIBM_remap_index] +#define _gloffset_MultiModeDrawElementsIBM driDispatchRemapTable[MultiModeDrawElementsIBM_remap_index] +#define _gloffset_DeleteFencesNV driDispatchRemapTable[DeleteFencesNV_remap_index] +#define _gloffset_FinishFenceNV driDispatchRemapTable[FinishFenceNV_remap_index] +#define _gloffset_GenFencesNV driDispatchRemapTable[GenFencesNV_remap_index] +#define _gloffset_GetFenceivNV driDispatchRemapTable[GetFenceivNV_remap_index] +#define _gloffset_IsFenceNV driDispatchRemapTable[IsFenceNV_remap_index] +#define _gloffset_SetFenceNV driDispatchRemapTable[SetFenceNV_remap_index] +#define _gloffset_TestFenceNV driDispatchRemapTable[TestFenceNV_remap_index] +#define _gloffset_AreProgramsResidentNV driDispatchRemapTable[AreProgramsResidentNV_remap_index] +#define _gloffset_BindProgramNV driDispatchRemapTable[BindProgramNV_remap_index] +#define _gloffset_DeleteProgramsNV driDispatchRemapTable[DeleteProgramsNV_remap_index] +#define _gloffset_ExecuteProgramNV driDispatchRemapTable[ExecuteProgramNV_remap_index] +#define _gloffset_GenProgramsNV driDispatchRemapTable[GenProgramsNV_remap_index] +#define _gloffset_GetProgramParameterdvNV driDispatchRemapTable[GetProgramParameterdvNV_remap_index] +#define _gloffset_GetProgramParameterfvNV driDispatchRemapTable[GetProgramParameterfvNV_remap_index] +#define _gloffset_GetProgramStringNV driDispatchRemapTable[GetProgramStringNV_remap_index] +#define _gloffset_GetProgramivNV driDispatchRemapTable[GetProgramivNV_remap_index] +#define _gloffset_GetTrackMatrixivNV driDispatchRemapTable[GetTrackMatrixivNV_remap_index] +#define _gloffset_GetVertexAttribPointervNV driDispatchRemapTable[GetVertexAttribPointervNV_remap_index] +#define _gloffset_GetVertexAttribdvNV driDispatchRemapTable[GetVertexAttribdvNV_remap_index] +#define _gloffset_GetVertexAttribfvNV driDispatchRemapTable[GetVertexAttribfvNV_remap_index] +#define _gloffset_GetVertexAttribivNV driDispatchRemapTable[GetVertexAttribivNV_remap_index] +#define _gloffset_IsProgramNV driDispatchRemapTable[IsProgramNV_remap_index] +#define _gloffset_LoadProgramNV driDispatchRemapTable[LoadProgramNV_remap_index] +#define _gloffset_ProgramParameters4dvNV driDispatchRemapTable[ProgramParameters4dvNV_remap_index] +#define _gloffset_ProgramParameters4fvNV driDispatchRemapTable[ProgramParameters4fvNV_remap_index] +#define _gloffset_RequestResidentProgramsNV driDispatchRemapTable[RequestResidentProgramsNV_remap_index] +#define _gloffset_TrackMatrixNV driDispatchRemapTable[TrackMatrixNV_remap_index] +#define _gloffset_VertexAttrib1dNV driDispatchRemapTable[VertexAttrib1dNV_remap_index] +#define _gloffset_VertexAttrib1dvNV driDispatchRemapTable[VertexAttrib1dvNV_remap_index] +#define _gloffset_VertexAttrib1fNV driDispatchRemapTable[VertexAttrib1fNV_remap_index] +#define _gloffset_VertexAttrib1fvNV driDispatchRemapTable[VertexAttrib1fvNV_remap_index] +#define _gloffset_VertexAttrib1sNV driDispatchRemapTable[VertexAttrib1sNV_remap_index] +#define _gloffset_VertexAttrib1svNV driDispatchRemapTable[VertexAttrib1svNV_remap_index] +#define _gloffset_VertexAttrib2dNV driDispatchRemapTable[VertexAttrib2dNV_remap_index] +#define _gloffset_VertexAttrib2dvNV driDispatchRemapTable[VertexAttrib2dvNV_remap_index] +#define _gloffset_VertexAttrib2fNV driDispatchRemapTable[VertexAttrib2fNV_remap_index] +#define _gloffset_VertexAttrib2fvNV driDispatchRemapTable[VertexAttrib2fvNV_remap_index] +#define _gloffset_VertexAttrib2sNV driDispatchRemapTable[VertexAttrib2sNV_remap_index] +#define _gloffset_VertexAttrib2svNV driDispatchRemapTable[VertexAttrib2svNV_remap_index] +#define _gloffset_VertexAttrib3dNV driDispatchRemapTable[VertexAttrib3dNV_remap_index] +#define _gloffset_VertexAttrib3dvNV driDispatchRemapTable[VertexAttrib3dvNV_remap_index] +#define _gloffset_VertexAttrib3fNV driDispatchRemapTable[VertexAttrib3fNV_remap_index] +#define _gloffset_VertexAttrib3fvNV driDispatchRemapTable[VertexAttrib3fvNV_remap_index] +#define _gloffset_VertexAttrib3sNV driDispatchRemapTable[VertexAttrib3sNV_remap_index] +#define _gloffset_VertexAttrib3svNV driDispatchRemapTable[VertexAttrib3svNV_remap_index] +#define _gloffset_VertexAttrib4dNV driDispatchRemapTable[VertexAttrib4dNV_remap_index] +#define _gloffset_VertexAttrib4dvNV driDispatchRemapTable[VertexAttrib4dvNV_remap_index] +#define _gloffset_VertexAttrib4fNV driDispatchRemapTable[VertexAttrib4fNV_remap_index] +#define _gloffset_VertexAttrib4fvNV driDispatchRemapTable[VertexAttrib4fvNV_remap_index] +#define _gloffset_VertexAttrib4sNV driDispatchRemapTable[VertexAttrib4sNV_remap_index] +#define _gloffset_VertexAttrib4svNV driDispatchRemapTable[VertexAttrib4svNV_remap_index] +#define _gloffset_VertexAttrib4ubNV driDispatchRemapTable[VertexAttrib4ubNV_remap_index] +#define _gloffset_VertexAttrib4ubvNV driDispatchRemapTable[VertexAttrib4ubvNV_remap_index] +#define _gloffset_VertexAttribPointerNV driDispatchRemapTable[VertexAttribPointerNV_remap_index] +#define _gloffset_VertexAttribs1dvNV driDispatchRemapTable[VertexAttribs1dvNV_remap_index] +#define _gloffset_VertexAttribs1fvNV driDispatchRemapTable[VertexAttribs1fvNV_remap_index] +#define _gloffset_VertexAttribs1svNV driDispatchRemapTable[VertexAttribs1svNV_remap_index] +#define _gloffset_VertexAttribs2dvNV driDispatchRemapTable[VertexAttribs2dvNV_remap_index] +#define _gloffset_VertexAttribs2fvNV driDispatchRemapTable[VertexAttribs2fvNV_remap_index] +#define _gloffset_VertexAttribs2svNV driDispatchRemapTable[VertexAttribs2svNV_remap_index] +#define _gloffset_VertexAttribs3dvNV driDispatchRemapTable[VertexAttribs3dvNV_remap_index] +#define _gloffset_VertexAttribs3fvNV driDispatchRemapTable[VertexAttribs3fvNV_remap_index] +#define _gloffset_VertexAttribs3svNV driDispatchRemapTable[VertexAttribs3svNV_remap_index] +#define _gloffset_VertexAttribs4dvNV driDispatchRemapTable[VertexAttribs4dvNV_remap_index] +#define _gloffset_VertexAttribs4fvNV driDispatchRemapTable[VertexAttribs4fvNV_remap_index] +#define _gloffset_VertexAttribs4svNV driDispatchRemapTable[VertexAttribs4svNV_remap_index] +#define _gloffset_VertexAttribs4ubvNV driDispatchRemapTable[VertexAttribs4ubvNV_remap_index] +#define _gloffset_GetTexBumpParameterfvATI driDispatchRemapTable[GetTexBumpParameterfvATI_remap_index] +#define _gloffset_GetTexBumpParameterivATI driDispatchRemapTable[GetTexBumpParameterivATI_remap_index] +#define _gloffset_TexBumpParameterfvATI driDispatchRemapTable[TexBumpParameterfvATI_remap_index] +#define _gloffset_TexBumpParameterivATI driDispatchRemapTable[TexBumpParameterivATI_remap_index] +#define _gloffset_AlphaFragmentOp1ATI driDispatchRemapTable[AlphaFragmentOp1ATI_remap_index] +#define _gloffset_AlphaFragmentOp2ATI driDispatchRemapTable[AlphaFragmentOp2ATI_remap_index] +#define _gloffset_AlphaFragmentOp3ATI driDispatchRemapTable[AlphaFragmentOp3ATI_remap_index] +#define _gloffset_BeginFragmentShaderATI driDispatchRemapTable[BeginFragmentShaderATI_remap_index] +#define _gloffset_BindFragmentShaderATI driDispatchRemapTable[BindFragmentShaderATI_remap_index] +#define _gloffset_ColorFragmentOp1ATI driDispatchRemapTable[ColorFragmentOp1ATI_remap_index] +#define _gloffset_ColorFragmentOp2ATI driDispatchRemapTable[ColorFragmentOp2ATI_remap_index] +#define _gloffset_ColorFragmentOp3ATI driDispatchRemapTable[ColorFragmentOp3ATI_remap_index] +#define _gloffset_DeleteFragmentShaderATI driDispatchRemapTable[DeleteFragmentShaderATI_remap_index] +#define _gloffset_EndFragmentShaderATI driDispatchRemapTable[EndFragmentShaderATI_remap_index] +#define _gloffset_GenFragmentShadersATI driDispatchRemapTable[GenFragmentShadersATI_remap_index] +#define _gloffset_PassTexCoordATI driDispatchRemapTable[PassTexCoordATI_remap_index] +#define _gloffset_SampleMapATI driDispatchRemapTable[SampleMapATI_remap_index] +#define _gloffset_SetFragmentShaderConstantATI driDispatchRemapTable[SetFragmentShaderConstantATI_remap_index] +#define _gloffset_PointParameteriNV driDispatchRemapTable[PointParameteriNV_remap_index] +#define _gloffset_PointParameterivNV driDispatchRemapTable[PointParameterivNV_remap_index] +#define _gloffset_ActiveStencilFaceEXT driDispatchRemapTable[ActiveStencilFaceEXT_remap_index] +#define _gloffset_BindVertexArrayAPPLE driDispatchRemapTable[BindVertexArrayAPPLE_remap_index] +#define _gloffset_DeleteVertexArraysAPPLE driDispatchRemapTable[DeleteVertexArraysAPPLE_remap_index] +#define _gloffset_GenVertexArraysAPPLE driDispatchRemapTable[GenVertexArraysAPPLE_remap_index] +#define _gloffset_IsVertexArrayAPPLE driDispatchRemapTable[IsVertexArrayAPPLE_remap_index] +#define _gloffset_GetProgramNamedParameterdvNV driDispatchRemapTable[GetProgramNamedParameterdvNV_remap_index] +#define _gloffset_GetProgramNamedParameterfvNV driDispatchRemapTable[GetProgramNamedParameterfvNV_remap_index] +#define _gloffset_ProgramNamedParameter4dNV driDispatchRemapTable[ProgramNamedParameter4dNV_remap_index] +#define _gloffset_ProgramNamedParameter4dvNV driDispatchRemapTable[ProgramNamedParameter4dvNV_remap_index] +#define _gloffset_ProgramNamedParameter4fNV driDispatchRemapTable[ProgramNamedParameter4fNV_remap_index] +#define _gloffset_ProgramNamedParameter4fvNV driDispatchRemapTable[ProgramNamedParameter4fvNV_remap_index] +#define _gloffset_PrimitiveRestartIndexNV driDispatchRemapTable[PrimitiveRestartIndexNV_remap_index] +#define _gloffset_PrimitiveRestartNV driDispatchRemapTable[PrimitiveRestartNV_remap_index] +#define _gloffset_DepthBoundsEXT driDispatchRemapTable[DepthBoundsEXT_remap_index] +#define _gloffset_BlendEquationSeparateEXT driDispatchRemapTable[BlendEquationSeparateEXT_remap_index] +#define _gloffset_BindFramebufferEXT driDispatchRemapTable[BindFramebufferEXT_remap_index] +#define _gloffset_BindRenderbufferEXT driDispatchRemapTable[BindRenderbufferEXT_remap_index] +#define _gloffset_CheckFramebufferStatusEXT driDispatchRemapTable[CheckFramebufferStatusEXT_remap_index] +#define _gloffset_DeleteFramebuffersEXT driDispatchRemapTable[DeleteFramebuffersEXT_remap_index] +#define _gloffset_DeleteRenderbuffersEXT driDispatchRemapTable[DeleteRenderbuffersEXT_remap_index] +#define _gloffset_FramebufferRenderbufferEXT driDispatchRemapTable[FramebufferRenderbufferEXT_remap_index] +#define _gloffset_FramebufferTexture1DEXT driDispatchRemapTable[FramebufferTexture1DEXT_remap_index] +#define _gloffset_FramebufferTexture2DEXT driDispatchRemapTable[FramebufferTexture2DEXT_remap_index] +#define _gloffset_FramebufferTexture3DEXT driDispatchRemapTable[FramebufferTexture3DEXT_remap_index] +#define _gloffset_GenFramebuffersEXT driDispatchRemapTable[GenFramebuffersEXT_remap_index] +#define _gloffset_GenRenderbuffersEXT driDispatchRemapTable[GenRenderbuffersEXT_remap_index] +#define _gloffset_GenerateMipmapEXT driDispatchRemapTable[GenerateMipmapEXT_remap_index] +#define _gloffset_GetFramebufferAttachmentParameterivEXT driDispatchRemapTable[GetFramebufferAttachmentParameterivEXT_remap_index] +#define _gloffset_GetRenderbufferParameterivEXT driDispatchRemapTable[GetRenderbufferParameterivEXT_remap_index] +#define _gloffset_IsFramebufferEXT driDispatchRemapTable[IsFramebufferEXT_remap_index] +#define _gloffset_IsRenderbufferEXT driDispatchRemapTable[IsRenderbufferEXT_remap_index] +#define _gloffset_RenderbufferStorageEXT driDispatchRemapTable[RenderbufferStorageEXT_remap_index] +#define _gloffset_BlitFramebufferEXT driDispatchRemapTable[BlitFramebufferEXT_remap_index] +#define _gloffset_BufferParameteriAPPLE driDispatchRemapTable[BufferParameteriAPPLE_remap_index] +#define _gloffset_FlushMappedBufferRangeAPPLE driDispatchRemapTable[FlushMappedBufferRangeAPPLE_remap_index] +#define _gloffset_BindFragDataLocationEXT driDispatchRemapTable[BindFragDataLocationEXT_remap_index] +#define _gloffset_GetFragDataLocationEXT driDispatchRemapTable[GetFragDataLocationEXT_remap_index] +#define _gloffset_GetUniformuivEXT driDispatchRemapTable[GetUniformuivEXT_remap_index] +#define _gloffset_GetVertexAttribIivEXT driDispatchRemapTable[GetVertexAttribIivEXT_remap_index] +#define _gloffset_GetVertexAttribIuivEXT driDispatchRemapTable[GetVertexAttribIuivEXT_remap_index] +#define _gloffset_Uniform1uiEXT driDispatchRemapTable[Uniform1uiEXT_remap_index] +#define _gloffset_Uniform1uivEXT driDispatchRemapTable[Uniform1uivEXT_remap_index] +#define _gloffset_Uniform2uiEXT driDispatchRemapTable[Uniform2uiEXT_remap_index] +#define _gloffset_Uniform2uivEXT driDispatchRemapTable[Uniform2uivEXT_remap_index] +#define _gloffset_Uniform3uiEXT driDispatchRemapTable[Uniform3uiEXT_remap_index] +#define _gloffset_Uniform3uivEXT driDispatchRemapTable[Uniform3uivEXT_remap_index] +#define _gloffset_Uniform4uiEXT driDispatchRemapTable[Uniform4uiEXT_remap_index] +#define _gloffset_Uniform4uivEXT driDispatchRemapTable[Uniform4uivEXT_remap_index] +#define _gloffset_VertexAttribI1iEXT driDispatchRemapTable[VertexAttribI1iEXT_remap_index] +#define _gloffset_VertexAttribI1ivEXT driDispatchRemapTable[VertexAttribI1ivEXT_remap_index] +#define _gloffset_VertexAttribI1uiEXT driDispatchRemapTable[VertexAttribI1uiEXT_remap_index] +#define _gloffset_VertexAttribI1uivEXT driDispatchRemapTable[VertexAttribI1uivEXT_remap_index] +#define _gloffset_VertexAttribI2iEXT driDispatchRemapTable[VertexAttribI2iEXT_remap_index] +#define _gloffset_VertexAttribI2ivEXT driDispatchRemapTable[VertexAttribI2ivEXT_remap_index] +#define _gloffset_VertexAttribI2uiEXT driDispatchRemapTable[VertexAttribI2uiEXT_remap_index] +#define _gloffset_VertexAttribI2uivEXT driDispatchRemapTable[VertexAttribI2uivEXT_remap_index] +#define _gloffset_VertexAttribI3iEXT driDispatchRemapTable[VertexAttribI3iEXT_remap_index] +#define _gloffset_VertexAttribI3ivEXT driDispatchRemapTable[VertexAttribI3ivEXT_remap_index] +#define _gloffset_VertexAttribI3uiEXT driDispatchRemapTable[VertexAttribI3uiEXT_remap_index] +#define _gloffset_VertexAttribI3uivEXT driDispatchRemapTable[VertexAttribI3uivEXT_remap_index] +#define _gloffset_VertexAttribI4bvEXT driDispatchRemapTable[VertexAttribI4bvEXT_remap_index] +#define _gloffset_VertexAttribI4iEXT driDispatchRemapTable[VertexAttribI4iEXT_remap_index] +#define _gloffset_VertexAttribI4ivEXT driDispatchRemapTable[VertexAttribI4ivEXT_remap_index] +#define _gloffset_VertexAttribI4svEXT driDispatchRemapTable[VertexAttribI4svEXT_remap_index] +#define _gloffset_VertexAttribI4ubvEXT driDispatchRemapTable[VertexAttribI4ubvEXT_remap_index] +#define _gloffset_VertexAttribI4uiEXT driDispatchRemapTable[VertexAttribI4uiEXT_remap_index] +#define _gloffset_VertexAttribI4uivEXT driDispatchRemapTable[VertexAttribI4uivEXT_remap_index] +#define _gloffset_VertexAttribI4usvEXT driDispatchRemapTable[VertexAttribI4usvEXT_remap_index] +#define _gloffset_VertexAttribIPointerEXT driDispatchRemapTable[VertexAttribIPointerEXT_remap_index] +#define _gloffset_FramebufferTextureLayerEXT driDispatchRemapTable[FramebufferTextureLayerEXT_remap_index] +#define _gloffset_ColorMaskIndexedEXT driDispatchRemapTable[ColorMaskIndexedEXT_remap_index] +#define _gloffset_DisableIndexedEXT driDispatchRemapTable[DisableIndexedEXT_remap_index] +#define _gloffset_EnableIndexedEXT driDispatchRemapTable[EnableIndexedEXT_remap_index] +#define _gloffset_GetBooleanIndexedvEXT driDispatchRemapTable[GetBooleanIndexedvEXT_remap_index] +#define _gloffset_GetIntegerIndexedvEXT driDispatchRemapTable[GetIntegerIndexedvEXT_remap_index] +#define _gloffset_IsEnabledIndexedEXT driDispatchRemapTable[IsEnabledIndexedEXT_remap_index] +#define _gloffset_ClearColorIiEXT driDispatchRemapTable[ClearColorIiEXT_remap_index] +#define _gloffset_ClearColorIuiEXT driDispatchRemapTable[ClearColorIuiEXT_remap_index] +#define _gloffset_GetTexParameterIivEXT driDispatchRemapTable[GetTexParameterIivEXT_remap_index] +#define _gloffset_GetTexParameterIuivEXT driDispatchRemapTable[GetTexParameterIuivEXT_remap_index] +#define _gloffset_TexParameterIivEXT driDispatchRemapTable[TexParameterIivEXT_remap_index] +#define _gloffset_TexParameterIuivEXT driDispatchRemapTable[TexParameterIuivEXT_remap_index] +#define _gloffset_BeginConditionalRenderNV driDispatchRemapTable[BeginConditionalRenderNV_remap_index] +#define _gloffset_EndConditionalRenderNV driDispatchRemapTable[EndConditionalRenderNV_remap_index] +#define _gloffset_BeginTransformFeedbackEXT driDispatchRemapTable[BeginTransformFeedbackEXT_remap_index] +#define _gloffset_BindBufferBaseEXT driDispatchRemapTable[BindBufferBaseEXT_remap_index] +#define _gloffset_BindBufferOffsetEXT driDispatchRemapTable[BindBufferOffsetEXT_remap_index] +#define _gloffset_BindBufferRangeEXT driDispatchRemapTable[BindBufferRangeEXT_remap_index] +#define _gloffset_EndTransformFeedbackEXT driDispatchRemapTable[EndTransformFeedbackEXT_remap_index] +#define _gloffset_GetTransformFeedbackVaryingEXT driDispatchRemapTable[GetTransformFeedbackVaryingEXT_remap_index] +#define _gloffset_TransformFeedbackVaryingsEXT driDispatchRemapTable[TransformFeedbackVaryingsEXT_remap_index] +#define _gloffset_ProvokingVertexEXT driDispatchRemapTable[ProvokingVertexEXT_remap_index] +#define _gloffset_GetTexParameterPointervAPPLE driDispatchRemapTable[GetTexParameterPointervAPPLE_remap_index] +#define _gloffset_TextureRangeAPPLE driDispatchRemapTable[TextureRangeAPPLE_remap_index] +#define _gloffset_GetObjectParameterivAPPLE driDispatchRemapTable[GetObjectParameterivAPPLE_remap_index] +#define _gloffset_ObjectPurgeableAPPLE driDispatchRemapTable[ObjectPurgeableAPPLE_remap_index] +#define _gloffset_ObjectUnpurgeableAPPLE driDispatchRemapTable[ObjectUnpurgeableAPPLE_remap_index] +#define _gloffset_ActiveProgramEXT driDispatchRemapTable[ActiveProgramEXT_remap_index] +#define _gloffset_CreateShaderProgramEXT driDispatchRemapTable[CreateShaderProgramEXT_remap_index] +#define _gloffset_UseShaderProgramEXT driDispatchRemapTable[UseShaderProgramEXT_remap_index] +#define _gloffset_TextureBarrierNV driDispatchRemapTable[TextureBarrierNV_remap_index] +#define _gloffset_StencilFuncSeparateATI driDispatchRemapTable[StencilFuncSeparateATI_remap_index] +#define _gloffset_ProgramEnvParameters4fvEXT driDispatchRemapTable[ProgramEnvParameters4fvEXT_remap_index] +#define _gloffset_ProgramLocalParameters4fvEXT driDispatchRemapTable[ProgramLocalParameters4fvEXT_remap_index] +#define _gloffset_GetQueryObjecti64vEXT driDispatchRemapTable[GetQueryObjecti64vEXT_remap_index] +#define _gloffset_GetQueryObjectui64vEXT driDispatchRemapTable[GetQueryObjectui64vEXT_remap_index] +#define _gloffset_EGLImageTargetRenderbufferStorageOES driDispatchRemapTable[EGLImageTargetRenderbufferStorageOES_remap_index] +#define _gloffset_EGLImageTargetTexture2DOES driDispatchRemapTable[EGLImageTargetTexture2DOES_remap_index] + +#endif /* _GLAPI_USE_REMAP_TABLE */ + +typedef void (GLAPIENTRYP _glptr_NewList)(GLuint, GLenum); +#define CALL_NewList(disp, parameters) \ + (* GET_NewList(disp)) parameters +static INLINE _glptr_NewList GET_NewList(struct _glapi_table *disp) { + return (_glptr_NewList) (GET_by_offset(disp, _gloffset_NewList)); +} + +static INLINE void SET_NewList(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum)) { + SET_by_offset(disp, _gloffset_NewList, fn); +} + +typedef void (GLAPIENTRYP _glptr_EndList)(void); +#define CALL_EndList(disp, parameters) \ + (* GET_EndList(disp)) parameters +static INLINE _glptr_EndList GET_EndList(struct _glapi_table *disp) { + return (_glptr_EndList) (GET_by_offset(disp, _gloffset_EndList)); +} + +static INLINE void SET_EndList(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_EndList, fn); +} + +typedef void (GLAPIENTRYP _glptr_CallList)(GLuint); +#define CALL_CallList(disp, parameters) \ + (* GET_CallList(disp)) parameters +static INLINE _glptr_CallList GET_CallList(struct _glapi_table *disp) { + return (_glptr_CallList) (GET_by_offset(disp, _gloffset_CallList)); +} + +static INLINE void SET_CallList(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_CallList, fn); +} + +typedef void (GLAPIENTRYP _glptr_CallLists)(GLsizei, GLenum, const GLvoid *); +#define CALL_CallLists(disp, parameters) \ + (* GET_CallLists(disp)) parameters +static INLINE _glptr_CallLists GET_CallLists(struct _glapi_table *disp) { + return (_glptr_CallLists) (GET_by_offset(disp, _gloffset_CallLists)); +} + +static INLINE void SET_CallLists(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_CallLists, fn); +} + +typedef void (GLAPIENTRYP _glptr_DeleteLists)(GLuint, GLsizei); +#define CALL_DeleteLists(disp, parameters) \ + (* GET_DeleteLists(disp)) parameters +static INLINE _glptr_DeleteLists GET_DeleteLists(struct _glapi_table *disp) { + return (_glptr_DeleteLists) (GET_by_offset(disp, _gloffset_DeleteLists)); +} + +static INLINE void SET_DeleteLists(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei)) { + SET_by_offset(disp, _gloffset_DeleteLists, fn); +} + +typedef GLuint (GLAPIENTRYP _glptr_GenLists)(GLsizei); +#define CALL_GenLists(disp, parameters) \ + (* GET_GenLists(disp)) parameters +static INLINE _glptr_GenLists GET_GenLists(struct _glapi_table *disp) { + return (_glptr_GenLists) (GET_by_offset(disp, _gloffset_GenLists)); +} + +static INLINE void SET_GenLists(struct _glapi_table *disp, GLuint (GLAPIENTRYP fn)(GLsizei)) { + SET_by_offset(disp, _gloffset_GenLists, fn); +} + +typedef void (GLAPIENTRYP _glptr_ListBase)(GLuint); +#define CALL_ListBase(disp, parameters) \ + (* GET_ListBase(disp)) parameters +static INLINE _glptr_ListBase GET_ListBase(struct _glapi_table *disp) { + return (_glptr_ListBase) (GET_by_offset(disp, _gloffset_ListBase)); +} + +static INLINE void SET_ListBase(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_ListBase, fn); +} + +typedef void (GLAPIENTRYP _glptr_Begin)(GLenum); +#define CALL_Begin(disp, parameters) \ + (* GET_Begin(disp)) parameters +static INLINE _glptr_Begin GET_Begin(struct _glapi_table *disp) { + return (_glptr_Begin) (GET_by_offset(disp, _gloffset_Begin)); +} + +static INLINE void SET_Begin(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_Begin, fn); +} + +typedef void (GLAPIENTRYP _glptr_Bitmap)(GLsizei, GLsizei, GLfloat, GLfloat, GLfloat, GLfloat, const GLubyte *); +#define CALL_Bitmap(disp, parameters) \ + (* GET_Bitmap(disp)) parameters +static INLINE _glptr_Bitmap GET_Bitmap(struct _glapi_table *disp) { + return (_glptr_Bitmap) (GET_by_offset(disp, _gloffset_Bitmap)); +} + +static INLINE void SET_Bitmap(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLsizei, GLfloat, GLfloat, GLfloat, GLfloat, const GLubyte *)) { + SET_by_offset(disp, _gloffset_Bitmap, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color3b)(GLbyte, GLbyte, GLbyte); +#define CALL_Color3b(disp, parameters) \ + (* GET_Color3b(disp)) parameters +static INLINE _glptr_Color3b GET_Color3b(struct _glapi_table *disp) { + return (_glptr_Color3b) (GET_by_offset(disp, _gloffset_Color3b)); +} + +static INLINE void SET_Color3b(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLbyte, GLbyte, GLbyte)) { + SET_by_offset(disp, _gloffset_Color3b, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color3bv)(const GLbyte *); +#define CALL_Color3bv(disp, parameters) \ + (* GET_Color3bv(disp)) parameters +static INLINE _glptr_Color3bv GET_Color3bv(struct _glapi_table *disp) { + return (_glptr_Color3bv) (GET_by_offset(disp, _gloffset_Color3bv)); +} + +static INLINE void SET_Color3bv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLbyte *)) { + SET_by_offset(disp, _gloffset_Color3bv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color3d)(GLdouble, GLdouble, GLdouble); +#define CALL_Color3d(disp, parameters) \ + (* GET_Color3d(disp)) parameters +static INLINE _glptr_Color3d GET_Color3d(struct _glapi_table *disp) { + return (_glptr_Color3d) (GET_by_offset(disp, _gloffset_Color3d)); +} + +static INLINE void SET_Color3d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Color3d, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color3dv)(const GLdouble *); +#define CALL_Color3dv(disp, parameters) \ + (* GET_Color3dv(disp)) parameters +static INLINE _glptr_Color3dv GET_Color3dv(struct _glapi_table *disp) { + return (_glptr_Color3dv) (GET_by_offset(disp, _gloffset_Color3dv)); +} + +static INLINE void SET_Color3dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_Color3dv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color3f)(GLfloat, GLfloat, GLfloat); +#define CALL_Color3f(disp, parameters) \ + (* GET_Color3f(disp)) parameters +static INLINE _glptr_Color3f GET_Color3f(struct _glapi_table *disp) { + return (_glptr_Color3f) (GET_by_offset(disp, _gloffset_Color3f)); +} + +static INLINE void SET_Color3f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Color3f, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color3fv)(const GLfloat *); +#define CALL_Color3fv(disp, parameters) \ + (* GET_Color3fv(disp)) parameters +static INLINE _glptr_Color3fv GET_Color3fv(struct _glapi_table *disp) { + return (_glptr_Color3fv) (GET_by_offset(disp, _gloffset_Color3fv)); +} + +static INLINE void SET_Color3fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_Color3fv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color3i)(GLint, GLint, GLint); +#define CALL_Color3i(disp, parameters) \ + (* GET_Color3i(disp)) parameters +static INLINE _glptr_Color3i GET_Color3i(struct _glapi_table *disp) { + return (_glptr_Color3i) (GET_by_offset(disp, _gloffset_Color3i)); +} + +static INLINE void SET_Color3i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_Color3i, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color3iv)(const GLint *); +#define CALL_Color3iv(disp, parameters) \ + (* GET_Color3iv(disp)) parameters +static INLINE _glptr_Color3iv GET_Color3iv(struct _glapi_table *disp) { + return (_glptr_Color3iv) (GET_by_offset(disp, _gloffset_Color3iv)); +} + +static INLINE void SET_Color3iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_Color3iv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color3s)(GLshort, GLshort, GLshort); +#define CALL_Color3s(disp, parameters) \ + (* GET_Color3s(disp)) parameters +static INLINE _glptr_Color3s GET_Color3s(struct _glapi_table *disp) { + return (_glptr_Color3s) (GET_by_offset(disp, _gloffset_Color3s)); +} + +static INLINE void SET_Color3s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_Color3s, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color3sv)(const GLshort *); +#define CALL_Color3sv(disp, parameters) \ + (* GET_Color3sv(disp)) parameters +static INLINE _glptr_Color3sv GET_Color3sv(struct _glapi_table *disp) { + return (_glptr_Color3sv) (GET_by_offset(disp, _gloffset_Color3sv)); +} + +static INLINE void SET_Color3sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_Color3sv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color3ub)(GLubyte, GLubyte, GLubyte); +#define CALL_Color3ub(disp, parameters) \ + (* GET_Color3ub(disp)) parameters +static INLINE _glptr_Color3ub GET_Color3ub(struct _glapi_table *disp) { + return (_glptr_Color3ub) (GET_by_offset(disp, _gloffset_Color3ub)); +} + +static INLINE void SET_Color3ub(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLubyte, GLubyte, GLubyte)) { + SET_by_offset(disp, _gloffset_Color3ub, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color3ubv)(const GLubyte *); +#define CALL_Color3ubv(disp, parameters) \ + (* GET_Color3ubv(disp)) parameters +static INLINE _glptr_Color3ubv GET_Color3ubv(struct _glapi_table *disp) { + return (_glptr_Color3ubv) (GET_by_offset(disp, _gloffset_Color3ubv)); +} + +static INLINE void SET_Color3ubv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLubyte *)) { + SET_by_offset(disp, _gloffset_Color3ubv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color3ui)(GLuint, GLuint, GLuint); +#define CALL_Color3ui(disp, parameters) \ + (* GET_Color3ui(disp)) parameters +static INLINE _glptr_Color3ui GET_Color3ui(struct _glapi_table *disp) { + return (_glptr_Color3ui) (GET_by_offset(disp, _gloffset_Color3ui)); +} + +static INLINE void SET_Color3ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_Color3ui, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color3uiv)(const GLuint *); +#define CALL_Color3uiv(disp, parameters) \ + (* GET_Color3uiv(disp)) parameters +static INLINE _glptr_Color3uiv GET_Color3uiv(struct _glapi_table *disp) { + return (_glptr_Color3uiv) (GET_by_offset(disp, _gloffset_Color3uiv)); +} + +static INLINE void SET_Color3uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLuint *)) { + SET_by_offset(disp, _gloffset_Color3uiv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color3us)(GLushort, GLushort, GLushort); +#define CALL_Color3us(disp, parameters) \ + (* GET_Color3us(disp)) parameters +static INLINE _glptr_Color3us GET_Color3us(struct _glapi_table *disp) { + return (_glptr_Color3us) (GET_by_offset(disp, _gloffset_Color3us)); +} + +static INLINE void SET_Color3us(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLushort, GLushort, GLushort)) { + SET_by_offset(disp, _gloffset_Color3us, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color3usv)(const GLushort *); +#define CALL_Color3usv(disp, parameters) \ + (* GET_Color3usv(disp)) parameters +static INLINE _glptr_Color3usv GET_Color3usv(struct _glapi_table *disp) { + return (_glptr_Color3usv) (GET_by_offset(disp, _gloffset_Color3usv)); +} + +static INLINE void SET_Color3usv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLushort *)) { + SET_by_offset(disp, _gloffset_Color3usv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color4b)(GLbyte, GLbyte, GLbyte, GLbyte); +#define CALL_Color4b(disp, parameters) \ + (* GET_Color4b(disp)) parameters +static INLINE _glptr_Color4b GET_Color4b(struct _glapi_table *disp) { + return (_glptr_Color4b) (GET_by_offset(disp, _gloffset_Color4b)); +} + +static INLINE void SET_Color4b(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLbyte, GLbyte, GLbyte, GLbyte)) { + SET_by_offset(disp, _gloffset_Color4b, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color4bv)(const GLbyte *); +#define CALL_Color4bv(disp, parameters) \ + (* GET_Color4bv(disp)) parameters +static INLINE _glptr_Color4bv GET_Color4bv(struct _glapi_table *disp) { + return (_glptr_Color4bv) (GET_by_offset(disp, _gloffset_Color4bv)); +} + +static INLINE void SET_Color4bv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLbyte *)) { + SET_by_offset(disp, _gloffset_Color4bv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color4d)(GLdouble, GLdouble, GLdouble, GLdouble); +#define CALL_Color4d(disp, parameters) \ + (* GET_Color4d(disp)) parameters +static INLINE _glptr_Color4d GET_Color4d(struct _glapi_table *disp) { + return (_glptr_Color4d) (GET_by_offset(disp, _gloffset_Color4d)); +} + +static INLINE void SET_Color4d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Color4d, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color4dv)(const GLdouble *); +#define CALL_Color4dv(disp, parameters) \ + (* GET_Color4dv(disp)) parameters +static INLINE _glptr_Color4dv GET_Color4dv(struct _glapi_table *disp) { + return (_glptr_Color4dv) (GET_by_offset(disp, _gloffset_Color4dv)); +} + +static INLINE void SET_Color4dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_Color4dv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color4f)(GLfloat, GLfloat, GLfloat, GLfloat); +#define CALL_Color4f(disp, parameters) \ + (* GET_Color4f(disp)) parameters +static INLINE _glptr_Color4f GET_Color4f(struct _glapi_table *disp) { + return (_glptr_Color4f) (GET_by_offset(disp, _gloffset_Color4f)); +} + +static INLINE void SET_Color4f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Color4f, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color4fv)(const GLfloat *); +#define CALL_Color4fv(disp, parameters) \ + (* GET_Color4fv(disp)) parameters +static INLINE _glptr_Color4fv GET_Color4fv(struct _glapi_table *disp) { + return (_glptr_Color4fv) (GET_by_offset(disp, _gloffset_Color4fv)); +} + +static INLINE void SET_Color4fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_Color4fv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color4i)(GLint, GLint, GLint, GLint); +#define CALL_Color4i(disp, parameters) \ + (* GET_Color4i(disp)) parameters +static INLINE _glptr_Color4i GET_Color4i(struct _glapi_table *disp) { + return (_glptr_Color4i) (GET_by_offset(disp, _gloffset_Color4i)); +} + +static INLINE void SET_Color4i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_Color4i, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color4iv)(const GLint *); +#define CALL_Color4iv(disp, parameters) \ + (* GET_Color4iv(disp)) parameters +static INLINE _glptr_Color4iv GET_Color4iv(struct _glapi_table *disp) { + return (_glptr_Color4iv) (GET_by_offset(disp, _gloffset_Color4iv)); +} + +static INLINE void SET_Color4iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_Color4iv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color4s)(GLshort, GLshort, GLshort, GLshort); +#define CALL_Color4s(disp, parameters) \ + (* GET_Color4s(disp)) parameters +static INLINE _glptr_Color4s GET_Color4s(struct _glapi_table *disp) { + return (_glptr_Color4s) (GET_by_offset(disp, _gloffset_Color4s)); +} + +static INLINE void SET_Color4s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_Color4s, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color4sv)(const GLshort *); +#define CALL_Color4sv(disp, parameters) \ + (* GET_Color4sv(disp)) parameters +static INLINE _glptr_Color4sv GET_Color4sv(struct _glapi_table *disp) { + return (_glptr_Color4sv) (GET_by_offset(disp, _gloffset_Color4sv)); +} + +static INLINE void SET_Color4sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_Color4sv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color4ub)(GLubyte, GLubyte, GLubyte, GLubyte); +#define CALL_Color4ub(disp, parameters) \ + (* GET_Color4ub(disp)) parameters +static INLINE _glptr_Color4ub GET_Color4ub(struct _glapi_table *disp) { + return (_glptr_Color4ub) (GET_by_offset(disp, _gloffset_Color4ub)); +} + +static INLINE void SET_Color4ub(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLubyte, GLubyte, GLubyte, GLubyte)) { + SET_by_offset(disp, _gloffset_Color4ub, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color4ubv)(const GLubyte *); +#define CALL_Color4ubv(disp, parameters) \ + (* GET_Color4ubv(disp)) parameters +static INLINE _glptr_Color4ubv GET_Color4ubv(struct _glapi_table *disp) { + return (_glptr_Color4ubv) (GET_by_offset(disp, _gloffset_Color4ubv)); +} + +static INLINE void SET_Color4ubv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLubyte *)) { + SET_by_offset(disp, _gloffset_Color4ubv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color4ui)(GLuint, GLuint, GLuint, GLuint); +#define CALL_Color4ui(disp, parameters) \ + (* GET_Color4ui(disp)) parameters +static INLINE _glptr_Color4ui GET_Color4ui(struct _glapi_table *disp) { + return (_glptr_Color4ui) (GET_by_offset(disp, _gloffset_Color4ui)); +} + +static INLINE void SET_Color4ui(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_Color4ui, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color4uiv)(const GLuint *); +#define CALL_Color4uiv(disp, parameters) \ + (* GET_Color4uiv(disp)) parameters +static INLINE _glptr_Color4uiv GET_Color4uiv(struct _glapi_table *disp) { + return (_glptr_Color4uiv) (GET_by_offset(disp, _gloffset_Color4uiv)); +} + +static INLINE void SET_Color4uiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLuint *)) { + SET_by_offset(disp, _gloffset_Color4uiv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color4us)(GLushort, GLushort, GLushort, GLushort); +#define CALL_Color4us(disp, parameters) \ + (* GET_Color4us(disp)) parameters +static INLINE _glptr_Color4us GET_Color4us(struct _glapi_table *disp) { + return (_glptr_Color4us) (GET_by_offset(disp, _gloffset_Color4us)); +} + +static INLINE void SET_Color4us(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLushort, GLushort, GLushort, GLushort)) { + SET_by_offset(disp, _gloffset_Color4us, fn); +} + +typedef void (GLAPIENTRYP _glptr_Color4usv)(const GLushort *); +#define CALL_Color4usv(disp, parameters) \ + (* GET_Color4usv(disp)) parameters +static INLINE _glptr_Color4usv GET_Color4usv(struct _glapi_table *disp) { + return (_glptr_Color4usv) (GET_by_offset(disp, _gloffset_Color4usv)); +} + +static INLINE void SET_Color4usv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLushort *)) { + SET_by_offset(disp, _gloffset_Color4usv, fn); +} + +typedef void (GLAPIENTRYP _glptr_EdgeFlag)(GLboolean); +#define CALL_EdgeFlag(disp, parameters) \ + (* GET_EdgeFlag(disp)) parameters +static INLINE _glptr_EdgeFlag GET_EdgeFlag(struct _glapi_table *disp) { + return (_glptr_EdgeFlag) (GET_by_offset(disp, _gloffset_EdgeFlag)); +} + +static INLINE void SET_EdgeFlag(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLboolean)) { + SET_by_offset(disp, _gloffset_EdgeFlag, fn); +} + +typedef void (GLAPIENTRYP _glptr_EdgeFlagv)(const GLboolean *); +#define CALL_EdgeFlagv(disp, parameters) \ + (* GET_EdgeFlagv(disp)) parameters +static INLINE _glptr_EdgeFlagv GET_EdgeFlagv(struct _glapi_table *disp) { + return (_glptr_EdgeFlagv) (GET_by_offset(disp, _gloffset_EdgeFlagv)); +} + +static INLINE void SET_EdgeFlagv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLboolean *)) { + SET_by_offset(disp, _gloffset_EdgeFlagv, fn); +} + +typedef void (GLAPIENTRYP _glptr_End)(void); +#define CALL_End(disp, parameters) \ + (* GET_End(disp)) parameters +static INLINE _glptr_End GET_End(struct _glapi_table *disp) { + return (_glptr_End) (GET_by_offset(disp, _gloffset_End)); +} + +static INLINE void SET_End(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_End, fn); +} + +typedef void (GLAPIENTRYP _glptr_Indexd)(GLdouble); +#define CALL_Indexd(disp, parameters) \ + (* GET_Indexd(disp)) parameters +static INLINE _glptr_Indexd GET_Indexd(struct _glapi_table *disp) { + return (_glptr_Indexd) (GET_by_offset(disp, _gloffset_Indexd)); +} + +static INLINE void SET_Indexd(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble)) { + SET_by_offset(disp, _gloffset_Indexd, fn); +} + +typedef void (GLAPIENTRYP _glptr_Indexdv)(const GLdouble *); +#define CALL_Indexdv(disp, parameters) \ + (* GET_Indexdv(disp)) parameters +static INLINE _glptr_Indexdv GET_Indexdv(struct _glapi_table *disp) { + return (_glptr_Indexdv) (GET_by_offset(disp, _gloffset_Indexdv)); +} + +static INLINE void SET_Indexdv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_Indexdv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Indexf)(GLfloat); +#define CALL_Indexf(disp, parameters) \ + (* GET_Indexf(disp)) parameters +static INLINE _glptr_Indexf GET_Indexf(struct _glapi_table *disp) { + return (_glptr_Indexf) (GET_by_offset(disp, _gloffset_Indexf)); +} + +static INLINE void SET_Indexf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat)) { + SET_by_offset(disp, _gloffset_Indexf, fn); +} + +typedef void (GLAPIENTRYP _glptr_Indexfv)(const GLfloat *); +#define CALL_Indexfv(disp, parameters) \ + (* GET_Indexfv(disp)) parameters +static INLINE _glptr_Indexfv GET_Indexfv(struct _glapi_table *disp) { + return (_glptr_Indexfv) (GET_by_offset(disp, _gloffset_Indexfv)); +} + +static INLINE void SET_Indexfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_Indexfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Indexi)(GLint); +#define CALL_Indexi(disp, parameters) \ + (* GET_Indexi(disp)) parameters +static INLINE _glptr_Indexi GET_Indexi(struct _glapi_table *disp) { + return (_glptr_Indexi) (GET_by_offset(disp, _gloffset_Indexi)); +} + +static INLINE void SET_Indexi(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint)) { + SET_by_offset(disp, _gloffset_Indexi, fn); +} + +typedef void (GLAPIENTRYP _glptr_Indexiv)(const GLint *); +#define CALL_Indexiv(disp, parameters) \ + (* GET_Indexiv(disp)) parameters +static INLINE _glptr_Indexiv GET_Indexiv(struct _glapi_table *disp) { + return (_glptr_Indexiv) (GET_by_offset(disp, _gloffset_Indexiv)); +} + +static INLINE void SET_Indexiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_Indexiv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Indexs)(GLshort); +#define CALL_Indexs(disp, parameters) \ + (* GET_Indexs(disp)) parameters +static INLINE _glptr_Indexs GET_Indexs(struct _glapi_table *disp) { + return (_glptr_Indexs) (GET_by_offset(disp, _gloffset_Indexs)); +} + +static INLINE void SET_Indexs(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort)) { + SET_by_offset(disp, _gloffset_Indexs, fn); +} + +typedef void (GLAPIENTRYP _glptr_Indexsv)(const GLshort *); +#define CALL_Indexsv(disp, parameters) \ + (* GET_Indexsv(disp)) parameters +static INLINE _glptr_Indexsv GET_Indexsv(struct _glapi_table *disp) { + return (_glptr_Indexsv) (GET_by_offset(disp, _gloffset_Indexsv)); +} + +static INLINE void SET_Indexsv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_Indexsv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Normal3b)(GLbyte, GLbyte, GLbyte); +#define CALL_Normal3b(disp, parameters) \ + (* GET_Normal3b(disp)) parameters +static INLINE _glptr_Normal3b GET_Normal3b(struct _glapi_table *disp) { + return (_glptr_Normal3b) (GET_by_offset(disp, _gloffset_Normal3b)); +} + +static INLINE void SET_Normal3b(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLbyte, GLbyte, GLbyte)) { + SET_by_offset(disp, _gloffset_Normal3b, fn); +} + +typedef void (GLAPIENTRYP _glptr_Normal3bv)(const GLbyte *); +#define CALL_Normal3bv(disp, parameters) \ + (* GET_Normal3bv(disp)) parameters +static INLINE _glptr_Normal3bv GET_Normal3bv(struct _glapi_table *disp) { + return (_glptr_Normal3bv) (GET_by_offset(disp, _gloffset_Normal3bv)); +} + +static INLINE void SET_Normal3bv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLbyte *)) { + SET_by_offset(disp, _gloffset_Normal3bv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Normal3d)(GLdouble, GLdouble, GLdouble); +#define CALL_Normal3d(disp, parameters) \ + (* GET_Normal3d(disp)) parameters +static INLINE _glptr_Normal3d GET_Normal3d(struct _glapi_table *disp) { + return (_glptr_Normal3d) (GET_by_offset(disp, _gloffset_Normal3d)); +} + +static INLINE void SET_Normal3d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Normal3d, fn); +} + +typedef void (GLAPIENTRYP _glptr_Normal3dv)(const GLdouble *); +#define CALL_Normal3dv(disp, parameters) \ + (* GET_Normal3dv(disp)) parameters +static INLINE _glptr_Normal3dv GET_Normal3dv(struct _glapi_table *disp) { + return (_glptr_Normal3dv) (GET_by_offset(disp, _gloffset_Normal3dv)); +} + +static INLINE void SET_Normal3dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_Normal3dv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Normal3f)(GLfloat, GLfloat, GLfloat); +#define CALL_Normal3f(disp, parameters) \ + (* GET_Normal3f(disp)) parameters +static INLINE _glptr_Normal3f GET_Normal3f(struct _glapi_table *disp) { + return (_glptr_Normal3f) (GET_by_offset(disp, _gloffset_Normal3f)); +} + +static INLINE void SET_Normal3f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Normal3f, fn); +} + +typedef void (GLAPIENTRYP _glptr_Normal3fv)(const GLfloat *); +#define CALL_Normal3fv(disp, parameters) \ + (* GET_Normal3fv(disp)) parameters +static INLINE _glptr_Normal3fv GET_Normal3fv(struct _glapi_table *disp) { + return (_glptr_Normal3fv) (GET_by_offset(disp, _gloffset_Normal3fv)); +} + +static INLINE void SET_Normal3fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_Normal3fv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Normal3i)(GLint, GLint, GLint); +#define CALL_Normal3i(disp, parameters) \ + (* GET_Normal3i(disp)) parameters +static INLINE _glptr_Normal3i GET_Normal3i(struct _glapi_table *disp) { + return (_glptr_Normal3i) (GET_by_offset(disp, _gloffset_Normal3i)); +} + +static INLINE void SET_Normal3i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_Normal3i, fn); +} + +typedef void (GLAPIENTRYP _glptr_Normal3iv)(const GLint *); +#define CALL_Normal3iv(disp, parameters) \ + (* GET_Normal3iv(disp)) parameters +static INLINE _glptr_Normal3iv GET_Normal3iv(struct _glapi_table *disp) { + return (_glptr_Normal3iv) (GET_by_offset(disp, _gloffset_Normal3iv)); +} + +static INLINE void SET_Normal3iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_Normal3iv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Normal3s)(GLshort, GLshort, GLshort); +#define CALL_Normal3s(disp, parameters) \ + (* GET_Normal3s(disp)) parameters +static INLINE _glptr_Normal3s GET_Normal3s(struct _glapi_table *disp) { + return (_glptr_Normal3s) (GET_by_offset(disp, _gloffset_Normal3s)); +} + +static INLINE void SET_Normal3s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_Normal3s, fn); +} + +typedef void (GLAPIENTRYP _glptr_Normal3sv)(const GLshort *); +#define CALL_Normal3sv(disp, parameters) \ + (* GET_Normal3sv(disp)) parameters +static INLINE _glptr_Normal3sv GET_Normal3sv(struct _glapi_table *disp) { + return (_glptr_Normal3sv) (GET_by_offset(disp, _gloffset_Normal3sv)); +} + +static INLINE void SET_Normal3sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_Normal3sv, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos2d)(GLdouble, GLdouble); +#define CALL_RasterPos2d(disp, parameters) \ + (* GET_RasterPos2d(disp)) parameters +static INLINE _glptr_RasterPos2d GET_RasterPos2d(struct _glapi_table *disp) { + return (_glptr_RasterPos2d) (GET_by_offset(disp, _gloffset_RasterPos2d)); +} + +static INLINE void SET_RasterPos2d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_RasterPos2d, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos2dv)(const GLdouble *); +#define CALL_RasterPos2dv(disp, parameters) \ + (* GET_RasterPos2dv(disp)) parameters +static INLINE _glptr_RasterPos2dv GET_RasterPos2dv(struct _glapi_table *disp) { + return (_glptr_RasterPos2dv) (GET_by_offset(disp, _gloffset_RasterPos2dv)); +} + +static INLINE void SET_RasterPos2dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_RasterPos2dv, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos2f)(GLfloat, GLfloat); +#define CALL_RasterPos2f(disp, parameters) \ + (* GET_RasterPos2f(disp)) parameters +static INLINE _glptr_RasterPos2f GET_RasterPos2f(struct _glapi_table *disp) { + return (_glptr_RasterPos2f) (GET_by_offset(disp, _gloffset_RasterPos2f)); +} + +static INLINE void SET_RasterPos2f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_RasterPos2f, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos2fv)(const GLfloat *); +#define CALL_RasterPos2fv(disp, parameters) \ + (* GET_RasterPos2fv(disp)) parameters +static INLINE _glptr_RasterPos2fv GET_RasterPos2fv(struct _glapi_table *disp) { + return (_glptr_RasterPos2fv) (GET_by_offset(disp, _gloffset_RasterPos2fv)); +} + +static INLINE void SET_RasterPos2fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_RasterPos2fv, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos2i)(GLint, GLint); +#define CALL_RasterPos2i(disp, parameters) \ + (* GET_RasterPos2i(disp)) parameters +static INLINE _glptr_RasterPos2i GET_RasterPos2i(struct _glapi_table *disp) { + return (_glptr_RasterPos2i) (GET_by_offset(disp, _gloffset_RasterPos2i)); +} + +static INLINE void SET_RasterPos2i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint)) { + SET_by_offset(disp, _gloffset_RasterPos2i, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos2iv)(const GLint *); +#define CALL_RasterPos2iv(disp, parameters) \ + (* GET_RasterPos2iv(disp)) parameters +static INLINE _glptr_RasterPos2iv GET_RasterPos2iv(struct _glapi_table *disp) { + return (_glptr_RasterPos2iv) (GET_by_offset(disp, _gloffset_RasterPos2iv)); +} + +static INLINE void SET_RasterPos2iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_RasterPos2iv, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos2s)(GLshort, GLshort); +#define CALL_RasterPos2s(disp, parameters) \ + (* GET_RasterPos2s(disp)) parameters +static INLINE _glptr_RasterPos2s GET_RasterPos2s(struct _glapi_table *disp) { + return (_glptr_RasterPos2s) (GET_by_offset(disp, _gloffset_RasterPos2s)); +} + +static INLINE void SET_RasterPos2s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_RasterPos2s, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos2sv)(const GLshort *); +#define CALL_RasterPos2sv(disp, parameters) \ + (* GET_RasterPos2sv(disp)) parameters +static INLINE _glptr_RasterPos2sv GET_RasterPos2sv(struct _glapi_table *disp) { + return (_glptr_RasterPos2sv) (GET_by_offset(disp, _gloffset_RasterPos2sv)); +} + +static INLINE void SET_RasterPos2sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_RasterPos2sv, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos3d)(GLdouble, GLdouble, GLdouble); +#define CALL_RasterPos3d(disp, parameters) \ + (* GET_RasterPos3d(disp)) parameters +static INLINE _glptr_RasterPos3d GET_RasterPos3d(struct _glapi_table *disp) { + return (_glptr_RasterPos3d) (GET_by_offset(disp, _gloffset_RasterPos3d)); +} + +static INLINE void SET_RasterPos3d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_RasterPos3d, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos3dv)(const GLdouble *); +#define CALL_RasterPos3dv(disp, parameters) \ + (* GET_RasterPos3dv(disp)) parameters +static INLINE _glptr_RasterPos3dv GET_RasterPos3dv(struct _glapi_table *disp) { + return (_glptr_RasterPos3dv) (GET_by_offset(disp, _gloffset_RasterPos3dv)); +} + +static INLINE void SET_RasterPos3dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_RasterPos3dv, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos3f)(GLfloat, GLfloat, GLfloat); +#define CALL_RasterPos3f(disp, parameters) \ + (* GET_RasterPos3f(disp)) parameters +static INLINE _glptr_RasterPos3f GET_RasterPos3f(struct _glapi_table *disp) { + return (_glptr_RasterPos3f) (GET_by_offset(disp, _gloffset_RasterPos3f)); +} + +static INLINE void SET_RasterPos3f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_RasterPos3f, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos3fv)(const GLfloat *); +#define CALL_RasterPos3fv(disp, parameters) \ + (* GET_RasterPos3fv(disp)) parameters +static INLINE _glptr_RasterPos3fv GET_RasterPos3fv(struct _glapi_table *disp) { + return (_glptr_RasterPos3fv) (GET_by_offset(disp, _gloffset_RasterPos3fv)); +} + +static INLINE void SET_RasterPos3fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_RasterPos3fv, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos3i)(GLint, GLint, GLint); +#define CALL_RasterPos3i(disp, parameters) \ + (* GET_RasterPos3i(disp)) parameters +static INLINE _glptr_RasterPos3i GET_RasterPos3i(struct _glapi_table *disp) { + return (_glptr_RasterPos3i) (GET_by_offset(disp, _gloffset_RasterPos3i)); +} + +static INLINE void SET_RasterPos3i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_RasterPos3i, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos3iv)(const GLint *); +#define CALL_RasterPos3iv(disp, parameters) \ + (* GET_RasterPos3iv(disp)) parameters +static INLINE _glptr_RasterPos3iv GET_RasterPos3iv(struct _glapi_table *disp) { + return (_glptr_RasterPos3iv) (GET_by_offset(disp, _gloffset_RasterPos3iv)); +} + +static INLINE void SET_RasterPos3iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_RasterPos3iv, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos3s)(GLshort, GLshort, GLshort); +#define CALL_RasterPos3s(disp, parameters) \ + (* GET_RasterPos3s(disp)) parameters +static INLINE _glptr_RasterPos3s GET_RasterPos3s(struct _glapi_table *disp) { + return (_glptr_RasterPos3s) (GET_by_offset(disp, _gloffset_RasterPos3s)); +} + +static INLINE void SET_RasterPos3s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_RasterPos3s, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos3sv)(const GLshort *); +#define CALL_RasterPos3sv(disp, parameters) \ + (* GET_RasterPos3sv(disp)) parameters +static INLINE _glptr_RasterPos3sv GET_RasterPos3sv(struct _glapi_table *disp) { + return (_glptr_RasterPos3sv) (GET_by_offset(disp, _gloffset_RasterPos3sv)); +} + +static INLINE void SET_RasterPos3sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_RasterPos3sv, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos4d)(GLdouble, GLdouble, GLdouble, GLdouble); +#define CALL_RasterPos4d(disp, parameters) \ + (* GET_RasterPos4d(disp)) parameters +static INLINE _glptr_RasterPos4d GET_RasterPos4d(struct _glapi_table *disp) { + return (_glptr_RasterPos4d) (GET_by_offset(disp, _gloffset_RasterPos4d)); +} + +static INLINE void SET_RasterPos4d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_RasterPos4d, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos4dv)(const GLdouble *); +#define CALL_RasterPos4dv(disp, parameters) \ + (* GET_RasterPos4dv(disp)) parameters +static INLINE _glptr_RasterPos4dv GET_RasterPos4dv(struct _glapi_table *disp) { + return (_glptr_RasterPos4dv) (GET_by_offset(disp, _gloffset_RasterPos4dv)); +} + +static INLINE void SET_RasterPos4dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_RasterPos4dv, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos4f)(GLfloat, GLfloat, GLfloat, GLfloat); +#define CALL_RasterPos4f(disp, parameters) \ + (* GET_RasterPos4f(disp)) parameters +static INLINE _glptr_RasterPos4f GET_RasterPos4f(struct _glapi_table *disp) { + return (_glptr_RasterPos4f) (GET_by_offset(disp, _gloffset_RasterPos4f)); +} + +static INLINE void SET_RasterPos4f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_RasterPos4f, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos4fv)(const GLfloat *); +#define CALL_RasterPos4fv(disp, parameters) \ + (* GET_RasterPos4fv(disp)) parameters +static INLINE _glptr_RasterPos4fv GET_RasterPos4fv(struct _glapi_table *disp) { + return (_glptr_RasterPos4fv) (GET_by_offset(disp, _gloffset_RasterPos4fv)); +} + +static INLINE void SET_RasterPos4fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_RasterPos4fv, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos4i)(GLint, GLint, GLint, GLint); +#define CALL_RasterPos4i(disp, parameters) \ + (* GET_RasterPos4i(disp)) parameters +static INLINE _glptr_RasterPos4i GET_RasterPos4i(struct _glapi_table *disp) { + return (_glptr_RasterPos4i) (GET_by_offset(disp, _gloffset_RasterPos4i)); +} + +static INLINE void SET_RasterPos4i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_RasterPos4i, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos4iv)(const GLint *); +#define CALL_RasterPos4iv(disp, parameters) \ + (* GET_RasterPos4iv(disp)) parameters +static INLINE _glptr_RasterPos4iv GET_RasterPos4iv(struct _glapi_table *disp) { + return (_glptr_RasterPos4iv) (GET_by_offset(disp, _gloffset_RasterPos4iv)); +} + +static INLINE void SET_RasterPos4iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_RasterPos4iv, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos4s)(GLshort, GLshort, GLshort, GLshort); +#define CALL_RasterPos4s(disp, parameters) \ + (* GET_RasterPos4s(disp)) parameters +static INLINE _glptr_RasterPos4s GET_RasterPos4s(struct _glapi_table *disp) { + return (_glptr_RasterPos4s) (GET_by_offset(disp, _gloffset_RasterPos4s)); +} + +static INLINE void SET_RasterPos4s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_RasterPos4s, fn); +} + +typedef void (GLAPIENTRYP _glptr_RasterPos4sv)(const GLshort *); +#define CALL_RasterPos4sv(disp, parameters) \ + (* GET_RasterPos4sv(disp)) parameters +static INLINE _glptr_RasterPos4sv GET_RasterPos4sv(struct _glapi_table *disp) { + return (_glptr_RasterPos4sv) (GET_by_offset(disp, _gloffset_RasterPos4sv)); +} + +static INLINE void SET_RasterPos4sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_RasterPos4sv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Rectd)(GLdouble, GLdouble, GLdouble, GLdouble); +#define CALL_Rectd(disp, parameters) \ + (* GET_Rectd(disp)) parameters +static INLINE _glptr_Rectd GET_Rectd(struct _glapi_table *disp) { + return (_glptr_Rectd) (GET_by_offset(disp, _gloffset_Rectd)); +} + +static INLINE void SET_Rectd(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Rectd, fn); +} + +typedef void (GLAPIENTRYP _glptr_Rectdv)(const GLdouble *, const GLdouble *); +#define CALL_Rectdv(disp, parameters) \ + (* GET_Rectdv(disp)) parameters +static INLINE _glptr_Rectdv GET_Rectdv(struct _glapi_table *disp) { + return (_glptr_Rectdv) (GET_by_offset(disp, _gloffset_Rectdv)); +} + +static INLINE void SET_Rectdv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *, const GLdouble *)) { + SET_by_offset(disp, _gloffset_Rectdv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Rectf)(GLfloat, GLfloat, GLfloat, GLfloat); +#define CALL_Rectf(disp, parameters) \ + (* GET_Rectf(disp)) parameters +static INLINE _glptr_Rectf GET_Rectf(struct _glapi_table *disp) { + return (_glptr_Rectf) (GET_by_offset(disp, _gloffset_Rectf)); +} + +static INLINE void SET_Rectf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Rectf, fn); +} + +typedef void (GLAPIENTRYP _glptr_Rectfv)(const GLfloat *, const GLfloat *); +#define CALL_Rectfv(disp, parameters) \ + (* GET_Rectfv(disp)) parameters +static INLINE _glptr_Rectfv GET_Rectfv(struct _glapi_table *disp) { + return (_glptr_Rectfv) (GET_by_offset(disp, _gloffset_Rectfv)); +} + +static INLINE void SET_Rectfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *, const GLfloat *)) { + SET_by_offset(disp, _gloffset_Rectfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Recti)(GLint, GLint, GLint, GLint); +#define CALL_Recti(disp, parameters) \ + (* GET_Recti(disp)) parameters +static INLINE _glptr_Recti GET_Recti(struct _glapi_table *disp) { + return (_glptr_Recti) (GET_by_offset(disp, _gloffset_Recti)); +} + +static INLINE void SET_Recti(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_Recti, fn); +} + +typedef void (GLAPIENTRYP _glptr_Rectiv)(const GLint *, const GLint *); +#define CALL_Rectiv(disp, parameters) \ + (* GET_Rectiv(disp)) parameters +static INLINE _glptr_Rectiv GET_Rectiv(struct _glapi_table *disp) { + return (_glptr_Rectiv) (GET_by_offset(disp, _gloffset_Rectiv)); +} + +static INLINE void SET_Rectiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *, const GLint *)) { + SET_by_offset(disp, _gloffset_Rectiv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Rects)(GLshort, GLshort, GLshort, GLshort); +#define CALL_Rects(disp, parameters) \ + (* GET_Rects(disp)) parameters +static INLINE _glptr_Rects GET_Rects(struct _glapi_table *disp) { + return (_glptr_Rects) (GET_by_offset(disp, _gloffset_Rects)); +} + +static INLINE void SET_Rects(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_Rects, fn); +} + +typedef void (GLAPIENTRYP _glptr_Rectsv)(const GLshort *, const GLshort *); +#define CALL_Rectsv(disp, parameters) \ + (* GET_Rectsv(disp)) parameters +static INLINE _glptr_Rectsv GET_Rectsv(struct _glapi_table *disp) { + return (_glptr_Rectsv) (GET_by_offset(disp, _gloffset_Rectsv)); +} + +static INLINE void SET_Rectsv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *, const GLshort *)) { + SET_by_offset(disp, _gloffset_Rectsv, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord1d)(GLdouble); +#define CALL_TexCoord1d(disp, parameters) \ + (* GET_TexCoord1d(disp)) parameters +static INLINE _glptr_TexCoord1d GET_TexCoord1d(struct _glapi_table *disp) { + return (_glptr_TexCoord1d) (GET_by_offset(disp, _gloffset_TexCoord1d)); +} + +static INLINE void SET_TexCoord1d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble)) { + SET_by_offset(disp, _gloffset_TexCoord1d, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord1dv)(const GLdouble *); +#define CALL_TexCoord1dv(disp, parameters) \ + (* GET_TexCoord1dv(disp)) parameters +static INLINE _glptr_TexCoord1dv GET_TexCoord1dv(struct _glapi_table *disp) { + return (_glptr_TexCoord1dv) (GET_by_offset(disp, _gloffset_TexCoord1dv)); +} + +static INLINE void SET_TexCoord1dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_TexCoord1dv, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord1f)(GLfloat); +#define CALL_TexCoord1f(disp, parameters) \ + (* GET_TexCoord1f(disp)) parameters +static INLINE _glptr_TexCoord1f GET_TexCoord1f(struct _glapi_table *disp) { + return (_glptr_TexCoord1f) (GET_by_offset(disp, _gloffset_TexCoord1f)); +} + +static INLINE void SET_TexCoord1f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat)) { + SET_by_offset(disp, _gloffset_TexCoord1f, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord1fv)(const GLfloat *); +#define CALL_TexCoord1fv(disp, parameters) \ + (* GET_TexCoord1fv(disp)) parameters +static INLINE _glptr_TexCoord1fv GET_TexCoord1fv(struct _glapi_table *disp) { + return (_glptr_TexCoord1fv) (GET_by_offset(disp, _gloffset_TexCoord1fv)); +} + +static INLINE void SET_TexCoord1fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_TexCoord1fv, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord1i)(GLint); +#define CALL_TexCoord1i(disp, parameters) \ + (* GET_TexCoord1i(disp)) parameters +static INLINE _glptr_TexCoord1i GET_TexCoord1i(struct _glapi_table *disp) { + return (_glptr_TexCoord1i) (GET_by_offset(disp, _gloffset_TexCoord1i)); +} + +static INLINE void SET_TexCoord1i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint)) { + SET_by_offset(disp, _gloffset_TexCoord1i, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord1iv)(const GLint *); +#define CALL_TexCoord1iv(disp, parameters) \ + (* GET_TexCoord1iv(disp)) parameters +static INLINE _glptr_TexCoord1iv GET_TexCoord1iv(struct _glapi_table *disp) { + return (_glptr_TexCoord1iv) (GET_by_offset(disp, _gloffset_TexCoord1iv)); +} + +static INLINE void SET_TexCoord1iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_TexCoord1iv, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord1s)(GLshort); +#define CALL_TexCoord1s(disp, parameters) \ + (* GET_TexCoord1s(disp)) parameters +static INLINE _glptr_TexCoord1s GET_TexCoord1s(struct _glapi_table *disp) { + return (_glptr_TexCoord1s) (GET_by_offset(disp, _gloffset_TexCoord1s)); +} + +static INLINE void SET_TexCoord1s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort)) { + SET_by_offset(disp, _gloffset_TexCoord1s, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord1sv)(const GLshort *); +#define CALL_TexCoord1sv(disp, parameters) \ + (* GET_TexCoord1sv(disp)) parameters +static INLINE _glptr_TexCoord1sv GET_TexCoord1sv(struct _glapi_table *disp) { + return (_glptr_TexCoord1sv) (GET_by_offset(disp, _gloffset_TexCoord1sv)); +} + +static INLINE void SET_TexCoord1sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_TexCoord1sv, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord2d)(GLdouble, GLdouble); +#define CALL_TexCoord2d(disp, parameters) \ + (* GET_TexCoord2d(disp)) parameters +static INLINE _glptr_TexCoord2d GET_TexCoord2d(struct _glapi_table *disp) { + return (_glptr_TexCoord2d) (GET_by_offset(disp, _gloffset_TexCoord2d)); +} + +static INLINE void SET_TexCoord2d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_TexCoord2d, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord2dv)(const GLdouble *); +#define CALL_TexCoord2dv(disp, parameters) \ + (* GET_TexCoord2dv(disp)) parameters +static INLINE _glptr_TexCoord2dv GET_TexCoord2dv(struct _glapi_table *disp) { + return (_glptr_TexCoord2dv) (GET_by_offset(disp, _gloffset_TexCoord2dv)); +} + +static INLINE void SET_TexCoord2dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_TexCoord2dv, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord2f)(GLfloat, GLfloat); +#define CALL_TexCoord2f(disp, parameters) \ + (* GET_TexCoord2f(disp)) parameters +static INLINE _glptr_TexCoord2f GET_TexCoord2f(struct _glapi_table *disp) { + return (_glptr_TexCoord2f) (GET_by_offset(disp, _gloffset_TexCoord2f)); +} + +static INLINE void SET_TexCoord2f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_TexCoord2f, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord2fv)(const GLfloat *); +#define CALL_TexCoord2fv(disp, parameters) \ + (* GET_TexCoord2fv(disp)) parameters +static INLINE _glptr_TexCoord2fv GET_TexCoord2fv(struct _glapi_table *disp) { + return (_glptr_TexCoord2fv) (GET_by_offset(disp, _gloffset_TexCoord2fv)); +} + +static INLINE void SET_TexCoord2fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_TexCoord2fv, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord2i)(GLint, GLint); +#define CALL_TexCoord2i(disp, parameters) \ + (* GET_TexCoord2i(disp)) parameters +static INLINE _glptr_TexCoord2i GET_TexCoord2i(struct _glapi_table *disp) { + return (_glptr_TexCoord2i) (GET_by_offset(disp, _gloffset_TexCoord2i)); +} + +static INLINE void SET_TexCoord2i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint)) { + SET_by_offset(disp, _gloffset_TexCoord2i, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord2iv)(const GLint *); +#define CALL_TexCoord2iv(disp, parameters) \ + (* GET_TexCoord2iv(disp)) parameters +static INLINE _glptr_TexCoord2iv GET_TexCoord2iv(struct _glapi_table *disp) { + return (_glptr_TexCoord2iv) (GET_by_offset(disp, _gloffset_TexCoord2iv)); +} + +static INLINE void SET_TexCoord2iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_TexCoord2iv, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord2s)(GLshort, GLshort); +#define CALL_TexCoord2s(disp, parameters) \ + (* GET_TexCoord2s(disp)) parameters +static INLINE _glptr_TexCoord2s GET_TexCoord2s(struct _glapi_table *disp) { + return (_glptr_TexCoord2s) (GET_by_offset(disp, _gloffset_TexCoord2s)); +} + +static INLINE void SET_TexCoord2s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_TexCoord2s, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord2sv)(const GLshort *); +#define CALL_TexCoord2sv(disp, parameters) \ + (* GET_TexCoord2sv(disp)) parameters +static INLINE _glptr_TexCoord2sv GET_TexCoord2sv(struct _glapi_table *disp) { + return (_glptr_TexCoord2sv) (GET_by_offset(disp, _gloffset_TexCoord2sv)); +} + +static INLINE void SET_TexCoord2sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_TexCoord2sv, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord3d)(GLdouble, GLdouble, GLdouble); +#define CALL_TexCoord3d(disp, parameters) \ + (* GET_TexCoord3d(disp)) parameters +static INLINE _glptr_TexCoord3d GET_TexCoord3d(struct _glapi_table *disp) { + return (_glptr_TexCoord3d) (GET_by_offset(disp, _gloffset_TexCoord3d)); +} + +static INLINE void SET_TexCoord3d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_TexCoord3d, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord3dv)(const GLdouble *); +#define CALL_TexCoord3dv(disp, parameters) \ + (* GET_TexCoord3dv(disp)) parameters +static INLINE _glptr_TexCoord3dv GET_TexCoord3dv(struct _glapi_table *disp) { + return (_glptr_TexCoord3dv) (GET_by_offset(disp, _gloffset_TexCoord3dv)); +} + +static INLINE void SET_TexCoord3dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_TexCoord3dv, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord3f)(GLfloat, GLfloat, GLfloat); +#define CALL_TexCoord3f(disp, parameters) \ + (* GET_TexCoord3f(disp)) parameters +static INLINE _glptr_TexCoord3f GET_TexCoord3f(struct _glapi_table *disp) { + return (_glptr_TexCoord3f) (GET_by_offset(disp, _gloffset_TexCoord3f)); +} + +static INLINE void SET_TexCoord3f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_TexCoord3f, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord3fv)(const GLfloat *); +#define CALL_TexCoord3fv(disp, parameters) \ + (* GET_TexCoord3fv(disp)) parameters +static INLINE _glptr_TexCoord3fv GET_TexCoord3fv(struct _glapi_table *disp) { + return (_glptr_TexCoord3fv) (GET_by_offset(disp, _gloffset_TexCoord3fv)); +} + +static INLINE void SET_TexCoord3fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_TexCoord3fv, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord3i)(GLint, GLint, GLint); +#define CALL_TexCoord3i(disp, parameters) \ + (* GET_TexCoord3i(disp)) parameters +static INLINE _glptr_TexCoord3i GET_TexCoord3i(struct _glapi_table *disp) { + return (_glptr_TexCoord3i) (GET_by_offset(disp, _gloffset_TexCoord3i)); +} + +static INLINE void SET_TexCoord3i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_TexCoord3i, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord3iv)(const GLint *); +#define CALL_TexCoord3iv(disp, parameters) \ + (* GET_TexCoord3iv(disp)) parameters +static INLINE _glptr_TexCoord3iv GET_TexCoord3iv(struct _glapi_table *disp) { + return (_glptr_TexCoord3iv) (GET_by_offset(disp, _gloffset_TexCoord3iv)); +} + +static INLINE void SET_TexCoord3iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_TexCoord3iv, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord3s)(GLshort, GLshort, GLshort); +#define CALL_TexCoord3s(disp, parameters) \ + (* GET_TexCoord3s(disp)) parameters +static INLINE _glptr_TexCoord3s GET_TexCoord3s(struct _glapi_table *disp) { + return (_glptr_TexCoord3s) (GET_by_offset(disp, _gloffset_TexCoord3s)); +} + +static INLINE void SET_TexCoord3s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_TexCoord3s, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord3sv)(const GLshort *); +#define CALL_TexCoord3sv(disp, parameters) \ + (* GET_TexCoord3sv(disp)) parameters +static INLINE _glptr_TexCoord3sv GET_TexCoord3sv(struct _glapi_table *disp) { + return (_glptr_TexCoord3sv) (GET_by_offset(disp, _gloffset_TexCoord3sv)); +} + +static INLINE void SET_TexCoord3sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_TexCoord3sv, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord4d)(GLdouble, GLdouble, GLdouble, GLdouble); +#define CALL_TexCoord4d(disp, parameters) \ + (* GET_TexCoord4d(disp)) parameters +static INLINE _glptr_TexCoord4d GET_TexCoord4d(struct _glapi_table *disp) { + return (_glptr_TexCoord4d) (GET_by_offset(disp, _gloffset_TexCoord4d)); +} + +static INLINE void SET_TexCoord4d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_TexCoord4d, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord4dv)(const GLdouble *); +#define CALL_TexCoord4dv(disp, parameters) \ + (* GET_TexCoord4dv(disp)) parameters +static INLINE _glptr_TexCoord4dv GET_TexCoord4dv(struct _glapi_table *disp) { + return (_glptr_TexCoord4dv) (GET_by_offset(disp, _gloffset_TexCoord4dv)); +} + +static INLINE void SET_TexCoord4dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_TexCoord4dv, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord4f)(GLfloat, GLfloat, GLfloat, GLfloat); +#define CALL_TexCoord4f(disp, parameters) \ + (* GET_TexCoord4f(disp)) parameters +static INLINE _glptr_TexCoord4f GET_TexCoord4f(struct _glapi_table *disp) { + return (_glptr_TexCoord4f) (GET_by_offset(disp, _gloffset_TexCoord4f)); +} + +static INLINE void SET_TexCoord4f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_TexCoord4f, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord4fv)(const GLfloat *); +#define CALL_TexCoord4fv(disp, parameters) \ + (* GET_TexCoord4fv(disp)) parameters +static INLINE _glptr_TexCoord4fv GET_TexCoord4fv(struct _glapi_table *disp) { + return (_glptr_TexCoord4fv) (GET_by_offset(disp, _gloffset_TexCoord4fv)); +} + +static INLINE void SET_TexCoord4fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_TexCoord4fv, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord4i)(GLint, GLint, GLint, GLint); +#define CALL_TexCoord4i(disp, parameters) \ + (* GET_TexCoord4i(disp)) parameters +static INLINE _glptr_TexCoord4i GET_TexCoord4i(struct _glapi_table *disp) { + return (_glptr_TexCoord4i) (GET_by_offset(disp, _gloffset_TexCoord4i)); +} + +static INLINE void SET_TexCoord4i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_TexCoord4i, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord4iv)(const GLint *); +#define CALL_TexCoord4iv(disp, parameters) \ + (* GET_TexCoord4iv(disp)) parameters +static INLINE _glptr_TexCoord4iv GET_TexCoord4iv(struct _glapi_table *disp) { + return (_glptr_TexCoord4iv) (GET_by_offset(disp, _gloffset_TexCoord4iv)); +} + +static INLINE void SET_TexCoord4iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_TexCoord4iv, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord4s)(GLshort, GLshort, GLshort, GLshort); +#define CALL_TexCoord4s(disp, parameters) \ + (* GET_TexCoord4s(disp)) parameters +static INLINE _glptr_TexCoord4s GET_TexCoord4s(struct _glapi_table *disp) { + return (_glptr_TexCoord4s) (GET_by_offset(disp, _gloffset_TexCoord4s)); +} + +static INLINE void SET_TexCoord4s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_TexCoord4s, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoord4sv)(const GLshort *); +#define CALL_TexCoord4sv(disp, parameters) \ + (* GET_TexCoord4sv(disp)) parameters +static INLINE _glptr_TexCoord4sv GET_TexCoord4sv(struct _glapi_table *disp) { + return (_glptr_TexCoord4sv) (GET_by_offset(disp, _gloffset_TexCoord4sv)); +} + +static INLINE void SET_TexCoord4sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_TexCoord4sv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex2d)(GLdouble, GLdouble); +#define CALL_Vertex2d(disp, parameters) \ + (* GET_Vertex2d(disp)) parameters +static INLINE _glptr_Vertex2d GET_Vertex2d(struct _glapi_table *disp) { + return (_glptr_Vertex2d) (GET_by_offset(disp, _gloffset_Vertex2d)); +} + +static INLINE void SET_Vertex2d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Vertex2d, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex2dv)(const GLdouble *); +#define CALL_Vertex2dv(disp, parameters) \ + (* GET_Vertex2dv(disp)) parameters +static INLINE _glptr_Vertex2dv GET_Vertex2dv(struct _glapi_table *disp) { + return (_glptr_Vertex2dv) (GET_by_offset(disp, _gloffset_Vertex2dv)); +} + +static INLINE void SET_Vertex2dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_Vertex2dv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex2f)(GLfloat, GLfloat); +#define CALL_Vertex2f(disp, parameters) \ + (* GET_Vertex2f(disp)) parameters +static INLINE _glptr_Vertex2f GET_Vertex2f(struct _glapi_table *disp) { + return (_glptr_Vertex2f) (GET_by_offset(disp, _gloffset_Vertex2f)); +} + +static INLINE void SET_Vertex2f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Vertex2f, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex2fv)(const GLfloat *); +#define CALL_Vertex2fv(disp, parameters) \ + (* GET_Vertex2fv(disp)) parameters +static INLINE _glptr_Vertex2fv GET_Vertex2fv(struct _glapi_table *disp) { + return (_glptr_Vertex2fv) (GET_by_offset(disp, _gloffset_Vertex2fv)); +} + +static INLINE void SET_Vertex2fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_Vertex2fv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex2i)(GLint, GLint); +#define CALL_Vertex2i(disp, parameters) \ + (* GET_Vertex2i(disp)) parameters +static INLINE _glptr_Vertex2i GET_Vertex2i(struct _glapi_table *disp) { + return (_glptr_Vertex2i) (GET_by_offset(disp, _gloffset_Vertex2i)); +} + +static INLINE void SET_Vertex2i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint)) { + SET_by_offset(disp, _gloffset_Vertex2i, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex2iv)(const GLint *); +#define CALL_Vertex2iv(disp, parameters) \ + (* GET_Vertex2iv(disp)) parameters +static INLINE _glptr_Vertex2iv GET_Vertex2iv(struct _glapi_table *disp) { + return (_glptr_Vertex2iv) (GET_by_offset(disp, _gloffset_Vertex2iv)); +} + +static INLINE void SET_Vertex2iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_Vertex2iv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex2s)(GLshort, GLshort); +#define CALL_Vertex2s(disp, parameters) \ + (* GET_Vertex2s(disp)) parameters +static INLINE _glptr_Vertex2s GET_Vertex2s(struct _glapi_table *disp) { + return (_glptr_Vertex2s) (GET_by_offset(disp, _gloffset_Vertex2s)); +} + +static INLINE void SET_Vertex2s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_Vertex2s, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex2sv)(const GLshort *); +#define CALL_Vertex2sv(disp, parameters) \ + (* GET_Vertex2sv(disp)) parameters +static INLINE _glptr_Vertex2sv GET_Vertex2sv(struct _glapi_table *disp) { + return (_glptr_Vertex2sv) (GET_by_offset(disp, _gloffset_Vertex2sv)); +} + +static INLINE void SET_Vertex2sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_Vertex2sv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex3d)(GLdouble, GLdouble, GLdouble); +#define CALL_Vertex3d(disp, parameters) \ + (* GET_Vertex3d(disp)) parameters +static INLINE _glptr_Vertex3d GET_Vertex3d(struct _glapi_table *disp) { + return (_glptr_Vertex3d) (GET_by_offset(disp, _gloffset_Vertex3d)); +} + +static INLINE void SET_Vertex3d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Vertex3d, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex3dv)(const GLdouble *); +#define CALL_Vertex3dv(disp, parameters) \ + (* GET_Vertex3dv(disp)) parameters +static INLINE _glptr_Vertex3dv GET_Vertex3dv(struct _glapi_table *disp) { + return (_glptr_Vertex3dv) (GET_by_offset(disp, _gloffset_Vertex3dv)); +} + +static INLINE void SET_Vertex3dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_Vertex3dv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex3f)(GLfloat, GLfloat, GLfloat); +#define CALL_Vertex3f(disp, parameters) \ + (* GET_Vertex3f(disp)) parameters +static INLINE _glptr_Vertex3f GET_Vertex3f(struct _glapi_table *disp) { + return (_glptr_Vertex3f) (GET_by_offset(disp, _gloffset_Vertex3f)); +} + +static INLINE void SET_Vertex3f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Vertex3f, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex3fv)(const GLfloat *); +#define CALL_Vertex3fv(disp, parameters) \ + (* GET_Vertex3fv(disp)) parameters +static INLINE _glptr_Vertex3fv GET_Vertex3fv(struct _glapi_table *disp) { + return (_glptr_Vertex3fv) (GET_by_offset(disp, _gloffset_Vertex3fv)); +} + +static INLINE void SET_Vertex3fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_Vertex3fv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex3i)(GLint, GLint, GLint); +#define CALL_Vertex3i(disp, parameters) \ + (* GET_Vertex3i(disp)) parameters +static INLINE _glptr_Vertex3i GET_Vertex3i(struct _glapi_table *disp) { + return (_glptr_Vertex3i) (GET_by_offset(disp, _gloffset_Vertex3i)); +} + +static INLINE void SET_Vertex3i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_Vertex3i, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex3iv)(const GLint *); +#define CALL_Vertex3iv(disp, parameters) \ + (* GET_Vertex3iv(disp)) parameters +static INLINE _glptr_Vertex3iv GET_Vertex3iv(struct _glapi_table *disp) { + return (_glptr_Vertex3iv) (GET_by_offset(disp, _gloffset_Vertex3iv)); +} + +static INLINE void SET_Vertex3iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_Vertex3iv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex3s)(GLshort, GLshort, GLshort); +#define CALL_Vertex3s(disp, parameters) \ + (* GET_Vertex3s(disp)) parameters +static INLINE _glptr_Vertex3s GET_Vertex3s(struct _glapi_table *disp) { + return (_glptr_Vertex3s) (GET_by_offset(disp, _gloffset_Vertex3s)); +} + +static INLINE void SET_Vertex3s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_Vertex3s, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex3sv)(const GLshort *); +#define CALL_Vertex3sv(disp, parameters) \ + (* GET_Vertex3sv(disp)) parameters +static INLINE _glptr_Vertex3sv GET_Vertex3sv(struct _glapi_table *disp) { + return (_glptr_Vertex3sv) (GET_by_offset(disp, _gloffset_Vertex3sv)); +} + +static INLINE void SET_Vertex3sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_Vertex3sv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex4d)(GLdouble, GLdouble, GLdouble, GLdouble); +#define CALL_Vertex4d(disp, parameters) \ + (* GET_Vertex4d(disp)) parameters +static INLINE _glptr_Vertex4d GET_Vertex4d(struct _glapi_table *disp) { + return (_glptr_Vertex4d) (GET_by_offset(disp, _gloffset_Vertex4d)); +} + +static INLINE void SET_Vertex4d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Vertex4d, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex4dv)(const GLdouble *); +#define CALL_Vertex4dv(disp, parameters) \ + (* GET_Vertex4dv(disp)) parameters +static INLINE _glptr_Vertex4dv GET_Vertex4dv(struct _glapi_table *disp) { + return (_glptr_Vertex4dv) (GET_by_offset(disp, _gloffset_Vertex4dv)); +} + +static INLINE void SET_Vertex4dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_Vertex4dv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex4f)(GLfloat, GLfloat, GLfloat, GLfloat); +#define CALL_Vertex4f(disp, parameters) \ + (* GET_Vertex4f(disp)) parameters +static INLINE _glptr_Vertex4f GET_Vertex4f(struct _glapi_table *disp) { + return (_glptr_Vertex4f) (GET_by_offset(disp, _gloffset_Vertex4f)); +} + +static INLINE void SET_Vertex4f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Vertex4f, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex4fv)(const GLfloat *); +#define CALL_Vertex4fv(disp, parameters) \ + (* GET_Vertex4fv(disp)) parameters +static INLINE _glptr_Vertex4fv GET_Vertex4fv(struct _glapi_table *disp) { + return (_glptr_Vertex4fv) (GET_by_offset(disp, _gloffset_Vertex4fv)); +} + +static INLINE void SET_Vertex4fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_Vertex4fv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex4i)(GLint, GLint, GLint, GLint); +#define CALL_Vertex4i(disp, parameters) \ + (* GET_Vertex4i(disp)) parameters +static INLINE _glptr_Vertex4i GET_Vertex4i(struct _glapi_table *disp) { + return (_glptr_Vertex4i) (GET_by_offset(disp, _gloffset_Vertex4i)); +} + +static INLINE void SET_Vertex4i(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_Vertex4i, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex4iv)(const GLint *); +#define CALL_Vertex4iv(disp, parameters) \ + (* GET_Vertex4iv(disp)) parameters +static INLINE _glptr_Vertex4iv GET_Vertex4iv(struct _glapi_table *disp) { + return (_glptr_Vertex4iv) (GET_by_offset(disp, _gloffset_Vertex4iv)); +} + +static INLINE void SET_Vertex4iv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_Vertex4iv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex4s)(GLshort, GLshort, GLshort, GLshort); +#define CALL_Vertex4s(disp, parameters) \ + (* GET_Vertex4s(disp)) parameters +static INLINE _glptr_Vertex4s GET_Vertex4s(struct _glapi_table *disp) { + return (_glptr_Vertex4s) (GET_by_offset(disp, _gloffset_Vertex4s)); +} + +static INLINE void SET_Vertex4s(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_Vertex4s, fn); +} + +typedef void (GLAPIENTRYP _glptr_Vertex4sv)(const GLshort *); +#define CALL_Vertex4sv(disp, parameters) \ + (* GET_Vertex4sv(disp)) parameters +static INLINE _glptr_Vertex4sv GET_Vertex4sv(struct _glapi_table *disp) { + return (_glptr_Vertex4sv) (GET_by_offset(disp, _gloffset_Vertex4sv)); +} + +static INLINE void SET_Vertex4sv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_Vertex4sv, fn); +} + +typedef void (GLAPIENTRYP _glptr_ClipPlane)(GLenum, const GLdouble *); +#define CALL_ClipPlane(disp, parameters) \ + (* GET_ClipPlane(disp)) parameters +static INLINE _glptr_ClipPlane GET_ClipPlane(struct _glapi_table *disp) { + return (_glptr_ClipPlane) (GET_by_offset(disp, _gloffset_ClipPlane)); +} + +static INLINE void SET_ClipPlane(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLdouble *)) { + SET_by_offset(disp, _gloffset_ClipPlane, fn); +} + +typedef void (GLAPIENTRYP _glptr_ColorMaterial)(GLenum, GLenum); +#define CALL_ColorMaterial(disp, parameters) \ + (* GET_ColorMaterial(disp)) parameters +static INLINE _glptr_ColorMaterial GET_ColorMaterial(struct _glapi_table *disp) { + return (_glptr_ColorMaterial) (GET_by_offset(disp, _gloffset_ColorMaterial)); +} + +static INLINE void SET_ColorMaterial(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_ColorMaterial, fn); +} + +typedef void (GLAPIENTRYP _glptr_CullFace)(GLenum); +#define CALL_CullFace(disp, parameters) \ + (* GET_CullFace(disp)) parameters +static INLINE _glptr_CullFace GET_CullFace(struct _glapi_table *disp) { + return (_glptr_CullFace) (GET_by_offset(disp, _gloffset_CullFace)); +} + +static INLINE void SET_CullFace(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_CullFace, fn); +} + +typedef void (GLAPIENTRYP _glptr_Fogf)(GLenum, GLfloat); +#define CALL_Fogf(disp, parameters) \ + (* GET_Fogf(disp)) parameters +static INLINE _glptr_Fogf GET_Fogf(struct _glapi_table *disp) { + return (_glptr_Fogf) (GET_by_offset(disp, _gloffset_Fogf)); +} + +static INLINE void SET_Fogf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_Fogf, fn); +} + +typedef void (GLAPIENTRYP _glptr_Fogfv)(GLenum, const GLfloat *); +#define CALL_Fogfv(disp, parameters) \ + (* GET_Fogfv(disp)) parameters +static INLINE _glptr_Fogfv GET_Fogfv(struct _glapi_table *disp) { + return (_glptr_Fogfv) (GET_by_offset(disp, _gloffset_Fogfv)); +} + +static INLINE void SET_Fogfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_Fogfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Fogi)(GLenum, GLint); +#define CALL_Fogi(disp, parameters) \ + (* GET_Fogi(disp)) parameters +static INLINE _glptr_Fogi GET_Fogi(struct _glapi_table *disp) { + return (_glptr_Fogi) (GET_by_offset(disp, _gloffset_Fogi)); +} + +static INLINE void SET_Fogi(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint)) { + SET_by_offset(disp, _gloffset_Fogi, fn); +} + +typedef void (GLAPIENTRYP _glptr_Fogiv)(GLenum, const GLint *); +#define CALL_Fogiv(disp, parameters) \ + (* GET_Fogiv(disp)) parameters +static INLINE _glptr_Fogiv GET_Fogiv(struct _glapi_table *disp) { + return (_glptr_Fogiv) (GET_by_offset(disp, _gloffset_Fogiv)); +} + +static INLINE void SET_Fogiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_Fogiv, fn); +} + +typedef void (GLAPIENTRYP _glptr_FrontFace)(GLenum); +#define CALL_FrontFace(disp, parameters) \ + (* GET_FrontFace(disp)) parameters +static INLINE _glptr_FrontFace GET_FrontFace(struct _glapi_table *disp) { + return (_glptr_FrontFace) (GET_by_offset(disp, _gloffset_FrontFace)); +} + +static INLINE void SET_FrontFace(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_FrontFace, fn); +} + +typedef void (GLAPIENTRYP _glptr_Hint)(GLenum, GLenum); +#define CALL_Hint(disp, parameters) \ + (* GET_Hint(disp)) parameters +static INLINE _glptr_Hint GET_Hint(struct _glapi_table *disp) { + return (_glptr_Hint) (GET_by_offset(disp, _gloffset_Hint)); +} + +static INLINE void SET_Hint(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_Hint, fn); +} + +typedef void (GLAPIENTRYP _glptr_Lightf)(GLenum, GLenum, GLfloat); +#define CALL_Lightf(disp, parameters) \ + (* GET_Lightf(disp)) parameters +static INLINE _glptr_Lightf GET_Lightf(struct _glapi_table *disp) { + return (_glptr_Lightf) (GET_by_offset(disp, _gloffset_Lightf)); +} + +static INLINE void SET_Lightf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_Lightf, fn); +} + +typedef void (GLAPIENTRYP _glptr_Lightfv)(GLenum, GLenum, const GLfloat *); +#define CALL_Lightfv(disp, parameters) \ + (* GET_Lightfv(disp)) parameters +static INLINE _glptr_Lightfv GET_Lightfv(struct _glapi_table *disp) { + return (_glptr_Lightfv) (GET_by_offset(disp, _gloffset_Lightfv)); +} + +static INLINE void SET_Lightfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_Lightfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Lighti)(GLenum, GLenum, GLint); +#define CALL_Lighti(disp, parameters) \ + (* GET_Lighti(disp)) parameters +static INLINE _glptr_Lighti GET_Lighti(struct _glapi_table *disp) { + return (_glptr_Lighti) (GET_by_offset(disp, _gloffset_Lighti)); +} + +static INLINE void SET_Lighti(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint)) { + SET_by_offset(disp, _gloffset_Lighti, fn); +} + +typedef void (GLAPIENTRYP _glptr_Lightiv)(GLenum, GLenum, const GLint *); +#define CALL_Lightiv(disp, parameters) \ + (* GET_Lightiv(disp)) parameters +static INLINE _glptr_Lightiv GET_Lightiv(struct _glapi_table *disp) { + return (_glptr_Lightiv) (GET_by_offset(disp, _gloffset_Lightiv)); +} + +static INLINE void SET_Lightiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_Lightiv, fn); +} + +typedef void (GLAPIENTRYP _glptr_LightModelf)(GLenum, GLfloat); +#define CALL_LightModelf(disp, parameters) \ + (* GET_LightModelf(disp)) parameters +static INLINE _glptr_LightModelf GET_LightModelf(struct _glapi_table *disp) { + return (_glptr_LightModelf) (GET_by_offset(disp, _gloffset_LightModelf)); +} + +static INLINE void SET_LightModelf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_LightModelf, fn); +} + +typedef void (GLAPIENTRYP _glptr_LightModelfv)(GLenum, const GLfloat *); +#define CALL_LightModelfv(disp, parameters) \ + (* GET_LightModelfv(disp)) parameters +static INLINE _glptr_LightModelfv GET_LightModelfv(struct _glapi_table *disp) { + return (_glptr_LightModelfv) (GET_by_offset(disp, _gloffset_LightModelfv)); +} + +static INLINE void SET_LightModelfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_LightModelfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_LightModeli)(GLenum, GLint); +#define CALL_LightModeli(disp, parameters) \ + (* GET_LightModeli(disp)) parameters +static INLINE _glptr_LightModeli GET_LightModeli(struct _glapi_table *disp) { + return (_glptr_LightModeli) (GET_by_offset(disp, _gloffset_LightModeli)); +} + +static INLINE void SET_LightModeli(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint)) { + SET_by_offset(disp, _gloffset_LightModeli, fn); +} + +typedef void (GLAPIENTRYP _glptr_LightModeliv)(GLenum, const GLint *); +#define CALL_LightModeliv(disp, parameters) \ + (* GET_LightModeliv(disp)) parameters +static INLINE _glptr_LightModeliv GET_LightModeliv(struct _glapi_table *disp) { + return (_glptr_LightModeliv) (GET_by_offset(disp, _gloffset_LightModeliv)); +} + +static INLINE void SET_LightModeliv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_LightModeliv, fn); +} + +typedef void (GLAPIENTRYP _glptr_LineStipple)(GLint, GLushort); +#define CALL_LineStipple(disp, parameters) \ + (* GET_LineStipple(disp)) parameters +static INLINE _glptr_LineStipple GET_LineStipple(struct _glapi_table *disp) { + return (_glptr_LineStipple) (GET_by_offset(disp, _gloffset_LineStipple)); +} + +static INLINE void SET_LineStipple(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLushort)) { + SET_by_offset(disp, _gloffset_LineStipple, fn); +} + +typedef void (GLAPIENTRYP _glptr_LineWidth)(GLfloat); +#define CALL_LineWidth(disp, parameters) \ + (* GET_LineWidth(disp)) parameters +static INLINE _glptr_LineWidth GET_LineWidth(struct _glapi_table *disp) { + return (_glptr_LineWidth) (GET_by_offset(disp, _gloffset_LineWidth)); +} + +static INLINE void SET_LineWidth(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat)) { + SET_by_offset(disp, _gloffset_LineWidth, fn); +} + +typedef void (GLAPIENTRYP _glptr_Materialf)(GLenum, GLenum, GLfloat); +#define CALL_Materialf(disp, parameters) \ + (* GET_Materialf(disp)) parameters +static INLINE _glptr_Materialf GET_Materialf(struct _glapi_table *disp) { + return (_glptr_Materialf) (GET_by_offset(disp, _gloffset_Materialf)); +} + +static INLINE void SET_Materialf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_Materialf, fn); +} + +typedef void (GLAPIENTRYP _glptr_Materialfv)(GLenum, GLenum, const GLfloat *); +#define CALL_Materialfv(disp, parameters) \ + (* GET_Materialfv(disp)) parameters +static INLINE _glptr_Materialfv GET_Materialfv(struct _glapi_table *disp) { + return (_glptr_Materialfv) (GET_by_offset(disp, _gloffset_Materialfv)); +} + +static INLINE void SET_Materialfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_Materialfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Materiali)(GLenum, GLenum, GLint); +#define CALL_Materiali(disp, parameters) \ + (* GET_Materiali(disp)) parameters +static INLINE _glptr_Materiali GET_Materiali(struct _glapi_table *disp) { + return (_glptr_Materiali) (GET_by_offset(disp, _gloffset_Materiali)); +} + +static INLINE void SET_Materiali(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint)) { + SET_by_offset(disp, _gloffset_Materiali, fn); +} + +typedef void (GLAPIENTRYP _glptr_Materialiv)(GLenum, GLenum, const GLint *); +#define CALL_Materialiv(disp, parameters) \ + (* GET_Materialiv(disp)) parameters +static INLINE _glptr_Materialiv GET_Materialiv(struct _glapi_table *disp) { + return (_glptr_Materialiv) (GET_by_offset(disp, _gloffset_Materialiv)); +} + +static INLINE void SET_Materialiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_Materialiv, fn); +} + +typedef void (GLAPIENTRYP _glptr_PointSize)(GLfloat); +#define CALL_PointSize(disp, parameters) \ + (* GET_PointSize(disp)) parameters +static INLINE _glptr_PointSize GET_PointSize(struct _glapi_table *disp) { + return (_glptr_PointSize) (GET_by_offset(disp, _gloffset_PointSize)); +} + +static INLINE void SET_PointSize(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat)) { + SET_by_offset(disp, _gloffset_PointSize, fn); +} + +typedef void (GLAPIENTRYP _glptr_PolygonMode)(GLenum, GLenum); +#define CALL_PolygonMode(disp, parameters) \ + (* GET_PolygonMode(disp)) parameters +static INLINE _glptr_PolygonMode GET_PolygonMode(struct _glapi_table *disp) { + return (_glptr_PolygonMode) (GET_by_offset(disp, _gloffset_PolygonMode)); +} + +static INLINE void SET_PolygonMode(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_PolygonMode, fn); +} + +typedef void (GLAPIENTRYP _glptr_PolygonStipple)(const GLubyte *); +#define CALL_PolygonStipple(disp, parameters) \ + (* GET_PolygonStipple(disp)) parameters +static INLINE _glptr_PolygonStipple GET_PolygonStipple(struct _glapi_table *disp) { + return (_glptr_PolygonStipple) (GET_by_offset(disp, _gloffset_PolygonStipple)); +} + +static INLINE void SET_PolygonStipple(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLubyte *)) { + SET_by_offset(disp, _gloffset_PolygonStipple, fn); +} + +typedef void (GLAPIENTRYP _glptr_Scissor)(GLint, GLint, GLsizei, GLsizei); +#define CALL_Scissor(disp, parameters) \ + (* GET_Scissor(disp)) parameters +static INLINE _glptr_Scissor GET_Scissor(struct _glapi_table *disp) { + return (_glptr_Scissor) (GET_by_offset(disp, _gloffset_Scissor)); +} + +static INLINE void SET_Scissor(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLsizei, GLsizei)) { + SET_by_offset(disp, _gloffset_Scissor, fn); +} + +typedef void (GLAPIENTRYP _glptr_ShadeModel)(GLenum); +#define CALL_ShadeModel(disp, parameters) \ + (* GET_ShadeModel(disp)) parameters +static INLINE _glptr_ShadeModel GET_ShadeModel(struct _glapi_table *disp) { + return (_glptr_ShadeModel) (GET_by_offset(disp, _gloffset_ShadeModel)); +} + +static INLINE void SET_ShadeModel(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_ShadeModel, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexParameterf)(GLenum, GLenum, GLfloat); +#define CALL_TexParameterf(disp, parameters) \ + (* GET_TexParameterf(disp)) parameters +static INLINE _glptr_TexParameterf GET_TexParameterf(struct _glapi_table *disp) { + return (_glptr_TexParameterf) (GET_by_offset(disp, _gloffset_TexParameterf)); +} + +static INLINE void SET_TexParameterf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_TexParameterf, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexParameterfv)(GLenum, GLenum, const GLfloat *); +#define CALL_TexParameterfv(disp, parameters) \ + (* GET_TexParameterfv(disp)) parameters +static INLINE _glptr_TexParameterfv GET_TexParameterfv(struct _glapi_table *disp) { + return (_glptr_TexParameterfv) (GET_by_offset(disp, _gloffset_TexParameterfv)); +} + +static INLINE void SET_TexParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_TexParameterfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexParameteri)(GLenum, GLenum, GLint); +#define CALL_TexParameteri(disp, parameters) \ + (* GET_TexParameteri(disp)) parameters +static INLINE _glptr_TexParameteri GET_TexParameteri(struct _glapi_table *disp) { + return (_glptr_TexParameteri) (GET_by_offset(disp, _gloffset_TexParameteri)); +} + +static INLINE void SET_TexParameteri(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint)) { + SET_by_offset(disp, _gloffset_TexParameteri, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexParameteriv)(GLenum, GLenum, const GLint *); +#define CALL_TexParameteriv(disp, parameters) \ + (* GET_TexParameteriv(disp)) parameters +static INLINE _glptr_TexParameteriv GET_TexParameteriv(struct _glapi_table *disp) { + return (_glptr_TexParameteriv) (GET_by_offset(disp, _gloffset_TexParameteriv)); +} + +static INLINE void SET_TexParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_TexParameteriv, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexImage1D)(GLenum, GLint, GLint, GLsizei, GLint, GLenum, GLenum, const GLvoid *); +#define CALL_TexImage1D(disp, parameters) \ + (* GET_TexImage1D(disp)) parameters +static INLINE _glptr_TexImage1D GET_TexImage1D(struct _glapi_table *disp) { + return (_glptr_TexImage1D) (GET_by_offset(disp, _gloffset_TexImage1D)); +} + +static INLINE void SET_TexImage1D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLsizei, GLint, GLenum, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_TexImage1D, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexImage2D)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); +#define CALL_TexImage2D(disp, parameters) \ + (* GET_TexImage2D(disp)) parameters +static INLINE _glptr_TexImage2D GET_TexImage2D(struct _glapi_table *disp) { + return (_glptr_TexImage2D) (GET_by_offset(disp, _gloffset_TexImage2D)); +} + +static INLINE void SET_TexImage2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_TexImage2D, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexEnvf)(GLenum, GLenum, GLfloat); +#define CALL_TexEnvf(disp, parameters) \ + (* GET_TexEnvf(disp)) parameters +static INLINE _glptr_TexEnvf GET_TexEnvf(struct _glapi_table *disp) { + return (_glptr_TexEnvf) (GET_by_offset(disp, _gloffset_TexEnvf)); +} + +static INLINE void SET_TexEnvf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_TexEnvf, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexEnvfv)(GLenum, GLenum, const GLfloat *); +#define CALL_TexEnvfv(disp, parameters) \ + (* GET_TexEnvfv(disp)) parameters +static INLINE _glptr_TexEnvfv GET_TexEnvfv(struct _glapi_table *disp) { + return (_glptr_TexEnvfv) (GET_by_offset(disp, _gloffset_TexEnvfv)); +} + +static INLINE void SET_TexEnvfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_TexEnvfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexEnvi)(GLenum, GLenum, GLint); +#define CALL_TexEnvi(disp, parameters) \ + (* GET_TexEnvi(disp)) parameters +static INLINE _glptr_TexEnvi GET_TexEnvi(struct _glapi_table *disp) { + return (_glptr_TexEnvi) (GET_by_offset(disp, _gloffset_TexEnvi)); +} + +static INLINE void SET_TexEnvi(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint)) { + SET_by_offset(disp, _gloffset_TexEnvi, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexEnviv)(GLenum, GLenum, const GLint *); +#define CALL_TexEnviv(disp, parameters) \ + (* GET_TexEnviv(disp)) parameters +static INLINE _glptr_TexEnviv GET_TexEnviv(struct _glapi_table *disp) { + return (_glptr_TexEnviv) (GET_by_offset(disp, _gloffset_TexEnviv)); +} + +static INLINE void SET_TexEnviv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_TexEnviv, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexGend)(GLenum, GLenum, GLdouble); +#define CALL_TexGend(disp, parameters) \ + (* GET_TexGend(disp)) parameters +static INLINE _glptr_TexGend GET_TexGend(struct _glapi_table *disp) { + return (_glptr_TexGend) (GET_by_offset(disp, _gloffset_TexGend)); +} + +static INLINE void SET_TexGend(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLdouble)) { + SET_by_offset(disp, _gloffset_TexGend, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexGendv)(GLenum, GLenum, const GLdouble *); +#define CALL_TexGendv(disp, parameters) \ + (* GET_TexGendv(disp)) parameters +static INLINE _glptr_TexGendv GET_TexGendv(struct _glapi_table *disp) { + return (_glptr_TexGendv) (GET_by_offset(disp, _gloffset_TexGendv)); +} + +static INLINE void SET_TexGendv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLdouble *)) { + SET_by_offset(disp, _gloffset_TexGendv, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexGenf)(GLenum, GLenum, GLfloat); +#define CALL_TexGenf(disp, parameters) \ + (* GET_TexGenf(disp)) parameters +static INLINE _glptr_TexGenf GET_TexGenf(struct _glapi_table *disp) { + return (_glptr_TexGenf) (GET_by_offset(disp, _gloffset_TexGenf)); +} + +static INLINE void SET_TexGenf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_TexGenf, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexGenfv)(GLenum, GLenum, const GLfloat *); +#define CALL_TexGenfv(disp, parameters) \ + (* GET_TexGenfv(disp)) parameters +static INLINE _glptr_TexGenfv GET_TexGenfv(struct _glapi_table *disp) { + return (_glptr_TexGenfv) (GET_by_offset(disp, _gloffset_TexGenfv)); +} + +static INLINE void SET_TexGenfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_TexGenfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexGeni)(GLenum, GLenum, GLint); +#define CALL_TexGeni(disp, parameters) \ + (* GET_TexGeni(disp)) parameters +static INLINE _glptr_TexGeni GET_TexGeni(struct _glapi_table *disp) { + return (_glptr_TexGeni) (GET_by_offset(disp, _gloffset_TexGeni)); +} + +static INLINE void SET_TexGeni(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint)) { + SET_by_offset(disp, _gloffset_TexGeni, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexGeniv)(GLenum, GLenum, const GLint *); +#define CALL_TexGeniv(disp, parameters) \ + (* GET_TexGeniv(disp)) parameters +static INLINE _glptr_TexGeniv GET_TexGeniv(struct _glapi_table *disp) { + return (_glptr_TexGeniv) (GET_by_offset(disp, _gloffset_TexGeniv)); +} + +static INLINE void SET_TexGeniv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_TexGeniv, fn); +} + +typedef void (GLAPIENTRYP _glptr_FeedbackBuffer)(GLsizei, GLenum, GLfloat *); +#define CALL_FeedbackBuffer(disp, parameters) \ + (* GET_FeedbackBuffer(disp)) parameters +static INLINE _glptr_FeedbackBuffer GET_FeedbackBuffer(struct _glapi_table *disp) { + return (_glptr_FeedbackBuffer) (GET_by_offset(disp, _gloffset_FeedbackBuffer)); +} + +static INLINE void SET_FeedbackBuffer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_FeedbackBuffer, fn); +} + +typedef void (GLAPIENTRYP _glptr_SelectBuffer)(GLsizei, GLuint *); +#define CALL_SelectBuffer(disp, parameters) \ + (* GET_SelectBuffer(disp)) parameters +static INLINE _glptr_SelectBuffer GET_SelectBuffer(struct _glapi_table *disp) { + return (_glptr_SelectBuffer) (GET_by_offset(disp, _gloffset_SelectBuffer)); +} + +static INLINE void SET_SelectBuffer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_SelectBuffer, fn); +} + +typedef GLint (GLAPIENTRYP _glptr_RenderMode)(GLenum); +#define CALL_RenderMode(disp, parameters) \ + (* GET_RenderMode(disp)) parameters +static INLINE _glptr_RenderMode GET_RenderMode(struct _glapi_table *disp) { + return (_glptr_RenderMode) (GET_by_offset(disp, _gloffset_RenderMode)); +} + +static INLINE void SET_RenderMode(struct _glapi_table *disp, GLint (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_RenderMode, fn); +} + +typedef void (GLAPIENTRYP _glptr_InitNames)(void); +#define CALL_InitNames(disp, parameters) \ + (* GET_InitNames(disp)) parameters +static INLINE _glptr_InitNames GET_InitNames(struct _glapi_table *disp) { + return (_glptr_InitNames) (GET_by_offset(disp, _gloffset_InitNames)); +} + +static INLINE void SET_InitNames(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_InitNames, fn); +} + +typedef void (GLAPIENTRYP _glptr_LoadName)(GLuint); +#define CALL_LoadName(disp, parameters) \ + (* GET_LoadName(disp)) parameters +static INLINE _glptr_LoadName GET_LoadName(struct _glapi_table *disp) { + return (_glptr_LoadName) (GET_by_offset(disp, _gloffset_LoadName)); +} + +static INLINE void SET_LoadName(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_LoadName, fn); +} + +typedef void (GLAPIENTRYP _glptr_PassThrough)(GLfloat); +#define CALL_PassThrough(disp, parameters) \ + (* GET_PassThrough(disp)) parameters +static INLINE _glptr_PassThrough GET_PassThrough(struct _glapi_table *disp) { + return (_glptr_PassThrough) (GET_by_offset(disp, _gloffset_PassThrough)); +} + +static INLINE void SET_PassThrough(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat)) { + SET_by_offset(disp, _gloffset_PassThrough, fn); +} + +typedef void (GLAPIENTRYP _glptr_PopName)(void); +#define CALL_PopName(disp, parameters) \ + (* GET_PopName(disp)) parameters +static INLINE _glptr_PopName GET_PopName(struct _glapi_table *disp) { + return (_glptr_PopName) (GET_by_offset(disp, _gloffset_PopName)); +} + +static INLINE void SET_PopName(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_PopName, fn); +} + +typedef void (GLAPIENTRYP _glptr_PushName)(GLuint); +#define CALL_PushName(disp, parameters) \ + (* GET_PushName(disp)) parameters +static INLINE _glptr_PushName GET_PushName(struct _glapi_table *disp) { + return (_glptr_PushName) (GET_by_offset(disp, _gloffset_PushName)); +} + +static INLINE void SET_PushName(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_PushName, fn); +} + +typedef void (GLAPIENTRYP _glptr_DrawBuffer)(GLenum); +#define CALL_DrawBuffer(disp, parameters) \ + (* GET_DrawBuffer(disp)) parameters +static INLINE _glptr_DrawBuffer GET_DrawBuffer(struct _glapi_table *disp) { + return (_glptr_DrawBuffer) (GET_by_offset(disp, _gloffset_DrawBuffer)); +} + +static INLINE void SET_DrawBuffer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_DrawBuffer, fn); +} + +typedef void (GLAPIENTRYP _glptr_Clear)(GLbitfield); +#define CALL_Clear(disp, parameters) \ + (* GET_Clear(disp)) parameters +static INLINE _glptr_Clear GET_Clear(struct _glapi_table *disp) { + return (_glptr_Clear) (GET_by_offset(disp, _gloffset_Clear)); +} + +static INLINE void SET_Clear(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLbitfield)) { + SET_by_offset(disp, _gloffset_Clear, fn); +} + +typedef void (GLAPIENTRYP _glptr_ClearAccum)(GLfloat, GLfloat, GLfloat, GLfloat); +#define CALL_ClearAccum(disp, parameters) \ + (* GET_ClearAccum(disp)) parameters +static INLINE _glptr_ClearAccum GET_ClearAccum(struct _glapi_table *disp) { + return (_glptr_ClearAccum) (GET_by_offset(disp, _gloffset_ClearAccum)); +} + +static INLINE void SET_ClearAccum(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_ClearAccum, fn); +} + +typedef void (GLAPIENTRYP _glptr_ClearIndex)(GLfloat); +#define CALL_ClearIndex(disp, parameters) \ + (* GET_ClearIndex(disp)) parameters +static INLINE _glptr_ClearIndex GET_ClearIndex(struct _glapi_table *disp) { + return (_glptr_ClearIndex) (GET_by_offset(disp, _gloffset_ClearIndex)); +} + +static INLINE void SET_ClearIndex(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat)) { + SET_by_offset(disp, _gloffset_ClearIndex, fn); +} + +typedef void (GLAPIENTRYP _glptr_ClearColor)(GLclampf, GLclampf, GLclampf, GLclampf); +#define CALL_ClearColor(disp, parameters) \ + (* GET_ClearColor(disp)) parameters +static INLINE _glptr_ClearColor GET_ClearColor(struct _glapi_table *disp) { + return (_glptr_ClearColor) (GET_by_offset(disp, _gloffset_ClearColor)); +} + +static INLINE void SET_ClearColor(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf, GLclampf, GLclampf, GLclampf)) { + SET_by_offset(disp, _gloffset_ClearColor, fn); +} + +typedef void (GLAPIENTRYP _glptr_ClearStencil)(GLint); +#define CALL_ClearStencil(disp, parameters) \ + (* GET_ClearStencil(disp)) parameters +static INLINE _glptr_ClearStencil GET_ClearStencil(struct _glapi_table *disp) { + return (_glptr_ClearStencil) (GET_by_offset(disp, _gloffset_ClearStencil)); +} + +static INLINE void SET_ClearStencil(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint)) { + SET_by_offset(disp, _gloffset_ClearStencil, fn); +} + +typedef void (GLAPIENTRYP _glptr_ClearDepth)(GLclampd); +#define CALL_ClearDepth(disp, parameters) \ + (* GET_ClearDepth(disp)) parameters +static INLINE _glptr_ClearDepth GET_ClearDepth(struct _glapi_table *disp) { + return (_glptr_ClearDepth) (GET_by_offset(disp, _gloffset_ClearDepth)); +} + +static INLINE void SET_ClearDepth(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampd)) { + SET_by_offset(disp, _gloffset_ClearDepth, fn); +} + +typedef void (GLAPIENTRYP _glptr_StencilMask)(GLuint); +#define CALL_StencilMask(disp, parameters) \ + (* GET_StencilMask(disp)) parameters +static INLINE _glptr_StencilMask GET_StencilMask(struct _glapi_table *disp) { + return (_glptr_StencilMask) (GET_by_offset(disp, _gloffset_StencilMask)); +} + +static INLINE void SET_StencilMask(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_StencilMask, fn); +} + +typedef void (GLAPIENTRYP _glptr_ColorMask)(GLboolean, GLboolean, GLboolean, GLboolean); +#define CALL_ColorMask(disp, parameters) \ + (* GET_ColorMask(disp)) parameters +static INLINE _glptr_ColorMask GET_ColorMask(struct _glapi_table *disp) { + return (_glptr_ColorMask) (GET_by_offset(disp, _gloffset_ColorMask)); +} + +static INLINE void SET_ColorMask(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLboolean, GLboolean, GLboolean, GLboolean)) { + SET_by_offset(disp, _gloffset_ColorMask, fn); +} + +typedef void (GLAPIENTRYP _glptr_DepthMask)(GLboolean); +#define CALL_DepthMask(disp, parameters) \ + (* GET_DepthMask(disp)) parameters +static INLINE _glptr_DepthMask GET_DepthMask(struct _glapi_table *disp) { + return (_glptr_DepthMask) (GET_by_offset(disp, _gloffset_DepthMask)); +} + +static INLINE void SET_DepthMask(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLboolean)) { + SET_by_offset(disp, _gloffset_DepthMask, fn); +} + +typedef void (GLAPIENTRYP _glptr_IndexMask)(GLuint); +#define CALL_IndexMask(disp, parameters) \ + (* GET_IndexMask(disp)) parameters +static INLINE _glptr_IndexMask GET_IndexMask(struct _glapi_table *disp) { + return (_glptr_IndexMask) (GET_by_offset(disp, _gloffset_IndexMask)); +} + +static INLINE void SET_IndexMask(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IndexMask, fn); +} + +typedef void (GLAPIENTRYP _glptr_Accum)(GLenum, GLfloat); +#define CALL_Accum(disp, parameters) \ + (* GET_Accum(disp)) parameters +static INLINE _glptr_Accum GET_Accum(struct _glapi_table *disp) { + return (_glptr_Accum) (GET_by_offset(disp, _gloffset_Accum)); +} + +static INLINE void SET_Accum(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_Accum, fn); +} + +typedef void (GLAPIENTRYP _glptr_Disable)(GLenum); +#define CALL_Disable(disp, parameters) \ + (* GET_Disable(disp)) parameters +static INLINE _glptr_Disable GET_Disable(struct _glapi_table *disp) { + return (_glptr_Disable) (GET_by_offset(disp, _gloffset_Disable)); +} + +static INLINE void SET_Disable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_Disable, fn); +} + +typedef void (GLAPIENTRYP _glptr_Enable)(GLenum); +#define CALL_Enable(disp, parameters) \ + (* GET_Enable(disp)) parameters +static INLINE _glptr_Enable GET_Enable(struct _glapi_table *disp) { + return (_glptr_Enable) (GET_by_offset(disp, _gloffset_Enable)); +} + +static INLINE void SET_Enable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_Enable, fn); +} + +typedef void (GLAPIENTRYP _glptr_Finish)(void); +#define CALL_Finish(disp, parameters) \ + (* GET_Finish(disp)) parameters +static INLINE _glptr_Finish GET_Finish(struct _glapi_table *disp) { + return (_glptr_Finish) (GET_by_offset(disp, _gloffset_Finish)); +} + +static INLINE void SET_Finish(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_Finish, fn); +} + +typedef void (GLAPIENTRYP _glptr_Flush)(void); +#define CALL_Flush(disp, parameters) \ + (* GET_Flush(disp)) parameters +static INLINE _glptr_Flush GET_Flush(struct _glapi_table *disp) { + return (_glptr_Flush) (GET_by_offset(disp, _gloffset_Flush)); +} + +static INLINE void SET_Flush(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_Flush, fn); +} + +typedef void (GLAPIENTRYP _glptr_PopAttrib)(void); +#define CALL_PopAttrib(disp, parameters) \ + (* GET_PopAttrib(disp)) parameters +static INLINE _glptr_PopAttrib GET_PopAttrib(struct _glapi_table *disp) { + return (_glptr_PopAttrib) (GET_by_offset(disp, _gloffset_PopAttrib)); +} + +static INLINE void SET_PopAttrib(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_PopAttrib, fn); +} + +typedef void (GLAPIENTRYP _glptr_PushAttrib)(GLbitfield); +#define CALL_PushAttrib(disp, parameters) \ + (* GET_PushAttrib(disp)) parameters +static INLINE _glptr_PushAttrib GET_PushAttrib(struct _glapi_table *disp) { + return (_glptr_PushAttrib) (GET_by_offset(disp, _gloffset_PushAttrib)); +} + +static INLINE void SET_PushAttrib(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLbitfield)) { + SET_by_offset(disp, _gloffset_PushAttrib, fn); +} + +typedef void (GLAPIENTRYP _glptr_Map1d)(GLenum, GLdouble, GLdouble, GLint, GLint, const GLdouble *); +#define CALL_Map1d(disp, parameters) \ + (* GET_Map1d(disp)) parameters +static INLINE _glptr_Map1d GET_Map1d(struct _glapi_table *disp) { + return (_glptr_Map1d) (GET_by_offset(disp, _gloffset_Map1d)); +} + +static INLINE void SET_Map1d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLdouble, GLdouble, GLint, GLint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_Map1d, fn); +} + +typedef void (GLAPIENTRYP _glptr_Map1f)(GLenum, GLfloat, GLfloat, GLint, GLint, const GLfloat *); +#define CALL_Map1f(disp, parameters) \ + (* GET_Map1f(disp)) parameters +static INLINE _glptr_Map1f GET_Map1f(struct _glapi_table *disp) { + return (_glptr_Map1f) (GET_by_offset(disp, _gloffset_Map1f)); +} + +static INLINE void SET_Map1f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat, GLfloat, GLint, GLint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_Map1f, fn); +} + +typedef void (GLAPIENTRYP _glptr_Map2d)(GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *); +#define CALL_Map2d(disp, parameters) \ + (* GET_Map2d(disp)) parameters +static INLINE _glptr_Map2d GET_Map2d(struct _glapi_table *disp) { + return (_glptr_Map2d) (GET_by_offset(disp, _gloffset_Map2d)); +} + +static INLINE void SET_Map2d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLdouble, GLdouble, GLint, GLint, GLdouble, GLdouble, GLint, GLint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_Map2d, fn); +} + +typedef void (GLAPIENTRYP _glptr_Map2f)(GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *); +#define CALL_Map2f(disp, parameters) \ + (* GET_Map2f(disp)) parameters +static INLINE _glptr_Map2f GET_Map2f(struct _glapi_table *disp) { + return (_glptr_Map2f) (GET_by_offset(disp, _gloffset_Map2f)); +} + +static INLINE void SET_Map2f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat, GLfloat, GLint, GLint, GLfloat, GLfloat, GLint, GLint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_Map2f, fn); +} + +typedef void (GLAPIENTRYP _glptr_MapGrid1d)(GLint, GLdouble, GLdouble); +#define CALL_MapGrid1d(disp, parameters) \ + (* GET_MapGrid1d(disp)) parameters +static INLINE _glptr_MapGrid1d GET_MapGrid1d(struct _glapi_table *disp) { + return (_glptr_MapGrid1d) (GET_by_offset(disp, _gloffset_MapGrid1d)); +} + +static INLINE void SET_MapGrid1d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_MapGrid1d, fn); +} + +typedef void (GLAPIENTRYP _glptr_MapGrid1f)(GLint, GLfloat, GLfloat); +#define CALL_MapGrid1f(disp, parameters) \ + (* GET_MapGrid1f(disp)) parameters +static INLINE _glptr_MapGrid1f GET_MapGrid1f(struct _glapi_table *disp) { + return (_glptr_MapGrid1f) (GET_by_offset(disp, _gloffset_MapGrid1f)); +} + +static INLINE void SET_MapGrid1f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_MapGrid1f, fn); +} + +typedef void (GLAPIENTRYP _glptr_MapGrid2d)(GLint, GLdouble, GLdouble, GLint, GLdouble, GLdouble); +#define CALL_MapGrid2d(disp, parameters) \ + (* GET_MapGrid2d(disp)) parameters +static INLINE _glptr_MapGrid2d GET_MapGrid2d(struct _glapi_table *disp) { + return (_glptr_MapGrid2d) (GET_by_offset(disp, _gloffset_MapGrid2d)); +} + +static INLINE void SET_MapGrid2d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLdouble, GLdouble, GLint, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_MapGrid2d, fn); +} + +typedef void (GLAPIENTRYP _glptr_MapGrid2f)(GLint, GLfloat, GLfloat, GLint, GLfloat, GLfloat); +#define CALL_MapGrid2f(disp, parameters) \ + (* GET_MapGrid2f(disp)) parameters +static INLINE _glptr_MapGrid2f GET_MapGrid2f(struct _glapi_table *disp) { + return (_glptr_MapGrid2f) (GET_by_offset(disp, _gloffset_MapGrid2f)); +} + +static INLINE void SET_MapGrid2f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLfloat, GLfloat, GLint, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_MapGrid2f, fn); +} + +typedef void (GLAPIENTRYP _glptr_EvalCoord1d)(GLdouble); +#define CALL_EvalCoord1d(disp, parameters) \ + (* GET_EvalCoord1d(disp)) parameters +static INLINE _glptr_EvalCoord1d GET_EvalCoord1d(struct _glapi_table *disp) { + return (_glptr_EvalCoord1d) (GET_by_offset(disp, _gloffset_EvalCoord1d)); +} + +static INLINE void SET_EvalCoord1d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble)) { + SET_by_offset(disp, _gloffset_EvalCoord1d, fn); +} + +typedef void (GLAPIENTRYP _glptr_EvalCoord1dv)(const GLdouble *); +#define CALL_EvalCoord1dv(disp, parameters) \ + (* GET_EvalCoord1dv(disp)) parameters +static INLINE _glptr_EvalCoord1dv GET_EvalCoord1dv(struct _glapi_table *disp) { + return (_glptr_EvalCoord1dv) (GET_by_offset(disp, _gloffset_EvalCoord1dv)); +} + +static INLINE void SET_EvalCoord1dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_EvalCoord1dv, fn); +} + +typedef void (GLAPIENTRYP _glptr_EvalCoord1f)(GLfloat); +#define CALL_EvalCoord1f(disp, parameters) \ + (* GET_EvalCoord1f(disp)) parameters +static INLINE _glptr_EvalCoord1f GET_EvalCoord1f(struct _glapi_table *disp) { + return (_glptr_EvalCoord1f) (GET_by_offset(disp, _gloffset_EvalCoord1f)); +} + +static INLINE void SET_EvalCoord1f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat)) { + SET_by_offset(disp, _gloffset_EvalCoord1f, fn); +} + +typedef void (GLAPIENTRYP _glptr_EvalCoord1fv)(const GLfloat *); +#define CALL_EvalCoord1fv(disp, parameters) \ + (* GET_EvalCoord1fv(disp)) parameters +static INLINE _glptr_EvalCoord1fv GET_EvalCoord1fv(struct _glapi_table *disp) { + return (_glptr_EvalCoord1fv) (GET_by_offset(disp, _gloffset_EvalCoord1fv)); +} + +static INLINE void SET_EvalCoord1fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_EvalCoord1fv, fn); +} + +typedef void (GLAPIENTRYP _glptr_EvalCoord2d)(GLdouble, GLdouble); +#define CALL_EvalCoord2d(disp, parameters) \ + (* GET_EvalCoord2d(disp)) parameters +static INLINE _glptr_EvalCoord2d GET_EvalCoord2d(struct _glapi_table *disp) { + return (_glptr_EvalCoord2d) (GET_by_offset(disp, _gloffset_EvalCoord2d)); +} + +static INLINE void SET_EvalCoord2d(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_EvalCoord2d, fn); +} + +typedef void (GLAPIENTRYP _glptr_EvalCoord2dv)(const GLdouble *); +#define CALL_EvalCoord2dv(disp, parameters) \ + (* GET_EvalCoord2dv(disp)) parameters +static INLINE _glptr_EvalCoord2dv GET_EvalCoord2dv(struct _glapi_table *disp) { + return (_glptr_EvalCoord2dv) (GET_by_offset(disp, _gloffset_EvalCoord2dv)); +} + +static INLINE void SET_EvalCoord2dv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_EvalCoord2dv, fn); +} + +typedef void (GLAPIENTRYP _glptr_EvalCoord2f)(GLfloat, GLfloat); +#define CALL_EvalCoord2f(disp, parameters) \ + (* GET_EvalCoord2f(disp)) parameters +static INLINE _glptr_EvalCoord2f GET_EvalCoord2f(struct _glapi_table *disp) { + return (_glptr_EvalCoord2f) (GET_by_offset(disp, _gloffset_EvalCoord2f)); +} + +static INLINE void SET_EvalCoord2f(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_EvalCoord2f, fn); +} + +typedef void (GLAPIENTRYP _glptr_EvalCoord2fv)(const GLfloat *); +#define CALL_EvalCoord2fv(disp, parameters) \ + (* GET_EvalCoord2fv(disp)) parameters +static INLINE _glptr_EvalCoord2fv GET_EvalCoord2fv(struct _glapi_table *disp) { + return (_glptr_EvalCoord2fv) (GET_by_offset(disp, _gloffset_EvalCoord2fv)); +} + +static INLINE void SET_EvalCoord2fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_EvalCoord2fv, fn); +} + +typedef void (GLAPIENTRYP _glptr_EvalMesh1)(GLenum, GLint, GLint); +#define CALL_EvalMesh1(disp, parameters) \ + (* GET_EvalMesh1(disp)) parameters +static INLINE _glptr_EvalMesh1 GET_EvalMesh1(struct _glapi_table *disp) { + return (_glptr_EvalMesh1) (GET_by_offset(disp, _gloffset_EvalMesh1)); +} + +static INLINE void SET_EvalMesh1(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint)) { + SET_by_offset(disp, _gloffset_EvalMesh1, fn); +} + +typedef void (GLAPIENTRYP _glptr_EvalPoint1)(GLint); +#define CALL_EvalPoint1(disp, parameters) \ + (* GET_EvalPoint1(disp)) parameters +static INLINE _glptr_EvalPoint1 GET_EvalPoint1(struct _glapi_table *disp) { + return (_glptr_EvalPoint1) (GET_by_offset(disp, _gloffset_EvalPoint1)); +} + +static INLINE void SET_EvalPoint1(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint)) { + SET_by_offset(disp, _gloffset_EvalPoint1, fn); +} + +typedef void (GLAPIENTRYP _glptr_EvalMesh2)(GLenum, GLint, GLint, GLint, GLint); +#define CALL_EvalMesh2(disp, parameters) \ + (* GET_EvalMesh2(disp)) parameters +static INLINE _glptr_EvalMesh2 GET_EvalMesh2(struct _glapi_table *disp) { + return (_glptr_EvalMesh2) (GET_by_offset(disp, _gloffset_EvalMesh2)); +} + +static INLINE void SET_EvalMesh2(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_EvalMesh2, fn); +} + +typedef void (GLAPIENTRYP _glptr_EvalPoint2)(GLint, GLint); +#define CALL_EvalPoint2(disp, parameters) \ + (* GET_EvalPoint2(disp)) parameters +static INLINE _glptr_EvalPoint2 GET_EvalPoint2(struct _glapi_table *disp) { + return (_glptr_EvalPoint2) (GET_by_offset(disp, _gloffset_EvalPoint2)); +} + +static INLINE void SET_EvalPoint2(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint)) { + SET_by_offset(disp, _gloffset_EvalPoint2, fn); +} + +typedef void (GLAPIENTRYP _glptr_AlphaFunc)(GLenum, GLclampf); +#define CALL_AlphaFunc(disp, parameters) \ + (* GET_AlphaFunc(disp)) parameters +static INLINE _glptr_AlphaFunc GET_AlphaFunc(struct _glapi_table *disp) { + return (_glptr_AlphaFunc) (GET_by_offset(disp, _gloffset_AlphaFunc)); +} + +static INLINE void SET_AlphaFunc(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLclampf)) { + SET_by_offset(disp, _gloffset_AlphaFunc, fn); +} + +typedef void (GLAPIENTRYP _glptr_BlendFunc)(GLenum, GLenum); +#define CALL_BlendFunc(disp, parameters) \ + (* GET_BlendFunc(disp)) parameters +static INLINE _glptr_BlendFunc GET_BlendFunc(struct _glapi_table *disp) { + return (_glptr_BlendFunc) (GET_by_offset(disp, _gloffset_BlendFunc)); +} + +static INLINE void SET_BlendFunc(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_BlendFunc, fn); +} + +typedef void (GLAPIENTRYP _glptr_LogicOp)(GLenum); +#define CALL_LogicOp(disp, parameters) \ + (* GET_LogicOp(disp)) parameters +static INLINE _glptr_LogicOp GET_LogicOp(struct _glapi_table *disp) { + return (_glptr_LogicOp) (GET_by_offset(disp, _gloffset_LogicOp)); +} + +static INLINE void SET_LogicOp(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_LogicOp, fn); +} + +typedef void (GLAPIENTRYP _glptr_StencilFunc)(GLenum, GLint, GLuint); +#define CALL_StencilFunc(disp, parameters) \ + (* GET_StencilFunc(disp)) parameters +static INLINE _glptr_StencilFunc GET_StencilFunc(struct _glapi_table *disp) { + return (_glptr_StencilFunc) (GET_by_offset(disp, _gloffset_StencilFunc)); +} + +static INLINE void SET_StencilFunc(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLuint)) { + SET_by_offset(disp, _gloffset_StencilFunc, fn); +} + +typedef void (GLAPIENTRYP _glptr_StencilOp)(GLenum, GLenum, GLenum); +#define CALL_StencilOp(disp, parameters) \ + (* GET_StencilOp(disp)) parameters +static INLINE _glptr_StencilOp GET_StencilOp(struct _glapi_table *disp) { + return (_glptr_StencilOp) (GET_by_offset(disp, _gloffset_StencilOp)); +} + +static INLINE void SET_StencilOp(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_StencilOp, fn); +} + +typedef void (GLAPIENTRYP _glptr_DepthFunc)(GLenum); +#define CALL_DepthFunc(disp, parameters) \ + (* GET_DepthFunc(disp)) parameters +static INLINE _glptr_DepthFunc GET_DepthFunc(struct _glapi_table *disp) { + return (_glptr_DepthFunc) (GET_by_offset(disp, _gloffset_DepthFunc)); +} + +static INLINE void SET_DepthFunc(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_DepthFunc, fn); +} + +typedef void (GLAPIENTRYP _glptr_PixelZoom)(GLfloat, GLfloat); +#define CALL_PixelZoom(disp, parameters) \ + (* GET_PixelZoom(disp)) parameters +static INLINE _glptr_PixelZoom GET_PixelZoom(struct _glapi_table *disp) { + return (_glptr_PixelZoom) (GET_by_offset(disp, _gloffset_PixelZoom)); +} + +static INLINE void SET_PixelZoom(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_PixelZoom, fn); +} + +typedef void (GLAPIENTRYP _glptr_PixelTransferf)(GLenum, GLfloat); +#define CALL_PixelTransferf(disp, parameters) \ + (* GET_PixelTransferf(disp)) parameters +static INLINE _glptr_PixelTransferf GET_PixelTransferf(struct _glapi_table *disp) { + return (_glptr_PixelTransferf) (GET_by_offset(disp, _gloffset_PixelTransferf)); +} + +static INLINE void SET_PixelTransferf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_PixelTransferf, fn); +} + +typedef void (GLAPIENTRYP _glptr_PixelTransferi)(GLenum, GLint); +#define CALL_PixelTransferi(disp, parameters) \ + (* GET_PixelTransferi(disp)) parameters +static INLINE _glptr_PixelTransferi GET_PixelTransferi(struct _glapi_table *disp) { + return (_glptr_PixelTransferi) (GET_by_offset(disp, _gloffset_PixelTransferi)); +} + +static INLINE void SET_PixelTransferi(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint)) { + SET_by_offset(disp, _gloffset_PixelTransferi, fn); +} + +typedef void (GLAPIENTRYP _glptr_PixelStoref)(GLenum, GLfloat); +#define CALL_PixelStoref(disp, parameters) \ + (* GET_PixelStoref(disp)) parameters +static INLINE _glptr_PixelStoref GET_PixelStoref(struct _glapi_table *disp) { + return (_glptr_PixelStoref) (GET_by_offset(disp, _gloffset_PixelStoref)); +} + +static INLINE void SET_PixelStoref(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_PixelStoref, fn); +} + +typedef void (GLAPIENTRYP _glptr_PixelStorei)(GLenum, GLint); +#define CALL_PixelStorei(disp, parameters) \ + (* GET_PixelStorei(disp)) parameters +static INLINE _glptr_PixelStorei GET_PixelStorei(struct _glapi_table *disp) { + return (_glptr_PixelStorei) (GET_by_offset(disp, _gloffset_PixelStorei)); +} + +static INLINE void SET_PixelStorei(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint)) { + SET_by_offset(disp, _gloffset_PixelStorei, fn); +} + +typedef void (GLAPIENTRYP _glptr_PixelMapfv)(GLenum, GLsizei, const GLfloat *); +#define CALL_PixelMapfv(disp, parameters) \ + (* GET_PixelMapfv(disp)) parameters +static INLINE _glptr_PixelMapfv GET_PixelMapfv(struct _glapi_table *disp) { + return (_glptr_PixelMapfv) (GET_by_offset(disp, _gloffset_PixelMapfv)); +} + +static INLINE void SET_PixelMapfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_PixelMapfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_PixelMapuiv)(GLenum, GLsizei, const GLuint *); +#define CALL_PixelMapuiv(disp, parameters) \ + (* GET_PixelMapuiv(disp)) parameters +static INLINE _glptr_PixelMapuiv GET_PixelMapuiv(struct _glapi_table *disp) { + return (_glptr_PixelMapuiv) (GET_by_offset(disp, _gloffset_PixelMapuiv)); +} + +static INLINE void SET_PixelMapuiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_PixelMapuiv, fn); +} + +typedef void (GLAPIENTRYP _glptr_PixelMapusv)(GLenum, GLsizei, const GLushort *); +#define CALL_PixelMapusv(disp, parameters) \ + (* GET_PixelMapusv(disp)) parameters +static INLINE _glptr_PixelMapusv GET_PixelMapusv(struct _glapi_table *disp) { + return (_glptr_PixelMapusv) (GET_by_offset(disp, _gloffset_PixelMapusv)); +} + +static INLINE void SET_PixelMapusv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, const GLushort *)) { + SET_by_offset(disp, _gloffset_PixelMapusv, fn); +} + +typedef void (GLAPIENTRYP _glptr_ReadBuffer)(GLenum); +#define CALL_ReadBuffer(disp, parameters) \ + (* GET_ReadBuffer(disp)) parameters +static INLINE _glptr_ReadBuffer GET_ReadBuffer(struct _glapi_table *disp) { + return (_glptr_ReadBuffer) (GET_by_offset(disp, _gloffset_ReadBuffer)); +} + +static INLINE void SET_ReadBuffer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_ReadBuffer, fn); +} + +typedef void (GLAPIENTRYP _glptr_CopyPixels)(GLint, GLint, GLsizei, GLsizei, GLenum); +#define CALL_CopyPixels(disp, parameters) \ + (* GET_CopyPixels(disp)) parameters +static INLINE _glptr_CopyPixels GET_CopyPixels(struct _glapi_table *disp) { + return (_glptr_CopyPixels) (GET_by_offset(disp, _gloffset_CopyPixels)); +} + +static INLINE void SET_CopyPixels(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLsizei, GLsizei, GLenum)) { + SET_by_offset(disp, _gloffset_CopyPixels, fn); +} + +typedef void (GLAPIENTRYP _glptr_ReadPixels)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *); +#define CALL_ReadPixels(disp, parameters) \ + (* GET_ReadPixels(disp)) parameters +static INLINE _glptr_ReadPixels GET_ReadPixels(struct _glapi_table *disp) { + return (_glptr_ReadPixels) (GET_by_offset(disp, _gloffset_ReadPixels)); +} + +static INLINE void SET_ReadPixels(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid *)) { + SET_by_offset(disp, _gloffset_ReadPixels, fn); +} + +typedef void (GLAPIENTRYP _glptr_DrawPixels)(GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); +#define CALL_DrawPixels(disp, parameters) \ + (* GET_DrawPixels(disp)) parameters +static INLINE _glptr_DrawPixels GET_DrawPixels(struct _glapi_table *disp) { + return (_glptr_DrawPixels) (GET_by_offset(disp, _gloffset_DrawPixels)); +} + +static INLINE void SET_DrawPixels(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_DrawPixels, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetBooleanv)(GLenum, GLboolean *); +#define CALL_GetBooleanv(disp, parameters) \ + (* GET_GetBooleanv(disp)) parameters +static INLINE _glptr_GetBooleanv GET_GetBooleanv(struct _glapi_table *disp) { + return (_glptr_GetBooleanv) (GET_by_offset(disp, _gloffset_GetBooleanv)); +} + +static INLINE void SET_GetBooleanv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLboolean *)) { + SET_by_offset(disp, _gloffset_GetBooleanv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetClipPlane)(GLenum, GLdouble *); +#define CALL_GetClipPlane(disp, parameters) \ + (* GET_GetClipPlane(disp)) parameters +static INLINE _glptr_GetClipPlane GET_GetClipPlane(struct _glapi_table *disp) { + return (_glptr_GetClipPlane) (GET_by_offset(disp, _gloffset_GetClipPlane)); +} + +static INLINE void SET_GetClipPlane(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetClipPlane, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetDoublev)(GLenum, GLdouble *); +#define CALL_GetDoublev(disp, parameters) \ + (* GET_GetDoublev(disp)) parameters +static INLINE _glptr_GetDoublev GET_GetDoublev(struct _glapi_table *disp) { + return (_glptr_GetDoublev) (GET_by_offset(disp, _gloffset_GetDoublev)); +} + +static INLINE void SET_GetDoublev(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetDoublev, fn); +} + +typedef GLenum (GLAPIENTRYP _glptr_GetError)(void); +#define CALL_GetError(disp, parameters) \ + (* GET_GetError(disp)) parameters +static INLINE _glptr_GetError GET_GetError(struct _glapi_table *disp) { + return (_glptr_GetError) (GET_by_offset(disp, _gloffset_GetError)); +} + +static INLINE void SET_GetError(struct _glapi_table *disp, GLenum (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_GetError, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetFloatv)(GLenum, GLfloat *); +#define CALL_GetFloatv(disp, parameters) \ + (* GET_GetFloatv(disp)) parameters +static INLINE _glptr_GetFloatv GET_GetFloatv(struct _glapi_table *disp) { + return (_glptr_GetFloatv) (GET_by_offset(disp, _gloffset_GetFloatv)); +} + +static INLINE void SET_GetFloatv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetFloatv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetIntegerv)(GLenum, GLint *); +#define CALL_GetIntegerv(disp, parameters) \ + (* GET_GetIntegerv(disp)) parameters +static INLINE _glptr_GetIntegerv GET_GetIntegerv(struct _glapi_table *disp) { + return (_glptr_GetIntegerv) (GET_by_offset(disp, _gloffset_GetIntegerv)); +} + +static INLINE void SET_GetIntegerv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetIntegerv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetLightfv)(GLenum, GLenum, GLfloat *); +#define CALL_GetLightfv(disp, parameters) \ + (* GET_GetLightfv(disp)) parameters +static INLINE _glptr_GetLightfv GET_GetLightfv(struct _glapi_table *disp) { + return (_glptr_GetLightfv) (GET_by_offset(disp, _gloffset_GetLightfv)); +} + +static INLINE void SET_GetLightfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetLightfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetLightiv)(GLenum, GLenum, GLint *); +#define CALL_GetLightiv(disp, parameters) \ + (* GET_GetLightiv(disp)) parameters +static INLINE _glptr_GetLightiv GET_GetLightiv(struct _glapi_table *disp) { + return (_glptr_GetLightiv) (GET_by_offset(disp, _gloffset_GetLightiv)); +} + +static INLINE void SET_GetLightiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetLightiv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetMapdv)(GLenum, GLenum, GLdouble *); +#define CALL_GetMapdv(disp, parameters) \ + (* GET_GetMapdv(disp)) parameters +static INLINE _glptr_GetMapdv GET_GetMapdv(struct _glapi_table *disp) { + return (_glptr_GetMapdv) (GET_by_offset(disp, _gloffset_GetMapdv)); +} + +static INLINE void SET_GetMapdv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetMapdv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetMapfv)(GLenum, GLenum, GLfloat *); +#define CALL_GetMapfv(disp, parameters) \ + (* GET_GetMapfv(disp)) parameters +static INLINE _glptr_GetMapfv GET_GetMapfv(struct _glapi_table *disp) { + return (_glptr_GetMapfv) (GET_by_offset(disp, _gloffset_GetMapfv)); +} + +static INLINE void SET_GetMapfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetMapfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetMapiv)(GLenum, GLenum, GLint *); +#define CALL_GetMapiv(disp, parameters) \ + (* GET_GetMapiv(disp)) parameters +static INLINE _glptr_GetMapiv GET_GetMapiv(struct _glapi_table *disp) { + return (_glptr_GetMapiv) (GET_by_offset(disp, _gloffset_GetMapiv)); +} + +static INLINE void SET_GetMapiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetMapiv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetMaterialfv)(GLenum, GLenum, GLfloat *); +#define CALL_GetMaterialfv(disp, parameters) \ + (* GET_GetMaterialfv(disp)) parameters +static INLINE _glptr_GetMaterialfv GET_GetMaterialfv(struct _glapi_table *disp) { + return (_glptr_GetMaterialfv) (GET_by_offset(disp, _gloffset_GetMaterialfv)); +} + +static INLINE void SET_GetMaterialfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetMaterialfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetMaterialiv)(GLenum, GLenum, GLint *); +#define CALL_GetMaterialiv(disp, parameters) \ + (* GET_GetMaterialiv(disp)) parameters +static INLINE _glptr_GetMaterialiv GET_GetMaterialiv(struct _glapi_table *disp) { + return (_glptr_GetMaterialiv) (GET_by_offset(disp, _gloffset_GetMaterialiv)); +} + +static INLINE void SET_GetMaterialiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetMaterialiv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetPixelMapfv)(GLenum, GLfloat *); +#define CALL_GetPixelMapfv(disp, parameters) \ + (* GET_GetPixelMapfv(disp)) parameters +static INLINE _glptr_GetPixelMapfv GET_GetPixelMapfv(struct _glapi_table *disp) { + return (_glptr_GetPixelMapfv) (GET_by_offset(disp, _gloffset_GetPixelMapfv)); +} + +static INLINE void SET_GetPixelMapfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetPixelMapfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetPixelMapuiv)(GLenum, GLuint *); +#define CALL_GetPixelMapuiv(disp, parameters) \ + (* GET_GetPixelMapuiv(disp)) parameters +static INLINE _glptr_GetPixelMapuiv GET_GetPixelMapuiv(struct _glapi_table *disp) { + return (_glptr_GetPixelMapuiv) (GET_by_offset(disp, _gloffset_GetPixelMapuiv)); +} + +static INLINE void SET_GetPixelMapuiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint *)) { + SET_by_offset(disp, _gloffset_GetPixelMapuiv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetPixelMapusv)(GLenum, GLushort *); +#define CALL_GetPixelMapusv(disp, parameters) \ + (* GET_GetPixelMapusv(disp)) parameters +static INLINE _glptr_GetPixelMapusv GET_GetPixelMapusv(struct _glapi_table *disp) { + return (_glptr_GetPixelMapusv) (GET_by_offset(disp, _gloffset_GetPixelMapusv)); +} + +static INLINE void SET_GetPixelMapusv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLushort *)) { + SET_by_offset(disp, _gloffset_GetPixelMapusv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetPolygonStipple)(GLubyte *); +#define CALL_GetPolygonStipple(disp, parameters) \ + (* GET_GetPolygonStipple(disp)) parameters +static INLINE _glptr_GetPolygonStipple GET_GetPolygonStipple(struct _glapi_table *disp) { + return (_glptr_GetPolygonStipple) (GET_by_offset(disp, _gloffset_GetPolygonStipple)); +} + +static INLINE void SET_GetPolygonStipple(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLubyte *)) { + SET_by_offset(disp, _gloffset_GetPolygonStipple, fn); +} + +typedef const GLubyte * (GLAPIENTRYP _glptr_GetString)(GLenum); +#define CALL_GetString(disp, parameters) \ + (* GET_GetString(disp)) parameters +static INLINE _glptr_GetString GET_GetString(struct _glapi_table *disp) { + return (_glptr_GetString) (GET_by_offset(disp, _gloffset_GetString)); +} + +static INLINE void SET_GetString(struct _glapi_table *disp, const GLubyte * (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_GetString, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetTexEnvfv)(GLenum, GLenum, GLfloat *); +#define CALL_GetTexEnvfv(disp, parameters) \ + (* GET_GetTexEnvfv(disp)) parameters +static INLINE _glptr_GetTexEnvfv GET_GetTexEnvfv(struct _glapi_table *disp) { + return (_glptr_GetTexEnvfv) (GET_by_offset(disp, _gloffset_GetTexEnvfv)); +} + +static INLINE void SET_GetTexEnvfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetTexEnvfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetTexEnviv)(GLenum, GLenum, GLint *); +#define CALL_GetTexEnviv(disp, parameters) \ + (* GET_GetTexEnviv(disp)) parameters +static INLINE _glptr_GetTexEnviv GET_GetTexEnviv(struct _glapi_table *disp) { + return (_glptr_GetTexEnviv) (GET_by_offset(disp, _gloffset_GetTexEnviv)); +} + +static INLINE void SET_GetTexEnviv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetTexEnviv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetTexGendv)(GLenum, GLenum, GLdouble *); +#define CALL_GetTexGendv(disp, parameters) \ + (* GET_GetTexGendv(disp)) parameters +static INLINE _glptr_GetTexGendv GET_GetTexGendv(struct _glapi_table *disp) { + return (_glptr_GetTexGendv) (GET_by_offset(disp, _gloffset_GetTexGendv)); +} + +static INLINE void SET_GetTexGendv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetTexGendv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetTexGenfv)(GLenum, GLenum, GLfloat *); +#define CALL_GetTexGenfv(disp, parameters) \ + (* GET_GetTexGenfv(disp)) parameters +static INLINE _glptr_GetTexGenfv GET_GetTexGenfv(struct _glapi_table *disp) { + return (_glptr_GetTexGenfv) (GET_by_offset(disp, _gloffset_GetTexGenfv)); +} + +static INLINE void SET_GetTexGenfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetTexGenfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetTexGeniv)(GLenum, GLenum, GLint *); +#define CALL_GetTexGeniv(disp, parameters) \ + (* GET_GetTexGeniv(disp)) parameters +static INLINE _glptr_GetTexGeniv GET_GetTexGeniv(struct _glapi_table *disp) { + return (_glptr_GetTexGeniv) (GET_by_offset(disp, _gloffset_GetTexGeniv)); +} + +static INLINE void SET_GetTexGeniv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetTexGeniv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetTexImage)(GLenum, GLint, GLenum, GLenum, GLvoid *); +#define CALL_GetTexImage(disp, parameters) \ + (* GET_GetTexImage(disp)) parameters +static INLINE _glptr_GetTexImage GET_GetTexImage(struct _glapi_table *disp) { + return (_glptr_GetTexImage) (GET_by_offset(disp, _gloffset_GetTexImage)); +} + +static INLINE void SET_GetTexImage(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLenum, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetTexImage, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetTexParameterfv)(GLenum, GLenum, GLfloat *); +#define CALL_GetTexParameterfv(disp, parameters) \ + (* GET_GetTexParameterfv(disp)) parameters +static INLINE _glptr_GetTexParameterfv GET_GetTexParameterfv(struct _glapi_table *disp) { + return (_glptr_GetTexParameterfv) (GET_by_offset(disp, _gloffset_GetTexParameterfv)); +} + +static INLINE void SET_GetTexParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetTexParameterfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetTexParameteriv)(GLenum, GLenum, GLint *); +#define CALL_GetTexParameteriv(disp, parameters) \ + (* GET_GetTexParameteriv(disp)) parameters +static INLINE _glptr_GetTexParameteriv GET_GetTexParameteriv(struct _glapi_table *disp) { + return (_glptr_GetTexParameteriv) (GET_by_offset(disp, _gloffset_GetTexParameteriv)); +} + +static INLINE void SET_GetTexParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetTexParameteriv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetTexLevelParameterfv)(GLenum, GLint, GLenum, GLfloat *); +#define CALL_GetTexLevelParameterfv(disp, parameters) \ + (* GET_GetTexLevelParameterfv(disp)) parameters +static INLINE _glptr_GetTexLevelParameterfv GET_GetTexLevelParameterfv(struct _glapi_table *disp) { + return (_glptr_GetTexLevelParameterfv) (GET_by_offset(disp, _gloffset_GetTexLevelParameterfv)); +} + +static INLINE void SET_GetTexLevelParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetTexLevelParameterfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetTexLevelParameteriv)(GLenum, GLint, GLenum, GLint *); +#define CALL_GetTexLevelParameteriv(disp, parameters) \ + (* GET_GetTexLevelParameteriv(disp)) parameters +static INLINE _glptr_GetTexLevelParameteriv GET_GetTexLevelParameteriv(struct _glapi_table *disp) { + return (_glptr_GetTexLevelParameteriv) (GET_by_offset(disp, _gloffset_GetTexLevelParameteriv)); +} + +static INLINE void SET_GetTexLevelParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetTexLevelParameteriv, fn); +} + +typedef GLboolean (GLAPIENTRYP _glptr_IsEnabled)(GLenum); +#define CALL_IsEnabled(disp, parameters) \ + (* GET_IsEnabled(disp)) parameters +static INLINE _glptr_IsEnabled GET_IsEnabled(struct _glapi_table *disp) { + return (_glptr_IsEnabled) (GET_by_offset(disp, _gloffset_IsEnabled)); +} + +static INLINE void SET_IsEnabled(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_IsEnabled, fn); +} + +typedef GLboolean (GLAPIENTRYP _glptr_IsList)(GLuint); +#define CALL_IsList(disp, parameters) \ + (* GET_IsList(disp)) parameters +static INLINE _glptr_IsList GET_IsList(struct _glapi_table *disp) { + return (_glptr_IsList) (GET_by_offset(disp, _gloffset_IsList)); +} + +static INLINE void SET_IsList(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsList, fn); +} + +typedef void (GLAPIENTRYP _glptr_DepthRange)(GLclampd, GLclampd); +#define CALL_DepthRange(disp, parameters) \ + (* GET_DepthRange(disp)) parameters +static INLINE _glptr_DepthRange GET_DepthRange(struct _glapi_table *disp) { + return (_glptr_DepthRange) (GET_by_offset(disp, _gloffset_DepthRange)); +} + +static INLINE void SET_DepthRange(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampd, GLclampd)) { + SET_by_offset(disp, _gloffset_DepthRange, fn); +} + +typedef void (GLAPIENTRYP _glptr_Frustum)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble); +#define CALL_Frustum(disp, parameters) \ + (* GET_Frustum(disp)) parameters +static INLINE _glptr_Frustum GET_Frustum(struct _glapi_table *disp) { + return (_glptr_Frustum) (GET_by_offset(disp, _gloffset_Frustum)); +} + +static INLINE void SET_Frustum(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Frustum, fn); +} + +typedef void (GLAPIENTRYP _glptr_LoadIdentity)(void); +#define CALL_LoadIdentity(disp, parameters) \ + (* GET_LoadIdentity(disp)) parameters +static INLINE _glptr_LoadIdentity GET_LoadIdentity(struct _glapi_table *disp) { + return (_glptr_LoadIdentity) (GET_by_offset(disp, _gloffset_LoadIdentity)); +} + +static INLINE void SET_LoadIdentity(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_LoadIdentity, fn); +} + +typedef void (GLAPIENTRYP _glptr_LoadMatrixf)(const GLfloat *); +#define CALL_LoadMatrixf(disp, parameters) \ + (* GET_LoadMatrixf(disp)) parameters +static INLINE _glptr_LoadMatrixf GET_LoadMatrixf(struct _glapi_table *disp) { + return (_glptr_LoadMatrixf) (GET_by_offset(disp, _gloffset_LoadMatrixf)); +} + +static INLINE void SET_LoadMatrixf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_LoadMatrixf, fn); +} + +typedef void (GLAPIENTRYP _glptr_LoadMatrixd)(const GLdouble *); +#define CALL_LoadMatrixd(disp, parameters) \ + (* GET_LoadMatrixd(disp)) parameters +static INLINE _glptr_LoadMatrixd GET_LoadMatrixd(struct _glapi_table *disp) { + return (_glptr_LoadMatrixd) (GET_by_offset(disp, _gloffset_LoadMatrixd)); +} + +static INLINE void SET_LoadMatrixd(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_LoadMatrixd, fn); +} + +typedef void (GLAPIENTRYP _glptr_MatrixMode)(GLenum); +#define CALL_MatrixMode(disp, parameters) \ + (* GET_MatrixMode(disp)) parameters +static INLINE _glptr_MatrixMode GET_MatrixMode(struct _glapi_table *disp) { + return (_glptr_MatrixMode) (GET_by_offset(disp, _gloffset_MatrixMode)); +} + +static INLINE void SET_MatrixMode(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_MatrixMode, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultMatrixf)(const GLfloat *); +#define CALL_MultMatrixf(disp, parameters) \ + (* GET_MultMatrixf(disp)) parameters +static INLINE _glptr_MultMatrixf GET_MultMatrixf(struct _glapi_table *disp) { + return (_glptr_MultMatrixf) (GET_by_offset(disp, _gloffset_MultMatrixf)); +} + +static INLINE void SET_MultMatrixf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_MultMatrixf, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultMatrixd)(const GLdouble *); +#define CALL_MultMatrixd(disp, parameters) \ + (* GET_MultMatrixd(disp)) parameters +static INLINE _glptr_MultMatrixd GET_MultMatrixd(struct _glapi_table *disp) { + return (_glptr_MultMatrixd) (GET_by_offset(disp, _gloffset_MultMatrixd)); +} + +static INLINE void SET_MultMatrixd(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_MultMatrixd, fn); +} + +typedef void (GLAPIENTRYP _glptr_Ortho)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble); +#define CALL_Ortho(disp, parameters) \ + (* GET_Ortho(disp)) parameters +static INLINE _glptr_Ortho GET_Ortho(struct _glapi_table *disp) { + return (_glptr_Ortho) (GET_by_offset(disp, _gloffset_Ortho)); +} + +static INLINE void SET_Ortho(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Ortho, fn); +} + +typedef void (GLAPIENTRYP _glptr_PopMatrix)(void); +#define CALL_PopMatrix(disp, parameters) \ + (* GET_PopMatrix(disp)) parameters +static INLINE _glptr_PopMatrix GET_PopMatrix(struct _glapi_table *disp) { + return (_glptr_PopMatrix) (GET_by_offset(disp, _gloffset_PopMatrix)); +} + +static INLINE void SET_PopMatrix(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_PopMatrix, fn); +} + +typedef void (GLAPIENTRYP _glptr_PushMatrix)(void); +#define CALL_PushMatrix(disp, parameters) \ + (* GET_PushMatrix(disp)) parameters +static INLINE _glptr_PushMatrix GET_PushMatrix(struct _glapi_table *disp) { + return (_glptr_PushMatrix) (GET_by_offset(disp, _gloffset_PushMatrix)); +} + +static INLINE void SET_PushMatrix(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_PushMatrix, fn); +} + +typedef void (GLAPIENTRYP _glptr_Rotated)(GLdouble, GLdouble, GLdouble, GLdouble); +#define CALL_Rotated(disp, parameters) \ + (* GET_Rotated(disp)) parameters +static INLINE _glptr_Rotated GET_Rotated(struct _glapi_table *disp) { + return (_glptr_Rotated) (GET_by_offset(disp, _gloffset_Rotated)); +} + +static INLINE void SET_Rotated(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Rotated, fn); +} + +typedef void (GLAPIENTRYP _glptr_Rotatef)(GLfloat, GLfloat, GLfloat, GLfloat); +#define CALL_Rotatef(disp, parameters) \ + (* GET_Rotatef(disp)) parameters +static INLINE _glptr_Rotatef GET_Rotatef(struct _glapi_table *disp) { + return (_glptr_Rotatef) (GET_by_offset(disp, _gloffset_Rotatef)); +} + +static INLINE void SET_Rotatef(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Rotatef, fn); +} + +typedef void (GLAPIENTRYP _glptr_Scaled)(GLdouble, GLdouble, GLdouble); +#define CALL_Scaled(disp, parameters) \ + (* GET_Scaled(disp)) parameters +static INLINE _glptr_Scaled GET_Scaled(struct _glapi_table *disp) { + return (_glptr_Scaled) (GET_by_offset(disp, _gloffset_Scaled)); +} + +static INLINE void SET_Scaled(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Scaled, fn); +} + +typedef void (GLAPIENTRYP _glptr_Scalef)(GLfloat, GLfloat, GLfloat); +#define CALL_Scalef(disp, parameters) \ + (* GET_Scalef(disp)) parameters +static INLINE _glptr_Scalef GET_Scalef(struct _glapi_table *disp) { + return (_glptr_Scalef) (GET_by_offset(disp, _gloffset_Scalef)); +} + +static INLINE void SET_Scalef(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Scalef, fn); +} + +typedef void (GLAPIENTRYP _glptr_Translated)(GLdouble, GLdouble, GLdouble); +#define CALL_Translated(disp, parameters) \ + (* GET_Translated(disp)) parameters +static INLINE _glptr_Translated GET_Translated(struct _glapi_table *disp) { + return (_glptr_Translated) (GET_by_offset(disp, _gloffset_Translated)); +} + +static INLINE void SET_Translated(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_Translated, fn); +} + +typedef void (GLAPIENTRYP _glptr_Translatef)(GLfloat, GLfloat, GLfloat); +#define CALL_Translatef(disp, parameters) \ + (* GET_Translatef(disp)) parameters +static INLINE _glptr_Translatef GET_Translatef(struct _glapi_table *disp) { + return (_glptr_Translatef) (GET_by_offset(disp, _gloffset_Translatef)); +} + +static INLINE void SET_Translatef(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Translatef, fn); +} + +typedef void (GLAPIENTRYP _glptr_Viewport)(GLint, GLint, GLsizei, GLsizei); +#define CALL_Viewport(disp, parameters) \ + (* GET_Viewport(disp)) parameters +static INLINE _glptr_Viewport GET_Viewport(struct _glapi_table *disp) { + return (_glptr_Viewport) (GET_by_offset(disp, _gloffset_Viewport)); +} + +static INLINE void SET_Viewport(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLsizei, GLsizei)) { + SET_by_offset(disp, _gloffset_Viewport, fn); +} + +typedef void (GLAPIENTRYP _glptr_ArrayElement)(GLint); +#define CALL_ArrayElement(disp, parameters) \ + (* GET_ArrayElement(disp)) parameters +static INLINE _glptr_ArrayElement GET_ArrayElement(struct _glapi_table *disp) { + return (_glptr_ArrayElement) (GET_by_offset(disp, _gloffset_ArrayElement)); +} + +static INLINE void SET_ArrayElement(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint)) { + SET_by_offset(disp, _gloffset_ArrayElement, fn); +} + +typedef void (GLAPIENTRYP _glptr_BindTexture)(GLenum, GLuint); +#define CALL_BindTexture(disp, parameters) \ + (* GET_BindTexture(disp)) parameters +static INLINE _glptr_BindTexture GET_BindTexture(struct _glapi_table *disp) { + return (_glptr_BindTexture) (GET_by_offset(disp, _gloffset_BindTexture)); +} + +static INLINE void SET_BindTexture(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_BindTexture, fn); +} + +typedef void (GLAPIENTRYP _glptr_ColorPointer)(GLint, GLenum, GLsizei, const GLvoid *); +#define CALL_ColorPointer(disp, parameters) \ + (* GET_ColorPointer(disp)) parameters +static INLINE _glptr_ColorPointer GET_ColorPointer(struct _glapi_table *disp) { + return (_glptr_ColorPointer) (GET_by_offset(disp, _gloffset_ColorPointer)); +} + +static INLINE void SET_ColorPointer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_ColorPointer, fn); +} + +typedef void (GLAPIENTRYP _glptr_DisableClientState)(GLenum); +#define CALL_DisableClientState(disp, parameters) \ + (* GET_DisableClientState(disp)) parameters +static INLINE _glptr_DisableClientState GET_DisableClientState(struct _glapi_table *disp) { + return (_glptr_DisableClientState) (GET_by_offset(disp, _gloffset_DisableClientState)); +} + +static INLINE void SET_DisableClientState(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_DisableClientState, fn); +} + +typedef void (GLAPIENTRYP _glptr_DrawArrays)(GLenum, GLint, GLsizei); +#define CALL_DrawArrays(disp, parameters) \ + (* GET_DrawArrays(disp)) parameters +static INLINE _glptr_DrawArrays GET_DrawArrays(struct _glapi_table *disp) { + return (_glptr_DrawArrays) (GET_by_offset(disp, _gloffset_DrawArrays)); +} + +static INLINE void SET_DrawArrays(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLsizei)) { + SET_by_offset(disp, _gloffset_DrawArrays, fn); +} + +typedef void (GLAPIENTRYP _glptr_DrawElements)(GLenum, GLsizei, GLenum, const GLvoid *); +#define CALL_DrawElements(disp, parameters) \ + (* GET_DrawElements(disp)) parameters +static INLINE _glptr_DrawElements GET_DrawElements(struct _glapi_table *disp) { + return (_glptr_DrawElements) (GET_by_offset(disp, _gloffset_DrawElements)); +} + +static INLINE void SET_DrawElements(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_DrawElements, fn); +} + +typedef void (GLAPIENTRYP _glptr_EdgeFlagPointer)(GLsizei, const GLvoid *); +#define CALL_EdgeFlagPointer(disp, parameters) \ + (* GET_EdgeFlagPointer(disp)) parameters +static INLINE _glptr_EdgeFlagPointer GET_EdgeFlagPointer(struct _glapi_table *disp) { + return (_glptr_EdgeFlagPointer) (GET_by_offset(disp, _gloffset_EdgeFlagPointer)); +} + +static INLINE void SET_EdgeFlagPointer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_EdgeFlagPointer, fn); +} + +typedef void (GLAPIENTRYP _glptr_EnableClientState)(GLenum); +#define CALL_EnableClientState(disp, parameters) \ + (* GET_EnableClientState(disp)) parameters +static INLINE _glptr_EnableClientState GET_EnableClientState(struct _glapi_table *disp) { + return (_glptr_EnableClientState) (GET_by_offset(disp, _gloffset_EnableClientState)); +} + +static INLINE void SET_EnableClientState(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_EnableClientState, fn); +} + +typedef void (GLAPIENTRYP _glptr_IndexPointer)(GLenum, GLsizei, const GLvoid *); +#define CALL_IndexPointer(disp, parameters) \ + (* GET_IndexPointer(disp)) parameters +static INLINE _glptr_IndexPointer GET_IndexPointer(struct _glapi_table *disp) { + return (_glptr_IndexPointer) (GET_by_offset(disp, _gloffset_IndexPointer)); +} + +static INLINE void SET_IndexPointer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_IndexPointer, fn); +} + +typedef void (GLAPIENTRYP _glptr_Indexub)(GLubyte); +#define CALL_Indexub(disp, parameters) \ + (* GET_Indexub(disp)) parameters +static INLINE _glptr_Indexub GET_Indexub(struct _glapi_table *disp) { + return (_glptr_Indexub) (GET_by_offset(disp, _gloffset_Indexub)); +} + +static INLINE void SET_Indexub(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLubyte)) { + SET_by_offset(disp, _gloffset_Indexub, fn); +} + +typedef void (GLAPIENTRYP _glptr_Indexubv)(const GLubyte *); +#define CALL_Indexubv(disp, parameters) \ + (* GET_Indexubv(disp)) parameters +static INLINE _glptr_Indexubv GET_Indexubv(struct _glapi_table *disp) { + return (_glptr_Indexubv) (GET_by_offset(disp, _gloffset_Indexubv)); +} + +static INLINE void SET_Indexubv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLubyte *)) { + SET_by_offset(disp, _gloffset_Indexubv, fn); +} + +typedef void (GLAPIENTRYP _glptr_InterleavedArrays)(GLenum, GLsizei, const GLvoid *); +#define CALL_InterleavedArrays(disp, parameters) \ + (* GET_InterleavedArrays(disp)) parameters +static INLINE _glptr_InterleavedArrays GET_InterleavedArrays(struct _glapi_table *disp) { + return (_glptr_InterleavedArrays) (GET_by_offset(disp, _gloffset_InterleavedArrays)); +} + +static INLINE void SET_InterleavedArrays(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_InterleavedArrays, fn); +} + +typedef void (GLAPIENTRYP _glptr_NormalPointer)(GLenum, GLsizei, const GLvoid *); +#define CALL_NormalPointer(disp, parameters) \ + (* GET_NormalPointer(disp)) parameters +static INLINE _glptr_NormalPointer GET_NormalPointer(struct _glapi_table *disp) { + return (_glptr_NormalPointer) (GET_by_offset(disp, _gloffset_NormalPointer)); +} + +static INLINE void SET_NormalPointer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_NormalPointer, fn); +} + +typedef void (GLAPIENTRYP _glptr_PolygonOffset)(GLfloat, GLfloat); +#define CALL_PolygonOffset(disp, parameters) \ + (* GET_PolygonOffset(disp)) parameters +static INLINE _glptr_PolygonOffset GET_PolygonOffset(struct _glapi_table *disp) { + return (_glptr_PolygonOffset) (GET_by_offset(disp, _gloffset_PolygonOffset)); +} + +static INLINE void SET_PolygonOffset(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_PolygonOffset, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoordPointer)(GLint, GLenum, GLsizei, const GLvoid *); +#define CALL_TexCoordPointer(disp, parameters) \ + (* GET_TexCoordPointer(disp)) parameters +static INLINE _glptr_TexCoordPointer GET_TexCoordPointer(struct _glapi_table *disp) { + return (_glptr_TexCoordPointer) (GET_by_offset(disp, _gloffset_TexCoordPointer)); +} + +static INLINE void SET_TexCoordPointer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_TexCoordPointer, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexPointer)(GLint, GLenum, GLsizei, const GLvoid *); +#define CALL_VertexPointer(disp, parameters) \ + (* GET_VertexPointer(disp)) parameters +static INLINE _glptr_VertexPointer GET_VertexPointer(struct _glapi_table *disp) { + return (_glptr_VertexPointer) (GET_by_offset(disp, _gloffset_VertexPointer)); +} + +static INLINE void SET_VertexPointer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_VertexPointer, fn); +} + +typedef GLboolean (GLAPIENTRYP _glptr_AreTexturesResident)(GLsizei, const GLuint *, GLboolean *); +#define CALL_AreTexturesResident(disp, parameters) \ + (* GET_AreTexturesResident(disp)) parameters +static INLINE _glptr_AreTexturesResident GET_AreTexturesResident(struct _glapi_table *disp) { + return (_glptr_AreTexturesResident) (GET_by_offset(disp, _gloffset_AreTexturesResident)); +} + +static INLINE void SET_AreTexturesResident(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLsizei, const GLuint *, GLboolean *)) { + SET_by_offset(disp, _gloffset_AreTexturesResident, fn); +} + +typedef void (GLAPIENTRYP _glptr_CopyTexImage1D)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint); +#define CALL_CopyTexImage1D(disp, parameters) \ + (* GET_CopyTexImage1D(disp)) parameters +static INLINE _glptr_CopyTexImage1D GET_CopyTexImage1D(struct _glapi_table *disp) { + return (_glptr_CopyTexImage1D) (GET_by_offset(disp, _gloffset_CopyTexImage1D)); +} + +static INLINE void SET_CopyTexImage1D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLint)) { + SET_by_offset(disp, _gloffset_CopyTexImage1D, fn); +} + +typedef void (GLAPIENTRYP _glptr_CopyTexImage2D)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint); +#define CALL_CopyTexImage2D(disp, parameters) \ + (* GET_CopyTexImage2D(disp)) parameters +static INLINE _glptr_CopyTexImage2D GET_CopyTexImage2D(struct _glapi_table *disp) { + return (_glptr_CopyTexImage2D) (GET_by_offset(disp, _gloffset_CopyTexImage2D)); +} + +static INLINE void SET_CopyTexImage2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLint, GLint, GLsizei, GLsizei, GLint)) { + SET_by_offset(disp, _gloffset_CopyTexImage2D, fn); +} + +typedef void (GLAPIENTRYP _glptr_CopyTexSubImage1D)(GLenum, GLint, GLint, GLint, GLint, GLsizei); +#define CALL_CopyTexSubImage1D(disp, parameters) \ + (* GET_CopyTexSubImage1D(disp)) parameters +static INLINE _glptr_CopyTexSubImage1D GET_CopyTexSubImage1D(struct _glapi_table *disp) { + return (_glptr_CopyTexSubImage1D) (GET_by_offset(disp, _gloffset_CopyTexSubImage1D)); +} + +static INLINE void SET_CopyTexSubImage1D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint, GLsizei)) { + SET_by_offset(disp, _gloffset_CopyTexSubImage1D, fn); +} + +typedef void (GLAPIENTRYP _glptr_CopyTexSubImage2D)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); +#define CALL_CopyTexSubImage2D(disp, parameters) \ + (* GET_CopyTexSubImage2D(disp)) parameters +static INLINE _glptr_CopyTexSubImage2D GET_CopyTexSubImage2D(struct _glapi_table *disp) { + return (_glptr_CopyTexSubImage2D) (GET_by_offset(disp, _gloffset_CopyTexSubImage2D)); +} + +static INLINE void SET_CopyTexSubImage2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)) { + SET_by_offset(disp, _gloffset_CopyTexSubImage2D, fn); +} + +typedef void (GLAPIENTRYP _glptr_DeleteTextures)(GLsizei, const GLuint *); +#define CALL_DeleteTextures(disp, parameters) \ + (* GET_DeleteTextures(disp)) parameters +static INLINE _glptr_DeleteTextures GET_DeleteTextures(struct _glapi_table *disp) { + return (_glptr_DeleteTextures) (GET_by_offset(disp, _gloffset_DeleteTextures)); +} + +static INLINE void SET_DeleteTextures(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_DeleteTextures, fn); +} + +typedef void (GLAPIENTRYP _glptr_GenTextures)(GLsizei, GLuint *); +#define CALL_GenTextures(disp, parameters) \ + (* GET_GenTextures(disp)) parameters +static INLINE _glptr_GenTextures GET_GenTextures(struct _glapi_table *disp) { + return (_glptr_GenTextures) (GET_by_offset(disp, _gloffset_GenTextures)); +} + +static INLINE void SET_GenTextures(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GenTextures, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetPointerv)(GLenum, GLvoid **); +#define CALL_GetPointerv(disp, parameters) \ + (* GET_GetPointerv(disp)) parameters +static INLINE _glptr_GetPointerv GET_GetPointerv(struct _glapi_table *disp) { + return (_glptr_GetPointerv) (GET_by_offset(disp, _gloffset_GetPointerv)); +} + +static INLINE void SET_GetPointerv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLvoid **)) { + SET_by_offset(disp, _gloffset_GetPointerv, fn); +} + +typedef GLboolean (GLAPIENTRYP _glptr_IsTexture)(GLuint); +#define CALL_IsTexture(disp, parameters) \ + (* GET_IsTexture(disp)) parameters +static INLINE _glptr_IsTexture GET_IsTexture(struct _glapi_table *disp) { + return (_glptr_IsTexture) (GET_by_offset(disp, _gloffset_IsTexture)); +} + +static INLINE void SET_IsTexture(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsTexture, fn); +} + +typedef void (GLAPIENTRYP _glptr_PrioritizeTextures)(GLsizei, const GLuint *, const GLclampf *); +#define CALL_PrioritizeTextures(disp, parameters) \ + (* GET_PrioritizeTextures(disp)) parameters +static INLINE _glptr_PrioritizeTextures GET_PrioritizeTextures(struct _glapi_table *disp) { + return (_glptr_PrioritizeTextures) (GET_by_offset(disp, _gloffset_PrioritizeTextures)); +} + +static INLINE void SET_PrioritizeTextures(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *, const GLclampf *)) { + SET_by_offset(disp, _gloffset_PrioritizeTextures, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexSubImage1D)(GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *); +#define CALL_TexSubImage1D(disp, parameters) \ + (* GET_TexSubImage1D(disp)) parameters +static INLINE _glptr_TexSubImage1D GET_TexSubImage1D(struct _glapi_table *disp) { + return (_glptr_TexSubImage1D) (GET_by_offset(disp, _gloffset_TexSubImage1D)); +} + +static INLINE void SET_TexSubImage1D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLsizei, GLenum, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_TexSubImage1D, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexSubImage2D)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); +#define CALL_TexSubImage2D(disp, parameters) \ + (* GET_TexSubImage2D(disp)) parameters +static INLINE _glptr_TexSubImage2D GET_TexSubImage2D(struct _glapi_table *disp) { + return (_glptr_TexSubImage2D) (GET_by_offset(disp, _gloffset_TexSubImage2D)); +} + +static INLINE void SET_TexSubImage2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_TexSubImage2D, fn); +} + +typedef void (GLAPIENTRYP _glptr_PopClientAttrib)(void); +#define CALL_PopClientAttrib(disp, parameters) \ + (* GET_PopClientAttrib(disp)) parameters +static INLINE _glptr_PopClientAttrib GET_PopClientAttrib(struct _glapi_table *disp) { + return (_glptr_PopClientAttrib) (GET_by_offset(disp, _gloffset_PopClientAttrib)); +} + +static INLINE void SET_PopClientAttrib(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_PopClientAttrib, fn); +} + +typedef void (GLAPIENTRYP _glptr_PushClientAttrib)(GLbitfield); +#define CALL_PushClientAttrib(disp, parameters) \ + (* GET_PushClientAttrib(disp)) parameters +static INLINE _glptr_PushClientAttrib GET_PushClientAttrib(struct _glapi_table *disp) { + return (_glptr_PushClientAttrib) (GET_by_offset(disp, _gloffset_PushClientAttrib)); +} + +static INLINE void SET_PushClientAttrib(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLbitfield)) { + SET_by_offset(disp, _gloffset_PushClientAttrib, fn); +} + +typedef void (GLAPIENTRYP _glptr_BlendColor)(GLclampf, GLclampf, GLclampf, GLclampf); +#define CALL_BlendColor(disp, parameters) \ + (* GET_BlendColor(disp)) parameters +static INLINE _glptr_BlendColor GET_BlendColor(struct _glapi_table *disp) { + return (_glptr_BlendColor) (GET_by_offset(disp, _gloffset_BlendColor)); +} + +static INLINE void SET_BlendColor(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf, GLclampf, GLclampf, GLclampf)) { + SET_by_offset(disp, _gloffset_BlendColor, fn); +} + +typedef void (GLAPIENTRYP _glptr_BlendEquation)(GLenum); +#define CALL_BlendEquation(disp, parameters) \ + (* GET_BlendEquation(disp)) parameters +static INLINE _glptr_BlendEquation GET_BlendEquation(struct _glapi_table *disp) { + return (_glptr_BlendEquation) (GET_by_offset(disp, _gloffset_BlendEquation)); +} + +static INLINE void SET_BlendEquation(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_BlendEquation, fn); +} + +typedef void (GLAPIENTRYP _glptr_DrawRangeElements)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *); +#define CALL_DrawRangeElements(disp, parameters) \ + (* GET_DrawRangeElements(disp)) parameters +static INLINE _glptr_DrawRangeElements GET_DrawRangeElements(struct _glapi_table *disp) { + return (_glptr_DrawRangeElements) (GET_by_offset(disp, _gloffset_DrawRangeElements)); +} + +static INLINE void SET_DrawRangeElements(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_DrawRangeElements, fn); +} + +typedef void (GLAPIENTRYP _glptr_ColorTable)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); +#define CALL_ColorTable(disp, parameters) \ + (* GET_ColorTable(disp)) parameters +static INLINE _glptr_ColorTable GET_ColorTable(struct _glapi_table *disp) { + return (_glptr_ColorTable) (GET_by_offset(disp, _gloffset_ColorTable)); +} + +static INLINE void SET_ColorTable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_ColorTable, fn); +} + +typedef void (GLAPIENTRYP _glptr_ColorTableParameterfv)(GLenum, GLenum, const GLfloat *); +#define CALL_ColorTableParameterfv(disp, parameters) \ + (* GET_ColorTableParameterfv(disp)) parameters +static INLINE _glptr_ColorTableParameterfv GET_ColorTableParameterfv(struct _glapi_table *disp) { + return (_glptr_ColorTableParameterfv) (GET_by_offset(disp, _gloffset_ColorTableParameterfv)); +} + +static INLINE void SET_ColorTableParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_ColorTableParameterfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_ColorTableParameteriv)(GLenum, GLenum, const GLint *); +#define CALL_ColorTableParameteriv(disp, parameters) \ + (* GET_ColorTableParameteriv(disp)) parameters +static INLINE _glptr_ColorTableParameteriv GET_ColorTableParameteriv(struct _glapi_table *disp) { + return (_glptr_ColorTableParameteriv) (GET_by_offset(disp, _gloffset_ColorTableParameteriv)); +} + +static INLINE void SET_ColorTableParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_ColorTableParameteriv, fn); +} + +typedef void (GLAPIENTRYP _glptr_CopyColorTable)(GLenum, GLenum, GLint, GLint, GLsizei); +#define CALL_CopyColorTable(disp, parameters) \ + (* GET_CopyColorTable(disp)) parameters +static INLINE _glptr_CopyColorTable GET_CopyColorTable(struct _glapi_table *disp) { + return (_glptr_CopyColorTable) (GET_by_offset(disp, _gloffset_CopyColorTable)); +} + +static INLINE void SET_CopyColorTable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint, GLint, GLsizei)) { + SET_by_offset(disp, _gloffset_CopyColorTable, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetColorTable)(GLenum, GLenum, GLenum, GLvoid *); +#define CALL_GetColorTable(disp, parameters) \ + (* GET_GetColorTable(disp)) parameters +static INLINE _glptr_GetColorTable GET_GetColorTable(struct _glapi_table *disp) { + return (_glptr_GetColorTable) (GET_by_offset(disp, _gloffset_GetColorTable)); +} + +static INLINE void SET_GetColorTable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetColorTable, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetColorTableParameterfv)(GLenum, GLenum, GLfloat *); +#define CALL_GetColorTableParameterfv(disp, parameters) \ + (* GET_GetColorTableParameterfv(disp)) parameters +static INLINE _glptr_GetColorTableParameterfv GET_GetColorTableParameterfv(struct _glapi_table *disp) { + return (_glptr_GetColorTableParameterfv) (GET_by_offset(disp, _gloffset_GetColorTableParameterfv)); +} + +static INLINE void SET_GetColorTableParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetColorTableParameterfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetColorTableParameteriv)(GLenum, GLenum, GLint *); +#define CALL_GetColorTableParameteriv(disp, parameters) \ + (* GET_GetColorTableParameteriv(disp)) parameters +static INLINE _glptr_GetColorTableParameteriv GET_GetColorTableParameteriv(struct _glapi_table *disp) { + return (_glptr_GetColorTableParameteriv) (GET_by_offset(disp, _gloffset_GetColorTableParameteriv)); +} + +static INLINE void SET_GetColorTableParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetColorTableParameteriv, fn); +} + +typedef void (GLAPIENTRYP _glptr_ColorSubTable)(GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); +#define CALL_ColorSubTable(disp, parameters) \ + (* GET_ColorSubTable(disp)) parameters +static INLINE _glptr_ColorSubTable GET_ColorSubTable(struct _glapi_table *disp) { + return (_glptr_ColorSubTable) (GET_by_offset(disp, _gloffset_ColorSubTable)); +} + +static INLINE void SET_ColorSubTable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_ColorSubTable, fn); +} + +typedef void (GLAPIENTRYP _glptr_CopyColorSubTable)(GLenum, GLsizei, GLint, GLint, GLsizei); +#define CALL_CopyColorSubTable(disp, parameters) \ + (* GET_CopyColorSubTable(disp)) parameters +static INLINE _glptr_CopyColorSubTable GET_CopyColorSubTable(struct _glapi_table *disp) { + return (_glptr_CopyColorSubTable) (GET_by_offset(disp, _gloffset_CopyColorSubTable)); +} + +static INLINE void SET_CopyColorSubTable(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLint, GLint, GLsizei)) { + SET_by_offset(disp, _gloffset_CopyColorSubTable, fn); +} + +typedef void (GLAPIENTRYP _glptr_ConvolutionFilter1D)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *); +#define CALL_ConvolutionFilter1D(disp, parameters) \ + (* GET_ConvolutionFilter1D(disp)) parameters +static INLINE _glptr_ConvolutionFilter1D GET_ConvolutionFilter1D(struct _glapi_table *disp) { + return (_glptr_ConvolutionFilter1D) (GET_by_offset(disp, _gloffset_ConvolutionFilter1D)); +} + +static INLINE void SET_ConvolutionFilter1D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLenum, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_ConvolutionFilter1D, fn); +} + +typedef void (GLAPIENTRYP _glptr_ConvolutionFilter2D)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); +#define CALL_ConvolutionFilter2D(disp, parameters) \ + (* GET_ConvolutionFilter2D(disp)) parameters +static INLINE _glptr_ConvolutionFilter2D GET_ConvolutionFilter2D(struct _glapi_table *disp) { + return (_glptr_ConvolutionFilter2D) (GET_by_offset(disp, _gloffset_ConvolutionFilter2D)); +} + +static INLINE void SET_ConvolutionFilter2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_ConvolutionFilter2D, fn); +} + +typedef void (GLAPIENTRYP _glptr_ConvolutionParameterf)(GLenum, GLenum, GLfloat); +#define CALL_ConvolutionParameterf(disp, parameters) \ + (* GET_ConvolutionParameterf(disp)) parameters +static INLINE _glptr_ConvolutionParameterf GET_ConvolutionParameterf(struct _glapi_table *disp) { + return (_glptr_ConvolutionParameterf) (GET_by_offset(disp, _gloffset_ConvolutionParameterf)); +} + +static INLINE void SET_ConvolutionParameterf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_ConvolutionParameterf, fn); +} + +typedef void (GLAPIENTRYP _glptr_ConvolutionParameterfv)(GLenum, GLenum, const GLfloat *); +#define CALL_ConvolutionParameterfv(disp, parameters) \ + (* GET_ConvolutionParameterfv(disp)) parameters +static INLINE _glptr_ConvolutionParameterfv GET_ConvolutionParameterfv(struct _glapi_table *disp) { + return (_glptr_ConvolutionParameterfv) (GET_by_offset(disp, _gloffset_ConvolutionParameterfv)); +} + +static INLINE void SET_ConvolutionParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_ConvolutionParameterfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_ConvolutionParameteri)(GLenum, GLenum, GLint); +#define CALL_ConvolutionParameteri(disp, parameters) \ + (* GET_ConvolutionParameteri(disp)) parameters +static INLINE _glptr_ConvolutionParameteri GET_ConvolutionParameteri(struct _glapi_table *disp) { + return (_glptr_ConvolutionParameteri) (GET_by_offset(disp, _gloffset_ConvolutionParameteri)); +} + +static INLINE void SET_ConvolutionParameteri(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint)) { + SET_by_offset(disp, _gloffset_ConvolutionParameteri, fn); +} + +typedef void (GLAPIENTRYP _glptr_ConvolutionParameteriv)(GLenum, GLenum, const GLint *); +#define CALL_ConvolutionParameteriv(disp, parameters) \ + (* GET_ConvolutionParameteriv(disp)) parameters +static INLINE _glptr_ConvolutionParameteriv GET_ConvolutionParameteriv(struct _glapi_table *disp) { + return (_glptr_ConvolutionParameteriv) (GET_by_offset(disp, _gloffset_ConvolutionParameteriv)); +} + +static INLINE void SET_ConvolutionParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_ConvolutionParameteriv, fn); +} + +typedef void (GLAPIENTRYP _glptr_CopyConvolutionFilter1D)(GLenum, GLenum, GLint, GLint, GLsizei); +#define CALL_CopyConvolutionFilter1D(disp, parameters) \ + (* GET_CopyConvolutionFilter1D(disp)) parameters +static INLINE _glptr_CopyConvolutionFilter1D GET_CopyConvolutionFilter1D(struct _glapi_table *disp) { + return (_glptr_CopyConvolutionFilter1D) (GET_by_offset(disp, _gloffset_CopyConvolutionFilter1D)); +} + +static INLINE void SET_CopyConvolutionFilter1D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint, GLint, GLsizei)) { + SET_by_offset(disp, _gloffset_CopyConvolutionFilter1D, fn); +} + +typedef void (GLAPIENTRYP _glptr_CopyConvolutionFilter2D)(GLenum, GLenum, GLint, GLint, GLsizei, GLsizei); +#define CALL_CopyConvolutionFilter2D(disp, parameters) \ + (* GET_CopyConvolutionFilter2D(disp)) parameters +static INLINE _glptr_CopyConvolutionFilter2D GET_CopyConvolutionFilter2D(struct _glapi_table *disp) { + return (_glptr_CopyConvolutionFilter2D) (GET_by_offset(disp, _gloffset_CopyConvolutionFilter2D)); +} + +static INLINE void SET_CopyConvolutionFilter2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint, GLint, GLsizei, GLsizei)) { + SET_by_offset(disp, _gloffset_CopyConvolutionFilter2D, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetConvolutionFilter)(GLenum, GLenum, GLenum, GLvoid *); +#define CALL_GetConvolutionFilter(disp, parameters) \ + (* GET_GetConvolutionFilter(disp)) parameters +static INLINE _glptr_GetConvolutionFilter GET_GetConvolutionFilter(struct _glapi_table *disp) { + return (_glptr_GetConvolutionFilter) (GET_by_offset(disp, _gloffset_GetConvolutionFilter)); +} + +static INLINE void SET_GetConvolutionFilter(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetConvolutionFilter, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetConvolutionParameterfv)(GLenum, GLenum, GLfloat *); +#define CALL_GetConvolutionParameterfv(disp, parameters) \ + (* GET_GetConvolutionParameterfv(disp)) parameters +static INLINE _glptr_GetConvolutionParameterfv GET_GetConvolutionParameterfv(struct _glapi_table *disp) { + return (_glptr_GetConvolutionParameterfv) (GET_by_offset(disp, _gloffset_GetConvolutionParameterfv)); +} + +static INLINE void SET_GetConvolutionParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetConvolutionParameterfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetConvolutionParameteriv)(GLenum, GLenum, GLint *); +#define CALL_GetConvolutionParameteriv(disp, parameters) \ + (* GET_GetConvolutionParameteriv(disp)) parameters +static INLINE _glptr_GetConvolutionParameteriv GET_GetConvolutionParameteriv(struct _glapi_table *disp) { + return (_glptr_GetConvolutionParameteriv) (GET_by_offset(disp, _gloffset_GetConvolutionParameteriv)); +} + +static INLINE void SET_GetConvolutionParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetConvolutionParameteriv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetSeparableFilter)(GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *); +#define CALL_GetSeparableFilter(disp, parameters) \ + (* GET_GetSeparableFilter(disp)) parameters +static INLINE _glptr_GetSeparableFilter GET_GetSeparableFilter(struct _glapi_table *disp) { + return (_glptr_GetSeparableFilter) (GET_by_offset(disp, _gloffset_GetSeparableFilter)); +} + +static INLINE void SET_GetSeparableFilter(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLvoid *, GLvoid *, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetSeparableFilter, fn); +} + +typedef void (GLAPIENTRYP _glptr_SeparableFilter2D)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *); +#define CALL_SeparableFilter2D(disp, parameters) \ + (* GET_SeparableFilter2D(disp)) parameters +static INLINE _glptr_SeparableFilter2D GET_SeparableFilter2D(struct _glapi_table *disp) { + return (_glptr_SeparableFilter2D) (GET_by_offset(disp, _gloffset_SeparableFilter2D)); +} + +static INLINE void SET_SeparableFilter2D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *, const GLvoid *)) { + SET_by_offset(disp, _gloffset_SeparableFilter2D, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetHistogram)(GLenum, GLboolean, GLenum, GLenum, GLvoid *); +#define CALL_GetHistogram(disp, parameters) \ + (* GET_GetHistogram(disp)) parameters +static INLINE _glptr_GetHistogram GET_GetHistogram(struct _glapi_table *disp) { + return (_glptr_GetHistogram) (GET_by_offset(disp, _gloffset_GetHistogram)); +} + +static INLINE void SET_GetHistogram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLboolean, GLenum, GLenum, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetHistogram, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetHistogramParameterfv)(GLenum, GLenum, GLfloat *); +#define CALL_GetHistogramParameterfv(disp, parameters) \ + (* GET_GetHistogramParameterfv(disp)) parameters +static INLINE _glptr_GetHistogramParameterfv GET_GetHistogramParameterfv(struct _glapi_table *disp) { + return (_glptr_GetHistogramParameterfv) (GET_by_offset(disp, _gloffset_GetHistogramParameterfv)); +} + +static INLINE void SET_GetHistogramParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetHistogramParameterfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetHistogramParameteriv)(GLenum, GLenum, GLint *); +#define CALL_GetHistogramParameteriv(disp, parameters) \ + (* GET_GetHistogramParameteriv(disp)) parameters +static INLINE _glptr_GetHistogramParameteriv GET_GetHistogramParameteriv(struct _glapi_table *disp) { + return (_glptr_GetHistogramParameteriv) (GET_by_offset(disp, _gloffset_GetHistogramParameteriv)); +} + +static INLINE void SET_GetHistogramParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetHistogramParameteriv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetMinmax)(GLenum, GLboolean, GLenum, GLenum, GLvoid *); +#define CALL_GetMinmax(disp, parameters) \ + (* GET_GetMinmax(disp)) parameters +static INLINE _glptr_GetMinmax GET_GetMinmax(struct _glapi_table *disp) { + return (_glptr_GetMinmax) (GET_by_offset(disp, _gloffset_GetMinmax)); +} + +static INLINE void SET_GetMinmax(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLboolean, GLenum, GLenum, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetMinmax, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetMinmaxParameterfv)(GLenum, GLenum, GLfloat *); +#define CALL_GetMinmaxParameterfv(disp, parameters) \ + (* GET_GetMinmaxParameterfv(disp)) parameters +static INLINE _glptr_GetMinmaxParameterfv GET_GetMinmaxParameterfv(struct _glapi_table *disp) { + return (_glptr_GetMinmaxParameterfv) (GET_by_offset(disp, _gloffset_GetMinmaxParameterfv)); +} + +static INLINE void SET_GetMinmaxParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetMinmaxParameterfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetMinmaxParameteriv)(GLenum, GLenum, GLint *); +#define CALL_GetMinmaxParameteriv(disp, parameters) \ + (* GET_GetMinmaxParameteriv(disp)) parameters +static INLINE _glptr_GetMinmaxParameteriv GET_GetMinmaxParameteriv(struct _glapi_table *disp) { + return (_glptr_GetMinmaxParameteriv) (GET_by_offset(disp, _gloffset_GetMinmaxParameteriv)); +} + +static INLINE void SET_GetMinmaxParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetMinmaxParameteriv, fn); +} + +typedef void (GLAPIENTRYP _glptr_Histogram)(GLenum, GLsizei, GLenum, GLboolean); +#define CALL_Histogram(disp, parameters) \ + (* GET_Histogram(disp)) parameters +static INLINE _glptr_Histogram GET_Histogram(struct _glapi_table *disp) { + return (_glptr_Histogram) (GET_by_offset(disp, _gloffset_Histogram)); +} + +static INLINE void SET_Histogram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLenum, GLboolean)) { + SET_by_offset(disp, _gloffset_Histogram, fn); +} + +typedef void (GLAPIENTRYP _glptr_Minmax)(GLenum, GLenum, GLboolean); +#define CALL_Minmax(disp, parameters) \ + (* GET_Minmax(disp)) parameters +static INLINE _glptr_Minmax GET_Minmax(struct _glapi_table *disp) { + return (_glptr_Minmax) (GET_by_offset(disp, _gloffset_Minmax)); +} + +static INLINE void SET_Minmax(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLboolean)) { + SET_by_offset(disp, _gloffset_Minmax, fn); +} + +typedef void (GLAPIENTRYP _glptr_ResetHistogram)(GLenum); +#define CALL_ResetHistogram(disp, parameters) \ + (* GET_ResetHistogram(disp)) parameters +static INLINE _glptr_ResetHistogram GET_ResetHistogram(struct _glapi_table *disp) { + return (_glptr_ResetHistogram) (GET_by_offset(disp, _gloffset_ResetHistogram)); +} + +static INLINE void SET_ResetHistogram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_ResetHistogram, fn); +} + +typedef void (GLAPIENTRYP _glptr_ResetMinmax)(GLenum); +#define CALL_ResetMinmax(disp, parameters) \ + (* GET_ResetMinmax(disp)) parameters +static INLINE _glptr_ResetMinmax GET_ResetMinmax(struct _glapi_table *disp) { + return (_glptr_ResetMinmax) (GET_by_offset(disp, _gloffset_ResetMinmax)); +} + +static INLINE void SET_ResetMinmax(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_ResetMinmax, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexImage3D)(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *); +#define CALL_TexImage3D(disp, parameters) \ + (* GET_TexImage3D(disp)) parameters +static INLINE _glptr_TexImage3D GET_TexImage3D(struct _glapi_table *disp) { + return (_glptr_TexImage3D) (GET_by_offset(disp, _gloffset_TexImage3D)); +} + +static INLINE void SET_TexImage3D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLsizei, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_TexImage3D, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexSubImage3D)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *); +#define CALL_TexSubImage3D(disp, parameters) \ + (* GET_TexSubImage3D(disp)) parameters +static INLINE _glptr_TexSubImage3D GET_TexSubImage3D(struct _glapi_table *disp) { + return (_glptr_TexSubImage3D) (GET_by_offset(disp, _gloffset_TexSubImage3D)); +} + +static INLINE void SET_TexSubImage3D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) { + SET_by_offset(disp, _gloffset_TexSubImage3D, fn); +} + +typedef void (GLAPIENTRYP _glptr_CopyTexSubImage3D)(GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei); +#define CALL_CopyTexSubImage3D(disp, parameters) \ + (* GET_CopyTexSubImage3D(disp)) parameters +static INLINE _glptr_CopyTexSubImage3D GET_CopyTexSubImage3D(struct _glapi_table *disp) { + return (_glptr_CopyTexSubImage3D) (GET_by_offset(disp, _gloffset_CopyTexSubImage3D)); +} + +static INLINE void SET_CopyTexSubImage3D(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint, GLint, GLint, GLsizei, GLsizei)) { + SET_by_offset(disp, _gloffset_CopyTexSubImage3D, fn); +} + +typedef void (GLAPIENTRYP _glptr_ActiveTextureARB)(GLenum); +#define CALL_ActiveTextureARB(disp, parameters) \ + (* GET_ActiveTextureARB(disp)) parameters +static INLINE _glptr_ActiveTextureARB GET_ActiveTextureARB(struct _glapi_table *disp) { + return (_glptr_ActiveTextureARB) (GET_by_offset(disp, _gloffset_ActiveTextureARB)); +} + +static INLINE void SET_ActiveTextureARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_ActiveTextureARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_ClientActiveTextureARB)(GLenum); +#define CALL_ClientActiveTextureARB(disp, parameters) \ + (* GET_ClientActiveTextureARB(disp)) parameters +static INLINE _glptr_ClientActiveTextureARB GET_ClientActiveTextureARB(struct _glapi_table *disp) { + return (_glptr_ClientActiveTextureARB) (GET_by_offset(disp, _gloffset_ClientActiveTextureARB)); +} + +static INLINE void SET_ClientActiveTextureARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_ClientActiveTextureARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord1dARB)(GLenum, GLdouble); +#define CALL_MultiTexCoord1dARB(disp, parameters) \ + (* GET_MultiTexCoord1dARB(disp)) parameters +static INLINE _glptr_MultiTexCoord1dARB GET_MultiTexCoord1dARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord1dARB) (GET_by_offset(disp, _gloffset_MultiTexCoord1dARB)); +} + +static INLINE void SET_MultiTexCoord1dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLdouble)) { + SET_by_offset(disp, _gloffset_MultiTexCoord1dARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord1dvARB)(GLenum, const GLdouble *); +#define CALL_MultiTexCoord1dvARB(disp, parameters) \ + (* GET_MultiTexCoord1dvARB(disp)) parameters +static INLINE _glptr_MultiTexCoord1dvARB GET_MultiTexCoord1dvARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord1dvARB) (GET_by_offset(disp, _gloffset_MultiTexCoord1dvARB)); +} + +static INLINE void SET_MultiTexCoord1dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLdouble *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord1dvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord1fARB)(GLenum, GLfloat); +#define CALL_MultiTexCoord1fARB(disp, parameters) \ + (* GET_MultiTexCoord1fARB(disp)) parameters +static INLINE _glptr_MultiTexCoord1fARB GET_MultiTexCoord1fARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord1fARB) (GET_by_offset(disp, _gloffset_MultiTexCoord1fARB)); +} + +static INLINE void SET_MultiTexCoord1fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_MultiTexCoord1fARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord1fvARB)(GLenum, const GLfloat *); +#define CALL_MultiTexCoord1fvARB(disp, parameters) \ + (* GET_MultiTexCoord1fvARB(disp)) parameters +static INLINE _glptr_MultiTexCoord1fvARB GET_MultiTexCoord1fvARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord1fvARB) (GET_by_offset(disp, _gloffset_MultiTexCoord1fvARB)); +} + +static INLINE void SET_MultiTexCoord1fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord1fvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord1iARB)(GLenum, GLint); +#define CALL_MultiTexCoord1iARB(disp, parameters) \ + (* GET_MultiTexCoord1iARB(disp)) parameters +static INLINE _glptr_MultiTexCoord1iARB GET_MultiTexCoord1iARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord1iARB) (GET_by_offset(disp, _gloffset_MultiTexCoord1iARB)); +} + +static INLINE void SET_MultiTexCoord1iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint)) { + SET_by_offset(disp, _gloffset_MultiTexCoord1iARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord1ivARB)(GLenum, const GLint *); +#define CALL_MultiTexCoord1ivARB(disp, parameters) \ + (* GET_MultiTexCoord1ivARB(disp)) parameters +static INLINE _glptr_MultiTexCoord1ivARB GET_MultiTexCoord1ivARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord1ivARB) (GET_by_offset(disp, _gloffset_MultiTexCoord1ivARB)); +} + +static INLINE void SET_MultiTexCoord1ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord1ivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord1sARB)(GLenum, GLshort); +#define CALL_MultiTexCoord1sARB(disp, parameters) \ + (* GET_MultiTexCoord1sARB(disp)) parameters +static INLINE _glptr_MultiTexCoord1sARB GET_MultiTexCoord1sARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord1sARB) (GET_by_offset(disp, _gloffset_MultiTexCoord1sARB)); +} + +static INLINE void SET_MultiTexCoord1sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLshort)) { + SET_by_offset(disp, _gloffset_MultiTexCoord1sARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord1svARB)(GLenum, const GLshort *); +#define CALL_MultiTexCoord1svARB(disp, parameters) \ + (* GET_MultiTexCoord1svARB(disp)) parameters +static INLINE _glptr_MultiTexCoord1svARB GET_MultiTexCoord1svARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord1svARB) (GET_by_offset(disp, _gloffset_MultiTexCoord1svARB)); +} + +static INLINE void SET_MultiTexCoord1svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLshort *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord1svARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord2dARB)(GLenum, GLdouble, GLdouble); +#define CALL_MultiTexCoord2dARB(disp, parameters) \ + (* GET_MultiTexCoord2dARB(disp)) parameters +static INLINE _glptr_MultiTexCoord2dARB GET_MultiTexCoord2dARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord2dARB) (GET_by_offset(disp, _gloffset_MultiTexCoord2dARB)); +} + +static INLINE void SET_MultiTexCoord2dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_MultiTexCoord2dARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord2dvARB)(GLenum, const GLdouble *); +#define CALL_MultiTexCoord2dvARB(disp, parameters) \ + (* GET_MultiTexCoord2dvARB(disp)) parameters +static INLINE _glptr_MultiTexCoord2dvARB GET_MultiTexCoord2dvARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord2dvARB) (GET_by_offset(disp, _gloffset_MultiTexCoord2dvARB)); +} + +static INLINE void SET_MultiTexCoord2dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLdouble *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord2dvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord2fARB)(GLenum, GLfloat, GLfloat); +#define CALL_MultiTexCoord2fARB(disp, parameters) \ + (* GET_MultiTexCoord2fARB(disp)) parameters +static INLINE _glptr_MultiTexCoord2fARB GET_MultiTexCoord2fARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord2fARB) (GET_by_offset(disp, _gloffset_MultiTexCoord2fARB)); +} + +static INLINE void SET_MultiTexCoord2fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_MultiTexCoord2fARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord2fvARB)(GLenum, const GLfloat *); +#define CALL_MultiTexCoord2fvARB(disp, parameters) \ + (* GET_MultiTexCoord2fvARB(disp)) parameters +static INLINE _glptr_MultiTexCoord2fvARB GET_MultiTexCoord2fvARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord2fvARB) (GET_by_offset(disp, _gloffset_MultiTexCoord2fvARB)); +} + +static INLINE void SET_MultiTexCoord2fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord2fvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord2iARB)(GLenum, GLint, GLint); +#define CALL_MultiTexCoord2iARB(disp, parameters) \ + (* GET_MultiTexCoord2iARB(disp)) parameters +static INLINE _glptr_MultiTexCoord2iARB GET_MultiTexCoord2iARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord2iARB) (GET_by_offset(disp, _gloffset_MultiTexCoord2iARB)); +} + +static INLINE void SET_MultiTexCoord2iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint)) { + SET_by_offset(disp, _gloffset_MultiTexCoord2iARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord2ivARB)(GLenum, const GLint *); +#define CALL_MultiTexCoord2ivARB(disp, parameters) \ + (* GET_MultiTexCoord2ivARB(disp)) parameters +static INLINE _glptr_MultiTexCoord2ivARB GET_MultiTexCoord2ivARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord2ivARB) (GET_by_offset(disp, _gloffset_MultiTexCoord2ivARB)); +} + +static INLINE void SET_MultiTexCoord2ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord2ivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord2sARB)(GLenum, GLshort, GLshort); +#define CALL_MultiTexCoord2sARB(disp, parameters) \ + (* GET_MultiTexCoord2sARB(disp)) parameters +static INLINE _glptr_MultiTexCoord2sARB GET_MultiTexCoord2sARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord2sARB) (GET_by_offset(disp, _gloffset_MultiTexCoord2sARB)); +} + +static INLINE void SET_MultiTexCoord2sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_MultiTexCoord2sARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord2svARB)(GLenum, const GLshort *); +#define CALL_MultiTexCoord2svARB(disp, parameters) \ + (* GET_MultiTexCoord2svARB(disp)) parameters +static INLINE _glptr_MultiTexCoord2svARB GET_MultiTexCoord2svARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord2svARB) (GET_by_offset(disp, _gloffset_MultiTexCoord2svARB)); +} + +static INLINE void SET_MultiTexCoord2svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLshort *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord2svARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord3dARB)(GLenum, GLdouble, GLdouble, GLdouble); +#define CALL_MultiTexCoord3dARB(disp, parameters) \ + (* GET_MultiTexCoord3dARB(disp)) parameters +static INLINE _glptr_MultiTexCoord3dARB GET_MultiTexCoord3dARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord3dARB) (GET_by_offset(disp, _gloffset_MultiTexCoord3dARB)); +} + +static INLINE void SET_MultiTexCoord3dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_MultiTexCoord3dARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord3dvARB)(GLenum, const GLdouble *); +#define CALL_MultiTexCoord3dvARB(disp, parameters) \ + (* GET_MultiTexCoord3dvARB(disp)) parameters +static INLINE _glptr_MultiTexCoord3dvARB GET_MultiTexCoord3dvARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord3dvARB) (GET_by_offset(disp, _gloffset_MultiTexCoord3dvARB)); +} + +static INLINE void SET_MultiTexCoord3dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLdouble *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord3dvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord3fARB)(GLenum, GLfloat, GLfloat, GLfloat); +#define CALL_MultiTexCoord3fARB(disp, parameters) \ + (* GET_MultiTexCoord3fARB(disp)) parameters +static INLINE _glptr_MultiTexCoord3fARB GET_MultiTexCoord3fARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord3fARB) (GET_by_offset(disp, _gloffset_MultiTexCoord3fARB)); +} + +static INLINE void SET_MultiTexCoord3fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_MultiTexCoord3fARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord3fvARB)(GLenum, const GLfloat *); +#define CALL_MultiTexCoord3fvARB(disp, parameters) \ + (* GET_MultiTexCoord3fvARB(disp)) parameters +static INLINE _glptr_MultiTexCoord3fvARB GET_MultiTexCoord3fvARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord3fvARB) (GET_by_offset(disp, _gloffset_MultiTexCoord3fvARB)); +} + +static INLINE void SET_MultiTexCoord3fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord3fvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord3iARB)(GLenum, GLint, GLint, GLint); +#define CALL_MultiTexCoord3iARB(disp, parameters) \ + (* GET_MultiTexCoord3iARB(disp)) parameters +static INLINE _glptr_MultiTexCoord3iARB GET_MultiTexCoord3iARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord3iARB) (GET_by_offset(disp, _gloffset_MultiTexCoord3iARB)); +} + +static INLINE void SET_MultiTexCoord3iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_MultiTexCoord3iARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord3ivARB)(GLenum, const GLint *); +#define CALL_MultiTexCoord3ivARB(disp, parameters) \ + (* GET_MultiTexCoord3ivARB(disp)) parameters +static INLINE _glptr_MultiTexCoord3ivARB GET_MultiTexCoord3ivARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord3ivARB) (GET_by_offset(disp, _gloffset_MultiTexCoord3ivARB)); +} + +static INLINE void SET_MultiTexCoord3ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord3ivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord3sARB)(GLenum, GLshort, GLshort, GLshort); +#define CALL_MultiTexCoord3sARB(disp, parameters) \ + (* GET_MultiTexCoord3sARB(disp)) parameters +static INLINE _glptr_MultiTexCoord3sARB GET_MultiTexCoord3sARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord3sARB) (GET_by_offset(disp, _gloffset_MultiTexCoord3sARB)); +} + +static INLINE void SET_MultiTexCoord3sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_MultiTexCoord3sARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord3svARB)(GLenum, const GLshort *); +#define CALL_MultiTexCoord3svARB(disp, parameters) \ + (* GET_MultiTexCoord3svARB(disp)) parameters +static INLINE _glptr_MultiTexCoord3svARB GET_MultiTexCoord3svARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord3svARB) (GET_by_offset(disp, _gloffset_MultiTexCoord3svARB)); +} + +static INLINE void SET_MultiTexCoord3svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLshort *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord3svARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord4dARB)(GLenum, GLdouble, GLdouble, GLdouble, GLdouble); +#define CALL_MultiTexCoord4dARB(disp, parameters) \ + (* GET_MultiTexCoord4dARB(disp)) parameters +static INLINE _glptr_MultiTexCoord4dARB GET_MultiTexCoord4dARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord4dARB) (GET_by_offset(disp, _gloffset_MultiTexCoord4dARB)); +} + +static INLINE void SET_MultiTexCoord4dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_MultiTexCoord4dARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord4dvARB)(GLenum, const GLdouble *); +#define CALL_MultiTexCoord4dvARB(disp, parameters) \ + (* GET_MultiTexCoord4dvARB(disp)) parameters +static INLINE _glptr_MultiTexCoord4dvARB GET_MultiTexCoord4dvARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord4dvARB) (GET_by_offset(disp, _gloffset_MultiTexCoord4dvARB)); +} + +static INLINE void SET_MultiTexCoord4dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLdouble *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord4dvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord4fARB)(GLenum, GLfloat, GLfloat, GLfloat, GLfloat); +#define CALL_MultiTexCoord4fARB(disp, parameters) \ + (* GET_MultiTexCoord4fARB(disp)) parameters +static INLINE _glptr_MultiTexCoord4fARB GET_MultiTexCoord4fARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord4fARB) (GET_by_offset(disp, _gloffset_MultiTexCoord4fARB)); +} + +static INLINE void SET_MultiTexCoord4fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_MultiTexCoord4fARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord4fvARB)(GLenum, const GLfloat *); +#define CALL_MultiTexCoord4fvARB(disp, parameters) \ + (* GET_MultiTexCoord4fvARB(disp)) parameters +static INLINE _glptr_MultiTexCoord4fvARB GET_MultiTexCoord4fvARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord4fvARB) (GET_by_offset(disp, _gloffset_MultiTexCoord4fvARB)); +} + +static INLINE void SET_MultiTexCoord4fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord4fvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord4iARB)(GLenum, GLint, GLint, GLint, GLint); +#define CALL_MultiTexCoord4iARB(disp, parameters) \ + (* GET_MultiTexCoord4iARB(disp)) parameters +static INLINE _glptr_MultiTexCoord4iARB GET_MultiTexCoord4iARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord4iARB) (GET_by_offset(disp, _gloffset_MultiTexCoord4iARB)); +} + +static INLINE void SET_MultiTexCoord4iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_MultiTexCoord4iARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord4ivARB)(GLenum, const GLint *); +#define CALL_MultiTexCoord4ivARB(disp, parameters) \ + (* GET_MultiTexCoord4ivARB(disp)) parameters +static INLINE _glptr_MultiTexCoord4ivARB GET_MultiTexCoord4ivARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord4ivARB) (GET_by_offset(disp, _gloffset_MultiTexCoord4ivARB)); +} + +static INLINE void SET_MultiTexCoord4ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord4ivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord4sARB)(GLenum, GLshort, GLshort, GLshort, GLshort); +#define CALL_MultiTexCoord4sARB(disp, parameters) \ + (* GET_MultiTexCoord4sARB(disp)) parameters +static INLINE _glptr_MultiTexCoord4sARB GET_MultiTexCoord4sARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord4sARB) (GET_by_offset(disp, _gloffset_MultiTexCoord4sARB)); +} + +static INLINE void SET_MultiTexCoord4sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLshort, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_MultiTexCoord4sARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiTexCoord4svARB)(GLenum, const GLshort *); +#define CALL_MultiTexCoord4svARB(disp, parameters) \ + (* GET_MultiTexCoord4svARB(disp)) parameters +static INLINE _glptr_MultiTexCoord4svARB GET_MultiTexCoord4svARB(struct _glapi_table *disp) { + return (_glptr_MultiTexCoord4svARB) (GET_by_offset(disp, _gloffset_MultiTexCoord4svARB)); +} + +static INLINE void SET_MultiTexCoord4svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLshort *)) { + SET_by_offset(disp, _gloffset_MultiTexCoord4svARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_AttachShader)(GLuint, GLuint); +#define CALL_AttachShader(disp, parameters) \ + (* GET_AttachShader(disp)) parameters +static INLINE _glptr_AttachShader GET_AttachShader(struct _glapi_table *disp) { + return (_glptr_AttachShader) (GET_by_offset(disp, _gloffset_AttachShader)); +} + +static INLINE void SET_AttachShader(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_AttachShader, fn); +} + +typedef GLuint (GLAPIENTRYP _glptr_CreateProgram)(void); +#define CALL_CreateProgram(disp, parameters) \ + (* GET_CreateProgram(disp)) parameters +static INLINE _glptr_CreateProgram GET_CreateProgram(struct _glapi_table *disp) { + return (_glptr_CreateProgram) (GET_by_offset(disp, _gloffset_CreateProgram)); +} + +static INLINE void SET_CreateProgram(struct _glapi_table *disp, GLuint (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_CreateProgram, fn); +} + +typedef GLuint (GLAPIENTRYP _glptr_CreateShader)(GLenum); +#define CALL_CreateShader(disp, parameters) \ + (* GET_CreateShader(disp)) parameters +static INLINE _glptr_CreateShader GET_CreateShader(struct _glapi_table *disp) { + return (_glptr_CreateShader) (GET_by_offset(disp, _gloffset_CreateShader)); +} + +static INLINE void SET_CreateShader(struct _glapi_table *disp, GLuint (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_CreateShader, fn); +} + +typedef void (GLAPIENTRYP _glptr_DeleteProgram)(GLuint); +#define CALL_DeleteProgram(disp, parameters) \ + (* GET_DeleteProgram(disp)) parameters +static INLINE _glptr_DeleteProgram GET_DeleteProgram(struct _glapi_table *disp) { + return (_glptr_DeleteProgram) (GET_by_offset(disp, _gloffset_DeleteProgram)); +} + +static INLINE void SET_DeleteProgram(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_DeleteProgram, fn); +} + +typedef void (GLAPIENTRYP _glptr_DeleteShader)(GLuint); +#define CALL_DeleteShader(disp, parameters) \ + (* GET_DeleteShader(disp)) parameters +static INLINE _glptr_DeleteShader GET_DeleteShader(struct _glapi_table *disp) { + return (_glptr_DeleteShader) (GET_by_offset(disp, _gloffset_DeleteShader)); +} + +static INLINE void SET_DeleteShader(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_DeleteShader, fn); +} + +typedef void (GLAPIENTRYP _glptr_DetachShader)(GLuint, GLuint); +#define CALL_DetachShader(disp, parameters) \ + (* GET_DetachShader(disp)) parameters +static INLINE _glptr_DetachShader GET_DetachShader(struct _glapi_table *disp) { + return (_glptr_DetachShader) (GET_by_offset(disp, _gloffset_DetachShader)); +} + +static INLINE void SET_DetachShader(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_DetachShader, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetAttachedShaders)(GLuint, GLsizei, GLsizei *, GLuint *); +#define CALL_GetAttachedShaders(disp, parameters) \ + (* GET_GetAttachedShaders(disp)) parameters +static INLINE _glptr_GetAttachedShaders GET_GetAttachedShaders(struct _glapi_table *disp) { + return (_glptr_GetAttachedShaders) (GET_by_offset(disp, _gloffset_GetAttachedShaders)); +} + +static INLINE void SET_GetAttachedShaders(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, GLsizei *, GLuint *)) { + SET_by_offset(disp, _gloffset_GetAttachedShaders, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetProgramInfoLog)(GLuint, GLsizei, GLsizei *, GLchar *); +#define CALL_GetProgramInfoLog(disp, parameters) \ + (* GET_GetProgramInfoLog(disp)) parameters +static INLINE _glptr_GetProgramInfoLog GET_GetProgramInfoLog(struct _glapi_table *disp) { + return (_glptr_GetProgramInfoLog) (GET_by_offset(disp, _gloffset_GetProgramInfoLog)); +} + +static INLINE void SET_GetProgramInfoLog(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, GLsizei *, GLchar *)) { + SET_by_offset(disp, _gloffset_GetProgramInfoLog, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetProgramiv)(GLuint, GLenum, GLint *); +#define CALL_GetProgramiv(disp, parameters) \ + (* GET_GetProgramiv(disp)) parameters +static INLINE _glptr_GetProgramiv GET_GetProgramiv(struct _glapi_table *disp) { + return (_glptr_GetProgramiv) (GET_by_offset(disp, _gloffset_GetProgramiv)); +} + +static INLINE void SET_GetProgramiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetProgramiv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetShaderInfoLog)(GLuint, GLsizei, GLsizei *, GLchar *); +#define CALL_GetShaderInfoLog(disp, parameters) \ + (* GET_GetShaderInfoLog(disp)) parameters +static INLINE _glptr_GetShaderInfoLog GET_GetShaderInfoLog(struct _glapi_table *disp) { + return (_glptr_GetShaderInfoLog) (GET_by_offset(disp, _gloffset_GetShaderInfoLog)); +} + +static INLINE void SET_GetShaderInfoLog(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, GLsizei *, GLchar *)) { + SET_by_offset(disp, _gloffset_GetShaderInfoLog, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetShaderiv)(GLuint, GLenum, GLint *); +#define CALL_GetShaderiv(disp, parameters) \ + (* GET_GetShaderiv(disp)) parameters +static INLINE _glptr_GetShaderiv GET_GetShaderiv(struct _glapi_table *disp) { + return (_glptr_GetShaderiv) (GET_by_offset(disp, _gloffset_GetShaderiv)); +} + +static INLINE void SET_GetShaderiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetShaderiv, fn); +} + +typedef GLboolean (GLAPIENTRYP _glptr_IsProgram)(GLuint); +#define CALL_IsProgram(disp, parameters) \ + (* GET_IsProgram(disp)) parameters +static INLINE _glptr_IsProgram GET_IsProgram(struct _glapi_table *disp) { + return (_glptr_IsProgram) (GET_by_offset(disp, _gloffset_IsProgram)); +} + +static INLINE void SET_IsProgram(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsProgram, fn); +} + +typedef GLboolean (GLAPIENTRYP _glptr_IsShader)(GLuint); +#define CALL_IsShader(disp, parameters) \ + (* GET_IsShader(disp)) parameters +static INLINE _glptr_IsShader GET_IsShader(struct _glapi_table *disp) { + return (_glptr_IsShader) (GET_by_offset(disp, _gloffset_IsShader)); +} + +static INLINE void SET_IsShader(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsShader, fn); +} + +typedef void (GLAPIENTRYP _glptr_StencilFuncSeparate)(GLenum, GLenum, GLint, GLuint); +#define CALL_StencilFuncSeparate(disp, parameters) \ + (* GET_StencilFuncSeparate(disp)) parameters +static INLINE _glptr_StencilFuncSeparate GET_StencilFuncSeparate(struct _glapi_table *disp) { + return (_glptr_StencilFuncSeparate) (GET_by_offset(disp, _gloffset_StencilFuncSeparate)); +} + +static INLINE void SET_StencilFuncSeparate(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint, GLuint)) { + SET_by_offset(disp, _gloffset_StencilFuncSeparate, fn); +} + +typedef void (GLAPIENTRYP _glptr_StencilMaskSeparate)(GLenum, GLuint); +#define CALL_StencilMaskSeparate(disp, parameters) \ + (* GET_StencilMaskSeparate(disp)) parameters +static INLINE _glptr_StencilMaskSeparate GET_StencilMaskSeparate(struct _glapi_table *disp) { + return (_glptr_StencilMaskSeparate) (GET_by_offset(disp, _gloffset_StencilMaskSeparate)); +} + +static INLINE void SET_StencilMaskSeparate(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_StencilMaskSeparate, fn); +} + +typedef void (GLAPIENTRYP _glptr_StencilOpSeparate)(GLenum, GLenum, GLenum, GLenum); +#define CALL_StencilOpSeparate(disp, parameters) \ + (* GET_StencilOpSeparate(disp)) parameters +static INLINE _glptr_StencilOpSeparate GET_StencilOpSeparate(struct _glapi_table *disp) { + return (_glptr_StencilOpSeparate) (GET_by_offset(disp, _gloffset_StencilOpSeparate)); +} + +static INLINE void SET_StencilOpSeparate(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_StencilOpSeparate, fn); +} + +typedef void (GLAPIENTRYP _glptr_UniformMatrix2x3fv)(GLint, GLsizei, GLboolean, const GLfloat *); +#define CALL_UniformMatrix2x3fv(disp, parameters) \ + (* GET_UniformMatrix2x3fv(disp)) parameters +static INLINE _glptr_UniformMatrix2x3fv GET_UniformMatrix2x3fv(struct _glapi_table *disp) { + return (_glptr_UniformMatrix2x3fv) (GET_by_offset(disp, _gloffset_UniformMatrix2x3fv)); +} + +static INLINE void SET_UniformMatrix2x3fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { + SET_by_offset(disp, _gloffset_UniformMatrix2x3fv, fn); +} + +typedef void (GLAPIENTRYP _glptr_UniformMatrix2x4fv)(GLint, GLsizei, GLboolean, const GLfloat *); +#define CALL_UniformMatrix2x4fv(disp, parameters) \ + (* GET_UniformMatrix2x4fv(disp)) parameters +static INLINE _glptr_UniformMatrix2x4fv GET_UniformMatrix2x4fv(struct _glapi_table *disp) { + return (_glptr_UniformMatrix2x4fv) (GET_by_offset(disp, _gloffset_UniformMatrix2x4fv)); +} + +static INLINE void SET_UniformMatrix2x4fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { + SET_by_offset(disp, _gloffset_UniformMatrix2x4fv, fn); +} + +typedef void (GLAPIENTRYP _glptr_UniformMatrix3x2fv)(GLint, GLsizei, GLboolean, const GLfloat *); +#define CALL_UniformMatrix3x2fv(disp, parameters) \ + (* GET_UniformMatrix3x2fv(disp)) parameters +static INLINE _glptr_UniformMatrix3x2fv GET_UniformMatrix3x2fv(struct _glapi_table *disp) { + return (_glptr_UniformMatrix3x2fv) (GET_by_offset(disp, _gloffset_UniformMatrix3x2fv)); +} + +static INLINE void SET_UniformMatrix3x2fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { + SET_by_offset(disp, _gloffset_UniformMatrix3x2fv, fn); +} + +typedef void (GLAPIENTRYP _glptr_UniformMatrix3x4fv)(GLint, GLsizei, GLboolean, const GLfloat *); +#define CALL_UniformMatrix3x4fv(disp, parameters) \ + (* GET_UniformMatrix3x4fv(disp)) parameters +static INLINE _glptr_UniformMatrix3x4fv GET_UniformMatrix3x4fv(struct _glapi_table *disp) { + return (_glptr_UniformMatrix3x4fv) (GET_by_offset(disp, _gloffset_UniformMatrix3x4fv)); +} + +static INLINE void SET_UniformMatrix3x4fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { + SET_by_offset(disp, _gloffset_UniformMatrix3x4fv, fn); +} + +typedef void (GLAPIENTRYP _glptr_UniformMatrix4x2fv)(GLint, GLsizei, GLboolean, const GLfloat *); +#define CALL_UniformMatrix4x2fv(disp, parameters) \ + (* GET_UniformMatrix4x2fv(disp)) parameters +static INLINE _glptr_UniformMatrix4x2fv GET_UniformMatrix4x2fv(struct _glapi_table *disp) { + return (_glptr_UniformMatrix4x2fv) (GET_by_offset(disp, _gloffset_UniformMatrix4x2fv)); +} + +static INLINE void SET_UniformMatrix4x2fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { + SET_by_offset(disp, _gloffset_UniformMatrix4x2fv, fn); +} + +typedef void (GLAPIENTRYP _glptr_UniformMatrix4x3fv)(GLint, GLsizei, GLboolean, const GLfloat *); +#define CALL_UniformMatrix4x3fv(disp, parameters) \ + (* GET_UniformMatrix4x3fv(disp)) parameters +static INLINE _glptr_UniformMatrix4x3fv GET_UniformMatrix4x3fv(struct _glapi_table *disp) { + return (_glptr_UniformMatrix4x3fv) (GET_by_offset(disp, _gloffset_UniformMatrix4x3fv)); +} + +static INLINE void SET_UniformMatrix4x3fv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { + SET_by_offset(disp, _gloffset_UniformMatrix4x3fv, fn); +} + +typedef void (GLAPIENTRYP _glptr_ClampColor)(GLenum, GLenum); +#define CALL_ClampColor(disp, parameters) \ + (* GET_ClampColor(disp)) parameters +static INLINE _glptr_ClampColor GET_ClampColor(struct _glapi_table *disp) { + return (_glptr_ClampColor) (GET_by_offset(disp, _gloffset_ClampColor)); +} + +static INLINE void SET_ClampColor(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_ClampColor, fn); +} + +typedef void (GLAPIENTRYP _glptr_ClearBufferfi)(GLenum, GLint, GLfloat, GLint); +#define CALL_ClearBufferfi(disp, parameters) \ + (* GET_ClearBufferfi(disp)) parameters +static INLINE _glptr_ClearBufferfi GET_ClearBufferfi(struct _glapi_table *disp) { + return (_glptr_ClearBufferfi) (GET_by_offset(disp, _gloffset_ClearBufferfi)); +} + +static INLINE void SET_ClearBufferfi(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLfloat, GLint)) { + SET_by_offset(disp, _gloffset_ClearBufferfi, fn); +} + +typedef void (GLAPIENTRYP _glptr_ClearBufferfv)(GLenum, GLint, const GLfloat *); +#define CALL_ClearBufferfv(disp, parameters) \ + (* GET_ClearBufferfv(disp)) parameters +static INLINE _glptr_ClearBufferfv GET_ClearBufferfv(struct _glapi_table *disp) { + return (_glptr_ClearBufferfv) (GET_by_offset(disp, _gloffset_ClearBufferfv)); +} + +static INLINE void SET_ClearBufferfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_ClearBufferfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_ClearBufferiv)(GLenum, GLint, const GLint *); +#define CALL_ClearBufferiv(disp, parameters) \ + (* GET_ClearBufferiv(disp)) parameters +static INLINE _glptr_ClearBufferiv GET_ClearBufferiv(struct _glapi_table *disp) { + return (_glptr_ClearBufferiv) (GET_by_offset(disp, _gloffset_ClearBufferiv)); +} + +static INLINE void SET_ClearBufferiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, const GLint *)) { + SET_by_offset(disp, _gloffset_ClearBufferiv, fn); +} + +typedef void (GLAPIENTRYP _glptr_ClearBufferuiv)(GLenum, GLint, const GLuint *); +#define CALL_ClearBufferuiv(disp, parameters) \ + (* GET_ClearBufferuiv(disp)) parameters +static INLINE _glptr_ClearBufferuiv GET_ClearBufferuiv(struct _glapi_table *disp) { + return (_glptr_ClearBufferuiv) (GET_by_offset(disp, _gloffset_ClearBufferuiv)); +} + +static INLINE void SET_ClearBufferuiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, const GLuint *)) { + SET_by_offset(disp, _gloffset_ClearBufferuiv, fn); +} + +typedef const GLubyte * (GLAPIENTRYP _glptr_GetStringi)(GLenum, GLuint); +#define CALL_GetStringi(disp, parameters) \ + (* GET_GetStringi(disp)) parameters +static INLINE _glptr_GetStringi GET_GetStringi(struct _glapi_table *disp) { + return (_glptr_GetStringi) (GET_by_offset(disp, _gloffset_GetStringi)); +} + +static INLINE void SET_GetStringi(struct _glapi_table *disp, const GLubyte * (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_GetStringi, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexBuffer)(GLenum, GLenum, GLuint); +#define CALL_TexBuffer(disp, parameters) \ + (* GET_TexBuffer(disp)) parameters +static INLINE _glptr_TexBuffer GET_TexBuffer(struct _glapi_table *disp) { + return (_glptr_TexBuffer) (GET_by_offset(disp, _gloffset_TexBuffer)); +} + +static INLINE void SET_TexBuffer(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_TexBuffer, fn); +} + +typedef void (GLAPIENTRYP _glptr_FramebufferTexture)(GLenum, GLenum, GLuint, GLint); +#define CALL_FramebufferTexture(disp, parameters) \ + (* GET_FramebufferTexture(disp)) parameters +static INLINE _glptr_FramebufferTexture GET_FramebufferTexture(struct _glapi_table *disp) { + return (_glptr_FramebufferTexture) (GET_by_offset(disp, _gloffset_FramebufferTexture)); +} + +static INLINE void SET_FramebufferTexture(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint, GLint)) { + SET_by_offset(disp, _gloffset_FramebufferTexture, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetBufferParameteri64v)(GLenum, GLenum, GLint64 *); +#define CALL_GetBufferParameteri64v(disp, parameters) \ + (* GET_GetBufferParameteri64v(disp)) parameters +static INLINE _glptr_GetBufferParameteri64v GET_GetBufferParameteri64v(struct _glapi_table *disp) { + return (_glptr_GetBufferParameteri64v) (GET_by_offset(disp, _gloffset_GetBufferParameteri64v)); +} + +static INLINE void SET_GetBufferParameteri64v(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint64 *)) { + SET_by_offset(disp, _gloffset_GetBufferParameteri64v, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetInteger64i_v)(GLenum, GLuint, GLint64 *); +#define CALL_GetInteger64i_v(disp, parameters) \ + (* GET_GetInteger64i_v(disp)) parameters +static INLINE _glptr_GetInteger64i_v GET_GetInteger64i_v(struct _glapi_table *disp) { + return (_glptr_GetInteger64i_v) (GET_by_offset(disp, _gloffset_GetInteger64i_v)); +} + +static INLINE void SET_GetInteger64i_v(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLint64 *)) { + SET_by_offset(disp, _gloffset_GetInteger64i_v, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribDivisor)(GLuint, GLuint); +#define CALL_VertexAttribDivisor(disp, parameters) \ + (* GET_VertexAttribDivisor(disp)) parameters +static INLINE _glptr_VertexAttribDivisor GET_VertexAttribDivisor(struct _glapi_table *disp) { + return (_glptr_VertexAttribDivisor) (GET_by_offset(disp, _gloffset_VertexAttribDivisor)); +} + +static INLINE void SET_VertexAttribDivisor(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_VertexAttribDivisor, fn); +} + +typedef void (GLAPIENTRYP _glptr_LoadTransposeMatrixdARB)(const GLdouble *); +#define CALL_LoadTransposeMatrixdARB(disp, parameters) \ + (* GET_LoadTransposeMatrixdARB(disp)) parameters +static INLINE _glptr_LoadTransposeMatrixdARB GET_LoadTransposeMatrixdARB(struct _glapi_table *disp) { + return (_glptr_LoadTransposeMatrixdARB) (GET_by_offset(disp, _gloffset_LoadTransposeMatrixdARB)); +} + +static INLINE void SET_LoadTransposeMatrixdARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_LoadTransposeMatrixdARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_LoadTransposeMatrixfARB)(const GLfloat *); +#define CALL_LoadTransposeMatrixfARB(disp, parameters) \ + (* GET_LoadTransposeMatrixfARB(disp)) parameters +static INLINE _glptr_LoadTransposeMatrixfARB GET_LoadTransposeMatrixfARB(struct _glapi_table *disp) { + return (_glptr_LoadTransposeMatrixfARB) (GET_by_offset(disp, _gloffset_LoadTransposeMatrixfARB)); +} + +static INLINE void SET_LoadTransposeMatrixfARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_LoadTransposeMatrixfARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultTransposeMatrixdARB)(const GLdouble *); +#define CALL_MultTransposeMatrixdARB(disp, parameters) \ + (* GET_MultTransposeMatrixdARB(disp)) parameters +static INLINE _glptr_MultTransposeMatrixdARB GET_MultTransposeMatrixdARB(struct _glapi_table *disp) { + return (_glptr_MultTransposeMatrixdARB) (GET_by_offset(disp, _gloffset_MultTransposeMatrixdARB)); +} + +static INLINE void SET_MultTransposeMatrixdARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_MultTransposeMatrixdARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultTransposeMatrixfARB)(const GLfloat *); +#define CALL_MultTransposeMatrixfARB(disp, parameters) \ + (* GET_MultTransposeMatrixfARB(disp)) parameters +static INLINE _glptr_MultTransposeMatrixfARB GET_MultTransposeMatrixfARB(struct _glapi_table *disp) { + return (_glptr_MultTransposeMatrixfARB) (GET_by_offset(disp, _gloffset_MultTransposeMatrixfARB)); +} + +static INLINE void SET_MultTransposeMatrixfARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_MultTransposeMatrixfARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_SampleCoverageARB)(GLclampf, GLboolean); +#define CALL_SampleCoverageARB(disp, parameters) \ + (* GET_SampleCoverageARB(disp)) parameters +static INLINE _glptr_SampleCoverageARB GET_SampleCoverageARB(struct _glapi_table *disp) { + return (_glptr_SampleCoverageARB) (GET_by_offset(disp, _gloffset_SampleCoverageARB)); +} + +static INLINE void SET_SampleCoverageARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf, GLboolean)) { + SET_by_offset(disp, _gloffset_SampleCoverageARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_CompressedTexImage1DARB)(GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *); +#define CALL_CompressedTexImage1DARB(disp, parameters) \ + (* GET_CompressedTexImage1DARB(disp)) parameters +static INLINE _glptr_CompressedTexImage1DARB GET_CompressedTexImage1DARB(struct _glapi_table *disp) { + return (_glptr_CompressedTexImage1DARB) (GET_by_offset(disp, _gloffset_CompressedTexImage1DARB)); +} + +static INLINE void SET_CompressedTexImage1DARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLsizei, GLint, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_CompressedTexImage1DARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_CompressedTexImage2DARB)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); +#define CALL_CompressedTexImage2DARB(disp, parameters) \ + (* GET_CompressedTexImage2DARB(disp)) parameters +static INLINE _glptr_CompressedTexImage2DARB GET_CompressedTexImage2DARB(struct _glapi_table *disp) { + return (_glptr_CompressedTexImage2DARB) (GET_by_offset(disp, _gloffset_CompressedTexImage2DARB)); +} + +static INLINE void SET_CompressedTexImage2DARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_CompressedTexImage2DARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_CompressedTexImage3DARB)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *); +#define CALL_CompressedTexImage3DARB(disp, parameters) \ + (* GET_CompressedTexImage3DARB(disp)) parameters +static INLINE _glptr_CompressedTexImage3DARB GET_CompressedTexImage3DARB(struct _glapi_table *disp) { + return (_glptr_CompressedTexImage3DARB) (GET_by_offset(disp, _gloffset_CompressedTexImage3DARB)); +} + +static INLINE void SET_CompressedTexImage3DARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLsizei, GLsizei, GLsizei, GLint, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_CompressedTexImage3DARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_CompressedTexSubImage1DARB)(GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *); +#define CALL_CompressedTexSubImage1DARB(disp, parameters) \ + (* GET_CompressedTexSubImage1DARB(disp)) parameters +static INLINE _glptr_CompressedTexSubImage1DARB GET_CompressedTexSubImage1DARB(struct _glapi_table *disp) { + return (_glptr_CompressedTexSubImage1DARB) (GET_by_offset(disp, _gloffset_CompressedTexSubImage1DARB)); +} + +static INLINE void SET_CompressedTexSubImage1DARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLsizei, GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_CompressedTexSubImage1DARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_CompressedTexSubImage2DARB)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); +#define CALL_CompressedTexSubImage2DARB(disp, parameters) \ + (* GET_CompressedTexSubImage2DARB(disp)) parameters +static INLINE _glptr_CompressedTexSubImage2DARB GET_CompressedTexSubImage2DARB(struct _glapi_table *disp) { + return (_glptr_CompressedTexSubImage2DARB) (GET_by_offset(disp, _gloffset_CompressedTexSubImage2DARB)); +} + +static INLINE void SET_CompressedTexSubImage2DARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_CompressedTexSubImage2DARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_CompressedTexSubImage3DARB)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *); +#define CALL_CompressedTexSubImage3DARB(disp, parameters) \ + (* GET_CompressedTexSubImage3DARB(disp)) parameters +static INLINE _glptr_CompressedTexSubImage3DARB GET_CompressedTexSubImage3DARB(struct _glapi_table *disp) { + return (_glptr_CompressedTexSubImage3DARB) (GET_by_offset(disp, _gloffset_CompressedTexSubImage3DARB)); +} + +static INLINE void SET_CompressedTexSubImage3DARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLint, GLint, GLint, GLsizei, GLsizei, GLsizei, GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_CompressedTexSubImage3DARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetCompressedTexImageARB)(GLenum, GLint, GLvoid *); +#define CALL_GetCompressedTexImageARB(disp, parameters) \ + (* GET_GetCompressedTexImageARB(disp)) parameters +static INLINE _glptr_GetCompressedTexImageARB GET_GetCompressedTexImageARB(struct _glapi_table *disp) { + return (_glptr_GetCompressedTexImageARB) (GET_by_offset(disp, _gloffset_GetCompressedTexImageARB)); +} + +static INLINE void SET_GetCompressedTexImageARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetCompressedTexImageARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_DisableVertexAttribArrayARB)(GLuint); +#define CALL_DisableVertexAttribArrayARB(disp, parameters) \ + (* GET_DisableVertexAttribArrayARB(disp)) parameters +static INLINE _glptr_DisableVertexAttribArrayARB GET_DisableVertexAttribArrayARB(struct _glapi_table *disp) { + return (_glptr_DisableVertexAttribArrayARB) (GET_by_offset(disp, _gloffset_DisableVertexAttribArrayARB)); +} + +static INLINE void SET_DisableVertexAttribArrayARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_DisableVertexAttribArrayARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_EnableVertexAttribArrayARB)(GLuint); +#define CALL_EnableVertexAttribArrayARB(disp, parameters) \ + (* GET_EnableVertexAttribArrayARB(disp)) parameters +static INLINE _glptr_EnableVertexAttribArrayARB GET_EnableVertexAttribArrayARB(struct _glapi_table *disp) { + return (_glptr_EnableVertexAttribArrayARB) (GET_by_offset(disp, _gloffset_EnableVertexAttribArrayARB)); +} + +static INLINE void SET_EnableVertexAttribArrayARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_EnableVertexAttribArrayARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetProgramEnvParameterdvARB)(GLenum, GLuint, GLdouble *); +#define CALL_GetProgramEnvParameterdvARB(disp, parameters) \ + (* GET_GetProgramEnvParameterdvARB(disp)) parameters +static INLINE _glptr_GetProgramEnvParameterdvARB GET_GetProgramEnvParameterdvARB(struct _glapi_table *disp) { + return (_glptr_GetProgramEnvParameterdvARB) (GET_by_offset(disp, _gloffset_GetProgramEnvParameterdvARB)); +} + +static INLINE void SET_GetProgramEnvParameterdvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetProgramEnvParameterdvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetProgramEnvParameterfvARB)(GLenum, GLuint, GLfloat *); +#define CALL_GetProgramEnvParameterfvARB(disp, parameters) \ + (* GET_GetProgramEnvParameterfvARB(disp)) parameters +static INLINE _glptr_GetProgramEnvParameterfvARB GET_GetProgramEnvParameterfvARB(struct _glapi_table *disp) { + return (_glptr_GetProgramEnvParameterfvARB) (GET_by_offset(disp, _gloffset_GetProgramEnvParameterfvARB)); +} + +static INLINE void SET_GetProgramEnvParameterfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetProgramEnvParameterfvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetProgramLocalParameterdvARB)(GLenum, GLuint, GLdouble *); +#define CALL_GetProgramLocalParameterdvARB(disp, parameters) \ + (* GET_GetProgramLocalParameterdvARB(disp)) parameters +static INLINE _glptr_GetProgramLocalParameterdvARB GET_GetProgramLocalParameterdvARB(struct _glapi_table *disp) { + return (_glptr_GetProgramLocalParameterdvARB) (GET_by_offset(disp, _gloffset_GetProgramLocalParameterdvARB)); +} + +static INLINE void SET_GetProgramLocalParameterdvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetProgramLocalParameterdvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetProgramLocalParameterfvARB)(GLenum, GLuint, GLfloat *); +#define CALL_GetProgramLocalParameterfvARB(disp, parameters) \ + (* GET_GetProgramLocalParameterfvARB(disp)) parameters +static INLINE _glptr_GetProgramLocalParameterfvARB GET_GetProgramLocalParameterfvARB(struct _glapi_table *disp) { + return (_glptr_GetProgramLocalParameterfvARB) (GET_by_offset(disp, _gloffset_GetProgramLocalParameterfvARB)); +} + +static INLINE void SET_GetProgramLocalParameterfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetProgramLocalParameterfvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetProgramStringARB)(GLenum, GLenum, GLvoid *); +#define CALL_GetProgramStringARB(disp, parameters) \ + (* GET_GetProgramStringARB(disp)) parameters +static INLINE _glptr_GetProgramStringARB GET_GetProgramStringARB(struct _glapi_table *disp) { + return (_glptr_GetProgramStringARB) (GET_by_offset(disp, _gloffset_GetProgramStringARB)); +} + +static INLINE void SET_GetProgramStringARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetProgramStringARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetProgramivARB)(GLenum, GLenum, GLint *); +#define CALL_GetProgramivARB(disp, parameters) \ + (* GET_GetProgramivARB(disp)) parameters +static INLINE _glptr_GetProgramivARB GET_GetProgramivARB(struct _glapi_table *disp) { + return (_glptr_GetProgramivARB) (GET_by_offset(disp, _gloffset_GetProgramivARB)); +} + +static INLINE void SET_GetProgramivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetProgramivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetVertexAttribdvARB)(GLuint, GLenum, GLdouble *); +#define CALL_GetVertexAttribdvARB(disp, parameters) \ + (* GET_GetVertexAttribdvARB(disp)) parameters +static INLINE _glptr_GetVertexAttribdvARB GET_GetVertexAttribdvARB(struct _glapi_table *disp) { + return (_glptr_GetVertexAttribdvARB) (GET_by_offset(disp, _gloffset_GetVertexAttribdvARB)); +} + +static INLINE void SET_GetVertexAttribdvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetVertexAttribdvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetVertexAttribfvARB)(GLuint, GLenum, GLfloat *); +#define CALL_GetVertexAttribfvARB(disp, parameters) \ + (* GET_GetVertexAttribfvARB(disp)) parameters +static INLINE _glptr_GetVertexAttribfvARB GET_GetVertexAttribfvARB(struct _glapi_table *disp) { + return (_glptr_GetVertexAttribfvARB) (GET_by_offset(disp, _gloffset_GetVertexAttribfvARB)); +} + +static INLINE void SET_GetVertexAttribfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetVertexAttribfvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetVertexAttribivARB)(GLuint, GLenum, GLint *); +#define CALL_GetVertexAttribivARB(disp, parameters) \ + (* GET_GetVertexAttribivARB(disp)) parameters +static INLINE _glptr_GetVertexAttribivARB GET_GetVertexAttribivARB(struct _glapi_table *disp) { + return (_glptr_GetVertexAttribivARB) (GET_by_offset(disp, _gloffset_GetVertexAttribivARB)); +} + +static INLINE void SET_GetVertexAttribivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetVertexAttribivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_ProgramEnvParameter4dARB)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); +#define CALL_ProgramEnvParameter4dARB(disp, parameters) \ + (* GET_ProgramEnvParameter4dARB(disp)) parameters +static INLINE _glptr_ProgramEnvParameter4dARB GET_ProgramEnvParameter4dARB(struct _glapi_table *disp) { + return (_glptr_ProgramEnvParameter4dARB) (GET_by_offset(disp, _gloffset_ProgramEnvParameter4dARB)); +} + +static INLINE void SET_ProgramEnvParameter4dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_ProgramEnvParameter4dARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_ProgramEnvParameter4dvARB)(GLenum, GLuint, const GLdouble *); +#define CALL_ProgramEnvParameter4dvARB(disp, parameters) \ + (* GET_ProgramEnvParameter4dvARB(disp)) parameters +static INLINE _glptr_ProgramEnvParameter4dvARB GET_ProgramEnvParameter4dvARB(struct _glapi_table *disp) { + return (_glptr_ProgramEnvParameter4dvARB) (GET_by_offset(disp, _gloffset_ProgramEnvParameter4dvARB)); +} + +static INLINE void SET_ProgramEnvParameter4dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_ProgramEnvParameter4dvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_ProgramEnvParameter4fARB)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); +#define CALL_ProgramEnvParameter4fARB(disp, parameters) \ + (* GET_ProgramEnvParameter4fARB(disp)) parameters +static INLINE _glptr_ProgramEnvParameter4fARB GET_ProgramEnvParameter4fARB(struct _glapi_table *disp) { + return (_glptr_ProgramEnvParameter4fARB) (GET_by_offset(disp, _gloffset_ProgramEnvParameter4fARB)); +} + +static INLINE void SET_ProgramEnvParameter4fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_ProgramEnvParameter4fARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_ProgramEnvParameter4fvARB)(GLenum, GLuint, const GLfloat *); +#define CALL_ProgramEnvParameter4fvARB(disp, parameters) \ + (* GET_ProgramEnvParameter4fvARB(disp)) parameters +static INLINE _glptr_ProgramEnvParameter4fvARB GET_ProgramEnvParameter4fvARB(struct _glapi_table *disp) { + return (_glptr_ProgramEnvParameter4fvARB) (GET_by_offset(disp, _gloffset_ProgramEnvParameter4fvARB)); +} + +static INLINE void SET_ProgramEnvParameter4fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_ProgramEnvParameter4fvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_ProgramLocalParameter4dARB)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble); +#define CALL_ProgramLocalParameter4dARB(disp, parameters) \ + (* GET_ProgramLocalParameter4dARB(disp)) parameters +static INLINE _glptr_ProgramLocalParameter4dARB GET_ProgramLocalParameter4dARB(struct _glapi_table *disp) { + return (_glptr_ProgramLocalParameter4dARB) (GET_by_offset(disp, _gloffset_ProgramLocalParameter4dARB)); +} + +static INLINE void SET_ProgramLocalParameter4dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_ProgramLocalParameter4dARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_ProgramLocalParameter4dvARB)(GLenum, GLuint, const GLdouble *); +#define CALL_ProgramLocalParameter4dvARB(disp, parameters) \ + (* GET_ProgramLocalParameter4dvARB(disp)) parameters +static INLINE _glptr_ProgramLocalParameter4dvARB GET_ProgramLocalParameter4dvARB(struct _glapi_table *disp) { + return (_glptr_ProgramLocalParameter4dvARB) (GET_by_offset(disp, _gloffset_ProgramLocalParameter4dvARB)); +} + +static INLINE void SET_ProgramLocalParameter4dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_ProgramLocalParameter4dvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_ProgramLocalParameter4fARB)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat); +#define CALL_ProgramLocalParameter4fARB(disp, parameters) \ + (* GET_ProgramLocalParameter4fARB(disp)) parameters +static INLINE _glptr_ProgramLocalParameter4fARB GET_ProgramLocalParameter4fARB(struct _glapi_table *disp) { + return (_glptr_ProgramLocalParameter4fARB) (GET_by_offset(disp, _gloffset_ProgramLocalParameter4fARB)); +} + +static INLINE void SET_ProgramLocalParameter4fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_ProgramLocalParameter4fARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_ProgramLocalParameter4fvARB)(GLenum, GLuint, const GLfloat *); +#define CALL_ProgramLocalParameter4fvARB(disp, parameters) \ + (* GET_ProgramLocalParameter4fvARB(disp)) parameters +static INLINE _glptr_ProgramLocalParameter4fvARB GET_ProgramLocalParameter4fvARB(struct _glapi_table *disp) { + return (_glptr_ProgramLocalParameter4fvARB) (GET_by_offset(disp, _gloffset_ProgramLocalParameter4fvARB)); +} + +static INLINE void SET_ProgramLocalParameter4fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_ProgramLocalParameter4fvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_ProgramStringARB)(GLenum, GLenum, GLsizei, const GLvoid *); +#define CALL_ProgramStringARB(disp, parameters) \ + (* GET_ProgramStringARB(disp)) parameters +static INLINE _glptr_ProgramStringARB GET_ProgramStringARB(struct _glapi_table *disp) { + return (_glptr_ProgramStringARB) (GET_by_offset(disp, _gloffset_ProgramStringARB)); +} + +static INLINE void SET_ProgramStringARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_ProgramStringARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib1dARB)(GLuint, GLdouble); +#define CALL_VertexAttrib1dARB(disp, parameters) \ + (* GET_VertexAttrib1dARB(disp)) parameters +static INLINE _glptr_VertexAttrib1dARB GET_VertexAttrib1dARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib1dARB) (GET_by_offset(disp, _gloffset_VertexAttrib1dARB)); +} + +static INLINE void SET_VertexAttrib1dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLdouble)) { + SET_by_offset(disp, _gloffset_VertexAttrib1dARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib1dvARB)(GLuint, const GLdouble *); +#define CALL_VertexAttrib1dvARB(disp, parameters) \ + (* GET_VertexAttrib1dvARB(disp)) parameters +static INLINE _glptr_VertexAttrib1dvARB GET_VertexAttrib1dvARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib1dvARB) (GET_by_offset(disp, _gloffset_VertexAttrib1dvARB)); +} + +static INLINE void SET_VertexAttrib1dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttrib1dvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib1fARB)(GLuint, GLfloat); +#define CALL_VertexAttrib1fARB(disp, parameters) \ + (* GET_VertexAttrib1fARB(disp)) parameters +static INLINE _glptr_VertexAttrib1fARB GET_VertexAttrib1fARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib1fARB) (GET_by_offset(disp, _gloffset_VertexAttrib1fARB)); +} + +static INLINE void SET_VertexAttrib1fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat)) { + SET_by_offset(disp, _gloffset_VertexAttrib1fARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib1fvARB)(GLuint, const GLfloat *); +#define CALL_VertexAttrib1fvARB(disp, parameters) \ + (* GET_VertexAttrib1fvARB(disp)) parameters +static INLINE _glptr_VertexAttrib1fvARB GET_VertexAttrib1fvARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib1fvARB) (GET_by_offset(disp, _gloffset_VertexAttrib1fvARB)); +} + +static INLINE void SET_VertexAttrib1fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttrib1fvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib1sARB)(GLuint, GLshort); +#define CALL_VertexAttrib1sARB(disp, parameters) \ + (* GET_VertexAttrib1sARB(disp)) parameters +static INLINE _glptr_VertexAttrib1sARB GET_VertexAttrib1sARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib1sARB) (GET_by_offset(disp, _gloffset_VertexAttrib1sARB)); +} + +static INLINE void SET_VertexAttrib1sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLshort)) { + SET_by_offset(disp, _gloffset_VertexAttrib1sARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib1svARB)(GLuint, const GLshort *); +#define CALL_VertexAttrib1svARB(disp, parameters) \ + (* GET_VertexAttrib1svARB(disp)) parameters +static INLINE _glptr_VertexAttrib1svARB GET_VertexAttrib1svARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib1svARB) (GET_by_offset(disp, _gloffset_VertexAttrib1svARB)); +} + +static INLINE void SET_VertexAttrib1svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttrib1svARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib2dARB)(GLuint, GLdouble, GLdouble); +#define CALL_VertexAttrib2dARB(disp, parameters) \ + (* GET_VertexAttrib2dARB(disp)) parameters +static INLINE _glptr_VertexAttrib2dARB GET_VertexAttrib2dARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib2dARB) (GET_by_offset(disp, _gloffset_VertexAttrib2dARB)); +} + +static INLINE void SET_VertexAttrib2dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_VertexAttrib2dARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib2dvARB)(GLuint, const GLdouble *); +#define CALL_VertexAttrib2dvARB(disp, parameters) \ + (* GET_VertexAttrib2dvARB(disp)) parameters +static INLINE _glptr_VertexAttrib2dvARB GET_VertexAttrib2dvARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib2dvARB) (GET_by_offset(disp, _gloffset_VertexAttrib2dvARB)); +} + +static INLINE void SET_VertexAttrib2dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttrib2dvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib2fARB)(GLuint, GLfloat, GLfloat); +#define CALL_VertexAttrib2fARB(disp, parameters) \ + (* GET_VertexAttrib2fARB(disp)) parameters +static INLINE _glptr_VertexAttrib2fARB GET_VertexAttrib2fARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib2fARB) (GET_by_offset(disp, _gloffset_VertexAttrib2fARB)); +} + +static INLINE void SET_VertexAttrib2fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_VertexAttrib2fARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib2fvARB)(GLuint, const GLfloat *); +#define CALL_VertexAttrib2fvARB(disp, parameters) \ + (* GET_VertexAttrib2fvARB(disp)) parameters +static INLINE _glptr_VertexAttrib2fvARB GET_VertexAttrib2fvARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib2fvARB) (GET_by_offset(disp, _gloffset_VertexAttrib2fvARB)); +} + +static INLINE void SET_VertexAttrib2fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttrib2fvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib2sARB)(GLuint, GLshort, GLshort); +#define CALL_VertexAttrib2sARB(disp, parameters) \ + (* GET_VertexAttrib2sARB(disp)) parameters +static INLINE _glptr_VertexAttrib2sARB GET_VertexAttrib2sARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib2sARB) (GET_by_offset(disp, _gloffset_VertexAttrib2sARB)); +} + +static INLINE void SET_VertexAttrib2sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_VertexAttrib2sARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib2svARB)(GLuint, const GLshort *); +#define CALL_VertexAttrib2svARB(disp, parameters) \ + (* GET_VertexAttrib2svARB(disp)) parameters +static INLINE _glptr_VertexAttrib2svARB GET_VertexAttrib2svARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib2svARB) (GET_by_offset(disp, _gloffset_VertexAttrib2svARB)); +} + +static INLINE void SET_VertexAttrib2svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttrib2svARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib3dARB)(GLuint, GLdouble, GLdouble, GLdouble); +#define CALL_VertexAttrib3dARB(disp, parameters) \ + (* GET_VertexAttrib3dARB(disp)) parameters +static INLINE _glptr_VertexAttrib3dARB GET_VertexAttrib3dARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib3dARB) (GET_by_offset(disp, _gloffset_VertexAttrib3dARB)); +} + +static INLINE void SET_VertexAttrib3dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_VertexAttrib3dARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib3dvARB)(GLuint, const GLdouble *); +#define CALL_VertexAttrib3dvARB(disp, parameters) \ + (* GET_VertexAttrib3dvARB(disp)) parameters +static INLINE _glptr_VertexAttrib3dvARB GET_VertexAttrib3dvARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib3dvARB) (GET_by_offset(disp, _gloffset_VertexAttrib3dvARB)); +} + +static INLINE void SET_VertexAttrib3dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttrib3dvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib3fARB)(GLuint, GLfloat, GLfloat, GLfloat); +#define CALL_VertexAttrib3fARB(disp, parameters) \ + (* GET_VertexAttrib3fARB(disp)) parameters +static INLINE _glptr_VertexAttrib3fARB GET_VertexAttrib3fARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib3fARB) (GET_by_offset(disp, _gloffset_VertexAttrib3fARB)); +} + +static INLINE void SET_VertexAttrib3fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_VertexAttrib3fARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib3fvARB)(GLuint, const GLfloat *); +#define CALL_VertexAttrib3fvARB(disp, parameters) \ + (* GET_VertexAttrib3fvARB(disp)) parameters +static INLINE _glptr_VertexAttrib3fvARB GET_VertexAttrib3fvARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib3fvARB) (GET_by_offset(disp, _gloffset_VertexAttrib3fvARB)); +} + +static INLINE void SET_VertexAttrib3fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttrib3fvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib3sARB)(GLuint, GLshort, GLshort, GLshort); +#define CALL_VertexAttrib3sARB(disp, parameters) \ + (* GET_VertexAttrib3sARB(disp)) parameters +static INLINE _glptr_VertexAttrib3sARB GET_VertexAttrib3sARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib3sARB) (GET_by_offset(disp, _gloffset_VertexAttrib3sARB)); +} + +static INLINE void SET_VertexAttrib3sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_VertexAttrib3sARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib3svARB)(GLuint, const GLshort *); +#define CALL_VertexAttrib3svARB(disp, parameters) \ + (* GET_VertexAttrib3svARB(disp)) parameters +static INLINE _glptr_VertexAttrib3svARB GET_VertexAttrib3svARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib3svARB) (GET_by_offset(disp, _gloffset_VertexAttrib3svARB)); +} + +static INLINE void SET_VertexAttrib3svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttrib3svARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4NbvARB)(GLuint, const GLbyte *); +#define CALL_VertexAttrib4NbvARB(disp, parameters) \ + (* GET_VertexAttrib4NbvARB(disp)) parameters +static INLINE _glptr_VertexAttrib4NbvARB GET_VertexAttrib4NbvARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4NbvARB) (GET_by_offset(disp, _gloffset_VertexAttrib4NbvARB)); +} + +static INLINE void SET_VertexAttrib4NbvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLbyte *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4NbvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4NivARB)(GLuint, const GLint *); +#define CALL_VertexAttrib4NivARB(disp, parameters) \ + (* GET_VertexAttrib4NivARB(disp)) parameters +static INLINE _glptr_VertexAttrib4NivARB GET_VertexAttrib4NivARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4NivARB) (GET_by_offset(disp, _gloffset_VertexAttrib4NivARB)); +} + +static INLINE void SET_VertexAttrib4NivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLint *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4NivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4NsvARB)(GLuint, const GLshort *); +#define CALL_VertexAttrib4NsvARB(disp, parameters) \ + (* GET_VertexAttrib4NsvARB(disp)) parameters +static INLINE _glptr_VertexAttrib4NsvARB GET_VertexAttrib4NsvARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4NsvARB) (GET_by_offset(disp, _gloffset_VertexAttrib4NsvARB)); +} + +static INLINE void SET_VertexAttrib4NsvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4NsvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4NubARB)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte); +#define CALL_VertexAttrib4NubARB(disp, parameters) \ + (* GET_VertexAttrib4NubARB(disp)) parameters +static INLINE _glptr_VertexAttrib4NubARB GET_VertexAttrib4NubARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4NubARB) (GET_by_offset(disp, _gloffset_VertexAttrib4NubARB)); +} + +static INLINE void SET_VertexAttrib4NubARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte)) { + SET_by_offset(disp, _gloffset_VertexAttrib4NubARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4NubvARB)(GLuint, const GLubyte *); +#define CALL_VertexAttrib4NubvARB(disp, parameters) \ + (* GET_VertexAttrib4NubvARB(disp)) parameters +static INLINE _glptr_VertexAttrib4NubvARB GET_VertexAttrib4NubvARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4NubvARB) (GET_by_offset(disp, _gloffset_VertexAttrib4NubvARB)); +} + +static INLINE void SET_VertexAttrib4NubvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLubyte *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4NubvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4NuivARB)(GLuint, const GLuint *); +#define CALL_VertexAttrib4NuivARB(disp, parameters) \ + (* GET_VertexAttrib4NuivARB(disp)) parameters +static INLINE _glptr_VertexAttrib4NuivARB GET_VertexAttrib4NuivARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4NuivARB) (GET_by_offset(disp, _gloffset_VertexAttrib4NuivARB)); +} + +static INLINE void SET_VertexAttrib4NuivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLuint *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4NuivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4NusvARB)(GLuint, const GLushort *); +#define CALL_VertexAttrib4NusvARB(disp, parameters) \ + (* GET_VertexAttrib4NusvARB(disp)) parameters +static INLINE _glptr_VertexAttrib4NusvARB GET_VertexAttrib4NusvARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4NusvARB) (GET_by_offset(disp, _gloffset_VertexAttrib4NusvARB)); +} + +static INLINE void SET_VertexAttrib4NusvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLushort *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4NusvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4bvARB)(GLuint, const GLbyte *); +#define CALL_VertexAttrib4bvARB(disp, parameters) \ + (* GET_VertexAttrib4bvARB(disp)) parameters +static INLINE _glptr_VertexAttrib4bvARB GET_VertexAttrib4bvARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4bvARB) (GET_by_offset(disp, _gloffset_VertexAttrib4bvARB)); +} + +static INLINE void SET_VertexAttrib4bvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLbyte *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4bvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4dARB)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble); +#define CALL_VertexAttrib4dARB(disp, parameters) \ + (* GET_VertexAttrib4dARB(disp)) parameters +static INLINE _glptr_VertexAttrib4dARB GET_VertexAttrib4dARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4dARB) (GET_by_offset(disp, _gloffset_VertexAttrib4dARB)); +} + +static INLINE void SET_VertexAttrib4dARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_VertexAttrib4dARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4dvARB)(GLuint, const GLdouble *); +#define CALL_VertexAttrib4dvARB(disp, parameters) \ + (* GET_VertexAttrib4dvARB(disp)) parameters +static INLINE _glptr_VertexAttrib4dvARB GET_VertexAttrib4dvARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4dvARB) (GET_by_offset(disp, _gloffset_VertexAttrib4dvARB)); +} + +static INLINE void SET_VertexAttrib4dvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4dvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4fARB)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat); +#define CALL_VertexAttrib4fARB(disp, parameters) \ + (* GET_VertexAttrib4fARB(disp)) parameters +static INLINE _glptr_VertexAttrib4fARB GET_VertexAttrib4fARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4fARB) (GET_by_offset(disp, _gloffset_VertexAttrib4fARB)); +} + +static INLINE void SET_VertexAttrib4fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_VertexAttrib4fARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4fvARB)(GLuint, const GLfloat *); +#define CALL_VertexAttrib4fvARB(disp, parameters) \ + (* GET_VertexAttrib4fvARB(disp)) parameters +static INLINE _glptr_VertexAttrib4fvARB GET_VertexAttrib4fvARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4fvARB) (GET_by_offset(disp, _gloffset_VertexAttrib4fvARB)); +} + +static INLINE void SET_VertexAttrib4fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4fvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4ivARB)(GLuint, const GLint *); +#define CALL_VertexAttrib4ivARB(disp, parameters) \ + (* GET_VertexAttrib4ivARB(disp)) parameters +static INLINE _glptr_VertexAttrib4ivARB GET_VertexAttrib4ivARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4ivARB) (GET_by_offset(disp, _gloffset_VertexAttrib4ivARB)); +} + +static INLINE void SET_VertexAttrib4ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLint *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4ivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4sARB)(GLuint, GLshort, GLshort, GLshort, GLshort); +#define CALL_VertexAttrib4sARB(disp, parameters) \ + (* GET_VertexAttrib4sARB(disp)) parameters +static INLINE _glptr_VertexAttrib4sARB GET_VertexAttrib4sARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4sARB) (GET_by_offset(disp, _gloffset_VertexAttrib4sARB)); +} + +static INLINE void SET_VertexAttrib4sARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLshort, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_VertexAttrib4sARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4svARB)(GLuint, const GLshort *); +#define CALL_VertexAttrib4svARB(disp, parameters) \ + (* GET_VertexAttrib4svARB(disp)) parameters +static INLINE _glptr_VertexAttrib4svARB GET_VertexAttrib4svARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4svARB) (GET_by_offset(disp, _gloffset_VertexAttrib4svARB)); +} + +static INLINE void SET_VertexAttrib4svARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4svARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4ubvARB)(GLuint, const GLubyte *); +#define CALL_VertexAttrib4ubvARB(disp, parameters) \ + (* GET_VertexAttrib4ubvARB(disp)) parameters +static INLINE _glptr_VertexAttrib4ubvARB GET_VertexAttrib4ubvARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4ubvARB) (GET_by_offset(disp, _gloffset_VertexAttrib4ubvARB)); +} + +static INLINE void SET_VertexAttrib4ubvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLubyte *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4ubvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4uivARB)(GLuint, const GLuint *); +#define CALL_VertexAttrib4uivARB(disp, parameters) \ + (* GET_VertexAttrib4uivARB(disp)) parameters +static INLINE _glptr_VertexAttrib4uivARB GET_VertexAttrib4uivARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4uivARB) (GET_by_offset(disp, _gloffset_VertexAttrib4uivARB)); +} + +static INLINE void SET_VertexAttrib4uivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLuint *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4uivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4usvARB)(GLuint, const GLushort *); +#define CALL_VertexAttrib4usvARB(disp, parameters) \ + (* GET_VertexAttrib4usvARB(disp)) parameters +static INLINE _glptr_VertexAttrib4usvARB GET_VertexAttrib4usvARB(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4usvARB) (GET_by_offset(disp, _gloffset_VertexAttrib4usvARB)); +} + +static INLINE void SET_VertexAttrib4usvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLushort *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4usvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribPointerARB)(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *); +#define CALL_VertexAttribPointerARB(disp, parameters) \ + (* GET_VertexAttribPointerARB(disp)) parameters +static INLINE _glptr_VertexAttribPointerARB GET_VertexAttribPointerARB(struct _glapi_table *disp) { + return (_glptr_VertexAttribPointerARB) (GET_by_offset(disp, _gloffset_VertexAttribPointerARB)); +} + +static INLINE void SET_VertexAttribPointerARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLenum, GLboolean, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_VertexAttribPointerARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_BindBufferARB)(GLenum, GLuint); +#define CALL_BindBufferARB(disp, parameters) \ + (* GET_BindBufferARB(disp)) parameters +static INLINE _glptr_BindBufferARB GET_BindBufferARB(struct _glapi_table *disp) { + return (_glptr_BindBufferARB) (GET_by_offset(disp, _gloffset_BindBufferARB)); +} + +static INLINE void SET_BindBufferARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_BindBufferARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_BufferDataARB)(GLenum, GLsizeiptrARB, const GLvoid *, GLenum); +#define CALL_BufferDataARB(disp, parameters) \ + (* GET_BufferDataARB(disp)) parameters +static INLINE _glptr_BufferDataARB GET_BufferDataARB(struct _glapi_table *disp) { + return (_glptr_BufferDataARB) (GET_by_offset(disp, _gloffset_BufferDataARB)); +} + +static INLINE void SET_BufferDataARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizeiptrARB, const GLvoid *, GLenum)) { + SET_by_offset(disp, _gloffset_BufferDataARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_BufferSubDataARB)(GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *); +#define CALL_BufferSubDataARB(disp, parameters) \ + (* GET_BufferSubDataARB(disp)) parameters +static INLINE _glptr_BufferSubDataARB GET_BufferSubDataARB(struct _glapi_table *disp) { + return (_glptr_BufferSubDataARB) (GET_by_offset(disp, _gloffset_BufferSubDataARB)); +} + +static INLINE void SET_BufferSubDataARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLintptrARB, GLsizeiptrARB, const GLvoid *)) { + SET_by_offset(disp, _gloffset_BufferSubDataARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_DeleteBuffersARB)(GLsizei, const GLuint *); +#define CALL_DeleteBuffersARB(disp, parameters) \ + (* GET_DeleteBuffersARB(disp)) parameters +static INLINE _glptr_DeleteBuffersARB GET_DeleteBuffersARB(struct _glapi_table *disp) { + return (_glptr_DeleteBuffersARB) (GET_by_offset(disp, _gloffset_DeleteBuffersARB)); +} + +static INLINE void SET_DeleteBuffersARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_DeleteBuffersARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GenBuffersARB)(GLsizei, GLuint *); +#define CALL_GenBuffersARB(disp, parameters) \ + (* GET_GenBuffersARB(disp)) parameters +static INLINE _glptr_GenBuffersARB GET_GenBuffersARB(struct _glapi_table *disp) { + return (_glptr_GenBuffersARB) (GET_by_offset(disp, _gloffset_GenBuffersARB)); +} + +static INLINE void SET_GenBuffersARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GenBuffersARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetBufferParameterivARB)(GLenum, GLenum, GLint *); +#define CALL_GetBufferParameterivARB(disp, parameters) \ + (* GET_GetBufferParameterivARB(disp)) parameters +static INLINE _glptr_GetBufferParameterivARB GET_GetBufferParameterivARB(struct _glapi_table *disp) { + return (_glptr_GetBufferParameterivARB) (GET_by_offset(disp, _gloffset_GetBufferParameterivARB)); +} + +static INLINE void SET_GetBufferParameterivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetBufferParameterivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetBufferPointervARB)(GLenum, GLenum, GLvoid **); +#define CALL_GetBufferPointervARB(disp, parameters) \ + (* GET_GetBufferPointervARB(disp)) parameters +static INLINE _glptr_GetBufferPointervARB GET_GetBufferPointervARB(struct _glapi_table *disp) { + return (_glptr_GetBufferPointervARB) (GET_by_offset(disp, _gloffset_GetBufferPointervARB)); +} + +static INLINE void SET_GetBufferPointervARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLvoid **)) { + SET_by_offset(disp, _gloffset_GetBufferPointervARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetBufferSubDataARB)(GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *); +#define CALL_GetBufferSubDataARB(disp, parameters) \ + (* GET_GetBufferSubDataARB(disp)) parameters +static INLINE _glptr_GetBufferSubDataARB GET_GetBufferSubDataARB(struct _glapi_table *disp) { + return (_glptr_GetBufferSubDataARB) (GET_by_offset(disp, _gloffset_GetBufferSubDataARB)); +} + +static INLINE void SET_GetBufferSubDataARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLintptrARB, GLsizeiptrARB, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetBufferSubDataARB, fn); +} + +typedef GLboolean (GLAPIENTRYP _glptr_IsBufferARB)(GLuint); +#define CALL_IsBufferARB(disp, parameters) \ + (* GET_IsBufferARB(disp)) parameters +static INLINE _glptr_IsBufferARB GET_IsBufferARB(struct _glapi_table *disp) { + return (_glptr_IsBufferARB) (GET_by_offset(disp, _gloffset_IsBufferARB)); +} + +static INLINE void SET_IsBufferARB(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsBufferARB, fn); +} + +typedef GLvoid * (GLAPIENTRYP _glptr_MapBufferARB)(GLenum, GLenum); +#define CALL_MapBufferARB(disp, parameters) \ + (* GET_MapBufferARB(disp)) parameters +static INLINE _glptr_MapBufferARB GET_MapBufferARB(struct _glapi_table *disp) { + return (_glptr_MapBufferARB) (GET_by_offset(disp, _gloffset_MapBufferARB)); +} + +static INLINE void SET_MapBufferARB(struct _glapi_table *disp, GLvoid * (GLAPIENTRYP fn)(GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_MapBufferARB, fn); +} + +typedef GLboolean (GLAPIENTRYP _glptr_UnmapBufferARB)(GLenum); +#define CALL_UnmapBufferARB(disp, parameters) \ + (* GET_UnmapBufferARB(disp)) parameters +static INLINE _glptr_UnmapBufferARB GET_UnmapBufferARB(struct _glapi_table *disp) { + return (_glptr_UnmapBufferARB) (GET_by_offset(disp, _gloffset_UnmapBufferARB)); +} + +static INLINE void SET_UnmapBufferARB(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_UnmapBufferARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_BeginQueryARB)(GLenum, GLuint); +#define CALL_BeginQueryARB(disp, parameters) \ + (* GET_BeginQueryARB(disp)) parameters +static INLINE _glptr_BeginQueryARB GET_BeginQueryARB(struct _glapi_table *disp) { + return (_glptr_BeginQueryARB) (GET_by_offset(disp, _gloffset_BeginQueryARB)); +} + +static INLINE void SET_BeginQueryARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_BeginQueryARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_DeleteQueriesARB)(GLsizei, const GLuint *); +#define CALL_DeleteQueriesARB(disp, parameters) \ + (* GET_DeleteQueriesARB(disp)) parameters +static INLINE _glptr_DeleteQueriesARB GET_DeleteQueriesARB(struct _glapi_table *disp) { + return (_glptr_DeleteQueriesARB) (GET_by_offset(disp, _gloffset_DeleteQueriesARB)); +} + +static INLINE void SET_DeleteQueriesARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_DeleteQueriesARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_EndQueryARB)(GLenum); +#define CALL_EndQueryARB(disp, parameters) \ + (* GET_EndQueryARB(disp)) parameters +static INLINE _glptr_EndQueryARB GET_EndQueryARB(struct _glapi_table *disp) { + return (_glptr_EndQueryARB) (GET_by_offset(disp, _gloffset_EndQueryARB)); +} + +static INLINE void SET_EndQueryARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_EndQueryARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GenQueriesARB)(GLsizei, GLuint *); +#define CALL_GenQueriesARB(disp, parameters) \ + (* GET_GenQueriesARB(disp)) parameters +static INLINE _glptr_GenQueriesARB GET_GenQueriesARB(struct _glapi_table *disp) { + return (_glptr_GenQueriesARB) (GET_by_offset(disp, _gloffset_GenQueriesARB)); +} + +static INLINE void SET_GenQueriesARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GenQueriesARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetQueryObjectivARB)(GLuint, GLenum, GLint *); +#define CALL_GetQueryObjectivARB(disp, parameters) \ + (* GET_GetQueryObjectivARB(disp)) parameters +static INLINE _glptr_GetQueryObjectivARB GET_GetQueryObjectivARB(struct _glapi_table *disp) { + return (_glptr_GetQueryObjectivARB) (GET_by_offset(disp, _gloffset_GetQueryObjectivARB)); +} + +static INLINE void SET_GetQueryObjectivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetQueryObjectivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetQueryObjectuivARB)(GLuint, GLenum, GLuint *); +#define CALL_GetQueryObjectuivARB(disp, parameters) \ + (* GET_GetQueryObjectuivARB(disp)) parameters +static INLINE _glptr_GetQueryObjectuivARB GET_GetQueryObjectuivARB(struct _glapi_table *disp) { + return (_glptr_GetQueryObjectuivARB) (GET_by_offset(disp, _gloffset_GetQueryObjectuivARB)); +} + +static INLINE void SET_GetQueryObjectuivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLuint *)) { + SET_by_offset(disp, _gloffset_GetQueryObjectuivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetQueryivARB)(GLenum, GLenum, GLint *); +#define CALL_GetQueryivARB(disp, parameters) \ + (* GET_GetQueryivARB(disp)) parameters +static INLINE _glptr_GetQueryivARB GET_GetQueryivARB(struct _glapi_table *disp) { + return (_glptr_GetQueryivARB) (GET_by_offset(disp, _gloffset_GetQueryivARB)); +} + +static INLINE void SET_GetQueryivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetQueryivARB, fn); +} + +typedef GLboolean (GLAPIENTRYP _glptr_IsQueryARB)(GLuint); +#define CALL_IsQueryARB(disp, parameters) \ + (* GET_IsQueryARB(disp)) parameters +static INLINE _glptr_IsQueryARB GET_IsQueryARB(struct _glapi_table *disp) { + return (_glptr_IsQueryARB) (GET_by_offset(disp, _gloffset_IsQueryARB)); +} + +static INLINE void SET_IsQueryARB(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsQueryARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_AttachObjectARB)(GLhandleARB, GLhandleARB); +#define CALL_AttachObjectARB(disp, parameters) \ + (* GET_AttachObjectARB(disp)) parameters +static INLINE _glptr_AttachObjectARB GET_AttachObjectARB(struct _glapi_table *disp) { + return (_glptr_AttachObjectARB) (GET_by_offset(disp, _gloffset_AttachObjectARB)); +} + +static INLINE void SET_AttachObjectARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLhandleARB)) { + SET_by_offset(disp, _gloffset_AttachObjectARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_CompileShaderARB)(GLhandleARB); +#define CALL_CompileShaderARB(disp, parameters) \ + (* GET_CompileShaderARB(disp)) parameters +static INLINE _glptr_CompileShaderARB GET_CompileShaderARB(struct _glapi_table *disp) { + return (_glptr_CompileShaderARB) (GET_by_offset(disp, _gloffset_CompileShaderARB)); +} + +static INLINE void SET_CompileShaderARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB)) { + SET_by_offset(disp, _gloffset_CompileShaderARB, fn); +} + +typedef GLhandleARB (GLAPIENTRYP _glptr_CreateProgramObjectARB)(void); +#define CALL_CreateProgramObjectARB(disp, parameters) \ + (* GET_CreateProgramObjectARB(disp)) parameters +static INLINE _glptr_CreateProgramObjectARB GET_CreateProgramObjectARB(struct _glapi_table *disp) { + return (_glptr_CreateProgramObjectARB) (GET_by_offset(disp, _gloffset_CreateProgramObjectARB)); +} + +static INLINE void SET_CreateProgramObjectARB(struct _glapi_table *disp, GLhandleARB (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_CreateProgramObjectARB, fn); +} + +typedef GLhandleARB (GLAPIENTRYP _glptr_CreateShaderObjectARB)(GLenum); +#define CALL_CreateShaderObjectARB(disp, parameters) \ + (* GET_CreateShaderObjectARB(disp)) parameters +static INLINE _glptr_CreateShaderObjectARB GET_CreateShaderObjectARB(struct _glapi_table *disp) { + return (_glptr_CreateShaderObjectARB) (GET_by_offset(disp, _gloffset_CreateShaderObjectARB)); +} + +static INLINE void SET_CreateShaderObjectARB(struct _glapi_table *disp, GLhandleARB (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_CreateShaderObjectARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_DeleteObjectARB)(GLhandleARB); +#define CALL_DeleteObjectARB(disp, parameters) \ + (* GET_DeleteObjectARB(disp)) parameters +static INLINE _glptr_DeleteObjectARB GET_DeleteObjectARB(struct _glapi_table *disp) { + return (_glptr_DeleteObjectARB) (GET_by_offset(disp, _gloffset_DeleteObjectARB)); +} + +static INLINE void SET_DeleteObjectARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB)) { + SET_by_offset(disp, _gloffset_DeleteObjectARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_DetachObjectARB)(GLhandleARB, GLhandleARB); +#define CALL_DetachObjectARB(disp, parameters) \ + (* GET_DetachObjectARB(disp)) parameters +static INLINE _glptr_DetachObjectARB GET_DetachObjectARB(struct _glapi_table *disp) { + return (_glptr_DetachObjectARB) (GET_by_offset(disp, _gloffset_DetachObjectARB)); +} + +static INLINE void SET_DetachObjectARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLhandleARB)) { + SET_by_offset(disp, _gloffset_DetachObjectARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetActiveUniformARB)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *); +#define CALL_GetActiveUniformARB(disp, parameters) \ + (* GET_GetActiveUniformARB(disp)) parameters +static INLINE _glptr_GetActiveUniformARB GET_GetActiveUniformARB(struct _glapi_table *disp) { + return (_glptr_GetActiveUniformARB) (GET_by_offset(disp, _gloffset_GetActiveUniformARB)); +} + +static INLINE void SET_GetActiveUniformARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)) { + SET_by_offset(disp, _gloffset_GetActiveUniformARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetAttachedObjectsARB)(GLhandleARB, GLsizei, GLsizei *, GLhandleARB *); +#define CALL_GetAttachedObjectsARB(disp, parameters) \ + (* GET_GetAttachedObjectsARB(disp)) parameters +static INLINE _glptr_GetAttachedObjectsARB GET_GetAttachedObjectsARB(struct _glapi_table *disp) { + return (_glptr_GetAttachedObjectsARB) (GET_by_offset(disp, _gloffset_GetAttachedObjectsARB)); +} + +static INLINE void SET_GetAttachedObjectsARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLsizei, GLsizei *, GLhandleARB *)) { + SET_by_offset(disp, _gloffset_GetAttachedObjectsARB, fn); +} + +typedef GLhandleARB (GLAPIENTRYP _glptr_GetHandleARB)(GLenum); +#define CALL_GetHandleARB(disp, parameters) \ + (* GET_GetHandleARB(disp)) parameters +static INLINE _glptr_GetHandleARB GET_GetHandleARB(struct _glapi_table *disp) { + return (_glptr_GetHandleARB) (GET_by_offset(disp, _gloffset_GetHandleARB)); +} + +static INLINE void SET_GetHandleARB(struct _glapi_table *disp, GLhandleARB (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_GetHandleARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetInfoLogARB)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *); +#define CALL_GetInfoLogARB(disp, parameters) \ + (* GET_GetInfoLogARB(disp)) parameters +static INLINE _glptr_GetInfoLogARB GET_GetInfoLogARB(struct _glapi_table *disp) { + return (_glptr_GetInfoLogARB) (GET_by_offset(disp, _gloffset_GetInfoLogARB)); +} + +static INLINE void SET_GetInfoLogARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *)) { + SET_by_offset(disp, _gloffset_GetInfoLogARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetObjectParameterfvARB)(GLhandleARB, GLenum, GLfloat *); +#define CALL_GetObjectParameterfvARB(disp, parameters) \ + (* GET_GetObjectParameterfvARB(disp)) parameters +static INLINE _glptr_GetObjectParameterfvARB GET_GetObjectParameterfvARB(struct _glapi_table *disp) { + return (_glptr_GetObjectParameterfvARB) (GET_by_offset(disp, _gloffset_GetObjectParameterfvARB)); +} + +static INLINE void SET_GetObjectParameterfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetObjectParameterfvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetObjectParameterivARB)(GLhandleARB, GLenum, GLint *); +#define CALL_GetObjectParameterivARB(disp, parameters) \ + (* GET_GetObjectParameterivARB(disp)) parameters +static INLINE _glptr_GetObjectParameterivARB GET_GetObjectParameterivARB(struct _glapi_table *disp) { + return (_glptr_GetObjectParameterivARB) (GET_by_offset(disp, _gloffset_GetObjectParameterivARB)); +} + +static INLINE void SET_GetObjectParameterivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetObjectParameterivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetShaderSourceARB)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *); +#define CALL_GetShaderSourceARB(disp, parameters) \ + (* GET_GetShaderSourceARB(disp)) parameters +static INLINE _glptr_GetShaderSourceARB GET_GetShaderSourceARB(struct _glapi_table *disp) { + return (_glptr_GetShaderSourceARB) (GET_by_offset(disp, _gloffset_GetShaderSourceARB)); +} + +static INLINE void SET_GetShaderSourceARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLsizei, GLsizei *, GLcharARB *)) { + SET_by_offset(disp, _gloffset_GetShaderSourceARB, fn); +} + +typedef GLint (GLAPIENTRYP _glptr_GetUniformLocationARB)(GLhandleARB, const GLcharARB *); +#define CALL_GetUniformLocationARB(disp, parameters) \ + (* GET_GetUniformLocationARB(disp)) parameters +static INLINE _glptr_GetUniformLocationARB GET_GetUniformLocationARB(struct _glapi_table *disp) { + return (_glptr_GetUniformLocationARB) (GET_by_offset(disp, _gloffset_GetUniformLocationARB)); +} + +static INLINE void SET_GetUniformLocationARB(struct _glapi_table *disp, GLint (GLAPIENTRYP fn)(GLhandleARB, const GLcharARB *)) { + SET_by_offset(disp, _gloffset_GetUniformLocationARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetUniformfvARB)(GLhandleARB, GLint, GLfloat *); +#define CALL_GetUniformfvARB(disp, parameters) \ + (* GET_GetUniformfvARB(disp)) parameters +static INLINE _glptr_GetUniformfvARB GET_GetUniformfvARB(struct _glapi_table *disp) { + return (_glptr_GetUniformfvARB) (GET_by_offset(disp, _gloffset_GetUniformfvARB)); +} + +static INLINE void SET_GetUniformfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLint, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetUniformfvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetUniformivARB)(GLhandleARB, GLint, GLint *); +#define CALL_GetUniformivARB(disp, parameters) \ + (* GET_GetUniformivARB(disp)) parameters +static INLINE _glptr_GetUniformivARB GET_GetUniformivARB(struct _glapi_table *disp) { + return (_glptr_GetUniformivARB) (GET_by_offset(disp, _gloffset_GetUniformivARB)); +} + +static INLINE void SET_GetUniformivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLint, GLint *)) { + SET_by_offset(disp, _gloffset_GetUniformivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_LinkProgramARB)(GLhandleARB); +#define CALL_LinkProgramARB(disp, parameters) \ + (* GET_LinkProgramARB(disp)) parameters +static INLINE _glptr_LinkProgramARB GET_LinkProgramARB(struct _glapi_table *disp) { + return (_glptr_LinkProgramARB) (GET_by_offset(disp, _gloffset_LinkProgramARB)); +} + +static INLINE void SET_LinkProgramARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB)) { + SET_by_offset(disp, _gloffset_LinkProgramARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_ShaderSourceARB)(GLhandleARB, GLsizei, const GLcharARB **, const GLint *); +#define CALL_ShaderSourceARB(disp, parameters) \ + (* GET_ShaderSourceARB(disp)) parameters +static INLINE _glptr_ShaderSourceARB GET_ShaderSourceARB(struct _glapi_table *disp) { + return (_glptr_ShaderSourceARB) (GET_by_offset(disp, _gloffset_ShaderSourceARB)); +} + +static INLINE void SET_ShaderSourceARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLsizei, const GLcharARB **, const GLint *)) { + SET_by_offset(disp, _gloffset_ShaderSourceARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform1fARB)(GLint, GLfloat); +#define CALL_Uniform1fARB(disp, parameters) \ + (* GET_Uniform1fARB(disp)) parameters +static INLINE _glptr_Uniform1fARB GET_Uniform1fARB(struct _glapi_table *disp) { + return (_glptr_Uniform1fARB) (GET_by_offset(disp, _gloffset_Uniform1fARB)); +} + +static INLINE void SET_Uniform1fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLfloat)) { + SET_by_offset(disp, _gloffset_Uniform1fARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform1fvARB)(GLint, GLsizei, const GLfloat *); +#define CALL_Uniform1fvARB(disp, parameters) \ + (* GET_Uniform1fvARB(disp)) parameters +static INLINE _glptr_Uniform1fvARB GET_Uniform1fvARB(struct _glapi_table *disp) { + return (_glptr_Uniform1fvARB) (GET_by_offset(disp, _gloffset_Uniform1fvARB)); +} + +static INLINE void SET_Uniform1fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_Uniform1fvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform1iARB)(GLint, GLint); +#define CALL_Uniform1iARB(disp, parameters) \ + (* GET_Uniform1iARB(disp)) parameters +static INLINE _glptr_Uniform1iARB GET_Uniform1iARB(struct _glapi_table *disp) { + return (_glptr_Uniform1iARB) (GET_by_offset(disp, _gloffset_Uniform1iARB)); +} + +static INLINE void SET_Uniform1iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint)) { + SET_by_offset(disp, _gloffset_Uniform1iARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform1ivARB)(GLint, GLsizei, const GLint *); +#define CALL_Uniform1ivARB(disp, parameters) \ + (* GET_Uniform1ivARB(disp)) parameters +static INLINE _glptr_Uniform1ivARB GET_Uniform1ivARB(struct _glapi_table *disp) { + return (_glptr_Uniform1ivARB) (GET_by_offset(disp, _gloffset_Uniform1ivARB)); +} + +static INLINE void SET_Uniform1ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLint *)) { + SET_by_offset(disp, _gloffset_Uniform1ivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform2fARB)(GLint, GLfloat, GLfloat); +#define CALL_Uniform2fARB(disp, parameters) \ + (* GET_Uniform2fARB(disp)) parameters +static INLINE _glptr_Uniform2fARB GET_Uniform2fARB(struct _glapi_table *disp) { + return (_glptr_Uniform2fARB) (GET_by_offset(disp, _gloffset_Uniform2fARB)); +} + +static INLINE void SET_Uniform2fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Uniform2fARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform2fvARB)(GLint, GLsizei, const GLfloat *); +#define CALL_Uniform2fvARB(disp, parameters) \ + (* GET_Uniform2fvARB(disp)) parameters +static INLINE _glptr_Uniform2fvARB GET_Uniform2fvARB(struct _glapi_table *disp) { + return (_glptr_Uniform2fvARB) (GET_by_offset(disp, _gloffset_Uniform2fvARB)); +} + +static INLINE void SET_Uniform2fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_Uniform2fvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform2iARB)(GLint, GLint, GLint); +#define CALL_Uniform2iARB(disp, parameters) \ + (* GET_Uniform2iARB(disp)) parameters +static INLINE _glptr_Uniform2iARB GET_Uniform2iARB(struct _glapi_table *disp) { + return (_glptr_Uniform2iARB) (GET_by_offset(disp, _gloffset_Uniform2iARB)); +} + +static INLINE void SET_Uniform2iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_Uniform2iARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform2ivARB)(GLint, GLsizei, const GLint *); +#define CALL_Uniform2ivARB(disp, parameters) \ + (* GET_Uniform2ivARB(disp)) parameters +static INLINE _glptr_Uniform2ivARB GET_Uniform2ivARB(struct _glapi_table *disp) { + return (_glptr_Uniform2ivARB) (GET_by_offset(disp, _gloffset_Uniform2ivARB)); +} + +static INLINE void SET_Uniform2ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLint *)) { + SET_by_offset(disp, _gloffset_Uniform2ivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform3fARB)(GLint, GLfloat, GLfloat, GLfloat); +#define CALL_Uniform3fARB(disp, parameters) \ + (* GET_Uniform3fARB(disp)) parameters +static INLINE _glptr_Uniform3fARB GET_Uniform3fARB(struct _glapi_table *disp) { + return (_glptr_Uniform3fARB) (GET_by_offset(disp, _gloffset_Uniform3fARB)); +} + +static INLINE void SET_Uniform3fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Uniform3fARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform3fvARB)(GLint, GLsizei, const GLfloat *); +#define CALL_Uniform3fvARB(disp, parameters) \ + (* GET_Uniform3fvARB(disp)) parameters +static INLINE _glptr_Uniform3fvARB GET_Uniform3fvARB(struct _glapi_table *disp) { + return (_glptr_Uniform3fvARB) (GET_by_offset(disp, _gloffset_Uniform3fvARB)); +} + +static INLINE void SET_Uniform3fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_Uniform3fvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform3iARB)(GLint, GLint, GLint, GLint); +#define CALL_Uniform3iARB(disp, parameters) \ + (* GET_Uniform3iARB(disp)) parameters +static INLINE _glptr_Uniform3iARB GET_Uniform3iARB(struct _glapi_table *disp) { + return (_glptr_Uniform3iARB) (GET_by_offset(disp, _gloffset_Uniform3iARB)); +} + +static INLINE void SET_Uniform3iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_Uniform3iARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform3ivARB)(GLint, GLsizei, const GLint *); +#define CALL_Uniform3ivARB(disp, parameters) \ + (* GET_Uniform3ivARB(disp)) parameters +static INLINE _glptr_Uniform3ivARB GET_Uniform3ivARB(struct _glapi_table *disp) { + return (_glptr_Uniform3ivARB) (GET_by_offset(disp, _gloffset_Uniform3ivARB)); +} + +static INLINE void SET_Uniform3ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLint *)) { + SET_by_offset(disp, _gloffset_Uniform3ivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform4fARB)(GLint, GLfloat, GLfloat, GLfloat, GLfloat); +#define CALL_Uniform4fARB(disp, parameters) \ + (* GET_Uniform4fARB(disp)) parameters +static INLINE _glptr_Uniform4fARB GET_Uniform4fARB(struct _glapi_table *disp) { + return (_glptr_Uniform4fARB) (GET_by_offset(disp, _gloffset_Uniform4fARB)); +} + +static INLINE void SET_Uniform4fARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_Uniform4fARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform4fvARB)(GLint, GLsizei, const GLfloat *); +#define CALL_Uniform4fvARB(disp, parameters) \ + (* GET_Uniform4fvARB(disp)) parameters +static INLINE _glptr_Uniform4fvARB GET_Uniform4fvARB(struct _glapi_table *disp) { + return (_glptr_Uniform4fvARB) (GET_by_offset(disp, _gloffset_Uniform4fvARB)); +} + +static INLINE void SET_Uniform4fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_Uniform4fvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform4iARB)(GLint, GLint, GLint, GLint, GLint); +#define CALL_Uniform4iARB(disp, parameters) \ + (* GET_Uniform4iARB(disp)) parameters +static INLINE _glptr_Uniform4iARB GET_Uniform4iARB(struct _glapi_table *disp) { + return (_glptr_Uniform4iARB) (GET_by_offset(disp, _gloffset_Uniform4iARB)); +} + +static INLINE void SET_Uniform4iARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_Uniform4iARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform4ivARB)(GLint, GLsizei, const GLint *); +#define CALL_Uniform4ivARB(disp, parameters) \ + (* GET_Uniform4ivARB(disp)) parameters +static INLINE _glptr_Uniform4ivARB GET_Uniform4ivARB(struct _glapi_table *disp) { + return (_glptr_Uniform4ivARB) (GET_by_offset(disp, _gloffset_Uniform4ivARB)); +} + +static INLINE void SET_Uniform4ivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLint *)) { + SET_by_offset(disp, _gloffset_Uniform4ivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_UniformMatrix2fvARB)(GLint, GLsizei, GLboolean, const GLfloat *); +#define CALL_UniformMatrix2fvARB(disp, parameters) \ + (* GET_UniformMatrix2fvARB(disp)) parameters +static INLINE _glptr_UniformMatrix2fvARB GET_UniformMatrix2fvARB(struct _glapi_table *disp) { + return (_glptr_UniformMatrix2fvARB) (GET_by_offset(disp, _gloffset_UniformMatrix2fvARB)); +} + +static INLINE void SET_UniformMatrix2fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { + SET_by_offset(disp, _gloffset_UniformMatrix2fvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_UniformMatrix3fvARB)(GLint, GLsizei, GLboolean, const GLfloat *); +#define CALL_UniformMatrix3fvARB(disp, parameters) \ + (* GET_UniformMatrix3fvARB(disp)) parameters +static INLINE _glptr_UniformMatrix3fvARB GET_UniformMatrix3fvARB(struct _glapi_table *disp) { + return (_glptr_UniformMatrix3fvARB) (GET_by_offset(disp, _gloffset_UniformMatrix3fvARB)); +} + +static INLINE void SET_UniformMatrix3fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { + SET_by_offset(disp, _gloffset_UniformMatrix3fvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_UniformMatrix4fvARB)(GLint, GLsizei, GLboolean, const GLfloat *); +#define CALL_UniformMatrix4fvARB(disp, parameters) \ + (* GET_UniformMatrix4fvARB(disp)) parameters +static INLINE _glptr_UniformMatrix4fvARB GET_UniformMatrix4fvARB(struct _glapi_table *disp) { + return (_glptr_UniformMatrix4fvARB) (GET_by_offset(disp, _gloffset_UniformMatrix4fvARB)); +} + +static INLINE void SET_UniformMatrix4fvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, GLboolean, const GLfloat *)) { + SET_by_offset(disp, _gloffset_UniformMatrix4fvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_UseProgramObjectARB)(GLhandleARB); +#define CALL_UseProgramObjectARB(disp, parameters) \ + (* GET_UseProgramObjectARB(disp)) parameters +static INLINE _glptr_UseProgramObjectARB GET_UseProgramObjectARB(struct _glapi_table *disp) { + return (_glptr_UseProgramObjectARB) (GET_by_offset(disp, _gloffset_UseProgramObjectARB)); +} + +static INLINE void SET_UseProgramObjectARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB)) { + SET_by_offset(disp, _gloffset_UseProgramObjectARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_ValidateProgramARB)(GLhandleARB); +#define CALL_ValidateProgramARB(disp, parameters) \ + (* GET_ValidateProgramARB(disp)) parameters +static INLINE _glptr_ValidateProgramARB GET_ValidateProgramARB(struct _glapi_table *disp) { + return (_glptr_ValidateProgramARB) (GET_by_offset(disp, _gloffset_ValidateProgramARB)); +} + +static INLINE void SET_ValidateProgramARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB)) { + SET_by_offset(disp, _gloffset_ValidateProgramARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_BindAttribLocationARB)(GLhandleARB, GLuint, const GLcharARB *); +#define CALL_BindAttribLocationARB(disp, parameters) \ + (* GET_BindAttribLocationARB(disp)) parameters +static INLINE _glptr_BindAttribLocationARB GET_BindAttribLocationARB(struct _glapi_table *disp) { + return (_glptr_BindAttribLocationARB) (GET_by_offset(disp, _gloffset_BindAttribLocationARB)); +} + +static INLINE void SET_BindAttribLocationARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLuint, const GLcharARB *)) { + SET_by_offset(disp, _gloffset_BindAttribLocationARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetActiveAttribARB)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *); +#define CALL_GetActiveAttribARB(disp, parameters) \ + (* GET_GetActiveAttribARB(disp)) parameters +static INLINE _glptr_GetActiveAttribARB GET_GetActiveAttribARB(struct _glapi_table *disp) { + return (_glptr_GetActiveAttribARB) (GET_by_offset(disp, _gloffset_GetActiveAttribARB)); +} + +static INLINE void SET_GetActiveAttribARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLuint, GLsizei, GLsizei *, GLint *, GLenum *, GLcharARB *)) { + SET_by_offset(disp, _gloffset_GetActiveAttribARB, fn); +} + +typedef GLint (GLAPIENTRYP _glptr_GetAttribLocationARB)(GLhandleARB, const GLcharARB *); +#define CALL_GetAttribLocationARB(disp, parameters) \ + (* GET_GetAttribLocationARB(disp)) parameters +static INLINE _glptr_GetAttribLocationARB GET_GetAttribLocationARB(struct _glapi_table *disp) { + return (_glptr_GetAttribLocationARB) (GET_by_offset(disp, _gloffset_GetAttribLocationARB)); +} + +static INLINE void SET_GetAttribLocationARB(struct _glapi_table *disp, GLint (GLAPIENTRYP fn)(GLhandleARB, const GLcharARB *)) { + SET_by_offset(disp, _gloffset_GetAttribLocationARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_DrawBuffersARB)(GLsizei, const GLenum *); +#define CALL_DrawBuffersARB(disp, parameters) \ + (* GET_DrawBuffersARB(disp)) parameters +static INLINE _glptr_DrawBuffersARB GET_DrawBuffersARB(struct _glapi_table *disp) { + return (_glptr_DrawBuffersARB) (GET_by_offset(disp, _gloffset_DrawBuffersARB)); +} + +static INLINE void SET_DrawBuffersARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLenum *)) { + SET_by_offset(disp, _gloffset_DrawBuffersARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_ClampColorARB)(GLenum, GLenum); +#define CALL_ClampColorARB(disp, parameters) \ + (* GET_ClampColorARB(disp)) parameters +static INLINE _glptr_ClampColorARB GET_ClampColorARB(struct _glapi_table *disp) { + return (_glptr_ClampColorARB) (GET_by_offset(disp, _gloffset_ClampColorARB)); +} + +static INLINE void SET_ClampColorARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_ClampColorARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_DrawArraysInstancedARB)(GLenum, GLint, GLsizei, GLsizei); +#define CALL_DrawArraysInstancedARB(disp, parameters) \ + (* GET_DrawArraysInstancedARB(disp)) parameters +static INLINE _glptr_DrawArraysInstancedARB GET_DrawArraysInstancedARB(struct _glapi_table *disp) { + return (_glptr_DrawArraysInstancedARB) (GET_by_offset(disp, _gloffset_DrawArraysInstancedARB)); +} + +static INLINE void SET_DrawArraysInstancedARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLsizei, GLsizei)) { + SET_by_offset(disp, _gloffset_DrawArraysInstancedARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_DrawElementsInstancedARB)(GLenum, GLsizei, GLenum, const GLvoid *, GLsizei); +#define CALL_DrawElementsInstancedARB(disp, parameters) \ + (* GET_DrawElementsInstancedARB(disp)) parameters +static INLINE _glptr_DrawElementsInstancedARB GET_DrawElementsInstancedARB(struct _glapi_table *disp) { + return (_glptr_DrawElementsInstancedARB) (GET_by_offset(disp, _gloffset_DrawElementsInstancedARB)); +} + +static INLINE void SET_DrawElementsInstancedARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLenum, const GLvoid *, GLsizei)) { + SET_by_offset(disp, _gloffset_DrawElementsInstancedARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_RenderbufferStorageMultisample)(GLenum, GLsizei, GLenum, GLsizei, GLsizei); +#define CALL_RenderbufferStorageMultisample(disp, parameters) \ + (* GET_RenderbufferStorageMultisample(disp)) parameters +static INLINE _glptr_RenderbufferStorageMultisample GET_RenderbufferStorageMultisample(struct _glapi_table *disp) { + return (_glptr_RenderbufferStorageMultisample) (GET_by_offset(disp, _gloffset_RenderbufferStorageMultisample)); +} + +static INLINE void SET_RenderbufferStorageMultisample(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLenum, GLsizei, GLsizei)) { + SET_by_offset(disp, _gloffset_RenderbufferStorageMultisample, fn); +} + +typedef void (GLAPIENTRYP _glptr_FramebufferTextureARB)(GLenum, GLenum, GLuint, GLint); +#define CALL_FramebufferTextureARB(disp, parameters) \ + (* GET_FramebufferTextureARB(disp)) parameters +static INLINE _glptr_FramebufferTextureARB GET_FramebufferTextureARB(struct _glapi_table *disp) { + return (_glptr_FramebufferTextureARB) (GET_by_offset(disp, _gloffset_FramebufferTextureARB)); +} + +static INLINE void SET_FramebufferTextureARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint, GLint)) { + SET_by_offset(disp, _gloffset_FramebufferTextureARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_FramebufferTextureFaceARB)(GLenum, GLenum, GLuint, GLint, GLenum); +#define CALL_FramebufferTextureFaceARB(disp, parameters) \ + (* GET_FramebufferTextureFaceARB(disp)) parameters +static INLINE _glptr_FramebufferTextureFaceARB GET_FramebufferTextureFaceARB(struct _glapi_table *disp) { + return (_glptr_FramebufferTextureFaceARB) (GET_by_offset(disp, _gloffset_FramebufferTextureFaceARB)); +} + +static INLINE void SET_FramebufferTextureFaceARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint, GLint, GLenum)) { + SET_by_offset(disp, _gloffset_FramebufferTextureFaceARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_ProgramParameteriARB)(GLuint, GLenum, GLint); +#define CALL_ProgramParameteriARB(disp, parameters) \ + (* GET_ProgramParameteriARB(disp)) parameters +static INLINE _glptr_ProgramParameteriARB GET_ProgramParameteriARB(struct _glapi_table *disp) { + return (_glptr_ProgramParameteriARB) (GET_by_offset(disp, _gloffset_ProgramParameteriARB)); +} + +static INLINE void SET_ProgramParameteriARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint)) { + SET_by_offset(disp, _gloffset_ProgramParameteriARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribDivisorARB)(GLuint, GLuint); +#define CALL_VertexAttribDivisorARB(disp, parameters) \ + (* GET_VertexAttribDivisorARB(disp)) parameters +static INLINE _glptr_VertexAttribDivisorARB GET_VertexAttribDivisorARB(struct _glapi_table *disp) { + return (_glptr_VertexAttribDivisorARB) (GET_by_offset(disp, _gloffset_VertexAttribDivisorARB)); +} + +static INLINE void SET_VertexAttribDivisorARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_VertexAttribDivisorARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_FlushMappedBufferRange)(GLenum, GLintptr, GLsizeiptr); +#define CALL_FlushMappedBufferRange(disp, parameters) \ + (* GET_FlushMappedBufferRange(disp)) parameters +static INLINE _glptr_FlushMappedBufferRange GET_FlushMappedBufferRange(struct _glapi_table *disp) { + return (_glptr_FlushMappedBufferRange) (GET_by_offset(disp, _gloffset_FlushMappedBufferRange)); +} + +static INLINE void SET_FlushMappedBufferRange(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLintptr, GLsizeiptr)) { + SET_by_offset(disp, _gloffset_FlushMappedBufferRange, fn); +} + +typedef GLvoid * (GLAPIENTRYP _glptr_MapBufferRange)(GLenum, GLintptr, GLsizeiptr, GLbitfield); +#define CALL_MapBufferRange(disp, parameters) \ + (* GET_MapBufferRange(disp)) parameters +static INLINE _glptr_MapBufferRange GET_MapBufferRange(struct _glapi_table *disp) { + return (_glptr_MapBufferRange) (GET_by_offset(disp, _gloffset_MapBufferRange)); +} + +static INLINE void SET_MapBufferRange(struct _glapi_table *disp, GLvoid * (GLAPIENTRYP fn)(GLenum, GLintptr, GLsizeiptr, GLbitfield)) { + SET_by_offset(disp, _gloffset_MapBufferRange, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexBufferARB)(GLenum, GLenum, GLuint); +#define CALL_TexBufferARB(disp, parameters) \ + (* GET_TexBufferARB(disp)) parameters +static INLINE _glptr_TexBufferARB GET_TexBufferARB(struct _glapi_table *disp) { + return (_glptr_TexBufferARB) (GET_by_offset(disp, _gloffset_TexBufferARB)); +} + +static INLINE void SET_TexBufferARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_TexBufferARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_BindVertexArray)(GLuint); +#define CALL_BindVertexArray(disp, parameters) \ + (* GET_BindVertexArray(disp)) parameters +static INLINE _glptr_BindVertexArray GET_BindVertexArray(struct _glapi_table *disp) { + return (_glptr_BindVertexArray) (GET_by_offset(disp, _gloffset_BindVertexArray)); +} + +static INLINE void SET_BindVertexArray(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_BindVertexArray, fn); +} + +typedef void (GLAPIENTRYP _glptr_GenVertexArrays)(GLsizei, GLuint *); +#define CALL_GenVertexArrays(disp, parameters) \ + (* GET_GenVertexArrays(disp)) parameters +static INLINE _glptr_GenVertexArrays GET_GenVertexArrays(struct _glapi_table *disp) { + return (_glptr_GenVertexArrays) (GET_by_offset(disp, _gloffset_GenVertexArrays)); +} + +static INLINE void SET_GenVertexArrays(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GenVertexArrays, fn); +} + +typedef void (GLAPIENTRYP _glptr_CopyBufferSubData)(GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr); +#define CALL_CopyBufferSubData(disp, parameters) \ + (* GET_CopyBufferSubData(disp)) parameters +static INLINE _glptr_CopyBufferSubData GET_CopyBufferSubData(struct _glapi_table *disp) { + return (_glptr_CopyBufferSubData) (GET_by_offset(disp, _gloffset_CopyBufferSubData)); +} + +static INLINE void SET_CopyBufferSubData(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLintptr, GLintptr, GLsizeiptr)) { + SET_by_offset(disp, _gloffset_CopyBufferSubData, fn); +} + +typedef GLenum (GLAPIENTRYP _glptr_ClientWaitSync)(GLsync, GLbitfield, GLuint64); +#define CALL_ClientWaitSync(disp, parameters) \ + (* GET_ClientWaitSync(disp)) parameters +static INLINE _glptr_ClientWaitSync GET_ClientWaitSync(struct _glapi_table *disp) { + return (_glptr_ClientWaitSync) (GET_by_offset(disp, _gloffset_ClientWaitSync)); +} + +static INLINE void SET_ClientWaitSync(struct _glapi_table *disp, GLenum (GLAPIENTRYP fn)(GLsync, GLbitfield, GLuint64)) { + SET_by_offset(disp, _gloffset_ClientWaitSync, fn); +} + +typedef void (GLAPIENTRYP _glptr_DeleteSync)(GLsync); +#define CALL_DeleteSync(disp, parameters) \ + (* GET_DeleteSync(disp)) parameters +static INLINE _glptr_DeleteSync GET_DeleteSync(struct _glapi_table *disp) { + return (_glptr_DeleteSync) (GET_by_offset(disp, _gloffset_DeleteSync)); +} + +static INLINE void SET_DeleteSync(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsync)) { + SET_by_offset(disp, _gloffset_DeleteSync, fn); +} + +typedef GLsync (GLAPIENTRYP _glptr_FenceSync)(GLenum, GLbitfield); +#define CALL_FenceSync(disp, parameters) \ + (* GET_FenceSync(disp)) parameters +static INLINE _glptr_FenceSync GET_FenceSync(struct _glapi_table *disp) { + return (_glptr_FenceSync) (GET_by_offset(disp, _gloffset_FenceSync)); +} + +static INLINE void SET_FenceSync(struct _glapi_table *disp, GLsync (GLAPIENTRYP fn)(GLenum, GLbitfield)) { + SET_by_offset(disp, _gloffset_FenceSync, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetInteger64v)(GLenum, GLint64 *); +#define CALL_GetInteger64v(disp, parameters) \ + (* GET_GetInteger64v(disp)) parameters +static INLINE _glptr_GetInteger64v GET_GetInteger64v(struct _glapi_table *disp) { + return (_glptr_GetInteger64v) (GET_by_offset(disp, _gloffset_GetInteger64v)); +} + +static INLINE void SET_GetInteger64v(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint64 *)) { + SET_by_offset(disp, _gloffset_GetInteger64v, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetSynciv)(GLsync, GLenum, GLsizei, GLsizei *, GLint *); +#define CALL_GetSynciv(disp, parameters) \ + (* GET_GetSynciv(disp)) parameters +static INLINE _glptr_GetSynciv GET_GetSynciv(struct _glapi_table *disp) { + return (_glptr_GetSynciv) (GET_by_offset(disp, _gloffset_GetSynciv)); +} + +static INLINE void SET_GetSynciv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsync, GLenum, GLsizei, GLsizei *, GLint *)) { + SET_by_offset(disp, _gloffset_GetSynciv, fn); +} + +typedef GLboolean (GLAPIENTRYP _glptr_IsSync)(GLsync); +#define CALL_IsSync(disp, parameters) \ + (* GET_IsSync(disp)) parameters +static INLINE _glptr_IsSync GET_IsSync(struct _glapi_table *disp) { + return (_glptr_IsSync) (GET_by_offset(disp, _gloffset_IsSync)); +} + +static INLINE void SET_IsSync(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLsync)) { + SET_by_offset(disp, _gloffset_IsSync, fn); +} + +typedef void (GLAPIENTRYP _glptr_WaitSync)(GLsync, GLbitfield, GLuint64); +#define CALL_WaitSync(disp, parameters) \ + (* GET_WaitSync(disp)) parameters +static INLINE _glptr_WaitSync GET_WaitSync(struct _glapi_table *disp) { + return (_glptr_WaitSync) (GET_by_offset(disp, _gloffset_WaitSync)); +} + +static INLINE void SET_WaitSync(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsync, GLbitfield, GLuint64)) { + SET_by_offset(disp, _gloffset_WaitSync, fn); +} + +typedef void (GLAPIENTRYP _glptr_DrawElementsBaseVertex)(GLenum, GLsizei, GLenum, const GLvoid *, GLint); +#define CALL_DrawElementsBaseVertex(disp, parameters) \ + (* GET_DrawElementsBaseVertex(disp)) parameters +static INLINE _glptr_DrawElementsBaseVertex GET_DrawElementsBaseVertex(struct _glapi_table *disp) { + return (_glptr_DrawElementsBaseVertex) (GET_by_offset(disp, _gloffset_DrawElementsBaseVertex)); +} + +static INLINE void SET_DrawElementsBaseVertex(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLenum, const GLvoid *, GLint)) { + SET_by_offset(disp, _gloffset_DrawElementsBaseVertex, fn); +} + +typedef void (GLAPIENTRYP _glptr_DrawRangeElementsBaseVertex)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *, GLint); +#define CALL_DrawRangeElementsBaseVertex(disp, parameters) \ + (* GET_DrawRangeElementsBaseVertex(disp)) parameters +static INLINE _glptr_DrawRangeElementsBaseVertex GET_DrawRangeElementsBaseVertex(struct _glapi_table *disp) { + return (_glptr_DrawRangeElementsBaseVertex) (GET_by_offset(disp, _gloffset_DrawRangeElementsBaseVertex)); +} + +static INLINE void SET_DrawRangeElementsBaseVertex(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *, GLint)) { + SET_by_offset(disp, _gloffset_DrawRangeElementsBaseVertex, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiDrawElementsBaseVertex)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei, const GLint *); +#define CALL_MultiDrawElementsBaseVertex(disp, parameters) \ + (* GET_MultiDrawElementsBaseVertex(disp)) parameters +static INLINE _glptr_MultiDrawElementsBaseVertex GET_MultiDrawElementsBaseVertex(struct _glapi_table *disp) { + return (_glptr_MultiDrawElementsBaseVertex) (GET_by_offset(disp, _gloffset_MultiDrawElementsBaseVertex)); +} + +static INLINE void SET_MultiDrawElementsBaseVertex(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei, const GLint *)) { + SET_by_offset(disp, _gloffset_MultiDrawElementsBaseVertex, fn); +} + +typedef void (GLAPIENTRYP _glptr_BlendEquationSeparateiARB)(GLuint, GLenum, GLenum); +#define CALL_BlendEquationSeparateiARB(disp, parameters) \ + (* GET_BlendEquationSeparateiARB(disp)) parameters +static INLINE _glptr_BlendEquationSeparateiARB GET_BlendEquationSeparateiARB(struct _glapi_table *disp) { + return (_glptr_BlendEquationSeparateiARB) (GET_by_offset(disp, _gloffset_BlendEquationSeparateiARB)); +} + +static INLINE void SET_BlendEquationSeparateiARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_BlendEquationSeparateiARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_BlendEquationiARB)(GLuint, GLenum); +#define CALL_BlendEquationiARB(disp, parameters) \ + (* GET_BlendEquationiARB(disp)) parameters +static INLINE _glptr_BlendEquationiARB GET_BlendEquationiARB(struct _glapi_table *disp) { + return (_glptr_BlendEquationiARB) (GET_by_offset(disp, _gloffset_BlendEquationiARB)); +} + +static INLINE void SET_BlendEquationiARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum)) { + SET_by_offset(disp, _gloffset_BlendEquationiARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_BlendFuncSeparateiARB)(GLuint, GLenum, GLenum, GLenum, GLenum); +#define CALL_BlendFuncSeparateiARB(disp, parameters) \ + (* GET_BlendFuncSeparateiARB(disp)) parameters +static INLINE _glptr_BlendFuncSeparateiARB GET_BlendFuncSeparateiARB(struct _glapi_table *disp) { + return (_glptr_BlendFuncSeparateiARB) (GET_by_offset(disp, _gloffset_BlendFuncSeparateiARB)); +} + +static INLINE void SET_BlendFuncSeparateiARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLenum, GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_BlendFuncSeparateiARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_BlendFunciARB)(GLuint, GLenum, GLenum); +#define CALL_BlendFunciARB(disp, parameters) \ + (* GET_BlendFunciARB(disp)) parameters +static INLINE _glptr_BlendFunciARB GET_BlendFunciARB(struct _glapi_table *disp) { + return (_glptr_BlendFunciARB) (GET_by_offset(disp, _gloffset_BlendFunciARB)); +} + +static INLINE void SET_BlendFunciARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_BlendFunciARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_BindSampler)(GLuint, GLuint); +#define CALL_BindSampler(disp, parameters) \ + (* GET_BindSampler(disp)) parameters +static INLINE _glptr_BindSampler GET_BindSampler(struct _glapi_table *disp) { + return (_glptr_BindSampler) (GET_by_offset(disp, _gloffset_BindSampler)); +} + +static INLINE void SET_BindSampler(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_BindSampler, fn); +} + +typedef void (GLAPIENTRYP _glptr_DeleteSamplers)(GLsizei, const GLuint *); +#define CALL_DeleteSamplers(disp, parameters) \ + (* GET_DeleteSamplers(disp)) parameters +static INLINE _glptr_DeleteSamplers GET_DeleteSamplers(struct _glapi_table *disp) { + return (_glptr_DeleteSamplers) (GET_by_offset(disp, _gloffset_DeleteSamplers)); +} + +static INLINE void SET_DeleteSamplers(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_DeleteSamplers, fn); +} + +typedef void (GLAPIENTRYP _glptr_GenSamplers)(GLsizei, GLuint *); +#define CALL_GenSamplers(disp, parameters) \ + (* GET_GenSamplers(disp)) parameters +static INLINE _glptr_GenSamplers GET_GenSamplers(struct _glapi_table *disp) { + return (_glptr_GenSamplers) (GET_by_offset(disp, _gloffset_GenSamplers)); +} + +static INLINE void SET_GenSamplers(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GenSamplers, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetSamplerParameterIiv)(GLuint, GLenum, GLint *); +#define CALL_GetSamplerParameterIiv(disp, parameters) \ + (* GET_GetSamplerParameterIiv(disp)) parameters +static INLINE _glptr_GetSamplerParameterIiv GET_GetSamplerParameterIiv(struct _glapi_table *disp) { + return (_glptr_GetSamplerParameterIiv) (GET_by_offset(disp, _gloffset_GetSamplerParameterIiv)); +} + +static INLINE void SET_GetSamplerParameterIiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetSamplerParameterIiv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetSamplerParameterIuiv)(GLuint, GLenum, GLuint *); +#define CALL_GetSamplerParameterIuiv(disp, parameters) \ + (* GET_GetSamplerParameterIuiv(disp)) parameters +static INLINE _glptr_GetSamplerParameterIuiv GET_GetSamplerParameterIuiv(struct _glapi_table *disp) { + return (_glptr_GetSamplerParameterIuiv) (GET_by_offset(disp, _gloffset_GetSamplerParameterIuiv)); +} + +static INLINE void SET_GetSamplerParameterIuiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLuint *)) { + SET_by_offset(disp, _gloffset_GetSamplerParameterIuiv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetSamplerParameterfv)(GLuint, GLenum, GLfloat *); +#define CALL_GetSamplerParameterfv(disp, parameters) \ + (* GET_GetSamplerParameterfv(disp)) parameters +static INLINE _glptr_GetSamplerParameterfv GET_GetSamplerParameterfv(struct _glapi_table *disp) { + return (_glptr_GetSamplerParameterfv) (GET_by_offset(disp, _gloffset_GetSamplerParameterfv)); +} + +static INLINE void SET_GetSamplerParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetSamplerParameterfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetSamplerParameteriv)(GLuint, GLenum, GLint *); +#define CALL_GetSamplerParameteriv(disp, parameters) \ + (* GET_GetSamplerParameteriv(disp)) parameters +static INLINE _glptr_GetSamplerParameteriv GET_GetSamplerParameteriv(struct _glapi_table *disp) { + return (_glptr_GetSamplerParameteriv) (GET_by_offset(disp, _gloffset_GetSamplerParameteriv)); +} + +static INLINE void SET_GetSamplerParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetSamplerParameteriv, fn); +} + +typedef GLboolean (GLAPIENTRYP _glptr_IsSampler)(GLuint); +#define CALL_IsSampler(disp, parameters) \ + (* GET_IsSampler(disp)) parameters +static INLINE _glptr_IsSampler GET_IsSampler(struct _glapi_table *disp) { + return (_glptr_IsSampler) (GET_by_offset(disp, _gloffset_IsSampler)); +} + +static INLINE void SET_IsSampler(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsSampler, fn); +} + +typedef void (GLAPIENTRYP _glptr_SamplerParameterIiv)(GLuint, GLenum, const GLint *); +#define CALL_SamplerParameterIiv(disp, parameters) \ + (* GET_SamplerParameterIiv(disp)) parameters +static INLINE _glptr_SamplerParameterIiv GET_SamplerParameterIiv(struct _glapi_table *disp) { + return (_glptr_SamplerParameterIiv) (GET_by_offset(disp, _gloffset_SamplerParameterIiv)); +} + +static INLINE void SET_SamplerParameterIiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_SamplerParameterIiv, fn); +} + +typedef void (GLAPIENTRYP _glptr_SamplerParameterIuiv)(GLuint, GLenum, const GLuint *); +#define CALL_SamplerParameterIuiv(disp, parameters) \ + (* GET_SamplerParameterIuiv(disp)) parameters +static INLINE _glptr_SamplerParameterIuiv GET_SamplerParameterIuiv(struct _glapi_table *disp) { + return (_glptr_SamplerParameterIuiv) (GET_by_offset(disp, _gloffset_SamplerParameterIuiv)); +} + +static INLINE void SET_SamplerParameterIuiv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, const GLuint *)) { + SET_by_offset(disp, _gloffset_SamplerParameterIuiv, fn); +} + +typedef void (GLAPIENTRYP _glptr_SamplerParameterf)(GLuint, GLenum, GLfloat); +#define CALL_SamplerParameterf(disp, parameters) \ + (* GET_SamplerParameterf(disp)) parameters +static INLINE _glptr_SamplerParameterf GET_SamplerParameterf(struct _glapi_table *disp) { + return (_glptr_SamplerParameterf) (GET_by_offset(disp, _gloffset_SamplerParameterf)); +} + +static INLINE void SET_SamplerParameterf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_SamplerParameterf, fn); +} + +typedef void (GLAPIENTRYP _glptr_SamplerParameterfv)(GLuint, GLenum, const GLfloat *); +#define CALL_SamplerParameterfv(disp, parameters) \ + (* GET_SamplerParameterfv(disp)) parameters +static INLINE _glptr_SamplerParameterfv GET_SamplerParameterfv(struct _glapi_table *disp) { + return (_glptr_SamplerParameterfv) (GET_by_offset(disp, _gloffset_SamplerParameterfv)); +} + +static INLINE void SET_SamplerParameterfv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_SamplerParameterfv, fn); +} + +typedef void (GLAPIENTRYP _glptr_SamplerParameteri)(GLuint, GLenum, GLint); +#define CALL_SamplerParameteri(disp, parameters) \ + (* GET_SamplerParameteri(disp)) parameters +static INLINE _glptr_SamplerParameteri GET_SamplerParameteri(struct _glapi_table *disp) { + return (_glptr_SamplerParameteri) (GET_by_offset(disp, _gloffset_SamplerParameteri)); +} + +static INLINE void SET_SamplerParameteri(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint)) { + SET_by_offset(disp, _gloffset_SamplerParameteri, fn); +} + +typedef void (GLAPIENTRYP _glptr_SamplerParameteriv)(GLuint, GLenum, const GLint *); +#define CALL_SamplerParameteriv(disp, parameters) \ + (* GET_SamplerParameteriv(disp)) parameters +static INLINE _glptr_SamplerParameteriv GET_SamplerParameteriv(struct _glapi_table *disp) { + return (_glptr_SamplerParameteriv) (GET_by_offset(disp, _gloffset_SamplerParameteriv)); +} + +static INLINE void SET_SamplerParameteriv(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_SamplerParameteriv, fn); +} + +typedef void (GLAPIENTRYP _glptr_BindTransformFeedback)(GLenum, GLuint); +#define CALL_BindTransformFeedback(disp, parameters) \ + (* GET_BindTransformFeedback(disp)) parameters +static INLINE _glptr_BindTransformFeedback GET_BindTransformFeedback(struct _glapi_table *disp) { + return (_glptr_BindTransformFeedback) (GET_by_offset(disp, _gloffset_BindTransformFeedback)); +} + +static INLINE void SET_BindTransformFeedback(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_BindTransformFeedback, fn); +} + +typedef void (GLAPIENTRYP _glptr_DeleteTransformFeedbacks)(GLsizei, const GLuint *); +#define CALL_DeleteTransformFeedbacks(disp, parameters) \ + (* GET_DeleteTransformFeedbacks(disp)) parameters +static INLINE _glptr_DeleteTransformFeedbacks GET_DeleteTransformFeedbacks(struct _glapi_table *disp) { + return (_glptr_DeleteTransformFeedbacks) (GET_by_offset(disp, _gloffset_DeleteTransformFeedbacks)); +} + +static INLINE void SET_DeleteTransformFeedbacks(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_DeleteTransformFeedbacks, fn); +} + +typedef void (GLAPIENTRYP _glptr_DrawTransformFeedback)(GLenum, GLuint); +#define CALL_DrawTransformFeedback(disp, parameters) \ + (* GET_DrawTransformFeedback(disp)) parameters +static INLINE _glptr_DrawTransformFeedback GET_DrawTransformFeedback(struct _glapi_table *disp) { + return (_glptr_DrawTransformFeedback) (GET_by_offset(disp, _gloffset_DrawTransformFeedback)); +} + +static INLINE void SET_DrawTransformFeedback(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_DrawTransformFeedback, fn); +} + +typedef void (GLAPIENTRYP _glptr_GenTransformFeedbacks)(GLsizei, GLuint *); +#define CALL_GenTransformFeedbacks(disp, parameters) \ + (* GET_GenTransformFeedbacks(disp)) parameters +static INLINE _glptr_GenTransformFeedbacks GET_GenTransformFeedbacks(struct _glapi_table *disp) { + return (_glptr_GenTransformFeedbacks) (GET_by_offset(disp, _gloffset_GenTransformFeedbacks)); +} + +static INLINE void SET_GenTransformFeedbacks(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GenTransformFeedbacks, fn); +} + +typedef GLboolean (GLAPIENTRYP _glptr_IsTransformFeedback)(GLuint); +#define CALL_IsTransformFeedback(disp, parameters) \ + (* GET_IsTransformFeedback(disp)) parameters +static INLINE _glptr_IsTransformFeedback GET_IsTransformFeedback(struct _glapi_table *disp) { + return (_glptr_IsTransformFeedback) (GET_by_offset(disp, _gloffset_IsTransformFeedback)); +} + +static INLINE void SET_IsTransformFeedback(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsTransformFeedback, fn); +} + +typedef void (GLAPIENTRYP _glptr_PauseTransformFeedback)(void); +#define CALL_PauseTransformFeedback(disp, parameters) \ + (* GET_PauseTransformFeedback(disp)) parameters +static INLINE _glptr_PauseTransformFeedback GET_PauseTransformFeedback(struct _glapi_table *disp) { + return (_glptr_PauseTransformFeedback) (GET_by_offset(disp, _gloffset_PauseTransformFeedback)); +} + +static INLINE void SET_PauseTransformFeedback(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_PauseTransformFeedback, fn); +} + +typedef void (GLAPIENTRYP _glptr_ResumeTransformFeedback)(void); +#define CALL_ResumeTransformFeedback(disp, parameters) \ + (* GET_ResumeTransformFeedback(disp)) parameters +static INLINE _glptr_ResumeTransformFeedback GET_ResumeTransformFeedback(struct _glapi_table *disp) { + return (_glptr_ResumeTransformFeedback) (GET_by_offset(disp, _gloffset_ResumeTransformFeedback)); +} + +static INLINE void SET_ResumeTransformFeedback(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_ResumeTransformFeedback, fn); +} + +typedef void (GLAPIENTRYP _glptr_ClearDepthf)(GLclampf); +#define CALL_ClearDepthf(disp, parameters) \ + (* GET_ClearDepthf(disp)) parameters +static INLINE _glptr_ClearDepthf GET_ClearDepthf(struct _glapi_table *disp) { + return (_glptr_ClearDepthf) (GET_by_offset(disp, _gloffset_ClearDepthf)); +} + +static INLINE void SET_ClearDepthf(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf)) { + SET_by_offset(disp, _gloffset_ClearDepthf, fn); +} + +typedef void (GLAPIENTRYP _glptr_DepthRangef)(GLclampf, GLclampf); +#define CALL_DepthRangef(disp, parameters) \ + (* GET_DepthRangef(disp)) parameters +static INLINE _glptr_DepthRangef GET_DepthRangef(struct _glapi_table *disp) { + return (_glptr_DepthRangef) (GET_by_offset(disp, _gloffset_DepthRangef)); +} + +static INLINE void SET_DepthRangef(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf, GLclampf)) { + SET_by_offset(disp, _gloffset_DepthRangef, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetShaderPrecisionFormat)(GLenum, GLenum, GLint *, GLint *); +#define CALL_GetShaderPrecisionFormat(disp, parameters) \ + (* GET_GetShaderPrecisionFormat(disp)) parameters +static INLINE _glptr_GetShaderPrecisionFormat GET_GetShaderPrecisionFormat(struct _glapi_table *disp) { + return (_glptr_GetShaderPrecisionFormat) (GET_by_offset(disp, _gloffset_GetShaderPrecisionFormat)); +} + +static INLINE void SET_GetShaderPrecisionFormat(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *, GLint *)) { + SET_by_offset(disp, _gloffset_GetShaderPrecisionFormat, fn); +} + +typedef void (GLAPIENTRYP _glptr_ReleaseShaderCompiler)(void); +#define CALL_ReleaseShaderCompiler(disp, parameters) \ + (* GET_ReleaseShaderCompiler(disp)) parameters +static INLINE _glptr_ReleaseShaderCompiler GET_ReleaseShaderCompiler(struct _glapi_table *disp) { + return (_glptr_ReleaseShaderCompiler) (GET_by_offset(disp, _gloffset_ReleaseShaderCompiler)); +} + +static INLINE void SET_ReleaseShaderCompiler(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_ReleaseShaderCompiler, fn); +} + +typedef void (GLAPIENTRYP _glptr_ShaderBinary)(GLsizei, const GLuint *, GLenum, const GLvoid *, GLsizei); +#define CALL_ShaderBinary(disp, parameters) \ + (* GET_ShaderBinary(disp)) parameters +static INLINE _glptr_ShaderBinary GET_ShaderBinary(struct _glapi_table *disp) { + return (_glptr_ShaderBinary) (GET_by_offset(disp, _gloffset_ShaderBinary)); +} + +static INLINE void SET_ShaderBinary(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *, GLenum, const GLvoid *, GLsizei)) { + SET_by_offset(disp, _gloffset_ShaderBinary, fn); +} + +typedef GLenum (GLAPIENTRYP _glptr_GetGraphicsResetStatusARB)(void); +#define CALL_GetGraphicsResetStatusARB(disp, parameters) \ + (* GET_GetGraphicsResetStatusARB(disp)) parameters +static INLINE _glptr_GetGraphicsResetStatusARB GET_GetGraphicsResetStatusARB(struct _glapi_table *disp) { + return (_glptr_GetGraphicsResetStatusARB) (GET_by_offset(disp, _gloffset_GetGraphicsResetStatusARB)); +} + +static INLINE void SET_GetGraphicsResetStatusARB(struct _glapi_table *disp, GLenum (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_GetGraphicsResetStatusARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetnColorTableARB)(GLenum, GLenum, GLenum, GLsizei, GLvoid *); +#define CALL_GetnColorTableARB(disp, parameters) \ + (* GET_GetnColorTableARB(disp)) parameters +static INLINE _glptr_GetnColorTableARB GET_GetnColorTableARB(struct _glapi_table *disp) { + return (_glptr_GetnColorTableARB) (GET_by_offset(disp, _gloffset_GetnColorTableARB)); +} + +static INLINE void SET_GetnColorTableARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLsizei, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetnColorTableARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetnCompressedTexImageARB)(GLenum, GLint, GLsizei, GLvoid *); +#define CALL_GetnCompressedTexImageARB(disp, parameters) \ + (* GET_GetnCompressedTexImageARB(disp)) parameters +static INLINE _glptr_GetnCompressedTexImageARB GET_GetnCompressedTexImageARB(struct _glapi_table *disp) { + return (_glptr_GetnCompressedTexImageARB) (GET_by_offset(disp, _gloffset_GetnCompressedTexImageARB)); +} + +static INLINE void SET_GetnCompressedTexImageARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLsizei, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetnCompressedTexImageARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetnConvolutionFilterARB)(GLenum, GLenum, GLenum, GLsizei, GLvoid *); +#define CALL_GetnConvolutionFilterARB(disp, parameters) \ + (* GET_GetnConvolutionFilterARB(disp)) parameters +static INLINE _glptr_GetnConvolutionFilterARB GET_GetnConvolutionFilterARB(struct _glapi_table *disp) { + return (_glptr_GetnConvolutionFilterARB) (GET_by_offset(disp, _gloffset_GetnConvolutionFilterARB)); +} + +static INLINE void SET_GetnConvolutionFilterARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLsizei, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetnConvolutionFilterARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetnHistogramARB)(GLenum, GLboolean, GLenum, GLenum, GLsizei, GLvoid *); +#define CALL_GetnHistogramARB(disp, parameters) \ + (* GET_GetnHistogramARB(disp)) parameters +static INLINE _glptr_GetnHistogramARB GET_GetnHistogramARB(struct _glapi_table *disp) { + return (_glptr_GetnHistogramARB) (GET_by_offset(disp, _gloffset_GetnHistogramARB)); +} + +static INLINE void SET_GetnHistogramARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLboolean, GLenum, GLenum, GLsizei, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetnHistogramARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetnMapdvARB)(GLenum, GLenum, GLsizei, GLdouble *); +#define CALL_GetnMapdvARB(disp, parameters) \ + (* GET_GetnMapdvARB(disp)) parameters +static INLINE _glptr_GetnMapdvARB GET_GetnMapdvARB(struct _glapi_table *disp) { + return (_glptr_GetnMapdvARB) (GET_by_offset(disp, _gloffset_GetnMapdvARB)); +} + +static INLINE void SET_GetnMapdvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetnMapdvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetnMapfvARB)(GLenum, GLenum, GLsizei, GLfloat *); +#define CALL_GetnMapfvARB(disp, parameters) \ + (* GET_GetnMapfvARB(disp)) parameters +static INLINE _glptr_GetnMapfvARB GET_GetnMapfvARB(struct _glapi_table *disp) { + return (_glptr_GetnMapfvARB) (GET_by_offset(disp, _gloffset_GetnMapfvARB)); +} + +static INLINE void SET_GetnMapfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetnMapfvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetnMapivARB)(GLenum, GLenum, GLsizei, GLint *); +#define CALL_GetnMapivARB(disp, parameters) \ + (* GET_GetnMapivARB(disp)) parameters +static INLINE _glptr_GetnMapivARB GET_GetnMapivARB(struct _glapi_table *disp) { + return (_glptr_GetnMapivARB) (GET_by_offset(disp, _gloffset_GetnMapivARB)); +} + +static INLINE void SET_GetnMapivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLint *)) { + SET_by_offset(disp, _gloffset_GetnMapivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetnMinmaxARB)(GLenum, GLboolean, GLenum, GLenum, GLsizei, GLvoid *); +#define CALL_GetnMinmaxARB(disp, parameters) \ + (* GET_GetnMinmaxARB(disp)) parameters +static INLINE _glptr_GetnMinmaxARB GET_GetnMinmaxARB(struct _glapi_table *disp) { + return (_glptr_GetnMinmaxARB) (GET_by_offset(disp, _gloffset_GetnMinmaxARB)); +} + +static INLINE void SET_GetnMinmaxARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLboolean, GLenum, GLenum, GLsizei, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetnMinmaxARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetnPixelMapfvARB)(GLenum, GLsizei, GLfloat *); +#define CALL_GetnPixelMapfvARB(disp, parameters) \ + (* GET_GetnPixelMapfvARB(disp)) parameters +static INLINE _glptr_GetnPixelMapfvARB GET_GetnPixelMapfvARB(struct _glapi_table *disp) { + return (_glptr_GetnPixelMapfvARB) (GET_by_offset(disp, _gloffset_GetnPixelMapfvARB)); +} + +static INLINE void SET_GetnPixelMapfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetnPixelMapfvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetnPixelMapuivARB)(GLenum, GLsizei, GLuint *); +#define CALL_GetnPixelMapuivARB(disp, parameters) \ + (* GET_GetnPixelMapuivARB(disp)) parameters +static INLINE _glptr_GetnPixelMapuivARB GET_GetnPixelMapuivARB(struct _glapi_table *disp) { + return (_glptr_GetnPixelMapuivARB) (GET_by_offset(disp, _gloffset_GetnPixelMapuivARB)); +} + +static INLINE void SET_GetnPixelMapuivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GetnPixelMapuivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetnPixelMapusvARB)(GLenum, GLsizei, GLushort *); +#define CALL_GetnPixelMapusvARB(disp, parameters) \ + (* GET_GetnPixelMapusvARB(disp)) parameters +static INLINE _glptr_GetnPixelMapusvARB GET_GetnPixelMapusvARB(struct _glapi_table *disp) { + return (_glptr_GetnPixelMapusvARB) (GET_by_offset(disp, _gloffset_GetnPixelMapusvARB)); +} + +static INLINE void SET_GetnPixelMapusvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLushort *)) { + SET_by_offset(disp, _gloffset_GetnPixelMapusvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetnPolygonStippleARB)(GLsizei, GLubyte *); +#define CALL_GetnPolygonStippleARB(disp, parameters) \ + (* GET_GetnPolygonStippleARB(disp)) parameters +static INLINE _glptr_GetnPolygonStippleARB GET_GetnPolygonStippleARB(struct _glapi_table *disp) { + return (_glptr_GetnPolygonStippleARB) (GET_by_offset(disp, _gloffset_GetnPolygonStippleARB)); +} + +static INLINE void SET_GetnPolygonStippleARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLubyte *)) { + SET_by_offset(disp, _gloffset_GetnPolygonStippleARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetnSeparableFilterARB)(GLenum, GLenum, GLenum, GLsizei, GLvoid *, GLsizei, GLvoid *, GLvoid *); +#define CALL_GetnSeparableFilterARB(disp, parameters) \ + (* GET_GetnSeparableFilterARB(disp)) parameters +static INLINE _glptr_GetnSeparableFilterARB GET_GetnSeparableFilterARB(struct _glapi_table *disp) { + return (_glptr_GetnSeparableFilterARB) (GET_by_offset(disp, _gloffset_GetnSeparableFilterARB)); +} + +static INLINE void SET_GetnSeparableFilterARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLsizei, GLvoid *, GLsizei, GLvoid *, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetnSeparableFilterARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetnTexImageARB)(GLenum, GLint, GLenum, GLenum, GLsizei, GLvoid *); +#define CALL_GetnTexImageARB(disp, parameters) \ + (* GET_GetnTexImageARB(disp)) parameters +static INLINE _glptr_GetnTexImageARB GET_GetnTexImageARB(struct _glapi_table *disp) { + return (_glptr_GetnTexImageARB) (GET_by_offset(disp, _gloffset_GetnTexImageARB)); +} + +static INLINE void SET_GetnTexImageARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint, GLenum, GLenum, GLsizei, GLvoid *)) { + SET_by_offset(disp, _gloffset_GetnTexImageARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetnUniformdvARB)(GLhandleARB, GLint, GLsizei, GLdouble *); +#define CALL_GetnUniformdvARB(disp, parameters) \ + (* GET_GetnUniformdvARB(disp)) parameters +static INLINE _glptr_GetnUniformdvARB GET_GetnUniformdvARB(struct _glapi_table *disp) { + return (_glptr_GetnUniformdvARB) (GET_by_offset(disp, _gloffset_GetnUniformdvARB)); +} + +static INLINE void SET_GetnUniformdvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLint, GLsizei, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetnUniformdvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetnUniformfvARB)(GLhandleARB, GLint, GLsizei, GLfloat *); +#define CALL_GetnUniformfvARB(disp, parameters) \ + (* GET_GetnUniformfvARB(disp)) parameters +static INLINE _glptr_GetnUniformfvARB GET_GetnUniformfvARB(struct _glapi_table *disp) { + return (_glptr_GetnUniformfvARB) (GET_by_offset(disp, _gloffset_GetnUniformfvARB)); +} + +static INLINE void SET_GetnUniformfvARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLint, GLsizei, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetnUniformfvARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetnUniformivARB)(GLhandleARB, GLint, GLsizei, GLint *); +#define CALL_GetnUniformivARB(disp, parameters) \ + (* GET_GetnUniformivARB(disp)) parameters +static INLINE _glptr_GetnUniformivARB GET_GetnUniformivARB(struct _glapi_table *disp) { + return (_glptr_GetnUniformivARB) (GET_by_offset(disp, _gloffset_GetnUniformivARB)); +} + +static INLINE void SET_GetnUniformivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLint, GLsizei, GLint *)) { + SET_by_offset(disp, _gloffset_GetnUniformivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetnUniformuivARB)(GLhandleARB, GLint, GLsizei, GLuint *); +#define CALL_GetnUniformuivARB(disp, parameters) \ + (* GET_GetnUniformuivARB(disp)) parameters +static INLINE _glptr_GetnUniformuivARB GET_GetnUniformuivARB(struct _glapi_table *disp) { + return (_glptr_GetnUniformuivARB) (GET_by_offset(disp, _gloffset_GetnUniformuivARB)); +} + +static INLINE void SET_GetnUniformuivARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLhandleARB, GLint, GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GetnUniformuivARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_ReadnPixelsARB)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLsizei, GLvoid *); +#define CALL_ReadnPixelsARB(disp, parameters) \ + (* GET_ReadnPixelsARB(disp)) parameters +static INLINE _glptr_ReadnPixelsARB GET_ReadnPixelsARB(struct _glapi_table *disp) { + return (_glptr_ReadnPixelsARB) (GET_by_offset(disp, _gloffset_ReadnPixelsARB)); +} + +static INLINE void SET_ReadnPixelsARB(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLsizei, GLvoid *)) { + SET_by_offset(disp, _gloffset_ReadnPixelsARB, fn); +} + +typedef void (GLAPIENTRYP _glptr_PolygonOffsetEXT)(GLfloat, GLfloat); +#define CALL_PolygonOffsetEXT(disp, parameters) \ + (* GET_PolygonOffsetEXT(disp)) parameters +static INLINE _glptr_PolygonOffsetEXT GET_PolygonOffsetEXT(struct _glapi_table *disp) { + return (_glptr_PolygonOffsetEXT) (GET_by_offset(disp, _gloffset_PolygonOffsetEXT)); +} + +static INLINE void SET_PolygonOffsetEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_PolygonOffsetEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetPixelTexGenParameterfvSGIS)(GLenum, GLfloat *); +#define CALL_GetPixelTexGenParameterfvSGIS(disp, parameters) \ + (* GET_GetPixelTexGenParameterfvSGIS(disp)) parameters +static INLINE _glptr_GetPixelTexGenParameterfvSGIS GET_GetPixelTexGenParameterfvSGIS(struct _glapi_table *disp) { + return (_glptr_GetPixelTexGenParameterfvSGIS) (GET_by_offset(disp, _gloffset_GetPixelTexGenParameterfvSGIS)); +} + +static INLINE void SET_GetPixelTexGenParameterfvSGIS(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetPixelTexGenParameterfvSGIS, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetPixelTexGenParameterivSGIS)(GLenum, GLint *); +#define CALL_GetPixelTexGenParameterivSGIS(disp, parameters) \ + (* GET_GetPixelTexGenParameterivSGIS(disp)) parameters +static INLINE _glptr_GetPixelTexGenParameterivSGIS GET_GetPixelTexGenParameterivSGIS(struct _glapi_table *disp) { + return (_glptr_GetPixelTexGenParameterivSGIS) (GET_by_offset(disp, _gloffset_GetPixelTexGenParameterivSGIS)); +} + +static INLINE void SET_GetPixelTexGenParameterivSGIS(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetPixelTexGenParameterivSGIS, fn); +} + +typedef void (GLAPIENTRYP _glptr_PixelTexGenParameterfSGIS)(GLenum, GLfloat); +#define CALL_PixelTexGenParameterfSGIS(disp, parameters) \ + (* GET_PixelTexGenParameterfSGIS(disp)) parameters +static INLINE _glptr_PixelTexGenParameterfSGIS GET_PixelTexGenParameterfSGIS(struct _glapi_table *disp) { + return (_glptr_PixelTexGenParameterfSGIS) (GET_by_offset(disp, _gloffset_PixelTexGenParameterfSGIS)); +} + +static INLINE void SET_PixelTexGenParameterfSGIS(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_PixelTexGenParameterfSGIS, fn); +} + +typedef void (GLAPIENTRYP _glptr_PixelTexGenParameterfvSGIS)(GLenum, const GLfloat *); +#define CALL_PixelTexGenParameterfvSGIS(disp, parameters) \ + (* GET_PixelTexGenParameterfvSGIS(disp)) parameters +static INLINE _glptr_PixelTexGenParameterfvSGIS GET_PixelTexGenParameterfvSGIS(struct _glapi_table *disp) { + return (_glptr_PixelTexGenParameterfvSGIS) (GET_by_offset(disp, _gloffset_PixelTexGenParameterfvSGIS)); +} + +static INLINE void SET_PixelTexGenParameterfvSGIS(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_PixelTexGenParameterfvSGIS, fn); +} + +typedef void (GLAPIENTRYP _glptr_PixelTexGenParameteriSGIS)(GLenum, GLint); +#define CALL_PixelTexGenParameteriSGIS(disp, parameters) \ + (* GET_PixelTexGenParameteriSGIS(disp)) parameters +static INLINE _glptr_PixelTexGenParameteriSGIS GET_PixelTexGenParameteriSGIS(struct _glapi_table *disp) { + return (_glptr_PixelTexGenParameteriSGIS) (GET_by_offset(disp, _gloffset_PixelTexGenParameteriSGIS)); +} + +static INLINE void SET_PixelTexGenParameteriSGIS(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint)) { + SET_by_offset(disp, _gloffset_PixelTexGenParameteriSGIS, fn); +} + +typedef void (GLAPIENTRYP _glptr_PixelTexGenParameterivSGIS)(GLenum, const GLint *); +#define CALL_PixelTexGenParameterivSGIS(disp, parameters) \ + (* GET_PixelTexGenParameterivSGIS(disp)) parameters +static INLINE _glptr_PixelTexGenParameterivSGIS GET_PixelTexGenParameterivSGIS(struct _glapi_table *disp) { + return (_glptr_PixelTexGenParameterivSGIS) (GET_by_offset(disp, _gloffset_PixelTexGenParameterivSGIS)); +} + +static INLINE void SET_PixelTexGenParameterivSGIS(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_PixelTexGenParameterivSGIS, fn); +} + +typedef void (GLAPIENTRYP _glptr_SampleMaskSGIS)(GLclampf, GLboolean); +#define CALL_SampleMaskSGIS(disp, parameters) \ + (* GET_SampleMaskSGIS(disp)) parameters +static INLINE _glptr_SampleMaskSGIS GET_SampleMaskSGIS(struct _glapi_table *disp) { + return (_glptr_SampleMaskSGIS) (GET_by_offset(disp, _gloffset_SampleMaskSGIS)); +} + +static INLINE void SET_SampleMaskSGIS(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampf, GLboolean)) { + SET_by_offset(disp, _gloffset_SampleMaskSGIS, fn); +} + +typedef void (GLAPIENTRYP _glptr_SamplePatternSGIS)(GLenum); +#define CALL_SamplePatternSGIS(disp, parameters) \ + (* GET_SamplePatternSGIS(disp)) parameters +static INLINE _glptr_SamplePatternSGIS GET_SamplePatternSGIS(struct _glapi_table *disp) { + return (_glptr_SamplePatternSGIS) (GET_by_offset(disp, _gloffset_SamplePatternSGIS)); +} + +static INLINE void SET_SamplePatternSGIS(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_SamplePatternSGIS, fn); +} + +typedef void (GLAPIENTRYP _glptr_ColorPointerEXT)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *); +#define CALL_ColorPointerEXT(disp, parameters) \ + (* GET_ColorPointerEXT(disp)) parameters +static INLINE _glptr_ColorPointerEXT GET_ColorPointerEXT(struct _glapi_table *disp) { + return (_glptr_ColorPointerEXT) (GET_by_offset(disp, _gloffset_ColorPointerEXT)); +} + +static INLINE void SET_ColorPointerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_ColorPointerEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_EdgeFlagPointerEXT)(GLsizei, GLsizei, const GLboolean *); +#define CALL_EdgeFlagPointerEXT(disp, parameters) \ + (* GET_EdgeFlagPointerEXT(disp)) parameters +static INLINE _glptr_EdgeFlagPointerEXT GET_EdgeFlagPointerEXT(struct _glapi_table *disp) { + return (_glptr_EdgeFlagPointerEXT) (GET_by_offset(disp, _gloffset_EdgeFlagPointerEXT)); +} + +static INLINE void SET_EdgeFlagPointerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLsizei, const GLboolean *)) { + SET_by_offset(disp, _gloffset_EdgeFlagPointerEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_IndexPointerEXT)(GLenum, GLsizei, GLsizei, const GLvoid *); +#define CALL_IndexPointerEXT(disp, parameters) \ + (* GET_IndexPointerEXT(disp)) parameters +static INLINE _glptr_IndexPointerEXT GET_IndexPointerEXT(struct _glapi_table *disp) { + return (_glptr_IndexPointerEXT) (GET_by_offset(disp, _gloffset_IndexPointerEXT)); +} + +static INLINE void SET_IndexPointerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_IndexPointerEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_NormalPointerEXT)(GLenum, GLsizei, GLsizei, const GLvoid *); +#define CALL_NormalPointerEXT(disp, parameters) \ + (* GET_NormalPointerEXT(disp)) parameters +static INLINE _glptr_NormalPointerEXT GET_NormalPointerEXT(struct _glapi_table *disp) { + return (_glptr_NormalPointerEXT) (GET_by_offset(disp, _gloffset_NormalPointerEXT)); +} + +static INLINE void SET_NormalPointerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_NormalPointerEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexCoordPointerEXT)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *); +#define CALL_TexCoordPointerEXT(disp, parameters) \ + (* GET_TexCoordPointerEXT(disp)) parameters +static INLINE _glptr_TexCoordPointerEXT GET_TexCoordPointerEXT(struct _glapi_table *disp) { + return (_glptr_TexCoordPointerEXT) (GET_by_offset(disp, _gloffset_TexCoordPointerEXT)); +} + +static INLINE void SET_TexCoordPointerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_TexCoordPointerEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexPointerEXT)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *); +#define CALL_VertexPointerEXT(disp, parameters) \ + (* GET_VertexPointerEXT(disp)) parameters +static INLINE _glptr_VertexPointerEXT GET_VertexPointerEXT(struct _glapi_table *disp) { + return (_glptr_VertexPointerEXT) (GET_by_offset(disp, _gloffset_VertexPointerEXT)); +} + +static INLINE void SET_VertexPointerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLenum, GLsizei, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_VertexPointerEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_PointParameterfEXT)(GLenum, GLfloat); +#define CALL_PointParameterfEXT(disp, parameters) \ + (* GET_PointParameterfEXT(disp)) parameters +static INLINE _glptr_PointParameterfEXT GET_PointParameterfEXT(struct _glapi_table *disp) { + return (_glptr_PointParameterfEXT) (GET_by_offset(disp, _gloffset_PointParameterfEXT)); +} + +static INLINE void SET_PointParameterfEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_PointParameterfEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_PointParameterfvEXT)(GLenum, const GLfloat *); +#define CALL_PointParameterfvEXT(disp, parameters) \ + (* GET_PointParameterfvEXT(disp)) parameters +static INLINE _glptr_PointParameterfvEXT GET_PointParameterfvEXT(struct _glapi_table *disp) { + return (_glptr_PointParameterfvEXT) (GET_by_offset(disp, _gloffset_PointParameterfvEXT)); +} + +static INLINE void SET_PointParameterfvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_PointParameterfvEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_LockArraysEXT)(GLint, GLsizei); +#define CALL_LockArraysEXT(disp, parameters) \ + (* GET_LockArraysEXT(disp)) parameters +static INLINE _glptr_LockArraysEXT GET_LockArraysEXT(struct _glapi_table *disp) { + return (_glptr_LockArraysEXT) (GET_by_offset(disp, _gloffset_LockArraysEXT)); +} + +static INLINE void SET_LockArraysEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei)) { + SET_by_offset(disp, _gloffset_LockArraysEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_UnlockArraysEXT)(void); +#define CALL_UnlockArraysEXT(disp, parameters) \ + (* GET_UnlockArraysEXT(disp)) parameters +static INLINE _glptr_UnlockArraysEXT GET_UnlockArraysEXT(struct _glapi_table *disp) { + return (_glptr_UnlockArraysEXT) (GET_by_offset(disp, _gloffset_UnlockArraysEXT)); +} + +static INLINE void SET_UnlockArraysEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_UnlockArraysEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_SecondaryColor3bEXT)(GLbyte, GLbyte, GLbyte); +#define CALL_SecondaryColor3bEXT(disp, parameters) \ + (* GET_SecondaryColor3bEXT(disp)) parameters +static INLINE _glptr_SecondaryColor3bEXT GET_SecondaryColor3bEXT(struct _glapi_table *disp) { + return (_glptr_SecondaryColor3bEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3bEXT)); +} + +static INLINE void SET_SecondaryColor3bEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLbyte, GLbyte, GLbyte)) { + SET_by_offset(disp, _gloffset_SecondaryColor3bEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_SecondaryColor3bvEXT)(const GLbyte *); +#define CALL_SecondaryColor3bvEXT(disp, parameters) \ + (* GET_SecondaryColor3bvEXT(disp)) parameters +static INLINE _glptr_SecondaryColor3bvEXT GET_SecondaryColor3bvEXT(struct _glapi_table *disp) { + return (_glptr_SecondaryColor3bvEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3bvEXT)); +} + +static INLINE void SET_SecondaryColor3bvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLbyte *)) { + SET_by_offset(disp, _gloffset_SecondaryColor3bvEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_SecondaryColor3dEXT)(GLdouble, GLdouble, GLdouble); +#define CALL_SecondaryColor3dEXT(disp, parameters) \ + (* GET_SecondaryColor3dEXT(disp)) parameters +static INLINE _glptr_SecondaryColor3dEXT GET_SecondaryColor3dEXT(struct _glapi_table *disp) { + return (_glptr_SecondaryColor3dEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3dEXT)); +} + +static INLINE void SET_SecondaryColor3dEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_SecondaryColor3dEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_SecondaryColor3dvEXT)(const GLdouble *); +#define CALL_SecondaryColor3dvEXT(disp, parameters) \ + (* GET_SecondaryColor3dvEXT(disp)) parameters +static INLINE _glptr_SecondaryColor3dvEXT GET_SecondaryColor3dvEXT(struct _glapi_table *disp) { + return (_glptr_SecondaryColor3dvEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3dvEXT)); +} + +static INLINE void SET_SecondaryColor3dvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_SecondaryColor3dvEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_SecondaryColor3fEXT)(GLfloat, GLfloat, GLfloat); +#define CALL_SecondaryColor3fEXT(disp, parameters) \ + (* GET_SecondaryColor3fEXT(disp)) parameters +static INLINE _glptr_SecondaryColor3fEXT GET_SecondaryColor3fEXT(struct _glapi_table *disp) { + return (_glptr_SecondaryColor3fEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3fEXT)); +} + +static INLINE void SET_SecondaryColor3fEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_SecondaryColor3fEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_SecondaryColor3fvEXT)(const GLfloat *); +#define CALL_SecondaryColor3fvEXT(disp, parameters) \ + (* GET_SecondaryColor3fvEXT(disp)) parameters +static INLINE _glptr_SecondaryColor3fvEXT GET_SecondaryColor3fvEXT(struct _glapi_table *disp) { + return (_glptr_SecondaryColor3fvEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3fvEXT)); +} + +static INLINE void SET_SecondaryColor3fvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_SecondaryColor3fvEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_SecondaryColor3iEXT)(GLint, GLint, GLint); +#define CALL_SecondaryColor3iEXT(disp, parameters) \ + (* GET_SecondaryColor3iEXT(disp)) parameters +static INLINE _glptr_SecondaryColor3iEXT GET_SecondaryColor3iEXT(struct _glapi_table *disp) { + return (_glptr_SecondaryColor3iEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3iEXT)); +} + +static INLINE void SET_SecondaryColor3iEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_SecondaryColor3iEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_SecondaryColor3ivEXT)(const GLint *); +#define CALL_SecondaryColor3ivEXT(disp, parameters) \ + (* GET_SecondaryColor3ivEXT(disp)) parameters +static INLINE _glptr_SecondaryColor3ivEXT GET_SecondaryColor3ivEXT(struct _glapi_table *disp) { + return (_glptr_SecondaryColor3ivEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3ivEXT)); +} + +static INLINE void SET_SecondaryColor3ivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_SecondaryColor3ivEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_SecondaryColor3sEXT)(GLshort, GLshort, GLshort); +#define CALL_SecondaryColor3sEXT(disp, parameters) \ + (* GET_SecondaryColor3sEXT(disp)) parameters +static INLINE _glptr_SecondaryColor3sEXT GET_SecondaryColor3sEXT(struct _glapi_table *disp) { + return (_glptr_SecondaryColor3sEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3sEXT)); +} + +static INLINE void SET_SecondaryColor3sEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_SecondaryColor3sEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_SecondaryColor3svEXT)(const GLshort *); +#define CALL_SecondaryColor3svEXT(disp, parameters) \ + (* GET_SecondaryColor3svEXT(disp)) parameters +static INLINE _glptr_SecondaryColor3svEXT GET_SecondaryColor3svEXT(struct _glapi_table *disp) { + return (_glptr_SecondaryColor3svEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3svEXT)); +} + +static INLINE void SET_SecondaryColor3svEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_SecondaryColor3svEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_SecondaryColor3ubEXT)(GLubyte, GLubyte, GLubyte); +#define CALL_SecondaryColor3ubEXT(disp, parameters) \ + (* GET_SecondaryColor3ubEXT(disp)) parameters +static INLINE _glptr_SecondaryColor3ubEXT GET_SecondaryColor3ubEXT(struct _glapi_table *disp) { + return (_glptr_SecondaryColor3ubEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3ubEXT)); +} + +static INLINE void SET_SecondaryColor3ubEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLubyte, GLubyte, GLubyte)) { + SET_by_offset(disp, _gloffset_SecondaryColor3ubEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_SecondaryColor3ubvEXT)(const GLubyte *); +#define CALL_SecondaryColor3ubvEXT(disp, parameters) \ + (* GET_SecondaryColor3ubvEXT(disp)) parameters +static INLINE _glptr_SecondaryColor3ubvEXT GET_SecondaryColor3ubvEXT(struct _glapi_table *disp) { + return (_glptr_SecondaryColor3ubvEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3ubvEXT)); +} + +static INLINE void SET_SecondaryColor3ubvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLubyte *)) { + SET_by_offset(disp, _gloffset_SecondaryColor3ubvEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_SecondaryColor3uiEXT)(GLuint, GLuint, GLuint); +#define CALL_SecondaryColor3uiEXT(disp, parameters) \ + (* GET_SecondaryColor3uiEXT(disp)) parameters +static INLINE _glptr_SecondaryColor3uiEXT GET_SecondaryColor3uiEXT(struct _glapi_table *disp) { + return (_glptr_SecondaryColor3uiEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3uiEXT)); +} + +static INLINE void SET_SecondaryColor3uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_SecondaryColor3uiEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_SecondaryColor3uivEXT)(const GLuint *); +#define CALL_SecondaryColor3uivEXT(disp, parameters) \ + (* GET_SecondaryColor3uivEXT(disp)) parameters +static INLINE _glptr_SecondaryColor3uivEXT GET_SecondaryColor3uivEXT(struct _glapi_table *disp) { + return (_glptr_SecondaryColor3uivEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3uivEXT)); +} + +static INLINE void SET_SecondaryColor3uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLuint *)) { + SET_by_offset(disp, _gloffset_SecondaryColor3uivEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_SecondaryColor3usEXT)(GLushort, GLushort, GLushort); +#define CALL_SecondaryColor3usEXT(disp, parameters) \ + (* GET_SecondaryColor3usEXT(disp)) parameters +static INLINE _glptr_SecondaryColor3usEXT GET_SecondaryColor3usEXT(struct _glapi_table *disp) { + return (_glptr_SecondaryColor3usEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3usEXT)); +} + +static INLINE void SET_SecondaryColor3usEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLushort, GLushort, GLushort)) { + SET_by_offset(disp, _gloffset_SecondaryColor3usEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_SecondaryColor3usvEXT)(const GLushort *); +#define CALL_SecondaryColor3usvEXT(disp, parameters) \ + (* GET_SecondaryColor3usvEXT(disp)) parameters +static INLINE _glptr_SecondaryColor3usvEXT GET_SecondaryColor3usvEXT(struct _glapi_table *disp) { + return (_glptr_SecondaryColor3usvEXT) (GET_by_offset(disp, _gloffset_SecondaryColor3usvEXT)); +} + +static INLINE void SET_SecondaryColor3usvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLushort *)) { + SET_by_offset(disp, _gloffset_SecondaryColor3usvEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_SecondaryColorPointerEXT)(GLint, GLenum, GLsizei, const GLvoid *); +#define CALL_SecondaryColorPointerEXT(disp, parameters) \ + (* GET_SecondaryColorPointerEXT(disp)) parameters +static INLINE _glptr_SecondaryColorPointerEXT GET_SecondaryColorPointerEXT(struct _glapi_table *disp) { + return (_glptr_SecondaryColorPointerEXT) (GET_by_offset(disp, _gloffset_SecondaryColorPointerEXT)); +} + +static INLINE void SET_SecondaryColorPointerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_SecondaryColorPointerEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiDrawArraysEXT)(GLenum, const GLint *, const GLsizei *, GLsizei); +#define CALL_MultiDrawArraysEXT(disp, parameters) \ + (* GET_MultiDrawArraysEXT(disp)) parameters +static INLINE _glptr_MultiDrawArraysEXT GET_MultiDrawArraysEXT(struct _glapi_table *disp) { + return (_glptr_MultiDrawArraysEXT) (GET_by_offset(disp, _gloffset_MultiDrawArraysEXT)); +} + +static INLINE void SET_MultiDrawArraysEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *, const GLsizei *, GLsizei)) { + SET_by_offset(disp, _gloffset_MultiDrawArraysEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiDrawElementsEXT)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei); +#define CALL_MultiDrawElementsEXT(disp, parameters) \ + (* GET_MultiDrawElementsEXT(disp)) parameters +static INLINE _glptr_MultiDrawElementsEXT GET_MultiDrawElementsEXT(struct _glapi_table *disp) { + return (_glptr_MultiDrawElementsEXT) (GET_by_offset(disp, _gloffset_MultiDrawElementsEXT)); +} + +static INLINE void SET_MultiDrawElementsEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei)) { + SET_by_offset(disp, _gloffset_MultiDrawElementsEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_FogCoordPointerEXT)(GLenum, GLsizei, const GLvoid *); +#define CALL_FogCoordPointerEXT(disp, parameters) \ + (* GET_FogCoordPointerEXT(disp)) parameters +static INLINE _glptr_FogCoordPointerEXT GET_FogCoordPointerEXT(struct _glapi_table *disp) { + return (_glptr_FogCoordPointerEXT) (GET_by_offset(disp, _gloffset_FogCoordPointerEXT)); +} + +static INLINE void SET_FogCoordPointerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_FogCoordPointerEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_FogCoorddEXT)(GLdouble); +#define CALL_FogCoorddEXT(disp, parameters) \ + (* GET_FogCoorddEXT(disp)) parameters +static INLINE _glptr_FogCoorddEXT GET_FogCoorddEXT(struct _glapi_table *disp) { + return (_glptr_FogCoorddEXT) (GET_by_offset(disp, _gloffset_FogCoorddEXT)); +} + +static INLINE void SET_FogCoorddEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble)) { + SET_by_offset(disp, _gloffset_FogCoorddEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_FogCoorddvEXT)(const GLdouble *); +#define CALL_FogCoorddvEXT(disp, parameters) \ + (* GET_FogCoorddvEXT(disp)) parameters +static INLINE _glptr_FogCoorddvEXT GET_FogCoorddvEXT(struct _glapi_table *disp) { + return (_glptr_FogCoorddvEXT) (GET_by_offset(disp, _gloffset_FogCoorddvEXT)); +} + +static INLINE void SET_FogCoorddvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_FogCoorddvEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_FogCoordfEXT)(GLfloat); +#define CALL_FogCoordfEXT(disp, parameters) \ + (* GET_FogCoordfEXT(disp)) parameters +static INLINE _glptr_FogCoordfEXT GET_FogCoordfEXT(struct _glapi_table *disp) { + return (_glptr_FogCoordfEXT) (GET_by_offset(disp, _gloffset_FogCoordfEXT)); +} + +static INLINE void SET_FogCoordfEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat)) { + SET_by_offset(disp, _gloffset_FogCoordfEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_FogCoordfvEXT)(const GLfloat *); +#define CALL_FogCoordfvEXT(disp, parameters) \ + (* GET_FogCoordfvEXT(disp)) parameters +static INLINE _glptr_FogCoordfvEXT GET_FogCoordfvEXT(struct _glapi_table *disp) { + return (_glptr_FogCoordfvEXT) (GET_by_offset(disp, _gloffset_FogCoordfvEXT)); +} + +static INLINE void SET_FogCoordfvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_FogCoordfvEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_PixelTexGenSGIX)(GLenum); +#define CALL_PixelTexGenSGIX(disp, parameters) \ + (* GET_PixelTexGenSGIX(disp)) parameters +static INLINE _glptr_PixelTexGenSGIX GET_PixelTexGenSGIX(struct _glapi_table *disp) { + return (_glptr_PixelTexGenSGIX) (GET_by_offset(disp, _gloffset_PixelTexGenSGIX)); +} + +static INLINE void SET_PixelTexGenSGIX(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_PixelTexGenSGIX, fn); +} + +typedef void (GLAPIENTRYP _glptr_BlendFuncSeparateEXT)(GLenum, GLenum, GLenum, GLenum); +#define CALL_BlendFuncSeparateEXT(disp, parameters) \ + (* GET_BlendFuncSeparateEXT(disp)) parameters +static INLINE _glptr_BlendFuncSeparateEXT GET_BlendFuncSeparateEXT(struct _glapi_table *disp) { + return (_glptr_BlendFuncSeparateEXT) (GET_by_offset(disp, _gloffset_BlendFuncSeparateEXT)); +} + +static INLINE void SET_BlendFuncSeparateEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_BlendFuncSeparateEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_FlushVertexArrayRangeNV)(void); +#define CALL_FlushVertexArrayRangeNV(disp, parameters) \ + (* GET_FlushVertexArrayRangeNV(disp)) parameters +static INLINE _glptr_FlushVertexArrayRangeNV GET_FlushVertexArrayRangeNV(struct _glapi_table *disp) { + return (_glptr_FlushVertexArrayRangeNV) (GET_by_offset(disp, _gloffset_FlushVertexArrayRangeNV)); +} + +static INLINE void SET_FlushVertexArrayRangeNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_FlushVertexArrayRangeNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexArrayRangeNV)(GLsizei, const GLvoid *); +#define CALL_VertexArrayRangeNV(disp, parameters) \ + (* GET_VertexArrayRangeNV(disp)) parameters +static INLINE _glptr_VertexArrayRangeNV GET_VertexArrayRangeNV(struct _glapi_table *disp) { + return (_glptr_VertexArrayRangeNV) (GET_by_offset(disp, _gloffset_VertexArrayRangeNV)); +} + +static INLINE void SET_VertexArrayRangeNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_VertexArrayRangeNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_CombinerInputNV)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum); +#define CALL_CombinerInputNV(disp, parameters) \ + (* GET_CombinerInputNV(disp)) parameters +static INLINE _glptr_CombinerInputNV GET_CombinerInputNV(struct _glapi_table *disp) { + return (_glptr_CombinerInputNV) (GET_by_offset(disp, _gloffset_CombinerInputNV)); +} + +static INLINE void SET_CombinerInputNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_CombinerInputNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_CombinerOutputNV)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean); +#define CALL_CombinerOutputNV(disp, parameters) \ + (* GET_CombinerOutputNV(disp)) parameters +static INLINE _glptr_CombinerOutputNV GET_CombinerOutputNV(struct _glapi_table *disp) { + return (_glptr_CombinerOutputNV) (GET_by_offset(disp, _gloffset_CombinerOutputNV)); +} + +static INLINE void SET_CombinerOutputNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLenum, GLboolean, GLboolean, GLboolean)) { + SET_by_offset(disp, _gloffset_CombinerOutputNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_CombinerParameterfNV)(GLenum, GLfloat); +#define CALL_CombinerParameterfNV(disp, parameters) \ + (* GET_CombinerParameterfNV(disp)) parameters +static INLINE _glptr_CombinerParameterfNV GET_CombinerParameterfNV(struct _glapi_table *disp) { + return (_glptr_CombinerParameterfNV) (GET_by_offset(disp, _gloffset_CombinerParameterfNV)); +} + +static INLINE void SET_CombinerParameterfNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat)) { + SET_by_offset(disp, _gloffset_CombinerParameterfNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_CombinerParameterfvNV)(GLenum, const GLfloat *); +#define CALL_CombinerParameterfvNV(disp, parameters) \ + (* GET_CombinerParameterfvNV(disp)) parameters +static INLINE _glptr_CombinerParameterfvNV GET_CombinerParameterfvNV(struct _glapi_table *disp) { + return (_glptr_CombinerParameterfvNV) (GET_by_offset(disp, _gloffset_CombinerParameterfvNV)); +} + +static INLINE void SET_CombinerParameterfvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_CombinerParameterfvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_CombinerParameteriNV)(GLenum, GLint); +#define CALL_CombinerParameteriNV(disp, parameters) \ + (* GET_CombinerParameteriNV(disp)) parameters +static INLINE _glptr_CombinerParameteriNV GET_CombinerParameteriNV(struct _glapi_table *disp) { + return (_glptr_CombinerParameteriNV) (GET_by_offset(disp, _gloffset_CombinerParameteriNV)); +} + +static INLINE void SET_CombinerParameteriNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint)) { + SET_by_offset(disp, _gloffset_CombinerParameteriNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_CombinerParameterivNV)(GLenum, const GLint *); +#define CALL_CombinerParameterivNV(disp, parameters) \ + (* GET_CombinerParameterivNV(disp)) parameters +static INLINE _glptr_CombinerParameterivNV GET_CombinerParameterivNV(struct _glapi_table *disp) { + return (_glptr_CombinerParameterivNV) (GET_by_offset(disp, _gloffset_CombinerParameterivNV)); +} + +static INLINE void SET_CombinerParameterivNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_CombinerParameterivNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_FinalCombinerInputNV)(GLenum, GLenum, GLenum, GLenum); +#define CALL_FinalCombinerInputNV(disp, parameters) \ + (* GET_FinalCombinerInputNV(disp)) parameters +static INLINE _glptr_FinalCombinerInputNV GET_FinalCombinerInputNV(struct _glapi_table *disp) { + return (_glptr_FinalCombinerInputNV) (GET_by_offset(disp, _gloffset_FinalCombinerInputNV)); +} + +static INLINE void SET_FinalCombinerInputNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_FinalCombinerInputNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetCombinerInputParameterfvNV)(GLenum, GLenum, GLenum, GLenum, GLfloat *); +#define CALL_GetCombinerInputParameterfvNV(disp, parameters) \ + (* GET_GetCombinerInputParameterfvNV(disp)) parameters +static INLINE _glptr_GetCombinerInputParameterfvNV GET_GetCombinerInputParameterfvNV(struct _glapi_table *disp) { + return (_glptr_GetCombinerInputParameterfvNV) (GET_by_offset(disp, _gloffset_GetCombinerInputParameterfvNV)); +} + +static INLINE void SET_GetCombinerInputParameterfvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetCombinerInputParameterfvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetCombinerInputParameterivNV)(GLenum, GLenum, GLenum, GLenum, GLint *); +#define CALL_GetCombinerInputParameterivNV(disp, parameters) \ + (* GET_GetCombinerInputParameterivNV(disp)) parameters +static INLINE _glptr_GetCombinerInputParameterivNV GET_GetCombinerInputParameterivNV(struct _glapi_table *disp) { + return (_glptr_GetCombinerInputParameterivNV) (GET_by_offset(disp, _gloffset_GetCombinerInputParameterivNV)); +} + +static INLINE void SET_GetCombinerInputParameterivNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetCombinerInputParameterivNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetCombinerOutputParameterfvNV)(GLenum, GLenum, GLenum, GLfloat *); +#define CALL_GetCombinerOutputParameterfvNV(disp, parameters) \ + (* GET_GetCombinerOutputParameterfvNV(disp)) parameters +static INLINE _glptr_GetCombinerOutputParameterfvNV GET_GetCombinerOutputParameterfvNV(struct _glapi_table *disp) { + return (_glptr_GetCombinerOutputParameterfvNV) (GET_by_offset(disp, _gloffset_GetCombinerOutputParameterfvNV)); +} + +static INLINE void SET_GetCombinerOutputParameterfvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetCombinerOutputParameterfvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetCombinerOutputParameterivNV)(GLenum, GLenum, GLenum, GLint *); +#define CALL_GetCombinerOutputParameterivNV(disp, parameters) \ + (* GET_GetCombinerOutputParameterivNV(disp)) parameters +static INLINE _glptr_GetCombinerOutputParameterivNV GET_GetCombinerOutputParameterivNV(struct _glapi_table *disp) { + return (_glptr_GetCombinerOutputParameterivNV) (GET_by_offset(disp, _gloffset_GetCombinerOutputParameterivNV)); +} + +static INLINE void SET_GetCombinerOutputParameterivNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetCombinerOutputParameterivNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetFinalCombinerInputParameterfvNV)(GLenum, GLenum, GLfloat *); +#define CALL_GetFinalCombinerInputParameterfvNV(disp, parameters) \ + (* GET_GetFinalCombinerInputParameterfvNV(disp)) parameters +static INLINE _glptr_GetFinalCombinerInputParameterfvNV GET_GetFinalCombinerInputParameterfvNV(struct _glapi_table *disp) { + return (_glptr_GetFinalCombinerInputParameterfvNV) (GET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterfvNV)); +} + +static INLINE void SET_GetFinalCombinerInputParameterfvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterfvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetFinalCombinerInputParameterivNV)(GLenum, GLenum, GLint *); +#define CALL_GetFinalCombinerInputParameterivNV(disp, parameters) \ + (* GET_GetFinalCombinerInputParameterivNV(disp)) parameters +static INLINE _glptr_GetFinalCombinerInputParameterivNV GET_GetFinalCombinerInputParameterivNV(struct _glapi_table *disp) { + return (_glptr_GetFinalCombinerInputParameterivNV) (GET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterivNV)); +} + +static INLINE void SET_GetFinalCombinerInputParameterivNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetFinalCombinerInputParameterivNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_ResizeBuffersMESA)(void); +#define CALL_ResizeBuffersMESA(disp, parameters) \ + (* GET_ResizeBuffersMESA(disp)) parameters +static INLINE _glptr_ResizeBuffersMESA GET_ResizeBuffersMESA(struct _glapi_table *disp) { + return (_glptr_ResizeBuffersMESA) (GET_by_offset(disp, _gloffset_ResizeBuffersMESA)); +} + +static INLINE void SET_ResizeBuffersMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_ResizeBuffersMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos2dMESA)(GLdouble, GLdouble); +#define CALL_WindowPos2dMESA(disp, parameters) \ + (* GET_WindowPos2dMESA(disp)) parameters +static INLINE _glptr_WindowPos2dMESA GET_WindowPos2dMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos2dMESA) (GET_by_offset(disp, _gloffset_WindowPos2dMESA)); +} + +static INLINE void SET_WindowPos2dMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_WindowPos2dMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos2dvMESA)(const GLdouble *); +#define CALL_WindowPos2dvMESA(disp, parameters) \ + (* GET_WindowPos2dvMESA(disp)) parameters +static INLINE _glptr_WindowPos2dvMESA GET_WindowPos2dvMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos2dvMESA) (GET_by_offset(disp, _gloffset_WindowPos2dvMESA)); +} + +static INLINE void SET_WindowPos2dvMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_WindowPos2dvMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos2fMESA)(GLfloat, GLfloat); +#define CALL_WindowPos2fMESA(disp, parameters) \ + (* GET_WindowPos2fMESA(disp)) parameters +static INLINE _glptr_WindowPos2fMESA GET_WindowPos2fMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos2fMESA) (GET_by_offset(disp, _gloffset_WindowPos2fMESA)); +} + +static INLINE void SET_WindowPos2fMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_WindowPos2fMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos2fvMESA)(const GLfloat *); +#define CALL_WindowPos2fvMESA(disp, parameters) \ + (* GET_WindowPos2fvMESA(disp)) parameters +static INLINE _glptr_WindowPos2fvMESA GET_WindowPos2fvMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos2fvMESA) (GET_by_offset(disp, _gloffset_WindowPos2fvMESA)); +} + +static INLINE void SET_WindowPos2fvMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_WindowPos2fvMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos2iMESA)(GLint, GLint); +#define CALL_WindowPos2iMESA(disp, parameters) \ + (* GET_WindowPos2iMESA(disp)) parameters +static INLINE _glptr_WindowPos2iMESA GET_WindowPos2iMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos2iMESA) (GET_by_offset(disp, _gloffset_WindowPos2iMESA)); +} + +static INLINE void SET_WindowPos2iMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint)) { + SET_by_offset(disp, _gloffset_WindowPos2iMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos2ivMESA)(const GLint *); +#define CALL_WindowPos2ivMESA(disp, parameters) \ + (* GET_WindowPos2ivMESA(disp)) parameters +static INLINE _glptr_WindowPos2ivMESA GET_WindowPos2ivMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos2ivMESA) (GET_by_offset(disp, _gloffset_WindowPos2ivMESA)); +} + +static INLINE void SET_WindowPos2ivMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_WindowPos2ivMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos2sMESA)(GLshort, GLshort); +#define CALL_WindowPos2sMESA(disp, parameters) \ + (* GET_WindowPos2sMESA(disp)) parameters +static INLINE _glptr_WindowPos2sMESA GET_WindowPos2sMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos2sMESA) (GET_by_offset(disp, _gloffset_WindowPos2sMESA)); +} + +static INLINE void SET_WindowPos2sMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_WindowPos2sMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos2svMESA)(const GLshort *); +#define CALL_WindowPos2svMESA(disp, parameters) \ + (* GET_WindowPos2svMESA(disp)) parameters +static INLINE _glptr_WindowPos2svMESA GET_WindowPos2svMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos2svMESA) (GET_by_offset(disp, _gloffset_WindowPos2svMESA)); +} + +static INLINE void SET_WindowPos2svMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_WindowPos2svMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos3dMESA)(GLdouble, GLdouble, GLdouble); +#define CALL_WindowPos3dMESA(disp, parameters) \ + (* GET_WindowPos3dMESA(disp)) parameters +static INLINE _glptr_WindowPos3dMESA GET_WindowPos3dMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos3dMESA) (GET_by_offset(disp, _gloffset_WindowPos3dMESA)); +} + +static INLINE void SET_WindowPos3dMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_WindowPos3dMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos3dvMESA)(const GLdouble *); +#define CALL_WindowPos3dvMESA(disp, parameters) \ + (* GET_WindowPos3dvMESA(disp)) parameters +static INLINE _glptr_WindowPos3dvMESA GET_WindowPos3dvMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos3dvMESA) (GET_by_offset(disp, _gloffset_WindowPos3dvMESA)); +} + +static INLINE void SET_WindowPos3dvMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_WindowPos3dvMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos3fMESA)(GLfloat, GLfloat, GLfloat); +#define CALL_WindowPos3fMESA(disp, parameters) \ + (* GET_WindowPos3fMESA(disp)) parameters +static INLINE _glptr_WindowPos3fMESA GET_WindowPos3fMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos3fMESA) (GET_by_offset(disp, _gloffset_WindowPos3fMESA)); +} + +static INLINE void SET_WindowPos3fMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_WindowPos3fMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos3fvMESA)(const GLfloat *); +#define CALL_WindowPos3fvMESA(disp, parameters) \ + (* GET_WindowPos3fvMESA(disp)) parameters +static INLINE _glptr_WindowPos3fvMESA GET_WindowPos3fvMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos3fvMESA) (GET_by_offset(disp, _gloffset_WindowPos3fvMESA)); +} + +static INLINE void SET_WindowPos3fvMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_WindowPos3fvMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos3iMESA)(GLint, GLint, GLint); +#define CALL_WindowPos3iMESA(disp, parameters) \ + (* GET_WindowPos3iMESA(disp)) parameters +static INLINE _glptr_WindowPos3iMESA GET_WindowPos3iMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos3iMESA) (GET_by_offset(disp, _gloffset_WindowPos3iMESA)); +} + +static INLINE void SET_WindowPos3iMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_WindowPos3iMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos3ivMESA)(const GLint *); +#define CALL_WindowPos3ivMESA(disp, parameters) \ + (* GET_WindowPos3ivMESA(disp)) parameters +static INLINE _glptr_WindowPos3ivMESA GET_WindowPos3ivMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos3ivMESA) (GET_by_offset(disp, _gloffset_WindowPos3ivMESA)); +} + +static INLINE void SET_WindowPos3ivMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_WindowPos3ivMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos3sMESA)(GLshort, GLshort, GLshort); +#define CALL_WindowPos3sMESA(disp, parameters) \ + (* GET_WindowPos3sMESA(disp)) parameters +static INLINE _glptr_WindowPos3sMESA GET_WindowPos3sMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos3sMESA) (GET_by_offset(disp, _gloffset_WindowPos3sMESA)); +} + +static INLINE void SET_WindowPos3sMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_WindowPos3sMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos3svMESA)(const GLshort *); +#define CALL_WindowPos3svMESA(disp, parameters) \ + (* GET_WindowPos3svMESA(disp)) parameters +static INLINE _glptr_WindowPos3svMESA GET_WindowPos3svMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos3svMESA) (GET_by_offset(disp, _gloffset_WindowPos3svMESA)); +} + +static INLINE void SET_WindowPos3svMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_WindowPos3svMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos4dMESA)(GLdouble, GLdouble, GLdouble, GLdouble); +#define CALL_WindowPos4dMESA(disp, parameters) \ + (* GET_WindowPos4dMESA(disp)) parameters +static INLINE _glptr_WindowPos4dMESA GET_WindowPos4dMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos4dMESA) (GET_by_offset(disp, _gloffset_WindowPos4dMESA)); +} + +static INLINE void SET_WindowPos4dMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_WindowPos4dMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos4dvMESA)(const GLdouble *); +#define CALL_WindowPos4dvMESA(disp, parameters) \ + (* GET_WindowPos4dvMESA(disp)) parameters +static INLINE _glptr_WindowPos4dvMESA GET_WindowPos4dvMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos4dvMESA) (GET_by_offset(disp, _gloffset_WindowPos4dvMESA)); +} + +static INLINE void SET_WindowPos4dvMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLdouble *)) { + SET_by_offset(disp, _gloffset_WindowPos4dvMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos4fMESA)(GLfloat, GLfloat, GLfloat, GLfloat); +#define CALL_WindowPos4fMESA(disp, parameters) \ + (* GET_WindowPos4fMESA(disp)) parameters +static INLINE _glptr_WindowPos4fMESA GET_WindowPos4fMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos4fMESA) (GET_by_offset(disp, _gloffset_WindowPos4fMESA)); +} + +static INLINE void SET_WindowPos4fMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_WindowPos4fMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos4fvMESA)(const GLfloat *); +#define CALL_WindowPos4fvMESA(disp, parameters) \ + (* GET_WindowPos4fvMESA(disp)) parameters +static INLINE _glptr_WindowPos4fvMESA GET_WindowPos4fvMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos4fvMESA) (GET_by_offset(disp, _gloffset_WindowPos4fvMESA)); +} + +static INLINE void SET_WindowPos4fvMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLfloat *)) { + SET_by_offset(disp, _gloffset_WindowPos4fvMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos4iMESA)(GLint, GLint, GLint, GLint); +#define CALL_WindowPos4iMESA(disp, parameters) \ + (* GET_WindowPos4iMESA(disp)) parameters +static INLINE _glptr_WindowPos4iMESA GET_WindowPos4iMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos4iMESA) (GET_by_offset(disp, _gloffset_WindowPos4iMESA)); +} + +static INLINE void SET_WindowPos4iMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_WindowPos4iMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos4ivMESA)(const GLint *); +#define CALL_WindowPos4ivMESA(disp, parameters) \ + (* GET_WindowPos4ivMESA(disp)) parameters +static INLINE _glptr_WindowPos4ivMESA GET_WindowPos4ivMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos4ivMESA) (GET_by_offset(disp, _gloffset_WindowPos4ivMESA)); +} + +static INLINE void SET_WindowPos4ivMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLint *)) { + SET_by_offset(disp, _gloffset_WindowPos4ivMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos4sMESA)(GLshort, GLshort, GLshort, GLshort); +#define CALL_WindowPos4sMESA(disp, parameters) \ + (* GET_WindowPos4sMESA(disp)) parameters +static INLINE _glptr_WindowPos4sMESA GET_WindowPos4sMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos4sMESA) (GET_by_offset(disp, _gloffset_WindowPos4sMESA)); +} + +static INLINE void SET_WindowPos4sMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLshort, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_WindowPos4sMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_WindowPos4svMESA)(const GLshort *); +#define CALL_WindowPos4svMESA(disp, parameters) \ + (* GET_WindowPos4svMESA(disp)) parameters +static INLINE _glptr_WindowPos4svMESA GET_WindowPos4svMESA(struct _glapi_table *disp) { + return (_glptr_WindowPos4svMESA) (GET_by_offset(disp, _gloffset_WindowPos4svMESA)); +} + +static INLINE void SET_WindowPos4svMESA(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLshort *)) { + SET_by_offset(disp, _gloffset_WindowPos4svMESA, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiModeDrawArraysIBM)(const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint); +#define CALL_MultiModeDrawArraysIBM(disp, parameters) \ + (* GET_MultiModeDrawArraysIBM(disp)) parameters +static INLINE _glptr_MultiModeDrawArraysIBM GET_MultiModeDrawArraysIBM(struct _glapi_table *disp) { + return (_glptr_MultiModeDrawArraysIBM) (GET_by_offset(disp, _gloffset_MultiModeDrawArraysIBM)); +} + +static INLINE void SET_MultiModeDrawArraysIBM(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLenum *, const GLint *, const GLsizei *, GLsizei, GLint)) { + SET_by_offset(disp, _gloffset_MultiModeDrawArraysIBM, fn); +} + +typedef void (GLAPIENTRYP _glptr_MultiModeDrawElementsIBM)(const GLenum *, const GLsizei *, GLenum, const GLvoid * const *, GLsizei, GLint); +#define CALL_MultiModeDrawElementsIBM(disp, parameters) \ + (* GET_MultiModeDrawElementsIBM(disp)) parameters +static INLINE _glptr_MultiModeDrawElementsIBM GET_MultiModeDrawElementsIBM(struct _glapi_table *disp) { + return (_glptr_MultiModeDrawElementsIBM) (GET_by_offset(disp, _gloffset_MultiModeDrawElementsIBM)); +} + +static INLINE void SET_MultiModeDrawElementsIBM(struct _glapi_table *disp, void (GLAPIENTRYP fn)(const GLenum *, const GLsizei *, GLenum, const GLvoid * const *, GLsizei, GLint)) { + SET_by_offset(disp, _gloffset_MultiModeDrawElementsIBM, fn); +} + +typedef void (GLAPIENTRYP _glptr_DeleteFencesNV)(GLsizei, const GLuint *); +#define CALL_DeleteFencesNV(disp, parameters) \ + (* GET_DeleteFencesNV(disp)) parameters +static INLINE _glptr_DeleteFencesNV GET_DeleteFencesNV(struct _glapi_table *disp) { + return (_glptr_DeleteFencesNV) (GET_by_offset(disp, _gloffset_DeleteFencesNV)); +} + +static INLINE void SET_DeleteFencesNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_DeleteFencesNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_FinishFenceNV)(GLuint); +#define CALL_FinishFenceNV(disp, parameters) \ + (* GET_FinishFenceNV(disp)) parameters +static INLINE _glptr_FinishFenceNV GET_FinishFenceNV(struct _glapi_table *disp) { + return (_glptr_FinishFenceNV) (GET_by_offset(disp, _gloffset_FinishFenceNV)); +} + +static INLINE void SET_FinishFenceNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_FinishFenceNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_GenFencesNV)(GLsizei, GLuint *); +#define CALL_GenFencesNV(disp, parameters) \ + (* GET_GenFencesNV(disp)) parameters +static INLINE _glptr_GenFencesNV GET_GenFencesNV(struct _glapi_table *disp) { + return (_glptr_GenFencesNV) (GET_by_offset(disp, _gloffset_GenFencesNV)); +} + +static INLINE void SET_GenFencesNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GenFencesNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetFenceivNV)(GLuint, GLenum, GLint *); +#define CALL_GetFenceivNV(disp, parameters) \ + (* GET_GetFenceivNV(disp)) parameters +static INLINE _glptr_GetFenceivNV GET_GetFenceivNV(struct _glapi_table *disp) { + return (_glptr_GetFenceivNV) (GET_by_offset(disp, _gloffset_GetFenceivNV)); +} + +static INLINE void SET_GetFenceivNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetFenceivNV, fn); +} + +typedef GLboolean (GLAPIENTRYP _glptr_IsFenceNV)(GLuint); +#define CALL_IsFenceNV(disp, parameters) \ + (* GET_IsFenceNV(disp)) parameters +static INLINE _glptr_IsFenceNV GET_IsFenceNV(struct _glapi_table *disp) { + return (_glptr_IsFenceNV) (GET_by_offset(disp, _gloffset_IsFenceNV)); +} + +static INLINE void SET_IsFenceNV(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsFenceNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_SetFenceNV)(GLuint, GLenum); +#define CALL_SetFenceNV(disp, parameters) \ + (* GET_SetFenceNV(disp)) parameters +static INLINE _glptr_SetFenceNV GET_SetFenceNV(struct _glapi_table *disp) { + return (_glptr_SetFenceNV) (GET_by_offset(disp, _gloffset_SetFenceNV)); +} + +static INLINE void SET_SetFenceNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum)) { + SET_by_offset(disp, _gloffset_SetFenceNV, fn); +} + +typedef GLboolean (GLAPIENTRYP _glptr_TestFenceNV)(GLuint); +#define CALL_TestFenceNV(disp, parameters) \ + (* GET_TestFenceNV(disp)) parameters +static INLINE _glptr_TestFenceNV GET_TestFenceNV(struct _glapi_table *disp) { + return (_glptr_TestFenceNV) (GET_by_offset(disp, _gloffset_TestFenceNV)); +} + +static INLINE void SET_TestFenceNV(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_TestFenceNV, fn); +} + +typedef GLboolean (GLAPIENTRYP _glptr_AreProgramsResidentNV)(GLsizei, const GLuint *, GLboolean *); +#define CALL_AreProgramsResidentNV(disp, parameters) \ + (* GET_AreProgramsResidentNV(disp)) parameters +static INLINE _glptr_AreProgramsResidentNV GET_AreProgramsResidentNV(struct _glapi_table *disp) { + return (_glptr_AreProgramsResidentNV) (GET_by_offset(disp, _gloffset_AreProgramsResidentNV)); +} + +static INLINE void SET_AreProgramsResidentNV(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLsizei, const GLuint *, GLboolean *)) { + SET_by_offset(disp, _gloffset_AreProgramsResidentNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_BindProgramNV)(GLenum, GLuint); +#define CALL_BindProgramNV(disp, parameters) \ + (* GET_BindProgramNV(disp)) parameters +static INLINE _glptr_BindProgramNV GET_BindProgramNV(struct _glapi_table *disp) { + return (_glptr_BindProgramNV) (GET_by_offset(disp, _gloffset_BindProgramNV)); +} + +static INLINE void SET_BindProgramNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_BindProgramNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_DeleteProgramsNV)(GLsizei, const GLuint *); +#define CALL_DeleteProgramsNV(disp, parameters) \ + (* GET_DeleteProgramsNV(disp)) parameters +static INLINE _glptr_DeleteProgramsNV GET_DeleteProgramsNV(struct _glapi_table *disp) { + return (_glptr_DeleteProgramsNV) (GET_by_offset(disp, _gloffset_DeleteProgramsNV)); +} + +static INLINE void SET_DeleteProgramsNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_DeleteProgramsNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_ExecuteProgramNV)(GLenum, GLuint, const GLfloat *); +#define CALL_ExecuteProgramNV(disp, parameters) \ + (* GET_ExecuteProgramNV(disp)) parameters +static INLINE _glptr_ExecuteProgramNV GET_ExecuteProgramNV(struct _glapi_table *disp) { + return (_glptr_ExecuteProgramNV) (GET_by_offset(disp, _gloffset_ExecuteProgramNV)); +} + +static INLINE void SET_ExecuteProgramNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_ExecuteProgramNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_GenProgramsNV)(GLsizei, GLuint *); +#define CALL_GenProgramsNV(disp, parameters) \ + (* GET_GenProgramsNV(disp)) parameters +static INLINE _glptr_GenProgramsNV GET_GenProgramsNV(struct _glapi_table *disp) { + return (_glptr_GenProgramsNV) (GET_by_offset(disp, _gloffset_GenProgramsNV)); +} + +static INLINE void SET_GenProgramsNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GenProgramsNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetProgramParameterdvNV)(GLenum, GLuint, GLenum, GLdouble *); +#define CALL_GetProgramParameterdvNV(disp, parameters) \ + (* GET_GetProgramParameterdvNV(disp)) parameters +static INLINE _glptr_GetProgramParameterdvNV GET_GetProgramParameterdvNV(struct _glapi_table *disp) { + return (_glptr_GetProgramParameterdvNV) (GET_by_offset(disp, _gloffset_GetProgramParameterdvNV)); +} + +static INLINE void SET_GetProgramParameterdvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLenum, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetProgramParameterdvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetProgramParameterfvNV)(GLenum, GLuint, GLenum, GLfloat *); +#define CALL_GetProgramParameterfvNV(disp, parameters) \ + (* GET_GetProgramParameterfvNV(disp)) parameters +static INLINE _glptr_GetProgramParameterfvNV GET_GetProgramParameterfvNV(struct _glapi_table *disp) { + return (_glptr_GetProgramParameterfvNV) (GET_by_offset(disp, _gloffset_GetProgramParameterfvNV)); +} + +static INLINE void SET_GetProgramParameterfvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetProgramParameterfvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetProgramStringNV)(GLuint, GLenum, GLubyte *); +#define CALL_GetProgramStringNV(disp, parameters) \ + (* GET_GetProgramStringNV(disp)) parameters +static INLINE _glptr_GetProgramStringNV GET_GetProgramStringNV(struct _glapi_table *disp) { + return (_glptr_GetProgramStringNV) (GET_by_offset(disp, _gloffset_GetProgramStringNV)); +} + +static INLINE void SET_GetProgramStringNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLubyte *)) { + SET_by_offset(disp, _gloffset_GetProgramStringNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetProgramivNV)(GLuint, GLenum, GLint *); +#define CALL_GetProgramivNV(disp, parameters) \ + (* GET_GetProgramivNV(disp)) parameters +static INLINE _glptr_GetProgramivNV GET_GetProgramivNV(struct _glapi_table *disp) { + return (_glptr_GetProgramivNV) (GET_by_offset(disp, _gloffset_GetProgramivNV)); +} + +static INLINE void SET_GetProgramivNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetProgramivNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetTrackMatrixivNV)(GLenum, GLuint, GLenum, GLint *); +#define CALL_GetTrackMatrixivNV(disp, parameters) \ + (* GET_GetTrackMatrixivNV(disp)) parameters +static INLINE _glptr_GetTrackMatrixivNV GET_GetTrackMatrixivNV(struct _glapi_table *disp) { + return (_glptr_GetTrackMatrixivNV) (GET_by_offset(disp, _gloffset_GetTrackMatrixivNV)); +} + +static INLINE void SET_GetTrackMatrixivNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetTrackMatrixivNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetVertexAttribPointervNV)(GLuint, GLenum, GLvoid **); +#define CALL_GetVertexAttribPointervNV(disp, parameters) \ + (* GET_GetVertexAttribPointervNV(disp)) parameters +static INLINE _glptr_GetVertexAttribPointervNV GET_GetVertexAttribPointervNV(struct _glapi_table *disp) { + return (_glptr_GetVertexAttribPointervNV) (GET_by_offset(disp, _gloffset_GetVertexAttribPointervNV)); +} + +static INLINE void SET_GetVertexAttribPointervNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLvoid **)) { + SET_by_offset(disp, _gloffset_GetVertexAttribPointervNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetVertexAttribdvNV)(GLuint, GLenum, GLdouble *); +#define CALL_GetVertexAttribdvNV(disp, parameters) \ + (* GET_GetVertexAttribdvNV(disp)) parameters +static INLINE _glptr_GetVertexAttribdvNV GET_GetVertexAttribdvNV(struct _glapi_table *disp) { + return (_glptr_GetVertexAttribdvNV) (GET_by_offset(disp, _gloffset_GetVertexAttribdvNV)); +} + +static INLINE void SET_GetVertexAttribdvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetVertexAttribdvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetVertexAttribfvNV)(GLuint, GLenum, GLfloat *); +#define CALL_GetVertexAttribfvNV(disp, parameters) \ + (* GET_GetVertexAttribfvNV(disp)) parameters +static INLINE _glptr_GetVertexAttribfvNV GET_GetVertexAttribfvNV(struct _glapi_table *disp) { + return (_glptr_GetVertexAttribfvNV) (GET_by_offset(disp, _gloffset_GetVertexAttribfvNV)); +} + +static INLINE void SET_GetVertexAttribfvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetVertexAttribfvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetVertexAttribivNV)(GLuint, GLenum, GLint *); +#define CALL_GetVertexAttribivNV(disp, parameters) \ + (* GET_GetVertexAttribivNV(disp)) parameters +static INLINE _glptr_GetVertexAttribivNV GET_GetVertexAttribivNV(struct _glapi_table *disp) { + return (_glptr_GetVertexAttribivNV) (GET_by_offset(disp, _gloffset_GetVertexAttribivNV)); +} + +static INLINE void SET_GetVertexAttribivNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetVertexAttribivNV, fn); +} + +typedef GLboolean (GLAPIENTRYP _glptr_IsProgramNV)(GLuint); +#define CALL_IsProgramNV(disp, parameters) \ + (* GET_IsProgramNV(disp)) parameters +static INLINE _glptr_IsProgramNV GET_IsProgramNV(struct _glapi_table *disp) { + return (_glptr_IsProgramNV) (GET_by_offset(disp, _gloffset_IsProgramNV)); +} + +static INLINE void SET_IsProgramNV(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsProgramNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_LoadProgramNV)(GLenum, GLuint, GLsizei, const GLubyte *); +#define CALL_LoadProgramNV(disp, parameters) \ + (* GET_LoadProgramNV(disp)) parameters +static INLINE _glptr_LoadProgramNV GET_LoadProgramNV(struct _glapi_table *disp) { + return (_glptr_LoadProgramNV) (GET_by_offset(disp, _gloffset_LoadProgramNV)); +} + +static INLINE void SET_LoadProgramNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLsizei, const GLubyte *)) { + SET_by_offset(disp, _gloffset_LoadProgramNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_ProgramParameters4dvNV)(GLenum, GLuint, GLsizei, const GLdouble *); +#define CALL_ProgramParameters4dvNV(disp, parameters) \ + (* GET_ProgramParameters4dvNV(disp)) parameters +static INLINE _glptr_ProgramParameters4dvNV GET_ProgramParameters4dvNV(struct _glapi_table *disp) { + return (_glptr_ProgramParameters4dvNV) (GET_by_offset(disp, _gloffset_ProgramParameters4dvNV)); +} + +static INLINE void SET_ProgramParameters4dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLsizei, const GLdouble *)) { + SET_by_offset(disp, _gloffset_ProgramParameters4dvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_ProgramParameters4fvNV)(GLenum, GLuint, GLsizei, const GLfloat *); +#define CALL_ProgramParameters4fvNV(disp, parameters) \ + (* GET_ProgramParameters4fvNV(disp)) parameters +static INLINE _glptr_ProgramParameters4fvNV GET_ProgramParameters4fvNV(struct _glapi_table *disp) { + return (_glptr_ProgramParameters4fvNV) (GET_by_offset(disp, _gloffset_ProgramParameters4fvNV)); +} + +static INLINE void SET_ProgramParameters4fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_ProgramParameters4fvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_RequestResidentProgramsNV)(GLsizei, const GLuint *); +#define CALL_RequestResidentProgramsNV(disp, parameters) \ + (* GET_RequestResidentProgramsNV(disp)) parameters +static INLINE _glptr_RequestResidentProgramsNV GET_RequestResidentProgramsNV(struct _glapi_table *disp) { + return (_glptr_RequestResidentProgramsNV) (GET_by_offset(disp, _gloffset_RequestResidentProgramsNV)); +} + +static INLINE void SET_RequestResidentProgramsNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_RequestResidentProgramsNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_TrackMatrixNV)(GLenum, GLuint, GLenum, GLenum); +#define CALL_TrackMatrixNV(disp, parameters) \ + (* GET_TrackMatrixNV(disp)) parameters +static INLINE _glptr_TrackMatrixNV GET_TrackMatrixNV(struct _glapi_table *disp) { + return (_glptr_TrackMatrixNV) (GET_by_offset(disp, _gloffset_TrackMatrixNV)); +} + +static INLINE void SET_TrackMatrixNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_TrackMatrixNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib1dNV)(GLuint, GLdouble); +#define CALL_VertexAttrib1dNV(disp, parameters) \ + (* GET_VertexAttrib1dNV(disp)) parameters +static INLINE _glptr_VertexAttrib1dNV GET_VertexAttrib1dNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib1dNV) (GET_by_offset(disp, _gloffset_VertexAttrib1dNV)); +} + +static INLINE void SET_VertexAttrib1dNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLdouble)) { + SET_by_offset(disp, _gloffset_VertexAttrib1dNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib1dvNV)(GLuint, const GLdouble *); +#define CALL_VertexAttrib1dvNV(disp, parameters) \ + (* GET_VertexAttrib1dvNV(disp)) parameters +static INLINE _glptr_VertexAttrib1dvNV GET_VertexAttrib1dvNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib1dvNV) (GET_by_offset(disp, _gloffset_VertexAttrib1dvNV)); +} + +static INLINE void SET_VertexAttrib1dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttrib1dvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib1fNV)(GLuint, GLfloat); +#define CALL_VertexAttrib1fNV(disp, parameters) \ + (* GET_VertexAttrib1fNV(disp)) parameters +static INLINE _glptr_VertexAttrib1fNV GET_VertexAttrib1fNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib1fNV) (GET_by_offset(disp, _gloffset_VertexAttrib1fNV)); +} + +static INLINE void SET_VertexAttrib1fNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat)) { + SET_by_offset(disp, _gloffset_VertexAttrib1fNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib1fvNV)(GLuint, const GLfloat *); +#define CALL_VertexAttrib1fvNV(disp, parameters) \ + (* GET_VertexAttrib1fvNV(disp)) parameters +static INLINE _glptr_VertexAttrib1fvNV GET_VertexAttrib1fvNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib1fvNV) (GET_by_offset(disp, _gloffset_VertexAttrib1fvNV)); +} + +static INLINE void SET_VertexAttrib1fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttrib1fvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib1sNV)(GLuint, GLshort); +#define CALL_VertexAttrib1sNV(disp, parameters) \ + (* GET_VertexAttrib1sNV(disp)) parameters +static INLINE _glptr_VertexAttrib1sNV GET_VertexAttrib1sNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib1sNV) (GET_by_offset(disp, _gloffset_VertexAttrib1sNV)); +} + +static INLINE void SET_VertexAttrib1sNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLshort)) { + SET_by_offset(disp, _gloffset_VertexAttrib1sNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib1svNV)(GLuint, const GLshort *); +#define CALL_VertexAttrib1svNV(disp, parameters) \ + (* GET_VertexAttrib1svNV(disp)) parameters +static INLINE _glptr_VertexAttrib1svNV GET_VertexAttrib1svNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib1svNV) (GET_by_offset(disp, _gloffset_VertexAttrib1svNV)); +} + +static INLINE void SET_VertexAttrib1svNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttrib1svNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib2dNV)(GLuint, GLdouble, GLdouble); +#define CALL_VertexAttrib2dNV(disp, parameters) \ + (* GET_VertexAttrib2dNV(disp)) parameters +static INLINE _glptr_VertexAttrib2dNV GET_VertexAttrib2dNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib2dNV) (GET_by_offset(disp, _gloffset_VertexAttrib2dNV)); +} + +static INLINE void SET_VertexAttrib2dNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_VertexAttrib2dNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib2dvNV)(GLuint, const GLdouble *); +#define CALL_VertexAttrib2dvNV(disp, parameters) \ + (* GET_VertexAttrib2dvNV(disp)) parameters +static INLINE _glptr_VertexAttrib2dvNV GET_VertexAttrib2dvNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib2dvNV) (GET_by_offset(disp, _gloffset_VertexAttrib2dvNV)); +} + +static INLINE void SET_VertexAttrib2dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttrib2dvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib2fNV)(GLuint, GLfloat, GLfloat); +#define CALL_VertexAttrib2fNV(disp, parameters) \ + (* GET_VertexAttrib2fNV(disp)) parameters +static INLINE _glptr_VertexAttrib2fNV GET_VertexAttrib2fNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib2fNV) (GET_by_offset(disp, _gloffset_VertexAttrib2fNV)); +} + +static INLINE void SET_VertexAttrib2fNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_VertexAttrib2fNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib2fvNV)(GLuint, const GLfloat *); +#define CALL_VertexAttrib2fvNV(disp, parameters) \ + (* GET_VertexAttrib2fvNV(disp)) parameters +static INLINE _glptr_VertexAttrib2fvNV GET_VertexAttrib2fvNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib2fvNV) (GET_by_offset(disp, _gloffset_VertexAttrib2fvNV)); +} + +static INLINE void SET_VertexAttrib2fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttrib2fvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib2sNV)(GLuint, GLshort, GLshort); +#define CALL_VertexAttrib2sNV(disp, parameters) \ + (* GET_VertexAttrib2sNV(disp)) parameters +static INLINE _glptr_VertexAttrib2sNV GET_VertexAttrib2sNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib2sNV) (GET_by_offset(disp, _gloffset_VertexAttrib2sNV)); +} + +static INLINE void SET_VertexAttrib2sNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_VertexAttrib2sNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib2svNV)(GLuint, const GLshort *); +#define CALL_VertexAttrib2svNV(disp, parameters) \ + (* GET_VertexAttrib2svNV(disp)) parameters +static INLINE _glptr_VertexAttrib2svNV GET_VertexAttrib2svNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib2svNV) (GET_by_offset(disp, _gloffset_VertexAttrib2svNV)); +} + +static INLINE void SET_VertexAttrib2svNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttrib2svNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib3dNV)(GLuint, GLdouble, GLdouble, GLdouble); +#define CALL_VertexAttrib3dNV(disp, parameters) \ + (* GET_VertexAttrib3dNV(disp)) parameters +static INLINE _glptr_VertexAttrib3dNV GET_VertexAttrib3dNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib3dNV) (GET_by_offset(disp, _gloffset_VertexAttrib3dNV)); +} + +static INLINE void SET_VertexAttrib3dNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_VertexAttrib3dNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib3dvNV)(GLuint, const GLdouble *); +#define CALL_VertexAttrib3dvNV(disp, parameters) \ + (* GET_VertexAttrib3dvNV(disp)) parameters +static INLINE _glptr_VertexAttrib3dvNV GET_VertexAttrib3dvNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib3dvNV) (GET_by_offset(disp, _gloffset_VertexAttrib3dvNV)); +} + +static INLINE void SET_VertexAttrib3dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttrib3dvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib3fNV)(GLuint, GLfloat, GLfloat, GLfloat); +#define CALL_VertexAttrib3fNV(disp, parameters) \ + (* GET_VertexAttrib3fNV(disp)) parameters +static INLINE _glptr_VertexAttrib3fNV GET_VertexAttrib3fNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib3fNV) (GET_by_offset(disp, _gloffset_VertexAttrib3fNV)); +} + +static INLINE void SET_VertexAttrib3fNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_VertexAttrib3fNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib3fvNV)(GLuint, const GLfloat *); +#define CALL_VertexAttrib3fvNV(disp, parameters) \ + (* GET_VertexAttrib3fvNV(disp)) parameters +static INLINE _glptr_VertexAttrib3fvNV GET_VertexAttrib3fvNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib3fvNV) (GET_by_offset(disp, _gloffset_VertexAttrib3fvNV)); +} + +static INLINE void SET_VertexAttrib3fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttrib3fvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib3sNV)(GLuint, GLshort, GLshort, GLshort); +#define CALL_VertexAttrib3sNV(disp, parameters) \ + (* GET_VertexAttrib3sNV(disp)) parameters +static INLINE _glptr_VertexAttrib3sNV GET_VertexAttrib3sNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib3sNV) (GET_by_offset(disp, _gloffset_VertexAttrib3sNV)); +} + +static INLINE void SET_VertexAttrib3sNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_VertexAttrib3sNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib3svNV)(GLuint, const GLshort *); +#define CALL_VertexAttrib3svNV(disp, parameters) \ + (* GET_VertexAttrib3svNV(disp)) parameters +static INLINE _glptr_VertexAttrib3svNV GET_VertexAttrib3svNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib3svNV) (GET_by_offset(disp, _gloffset_VertexAttrib3svNV)); +} + +static INLINE void SET_VertexAttrib3svNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttrib3svNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4dNV)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble); +#define CALL_VertexAttrib4dNV(disp, parameters) \ + (* GET_VertexAttrib4dNV(disp)) parameters +static INLINE _glptr_VertexAttrib4dNV GET_VertexAttrib4dNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4dNV) (GET_by_offset(disp, _gloffset_VertexAttrib4dNV)); +} + +static INLINE void SET_VertexAttrib4dNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_VertexAttrib4dNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4dvNV)(GLuint, const GLdouble *); +#define CALL_VertexAttrib4dvNV(disp, parameters) \ + (* GET_VertexAttrib4dvNV(disp)) parameters +static INLINE _glptr_VertexAttrib4dvNV GET_VertexAttrib4dvNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4dvNV) (GET_by_offset(disp, _gloffset_VertexAttrib4dvNV)); +} + +static INLINE void SET_VertexAttrib4dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4dvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4fNV)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat); +#define CALL_VertexAttrib4fNV(disp, parameters) \ + (* GET_VertexAttrib4fNV(disp)) parameters +static INLINE _glptr_VertexAttrib4fNV GET_VertexAttrib4fNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4fNV) (GET_by_offset(disp, _gloffset_VertexAttrib4fNV)); +} + +static INLINE void SET_VertexAttrib4fNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_VertexAttrib4fNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4fvNV)(GLuint, const GLfloat *); +#define CALL_VertexAttrib4fvNV(disp, parameters) \ + (* GET_VertexAttrib4fvNV(disp)) parameters +static INLINE _glptr_VertexAttrib4fvNV GET_VertexAttrib4fvNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4fvNV) (GET_by_offset(disp, _gloffset_VertexAttrib4fvNV)); +} + +static INLINE void SET_VertexAttrib4fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4fvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4sNV)(GLuint, GLshort, GLshort, GLshort, GLshort); +#define CALL_VertexAttrib4sNV(disp, parameters) \ + (* GET_VertexAttrib4sNV(disp)) parameters +static INLINE _glptr_VertexAttrib4sNV GET_VertexAttrib4sNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4sNV) (GET_by_offset(disp, _gloffset_VertexAttrib4sNV)); +} + +static INLINE void SET_VertexAttrib4sNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLshort, GLshort, GLshort, GLshort)) { + SET_by_offset(disp, _gloffset_VertexAttrib4sNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4svNV)(GLuint, const GLshort *); +#define CALL_VertexAttrib4svNV(disp, parameters) \ + (* GET_VertexAttrib4svNV(disp)) parameters +static INLINE _glptr_VertexAttrib4svNV GET_VertexAttrib4svNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4svNV) (GET_by_offset(disp, _gloffset_VertexAttrib4svNV)); +} + +static INLINE void SET_VertexAttrib4svNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4svNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4ubNV)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte); +#define CALL_VertexAttrib4ubNV(disp, parameters) \ + (* GET_VertexAttrib4ubNV(disp)) parameters +static INLINE _glptr_VertexAttrib4ubNV GET_VertexAttrib4ubNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4ubNV) (GET_by_offset(disp, _gloffset_VertexAttrib4ubNV)); +} + +static INLINE void SET_VertexAttrib4ubNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLubyte, GLubyte, GLubyte, GLubyte)) { + SET_by_offset(disp, _gloffset_VertexAttrib4ubNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttrib4ubvNV)(GLuint, const GLubyte *); +#define CALL_VertexAttrib4ubvNV(disp, parameters) \ + (* GET_VertexAttrib4ubvNV(disp)) parameters +static INLINE _glptr_VertexAttrib4ubvNV GET_VertexAttrib4ubvNV(struct _glapi_table *disp) { + return (_glptr_VertexAttrib4ubvNV) (GET_by_offset(disp, _gloffset_VertexAttrib4ubvNV)); +} + +static INLINE void SET_VertexAttrib4ubvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLubyte *)) { + SET_by_offset(disp, _gloffset_VertexAttrib4ubvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribPointerNV)(GLuint, GLint, GLenum, GLsizei, const GLvoid *); +#define CALL_VertexAttribPointerNV(disp, parameters) \ + (* GET_VertexAttribPointerNV(disp)) parameters +static INLINE _glptr_VertexAttribPointerNV GET_VertexAttribPointerNV(struct _glapi_table *disp) { + return (_glptr_VertexAttribPointerNV) (GET_by_offset(disp, _gloffset_VertexAttribPointerNV)); +} + +static INLINE void SET_VertexAttribPointerNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_VertexAttribPointerNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribs1dvNV)(GLuint, GLsizei, const GLdouble *); +#define CALL_VertexAttribs1dvNV(disp, parameters) \ + (* GET_VertexAttribs1dvNV(disp)) parameters +static INLINE _glptr_VertexAttribs1dvNV GET_VertexAttribs1dvNV(struct _glapi_table *disp) { + return (_glptr_VertexAttribs1dvNV) (GET_by_offset(disp, _gloffset_VertexAttribs1dvNV)); +} + +static INLINE void SET_VertexAttribs1dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttribs1dvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribs1fvNV)(GLuint, GLsizei, const GLfloat *); +#define CALL_VertexAttribs1fvNV(disp, parameters) \ + (* GET_VertexAttribs1fvNV(disp)) parameters +static INLINE _glptr_VertexAttribs1fvNV GET_VertexAttribs1fvNV(struct _glapi_table *disp) { + return (_glptr_VertexAttribs1fvNV) (GET_by_offset(disp, _gloffset_VertexAttribs1fvNV)); +} + +static INLINE void SET_VertexAttribs1fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttribs1fvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribs1svNV)(GLuint, GLsizei, const GLshort *); +#define CALL_VertexAttribs1svNV(disp, parameters) \ + (* GET_VertexAttribs1svNV(disp)) parameters +static INLINE _glptr_VertexAttribs1svNV GET_VertexAttribs1svNV(struct _glapi_table *disp) { + return (_glptr_VertexAttribs1svNV) (GET_by_offset(disp, _gloffset_VertexAttribs1svNV)); +} + +static INLINE void SET_VertexAttribs1svNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttribs1svNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribs2dvNV)(GLuint, GLsizei, const GLdouble *); +#define CALL_VertexAttribs2dvNV(disp, parameters) \ + (* GET_VertexAttribs2dvNV(disp)) parameters +static INLINE _glptr_VertexAttribs2dvNV GET_VertexAttribs2dvNV(struct _glapi_table *disp) { + return (_glptr_VertexAttribs2dvNV) (GET_by_offset(disp, _gloffset_VertexAttribs2dvNV)); +} + +static INLINE void SET_VertexAttribs2dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttribs2dvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribs2fvNV)(GLuint, GLsizei, const GLfloat *); +#define CALL_VertexAttribs2fvNV(disp, parameters) \ + (* GET_VertexAttribs2fvNV(disp)) parameters +static INLINE _glptr_VertexAttribs2fvNV GET_VertexAttribs2fvNV(struct _glapi_table *disp) { + return (_glptr_VertexAttribs2fvNV) (GET_by_offset(disp, _gloffset_VertexAttribs2fvNV)); +} + +static INLINE void SET_VertexAttribs2fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttribs2fvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribs2svNV)(GLuint, GLsizei, const GLshort *); +#define CALL_VertexAttribs2svNV(disp, parameters) \ + (* GET_VertexAttribs2svNV(disp)) parameters +static INLINE _glptr_VertexAttribs2svNV GET_VertexAttribs2svNV(struct _glapi_table *disp) { + return (_glptr_VertexAttribs2svNV) (GET_by_offset(disp, _gloffset_VertexAttribs2svNV)); +} + +static INLINE void SET_VertexAttribs2svNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttribs2svNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribs3dvNV)(GLuint, GLsizei, const GLdouble *); +#define CALL_VertexAttribs3dvNV(disp, parameters) \ + (* GET_VertexAttribs3dvNV(disp)) parameters +static INLINE _glptr_VertexAttribs3dvNV GET_VertexAttribs3dvNV(struct _glapi_table *disp) { + return (_glptr_VertexAttribs3dvNV) (GET_by_offset(disp, _gloffset_VertexAttribs3dvNV)); +} + +static INLINE void SET_VertexAttribs3dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttribs3dvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribs3fvNV)(GLuint, GLsizei, const GLfloat *); +#define CALL_VertexAttribs3fvNV(disp, parameters) \ + (* GET_VertexAttribs3fvNV(disp)) parameters +static INLINE _glptr_VertexAttribs3fvNV GET_VertexAttribs3fvNV(struct _glapi_table *disp) { + return (_glptr_VertexAttribs3fvNV) (GET_by_offset(disp, _gloffset_VertexAttribs3fvNV)); +} + +static INLINE void SET_VertexAttribs3fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttribs3fvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribs3svNV)(GLuint, GLsizei, const GLshort *); +#define CALL_VertexAttribs3svNV(disp, parameters) \ + (* GET_VertexAttribs3svNV(disp)) parameters +static INLINE _glptr_VertexAttribs3svNV GET_VertexAttribs3svNV(struct _glapi_table *disp) { + return (_glptr_VertexAttribs3svNV) (GET_by_offset(disp, _gloffset_VertexAttribs3svNV)); +} + +static INLINE void SET_VertexAttribs3svNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttribs3svNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribs4dvNV)(GLuint, GLsizei, const GLdouble *); +#define CALL_VertexAttribs4dvNV(disp, parameters) \ + (* GET_VertexAttribs4dvNV(disp)) parameters +static INLINE _glptr_VertexAttribs4dvNV GET_VertexAttribs4dvNV(struct _glapi_table *disp) { + return (_glptr_VertexAttribs4dvNV) (GET_by_offset(disp, _gloffset_VertexAttribs4dvNV)); +} + +static INLINE void SET_VertexAttribs4dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLdouble *)) { + SET_by_offset(disp, _gloffset_VertexAttribs4dvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribs4fvNV)(GLuint, GLsizei, const GLfloat *); +#define CALL_VertexAttribs4fvNV(disp, parameters) \ + (* GET_VertexAttribs4fvNV(disp)) parameters +static INLINE _glptr_VertexAttribs4fvNV GET_VertexAttribs4fvNV(struct _glapi_table *disp) { + return (_glptr_VertexAttribs4fvNV) (GET_by_offset(disp, _gloffset_VertexAttribs4fvNV)); +} + +static INLINE void SET_VertexAttribs4fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_VertexAttribs4fvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribs4svNV)(GLuint, GLsizei, const GLshort *); +#define CALL_VertexAttribs4svNV(disp, parameters) \ + (* GET_VertexAttribs4svNV(disp)) parameters +static INLINE _glptr_VertexAttribs4svNV GET_VertexAttribs4svNV(struct _glapi_table *disp) { + return (_glptr_VertexAttribs4svNV) (GET_by_offset(disp, _gloffset_VertexAttribs4svNV)); +} + +static INLINE void SET_VertexAttribs4svNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttribs4svNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribs4ubvNV)(GLuint, GLsizei, const GLubyte *); +#define CALL_VertexAttribs4ubvNV(disp, parameters) \ + (* GET_VertexAttribs4ubvNV(disp)) parameters +static INLINE _glptr_VertexAttribs4ubvNV GET_VertexAttribs4ubvNV(struct _glapi_table *disp) { + return (_glptr_VertexAttribs4ubvNV) (GET_by_offset(disp, _gloffset_VertexAttribs4ubvNV)); +} + +static INLINE void SET_VertexAttribs4ubvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLubyte *)) { + SET_by_offset(disp, _gloffset_VertexAttribs4ubvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetTexBumpParameterfvATI)(GLenum, GLfloat *); +#define CALL_GetTexBumpParameterfvATI(disp, parameters) \ + (* GET_GetTexBumpParameterfvATI(disp)) parameters +static INLINE _glptr_GetTexBumpParameterfvATI GET_GetTexBumpParameterfvATI(struct _glapi_table *disp) { + return (_glptr_GetTexBumpParameterfvATI) (GET_by_offset(disp, _gloffset_GetTexBumpParameterfvATI)); +} + +static INLINE void SET_GetTexBumpParameterfvATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetTexBumpParameterfvATI, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetTexBumpParameterivATI)(GLenum, GLint *); +#define CALL_GetTexBumpParameterivATI(disp, parameters) \ + (* GET_GetTexBumpParameterivATI(disp)) parameters +static INLINE _glptr_GetTexBumpParameterivATI GET_GetTexBumpParameterivATI(struct _glapi_table *disp) { + return (_glptr_GetTexBumpParameterivATI) (GET_by_offset(disp, _gloffset_GetTexBumpParameterivATI)); +} + +static INLINE void SET_GetTexBumpParameterivATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetTexBumpParameterivATI, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexBumpParameterfvATI)(GLenum, const GLfloat *); +#define CALL_TexBumpParameterfvATI(disp, parameters) \ + (* GET_TexBumpParameterfvATI(disp)) parameters +static INLINE _glptr_TexBumpParameterfvATI GET_TexBumpParameterfvATI(struct _glapi_table *disp) { + return (_glptr_TexBumpParameterfvATI) (GET_by_offset(disp, _gloffset_TexBumpParameterfvATI)); +} + +static INLINE void SET_TexBumpParameterfvATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLfloat *)) { + SET_by_offset(disp, _gloffset_TexBumpParameterfvATI, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexBumpParameterivATI)(GLenum, const GLint *); +#define CALL_TexBumpParameterivATI(disp, parameters) \ + (* GET_TexBumpParameterivATI(disp)) parameters +static INLINE _glptr_TexBumpParameterivATI GET_TexBumpParameterivATI(struct _glapi_table *disp) { + return (_glptr_TexBumpParameterivATI) (GET_by_offset(disp, _gloffset_TexBumpParameterivATI)); +} + +static INLINE void SET_TexBumpParameterivATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_TexBumpParameterivATI, fn); +} + +typedef void (GLAPIENTRYP _glptr_AlphaFragmentOp1ATI)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint); +#define CALL_AlphaFragmentOp1ATI(disp, parameters) \ + (* GET_AlphaFragmentOp1ATI(disp)) parameters +static INLINE _glptr_AlphaFragmentOp1ATI GET_AlphaFragmentOp1ATI(struct _glapi_table *disp) { + return (_glptr_AlphaFragmentOp1ATI) (GET_by_offset(disp, _gloffset_AlphaFragmentOp1ATI)); +} + +static INLINE void SET_AlphaFragmentOp1ATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_AlphaFragmentOp1ATI, fn); +} + +typedef void (GLAPIENTRYP _glptr_AlphaFragmentOp2ATI)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); +#define CALL_AlphaFragmentOp2ATI(disp, parameters) \ + (* GET_AlphaFragmentOp2ATI(disp)) parameters +static INLINE _glptr_AlphaFragmentOp2ATI GET_AlphaFragmentOp2ATI(struct _glapi_table *disp) { + return (_glptr_AlphaFragmentOp2ATI) (GET_by_offset(disp, _gloffset_AlphaFragmentOp2ATI)); +} + +static INLINE void SET_AlphaFragmentOp2ATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_AlphaFragmentOp2ATI, fn); +} + +typedef void (GLAPIENTRYP _glptr_AlphaFragmentOp3ATI)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); +#define CALL_AlphaFragmentOp3ATI(disp, parameters) \ + (* GET_AlphaFragmentOp3ATI(disp)) parameters +static INLINE _glptr_AlphaFragmentOp3ATI GET_AlphaFragmentOp3ATI(struct _glapi_table *disp) { + return (_glptr_AlphaFragmentOp3ATI) (GET_by_offset(disp, _gloffset_AlphaFragmentOp3ATI)); +} + +static INLINE void SET_AlphaFragmentOp3ATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_AlphaFragmentOp3ATI, fn); +} + +typedef void (GLAPIENTRYP _glptr_BeginFragmentShaderATI)(void); +#define CALL_BeginFragmentShaderATI(disp, parameters) \ + (* GET_BeginFragmentShaderATI(disp)) parameters +static INLINE _glptr_BeginFragmentShaderATI GET_BeginFragmentShaderATI(struct _glapi_table *disp) { + return (_glptr_BeginFragmentShaderATI) (GET_by_offset(disp, _gloffset_BeginFragmentShaderATI)); +} + +static INLINE void SET_BeginFragmentShaderATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_BeginFragmentShaderATI, fn); +} + +typedef void (GLAPIENTRYP _glptr_BindFragmentShaderATI)(GLuint); +#define CALL_BindFragmentShaderATI(disp, parameters) \ + (* GET_BindFragmentShaderATI(disp)) parameters +static INLINE _glptr_BindFragmentShaderATI GET_BindFragmentShaderATI(struct _glapi_table *disp) { + return (_glptr_BindFragmentShaderATI) (GET_by_offset(disp, _gloffset_BindFragmentShaderATI)); +} + +static INLINE void SET_BindFragmentShaderATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_BindFragmentShaderATI, fn); +} + +typedef void (GLAPIENTRYP _glptr_ColorFragmentOp1ATI)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); +#define CALL_ColorFragmentOp1ATI(disp, parameters) \ + (* GET_ColorFragmentOp1ATI(disp)) parameters +static INLINE _glptr_ColorFragmentOp1ATI GET_ColorFragmentOp1ATI(struct _glapi_table *disp) { + return (_glptr_ColorFragmentOp1ATI) (GET_by_offset(disp, _gloffset_ColorFragmentOp1ATI)); +} + +static INLINE void SET_ColorFragmentOp1ATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_ColorFragmentOp1ATI, fn); +} + +typedef void (GLAPIENTRYP _glptr_ColorFragmentOp2ATI)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); +#define CALL_ColorFragmentOp2ATI(disp, parameters) \ + (* GET_ColorFragmentOp2ATI(disp)) parameters +static INLINE _glptr_ColorFragmentOp2ATI GET_ColorFragmentOp2ATI(struct _glapi_table *disp) { + return (_glptr_ColorFragmentOp2ATI) (GET_by_offset(disp, _gloffset_ColorFragmentOp2ATI)); +} + +static INLINE void SET_ColorFragmentOp2ATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_ColorFragmentOp2ATI, fn); +} + +typedef void (GLAPIENTRYP _glptr_ColorFragmentOp3ATI)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint); +#define CALL_ColorFragmentOp3ATI(disp, parameters) \ + (* GET_ColorFragmentOp3ATI(disp)) parameters +static INLINE _glptr_ColorFragmentOp3ATI GET_ColorFragmentOp3ATI(struct _glapi_table *disp) { + return (_glptr_ColorFragmentOp3ATI) (GET_by_offset(disp, _gloffset_ColorFragmentOp3ATI)); +} + +static INLINE void SET_ColorFragmentOp3ATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_ColorFragmentOp3ATI, fn); +} + +typedef void (GLAPIENTRYP _glptr_DeleteFragmentShaderATI)(GLuint); +#define CALL_DeleteFragmentShaderATI(disp, parameters) \ + (* GET_DeleteFragmentShaderATI(disp)) parameters +static INLINE _glptr_DeleteFragmentShaderATI GET_DeleteFragmentShaderATI(struct _glapi_table *disp) { + return (_glptr_DeleteFragmentShaderATI) (GET_by_offset(disp, _gloffset_DeleteFragmentShaderATI)); +} + +static INLINE void SET_DeleteFragmentShaderATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_DeleteFragmentShaderATI, fn); +} + +typedef void (GLAPIENTRYP _glptr_EndFragmentShaderATI)(void); +#define CALL_EndFragmentShaderATI(disp, parameters) \ + (* GET_EndFragmentShaderATI(disp)) parameters +static INLINE _glptr_EndFragmentShaderATI GET_EndFragmentShaderATI(struct _glapi_table *disp) { + return (_glptr_EndFragmentShaderATI) (GET_by_offset(disp, _gloffset_EndFragmentShaderATI)); +} + +static INLINE void SET_EndFragmentShaderATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_EndFragmentShaderATI, fn); +} + +typedef GLuint (GLAPIENTRYP _glptr_GenFragmentShadersATI)(GLuint); +#define CALL_GenFragmentShadersATI(disp, parameters) \ + (* GET_GenFragmentShadersATI(disp)) parameters +static INLINE _glptr_GenFragmentShadersATI GET_GenFragmentShadersATI(struct _glapi_table *disp) { + return (_glptr_GenFragmentShadersATI) (GET_by_offset(disp, _gloffset_GenFragmentShadersATI)); +} + +static INLINE void SET_GenFragmentShadersATI(struct _glapi_table *disp, GLuint (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_GenFragmentShadersATI, fn); +} + +typedef void (GLAPIENTRYP _glptr_PassTexCoordATI)(GLuint, GLuint, GLenum); +#define CALL_PassTexCoordATI(disp, parameters) \ + (* GET_PassTexCoordATI(disp)) parameters +static INLINE _glptr_PassTexCoordATI GET_PassTexCoordATI(struct _glapi_table *disp) { + return (_glptr_PassTexCoordATI) (GET_by_offset(disp, _gloffset_PassTexCoordATI)); +} + +static INLINE void SET_PassTexCoordATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLenum)) { + SET_by_offset(disp, _gloffset_PassTexCoordATI, fn); +} + +typedef void (GLAPIENTRYP _glptr_SampleMapATI)(GLuint, GLuint, GLenum); +#define CALL_SampleMapATI(disp, parameters) \ + (* GET_SampleMapATI(disp)) parameters +static INLINE _glptr_SampleMapATI GET_SampleMapATI(struct _glapi_table *disp) { + return (_glptr_SampleMapATI) (GET_by_offset(disp, _gloffset_SampleMapATI)); +} + +static INLINE void SET_SampleMapATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLenum)) { + SET_by_offset(disp, _gloffset_SampleMapATI, fn); +} + +typedef void (GLAPIENTRYP _glptr_SetFragmentShaderConstantATI)(GLuint, const GLfloat *); +#define CALL_SetFragmentShaderConstantATI(disp, parameters) \ + (* GET_SetFragmentShaderConstantATI(disp)) parameters +static INLINE _glptr_SetFragmentShaderConstantATI GET_SetFragmentShaderConstantATI(struct _glapi_table *disp) { + return (_glptr_SetFragmentShaderConstantATI) (GET_by_offset(disp, _gloffset_SetFragmentShaderConstantATI)); +} + +static INLINE void SET_SetFragmentShaderConstantATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLfloat *)) { + SET_by_offset(disp, _gloffset_SetFragmentShaderConstantATI, fn); +} + +typedef void (GLAPIENTRYP _glptr_PointParameteriNV)(GLenum, GLint); +#define CALL_PointParameteriNV(disp, parameters) \ + (* GET_PointParameteriNV(disp)) parameters +static INLINE _glptr_PointParameteriNV GET_PointParameteriNV(struct _glapi_table *disp) { + return (_glptr_PointParameteriNV) (GET_by_offset(disp, _gloffset_PointParameteriNV)); +} + +static INLINE void SET_PointParameteriNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLint)) { + SET_by_offset(disp, _gloffset_PointParameteriNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_PointParameterivNV)(GLenum, const GLint *); +#define CALL_PointParameterivNV(disp, parameters) \ + (* GET_PointParameterivNV(disp)) parameters +static INLINE _glptr_PointParameterivNV GET_PointParameterivNV(struct _glapi_table *disp) { + return (_glptr_PointParameterivNV) (GET_by_offset(disp, _gloffset_PointParameterivNV)); +} + +static INLINE void SET_PointParameterivNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_PointParameterivNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_ActiveStencilFaceEXT)(GLenum); +#define CALL_ActiveStencilFaceEXT(disp, parameters) \ + (* GET_ActiveStencilFaceEXT(disp)) parameters +static INLINE _glptr_ActiveStencilFaceEXT GET_ActiveStencilFaceEXT(struct _glapi_table *disp) { + return (_glptr_ActiveStencilFaceEXT) (GET_by_offset(disp, _gloffset_ActiveStencilFaceEXT)); +} + +static INLINE void SET_ActiveStencilFaceEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_ActiveStencilFaceEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_BindVertexArrayAPPLE)(GLuint); +#define CALL_BindVertexArrayAPPLE(disp, parameters) \ + (* GET_BindVertexArrayAPPLE(disp)) parameters +static INLINE _glptr_BindVertexArrayAPPLE GET_BindVertexArrayAPPLE(struct _glapi_table *disp) { + return (_glptr_BindVertexArrayAPPLE) (GET_by_offset(disp, _gloffset_BindVertexArrayAPPLE)); +} + +static INLINE void SET_BindVertexArrayAPPLE(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_BindVertexArrayAPPLE, fn); +} + +typedef void (GLAPIENTRYP _glptr_DeleteVertexArraysAPPLE)(GLsizei, const GLuint *); +#define CALL_DeleteVertexArraysAPPLE(disp, parameters) \ + (* GET_DeleteVertexArraysAPPLE(disp)) parameters +static INLINE _glptr_DeleteVertexArraysAPPLE GET_DeleteVertexArraysAPPLE(struct _glapi_table *disp) { + return (_glptr_DeleteVertexArraysAPPLE) (GET_by_offset(disp, _gloffset_DeleteVertexArraysAPPLE)); +} + +static INLINE void SET_DeleteVertexArraysAPPLE(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_DeleteVertexArraysAPPLE, fn); +} + +typedef void (GLAPIENTRYP _glptr_GenVertexArraysAPPLE)(GLsizei, GLuint *); +#define CALL_GenVertexArraysAPPLE(disp, parameters) \ + (* GET_GenVertexArraysAPPLE(disp)) parameters +static INLINE _glptr_GenVertexArraysAPPLE GET_GenVertexArraysAPPLE(struct _glapi_table *disp) { + return (_glptr_GenVertexArraysAPPLE) (GET_by_offset(disp, _gloffset_GenVertexArraysAPPLE)); +} + +static INLINE void SET_GenVertexArraysAPPLE(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GenVertexArraysAPPLE, fn); +} + +typedef GLboolean (GLAPIENTRYP _glptr_IsVertexArrayAPPLE)(GLuint); +#define CALL_IsVertexArrayAPPLE(disp, parameters) \ + (* GET_IsVertexArrayAPPLE(disp)) parameters +static INLINE _glptr_IsVertexArrayAPPLE GET_IsVertexArrayAPPLE(struct _glapi_table *disp) { + return (_glptr_IsVertexArrayAPPLE) (GET_by_offset(disp, _gloffset_IsVertexArrayAPPLE)); +} + +static INLINE void SET_IsVertexArrayAPPLE(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsVertexArrayAPPLE, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetProgramNamedParameterdvNV)(GLuint, GLsizei, const GLubyte *, GLdouble *); +#define CALL_GetProgramNamedParameterdvNV(disp, parameters) \ + (* GET_GetProgramNamedParameterdvNV(disp)) parameters +static INLINE _glptr_GetProgramNamedParameterdvNV GET_GetProgramNamedParameterdvNV(struct _glapi_table *disp) { + return (_glptr_GetProgramNamedParameterdvNV) (GET_by_offset(disp, _gloffset_GetProgramNamedParameterdvNV)); +} + +static INLINE void SET_GetProgramNamedParameterdvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLubyte *, GLdouble *)) { + SET_by_offset(disp, _gloffset_GetProgramNamedParameterdvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetProgramNamedParameterfvNV)(GLuint, GLsizei, const GLubyte *, GLfloat *); +#define CALL_GetProgramNamedParameterfvNV(disp, parameters) \ + (* GET_GetProgramNamedParameterfvNV(disp)) parameters +static INLINE _glptr_GetProgramNamedParameterfvNV GET_GetProgramNamedParameterfvNV(struct _glapi_table *disp) { + return (_glptr_GetProgramNamedParameterfvNV) (GET_by_offset(disp, _gloffset_GetProgramNamedParameterfvNV)); +} + +static INLINE void SET_GetProgramNamedParameterfvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLubyte *, GLfloat *)) { + SET_by_offset(disp, _gloffset_GetProgramNamedParameterfvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_ProgramNamedParameter4dNV)(GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble); +#define CALL_ProgramNamedParameter4dNV(disp, parameters) \ + (* GET_ProgramNamedParameter4dNV(disp)) parameters +static INLINE _glptr_ProgramNamedParameter4dNV GET_ProgramNamedParameter4dNV(struct _glapi_table *disp) { + return (_glptr_ProgramNamedParameter4dNV) (GET_by_offset(disp, _gloffset_ProgramNamedParameter4dNV)); +} + +static INLINE void SET_ProgramNamedParameter4dNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLubyte *, GLdouble, GLdouble, GLdouble, GLdouble)) { + SET_by_offset(disp, _gloffset_ProgramNamedParameter4dNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_ProgramNamedParameter4dvNV)(GLuint, GLsizei, const GLubyte *, const GLdouble *); +#define CALL_ProgramNamedParameter4dvNV(disp, parameters) \ + (* GET_ProgramNamedParameter4dvNV(disp)) parameters +static INLINE _glptr_ProgramNamedParameter4dvNV GET_ProgramNamedParameter4dvNV(struct _glapi_table *disp) { + return (_glptr_ProgramNamedParameter4dvNV) (GET_by_offset(disp, _gloffset_ProgramNamedParameter4dvNV)); +} + +static INLINE void SET_ProgramNamedParameter4dvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLubyte *, const GLdouble *)) { + SET_by_offset(disp, _gloffset_ProgramNamedParameter4dvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_ProgramNamedParameter4fNV)(GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat); +#define CALL_ProgramNamedParameter4fNV(disp, parameters) \ + (* GET_ProgramNamedParameter4fNV(disp)) parameters +static INLINE _glptr_ProgramNamedParameter4fNV GET_ProgramNamedParameter4fNV(struct _glapi_table *disp) { + return (_glptr_ProgramNamedParameter4fNV) (GET_by_offset(disp, _gloffset_ProgramNamedParameter4fNV)); +} + +static INLINE void SET_ProgramNamedParameter4fNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLubyte *, GLfloat, GLfloat, GLfloat, GLfloat)) { + SET_by_offset(disp, _gloffset_ProgramNamedParameter4fNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_ProgramNamedParameter4fvNV)(GLuint, GLsizei, const GLubyte *, const GLfloat *); +#define CALL_ProgramNamedParameter4fvNV(disp, parameters) \ + (* GET_ProgramNamedParameter4fvNV(disp)) parameters +static INLINE _glptr_ProgramNamedParameter4fvNV GET_ProgramNamedParameter4fvNV(struct _glapi_table *disp) { + return (_glptr_ProgramNamedParameter4fvNV) (GET_by_offset(disp, _gloffset_ProgramNamedParameter4fvNV)); +} + +static INLINE void SET_ProgramNamedParameter4fvNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const GLubyte *, const GLfloat *)) { + SET_by_offset(disp, _gloffset_ProgramNamedParameter4fvNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_PrimitiveRestartIndexNV)(GLuint); +#define CALL_PrimitiveRestartIndexNV(disp, parameters) \ + (* GET_PrimitiveRestartIndexNV(disp)) parameters +static INLINE _glptr_PrimitiveRestartIndexNV GET_PrimitiveRestartIndexNV(struct _glapi_table *disp) { + return (_glptr_PrimitiveRestartIndexNV) (GET_by_offset(disp, _gloffset_PrimitiveRestartIndexNV)); +} + +static INLINE void SET_PrimitiveRestartIndexNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_PrimitiveRestartIndexNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_PrimitiveRestartNV)(void); +#define CALL_PrimitiveRestartNV(disp, parameters) \ + (* GET_PrimitiveRestartNV(disp)) parameters +static INLINE _glptr_PrimitiveRestartNV GET_PrimitiveRestartNV(struct _glapi_table *disp) { + return (_glptr_PrimitiveRestartNV) (GET_by_offset(disp, _gloffset_PrimitiveRestartNV)); +} + +static INLINE void SET_PrimitiveRestartNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_PrimitiveRestartNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_DepthBoundsEXT)(GLclampd, GLclampd); +#define CALL_DepthBoundsEXT(disp, parameters) \ + (* GET_DepthBoundsEXT(disp)) parameters +static INLINE _glptr_DepthBoundsEXT GET_DepthBoundsEXT(struct _glapi_table *disp) { + return (_glptr_DepthBoundsEXT) (GET_by_offset(disp, _gloffset_DepthBoundsEXT)); +} + +static INLINE void SET_DepthBoundsEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLclampd, GLclampd)) { + SET_by_offset(disp, _gloffset_DepthBoundsEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_BlendEquationSeparateEXT)(GLenum, GLenum); +#define CALL_BlendEquationSeparateEXT(disp, parameters) \ + (* GET_BlendEquationSeparateEXT(disp)) parameters +static INLINE _glptr_BlendEquationSeparateEXT GET_BlendEquationSeparateEXT(struct _glapi_table *disp) { + return (_glptr_BlendEquationSeparateEXT) (GET_by_offset(disp, _gloffset_BlendEquationSeparateEXT)); +} + +static INLINE void SET_BlendEquationSeparateEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum)) { + SET_by_offset(disp, _gloffset_BlendEquationSeparateEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_BindFramebufferEXT)(GLenum, GLuint); +#define CALL_BindFramebufferEXT(disp, parameters) \ + (* GET_BindFramebufferEXT(disp)) parameters +static INLINE _glptr_BindFramebufferEXT GET_BindFramebufferEXT(struct _glapi_table *disp) { + return (_glptr_BindFramebufferEXT) (GET_by_offset(disp, _gloffset_BindFramebufferEXT)); +} + +static INLINE void SET_BindFramebufferEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_BindFramebufferEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_BindRenderbufferEXT)(GLenum, GLuint); +#define CALL_BindRenderbufferEXT(disp, parameters) \ + (* GET_BindRenderbufferEXT(disp)) parameters +static INLINE _glptr_BindRenderbufferEXT GET_BindRenderbufferEXT(struct _glapi_table *disp) { + return (_glptr_BindRenderbufferEXT) (GET_by_offset(disp, _gloffset_BindRenderbufferEXT)); +} + +static INLINE void SET_BindRenderbufferEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_BindRenderbufferEXT, fn); +} + +typedef GLenum (GLAPIENTRYP _glptr_CheckFramebufferStatusEXT)(GLenum); +#define CALL_CheckFramebufferStatusEXT(disp, parameters) \ + (* GET_CheckFramebufferStatusEXT(disp)) parameters +static INLINE _glptr_CheckFramebufferStatusEXT GET_CheckFramebufferStatusEXT(struct _glapi_table *disp) { + return (_glptr_CheckFramebufferStatusEXT) (GET_by_offset(disp, _gloffset_CheckFramebufferStatusEXT)); +} + +static INLINE void SET_CheckFramebufferStatusEXT(struct _glapi_table *disp, GLenum (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_CheckFramebufferStatusEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_DeleteFramebuffersEXT)(GLsizei, const GLuint *); +#define CALL_DeleteFramebuffersEXT(disp, parameters) \ + (* GET_DeleteFramebuffersEXT(disp)) parameters +static INLINE _glptr_DeleteFramebuffersEXT GET_DeleteFramebuffersEXT(struct _glapi_table *disp) { + return (_glptr_DeleteFramebuffersEXT) (GET_by_offset(disp, _gloffset_DeleteFramebuffersEXT)); +} + +static INLINE void SET_DeleteFramebuffersEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_DeleteFramebuffersEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_DeleteRenderbuffersEXT)(GLsizei, const GLuint *); +#define CALL_DeleteRenderbuffersEXT(disp, parameters) \ + (* GET_DeleteRenderbuffersEXT(disp)) parameters +static INLINE _glptr_DeleteRenderbuffersEXT GET_DeleteRenderbuffersEXT(struct _glapi_table *disp) { + return (_glptr_DeleteRenderbuffersEXT) (GET_by_offset(disp, _gloffset_DeleteRenderbuffersEXT)); +} + +static INLINE void SET_DeleteRenderbuffersEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_DeleteRenderbuffersEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_FramebufferRenderbufferEXT)(GLenum, GLenum, GLenum, GLuint); +#define CALL_FramebufferRenderbufferEXT(disp, parameters) \ + (* GET_FramebufferRenderbufferEXT(disp)) parameters +static INLINE _glptr_FramebufferRenderbufferEXT GET_FramebufferRenderbufferEXT(struct _glapi_table *disp) { + return (_glptr_FramebufferRenderbufferEXT) (GET_by_offset(disp, _gloffset_FramebufferRenderbufferEXT)); +} + +static INLINE void SET_FramebufferRenderbufferEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_FramebufferRenderbufferEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_FramebufferTexture1DEXT)(GLenum, GLenum, GLenum, GLuint, GLint); +#define CALL_FramebufferTexture1DEXT(disp, parameters) \ + (* GET_FramebufferTexture1DEXT(disp)) parameters +static INLINE _glptr_FramebufferTexture1DEXT GET_FramebufferTexture1DEXT(struct _glapi_table *disp) { + return (_glptr_FramebufferTexture1DEXT) (GET_by_offset(disp, _gloffset_FramebufferTexture1DEXT)); +} + +static INLINE void SET_FramebufferTexture1DEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLuint, GLint)) { + SET_by_offset(disp, _gloffset_FramebufferTexture1DEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_FramebufferTexture2DEXT)(GLenum, GLenum, GLenum, GLuint, GLint); +#define CALL_FramebufferTexture2DEXT(disp, parameters) \ + (* GET_FramebufferTexture2DEXT(disp)) parameters +static INLINE _glptr_FramebufferTexture2DEXT GET_FramebufferTexture2DEXT(struct _glapi_table *disp) { + return (_glptr_FramebufferTexture2DEXT) (GET_by_offset(disp, _gloffset_FramebufferTexture2DEXT)); +} + +static INLINE void SET_FramebufferTexture2DEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLuint, GLint)) { + SET_by_offset(disp, _gloffset_FramebufferTexture2DEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_FramebufferTexture3DEXT)(GLenum, GLenum, GLenum, GLuint, GLint, GLint); +#define CALL_FramebufferTexture3DEXT(disp, parameters) \ + (* GET_FramebufferTexture3DEXT(disp)) parameters +static INLINE _glptr_FramebufferTexture3DEXT GET_FramebufferTexture3DEXT(struct _glapi_table *disp) { + return (_glptr_FramebufferTexture3DEXT) (GET_by_offset(disp, _gloffset_FramebufferTexture3DEXT)); +} + +static INLINE void SET_FramebufferTexture3DEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLuint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_FramebufferTexture3DEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_GenFramebuffersEXT)(GLsizei, GLuint *); +#define CALL_GenFramebuffersEXT(disp, parameters) \ + (* GET_GenFramebuffersEXT(disp)) parameters +static INLINE _glptr_GenFramebuffersEXT GET_GenFramebuffersEXT(struct _glapi_table *disp) { + return (_glptr_GenFramebuffersEXT) (GET_by_offset(disp, _gloffset_GenFramebuffersEXT)); +} + +static INLINE void SET_GenFramebuffersEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GenFramebuffersEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_GenRenderbuffersEXT)(GLsizei, GLuint *); +#define CALL_GenRenderbuffersEXT(disp, parameters) \ + (* GET_GenRenderbuffersEXT(disp)) parameters +static INLINE _glptr_GenRenderbuffersEXT GET_GenRenderbuffersEXT(struct _glapi_table *disp) { + return (_glptr_GenRenderbuffersEXT) (GET_by_offset(disp, _gloffset_GenRenderbuffersEXT)); +} + +static INLINE void SET_GenRenderbuffersEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLsizei, GLuint *)) { + SET_by_offset(disp, _gloffset_GenRenderbuffersEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_GenerateMipmapEXT)(GLenum); +#define CALL_GenerateMipmapEXT(disp, parameters) \ + (* GET_GenerateMipmapEXT(disp)) parameters +static INLINE _glptr_GenerateMipmapEXT GET_GenerateMipmapEXT(struct _glapi_table *disp) { + return (_glptr_GenerateMipmapEXT) (GET_by_offset(disp, _gloffset_GenerateMipmapEXT)); +} + +static INLINE void SET_GenerateMipmapEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_GenerateMipmapEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetFramebufferAttachmentParameterivEXT)(GLenum, GLenum, GLenum, GLint *); +#define CALL_GetFramebufferAttachmentParameterivEXT(disp, parameters) \ + (* GET_GetFramebufferAttachmentParameterivEXT(disp)) parameters +static INLINE _glptr_GetFramebufferAttachmentParameterivEXT GET_GetFramebufferAttachmentParameterivEXT(struct _glapi_table *disp) { + return (_glptr_GetFramebufferAttachmentParameterivEXT) (GET_by_offset(disp, _gloffset_GetFramebufferAttachmentParameterivEXT)); +} + +static INLINE void SET_GetFramebufferAttachmentParameterivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetFramebufferAttachmentParameterivEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetRenderbufferParameterivEXT)(GLenum, GLenum, GLint *); +#define CALL_GetRenderbufferParameterivEXT(disp, parameters) \ + (* GET_GetRenderbufferParameterivEXT(disp)) parameters +static INLINE _glptr_GetRenderbufferParameterivEXT GET_GetRenderbufferParameterivEXT(struct _glapi_table *disp) { + return (_glptr_GetRenderbufferParameterivEXT) (GET_by_offset(disp, _gloffset_GetRenderbufferParameterivEXT)); +} + +static INLINE void SET_GetRenderbufferParameterivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetRenderbufferParameterivEXT, fn); +} + +typedef GLboolean (GLAPIENTRYP _glptr_IsFramebufferEXT)(GLuint); +#define CALL_IsFramebufferEXT(disp, parameters) \ + (* GET_IsFramebufferEXT(disp)) parameters +static INLINE _glptr_IsFramebufferEXT GET_IsFramebufferEXT(struct _glapi_table *disp) { + return (_glptr_IsFramebufferEXT) (GET_by_offset(disp, _gloffset_IsFramebufferEXT)); +} + +static INLINE void SET_IsFramebufferEXT(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsFramebufferEXT, fn); +} + +typedef GLboolean (GLAPIENTRYP _glptr_IsRenderbufferEXT)(GLuint); +#define CALL_IsRenderbufferEXT(disp, parameters) \ + (* GET_IsRenderbufferEXT(disp)) parameters +static INLINE _glptr_IsRenderbufferEXT GET_IsRenderbufferEXT(struct _glapi_table *disp) { + return (_glptr_IsRenderbufferEXT) (GET_by_offset(disp, _gloffset_IsRenderbufferEXT)); +} + +static INLINE void SET_IsRenderbufferEXT(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_IsRenderbufferEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_RenderbufferStorageEXT)(GLenum, GLenum, GLsizei, GLsizei); +#define CALL_RenderbufferStorageEXT(disp, parameters) \ + (* GET_RenderbufferStorageEXT(disp)) parameters +static INLINE _glptr_RenderbufferStorageEXT GET_RenderbufferStorageEXT(struct _glapi_table *disp) { + return (_glptr_RenderbufferStorageEXT) (GET_by_offset(disp, _gloffset_RenderbufferStorageEXT)); +} + +static INLINE void SET_RenderbufferStorageEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLsizei, GLsizei)) { + SET_by_offset(disp, _gloffset_RenderbufferStorageEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_BlitFramebufferEXT)(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum); +#define CALL_BlitFramebufferEXT(disp, parameters) \ + (* GET_BlitFramebufferEXT(disp)) parameters +static INLINE _glptr_BlitFramebufferEXT GET_BlitFramebufferEXT(struct _glapi_table *disp) { + return (_glptr_BlitFramebufferEXT) (GET_by_offset(disp, _gloffset_BlitFramebufferEXT)); +} + +static INLINE void SET_BlitFramebufferEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum)) { + SET_by_offset(disp, _gloffset_BlitFramebufferEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_BufferParameteriAPPLE)(GLenum, GLenum, GLint); +#define CALL_BufferParameteriAPPLE(disp, parameters) \ + (* GET_BufferParameteriAPPLE(disp)) parameters +static INLINE _glptr_BufferParameteriAPPLE GET_BufferParameteriAPPLE(struct _glapi_table *disp) { + return (_glptr_BufferParameteriAPPLE) (GET_by_offset(disp, _gloffset_BufferParameteriAPPLE)); +} + +static INLINE void SET_BufferParameteriAPPLE(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint)) { + SET_by_offset(disp, _gloffset_BufferParameteriAPPLE, fn); +} + +typedef void (GLAPIENTRYP _glptr_FlushMappedBufferRangeAPPLE)(GLenum, GLintptr, GLsizeiptr); +#define CALL_FlushMappedBufferRangeAPPLE(disp, parameters) \ + (* GET_FlushMappedBufferRangeAPPLE(disp)) parameters +static INLINE _glptr_FlushMappedBufferRangeAPPLE GET_FlushMappedBufferRangeAPPLE(struct _glapi_table *disp) { + return (_glptr_FlushMappedBufferRangeAPPLE) (GET_by_offset(disp, _gloffset_FlushMappedBufferRangeAPPLE)); +} + +static INLINE void SET_FlushMappedBufferRangeAPPLE(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLintptr, GLsizeiptr)) { + SET_by_offset(disp, _gloffset_FlushMappedBufferRangeAPPLE, fn); +} + +typedef void (GLAPIENTRYP _glptr_BindFragDataLocationEXT)(GLuint, GLuint, const GLchar *); +#define CALL_BindFragDataLocationEXT(disp, parameters) \ + (* GET_BindFragDataLocationEXT(disp)) parameters +static INLINE _glptr_BindFragDataLocationEXT GET_BindFragDataLocationEXT(struct _glapi_table *disp) { + return (_glptr_BindFragDataLocationEXT) (GET_by_offset(disp, _gloffset_BindFragDataLocationEXT)); +} + +static INLINE void SET_BindFragDataLocationEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, const GLchar *)) { + SET_by_offset(disp, _gloffset_BindFragDataLocationEXT, fn); +} + +typedef GLint (GLAPIENTRYP _glptr_GetFragDataLocationEXT)(GLuint, const GLchar *); +#define CALL_GetFragDataLocationEXT(disp, parameters) \ + (* GET_GetFragDataLocationEXT(disp)) parameters +static INLINE _glptr_GetFragDataLocationEXT GET_GetFragDataLocationEXT(struct _glapi_table *disp) { + return (_glptr_GetFragDataLocationEXT) (GET_by_offset(disp, _gloffset_GetFragDataLocationEXT)); +} + +static INLINE void SET_GetFragDataLocationEXT(struct _glapi_table *disp, GLint (GLAPIENTRYP fn)(GLuint, const GLchar *)) { + SET_by_offset(disp, _gloffset_GetFragDataLocationEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetUniformuivEXT)(GLuint, GLint, GLuint *); +#define CALL_GetUniformuivEXT(disp, parameters) \ + (* GET_GetUniformuivEXT(disp)) parameters +static INLINE _glptr_GetUniformuivEXT GET_GetUniformuivEXT(struct _glapi_table *disp) { + return (_glptr_GetUniformuivEXT) (GET_by_offset(disp, _gloffset_GetUniformuivEXT)); +} + +static INLINE void SET_GetUniformuivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLuint *)) { + SET_by_offset(disp, _gloffset_GetUniformuivEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetVertexAttribIivEXT)(GLuint, GLenum, GLint *); +#define CALL_GetVertexAttribIivEXT(disp, parameters) \ + (* GET_GetVertexAttribIivEXT(disp)) parameters +static INLINE _glptr_GetVertexAttribIivEXT GET_GetVertexAttribIivEXT(struct _glapi_table *disp) { + return (_glptr_GetVertexAttribIivEXT) (GET_by_offset(disp, _gloffset_GetVertexAttribIivEXT)); +} + +static INLINE void SET_GetVertexAttribIivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetVertexAttribIivEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetVertexAttribIuivEXT)(GLuint, GLenum, GLuint *); +#define CALL_GetVertexAttribIuivEXT(disp, parameters) \ + (* GET_GetVertexAttribIuivEXT(disp)) parameters +static INLINE _glptr_GetVertexAttribIuivEXT GET_GetVertexAttribIuivEXT(struct _glapi_table *disp) { + return (_glptr_GetVertexAttribIuivEXT) (GET_by_offset(disp, _gloffset_GetVertexAttribIuivEXT)); +} + +static INLINE void SET_GetVertexAttribIuivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLuint *)) { + SET_by_offset(disp, _gloffset_GetVertexAttribIuivEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform1uiEXT)(GLint, GLuint); +#define CALL_Uniform1uiEXT(disp, parameters) \ + (* GET_Uniform1uiEXT(disp)) parameters +static INLINE _glptr_Uniform1uiEXT GET_Uniform1uiEXT(struct _glapi_table *disp) { + return (_glptr_Uniform1uiEXT) (GET_by_offset(disp, _gloffset_Uniform1uiEXT)); +} + +static INLINE void SET_Uniform1uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLuint)) { + SET_by_offset(disp, _gloffset_Uniform1uiEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform1uivEXT)(GLint, GLsizei, const GLuint *); +#define CALL_Uniform1uivEXT(disp, parameters) \ + (* GET_Uniform1uivEXT(disp)) parameters +static INLINE _glptr_Uniform1uivEXT GET_Uniform1uivEXT(struct _glapi_table *disp) { + return (_glptr_Uniform1uivEXT) (GET_by_offset(disp, _gloffset_Uniform1uivEXT)); +} + +static INLINE void SET_Uniform1uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_Uniform1uivEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform2uiEXT)(GLint, GLuint, GLuint); +#define CALL_Uniform2uiEXT(disp, parameters) \ + (* GET_Uniform2uiEXT(disp)) parameters +static INLINE _glptr_Uniform2uiEXT GET_Uniform2uiEXT(struct _glapi_table *disp) { + return (_glptr_Uniform2uiEXT) (GET_by_offset(disp, _gloffset_Uniform2uiEXT)); +} + +static INLINE void SET_Uniform2uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_Uniform2uiEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform2uivEXT)(GLint, GLsizei, const GLuint *); +#define CALL_Uniform2uivEXT(disp, parameters) \ + (* GET_Uniform2uivEXT(disp)) parameters +static INLINE _glptr_Uniform2uivEXT GET_Uniform2uivEXT(struct _glapi_table *disp) { + return (_glptr_Uniform2uivEXT) (GET_by_offset(disp, _gloffset_Uniform2uivEXT)); +} + +static INLINE void SET_Uniform2uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_Uniform2uivEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform3uiEXT)(GLint, GLuint, GLuint, GLuint); +#define CALL_Uniform3uiEXT(disp, parameters) \ + (* GET_Uniform3uiEXT(disp)) parameters +static INLINE _glptr_Uniform3uiEXT GET_Uniform3uiEXT(struct _glapi_table *disp) { + return (_glptr_Uniform3uiEXT) (GET_by_offset(disp, _gloffset_Uniform3uiEXT)); +} + +static INLINE void SET_Uniform3uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_Uniform3uiEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform3uivEXT)(GLint, GLsizei, const GLuint *); +#define CALL_Uniform3uivEXT(disp, parameters) \ + (* GET_Uniform3uivEXT(disp)) parameters +static INLINE _glptr_Uniform3uivEXT GET_Uniform3uivEXT(struct _glapi_table *disp) { + return (_glptr_Uniform3uivEXT) (GET_by_offset(disp, _gloffset_Uniform3uivEXT)); +} + +static INLINE void SET_Uniform3uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_Uniform3uivEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform4uiEXT)(GLint, GLuint, GLuint, GLuint, GLuint); +#define CALL_Uniform4uiEXT(disp, parameters) \ + (* GET_Uniform4uiEXT(disp)) parameters +static INLINE _glptr_Uniform4uiEXT GET_Uniform4uiEXT(struct _glapi_table *disp) { + return (_glptr_Uniform4uiEXT) (GET_by_offset(disp, _gloffset_Uniform4uiEXT)); +} + +static INLINE void SET_Uniform4uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLuint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_Uniform4uiEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_Uniform4uivEXT)(GLint, GLsizei, const GLuint *); +#define CALL_Uniform4uivEXT(disp, parameters) \ + (* GET_Uniform4uivEXT(disp)) parameters +static INLINE _glptr_Uniform4uivEXT GET_Uniform4uivEXT(struct _glapi_table *disp) { + return (_glptr_Uniform4uivEXT) (GET_by_offset(disp, _gloffset_Uniform4uivEXT)); +} + +static INLINE void SET_Uniform4uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLsizei, const GLuint *)) { + SET_by_offset(disp, _gloffset_Uniform4uivEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribI1iEXT)(GLuint, GLint); +#define CALL_VertexAttribI1iEXT(disp, parameters) \ + (* GET_VertexAttribI1iEXT(disp)) parameters +static INLINE _glptr_VertexAttribI1iEXT GET_VertexAttribI1iEXT(struct _glapi_table *disp) { + return (_glptr_VertexAttribI1iEXT) (GET_by_offset(disp, _gloffset_VertexAttribI1iEXT)); +} + +static INLINE void SET_VertexAttribI1iEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint)) { + SET_by_offset(disp, _gloffset_VertexAttribI1iEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribI1ivEXT)(GLuint, const GLint *); +#define CALL_VertexAttribI1ivEXT(disp, parameters) \ + (* GET_VertexAttribI1ivEXT(disp)) parameters +static INLINE _glptr_VertexAttribI1ivEXT GET_VertexAttribI1ivEXT(struct _glapi_table *disp) { + return (_glptr_VertexAttribI1ivEXT) (GET_by_offset(disp, _gloffset_VertexAttribI1ivEXT)); +} + +static INLINE void SET_VertexAttribI1ivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLint *)) { + SET_by_offset(disp, _gloffset_VertexAttribI1ivEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribI1uiEXT)(GLuint, GLuint); +#define CALL_VertexAttribI1uiEXT(disp, parameters) \ + (* GET_VertexAttribI1uiEXT(disp)) parameters +static INLINE _glptr_VertexAttribI1uiEXT GET_VertexAttribI1uiEXT(struct _glapi_table *disp) { + return (_glptr_VertexAttribI1uiEXT) (GET_by_offset(disp, _gloffset_VertexAttribI1uiEXT)); +} + +static INLINE void SET_VertexAttribI1uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_VertexAttribI1uiEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribI1uivEXT)(GLuint, const GLuint *); +#define CALL_VertexAttribI1uivEXT(disp, parameters) \ + (* GET_VertexAttribI1uivEXT(disp)) parameters +static INLINE _glptr_VertexAttribI1uivEXT GET_VertexAttribI1uivEXT(struct _glapi_table *disp) { + return (_glptr_VertexAttribI1uivEXT) (GET_by_offset(disp, _gloffset_VertexAttribI1uivEXT)); +} + +static INLINE void SET_VertexAttribI1uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLuint *)) { + SET_by_offset(disp, _gloffset_VertexAttribI1uivEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribI2iEXT)(GLuint, GLint, GLint); +#define CALL_VertexAttribI2iEXT(disp, parameters) \ + (* GET_VertexAttribI2iEXT(disp)) parameters +static INLINE _glptr_VertexAttribI2iEXT GET_VertexAttribI2iEXT(struct _glapi_table *disp) { + return (_glptr_VertexAttribI2iEXT) (GET_by_offset(disp, _gloffset_VertexAttribI2iEXT)); +} + +static INLINE void SET_VertexAttribI2iEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_VertexAttribI2iEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribI2ivEXT)(GLuint, const GLint *); +#define CALL_VertexAttribI2ivEXT(disp, parameters) \ + (* GET_VertexAttribI2ivEXT(disp)) parameters +static INLINE _glptr_VertexAttribI2ivEXT GET_VertexAttribI2ivEXT(struct _glapi_table *disp) { + return (_glptr_VertexAttribI2ivEXT) (GET_by_offset(disp, _gloffset_VertexAttribI2ivEXT)); +} + +static INLINE void SET_VertexAttribI2ivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLint *)) { + SET_by_offset(disp, _gloffset_VertexAttribI2ivEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribI2uiEXT)(GLuint, GLuint, GLuint); +#define CALL_VertexAttribI2uiEXT(disp, parameters) \ + (* GET_VertexAttribI2uiEXT(disp)) parameters +static INLINE _glptr_VertexAttribI2uiEXT GET_VertexAttribI2uiEXT(struct _glapi_table *disp) { + return (_glptr_VertexAttribI2uiEXT) (GET_by_offset(disp, _gloffset_VertexAttribI2uiEXT)); +} + +static INLINE void SET_VertexAttribI2uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_VertexAttribI2uiEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribI2uivEXT)(GLuint, const GLuint *); +#define CALL_VertexAttribI2uivEXT(disp, parameters) \ + (* GET_VertexAttribI2uivEXT(disp)) parameters +static INLINE _glptr_VertexAttribI2uivEXT GET_VertexAttribI2uivEXT(struct _glapi_table *disp) { + return (_glptr_VertexAttribI2uivEXT) (GET_by_offset(disp, _gloffset_VertexAttribI2uivEXT)); +} + +static INLINE void SET_VertexAttribI2uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLuint *)) { + SET_by_offset(disp, _gloffset_VertexAttribI2uivEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribI3iEXT)(GLuint, GLint, GLint, GLint); +#define CALL_VertexAttribI3iEXT(disp, parameters) \ + (* GET_VertexAttribI3iEXT(disp)) parameters +static INLINE _glptr_VertexAttribI3iEXT GET_VertexAttribI3iEXT(struct _glapi_table *disp) { + return (_glptr_VertexAttribI3iEXT) (GET_by_offset(disp, _gloffset_VertexAttribI3iEXT)); +} + +static INLINE void SET_VertexAttribI3iEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_VertexAttribI3iEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribI3ivEXT)(GLuint, const GLint *); +#define CALL_VertexAttribI3ivEXT(disp, parameters) \ + (* GET_VertexAttribI3ivEXT(disp)) parameters +static INLINE _glptr_VertexAttribI3ivEXT GET_VertexAttribI3ivEXT(struct _glapi_table *disp) { + return (_glptr_VertexAttribI3ivEXT) (GET_by_offset(disp, _gloffset_VertexAttribI3ivEXT)); +} + +static INLINE void SET_VertexAttribI3ivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLint *)) { + SET_by_offset(disp, _gloffset_VertexAttribI3ivEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribI3uiEXT)(GLuint, GLuint, GLuint, GLuint); +#define CALL_VertexAttribI3uiEXT(disp, parameters) \ + (* GET_VertexAttribI3uiEXT(disp)) parameters +static INLINE _glptr_VertexAttribI3uiEXT GET_VertexAttribI3uiEXT(struct _glapi_table *disp) { + return (_glptr_VertexAttribI3uiEXT) (GET_by_offset(disp, _gloffset_VertexAttribI3uiEXT)); +} + +static INLINE void SET_VertexAttribI3uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_VertexAttribI3uiEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribI3uivEXT)(GLuint, const GLuint *); +#define CALL_VertexAttribI3uivEXT(disp, parameters) \ + (* GET_VertexAttribI3uivEXT(disp)) parameters +static INLINE _glptr_VertexAttribI3uivEXT GET_VertexAttribI3uivEXT(struct _glapi_table *disp) { + return (_glptr_VertexAttribI3uivEXT) (GET_by_offset(disp, _gloffset_VertexAttribI3uivEXT)); +} + +static INLINE void SET_VertexAttribI3uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLuint *)) { + SET_by_offset(disp, _gloffset_VertexAttribI3uivEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribI4bvEXT)(GLuint, const GLbyte *); +#define CALL_VertexAttribI4bvEXT(disp, parameters) \ + (* GET_VertexAttribI4bvEXT(disp)) parameters +static INLINE _glptr_VertexAttribI4bvEXT GET_VertexAttribI4bvEXT(struct _glapi_table *disp) { + return (_glptr_VertexAttribI4bvEXT) (GET_by_offset(disp, _gloffset_VertexAttribI4bvEXT)); +} + +static INLINE void SET_VertexAttribI4bvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLbyte *)) { + SET_by_offset(disp, _gloffset_VertexAttribI4bvEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribI4iEXT)(GLuint, GLint, GLint, GLint, GLint); +#define CALL_VertexAttribI4iEXT(disp, parameters) \ + (* GET_VertexAttribI4iEXT(disp)) parameters +static INLINE _glptr_VertexAttribI4iEXT GET_VertexAttribI4iEXT(struct _glapi_table *disp) { + return (_glptr_VertexAttribI4iEXT) (GET_by_offset(disp, _gloffset_VertexAttribI4iEXT)); +} + +static INLINE void SET_VertexAttribI4iEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_VertexAttribI4iEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribI4ivEXT)(GLuint, const GLint *); +#define CALL_VertexAttribI4ivEXT(disp, parameters) \ + (* GET_VertexAttribI4ivEXT(disp)) parameters +static INLINE _glptr_VertexAttribI4ivEXT GET_VertexAttribI4ivEXT(struct _glapi_table *disp) { + return (_glptr_VertexAttribI4ivEXT) (GET_by_offset(disp, _gloffset_VertexAttribI4ivEXT)); +} + +static INLINE void SET_VertexAttribI4ivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLint *)) { + SET_by_offset(disp, _gloffset_VertexAttribI4ivEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribI4svEXT)(GLuint, const GLshort *); +#define CALL_VertexAttribI4svEXT(disp, parameters) \ + (* GET_VertexAttribI4svEXT(disp)) parameters +static INLINE _glptr_VertexAttribI4svEXT GET_VertexAttribI4svEXT(struct _glapi_table *disp) { + return (_glptr_VertexAttribI4svEXT) (GET_by_offset(disp, _gloffset_VertexAttribI4svEXT)); +} + +static INLINE void SET_VertexAttribI4svEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLshort *)) { + SET_by_offset(disp, _gloffset_VertexAttribI4svEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribI4ubvEXT)(GLuint, const GLubyte *); +#define CALL_VertexAttribI4ubvEXT(disp, parameters) \ + (* GET_VertexAttribI4ubvEXT(disp)) parameters +static INLINE _glptr_VertexAttribI4ubvEXT GET_VertexAttribI4ubvEXT(struct _glapi_table *disp) { + return (_glptr_VertexAttribI4ubvEXT) (GET_by_offset(disp, _gloffset_VertexAttribI4ubvEXT)); +} + +static INLINE void SET_VertexAttribI4ubvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLubyte *)) { + SET_by_offset(disp, _gloffset_VertexAttribI4ubvEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribI4uiEXT)(GLuint, GLuint, GLuint, GLuint, GLuint); +#define CALL_VertexAttribI4uiEXT(disp, parameters) \ + (* GET_VertexAttribI4uiEXT(disp)) parameters +static INLINE _glptr_VertexAttribI4uiEXT GET_VertexAttribI4uiEXT(struct _glapi_table *disp) { + return (_glptr_VertexAttribI4uiEXT) (GET_by_offset(disp, _gloffset_VertexAttribI4uiEXT)); +} + +static INLINE void SET_VertexAttribI4uiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_VertexAttribI4uiEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribI4uivEXT)(GLuint, const GLuint *); +#define CALL_VertexAttribI4uivEXT(disp, parameters) \ + (* GET_VertexAttribI4uivEXT(disp)) parameters +static INLINE _glptr_VertexAttribI4uivEXT GET_VertexAttribI4uivEXT(struct _glapi_table *disp) { + return (_glptr_VertexAttribI4uivEXT) (GET_by_offset(disp, _gloffset_VertexAttribI4uivEXT)); +} + +static INLINE void SET_VertexAttribI4uivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLuint *)) { + SET_by_offset(disp, _gloffset_VertexAttribI4uivEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribI4usvEXT)(GLuint, const GLushort *); +#define CALL_VertexAttribI4usvEXT(disp, parameters) \ + (* GET_VertexAttribI4usvEXT(disp)) parameters +static INLINE _glptr_VertexAttribI4usvEXT GET_VertexAttribI4usvEXT(struct _glapi_table *disp) { + return (_glptr_VertexAttribI4usvEXT) (GET_by_offset(disp, _gloffset_VertexAttribI4usvEXT)); +} + +static INLINE void SET_VertexAttribI4usvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, const GLushort *)) { + SET_by_offset(disp, _gloffset_VertexAttribI4usvEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_VertexAttribIPointerEXT)(GLuint, GLint, GLenum, GLsizei, const GLvoid *); +#define CALL_VertexAttribIPointerEXT(disp, parameters) \ + (* GET_VertexAttribIPointerEXT(disp)) parameters +static INLINE _glptr_VertexAttribIPointerEXT GET_VertexAttribIPointerEXT(struct _glapi_table *disp) { + return (_glptr_VertexAttribIPointerEXT) (GET_by_offset(disp, _gloffset_VertexAttribIPointerEXT)); +} + +static INLINE void SET_VertexAttribIPointerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLint, GLenum, GLsizei, const GLvoid *)) { + SET_by_offset(disp, _gloffset_VertexAttribIPointerEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_FramebufferTextureLayerEXT)(GLenum, GLenum, GLuint, GLint, GLint); +#define CALL_FramebufferTextureLayerEXT(disp, parameters) \ + (* GET_FramebufferTextureLayerEXT(disp)) parameters +static INLINE _glptr_FramebufferTextureLayerEXT GET_FramebufferTextureLayerEXT(struct _glapi_table *disp) { + return (_glptr_FramebufferTextureLayerEXT) (GET_by_offset(disp, _gloffset_FramebufferTextureLayerEXT)); +} + +static INLINE void SET_FramebufferTextureLayerEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_FramebufferTextureLayerEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_ColorMaskIndexedEXT)(GLuint, GLboolean, GLboolean, GLboolean, GLboolean); +#define CALL_ColorMaskIndexedEXT(disp, parameters) \ + (* GET_ColorMaskIndexedEXT(disp)) parameters +static INLINE _glptr_ColorMaskIndexedEXT GET_ColorMaskIndexedEXT(struct _glapi_table *disp) { + return (_glptr_ColorMaskIndexedEXT) (GET_by_offset(disp, _gloffset_ColorMaskIndexedEXT)); +} + +static INLINE void SET_ColorMaskIndexedEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLboolean, GLboolean, GLboolean, GLboolean)) { + SET_by_offset(disp, _gloffset_ColorMaskIndexedEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_DisableIndexedEXT)(GLenum, GLuint); +#define CALL_DisableIndexedEXT(disp, parameters) \ + (* GET_DisableIndexedEXT(disp)) parameters +static INLINE _glptr_DisableIndexedEXT GET_DisableIndexedEXT(struct _glapi_table *disp) { + return (_glptr_DisableIndexedEXT) (GET_by_offset(disp, _gloffset_DisableIndexedEXT)); +} + +static INLINE void SET_DisableIndexedEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_DisableIndexedEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_EnableIndexedEXT)(GLenum, GLuint); +#define CALL_EnableIndexedEXT(disp, parameters) \ + (* GET_EnableIndexedEXT(disp)) parameters +static INLINE _glptr_EnableIndexedEXT GET_EnableIndexedEXT(struct _glapi_table *disp) { + return (_glptr_EnableIndexedEXT) (GET_by_offset(disp, _gloffset_EnableIndexedEXT)); +} + +static INLINE void SET_EnableIndexedEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_EnableIndexedEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetBooleanIndexedvEXT)(GLenum, GLuint, GLboolean *); +#define CALL_GetBooleanIndexedvEXT(disp, parameters) \ + (* GET_GetBooleanIndexedvEXT(disp)) parameters +static INLINE _glptr_GetBooleanIndexedvEXT GET_GetBooleanIndexedvEXT(struct _glapi_table *disp) { + return (_glptr_GetBooleanIndexedvEXT) (GET_by_offset(disp, _gloffset_GetBooleanIndexedvEXT)); +} + +static INLINE void SET_GetBooleanIndexedvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLboolean *)) { + SET_by_offset(disp, _gloffset_GetBooleanIndexedvEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetIntegerIndexedvEXT)(GLenum, GLuint, GLint *); +#define CALL_GetIntegerIndexedvEXT(disp, parameters) \ + (* GET_GetIntegerIndexedvEXT(disp)) parameters +static INLINE _glptr_GetIntegerIndexedvEXT GET_GetIntegerIndexedvEXT(struct _glapi_table *disp) { + return (_glptr_GetIntegerIndexedvEXT) (GET_by_offset(disp, _gloffset_GetIntegerIndexedvEXT)); +} + +static INLINE void SET_GetIntegerIndexedvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLint *)) { + SET_by_offset(disp, _gloffset_GetIntegerIndexedvEXT, fn); +} + +typedef GLboolean (GLAPIENTRYP _glptr_IsEnabledIndexedEXT)(GLenum, GLuint); +#define CALL_IsEnabledIndexedEXT(disp, parameters) \ + (* GET_IsEnabledIndexedEXT(disp)) parameters +static INLINE _glptr_IsEnabledIndexedEXT GET_IsEnabledIndexedEXT(struct _glapi_table *disp) { + return (_glptr_IsEnabledIndexedEXT) (GET_by_offset(disp, _gloffset_IsEnabledIndexedEXT)); +} + +static INLINE void SET_IsEnabledIndexedEXT(struct _glapi_table *disp, GLboolean (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_IsEnabledIndexedEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_ClearColorIiEXT)(GLint, GLint, GLint, GLint); +#define CALL_ClearColorIiEXT(disp, parameters) \ + (* GET_ClearColorIiEXT(disp)) parameters +static INLINE _glptr_ClearColorIiEXT GET_ClearColorIiEXT(struct _glapi_table *disp) { + return (_glptr_ClearColorIiEXT) (GET_by_offset(disp, _gloffset_ClearColorIiEXT)); +} + +static INLINE void SET_ClearColorIiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLint, GLint, GLint, GLint)) { + SET_by_offset(disp, _gloffset_ClearColorIiEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_ClearColorIuiEXT)(GLuint, GLuint, GLuint, GLuint); +#define CALL_ClearColorIuiEXT(disp, parameters) \ + (* GET_ClearColorIuiEXT(disp)) parameters +static INLINE _glptr_ClearColorIuiEXT GET_ClearColorIuiEXT(struct _glapi_table *disp) { + return (_glptr_ClearColorIuiEXT) (GET_by_offset(disp, _gloffset_ClearColorIuiEXT)); +} + +static INLINE void SET_ClearColorIuiEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_ClearColorIuiEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetTexParameterIivEXT)(GLenum, GLenum, GLint *); +#define CALL_GetTexParameterIivEXT(disp, parameters) \ + (* GET_GetTexParameterIivEXT(disp)) parameters +static INLINE _glptr_GetTexParameterIivEXT GET_GetTexParameterIivEXT(struct _glapi_table *disp) { + return (_glptr_GetTexParameterIivEXT) (GET_by_offset(disp, _gloffset_GetTexParameterIivEXT)); +} + +static INLINE void SET_GetTexParameterIivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetTexParameterIivEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetTexParameterIuivEXT)(GLenum, GLenum, GLuint *); +#define CALL_GetTexParameterIuivEXT(disp, parameters) \ + (* GET_GetTexParameterIuivEXT(disp)) parameters +static INLINE _glptr_GetTexParameterIuivEXT GET_GetTexParameterIuivEXT(struct _glapi_table *disp) { + return (_glptr_GetTexParameterIuivEXT) (GET_by_offset(disp, _gloffset_GetTexParameterIuivEXT)); +} + +static INLINE void SET_GetTexParameterIuivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLuint *)) { + SET_by_offset(disp, _gloffset_GetTexParameterIuivEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexParameterIivEXT)(GLenum, GLenum, const GLint *); +#define CALL_TexParameterIivEXT(disp, parameters) \ + (* GET_TexParameterIivEXT(disp)) parameters +static INLINE _glptr_TexParameterIivEXT GET_TexParameterIivEXT(struct _glapi_table *disp) { + return (_glptr_TexParameterIivEXT) (GET_by_offset(disp, _gloffset_TexParameterIivEXT)); +} + +static INLINE void SET_TexParameterIivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLint *)) { + SET_by_offset(disp, _gloffset_TexParameterIivEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_TexParameterIuivEXT)(GLenum, GLenum, const GLuint *); +#define CALL_TexParameterIuivEXT(disp, parameters) \ + (* GET_TexParameterIuivEXT(disp)) parameters +static INLINE _glptr_TexParameterIuivEXT GET_TexParameterIuivEXT(struct _glapi_table *disp) { + return (_glptr_TexParameterIuivEXT) (GET_by_offset(disp, _gloffset_TexParameterIuivEXT)); +} + +static INLINE void SET_TexParameterIuivEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, const GLuint *)) { + SET_by_offset(disp, _gloffset_TexParameterIuivEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_BeginConditionalRenderNV)(GLuint, GLenum); +#define CALL_BeginConditionalRenderNV(disp, parameters) \ + (* GET_BeginConditionalRenderNV(disp)) parameters +static INLINE _glptr_BeginConditionalRenderNV GET_BeginConditionalRenderNV(struct _glapi_table *disp) { + return (_glptr_BeginConditionalRenderNV) (GET_by_offset(disp, _gloffset_BeginConditionalRenderNV)); +} + +static INLINE void SET_BeginConditionalRenderNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum)) { + SET_by_offset(disp, _gloffset_BeginConditionalRenderNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_EndConditionalRenderNV)(void); +#define CALL_EndConditionalRenderNV(disp, parameters) \ + (* GET_EndConditionalRenderNV(disp)) parameters +static INLINE _glptr_EndConditionalRenderNV GET_EndConditionalRenderNV(struct _glapi_table *disp) { + return (_glptr_EndConditionalRenderNV) (GET_by_offset(disp, _gloffset_EndConditionalRenderNV)); +} + +static INLINE void SET_EndConditionalRenderNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_EndConditionalRenderNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_BeginTransformFeedbackEXT)(GLenum); +#define CALL_BeginTransformFeedbackEXT(disp, parameters) \ + (* GET_BeginTransformFeedbackEXT(disp)) parameters +static INLINE _glptr_BeginTransformFeedbackEXT GET_BeginTransformFeedbackEXT(struct _glapi_table *disp) { + return (_glptr_BeginTransformFeedbackEXT) (GET_by_offset(disp, _gloffset_BeginTransformFeedbackEXT)); +} + +static INLINE void SET_BeginTransformFeedbackEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_BeginTransformFeedbackEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_BindBufferBaseEXT)(GLenum, GLuint, GLuint); +#define CALL_BindBufferBaseEXT(disp, parameters) \ + (* GET_BindBufferBaseEXT(disp)) parameters +static INLINE _glptr_BindBufferBaseEXT GET_BindBufferBaseEXT(struct _glapi_table *disp) { + return (_glptr_BindBufferBaseEXT) (GET_by_offset(disp, _gloffset_BindBufferBaseEXT)); +} + +static INLINE void SET_BindBufferBaseEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint)) { + SET_by_offset(disp, _gloffset_BindBufferBaseEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_BindBufferOffsetEXT)(GLenum, GLuint, GLuint, GLintptr); +#define CALL_BindBufferOffsetEXT(disp, parameters) \ + (* GET_BindBufferOffsetEXT(disp)) parameters +static INLINE _glptr_BindBufferOffsetEXT GET_BindBufferOffsetEXT(struct _glapi_table *disp) { + return (_glptr_BindBufferOffsetEXT) (GET_by_offset(disp, _gloffset_BindBufferOffsetEXT)); +} + +static INLINE void SET_BindBufferOffsetEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLintptr)) { + SET_by_offset(disp, _gloffset_BindBufferOffsetEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_BindBufferRangeEXT)(GLenum, GLuint, GLuint, GLintptr, GLsizeiptr); +#define CALL_BindBufferRangeEXT(disp, parameters) \ + (* GET_BindBufferRangeEXT(disp)) parameters +static INLINE _glptr_BindBufferRangeEXT GET_BindBufferRangeEXT(struct _glapi_table *disp) { + return (_glptr_BindBufferRangeEXT) (GET_by_offset(disp, _gloffset_BindBufferRangeEXT)); +} + +static INLINE void SET_BindBufferRangeEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLintptr, GLsizeiptr)) { + SET_by_offset(disp, _gloffset_BindBufferRangeEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_EndTransformFeedbackEXT)(void); +#define CALL_EndTransformFeedbackEXT(disp, parameters) \ + (* GET_EndTransformFeedbackEXT(disp)) parameters +static INLINE _glptr_EndTransformFeedbackEXT GET_EndTransformFeedbackEXT(struct _glapi_table *disp) { + return (_glptr_EndTransformFeedbackEXT) (GET_by_offset(disp, _gloffset_EndTransformFeedbackEXT)); +} + +static INLINE void SET_EndTransformFeedbackEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_EndTransformFeedbackEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetTransformFeedbackVaryingEXT)(GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *); +#define CALL_GetTransformFeedbackVaryingEXT(disp, parameters) \ + (* GET_GetTransformFeedbackVaryingEXT(disp)) parameters +static INLINE _glptr_GetTransformFeedbackVaryingEXT GET_GetTransformFeedbackVaryingEXT(struct _glapi_table *disp) { + return (_glptr_GetTransformFeedbackVaryingEXT) (GET_by_offset(disp, _gloffset_GetTransformFeedbackVaryingEXT)); +} + +static INLINE void SET_GetTransformFeedbackVaryingEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLuint, GLsizei, GLsizei *, GLsizei *, GLenum *, GLchar *)) { + SET_by_offset(disp, _gloffset_GetTransformFeedbackVaryingEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_TransformFeedbackVaryingsEXT)(GLuint, GLsizei, const char **, GLenum); +#define CALL_TransformFeedbackVaryingsEXT(disp, parameters) \ + (* GET_TransformFeedbackVaryingsEXT(disp)) parameters +static INLINE _glptr_TransformFeedbackVaryingsEXT GET_TransformFeedbackVaryingsEXT(struct _glapi_table *disp) { + return (_glptr_TransformFeedbackVaryingsEXT) (GET_by_offset(disp, _gloffset_TransformFeedbackVaryingsEXT)); +} + +static INLINE void SET_TransformFeedbackVaryingsEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLsizei, const char **, GLenum)) { + SET_by_offset(disp, _gloffset_TransformFeedbackVaryingsEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_ProvokingVertexEXT)(GLenum); +#define CALL_ProvokingVertexEXT(disp, parameters) \ + (* GET_ProvokingVertexEXT(disp)) parameters +static INLINE _glptr_ProvokingVertexEXT GET_ProvokingVertexEXT(struct _glapi_table *disp) { + return (_glptr_ProvokingVertexEXT) (GET_by_offset(disp, _gloffset_ProvokingVertexEXT)); +} + +static INLINE void SET_ProvokingVertexEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum)) { + SET_by_offset(disp, _gloffset_ProvokingVertexEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetTexParameterPointervAPPLE)(GLenum, GLenum, GLvoid **); +#define CALL_GetTexParameterPointervAPPLE(disp, parameters) \ + (* GET_GetTexParameterPointervAPPLE(disp)) parameters +static INLINE _glptr_GetTexParameterPointervAPPLE GET_GetTexParameterPointervAPPLE(struct _glapi_table *disp) { + return (_glptr_GetTexParameterPointervAPPLE) (GET_by_offset(disp, _gloffset_GetTexParameterPointervAPPLE)); +} + +static INLINE void SET_GetTexParameterPointervAPPLE(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLvoid **)) { + SET_by_offset(disp, _gloffset_GetTexParameterPointervAPPLE, fn); +} + +typedef void (GLAPIENTRYP _glptr_TextureRangeAPPLE)(GLenum, GLsizei, GLvoid *); +#define CALL_TextureRangeAPPLE(disp, parameters) \ + (* GET_TextureRangeAPPLE(disp)) parameters +static INLINE _glptr_TextureRangeAPPLE GET_TextureRangeAPPLE(struct _glapi_table *disp) { + return (_glptr_TextureRangeAPPLE) (GET_by_offset(disp, _gloffset_TextureRangeAPPLE)); +} + +static INLINE void SET_TextureRangeAPPLE(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLvoid *)) { + SET_by_offset(disp, _gloffset_TextureRangeAPPLE, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetObjectParameterivAPPLE)(GLenum, GLuint, GLenum, GLint *); +#define CALL_GetObjectParameterivAPPLE(disp, parameters) \ + (* GET_GetObjectParameterivAPPLE(disp)) parameters +static INLINE _glptr_GetObjectParameterivAPPLE GET_GetObjectParameterivAPPLE(struct _glapi_table *disp) { + return (_glptr_GetObjectParameterivAPPLE) (GET_by_offset(disp, _gloffset_GetObjectParameterivAPPLE)); +} + +static INLINE void SET_GetObjectParameterivAPPLE(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLenum, GLint *)) { + SET_by_offset(disp, _gloffset_GetObjectParameterivAPPLE, fn); +} + +typedef GLenum (GLAPIENTRYP _glptr_ObjectPurgeableAPPLE)(GLenum, GLuint, GLenum); +#define CALL_ObjectPurgeableAPPLE(disp, parameters) \ + (* GET_ObjectPurgeableAPPLE(disp)) parameters +static INLINE _glptr_ObjectPurgeableAPPLE GET_ObjectPurgeableAPPLE(struct _glapi_table *disp) { + return (_glptr_ObjectPurgeableAPPLE) (GET_by_offset(disp, _gloffset_ObjectPurgeableAPPLE)); +} + +static INLINE void SET_ObjectPurgeableAPPLE(struct _glapi_table *disp, GLenum (GLAPIENTRYP fn)(GLenum, GLuint, GLenum)) { + SET_by_offset(disp, _gloffset_ObjectPurgeableAPPLE, fn); +} + +typedef GLenum (GLAPIENTRYP _glptr_ObjectUnpurgeableAPPLE)(GLenum, GLuint, GLenum); +#define CALL_ObjectUnpurgeableAPPLE(disp, parameters) \ + (* GET_ObjectUnpurgeableAPPLE(disp)) parameters +static INLINE _glptr_ObjectUnpurgeableAPPLE GET_ObjectUnpurgeableAPPLE(struct _glapi_table *disp) { + return (_glptr_ObjectUnpurgeableAPPLE) (GET_by_offset(disp, _gloffset_ObjectUnpurgeableAPPLE)); +} + +static INLINE void SET_ObjectUnpurgeableAPPLE(struct _glapi_table *disp, GLenum (GLAPIENTRYP fn)(GLenum, GLuint, GLenum)) { + SET_by_offset(disp, _gloffset_ObjectUnpurgeableAPPLE, fn); +} + +typedef void (GLAPIENTRYP _glptr_ActiveProgramEXT)(GLuint); +#define CALL_ActiveProgramEXT(disp, parameters) \ + (* GET_ActiveProgramEXT(disp)) parameters +static INLINE _glptr_ActiveProgramEXT GET_ActiveProgramEXT(struct _glapi_table *disp) { + return (_glptr_ActiveProgramEXT) (GET_by_offset(disp, _gloffset_ActiveProgramEXT)); +} + +static INLINE void SET_ActiveProgramEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint)) { + SET_by_offset(disp, _gloffset_ActiveProgramEXT, fn); +} + +typedef GLuint (GLAPIENTRYP _glptr_CreateShaderProgramEXT)(GLenum, const GLchar *); +#define CALL_CreateShaderProgramEXT(disp, parameters) \ + (* GET_CreateShaderProgramEXT(disp)) parameters +static INLINE _glptr_CreateShaderProgramEXT GET_CreateShaderProgramEXT(struct _glapi_table *disp) { + return (_glptr_CreateShaderProgramEXT) (GET_by_offset(disp, _gloffset_CreateShaderProgramEXT)); +} + +static INLINE void SET_CreateShaderProgramEXT(struct _glapi_table *disp, GLuint (GLAPIENTRYP fn)(GLenum, const GLchar *)) { + SET_by_offset(disp, _gloffset_CreateShaderProgramEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_UseShaderProgramEXT)(GLenum, GLuint); +#define CALL_UseShaderProgramEXT(disp, parameters) \ + (* GET_UseShaderProgramEXT(disp)) parameters +static INLINE _glptr_UseShaderProgramEXT GET_UseShaderProgramEXT(struct _glapi_table *disp) { + return (_glptr_UseShaderProgramEXT) (GET_by_offset(disp, _gloffset_UseShaderProgramEXT)); +} + +static INLINE void SET_UseShaderProgramEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint)) { + SET_by_offset(disp, _gloffset_UseShaderProgramEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_TextureBarrierNV)(void); +#define CALL_TextureBarrierNV(disp, parameters) \ + (* GET_TextureBarrierNV(disp)) parameters +static INLINE _glptr_TextureBarrierNV GET_TextureBarrierNV(struct _glapi_table *disp) { + return (_glptr_TextureBarrierNV) (GET_by_offset(disp, _gloffset_TextureBarrierNV)); +} + +static INLINE void SET_TextureBarrierNV(struct _glapi_table *disp, void (GLAPIENTRYP fn)(void)) { + SET_by_offset(disp, _gloffset_TextureBarrierNV, fn); +} + +typedef void (GLAPIENTRYP _glptr_StencilFuncSeparateATI)(GLenum, GLenum, GLint, GLuint); +#define CALL_StencilFuncSeparateATI(disp, parameters) \ + (* GET_StencilFuncSeparateATI(disp)) parameters +static INLINE _glptr_StencilFuncSeparateATI GET_StencilFuncSeparateATI(struct _glapi_table *disp) { + return (_glptr_StencilFuncSeparateATI) (GET_by_offset(disp, _gloffset_StencilFuncSeparateATI)); +} + +static INLINE void SET_StencilFuncSeparateATI(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLenum, GLint, GLuint)) { + SET_by_offset(disp, _gloffset_StencilFuncSeparateATI, fn); +} + +typedef void (GLAPIENTRYP _glptr_ProgramEnvParameters4fvEXT)(GLenum, GLuint, GLsizei, const GLfloat *); +#define CALL_ProgramEnvParameters4fvEXT(disp, parameters) \ + (* GET_ProgramEnvParameters4fvEXT(disp)) parameters +static INLINE _glptr_ProgramEnvParameters4fvEXT GET_ProgramEnvParameters4fvEXT(struct _glapi_table *disp) { + return (_glptr_ProgramEnvParameters4fvEXT) (GET_by_offset(disp, _gloffset_ProgramEnvParameters4fvEXT)); +} + +static INLINE void SET_ProgramEnvParameters4fvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_ProgramEnvParameters4fvEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_ProgramLocalParameters4fvEXT)(GLenum, GLuint, GLsizei, const GLfloat *); +#define CALL_ProgramLocalParameters4fvEXT(disp, parameters) \ + (* GET_ProgramLocalParameters4fvEXT(disp)) parameters +static INLINE _glptr_ProgramLocalParameters4fvEXT GET_ProgramLocalParameters4fvEXT(struct _glapi_table *disp) { + return (_glptr_ProgramLocalParameters4fvEXT) (GET_by_offset(disp, _gloffset_ProgramLocalParameters4fvEXT)); +} + +static INLINE void SET_ProgramLocalParameters4fvEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLsizei, const GLfloat *)) { + SET_by_offset(disp, _gloffset_ProgramLocalParameters4fvEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetQueryObjecti64vEXT)(GLuint, GLenum, GLint64EXT *); +#define CALL_GetQueryObjecti64vEXT(disp, parameters) \ + (* GET_GetQueryObjecti64vEXT(disp)) parameters +static INLINE _glptr_GetQueryObjecti64vEXT GET_GetQueryObjecti64vEXT(struct _glapi_table *disp) { + return (_glptr_GetQueryObjecti64vEXT) (GET_by_offset(disp, _gloffset_GetQueryObjecti64vEXT)); +} + +static INLINE void SET_GetQueryObjecti64vEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLint64EXT *)) { + SET_by_offset(disp, _gloffset_GetQueryObjecti64vEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_GetQueryObjectui64vEXT)(GLuint, GLenum, GLuint64EXT *); +#define CALL_GetQueryObjectui64vEXT(disp, parameters) \ + (* GET_GetQueryObjectui64vEXT(disp)) parameters +static INLINE _glptr_GetQueryObjectui64vEXT GET_GetQueryObjectui64vEXT(struct _glapi_table *disp) { + return (_glptr_GetQueryObjectui64vEXT) (GET_by_offset(disp, _gloffset_GetQueryObjectui64vEXT)); +} + +static INLINE void SET_GetQueryObjectui64vEXT(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLuint, GLenum, GLuint64EXT *)) { + SET_by_offset(disp, _gloffset_GetQueryObjectui64vEXT, fn); +} + +typedef void (GLAPIENTRYP _glptr_EGLImageTargetRenderbufferStorageOES)(GLenum, GLvoid *); +#define CALL_EGLImageTargetRenderbufferStorageOES(disp, parameters) \ + (* GET_EGLImageTargetRenderbufferStorageOES(disp)) parameters +static INLINE _glptr_EGLImageTargetRenderbufferStorageOES GET_EGLImageTargetRenderbufferStorageOES(struct _glapi_table *disp) { + return (_glptr_EGLImageTargetRenderbufferStorageOES) (GET_by_offset(disp, _gloffset_EGLImageTargetRenderbufferStorageOES)); +} + +static INLINE void SET_EGLImageTargetRenderbufferStorageOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLvoid *)) { + SET_by_offset(disp, _gloffset_EGLImageTargetRenderbufferStorageOES, fn); +} + +typedef void (GLAPIENTRYP _glptr_EGLImageTargetTexture2DOES)(GLenum, GLvoid *); +#define CALL_EGLImageTargetTexture2DOES(disp, parameters) \ + (* GET_EGLImageTargetTexture2DOES(disp)) parameters +static INLINE _glptr_EGLImageTargetTexture2DOES GET_EGLImageTargetTexture2DOES(struct _glapi_table *disp) { + return (_glptr_EGLImageTargetTexture2DOES) (GET_by_offset(disp, _gloffset_EGLImageTargetTexture2DOES)); +} + +static INLINE void SET_EGLImageTargetTexture2DOES(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLvoid *)) { + SET_by_offset(disp, _gloffset_EGLImageTargetTexture2DOES, fn); +} + + +#endif /* !defined( _GLAPI_DISPATCH_H_ ) */ diff --git a/mesalib/src/mesa/main/texgetimage.c b/mesalib/src/mesa/main/texgetimage.c index 467baa20a..6060e5b3d 100644 --- a/mesalib/src/mesa/main/texgetimage.c +++ b/mesalib/src/mesa/main/texgetimage.c @@ -1,948 +1,951 @@ -/* - * Mesa 3-D graphics library - * Version: 7.7 - * - * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. - * Copyright (c) 2009 VMware, Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/** - * Code for glGetTexImage() and glGetCompressedTexImage(). - */ - - -#include "glheader.h" -#include "bufferobj.h" -#include "enums.h" -#include "context.h" -#include "formats.h" -#include "image.h" -#include "mfeatures.h" -#include "mtypes.h" -#include "pack.h" -#include "pbo.h" -#include "texgetimage.h" -#include "teximage.h" - - - -/** - * Can the given type represent negative values? - */ -static INLINE GLboolean -type_with_negative_values(GLenum type) -{ - switch (type) { - case GL_BYTE: - case GL_SHORT: - case GL_INT: - case GL_FLOAT: - case GL_HALF_FLOAT_ARB: - return GL_TRUE; - default: - return GL_FALSE; - } -} - - -/** - * glGetTexImage for color index pixels. - */ -static void -get_tex_color_index(struct gl_context *ctx, GLuint dimensions, - GLenum format, GLenum type, GLvoid *pixels, - const struct gl_texture_image *texImage) -{ - const GLint width = texImage->Width; - const GLint height = texImage->Height; - const GLint depth = texImage->Depth; - const GLint rowstride = texImage->RowStride; - const GLuint indexBits = - _mesa_get_format_bits(texImage->TexFormat, GL_TEXTURE_INDEX_SIZE_EXT); - const GLbitfield transferOps = 0x0; - GLint img, row, col; - - for (img = 0; img < depth; img++) { - for (row = 0; row < height; row++) { - GLuint indexRow[MAX_WIDTH] = { 0 }; - void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels, - width, height, format, type, - img, row, 0); - assert(dest); - - if (indexBits == 8) { - const GLubyte *src = (const GLubyte *) texImage->Data; - src += rowstride * (img * height + row); - for (col = 0; col < width; col++) { - indexRow[col] = src[col]; - } - } - else if (indexBits == 16) { - const GLushort *src = (const GLushort *) texImage->Data; - src += rowstride * (img * height + row); - for (col = 0; col < width; col++) { - indexRow[col] = src[col]; - } - } - else { - _mesa_problem(ctx, "Color index problem in _mesa_GetTexImage"); - } - _mesa_pack_index_span(ctx, width, type, dest, - indexRow, &ctx->Pack, transferOps); - } - } -} - - -/** - * glGetTexImage for depth/Z pixels. - */ -static void -get_tex_depth(struct gl_context *ctx, GLuint dimensions, - GLenum format, GLenum type, GLvoid *pixels, - const struct gl_texture_image *texImage) -{ - const GLint width = texImage->Width; - const GLint height = texImage->Height; - const GLint depth = texImage->Depth; - GLint img, row, col; - GLfloat *depthRow = (GLfloat *) malloc(width * sizeof(GLfloat)); - - if (!depthRow) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGetTexImage"); - return; - } - - for (img = 0; img < depth; img++) { - for (row = 0; row < height; row++) { - void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels, - width, height, format, type, - img, row, 0); - assert(dest); - - for (col = 0; col < width; col++) { - texImage->FetchTexelf(texImage, col, row, img, depthRow + col); - } - _mesa_pack_depth_span(ctx, width, dest, type, depthRow, &ctx->Pack); - } - } - - free(depthRow); -} - - -/** - * glGetTexImage for depth/stencil pixels. - */ -static void -get_tex_depth_stencil(struct gl_context *ctx, GLuint dimensions, - GLenum format, GLenum type, GLvoid *pixels, - const struct gl_texture_image *texImage) -{ - const GLint width = texImage->Width; - const GLint height = texImage->Height; - const GLint depth = texImage->Depth; - const GLint rowstride = texImage->RowStride; - const GLuint *src = (const GLuint *) texImage->Data; - GLint img, row; - - for (img = 0; img < depth; img++) { - for (row = 0; row < height; row++) { - void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels, - width, height, format, type, - img, row, 0); - memcpy(dest, src, width * sizeof(GLuint)); - if (ctx->Pack.SwapBytes) { - _mesa_swap4((GLuint *) dest, width); - } - - src += rowstride; - } - } -} - - -/** - * glGetTexImage for YCbCr pixels. - */ -static void -get_tex_ycbcr(struct gl_context *ctx, GLuint dimensions, - GLenum format, GLenum type, GLvoid *pixels, - const struct gl_texture_image *texImage) -{ - const GLint width = texImage->Width; - const GLint height = texImage->Height; - const GLint depth = texImage->Depth; - const GLint rowstride = texImage->RowStride; - const GLushort *src = (const GLushort *) texImage->Data; - GLint img, row; - - for (img = 0; img < depth; img++) { - for (row = 0; row < height; row++) { - void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels, - width, height, format, type, - img, row, 0); - memcpy(dest, src, width * sizeof(GLushort)); - - /* check for byte swapping */ - if ((texImage->TexFormat == MESA_FORMAT_YCBCR - && type == GL_UNSIGNED_SHORT_8_8_REV_MESA) || - (texImage->TexFormat == MESA_FORMAT_YCBCR_REV - && type == GL_UNSIGNED_SHORT_8_8_MESA)) { - if (!ctx->Pack.SwapBytes) - _mesa_swap2((GLushort *) dest, width); - } - else if (ctx->Pack.SwapBytes) { - _mesa_swap2((GLushort *) dest, width); - } - - src += rowstride; - } - } -} - - -#if FEATURE_EXT_texture_sRGB - - -/** - * Convert a float value from linear space to a - * non-linear sRGB value in [0, 255]. - * Not terribly efficient. - */ -static INLINE GLfloat -linear_to_nonlinear(GLfloat cl) -{ - /* can't have values outside [0, 1] */ - GLfloat cs; - if (cl < 0.0031308f) { - cs = 12.92f * cl; - } - else { - cs = (GLfloat)(1.055 * pow(cl, 0.41666) - 0.055); - } - return cs; -} - - -/** - * glGetTexImagefor sRGB pixels; - */ -static void -get_tex_srgb(struct gl_context *ctx, GLuint dimensions, - GLenum format, GLenum type, GLvoid *pixels, - const struct gl_texture_image *texImage) -{ - const GLint width = texImage->Width; - const GLint height = texImage->Height; - const GLint depth = texImage->Depth; - const GLbitfield transferOps = 0x0; - GLint img, row; - GLfloat (*rgba)[4] = (GLfloat (*)[4]) malloc(4 * width * sizeof(GLfloat)); - - if (!rgba) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGetTexImage"); - return; - } - - for (img = 0; img < depth; img++) { - for (row = 0; row < height; row++) { - void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels, - width, height, format, type, - img, row, 0); - - GLint col; - - /* convert row to RGBA format */ - for (col = 0; col < width; col++) { - texImage->FetchTexelf(texImage, col, row, img, rgba[col]); - if (texImage->_BaseFormat == GL_LUMINANCE) { - rgba[col][RCOMP] = linear_to_nonlinear(rgba[col][RCOMP]); - rgba[col][GCOMP] = 0.0; - rgba[col][BCOMP] = 0.0; - } - else if (texImage->_BaseFormat == GL_LUMINANCE_ALPHA) { - rgba[col][RCOMP] = linear_to_nonlinear(rgba[col][RCOMP]); - rgba[col][GCOMP] = 0.0; - rgba[col][BCOMP] = 0.0; - } - else if (texImage->_BaseFormat == GL_RGB || - texImage->_BaseFormat == GL_RGBA) { - rgba[col][RCOMP] = linear_to_nonlinear(rgba[col][RCOMP]); - rgba[col][GCOMP] = linear_to_nonlinear(rgba[col][GCOMP]); - rgba[col][BCOMP] = linear_to_nonlinear(rgba[col][BCOMP]); - } - } - _mesa_pack_rgba_span_float(ctx, width, (GLfloat (*)[4]) rgba, - format, type, dest, - &ctx->Pack, transferOps); - } - } - - free(rgba); -} - - -#else /* FEATURE_EXT_texture_sRGB */ - - -static INLINE void -get_tex_srgb(struct gl_context *ctx, GLuint dimensions, - GLenum format, GLenum type, GLvoid *pixels, - const struct gl_texture_image *texImage) -{ - ASSERT_NO_FEATURE(); -} - - -#endif /* FEATURE_EXT_texture_sRGB */ - - -/** - * glGetTexImagefor RGBA, Luminance, etc. pixels. - * This is the slow way since we use texture sampling. - */ -static void -get_tex_rgba(struct gl_context *ctx, GLuint dimensions, - GLenum format, GLenum type, GLvoid *pixels, - const struct gl_texture_image *texImage) -{ - const GLint width = texImage->Width; - const GLint height = texImage->Height; - const GLint depth = texImage->Depth; - /* Normally, no pixel transfer ops are performed during glGetTexImage. - * The only possible exception is component clamping to [0,1]. - */ - GLbitfield transferOps = 0x0; - GLint img, row; - GLfloat (*rgba)[4] = (GLfloat (*)[4]) malloc(4 * width * sizeof(GLfloat)); - - if (!rgba) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGetTexImage"); - return; - } - - for (img = 0; img < depth; img++) { - for (row = 0; row < height; row++) { - void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels, - width, height, format, type, - img, row, 0); - GLint col; - GLenum dataType = _mesa_get_format_datatype(texImage->TexFormat); - - /* clamp does not apply to GetTexImage (final conversion)? - * Looks like we need clamp though when going from format - * containing negative values to unsigned format. - */ - if (format == GL_LUMINANCE || format == GL_LUMINANCE_ALPHA) { - transferOps |= IMAGE_CLAMP_BIT; - } - else if (!type_with_negative_values(type) && - (dataType == GL_FLOAT || - dataType == GL_SIGNED_NORMALIZED)) { - transferOps |= IMAGE_CLAMP_BIT; - } - - for (col = 0; col < width; col++) { - texImage->FetchTexelf(texImage, col, row, img, rgba[col]); - if (texImage->_BaseFormat == GL_ALPHA) { - rgba[col][RCOMP] = 0.0F; - rgba[col][GCOMP] = 0.0F; - rgba[col][BCOMP] = 0.0F; - } - else if (texImage->_BaseFormat == GL_LUMINANCE) { - rgba[col][GCOMP] = 0.0F; - rgba[col][BCOMP] = 0.0F; - rgba[col][ACOMP] = 1.0F; - } - else if (texImage->_BaseFormat == GL_LUMINANCE_ALPHA) { - rgba[col][GCOMP] = 0.0F; - rgba[col][BCOMP] = 0.0F; - } - else if (texImage->_BaseFormat == GL_INTENSITY) { - rgba[col][GCOMP] = 0.0F; - rgba[col][BCOMP] = 0.0F; - rgba[col][ACOMP] = 1.0F; - } - } - _mesa_pack_rgba_span_float(ctx, width, (GLfloat (*)[4]) rgba, - format, type, dest, - &ctx->Pack, transferOps); - } - } - - free(rgba); -} - - -/** - * Try to do glGetTexImage() with simple memcpy(). - * \return GL_TRUE if done, GL_FALSE otherwise - */ -static GLboolean -get_tex_memcpy(struct gl_context *ctx, GLenum format, GLenum type, GLvoid *pixels, - const struct gl_texture_object *texObj, - const struct gl_texture_image *texImage) -{ - GLboolean memCopy = GL_FALSE; - - /* Texture image should have been mapped already */ - assert(texImage->Data); - - /* - * Check if the src/dst formats are compatible. - * Also note that GL's pixel transfer ops don't apply to glGetTexImage() - * so we don't have to worry about those. - * XXX more format combinations could be supported here. - */ - if ((texObj->Target == GL_TEXTURE_1D || - texObj->Target == GL_TEXTURE_2D || - texObj->Target == GL_TEXTURE_RECTANGLE || - (texObj->Target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X && - texObj->Target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z))) { - if (texImage->TexFormat == MESA_FORMAT_ARGB8888 && - format == GL_BGRA && - type == GL_UNSIGNED_BYTE && - !ctx->Pack.SwapBytes && - _mesa_little_endian()) { - memCopy = GL_TRUE; - } - else if (texImage->TexFormat == MESA_FORMAT_AL88 && - format == GL_LUMINANCE_ALPHA && - type == GL_UNSIGNED_BYTE && - !ctx->Pack.SwapBytes && - _mesa_little_endian()) { - memCopy = GL_TRUE; - } - else if (texImage->TexFormat == MESA_FORMAT_L8 && - format == GL_LUMINANCE && - type == GL_UNSIGNED_BYTE) { - memCopy = GL_TRUE; - } - else if (texImage->TexFormat == MESA_FORMAT_L16 && - format == GL_LUMINANCE && - type == GL_UNSIGNED_SHORT) { - memCopy = GL_TRUE; - } - else if (texImage->TexFormat == MESA_FORMAT_A8 && - format == GL_ALPHA && - type == GL_UNSIGNED_BYTE) { - memCopy = GL_TRUE; - } - else if (texImage->TexFormat == MESA_FORMAT_A16 && - format == GL_ALPHA && - type == GL_UNSIGNED_SHORT) { - memCopy = GL_TRUE; - } - } - - if (memCopy) { - const GLuint bpp = _mesa_get_format_bytes(texImage->TexFormat); - const GLuint bytesPerRow = texImage->Width * bpp; - GLubyte *dst = - _mesa_image_address2d(&ctx->Pack, pixels, texImage->Width, - texImage->Height, format, type, 0, 0); - const GLint dstRowStride = - _mesa_image_row_stride(&ctx->Pack, texImage->Width, format, type); - const GLubyte *src = texImage->Data; - const GLint srcRowStride = texImage->RowStride * bpp; - GLuint row; - - if (bytesPerRow == dstRowStride && bytesPerRow == srcRowStride) { - memcpy(dst, src, bytesPerRow * texImage->Height); - } - else { - for (row = 0; row < texImage->Height; row++) { - memcpy(dst, src, bytesPerRow); - dst += dstRowStride; - src += srcRowStride; - } - } - } - - return memCopy; -} - - -/** - * This is the software fallback for Driver.GetTexImage(). - * All error checking will have been done before this routine is called. - * The texture image must be mapped. - */ -void -_mesa_get_teximage(struct gl_context *ctx, GLenum target, GLint level, - GLenum format, GLenum type, GLvoid *pixels, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - GLuint dimensions; - - /* If we get here, the texture image should be mapped */ - assert(texImage->Data); - - switch (target) { - case GL_TEXTURE_1D: - dimensions = 1; - break; - case GL_TEXTURE_3D: - dimensions = 3; - break; - default: - dimensions = 2; - } - - if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { - /* Packing texture image into a PBO. - * Map the (potentially) VRAM-based buffer into our process space so - * we can write into it with the code below. - * A hardware driver might use a sophisticated blit to move the - * texture data to the PBO if the PBO is in VRAM along with the texture. - */ - GLubyte *buf = (GLubyte *) - ctx->Driver.MapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT, - GL_WRITE_ONLY_ARB, ctx->Pack.BufferObj); - if (!buf) { - /* out of memory or other unexpected error */ - _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGetTexImage(map PBO failed)"); - return; - } - /* was an offset into the PBO. - * Now make it a real, client-side pointer inside the mapped region. - */ - pixels = ADD_POINTERS(buf, pixels); - } - - if (get_tex_memcpy(ctx, format, type, pixels, texObj, texImage)) { - /* all done */ - } - else if (format == GL_COLOR_INDEX) { - get_tex_color_index(ctx, dimensions, format, type, pixels, texImage); - } - else if (format == GL_DEPTH_COMPONENT) { - get_tex_depth(ctx, dimensions, format, type, pixels, texImage); - } - else if (format == GL_DEPTH_STENCIL_EXT) { - get_tex_depth_stencil(ctx, dimensions, format, type, pixels, texImage); - } - else if (format == GL_YCBCR_MESA) { - get_tex_ycbcr(ctx, dimensions, format, type, pixels, texImage); - } - else if (_mesa_get_format_color_encoding(texImage->TexFormat) == GL_SRGB) { - get_tex_srgb(ctx, dimensions, format, type, pixels, texImage); - } - else { - get_tex_rgba(ctx, dimensions, format, type, pixels, texImage); - } - - if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { - ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT, - ctx->Pack.BufferObj); - } -} - - - -/** - * This is the software fallback for Driver.GetCompressedTexImage(). - * All error checking will have been done before this routine is called. - */ -void -_mesa_get_compressed_teximage(struct gl_context *ctx, GLenum target, GLint level, - GLvoid *img, - struct gl_texture_object *texObj, - struct gl_texture_image *texImage) -{ - const GLuint row_stride = _mesa_format_row_stride(texImage->TexFormat, - texImage->Width); - const GLuint row_stride_stored = _mesa_format_row_stride(texImage->TexFormat, - texImage->RowStride); - GLuint i; - - if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { - /* pack texture image into a PBO */ - GLubyte *buf = (GLubyte *) - ctx->Driver.MapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT, - GL_WRITE_ONLY_ARB, ctx->Pack.BufferObj); - if (!buf) { - /* out of memory or other unexpected error */ - _mesa_error(ctx, GL_OUT_OF_MEMORY, - "glGetCompresssedTexImage(map PBO failed)"); - return; - } - img = ADD_POINTERS(buf, img); - } - - /* no pixelstore or pixel transfer, but respect stride */ - - if (row_stride == row_stride_stored) { - const GLuint size = _mesa_format_image_size(texImage->TexFormat, - texImage->Width, - texImage->Height, - texImage->Depth); - memcpy(img, texImage->Data, size); - } - else { - GLuint bw, bh; - _mesa_get_format_block_size(texImage->TexFormat, &bw, &bh); - for (i = 0; i < (texImage->Height + bh - 1) / bh; i++) { - memcpy((GLubyte *)img + i * row_stride, - (GLubyte *)texImage->Data + i * row_stride_stored, - row_stride); - } - } - - if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { - ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT, - ctx->Pack.BufferObj); - } -} - - - -/** - * Do error checking for a glGetTexImage() call. - * \return GL_TRUE if any error, GL_FALSE if no errors. - */ -static GLboolean -getteximage_error_check(struct gl_context *ctx, GLenum target, GLint level, - GLenum format, GLenum type, GLsizei clientMemSize, - GLvoid *pixels ) -{ - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - const GLint maxLevels = _mesa_max_texture_levels(ctx, target); - const GLuint dimensions = (target == GL_TEXTURE_3D) ? 3 : 2; - GLenum baseFormat; - - if (maxLevels == 0) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(target=0x%x)", target); - return GL_TRUE; - } - - if (level < 0 || level >= maxLevels) { - _mesa_error( ctx, GL_INVALID_VALUE, "glGetTexImage(level)" ); - return GL_TRUE; - } - - if (_mesa_sizeof_packed_type(type) <= 0) { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexImage(type)" ); - return GL_TRUE; - } - - if (_mesa_components_in_format(format) <= 0 || - format == GL_STENCIL_INDEX) { - _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexImage(format)" ); - return GL_TRUE; - } - - if (!ctx->Extensions.EXT_paletted_texture && _mesa_is_index_format(format)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); - return GL_TRUE; - } - - if (!ctx->Extensions.ARB_depth_texture && _mesa_is_depth_format(format)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); - return GL_TRUE; - } - - if (!ctx->Extensions.MESA_ycbcr_texture && _mesa_is_ycbcr_format(format)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); - return GL_TRUE; - } - - if (!ctx->Extensions.EXT_packed_depth_stencil - && _mesa_is_depthstencil_format(format)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); - return GL_TRUE; - } - - if (!ctx->Extensions.ATI_envmap_bumpmap - && _mesa_is_dudv_format(format)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); - return GL_TRUE; - } - - texObj = _mesa_get_current_tex_object(ctx, target); - - if (!texObj || _mesa_is_proxy_texture(target)) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(target)"); - return GL_TRUE; - } - - texImage = _mesa_select_tex_image(ctx, texObj, target, level); - if (!texImage) { - /* out of memory */ - return GL_TRUE; - } - - baseFormat = _mesa_get_format_base_format(texImage->TexFormat); - - /* Make sure the requested image format is compatible with the - * texture's format. Note that a color index texture can be converted - * to RGBA so that combo is allowed. - */ - if (_mesa_is_color_format(format) - && !_mesa_is_color_format(baseFormat) - && !_mesa_is_index_format(baseFormat)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)"); - return GL_TRUE; - } - else if (_mesa_is_index_format(format) - && !_mesa_is_index_format(baseFormat)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)"); - return GL_TRUE; - } - else if (_mesa_is_depth_format(format) - && !_mesa_is_depth_format(baseFormat) - && !_mesa_is_depthstencil_format(baseFormat)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)"); - return GL_TRUE; - } - else if (_mesa_is_ycbcr_format(format) - && !_mesa_is_ycbcr_format(baseFormat)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)"); - return GL_TRUE; - } - else if (_mesa_is_depthstencil_format(format) - && !_mesa_is_depthstencil_format(baseFormat)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)"); - return GL_TRUE; - } - else if (_mesa_is_dudv_format(format) - && !_mesa_is_dudv_format(baseFormat)) { - _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)"); - return GL_TRUE; - } - - if (!_mesa_validate_pbo_access(dimensions, &ctx->Pack, texImage->Width, - texImage->Height, texImage->Depth, - format, type, clientMemSize, pixels)) { - if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetTexImage(out of bounds PBO access)"); - } else { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetnTexImageARB(out of bounds access:" - " bufSize (%d) is too small)", clientMemSize); - } - return GL_TRUE; - } - - if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { - /* PBO should not be mapped */ - if (_mesa_bufferobj_mapped(ctx->Pack.BufferObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetTexImage(PBO is mapped)"); - return GL_TRUE; - } - } - - return GL_FALSE; -} - - - -/** - * Get texture image. Called by glGetTexImage. - * - * \param target texture target. - * \param level image level. - * \param format pixel data format for returned image. - * \param type pixel data type for returned image. - * \param bufSize size of the pixels data buffer. - * \param pixels returned pixel data. - */ -void GLAPIENTRY -_mesa_GetnTexImageARB( GLenum target, GLint level, GLenum format, - GLenum type, GLsizei bufSize, GLvoid *pixels ) -{ - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (getteximage_error_check(ctx, target, level, format, type, - bufSize, pixels)) { - return; - } - - if (!_mesa_is_bufferobj(ctx->Pack.BufferObj) && !pixels) { - /* not an error, do nothing */ - return; - } - - texObj = _mesa_get_current_tex_object(ctx, target); - texImage = _mesa_select_tex_image(ctx, texObj, target, level); - - if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE)) { - _mesa_debug(ctx, "glGetTexImage(tex %u) format = %s, w=%d, h=%d," - " dstFmt=0x%x, dstType=0x%x\n", - texObj->Name, - _mesa_get_format_name(texImage->TexFormat), - texImage->Width, texImage->Height, - format, type); - } - - _mesa_lock_texture(ctx, texObj); - { - ctx->Driver.GetTexImage(ctx, target, level, format, type, pixels, - texObj, texImage); - } - _mesa_unlock_texture(ctx, texObj); -} - - -void GLAPIENTRY -_mesa_GetTexImage( GLenum target, GLint level, GLenum format, - GLenum type, GLvoid *pixels ) -{ - _mesa_GetnTexImageARB(target, level, format, type, INT_MAX, pixels); -} - - -/** - * Do error checking for a glGetCompressedTexImage() call. - * \return GL_TRUE if any error, GL_FALSE if no errors. - */ -static GLboolean -getcompressedteximage_error_check(struct gl_context *ctx, GLenum target, - GLint level, GLsizei clientMemSize, GLvoid *img) -{ - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - const GLint maxLevels = _mesa_max_texture_levels(ctx, target); - GLuint compressedSize; - - if (maxLevels == 0) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetCompressedTexImage(target=0x%x)", - target); - return GL_TRUE; - } - - if (level < 0 || level >= maxLevels) { - _mesa_error(ctx, GL_INVALID_VALUE, - "glGetCompressedTexImageARB(bad level = %d)", level); - return GL_TRUE; - } - - if (_mesa_is_proxy_texture(target)) { - _mesa_error(ctx, GL_INVALID_ENUM, - "glGetCompressedTexImageARB(bad target = %s)", - _mesa_lookup_enum_by_nr(target)); - return GL_TRUE; - } - - texObj = _mesa_get_current_tex_object(ctx, target); - if (!texObj) { - _mesa_error(ctx, GL_INVALID_ENUM, "glGetCompressedTexImageARB(target)"); - return GL_TRUE; - } - - texImage = _mesa_select_tex_image(ctx, texObj, target, level); - - if (!texImage) { - /* probably invalid mipmap level */ - _mesa_error(ctx, GL_INVALID_VALUE, - "glGetCompressedTexImageARB(level)"); - return GL_TRUE; - } - - if (!_mesa_is_format_compressed(texImage->TexFormat)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetCompressedTexImageARB(texture is not compressed)"); - return GL_TRUE; - } - - compressedSize = _mesa_format_image_size(texImage->TexFormat, - texImage->Width, - texImage->Height, - texImage->Depth); - - if (!_mesa_is_bufferobj(ctx->Pack.BufferObj)) { - /* do bounds checking on writing to client memory */ - if (clientMemSize < compressedSize) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetnCompressedTexImageARB(out of bounds access:" - " bufSize (%d) is too small)", clientMemSize); - } - } else { - /* do bounds checking on PBO write */ - if ((const GLubyte *) img + compressedSize > - (const GLubyte *) ctx->Pack.BufferObj->Size) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetCompressedTexImage(out of bounds PBO access)"); - return GL_TRUE; - } - - /* make sure PBO is not mapped */ - if (_mesa_bufferobj_mapped(ctx->Pack.BufferObj)) { - _mesa_error(ctx, GL_INVALID_OPERATION, - "glGetCompressedTexImage(PBO is mapped)"); - return GL_TRUE; - } - } - - return GL_FALSE; -} - - -void GLAPIENTRY -_mesa_GetnCompressedTexImageARB(GLenum target, GLint level, GLsizei bufSize, - GLvoid *img) -{ - struct gl_texture_object *texObj; - struct gl_texture_image *texImage; - GET_CURRENT_CONTEXT(ctx); - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - if (getcompressedteximage_error_check(ctx, target, level, bufSize, img)) { - return; - } - - if (_mesa_is_bufferobj(ctx->Pack.BufferObj) && !img) { - /* not an error, do nothing */ - return; - } - - texObj = _mesa_get_current_tex_object(ctx, target); - texImage = _mesa_select_tex_image(ctx, texObj, target, level); - - if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE)) { - _mesa_debug(ctx, - "glGetCompressedTexImage(tex %u) format = %s, w=%d, h=%d\n", - texObj->Name, - _mesa_get_format_name(texImage->TexFormat), - texImage->Width, texImage->Height); - } - - _mesa_lock_texture(ctx, texObj); - { - ctx->Driver.GetCompressedTexImage(ctx, target, level, img, - texObj, texImage); - } - _mesa_unlock_texture(ctx, texObj); -} - -void GLAPIENTRY -_mesa_GetCompressedTexImageARB(GLenum target, GLint level, GLvoid *img) -{ - _mesa_GetnCompressedTexImageARB(target, level, INT_MAX, img); -} +/* + * Mesa 3-D graphics library + * Version: 7.7 + * + * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. + * Copyright (c) 2009 VMware, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +/** + * Code for glGetTexImage() and glGetCompressedTexImage(). + */ + + +#include "glheader.h" +#include "bufferobj.h" +#include "enums.h" +#include "context.h" +#include "formats.h" +#include "image.h" +#include "mfeatures.h" +#include "mtypes.h" +#include "pack.h" +#include "pbo.h" +#include "texgetimage.h" +#include "teximage.h" + + + +/** + * Can the given type represent negative values? + */ +static INLINE GLboolean +type_with_negative_values(GLenum type) +{ + switch (type) { + case GL_BYTE: + case GL_SHORT: + case GL_INT: + case GL_FLOAT: + case GL_HALF_FLOAT_ARB: + return GL_TRUE; + default: + return GL_FALSE; + } +} + + +/** + * glGetTexImage for color index pixels. + */ +static void +get_tex_color_index(struct gl_context *ctx, GLuint dimensions, + GLenum format, GLenum type, GLvoid *pixels, + const struct gl_texture_image *texImage) +{ + const GLint width = texImage->Width; + const GLint height = texImage->Height; + const GLint depth = texImage->Depth; + const GLint rowstride = texImage->RowStride; + const GLuint indexBits = + _mesa_get_format_bits(texImage->TexFormat, GL_TEXTURE_INDEX_SIZE_EXT); + const GLbitfield transferOps = 0x0; + GLint img, row, col; + + for (img = 0; img < depth; img++) { + for (row = 0; row < height; row++) { + GLuint indexRow[MAX_WIDTH] = { 0 }; + void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels, + width, height, format, type, + img, row, 0); + assert(dest); + + if (indexBits == 8) { + const GLubyte *src = (const GLubyte *) texImage->Data; + src += rowstride * (img * height + row); + for (col = 0; col < width; col++) { + indexRow[col] = src[col]; + } + } + else if (indexBits == 16) { + const GLushort *src = (const GLushort *) texImage->Data; + src += rowstride * (img * height + row); + for (col = 0; col < width; col++) { + indexRow[col] = src[col]; + } + } + else { + _mesa_problem(ctx, "Color index problem in _mesa_GetTexImage"); + } + _mesa_pack_index_span(ctx, width, type, dest, + indexRow, &ctx->Pack, transferOps); + } + } +} + + +/** + * glGetTexImage for depth/Z pixels. + */ +static void +get_tex_depth(struct gl_context *ctx, GLuint dimensions, + GLenum format, GLenum type, GLvoid *pixels, + const struct gl_texture_image *texImage) +{ + const GLint width = texImage->Width; + const GLint height = texImage->Height; + const GLint depth = texImage->Depth; + GLint img, row, col; + GLfloat *depthRow = (GLfloat *) malloc(width * sizeof(GLfloat)); + + if (!depthRow) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGetTexImage"); + return; + } + + for (img = 0; img < depth; img++) { + for (row = 0; row < height; row++) { + void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels, + width, height, format, type, + img, row, 0); + assert(dest); + + for (col = 0; col < width; col++) { + texImage->FetchTexelf(texImage, col, row, img, depthRow + col); + } + _mesa_pack_depth_span(ctx, width, dest, type, depthRow, &ctx->Pack); + } + } + + free(depthRow); +} + + +/** + * glGetTexImage for depth/stencil pixels. + */ +static void +get_tex_depth_stencil(struct gl_context *ctx, GLuint dimensions, + GLenum format, GLenum type, GLvoid *pixels, + const struct gl_texture_image *texImage) +{ + const GLint width = texImage->Width; + const GLint height = texImage->Height; + const GLint depth = texImage->Depth; + const GLint rowstride = texImage->RowStride; + const GLuint *src = (const GLuint *) texImage->Data; + GLint img, row; + + for (img = 0; img < depth; img++) { + for (row = 0; row < height; row++) { + void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels, + width, height, format, type, + img, row, 0); + memcpy(dest, src, width * sizeof(GLuint)); + if (ctx->Pack.SwapBytes) { + _mesa_swap4((GLuint *) dest, width); + } + + src += rowstride; + } + } +} + + +/** + * glGetTexImage for YCbCr pixels. + */ +static void +get_tex_ycbcr(struct gl_context *ctx, GLuint dimensions, + GLenum format, GLenum type, GLvoid *pixels, + const struct gl_texture_image *texImage) +{ + const GLint width = texImage->Width; + const GLint height = texImage->Height; + const GLint depth = texImage->Depth; + const GLint rowstride = texImage->RowStride; + const GLushort *src = (const GLushort *) texImage->Data; + GLint img, row; + + for (img = 0; img < depth; img++) { + for (row = 0; row < height; row++) { + void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels, + width, height, format, type, + img, row, 0); + memcpy(dest, src, width * sizeof(GLushort)); + + /* check for byte swapping */ + if ((texImage->TexFormat == MESA_FORMAT_YCBCR + && type == GL_UNSIGNED_SHORT_8_8_REV_MESA) || + (texImage->TexFormat == MESA_FORMAT_YCBCR_REV + && type == GL_UNSIGNED_SHORT_8_8_MESA)) { + if (!ctx->Pack.SwapBytes) + _mesa_swap2((GLushort *) dest, width); + } + else if (ctx->Pack.SwapBytes) { + _mesa_swap2((GLushort *) dest, width); + } + + src += rowstride; + } + } +} + + +#if FEATURE_EXT_texture_sRGB + + +/** + * Convert a float value from linear space to a + * non-linear sRGB value in [0, 255]. + * Not terribly efficient. + */ +static INLINE GLfloat +linear_to_nonlinear(GLfloat cl) +{ + /* can't have values outside [0, 1] */ + GLfloat cs; + if (cl < 0.0031308f) { + cs = 12.92f * cl; + } + else { + cs = (GLfloat)(1.055 * pow(cl, 0.41666) - 0.055); + } + return cs; +} + + +/** + * glGetTexImagefor sRGB pixels; + */ +static void +get_tex_srgb(struct gl_context *ctx, GLuint dimensions, + GLenum format, GLenum type, GLvoid *pixels, + const struct gl_texture_image *texImage) +{ + const GLint width = texImage->Width; + const GLint height = texImage->Height; + const GLint depth = texImage->Depth; + const GLbitfield transferOps = 0x0; + GLint img, row; + GLfloat (*rgba)[4] = (GLfloat (*)[4]) malloc(4 * width * sizeof(GLfloat)); + + if (!rgba) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGetTexImage"); + return; + } + + for (img = 0; img < depth; img++) { + for (row = 0; row < height; row++) { + void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels, + width, height, format, type, + img, row, 0); + + GLint col; + + /* convert row to RGBA format */ + for (col = 0; col < width; col++) { + texImage->FetchTexelf(texImage, col, row, img, rgba[col]); + if (texImage->_BaseFormat == GL_LUMINANCE) { + rgba[col][RCOMP] = linear_to_nonlinear(rgba[col][RCOMP]); + rgba[col][GCOMP] = 0.0; + rgba[col][BCOMP] = 0.0; + } + else if (texImage->_BaseFormat == GL_LUMINANCE_ALPHA) { + rgba[col][RCOMP] = linear_to_nonlinear(rgba[col][RCOMP]); + rgba[col][GCOMP] = 0.0; + rgba[col][BCOMP] = 0.0; + } + else if (texImage->_BaseFormat == GL_RGB || + texImage->_BaseFormat == GL_RGBA) { + rgba[col][RCOMP] = linear_to_nonlinear(rgba[col][RCOMP]); + rgba[col][GCOMP] = linear_to_nonlinear(rgba[col][GCOMP]); + rgba[col][BCOMP] = linear_to_nonlinear(rgba[col][BCOMP]); + } + } + _mesa_pack_rgba_span_float(ctx, width, (GLfloat (*)[4]) rgba, + format, type, dest, + &ctx->Pack, transferOps); + } + } + + free(rgba); +} + + +#else /* FEATURE_EXT_texture_sRGB */ + + +static INLINE void +get_tex_srgb(struct gl_context *ctx, GLuint dimensions, + GLenum format, GLenum type, GLvoid *pixels, + const struct gl_texture_image *texImage) +{ + ASSERT_NO_FEATURE(); +} + + +#endif /* FEATURE_EXT_texture_sRGB */ + + +/** + * glGetTexImagefor RGBA, Luminance, etc. pixels. + * This is the slow way since we use texture sampling. + */ +static void +get_tex_rgba(struct gl_context *ctx, GLuint dimensions, + GLenum format, GLenum type, GLvoid *pixels, + const struct gl_texture_image *texImage) +{ + const GLint width = texImage->Width; + const GLint height = texImage->Height; + const GLint depth = texImage->Depth; + /* Normally, no pixel transfer ops are performed during glGetTexImage. + * The only possible exception is component clamping to [0,1]. + */ + GLbitfield transferOps = 0x0; + GLint img, row; + GLfloat (*rgba)[4] = (GLfloat (*)[4]) malloc(4 * width * sizeof(GLfloat)); + + if (!rgba) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGetTexImage"); + return; + } + + for (img = 0; img < depth; img++) { + for (row = 0; row < height; row++) { + void *dest = _mesa_image_address(dimensions, &ctx->Pack, pixels, + width, height, format, type, + img, row, 0); + GLint col; + GLenum dataType = _mesa_get_format_datatype(texImage->TexFormat); + + /* clamp does not apply to GetTexImage (final conversion)? + * Looks like we need clamp though when going from format + * containing negative values to unsigned format. + */ + if (format == GL_LUMINANCE || format == GL_LUMINANCE_ALPHA) { + transferOps |= IMAGE_CLAMP_BIT; + } + else if (!type_with_negative_values(type) && + (dataType == GL_FLOAT || + dataType == GL_SIGNED_NORMALIZED)) { + transferOps |= IMAGE_CLAMP_BIT; + } + + for (col = 0; col < width; col++) { + texImage->FetchTexelf(texImage, col, row, img, rgba[col]); + if (texImage->_BaseFormat == GL_ALPHA) { + rgba[col][RCOMP] = 0.0F; + rgba[col][GCOMP] = 0.0F; + rgba[col][BCOMP] = 0.0F; + } + else if (texImage->_BaseFormat == GL_LUMINANCE) { + rgba[col][GCOMP] = 0.0F; + rgba[col][BCOMP] = 0.0F; + rgba[col][ACOMP] = 1.0F; + } + else if (texImage->_BaseFormat == GL_LUMINANCE_ALPHA) { + rgba[col][GCOMP] = 0.0F; + rgba[col][BCOMP] = 0.0F; + } + else if (texImage->_BaseFormat == GL_INTENSITY) { + rgba[col][GCOMP] = 0.0F; + rgba[col][BCOMP] = 0.0F; + rgba[col][ACOMP] = 1.0F; + } + } + _mesa_pack_rgba_span_float(ctx, width, (GLfloat (*)[4]) rgba, + format, type, dest, + &ctx->Pack, transferOps); + } + } + + free(rgba); +} + + +/** + * Try to do glGetTexImage() with simple memcpy(). + * \return GL_TRUE if done, GL_FALSE otherwise + */ +static GLboolean +get_tex_memcpy(struct gl_context *ctx, GLenum format, GLenum type, GLvoid *pixels, + const struct gl_texture_object *texObj, + const struct gl_texture_image *texImage) +{ + GLboolean memCopy = GL_FALSE; + + /* Texture image should have been mapped already */ + assert(texImage->Data); + + /* + * Check if the src/dst formats are compatible. + * Also note that GL's pixel transfer ops don't apply to glGetTexImage() + * so we don't have to worry about those. + * XXX more format combinations could be supported here. + */ + if ((texObj->Target == GL_TEXTURE_1D || + texObj->Target == GL_TEXTURE_2D || + texObj->Target == GL_TEXTURE_RECTANGLE || + (texObj->Target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X && + texObj->Target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z))) { + if ((texImage->TexFormat == MESA_FORMAT_ARGB8888 || + texImage->TexFormat == MESA_FORMAT_SARGB8) && + format == GL_BGRA && + (type == GL_UNSIGNED_BYTE || type == GL_UNSIGNED_INT_8_8_8_8_REV) && + !ctx->Pack.SwapBytes && + _mesa_little_endian()) { + memCopy = GL_TRUE; + } + else if ((texImage->TexFormat == MESA_FORMAT_AL88 || + texImage->TexFormat == MESA_FORMAT_SLA8) && + format == GL_LUMINANCE_ALPHA && + type == GL_UNSIGNED_BYTE && + !ctx->Pack.SwapBytes && + _mesa_little_endian()) { + memCopy = GL_TRUE; + } + else if ((texImage->TexFormat == MESA_FORMAT_L8 || + texImage->TexFormat == MESA_FORMAT_SL8) && + format == GL_LUMINANCE && + type == GL_UNSIGNED_BYTE) { + memCopy = GL_TRUE; + } + else if (texImage->TexFormat == MESA_FORMAT_L16 && + format == GL_LUMINANCE && + type == GL_UNSIGNED_SHORT) { + memCopy = GL_TRUE; + } + else if (texImage->TexFormat == MESA_FORMAT_A8 && + format == GL_ALPHA && + type == GL_UNSIGNED_BYTE) { + memCopy = GL_TRUE; + } + else if (texImage->TexFormat == MESA_FORMAT_A16 && + format == GL_ALPHA && + type == GL_UNSIGNED_SHORT) { + memCopy = GL_TRUE; + } + } + + if (memCopy) { + const GLuint bpp = _mesa_get_format_bytes(texImage->TexFormat); + const GLuint bytesPerRow = texImage->Width * bpp; + GLubyte *dst = + _mesa_image_address2d(&ctx->Pack, pixels, texImage->Width, + texImage->Height, format, type, 0, 0); + const GLint dstRowStride = + _mesa_image_row_stride(&ctx->Pack, texImage->Width, format, type); + const GLubyte *src = texImage->Data; + const GLint srcRowStride = texImage->RowStride * bpp; + GLuint row; + + if (bytesPerRow == dstRowStride && bytesPerRow == srcRowStride) { + memcpy(dst, src, bytesPerRow * texImage->Height); + } + else { + for (row = 0; row < texImage->Height; row++) { + memcpy(dst, src, bytesPerRow); + dst += dstRowStride; + src += srcRowStride; + } + } + } + + return memCopy; +} + + +/** + * This is the software fallback for Driver.GetTexImage(). + * All error checking will have been done before this routine is called. + * The texture image must be mapped. + */ +void +_mesa_get_teximage(struct gl_context *ctx, GLenum target, GLint level, + GLenum format, GLenum type, GLvoid *pixels, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage) +{ + GLuint dimensions; + + /* If we get here, the texture image should be mapped */ + assert(texImage->Data); + + switch (target) { + case GL_TEXTURE_1D: + dimensions = 1; + break; + case GL_TEXTURE_3D: + dimensions = 3; + break; + default: + dimensions = 2; + } + + if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { + /* Packing texture image into a PBO. + * Map the (potentially) VRAM-based buffer into our process space so + * we can write into it with the code below. + * A hardware driver might use a sophisticated blit to move the + * texture data to the PBO if the PBO is in VRAM along with the texture. + */ + GLubyte *buf = (GLubyte *) + ctx->Driver.MapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT, + GL_WRITE_ONLY_ARB, ctx->Pack.BufferObj); + if (!buf) { + /* out of memory or other unexpected error */ + _mesa_error(ctx, GL_OUT_OF_MEMORY, "glGetTexImage(map PBO failed)"); + return; + } + /* was an offset into the PBO. + * Now make it a real, client-side pointer inside the mapped region. + */ + pixels = ADD_POINTERS(buf, pixels); + } + + if (get_tex_memcpy(ctx, format, type, pixels, texObj, texImage)) { + /* all done */ + } + else if (format == GL_COLOR_INDEX) { + get_tex_color_index(ctx, dimensions, format, type, pixels, texImage); + } + else if (format == GL_DEPTH_COMPONENT) { + get_tex_depth(ctx, dimensions, format, type, pixels, texImage); + } + else if (format == GL_DEPTH_STENCIL_EXT) { + get_tex_depth_stencil(ctx, dimensions, format, type, pixels, texImage); + } + else if (format == GL_YCBCR_MESA) { + get_tex_ycbcr(ctx, dimensions, format, type, pixels, texImage); + } + else if (_mesa_get_format_color_encoding(texImage->TexFormat) == GL_SRGB) { + get_tex_srgb(ctx, dimensions, format, type, pixels, texImage); + } + else { + get_tex_rgba(ctx, dimensions, format, type, pixels, texImage); + } + + if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { + ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT, + ctx->Pack.BufferObj); + } +} + + + +/** + * This is the software fallback for Driver.GetCompressedTexImage(). + * All error checking will have been done before this routine is called. + */ +void +_mesa_get_compressed_teximage(struct gl_context *ctx, GLenum target, GLint level, + GLvoid *img, + struct gl_texture_object *texObj, + struct gl_texture_image *texImage) +{ + const GLuint row_stride = _mesa_format_row_stride(texImage->TexFormat, + texImage->Width); + const GLuint row_stride_stored = _mesa_format_row_stride(texImage->TexFormat, + texImage->RowStride); + GLuint i; + + if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { + /* pack texture image into a PBO */ + GLubyte *buf = (GLubyte *) + ctx->Driver.MapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT, + GL_WRITE_ONLY_ARB, ctx->Pack.BufferObj); + if (!buf) { + /* out of memory or other unexpected error */ + _mesa_error(ctx, GL_OUT_OF_MEMORY, + "glGetCompresssedTexImage(map PBO failed)"); + return; + } + img = ADD_POINTERS(buf, img); + } + + /* no pixelstore or pixel transfer, but respect stride */ + + if (row_stride == row_stride_stored) { + const GLuint size = _mesa_format_image_size(texImage->TexFormat, + texImage->Width, + texImage->Height, + texImage->Depth); + memcpy(img, texImage->Data, size); + } + else { + GLuint bw, bh; + _mesa_get_format_block_size(texImage->TexFormat, &bw, &bh); + for (i = 0; i < (texImage->Height + bh - 1) / bh; i++) { + memcpy((GLubyte *)img + i * row_stride, + (GLubyte *)texImage->Data + i * row_stride_stored, + row_stride); + } + } + + if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { + ctx->Driver.UnmapBuffer(ctx, GL_PIXEL_PACK_BUFFER_EXT, + ctx->Pack.BufferObj); + } +} + + + +/** + * Do error checking for a glGetTexImage() call. + * \return GL_TRUE if any error, GL_FALSE if no errors. + */ +static GLboolean +getteximage_error_check(struct gl_context *ctx, GLenum target, GLint level, + GLenum format, GLenum type, GLsizei clientMemSize, + GLvoid *pixels ) +{ + struct gl_texture_object *texObj; + struct gl_texture_image *texImage; + const GLint maxLevels = _mesa_max_texture_levels(ctx, target); + const GLuint dimensions = (target == GL_TEXTURE_3D) ? 3 : 2; + GLenum baseFormat; + + if (maxLevels == 0) { + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(target=0x%x)", target); + return GL_TRUE; + } + + if (level < 0 || level >= maxLevels) { + _mesa_error( ctx, GL_INVALID_VALUE, "glGetTexImage(level)" ); + return GL_TRUE; + } + + if (_mesa_sizeof_packed_type(type) <= 0) { + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexImage(type)" ); + return GL_TRUE; + } + + if (_mesa_components_in_format(format) <= 0 || + format == GL_STENCIL_INDEX) { + _mesa_error( ctx, GL_INVALID_ENUM, "glGetTexImage(format)" ); + return GL_TRUE; + } + + if (!ctx->Extensions.EXT_paletted_texture && _mesa_is_index_format(format)) { + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); + return GL_TRUE; + } + + if (!ctx->Extensions.ARB_depth_texture && _mesa_is_depth_format(format)) { + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); + return GL_TRUE; + } + + if (!ctx->Extensions.MESA_ycbcr_texture && _mesa_is_ycbcr_format(format)) { + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); + return GL_TRUE; + } + + if (!ctx->Extensions.EXT_packed_depth_stencil + && _mesa_is_depthstencil_format(format)) { + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); + return GL_TRUE; + } + + if (!ctx->Extensions.ATI_envmap_bumpmap + && _mesa_is_dudv_format(format)) { + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(format)"); + return GL_TRUE; + } + + texObj = _mesa_get_current_tex_object(ctx, target); + + if (!texObj || _mesa_is_proxy_texture(target)) { + _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(target)"); + return GL_TRUE; + } + + texImage = _mesa_select_tex_image(ctx, texObj, target, level); + if (!texImage) { + /* out of memory */ + return GL_TRUE; + } + + baseFormat = _mesa_get_format_base_format(texImage->TexFormat); + + /* Make sure the requested image format is compatible with the + * texture's format. Note that a color index texture can be converted + * to RGBA so that combo is allowed. + */ + if (_mesa_is_color_format(format) + && !_mesa_is_color_format(baseFormat) + && !_mesa_is_index_format(baseFormat)) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)"); + return GL_TRUE; + } + else if (_mesa_is_index_format(format) + && !_mesa_is_index_format(baseFormat)) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)"); + return GL_TRUE; + } + else if (_mesa_is_depth_format(format) + && !_mesa_is_depth_format(baseFormat) + && !_mesa_is_depthstencil_format(baseFormat)) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)"); + return GL_TRUE; + } + else if (_mesa_is_ycbcr_format(format) + && !_mesa_is_ycbcr_format(baseFormat)) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)"); + return GL_TRUE; + } + else if (_mesa_is_depthstencil_format(format) + && !_mesa_is_depthstencil_format(baseFormat)) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)"); + return GL_TRUE; + } + else if (_mesa_is_dudv_format(format) + && !_mesa_is_dudv_format(baseFormat)) { + _mesa_error(ctx, GL_INVALID_OPERATION, "glGetTexImage(format mismatch)"); + return GL_TRUE; + } + + if (!_mesa_validate_pbo_access(dimensions, &ctx->Pack, texImage->Width, + texImage->Height, texImage->Depth, + format, type, clientMemSize, pixels)) { + if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGetTexImage(out of bounds PBO access)"); + } else { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGetnTexImageARB(out of bounds access:" + " bufSize (%d) is too small)", clientMemSize); + } + return GL_TRUE; + } + + if (_mesa_is_bufferobj(ctx->Pack.BufferObj)) { + /* PBO should not be mapped */ + if (_mesa_bufferobj_mapped(ctx->Pack.BufferObj)) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGetTexImage(PBO is mapped)"); + return GL_TRUE; + } + } + + return GL_FALSE; +} + + + +/** + * Get texture image. Called by glGetTexImage. + * + * \param target texture target. + * \param level image level. + * \param format pixel data format for returned image. + * \param type pixel data type for returned image. + * \param bufSize size of the pixels data buffer. + * \param pixels returned pixel data. + */ +void GLAPIENTRY +_mesa_GetnTexImageARB( GLenum target, GLint level, GLenum format, + GLenum type, GLsizei bufSize, GLvoid *pixels ) +{ + struct gl_texture_object *texObj; + struct gl_texture_image *texImage; + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + + if (getteximage_error_check(ctx, target, level, format, type, + bufSize, pixels)) { + return; + } + + if (!_mesa_is_bufferobj(ctx->Pack.BufferObj) && !pixels) { + /* not an error, do nothing */ + return; + } + + texObj = _mesa_get_current_tex_object(ctx, target); + texImage = _mesa_select_tex_image(ctx, texObj, target, level); + + if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE)) { + _mesa_debug(ctx, "glGetTexImage(tex %u) format = %s, w=%d, h=%d," + " dstFmt=0x%x, dstType=0x%x\n", + texObj->Name, + _mesa_get_format_name(texImage->TexFormat), + texImage->Width, texImage->Height, + format, type); + } + + _mesa_lock_texture(ctx, texObj); + { + ctx->Driver.GetTexImage(ctx, target, level, format, type, pixels, + texObj, texImage); + } + _mesa_unlock_texture(ctx, texObj); +} + + +void GLAPIENTRY +_mesa_GetTexImage( GLenum target, GLint level, GLenum format, + GLenum type, GLvoid *pixels ) +{ + _mesa_GetnTexImageARB(target, level, format, type, INT_MAX, pixels); +} + + +/** + * Do error checking for a glGetCompressedTexImage() call. + * \return GL_TRUE if any error, GL_FALSE if no errors. + */ +static GLboolean +getcompressedteximage_error_check(struct gl_context *ctx, GLenum target, + GLint level, GLsizei clientMemSize, GLvoid *img) +{ + struct gl_texture_object *texObj; + struct gl_texture_image *texImage; + const GLint maxLevels = _mesa_max_texture_levels(ctx, target); + GLuint compressedSize; + + if (maxLevels == 0) { + _mesa_error(ctx, GL_INVALID_ENUM, "glGetCompressedTexImage(target=0x%x)", + target); + return GL_TRUE; + } + + if (level < 0 || level >= maxLevels) { + _mesa_error(ctx, GL_INVALID_VALUE, + "glGetCompressedTexImageARB(bad level = %d)", level); + return GL_TRUE; + } + + if (_mesa_is_proxy_texture(target)) { + _mesa_error(ctx, GL_INVALID_ENUM, + "glGetCompressedTexImageARB(bad target = %s)", + _mesa_lookup_enum_by_nr(target)); + return GL_TRUE; + } + + texObj = _mesa_get_current_tex_object(ctx, target); + if (!texObj) { + _mesa_error(ctx, GL_INVALID_ENUM, "glGetCompressedTexImageARB(target)"); + return GL_TRUE; + } + + texImage = _mesa_select_tex_image(ctx, texObj, target, level); + + if (!texImage) { + /* probably invalid mipmap level */ + _mesa_error(ctx, GL_INVALID_VALUE, + "glGetCompressedTexImageARB(level)"); + return GL_TRUE; + } + + if (!_mesa_is_format_compressed(texImage->TexFormat)) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGetCompressedTexImageARB(texture is not compressed)"); + return GL_TRUE; + } + + compressedSize = _mesa_format_image_size(texImage->TexFormat, + texImage->Width, + texImage->Height, + texImage->Depth); + + if (!_mesa_is_bufferobj(ctx->Pack.BufferObj)) { + /* do bounds checking on writing to client memory */ + if (clientMemSize < compressedSize) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGetnCompressedTexImageARB(out of bounds access:" + " bufSize (%d) is too small)", clientMemSize); + } + } else { + /* do bounds checking on PBO write */ + if ((const GLubyte *) img + compressedSize > + (const GLubyte *) ctx->Pack.BufferObj->Size) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGetCompressedTexImage(out of bounds PBO access)"); + return GL_TRUE; + } + + /* make sure PBO is not mapped */ + if (_mesa_bufferobj_mapped(ctx->Pack.BufferObj)) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGetCompressedTexImage(PBO is mapped)"); + return GL_TRUE; + } + } + + return GL_FALSE; +} + + +void GLAPIENTRY +_mesa_GetnCompressedTexImageARB(GLenum target, GLint level, GLsizei bufSize, + GLvoid *img) +{ + struct gl_texture_object *texObj; + struct gl_texture_image *texImage; + GET_CURRENT_CONTEXT(ctx); + ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); + + if (getcompressedteximage_error_check(ctx, target, level, bufSize, img)) { + return; + } + + if (_mesa_is_bufferobj(ctx->Pack.BufferObj) && !img) { + /* not an error, do nothing */ + return; + } + + texObj = _mesa_get_current_tex_object(ctx, target); + texImage = _mesa_select_tex_image(ctx, texObj, target, level); + + if (MESA_VERBOSE & (VERBOSE_API | VERBOSE_TEXTURE)) { + _mesa_debug(ctx, + "glGetCompressedTexImage(tex %u) format = %s, w=%d, h=%d\n", + texObj->Name, + _mesa_get_format_name(texImage->TexFormat), + texImage->Width, texImage->Height); + } + + _mesa_lock_texture(ctx, texObj); + { + ctx->Driver.GetCompressedTexImage(ctx, target, level, img, + texObj, texImage); + } + _mesa_unlock_texture(ctx, texObj); +} + +void GLAPIENTRY +_mesa_GetCompressedTexImageARB(GLenum target, GLint level, GLvoid *img) +{ + _mesa_GetnCompressedTexImageARB(target, level, INT_MAX, img); +} diff --git a/mesalib/src/mesa/state_tracker/st_atom.c b/mesalib/src/mesa/state_tracker/st_atom.c index 34dff79e7..95010d1b2 100644 --- a/mesalib/src/mesa/state_tracker/st_atom.c +++ b/mesalib/src/mesa/state_tracker/st_atom.c @@ -56,6 +56,7 @@ static const struct st_tracked_state *atoms[] = &st_update_scissor, &st_update_blend, &st_update_sampler, + &st_update_vertex_texture, &st_update_texture, &st_update_framebuffer, &st_update_msaa, diff --git a/mesalib/src/mesa/state_tracker/st_atom.h b/mesalib/src/mesa/state_tracker/st_atom.h index aec5785e6..b5f837f78 100644 --- a/mesalib/src/mesa/state_tracker/st_atom.h +++ b/mesalib/src/mesa/state_tracker/st_atom.h @@ -60,6 +60,7 @@ extern const struct st_tracked_state st_update_blend; extern const struct st_tracked_state st_update_msaa; extern const struct st_tracked_state st_update_sampler; extern const struct st_tracked_state st_update_texture; +extern const struct st_tracked_state st_update_vertex_texture; extern const struct st_tracked_state st_finalize_textures; extern const struct st_tracked_state st_update_fs_constants; extern const struct st_tracked_state st_update_gs_constants; diff --git a/mesalib/src/mesa/state_tracker/st_atom_sampler.c b/mesalib/src/mesa/state_tracker/st_atom_sampler.c index ccbd54892..627a13387 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_sampler.c +++ b/mesalib/src/mesa/state_tracker/st_atom_sampler.c @@ -1,272 +1,271 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - /* - * Authors: - * Keith Whitwell - * Brian Paul - */ - - -#include "main/macros.h" -#include "main/mtypes.h" -#include "main/samplerobj.h" - -#include "st_context.h" -#include "st_cb_texture.h" -#include "st_format.h" -#include "st_atom.h" -#include "st_texture.h" -#include "pipe/p_context.h" -#include "pipe/p_defines.h" - -#include "cso_cache/cso_context.h" - - -/** - * Convert GLenum texcoord wrap tokens to pipe tokens. - */ -static GLuint -gl_wrap_xlate(GLenum wrap) -{ - switch (wrap) { - case GL_REPEAT: - return PIPE_TEX_WRAP_REPEAT; - case GL_CLAMP: - return PIPE_TEX_WRAP_CLAMP; - case GL_CLAMP_TO_EDGE: - return PIPE_TEX_WRAP_CLAMP_TO_EDGE; - case GL_CLAMP_TO_BORDER: - return PIPE_TEX_WRAP_CLAMP_TO_BORDER; - case GL_MIRRORED_REPEAT: - return PIPE_TEX_WRAP_MIRROR_REPEAT; - case GL_MIRROR_CLAMP_EXT: - return PIPE_TEX_WRAP_MIRROR_CLAMP; - case GL_MIRROR_CLAMP_TO_EDGE_EXT: - return PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE; - case GL_MIRROR_CLAMP_TO_BORDER_EXT: - return PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER; - default: - assert(0); - return 0; - } -} - - -static GLuint -gl_filter_to_mip_filter(GLenum filter) -{ - switch (filter) { - case GL_NEAREST: - case GL_LINEAR: - return PIPE_TEX_MIPFILTER_NONE; - - case GL_NEAREST_MIPMAP_NEAREST: - case GL_LINEAR_MIPMAP_NEAREST: - return PIPE_TEX_MIPFILTER_NEAREST; - - case GL_NEAREST_MIPMAP_LINEAR: - case GL_LINEAR_MIPMAP_LINEAR: - return PIPE_TEX_MIPFILTER_LINEAR; - - default: - assert(0); - return PIPE_TEX_MIPFILTER_NONE; - } -} - - -static GLuint -gl_filter_to_img_filter(GLenum filter) -{ - switch (filter) { - case GL_NEAREST: - case GL_NEAREST_MIPMAP_NEAREST: - case GL_NEAREST_MIPMAP_LINEAR: - return PIPE_TEX_FILTER_NEAREST; - - case GL_LINEAR: - case GL_LINEAR_MIPMAP_NEAREST: - case GL_LINEAR_MIPMAP_LINEAR: - return PIPE_TEX_FILTER_LINEAR; - - default: - assert(0); - return PIPE_TEX_FILTER_NEAREST; - } -} - -static void convert_sampler(struct st_context *st, - struct pipe_sampler_state *sampler, - GLuint texUnit) -{ - struct gl_texture_object *texobj; - struct gl_sampler_object *msamp; - - texobj = st->ctx->Texture.Unit[texUnit]._Current; - if (!texobj) { - texobj = st_get_default_texture(st); - } - - msamp = _mesa_get_samplerobj(st->ctx, texUnit); - sampler->wrap_s = gl_wrap_xlate(msamp->WrapS); - sampler->wrap_t = gl_wrap_xlate(msamp->WrapT); - sampler->wrap_r = gl_wrap_xlate(msamp->WrapR); - - sampler->min_img_filter = gl_filter_to_img_filter(msamp->MinFilter); - sampler->min_mip_filter = gl_filter_to_mip_filter(msamp->MinFilter); - sampler->mag_img_filter = gl_filter_to_img_filter(msamp->MagFilter); - - if (texobj->Target != GL_TEXTURE_RECTANGLE_ARB) - sampler->normalized_coords = 1; - - sampler->lod_bias = st->ctx->Texture.Unit[texUnit].LodBias + - msamp->LodBias; - - sampler->min_lod = CLAMP(msamp->MinLod, - 0.0f, - (GLfloat) texobj->MaxLevel - texobj->BaseLevel); - sampler->max_lod = MIN2((GLfloat) texobj->MaxLevel - texobj->BaseLevel, - msamp->MaxLod); - if (sampler->max_lod < sampler->min_lod) { - /* The GL spec doesn't seem to specify what to do in this case. - * Swap the values. - */ - float tmp = sampler->max_lod; - sampler->max_lod = sampler->min_lod; - sampler->min_lod = tmp; - assert(sampler->min_lod <= sampler->max_lod); - } - - if (msamp->BorderColor.ui[0] || - msamp->BorderColor.ui[1] || - msamp->BorderColor.ui[2] || - msamp->BorderColor.ui[3]) { - struct gl_texture_image *teximg; - - teximg = texobj->Image[0][texobj->BaseLevel]; - - st_translate_color(msamp->BorderColor.f, - teximg ? teximg->_BaseFormat : GL_RGBA, - sampler->border_color); - } - - sampler->max_anisotropy = (msamp->MaxAnisotropy == 1.0 ? - 0 : (GLuint) msamp->MaxAnisotropy); - - /* only care about ARB_shadow, not SGI shadow */ - if (msamp->CompareMode == GL_COMPARE_R_TO_TEXTURE) { - sampler->compare_mode = PIPE_TEX_COMPARE_R_TO_TEXTURE; - sampler->compare_func - = st_compare_func_to_pipe(msamp->CompareFunc); - } - - sampler->seamless_cube_map = - st->ctx->Texture.CubeMapSeamless || msamp->CubeMapSeamless; -} - -static void -update_vertex_samplers(struct st_context *st) -{ - struct gl_vertex_program *vprog = st->ctx->VertexProgram._Current; - GLuint su; - - st->state.num_vertex_samplers = 0; - - /* loop over sampler units (aka tex image units) */ - for (su = 0; su < st->ctx->Const.MaxVertexTextureImageUnits; su++) { - struct pipe_sampler_state *sampler = st->state.vertex_samplers + su; - - memset(sampler, 0, sizeof(*sampler)); - - if (vprog->Base.SamplersUsed & (1 << su)) { - GLuint texUnit; - - texUnit = vprog->Base.SamplerUnits[su]; - - convert_sampler(st, sampler, texUnit); - - st->state.num_vertex_samplers = su + 1; - - cso_single_vertex_sampler(st->cso_context, su, sampler); - } else { - cso_single_vertex_sampler(st->cso_context, su, NULL); - } - } - cso_single_vertex_sampler_done(st->cso_context); -} - -static void -update_fragment_samplers(struct st_context *st) -{ - struct gl_fragment_program *fprog = st->ctx->FragmentProgram._Current; - GLuint su; - - st->state.num_samplers = 0; - - /* loop over sampler units (aka tex image units) */ - for (su = 0; su < st->ctx->Const.MaxTextureImageUnits; su++) { - struct pipe_sampler_state *sampler = st->state.samplers + su; - - memset(sampler, 0, sizeof(*sampler)); - - if (fprog->Base.SamplersUsed & (1 << su)) { - GLuint texUnit; - - texUnit = fprog->Base.SamplerUnits[su]; - - convert_sampler(st, sampler, texUnit); - - st->state.num_samplers = su + 1; - - /*printf("%s su=%u non-null\n", __FUNCTION__, su);*/ - cso_single_sampler(st->cso_context, su, sampler); - } - else { - /*printf("%s su=%u null\n", __FUNCTION__, su);*/ - cso_single_sampler(st->cso_context, su, NULL); - } - } - - cso_single_sampler_done(st->cso_context); -} - -static void -update_samplers(struct st_context *st) -{ - update_fragment_samplers(st); - update_vertex_samplers(st); -} - -const struct st_tracked_state st_update_sampler = { - "st_update_sampler", /* name */ - { /* dirty */ - _NEW_TEXTURE, /* mesa */ - 0, /* st */ - }, - update_samplers /* update */ -}; +/************************************************************************** + * + * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + + /* + * Authors: + * Keith Whitwell + * Brian Paul + */ + + +#include "main/macros.h" +#include "main/mtypes.h" +#include "main/samplerobj.h" + +#include "st_context.h" +#include "st_cb_texture.h" +#include "st_format.h" +#include "st_atom.h" +#include "st_texture.h" +#include "pipe/p_context.h" +#include "pipe/p_defines.h" + +#include "cso_cache/cso_context.h" + + +/** + * Convert GLenum texcoord wrap tokens to pipe tokens. + */ +static GLuint +gl_wrap_xlate(GLenum wrap) +{ + switch (wrap) { + case GL_REPEAT: + return PIPE_TEX_WRAP_REPEAT; + case GL_CLAMP: + return PIPE_TEX_WRAP_CLAMP; + case GL_CLAMP_TO_EDGE: + return PIPE_TEX_WRAP_CLAMP_TO_EDGE; + case GL_CLAMP_TO_BORDER: + return PIPE_TEX_WRAP_CLAMP_TO_BORDER; + case GL_MIRRORED_REPEAT: + return PIPE_TEX_WRAP_MIRROR_REPEAT; + case GL_MIRROR_CLAMP_EXT: + return PIPE_TEX_WRAP_MIRROR_CLAMP; + case GL_MIRROR_CLAMP_TO_EDGE_EXT: + return PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE; + case GL_MIRROR_CLAMP_TO_BORDER_EXT: + return PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER; + default: + assert(0); + return 0; + } +} + + +static GLuint +gl_filter_to_mip_filter(GLenum filter) +{ + switch (filter) { + case GL_NEAREST: + case GL_LINEAR: + return PIPE_TEX_MIPFILTER_NONE; + + case GL_NEAREST_MIPMAP_NEAREST: + case GL_LINEAR_MIPMAP_NEAREST: + return PIPE_TEX_MIPFILTER_NEAREST; + + case GL_NEAREST_MIPMAP_LINEAR: + case GL_LINEAR_MIPMAP_LINEAR: + return PIPE_TEX_MIPFILTER_LINEAR; + + default: + assert(0); + return PIPE_TEX_MIPFILTER_NONE; + } +} + + +static GLuint +gl_filter_to_img_filter(GLenum filter) +{ + switch (filter) { + case GL_NEAREST: + case GL_NEAREST_MIPMAP_NEAREST: + case GL_NEAREST_MIPMAP_LINEAR: + return PIPE_TEX_FILTER_NEAREST; + + case GL_LINEAR: + case GL_LINEAR_MIPMAP_NEAREST: + case GL_LINEAR_MIPMAP_LINEAR: + return PIPE_TEX_FILTER_LINEAR; + + default: + assert(0); + return PIPE_TEX_FILTER_NEAREST; + } +} + +static void convert_sampler(struct st_context *st, + struct pipe_sampler_state *sampler, + GLuint texUnit) +{ + struct gl_texture_object *texobj; + struct gl_sampler_object *msamp; + + texobj = st->ctx->Texture.Unit[texUnit]._Current; + if (!texobj) { + texobj = st_get_default_texture(st); + } + + msamp = _mesa_get_samplerobj(st->ctx, texUnit); + + memset(sampler, 0, sizeof(*sampler)); + sampler->wrap_s = gl_wrap_xlate(msamp->WrapS); + sampler->wrap_t = gl_wrap_xlate(msamp->WrapT); + sampler->wrap_r = gl_wrap_xlate(msamp->WrapR); + + sampler->min_img_filter = gl_filter_to_img_filter(msamp->MinFilter); + sampler->min_mip_filter = gl_filter_to_mip_filter(msamp->MinFilter); + sampler->mag_img_filter = gl_filter_to_img_filter(msamp->MagFilter); + + if (texobj->Target != GL_TEXTURE_RECTANGLE_ARB) + sampler->normalized_coords = 1; + + sampler->lod_bias = st->ctx->Texture.Unit[texUnit].LodBias + + msamp->LodBias; + + sampler->min_lod = CLAMP(msamp->MinLod, + 0.0f, + (GLfloat) texobj->MaxLevel - texobj->BaseLevel); + sampler->max_lod = MIN2((GLfloat) texobj->MaxLevel - texobj->BaseLevel, + msamp->MaxLod); + if (sampler->max_lod < sampler->min_lod) { + /* The GL spec doesn't seem to specify what to do in this case. + * Swap the values. + */ + float tmp = sampler->max_lod; + sampler->max_lod = sampler->min_lod; + sampler->min_lod = tmp; + assert(sampler->min_lod <= sampler->max_lod); + } + + if (msamp->BorderColor.ui[0] || + msamp->BorderColor.ui[1] || + msamp->BorderColor.ui[2] || + msamp->BorderColor.ui[3]) { + struct gl_texture_image *teximg; + + teximg = texobj->Image[0][texobj->BaseLevel]; + + st_translate_color(msamp->BorderColor.f, + teximg ? teximg->_BaseFormat : GL_RGBA, + sampler->border_color); + } + + sampler->max_anisotropy = (msamp->MaxAnisotropy == 1.0 ? + 0 : (GLuint) msamp->MaxAnisotropy); + + /* only care about ARB_shadow, not SGI shadow */ + if (msamp->CompareMode == GL_COMPARE_R_TO_TEXTURE) { + sampler->compare_mode = PIPE_TEX_COMPARE_R_TO_TEXTURE; + sampler->compare_func + = st_compare_func_to_pipe(msamp->CompareFunc); + } + + sampler->seamless_cube_map = + st->ctx->Texture.CubeMapSeamless || msamp->CubeMapSeamless; +} + +static void +update_vertex_samplers(struct st_context *st) +{ + struct gl_vertex_program *vprog = st->ctx->VertexProgram._Current; + GLuint su; + + st->state.num_vertex_samplers = 0; + + /* loop over sampler units (aka tex image units) */ + for (su = 0; su < st->ctx->Const.MaxVertexTextureImageUnits; su++) { + struct pipe_sampler_state *sampler = st->state.vertex_samplers + su; + + if (vprog->Base.SamplersUsed & (1 << su)) { + GLuint texUnit; + + texUnit = vprog->Base.SamplerUnits[su]; + + convert_sampler(st, sampler, texUnit); + + st->state.num_vertex_samplers = su + 1; + + cso_single_vertex_sampler(st->cso_context, su, sampler); + } else { + cso_single_vertex_sampler(st->cso_context, su, NULL); + } + } + cso_single_vertex_sampler_done(st->cso_context); +} + +static void +update_fragment_samplers(struct st_context *st) +{ + struct gl_fragment_program *fprog = st->ctx->FragmentProgram._Current; + GLuint su; + + st->state.num_samplers = 0; + + /* loop over sampler units (aka tex image units) */ + for (su = 0; su < st->ctx->Const.MaxTextureImageUnits; su++) { + struct pipe_sampler_state *sampler = st->state.samplers + su; + + + if (fprog->Base.SamplersUsed & (1 << su)) { + GLuint texUnit; + + texUnit = fprog->Base.SamplerUnits[su]; + + convert_sampler(st, sampler, texUnit); + + st->state.num_samplers = su + 1; + + /*printf("%s su=%u non-null\n", __FUNCTION__, su);*/ + cso_single_sampler(st->cso_context, su, sampler); + } + else { + /*printf("%s su=%u null\n", __FUNCTION__, su);*/ + cso_single_sampler(st->cso_context, su, NULL); + } + } + + cso_single_sampler_done(st->cso_context); +} + +static void +update_samplers(struct st_context *st) +{ + update_fragment_samplers(st); + update_vertex_samplers(st); +} + +const struct st_tracked_state st_update_sampler = { + "st_update_sampler", /* name */ + { /* dirty */ + _NEW_TEXTURE, /* mesa */ + 0, /* st */ + }, + update_samplers /* update */ +}; diff --git a/mesalib/src/mesa/state_tracker/st_atom_texture.c b/mesalib/src/mesa/state_tracker/st_atom_texture.c index 990b50438..7bb950a76 100644 --- a/mesalib/src/mesa/state_tracker/st_atom_texture.c +++ b/mesalib/src/mesa/state_tracker/st_atom_texture.c @@ -1,377 +1,379 @@ -/************************************************************************** - * - * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. - * All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the - * "Software"), to deal in the Software without restriction, including - * without limitation the rights to use, copy, modify, merge, publish, - * distribute, sub license, and/or sell copies of the Software, and to - * permit persons to whom the Software is furnished to do so, subject to - * the following conditions: - * - * The above copyright notice and this permission notice (including the - * next paragraph) shall be included in all copies or substantial portions - * of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * - **************************************************************************/ - - /* - * Authors: - * Keith Whitwell - * Brian Paul - */ - - -#include "main/macros.h" -#include "main/mtypes.h" -#include "main/samplerobj.h" -#include "program/prog_instruction.h" - -#include "st_context.h" -#include "st_atom.h" -#include "st_texture.h" -#include "st_format.h" -#include "st_cb_texture.h" -#include "pipe/p_context.h" -#include "util/u_format.h" -#include "util/u_inlines.h" -#include "cso_cache/cso_context.h" - - -/** - * Combine depth texture mode with "swizzle" so that depth mode swizzling - * takes place before texture swizzling, and return the resulting swizzle. - * If the format is not a depth format, return "swizzle" unchanged. - * - * \param format PIPE_FORMAT_*. - * \param swizzle Texture swizzle, a bitmask computed using MAKE_SWIZZLE4. - * \param depthmode One of GL_LUMINANCE, GL_INTENSITY, GL_ALPHA, GL_RED. - */ -static GLuint -apply_depthmode(enum pipe_format format, GLuint swizzle, GLenum depthmode) -{ - const struct util_format_description *desc = - util_format_description(format); - unsigned char swiz[4]; - unsigned i; - - if (desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS || - desc->swizzle[0] == UTIL_FORMAT_SWIZZLE_NONE) { - /* Not a depth format. */ - return swizzle; - } - - for (i = 0; i < 4; i++) - swiz[i] = GET_SWZ(swizzle, i); - - switch (depthmode) { - case GL_LUMINANCE: - /* Rewrite reads from W to ONE, and reads from XYZ to XXX. */ - for (i = 0; i < 4; i++) - if (swiz[i] == SWIZZLE_W) - swiz[i] = SWIZZLE_ONE; - else if (swiz[i] < SWIZZLE_W) - swiz[i] = SWIZZLE_X; - break; - - case GL_INTENSITY: - /* Rewrite reads from XYZW to XXXX. */ - for (i = 0; i < 4; i++) - if (swiz[i] <= SWIZZLE_W) - swiz[i] = SWIZZLE_X; - break; - - case GL_ALPHA: - /* Rewrite reads from W to X, and reads from XYZ to 000. */ - for (i = 0; i < 4; i++) - if (swiz[i] == SWIZZLE_W) - swiz[i] = SWIZZLE_X; - else if (swiz[i] < SWIZZLE_W) - swiz[i] = SWIZZLE_ZERO; - break; - case GL_RED: - /* Rewrite reads W to 1, XYZ to X00 */ - for (i = 0; i < 4; i++) - if (swiz[i] == SWIZZLE_W) - swiz[i] = SWIZZLE_ONE; - else if (swiz[i] == SWIZZLE_Y || swiz[i] == SWIZZLE_Z) - swiz[i] = SWIZZLE_ZERO; - break; - } - - return MAKE_SWIZZLE4(swiz[0], swiz[1], swiz[2], swiz[3]); -} - - -/** - * Return TRUE if the swizzling described by "swizzle" and - * "depthmode" (for depth textures only) is different from the swizzling - * set in the given sampler view. - * - * \param sv A sampler view. - * \param swizzle Texture swizzle, a bitmask computed using MAKE_SWIZZLE4. - * \param depthmode One of GL_LUMINANCE, GL_INTENSITY, GL_ALPHA. - */ -static boolean -check_sampler_swizzle(struct pipe_sampler_view *sv, - GLuint swizzle, GLenum depthmode) -{ - swizzle = apply_depthmode(sv->texture->format, swizzle, depthmode); - - if ((sv->swizzle_r != GET_SWZ(swizzle, 0)) || - (sv->swizzle_g != GET_SWZ(swizzle, 1)) || - (sv->swizzle_b != GET_SWZ(swizzle, 2)) || - (sv->swizzle_a != GET_SWZ(swizzle, 3))) - return TRUE; - return FALSE; -} - - -static INLINE struct pipe_sampler_view * -st_create_texture_sampler_view_from_stobj(struct pipe_context *pipe, - struct st_texture_object *stObj, - const struct gl_sampler_object *samp, - enum pipe_format format) -{ - struct pipe_sampler_view templ; - GLuint swizzle = apply_depthmode(stObj->pt->format, - stObj->base._Swizzle, - samp->DepthMode); - - u_sampler_view_default_template(&templ, - stObj->pt, - format); - templ.u.tex.first_level = stObj->base.BaseLevel; - - if (swizzle != SWIZZLE_NOOP) { - templ.swizzle_r = GET_SWZ(swizzle, 0); - templ.swizzle_g = GET_SWZ(swizzle, 1); - templ.swizzle_b = GET_SWZ(swizzle, 2); - templ.swizzle_a = GET_SWZ(swizzle, 3); - } - - return pipe->create_sampler_view(pipe, stObj->pt, &templ); -} - - -static INLINE struct pipe_sampler_view * -st_get_texture_sampler_view_from_stobj(struct st_texture_object *stObj, - struct pipe_context *pipe, - const struct gl_sampler_object *samp, - enum pipe_format format) -{ - if (!stObj || !stObj->pt) { - return NULL; - } - - if (!stObj->sampler_view) { - stObj->sampler_view = - st_create_texture_sampler_view_from_stobj(pipe, stObj, samp, format); - } - - return stObj->sampler_view; -} - -static GLboolean -update_single_texture(struct st_context *st, struct pipe_sampler_view **sampler_view, - GLuint texUnit) -{ - struct pipe_context *pipe = st->pipe; - const struct gl_sampler_object *samp; - struct gl_texture_object *texObj; - struct st_texture_object *stObj; - enum pipe_format st_view_format; - GLboolean retval; - - samp = _mesa_get_samplerobj(st->ctx, texUnit); - - texObj = st->ctx->Texture.Unit[texUnit]._Current; - - if (!texObj) { - texObj = st_get_default_texture(st); - samp = &texObj->Sampler; - } - stObj = st_texture_object(texObj); - - retval = st_finalize_texture(st->ctx, st->pipe, texObj); - if (!retval) { - /* out of mem */ - return GL_FALSE; - } - - /* Determine the format of the texture sampler view */ - st_view_format = stObj->pt->format; - { - const struct st_texture_image *firstImage = - st_texture_image(stObj->base.Image[0][stObj->base.BaseLevel]); - const gl_format texFormat = firstImage->base.TexFormat; - enum pipe_format firstImageFormat = - st_mesa_format_to_pipe_format(texFormat); - - if ((samp->sRGBDecode == GL_SKIP_DECODE_EXT) && - (_mesa_get_format_color_encoding(texFormat) == GL_SRGB)) { - /* don't do sRGB->RGB conversion. Interpret the texture - * texture data as linear values. - */ - const gl_format linearFormat = - _mesa_get_srgb_format_linear(texFormat); - firstImageFormat = st_mesa_format_to_pipe_format(linearFormat); - } - - if (firstImageFormat != stObj->pt->format) - st_view_format = firstImageFormat; - } - - - /* if sampler view has changed dereference it */ - if (stObj->sampler_view) { - if (check_sampler_swizzle(stObj->sampler_view, - stObj->base._Swizzle, - samp->DepthMode) || - (st_view_format != stObj->sampler_view->format) || - stObj->base.BaseLevel != stObj->sampler_view->u.tex.first_level) { - pipe_sampler_view_reference(&stObj->sampler_view, NULL); - } - } - - *sampler_view = st_get_texture_sampler_view_from_stobj(stObj, pipe, - samp, - st_view_format); - return GL_TRUE; -} - -static void -update_vertex_textures(struct st_context *st) -{ - struct gl_vertex_program *vprog = st->ctx->VertexProgram._Current; - GLuint su; - - st->state.num_vertex_textures = 0; - - /* loop over sampler units (aka tex image units) */ - for (su = 0; su < st->ctx->Const.MaxTextureImageUnits; su++) { - struct pipe_sampler_view *sampler_view = NULL; - if (vprog->Base.SamplersUsed & (1 << su)) { - GLboolean retval; - GLuint texUnit; - - texUnit = vprog->Base.SamplerUnits[su]; - - retval = update_single_texture(st, &sampler_view, texUnit); - if (retval == GL_FALSE) - continue; - - st->state.num_vertex_textures = su + 1; - - } - pipe_sampler_view_reference(&st->state.sampler_vertex_views[su], sampler_view); - } - - if (st->ctx->Const.MaxVertexTextureImageUnits > 0) { - GLuint numUnits = MIN2(st->state.num_vertex_textures, - st->ctx->Const.MaxVertexTextureImageUnits); - cso_set_vertex_sampler_views(st->cso_context, - numUnits, - st->state.sampler_vertex_views); - } -} - -static void -update_fragment_textures(struct st_context *st) -{ - struct gl_fragment_program *fprog = st->ctx->FragmentProgram._Current; - GLuint su; - - st->state.num_textures = 0; - - /* loop over sampler units (aka tex image units) */ - for (su = 0; su < st->ctx->Const.MaxTextureImageUnits; su++) { - struct pipe_sampler_view *sampler_view = NULL; - if (fprog->Base.SamplersUsed & (1 << su)) { - GLboolean retval; - GLuint texUnit; - - texUnit = fprog->Base.SamplerUnits[su]; - - retval = update_single_texture(st, &sampler_view, texUnit); - if (retval == GL_FALSE) - continue; - - st->state.num_textures = su + 1; - } - pipe_sampler_view_reference(&st->state.sampler_views[su], sampler_view); - } - - cso_set_fragment_sampler_views(st->cso_context, - st->state.num_textures, - st->state.sampler_views); -} - -static void -update_textures(struct st_context *st) -{ - update_fragment_textures(st); - update_vertex_textures(st); -} - -const struct st_tracked_state st_update_texture = { - "st_update_texture", /* name */ - { /* dirty */ - _NEW_TEXTURE, /* mesa */ - ST_NEW_FRAGMENT_PROGRAM, /* st */ - }, - update_textures /* update */ -}; - -static void -finalize_textures(struct st_context *st) -{ - struct gl_fragment_program *fprog = st->ctx->FragmentProgram._Current; - const GLboolean prev_missing_textures = st->missing_textures; - GLuint su; - - st->missing_textures = GL_FALSE; - - for (su = 0; su < st->ctx->Const.MaxTextureCoordUnits; su++) { - if (fprog->Base.SamplersUsed & (1 << su)) { - const GLuint texUnit = fprog->Base.SamplerUnits[su]; - struct gl_texture_object *texObj - = st->ctx->Texture.Unit[texUnit]._Current; - - if (texObj) { - GLboolean retval; - - retval = st_finalize_texture(st->ctx, st->pipe, texObj); - if (!retval) { - /* out of mem */ - st->missing_textures = GL_TRUE; - continue; - } - } - } - } - - if (prev_missing_textures != st->missing_textures) - st->dirty.st |= ST_NEW_FRAGMENT_PROGRAM; -} - - - -const struct st_tracked_state st_finalize_textures = { - "st_finalize_textures", /* name */ - { /* dirty */ - _NEW_TEXTURE, /* mesa */ - 0, /* st */ - }, - finalize_textures /* update */ -}; +/************************************************************************** + * + * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + + /* + * Authors: + * Keith Whitwell + * Brian Paul + */ + + +#include "main/macros.h" +#include "main/mtypes.h" +#include "main/samplerobj.h" +#include "program/prog_instruction.h" + +#include "st_context.h" +#include "st_atom.h" +#include "st_texture.h" +#include "st_format.h" +#include "st_cb_texture.h" +#include "pipe/p_context.h" +#include "util/u_format.h" +#include "util/u_inlines.h" +#include "cso_cache/cso_context.h" + + +/** + * Combine depth texture mode with "swizzle" so that depth mode swizzling + * takes place before texture swizzling, and return the resulting swizzle. + * If the format is not a depth format, return "swizzle" unchanged. + * + * \param format PIPE_FORMAT_*. + * \param swizzle Texture swizzle, a bitmask computed using MAKE_SWIZZLE4. + * \param depthmode One of GL_LUMINANCE, GL_INTENSITY, GL_ALPHA, GL_RED. + */ +static GLuint +apply_depthmode(enum pipe_format format, GLuint swizzle, GLenum depthmode) +{ + const struct util_format_description *desc = + util_format_description(format); + unsigned char swiz[4]; + unsigned i; + + if (desc->colorspace != UTIL_FORMAT_COLORSPACE_ZS || + desc->swizzle[0] == UTIL_FORMAT_SWIZZLE_NONE) { + /* Not a depth format. */ + return swizzle; + } + + for (i = 0; i < 4; i++) + swiz[i] = GET_SWZ(swizzle, i); + + switch (depthmode) { + case GL_LUMINANCE: + /* Rewrite reads from W to ONE, and reads from XYZ to XXX. */ + for (i = 0; i < 4; i++) + if (swiz[i] == SWIZZLE_W) + swiz[i] = SWIZZLE_ONE; + else if (swiz[i] < SWIZZLE_W) + swiz[i] = SWIZZLE_X; + break; + + case GL_INTENSITY: + /* Rewrite reads from XYZW to XXXX. */ + for (i = 0; i < 4; i++) + if (swiz[i] <= SWIZZLE_W) + swiz[i] = SWIZZLE_X; + break; + + case GL_ALPHA: + /* Rewrite reads from W to X, and reads from XYZ to 000. */ + for (i = 0; i < 4; i++) + if (swiz[i] == SWIZZLE_W) + swiz[i] = SWIZZLE_X; + else if (swiz[i] < SWIZZLE_W) + swiz[i] = SWIZZLE_ZERO; + break; + case GL_RED: + /* Rewrite reads W to 1, XYZ to X00 */ + for (i = 0; i < 4; i++) + if (swiz[i] == SWIZZLE_W) + swiz[i] = SWIZZLE_ONE; + else if (swiz[i] == SWIZZLE_Y || swiz[i] == SWIZZLE_Z) + swiz[i] = SWIZZLE_ZERO; + break; + } + + return MAKE_SWIZZLE4(swiz[0], swiz[1], swiz[2], swiz[3]); +} + + +/** + * Return TRUE if the swizzling described by "swizzle" and + * "depthmode" (for depth textures only) is different from the swizzling + * set in the given sampler view. + * + * \param sv A sampler view. + * \param swizzle Texture swizzle, a bitmask computed using MAKE_SWIZZLE4. + * \param depthmode One of GL_LUMINANCE, GL_INTENSITY, GL_ALPHA. + */ +static boolean +check_sampler_swizzle(struct pipe_sampler_view *sv, + GLuint swizzle, GLenum depthmode) +{ + swizzle = apply_depthmode(sv->texture->format, swizzle, depthmode); + + if ((sv->swizzle_r != GET_SWZ(swizzle, 0)) || + (sv->swizzle_g != GET_SWZ(swizzle, 1)) || + (sv->swizzle_b != GET_SWZ(swizzle, 2)) || + (sv->swizzle_a != GET_SWZ(swizzle, 3))) + return TRUE; + return FALSE; +} + + +static INLINE struct pipe_sampler_view * +st_create_texture_sampler_view_from_stobj(struct pipe_context *pipe, + struct st_texture_object *stObj, + const struct gl_sampler_object *samp, + enum pipe_format format) +{ + struct pipe_sampler_view templ; + GLuint swizzle = apply_depthmode(stObj->pt->format, + stObj->base._Swizzle, + samp->DepthMode); + + u_sampler_view_default_template(&templ, + stObj->pt, + format); + templ.u.tex.first_level = stObj->base.BaseLevel; + + if (swizzle != SWIZZLE_NOOP) { + templ.swizzle_r = GET_SWZ(swizzle, 0); + templ.swizzle_g = GET_SWZ(swizzle, 1); + templ.swizzle_b = GET_SWZ(swizzle, 2); + templ.swizzle_a = GET_SWZ(swizzle, 3); + } + + return pipe->create_sampler_view(pipe, stObj->pt, &templ); +} + + +static INLINE struct pipe_sampler_view * +st_get_texture_sampler_view_from_stobj(struct st_texture_object *stObj, + struct pipe_context *pipe, + const struct gl_sampler_object *samp, + enum pipe_format format) +{ + if (!stObj || !stObj->pt) { + return NULL; + } + + if (!stObj->sampler_view) { + stObj->sampler_view = + st_create_texture_sampler_view_from_stobj(pipe, stObj, samp, format); + } + + return stObj->sampler_view; +} + +static GLboolean +update_single_texture(struct st_context *st, struct pipe_sampler_view **sampler_view, + GLuint texUnit) +{ + struct pipe_context *pipe = st->pipe; + const struct gl_sampler_object *samp; + struct gl_texture_object *texObj; + struct st_texture_object *stObj; + enum pipe_format st_view_format; + GLboolean retval; + + samp = _mesa_get_samplerobj(st->ctx, texUnit); + + texObj = st->ctx->Texture.Unit[texUnit]._Current; + + if (!texObj) { + texObj = st_get_default_texture(st); + samp = &texObj->Sampler; + } + stObj = st_texture_object(texObj); + + retval = st_finalize_texture(st->ctx, st->pipe, texObj); + if (!retval) { + /* out of mem */ + return GL_FALSE; + } + + /* Determine the format of the texture sampler view */ + st_view_format = stObj->pt->format; + { + const struct st_texture_image *firstImage = + st_texture_image(stObj->base.Image[0][stObj->base.BaseLevel]); + const gl_format texFormat = firstImage->base.TexFormat; + enum pipe_format firstImageFormat = + st_mesa_format_to_pipe_format(texFormat); + + if ((samp->sRGBDecode == GL_SKIP_DECODE_EXT) && + (_mesa_get_format_color_encoding(texFormat) == GL_SRGB)) { + /* don't do sRGB->RGB conversion. Interpret the texture + * texture data as linear values. + */ + const gl_format linearFormat = + _mesa_get_srgb_format_linear(texFormat); + firstImageFormat = st_mesa_format_to_pipe_format(linearFormat); + } + + if (firstImageFormat != stObj->pt->format) + st_view_format = firstImageFormat; + } + + + /* if sampler view has changed dereference it */ + if (stObj->sampler_view) { + if (check_sampler_swizzle(stObj->sampler_view, + stObj->base._Swizzle, + samp->DepthMode) || + (st_view_format != stObj->sampler_view->format) || + stObj->base.BaseLevel != stObj->sampler_view->u.tex.first_level) { + pipe_sampler_view_reference(&stObj->sampler_view, NULL); + } + } + + *sampler_view = st_get_texture_sampler_view_from_stobj(stObj, pipe, + samp, + st_view_format); + return GL_TRUE; +} + +static void +update_vertex_textures(struct st_context *st) +{ + struct gl_vertex_program *vprog = st->ctx->VertexProgram._Current; + GLuint su; + + st->state.num_vertex_textures = 0; + + /* loop over sampler units (aka tex image units) */ + for (su = 0; su < st->ctx->Const.MaxTextureImageUnits; su++) { + struct pipe_sampler_view *sampler_view = NULL; + if (vprog->Base.SamplersUsed & (1 << su)) { + GLboolean retval; + GLuint texUnit; + + texUnit = vprog->Base.SamplerUnits[su]; + + retval = update_single_texture(st, &sampler_view, texUnit); + if (retval == GL_FALSE) + continue; + + st->state.num_vertex_textures = su + 1; + + } + pipe_sampler_view_reference(&st->state.sampler_vertex_views[su], sampler_view); + } + + if (st->ctx->Const.MaxVertexTextureImageUnits > 0) { + GLuint numUnits = MIN2(st->state.num_vertex_textures, + st->ctx->Const.MaxVertexTextureImageUnits); + cso_set_vertex_sampler_views(st->cso_context, + numUnits, + st->state.sampler_vertex_views); + } +} + +static void +update_fragment_textures(struct st_context *st) +{ + struct gl_fragment_program *fprog = st->ctx->FragmentProgram._Current; + GLuint su; + + st->state.num_textures = 0; + + /* loop over sampler units (aka tex image units) */ + for (su = 0; su < st->ctx->Const.MaxTextureImageUnits; su++) { + struct pipe_sampler_view *sampler_view = NULL; + if (fprog->Base.SamplersUsed & (1 << su)) { + GLboolean retval; + GLuint texUnit; + + texUnit = fprog->Base.SamplerUnits[su]; + + retval = update_single_texture(st, &sampler_view, texUnit); + if (retval == GL_FALSE) + continue; + + st->state.num_textures = su + 1; + } + pipe_sampler_view_reference(&st->state.sampler_views[su], sampler_view); + } + + cso_set_fragment_sampler_views(st->cso_context, + st->state.num_textures, + st->state.sampler_views); +} + +const struct st_tracked_state st_update_texture = { + "st_update_texture", /* name */ + { /* dirty */ + _NEW_TEXTURE, /* mesa */ + ST_NEW_FRAGMENT_PROGRAM, /* st */ + }, + update_fragment_textures /* update */ +}; + +const struct st_tracked_state st_update_vertex_texture = { + "st_update_vertex_texture", /* name */ + { /* dirty */ + _NEW_TEXTURE, /* mesa */ + ST_NEW_VERTEX_PROGRAM, /* st */ + }, + update_vertex_textures /* update */ +}; + +static void +finalize_textures(struct st_context *st) +{ + struct gl_fragment_program *fprog = st->ctx->FragmentProgram._Current; + const GLboolean prev_missing_textures = st->missing_textures; + GLuint su; + + st->missing_textures = GL_FALSE; + + for (su = 0; su < st->ctx->Const.MaxTextureCoordUnits; su++) { + if (fprog->Base.SamplersUsed & (1 << su)) { + const GLuint texUnit = fprog->Base.SamplerUnits[su]; + struct gl_texture_object *texObj + = st->ctx->Texture.Unit[texUnit]._Current; + + if (texObj) { + GLboolean retval; + + retval = st_finalize_texture(st->ctx, st->pipe, texObj); + if (!retval) { + /* out of mem */ + st->missing_textures = GL_TRUE; + continue; + } + } + } + } + + if (prev_missing_textures != st->missing_textures) + st->dirty.st |= ST_NEW_FRAGMENT_PROGRAM; +} + + + +const struct st_tracked_state st_finalize_textures = { + "st_finalize_textures", /* name */ + { /* dirty */ + _NEW_TEXTURE, /* mesa */ + 0, /* st */ + }, + finalize_textures /* update */ +}; diff --git a/mesalib/src/mesa/state_tracker/st_cb_fbo.c b/mesalib/src/mesa/state_tracker/st_cb_fbo.c index 0fc743a87..2e87d202c 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_fbo.c +++ b/mesalib/src/mesa/state_tracker/st_cb_fbo.c @@ -90,6 +90,7 @@ st_renderbuffer_alloc_storage(struct gl_context * ctx, strb->Base.Format = st_pipe_format_to_mesa_format(format); strb->Base._BaseFormat = _mesa_base_fbo_format(ctx, internalFormat); strb->Base.DataType = st_format_datatype(format); + strb->format = format; strb->defined = GL_FALSE; /* undefined contents now */ diff --git a/mesalib/src/mesa/swrast/s_span.c b/mesalib/src/mesa/swrast/s_span.c index f0524e061..7f88b6dd4 100644 --- a/mesalib/src/mesa/swrast/s_span.c +++ b/mesalib/src/mesa/swrast/s_span.c @@ -1,1509 +1,1516 @@ -/* - * Mesa 3-D graphics library - * Version: 7.5 - * - * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. - * Copyright (C) 2009 VMware, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -/** - * \file swrast/s_span.c - * \brief Span processing functions used by all rasterization functions. - * This is where all the per-fragment tests are performed - * \author Brian Paul - */ - -#include "main/glheader.h" -#include "main/colormac.h" -#include "main/macros.h" -#include "main/imports.h" -#include "main/image.h" - -#include "s_atifragshader.h" -#include "s_alpha.h" -#include "s_blend.h" -#include "s_context.h" -#include "s_depth.h" -#include "s_fog.h" -#include "s_logic.h" -#include "s_masking.h" -#include "s_fragprog.h" -#include "s_span.h" -#include "s_stencil.h" -#include "s_texcombine.h" - - -/** - * Set default fragment attributes for the span using the - * current raster values. Used prior to glDraw/CopyPixels - * and glBitmap. - */ -void -_swrast_span_default_attribs(struct gl_context *ctx, SWspan *span) -{ - GLchan r, g, b, a; - /* Z*/ - { - const GLfloat depthMax = ctx->DrawBuffer->_DepthMaxF; - if (ctx->DrawBuffer->Visual.depthBits <= 16) - span->z = FloatToFixed(ctx->Current.RasterPos[2] * depthMax + 0.5F); - else { - GLfloat tmpf = ctx->Current.RasterPos[2] * depthMax; - tmpf = MIN2(tmpf, depthMax); - span->z = (GLint)tmpf; - } - span->zStep = 0; - span->interpMask |= SPAN_Z; - } - - /* W (for perspective correction) */ - span->attrStart[FRAG_ATTRIB_WPOS][3] = 1.0; - span->attrStepX[FRAG_ATTRIB_WPOS][3] = 0.0; - span->attrStepY[FRAG_ATTRIB_WPOS][3] = 0.0; - - /* primary color, or color index */ - UNCLAMPED_FLOAT_TO_CHAN(r, ctx->Current.RasterColor[0]); - UNCLAMPED_FLOAT_TO_CHAN(g, ctx->Current.RasterColor[1]); - UNCLAMPED_FLOAT_TO_CHAN(b, ctx->Current.RasterColor[2]); - UNCLAMPED_FLOAT_TO_CHAN(a, ctx->Current.RasterColor[3]); -#if CHAN_TYPE == GL_FLOAT - span->red = r; - span->green = g; - span->blue = b; - span->alpha = a; -#else - span->red = IntToFixed(r); - span->green = IntToFixed(g); - span->blue = IntToFixed(b); - span->alpha = IntToFixed(a); -#endif - span->redStep = 0; - span->greenStep = 0; - span->blueStep = 0; - span->alphaStep = 0; - span->interpMask |= SPAN_RGBA; - - COPY_4V(span->attrStart[FRAG_ATTRIB_COL0], ctx->Current.RasterColor); - ASSIGN_4V(span->attrStepX[FRAG_ATTRIB_COL0], 0.0, 0.0, 0.0, 0.0); - ASSIGN_4V(span->attrStepY[FRAG_ATTRIB_COL0], 0.0, 0.0, 0.0, 0.0); - - /* Secondary color */ - if (ctx->Light.Enabled || ctx->Fog.ColorSumEnabled) - { - COPY_4V(span->attrStart[FRAG_ATTRIB_COL1], ctx->Current.RasterSecondaryColor); - ASSIGN_4V(span->attrStepX[FRAG_ATTRIB_COL1], 0.0, 0.0, 0.0, 0.0); - ASSIGN_4V(span->attrStepY[FRAG_ATTRIB_COL1], 0.0, 0.0, 0.0, 0.0); - } - - /* fog */ - { - const SWcontext *swrast = SWRAST_CONTEXT(ctx); - GLfloat fogVal; /* a coord or a blend factor */ - if (swrast->_PreferPixelFog) { - /* fog blend factors will be computed from fog coordinates per pixel */ - fogVal = ctx->Current.RasterDistance; - } - else { - /* fog blend factor should be computed from fogcoord now */ - fogVal = _swrast_z_to_fogfactor(ctx, ctx->Current.RasterDistance); - } - span->attrStart[FRAG_ATTRIB_FOGC][0] = fogVal; - span->attrStepX[FRAG_ATTRIB_FOGC][0] = 0.0; - span->attrStepY[FRAG_ATTRIB_FOGC][0] = 0.0; - } - - /* texcoords */ - { - GLuint i; - for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { - const GLuint attr = FRAG_ATTRIB_TEX0 + i; - const GLfloat *tc = ctx->Current.RasterTexCoords[i]; - if (ctx->FragmentProgram._Current || ctx->ATIFragmentShader._Enabled) { - COPY_4V(span->attrStart[attr], tc); - } - else if (tc[3] > 0.0F) { - /* use (s/q, t/q, r/q, 1) */ - span->attrStart[attr][0] = tc[0] / tc[3]; - span->attrStart[attr][1] = tc[1] / tc[3]; - span->attrStart[attr][2] = tc[2] / tc[3]; - span->attrStart[attr][3] = 1.0; - } - else { - ASSIGN_4V(span->attrStart[attr], 0.0F, 0.0F, 0.0F, 1.0F); - } - ASSIGN_4V(span->attrStepX[attr], 0.0F, 0.0F, 0.0F, 0.0F); - ASSIGN_4V(span->attrStepY[attr], 0.0F, 0.0F, 0.0F, 0.0F); - } - } -} - - -/** - * Interpolate the active attributes (and'd with attrMask) to - * fill in span->array->attribs[]. - * Perspective correction will be done. The point/line/triangle function - * should have computed attrStart/Step values for FRAG_ATTRIB_WPOS[3]! - */ -static INLINE void -interpolate_active_attribs(struct gl_context *ctx, SWspan *span, GLbitfield attrMask) -{ - const SWcontext *swrast = SWRAST_CONTEXT(ctx); - - /* - * Don't overwrite existing array values, such as colors that may have - * been produced by glDraw/CopyPixels. - */ - attrMask &= ~span->arrayAttribs; - - ATTRIB_LOOP_BEGIN - if (attrMask & (1 << attr)) { - const GLfloat dwdx = span->attrStepX[FRAG_ATTRIB_WPOS][3]; - GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3]; - const GLfloat dv0dx = span->attrStepX[attr][0]; - const GLfloat dv1dx = span->attrStepX[attr][1]; - const GLfloat dv2dx = span->attrStepX[attr][2]; - const GLfloat dv3dx = span->attrStepX[attr][3]; - GLfloat v0 = span->attrStart[attr][0] + span->leftClip * dv0dx; - GLfloat v1 = span->attrStart[attr][1] + span->leftClip * dv1dx; - GLfloat v2 = span->attrStart[attr][2] + span->leftClip * dv2dx; - GLfloat v3 = span->attrStart[attr][3] + span->leftClip * dv3dx; - GLuint k; - for (k = 0; k < span->end; k++) { - const GLfloat invW = 1.0f / w; - span->array->attribs[attr][k][0] = v0 * invW; - span->array->attribs[attr][k][1] = v1 * invW; - span->array->attribs[attr][k][2] = v2 * invW; - span->array->attribs[attr][k][3] = v3 * invW; - v0 += dv0dx; - v1 += dv1dx; - v2 += dv2dx; - v3 += dv3dx; - w += dwdx; - } - ASSERT((span->arrayAttribs & (1 << attr)) == 0); - span->arrayAttribs |= (1 << attr); - } - ATTRIB_LOOP_END -} - - -/** - * Interpolate primary colors to fill in the span->array->rgba8 (or rgb16) - * color array. - */ -static INLINE void -interpolate_int_colors(struct gl_context *ctx, SWspan *span) -{ - const GLuint n = span->end; - GLuint i; - -#if CHAN_BITS != 32 - ASSERT(!(span->arrayMask & SPAN_RGBA)); -#endif - - switch (span->array->ChanType) { -#if CHAN_BITS != 32 - case GL_UNSIGNED_BYTE: - { - GLubyte (*rgba)[4] = span->array->rgba8; - if (span->interpMask & SPAN_FLAT) { - GLubyte color[4]; - color[RCOMP] = FixedToInt(span->red); - color[GCOMP] = FixedToInt(span->green); - color[BCOMP] = FixedToInt(span->blue); - color[ACOMP] = FixedToInt(span->alpha); - for (i = 0; i < n; i++) { - COPY_4UBV(rgba[i], color); - } - } - else { - GLfixed r = span->red; - GLfixed g = span->green; - GLfixed b = span->blue; - GLfixed a = span->alpha; - GLint dr = span->redStep; - GLint dg = span->greenStep; - GLint db = span->blueStep; - GLint da = span->alphaStep; - for (i = 0; i < n; i++) { - rgba[i][RCOMP] = FixedToChan(r); - rgba[i][GCOMP] = FixedToChan(g); - rgba[i][BCOMP] = FixedToChan(b); - rgba[i][ACOMP] = FixedToChan(a); - r += dr; - g += dg; - b += db; - a += da; - } - } - } - break; - case GL_UNSIGNED_SHORT: - { - GLushort (*rgba)[4] = span->array->rgba16; - if (span->interpMask & SPAN_FLAT) { - GLushort color[4]; - color[RCOMP] = FixedToInt(span->red); - color[GCOMP] = FixedToInt(span->green); - color[BCOMP] = FixedToInt(span->blue); - color[ACOMP] = FixedToInt(span->alpha); - for (i = 0; i < n; i++) { - COPY_4V(rgba[i], color); - } - } - else { - GLushort (*rgba)[4] = span->array->rgba16; - GLfixed r, g, b, a; - GLint dr, dg, db, da; - r = span->red; - g = span->green; - b = span->blue; - a = span->alpha; - dr = span->redStep; - dg = span->greenStep; - db = span->blueStep; - da = span->alphaStep; - for (i = 0; i < n; i++) { - rgba[i][RCOMP] = FixedToChan(r); - rgba[i][GCOMP] = FixedToChan(g); - rgba[i][BCOMP] = FixedToChan(b); - rgba[i][ACOMP] = FixedToChan(a); - r += dr; - g += dg; - b += db; - a += da; - } - } - } - break; -#endif - case GL_FLOAT: - interpolate_active_attribs(ctx, span, FRAG_BIT_COL0); - break; - default: - _mesa_problem(ctx, "bad datatype 0x%x in interpolate_int_colors", - span->array->ChanType); - } - span->arrayMask |= SPAN_RGBA; -} - - -/** - * Populate the FRAG_ATTRIB_COL0 array. - */ -static INLINE void -interpolate_float_colors(SWspan *span) -{ - GLfloat (*col0)[4] = span->array->attribs[FRAG_ATTRIB_COL0]; - const GLuint n = span->end; - GLuint i; - - assert(!(span->arrayAttribs & FRAG_BIT_COL0)); - - if (span->arrayMask & SPAN_RGBA) { - /* convert array of int colors */ - for (i = 0; i < n; i++) { - col0[i][0] = UBYTE_TO_FLOAT(span->array->rgba8[i][0]); - col0[i][1] = UBYTE_TO_FLOAT(span->array->rgba8[i][1]); - col0[i][2] = UBYTE_TO_FLOAT(span->array->rgba8[i][2]); - col0[i][3] = UBYTE_TO_FLOAT(span->array->rgba8[i][3]); - } - } - else { - /* interpolate red/green/blue/alpha to get float colors */ - ASSERT(span->interpMask & SPAN_RGBA); - if (span->interpMask & SPAN_FLAT) { - GLfloat r = FixedToFloat(span->red); - GLfloat g = FixedToFloat(span->green); - GLfloat b = FixedToFloat(span->blue); - GLfloat a = FixedToFloat(span->alpha); - for (i = 0; i < n; i++) { - ASSIGN_4V(col0[i], r, g, b, a); - } - } - else { - GLfloat r = FixedToFloat(span->red); - GLfloat g = FixedToFloat(span->green); - GLfloat b = FixedToFloat(span->blue); - GLfloat a = FixedToFloat(span->alpha); - GLfloat dr = FixedToFloat(span->redStep); - GLfloat dg = FixedToFloat(span->greenStep); - GLfloat db = FixedToFloat(span->blueStep); - GLfloat da = FixedToFloat(span->alphaStep); - for (i = 0; i < n; i++) { - col0[i][0] = r; - col0[i][1] = g; - col0[i][2] = b; - col0[i][3] = a; - r += dr; - g += dg; - b += db; - a += da; - } - } - } - - span->arrayAttribs |= FRAG_BIT_COL0; - span->array->ChanType = GL_FLOAT; -} - - - -/** - * Fill in the span.zArray array from the span->z, zStep values. - */ -void -_swrast_span_interpolate_z( const struct gl_context *ctx, SWspan *span ) -{ - const GLuint n = span->end; - GLuint i; - - ASSERT(!(span->arrayMask & SPAN_Z)); - - if (ctx->DrawBuffer->Visual.depthBits <= 16) { - GLfixed zval = span->z; - GLuint *z = span->array->z; - for (i = 0; i < n; i++) { - z[i] = FixedToInt(zval); - zval += span->zStep; - } - } - else { - /* Deep Z buffer, no fixed->int shift */ - GLuint zval = span->z; - GLuint *z = span->array->z; - for (i = 0; i < n; i++) { - z[i] = zval; - zval += span->zStep; - } - } - span->interpMask &= ~SPAN_Z; - span->arrayMask |= SPAN_Z; -} - - -/** - * Compute mipmap LOD from partial derivatives. - * This the ideal solution, as given in the OpenGL spec. - */ -GLfloat -_swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy, - GLfloat dqdx, GLfloat dqdy, GLfloat texW, GLfloat texH, - GLfloat s, GLfloat t, GLfloat q, GLfloat invQ) -{ - GLfloat dudx = texW * ((s + dsdx) / (q + dqdx) - s * invQ); - GLfloat dvdx = texH * ((t + dtdx) / (q + dqdx) - t * invQ); - GLfloat dudy = texW * ((s + dsdy) / (q + dqdy) - s * invQ); - GLfloat dvdy = texH * ((t + dtdy) / (q + dqdy) - t * invQ); - GLfloat x = SQRTF(dudx * dudx + dvdx * dvdx); - GLfloat y = SQRTF(dudy * dudy + dvdy * dvdy); - GLfloat rho = MAX2(x, y); - GLfloat lambda = LOG2(rho); - return lambda; -} - - -/** - * Compute mipmap LOD from partial derivatives. - * This is a faster approximation than above function. - */ -#if 0 -GLfloat -_swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy, - GLfloat dqdx, GLfloat dqdy, GLfloat texW, GLfloat texH, - GLfloat s, GLfloat t, GLfloat q, GLfloat invQ) -{ - GLfloat dsdx2 = (s + dsdx) / (q + dqdx) - s * invQ; - GLfloat dtdx2 = (t + dtdx) / (q + dqdx) - t * invQ; - GLfloat dsdy2 = (s + dsdy) / (q + dqdy) - s * invQ; - GLfloat dtdy2 = (t + dtdy) / (q + dqdy) - t * invQ; - GLfloat maxU, maxV, rho, lambda; - dsdx2 = FABSF(dsdx2); - dsdy2 = FABSF(dsdy2); - dtdx2 = FABSF(dtdx2); - dtdy2 = FABSF(dtdy2); - maxU = MAX2(dsdx2, dsdy2) * texW; - maxV = MAX2(dtdx2, dtdy2) * texH; - rho = MAX2(maxU, maxV); - lambda = LOG2(rho); - return lambda; -} -#endif - - -/** - * Fill in the span.array->attrib[FRAG_ATTRIB_TEXn] arrays from the - * using the attrStart/Step values. - * - * This function only used during fixed-function fragment processing. - * - * Note: in the places where we divide by Q (or mult by invQ) we're - * really doing two things: perspective correction and texcoord - * projection. Remember, for texcoord (s,t,r,q) we need to index - * texels with (s/q, t/q, r/q). - */ -static void -interpolate_texcoords(struct gl_context *ctx, SWspan *span) -{ - const GLuint maxUnit - = (ctx->Texture._EnabledCoordUnits > 1) ? ctx->Const.MaxTextureUnits : 1; - GLuint u; - - /* XXX CoordUnits vs. ImageUnits */ - for (u = 0; u < maxUnit; u++) { - if (ctx->Texture._EnabledCoordUnits & (1 << u)) { - const GLuint attr = FRAG_ATTRIB_TEX0 + u; - const struct gl_texture_object *obj = ctx->Texture.Unit[u]._Current; - GLfloat texW, texH; - GLboolean needLambda; - GLfloat (*texcoord)[4] = span->array->attribs[attr]; - GLfloat *lambda = span->array->lambda[u]; - const GLfloat dsdx = span->attrStepX[attr][0]; - const GLfloat dsdy = span->attrStepY[attr][0]; - const GLfloat dtdx = span->attrStepX[attr][1]; - const GLfloat dtdy = span->attrStepY[attr][1]; - const GLfloat drdx = span->attrStepX[attr][2]; - const GLfloat dqdx = span->attrStepX[attr][3]; - const GLfloat dqdy = span->attrStepY[attr][3]; - GLfloat s = span->attrStart[attr][0] + span->leftClip * dsdx; - GLfloat t = span->attrStart[attr][1] + span->leftClip * dtdx; - GLfloat r = span->attrStart[attr][2] + span->leftClip * drdx; - GLfloat q = span->attrStart[attr][3] + span->leftClip * dqdx; - - if (obj) { - const struct gl_texture_image *img = obj->Image[0][obj->BaseLevel]; - needLambda = (obj->Sampler.MinFilter != obj->Sampler.MagFilter) - || ctx->FragmentProgram._Current; - texW = img->WidthScale; - texH = img->HeightScale; - } - else { - /* using a fragment program */ - texW = 1.0; - texH = 1.0; - needLambda = GL_FALSE; - } - - if (needLambda) { - GLuint i; - if (ctx->FragmentProgram._Current - || ctx->ATIFragmentShader._Enabled) { - /* do perspective correction but don't divide s, t, r by q */ - const GLfloat dwdx = span->attrStepX[FRAG_ATTRIB_WPOS][3]; - GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3] + span->leftClip * dwdx; - for (i = 0; i < span->end; i++) { - const GLfloat invW = 1.0F / w; - texcoord[i][0] = s * invW; - texcoord[i][1] = t * invW; - texcoord[i][2] = r * invW; - texcoord[i][3] = q * invW; - lambda[i] = _swrast_compute_lambda(dsdx, dsdy, dtdx, dtdy, - dqdx, dqdy, texW, texH, - s, t, q, invW); - s += dsdx; - t += dtdx; - r += drdx; - q += dqdx; - w += dwdx; - } - } - else { - for (i = 0; i < span->end; i++) { - const GLfloat invQ = (q == 0.0F) ? 1.0F : (1.0F / q); - texcoord[i][0] = s * invQ; - texcoord[i][1] = t * invQ; - texcoord[i][2] = r * invQ; - texcoord[i][3] = q; - lambda[i] = _swrast_compute_lambda(dsdx, dsdy, dtdx, dtdy, - dqdx, dqdy, texW, texH, - s, t, q, invQ); - s += dsdx; - t += dtdx; - r += drdx; - q += dqdx; - } - } - span->arrayMask |= SPAN_LAMBDA; - } - else { - GLuint i; - if (ctx->FragmentProgram._Current || - ctx->ATIFragmentShader._Enabled) { - /* do perspective correction but don't divide s, t, r by q */ - const GLfloat dwdx = span->attrStepX[FRAG_ATTRIB_WPOS][3]; - GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3] + span->leftClip * dwdx; - for (i = 0; i < span->end; i++) { - const GLfloat invW = 1.0F / w; - texcoord[i][0] = s * invW; - texcoord[i][1] = t * invW; - texcoord[i][2] = r * invW; - texcoord[i][3] = q * invW; - lambda[i] = 0.0; - s += dsdx; - t += dtdx; - r += drdx; - q += dqdx; - w += dwdx; - } - } - else if (dqdx == 0.0F) { - /* Ortho projection or polygon's parallel to window X axis */ - const GLfloat invQ = (q == 0.0F) ? 1.0F : (1.0F / q); - for (i = 0; i < span->end; i++) { - texcoord[i][0] = s * invQ; - texcoord[i][1] = t * invQ; - texcoord[i][2] = r * invQ; - texcoord[i][3] = q; - lambda[i] = 0.0; - s += dsdx; - t += dtdx; - r += drdx; - } - } - else { - for (i = 0; i < span->end; i++) { - const GLfloat invQ = (q == 0.0F) ? 1.0F : (1.0F / q); - texcoord[i][0] = s * invQ; - texcoord[i][1] = t * invQ; - texcoord[i][2] = r * invQ; - texcoord[i][3] = q; - lambda[i] = 0.0; - s += dsdx; - t += dtdx; - r += drdx; - q += dqdx; - } - } - } /* lambda */ - } /* if */ - } /* for */ -} - - -/** - * Fill in the arrays->attribs[FRAG_ATTRIB_WPOS] array. - */ -static INLINE void -interpolate_wpos(struct gl_context *ctx, SWspan *span) -{ - GLfloat (*wpos)[4] = span->array->attribs[FRAG_ATTRIB_WPOS]; - GLuint i; - const GLfloat zScale = 1.0F / ctx->DrawBuffer->_DepthMaxF; - GLfloat w, dw; - - if (span->arrayMask & SPAN_XY) { - for (i = 0; i < span->end; i++) { - wpos[i][0] = (GLfloat) span->array->x[i]; - wpos[i][1] = (GLfloat) span->array->y[i]; - } - } - else { - for (i = 0; i < span->end; i++) { - wpos[i][0] = (GLfloat) span->x + i; - wpos[i][1] = (GLfloat) span->y; - } - } - - dw = span->attrStepX[FRAG_ATTRIB_WPOS][3]; - w = span->attrStart[FRAG_ATTRIB_WPOS][3] + span->leftClip * dw; - for (i = 0; i < span->end; i++) { - wpos[i][2] = (GLfloat) span->array->z[i] * zScale; - wpos[i][3] = w; - w += dw; - } -} - - -/** - * Apply the current polygon stipple pattern to a span of pixels. - */ -static INLINE void -stipple_polygon_span(struct gl_context *ctx, SWspan *span) -{ - GLubyte *mask = span->array->mask; - - ASSERT(ctx->Polygon.StippleFlag); - - if (span->arrayMask & SPAN_XY) { - /* arrays of x/y pixel coords */ - GLuint i; - for (i = 0; i < span->end; i++) { - const GLint col = span->array->x[i] % 32; - const GLint row = span->array->y[i] % 32; - const GLuint stipple = ctx->PolygonStipple[row]; - if (((1 << col) & stipple) == 0) { - mask[i] = 0; - } - } - } - else { - /* horizontal span of pixels */ - const GLuint highBit = 1 << 31; - const GLuint stipple = ctx->PolygonStipple[span->y % 32]; - GLuint i, m = highBit >> (GLuint) (span->x % 32); - for (i = 0; i < span->end; i++) { - if ((m & stipple) == 0) { - mask[i] = 0; - } - m = m >> 1; - if (m == 0) { - m = highBit; - } - } - } - span->writeAll = GL_FALSE; -} - - -/** - * Clip a pixel span to the current buffer/window boundaries: - * DrawBuffer->_Xmin, _Xmax, _Ymin, _Ymax. This will accomplish - * window clipping and scissoring. - * Return: GL_TRUE some pixels still visible - * GL_FALSE nothing visible - */ -static INLINE GLuint -clip_span( struct gl_context *ctx, SWspan *span ) -{ - const GLint xmin = ctx->DrawBuffer->_Xmin; - const GLint xmax = ctx->DrawBuffer->_Xmax; - const GLint ymin = ctx->DrawBuffer->_Ymin; - const GLint ymax = ctx->DrawBuffer->_Ymax; - - span->leftClip = 0; - - if (span->arrayMask & SPAN_XY) { - /* arrays of x/y pixel coords */ - const GLint *x = span->array->x; - const GLint *y = span->array->y; - const GLint n = span->end; - GLubyte *mask = span->array->mask; - GLint i; - if (span->arrayMask & SPAN_MASK) { - /* note: using & intead of && to reduce branches */ - for (i = 0; i < n; i++) { - mask[i] &= (x[i] >= xmin) & (x[i] < xmax) - & (y[i] >= ymin) & (y[i] < ymax); - } - } - else { - /* note: using & intead of && to reduce branches */ - for (i = 0; i < n; i++) { - mask[i] = (x[i] >= xmin) & (x[i] < xmax) - & (y[i] >= ymin) & (y[i] < ymax); - } - } - return GL_TRUE; /* some pixels visible */ - } - else { - /* horizontal span of pixels */ - const GLint x = span->x; - const GLint y = span->y; - GLint n = span->end; - - /* Trivial rejection tests */ - if (y < ymin || y >= ymax || x + n <= xmin || x >= xmax) { - span->end = 0; - return GL_FALSE; /* all pixels clipped */ - } - - /* Clip to right */ - if (x + n > xmax) { - ASSERT(x < xmax); - n = span->end = xmax - x; - } - - /* Clip to the left */ - if (x < xmin) { - const GLint leftClip = xmin - x; - GLuint i; - - ASSERT(leftClip > 0); - ASSERT(x + n > xmin); - - /* Clip 'leftClip' pixels from the left side. - * The span->leftClip field will be applied when we interpolate - * fragment attributes. - * For arrays of values, shift them left. - */ - for (i = 0; i < FRAG_ATTRIB_MAX; i++) { - if (span->interpMask & (1 << i)) { - GLuint j; - for (j = 0; j < 4; j++) { - span->attrStart[i][j] += leftClip * span->attrStepX[i][j]; - } - } - } - - span->red += leftClip * span->redStep; - span->green += leftClip * span->greenStep; - span->blue += leftClip * span->blueStep; - span->alpha += leftClip * span->alphaStep; - span->index += leftClip * span->indexStep; - span->z += leftClip * span->zStep; - span->intTex[0] += leftClip * span->intTexStep[0]; - span->intTex[1] += leftClip * span->intTexStep[1]; - -#define SHIFT_ARRAY(ARRAY, SHIFT, LEN) \ - memcpy(ARRAY, ARRAY + (SHIFT), (LEN) * sizeof(ARRAY[0])) - - for (i = 0; i < FRAG_ATTRIB_MAX; i++) { - if (span->arrayAttribs & (1 << i)) { - /* shift array elements left by 'leftClip' */ - SHIFT_ARRAY(span->array->attribs[i], leftClip, n - leftClip); - } - } - - SHIFT_ARRAY(span->array->mask, leftClip, n - leftClip); - SHIFT_ARRAY(span->array->rgba8, leftClip, n - leftClip); - SHIFT_ARRAY(span->array->rgba16, leftClip, n - leftClip); - SHIFT_ARRAY(span->array->x, leftClip, n - leftClip); - SHIFT_ARRAY(span->array->y, leftClip, n - leftClip); - SHIFT_ARRAY(span->array->z, leftClip, n - leftClip); - SHIFT_ARRAY(span->array->index, leftClip, n - leftClip); - for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) { - SHIFT_ARRAY(span->array->lambda[i], leftClip, n - leftClip); - } - SHIFT_ARRAY(span->array->coverage, leftClip, n - leftClip); - -#undef SHIFT_ARRAY - - span->leftClip = leftClip; - span->x = xmin; - span->end -= leftClip; - span->writeAll = GL_FALSE; - } - - ASSERT(span->x >= xmin); - ASSERT(span->x + span->end <= xmax); - ASSERT(span->y >= ymin); - ASSERT(span->y < ymax); - - return GL_TRUE; /* some pixels visible */ - } -} - - -/** - * Add specular colors to primary colors. - * Only called during fixed-function operation. - * Result is float color array (FRAG_ATTRIB_COL0). - */ -static INLINE void -add_specular(struct gl_context *ctx, SWspan *span) -{ - const SWcontext *swrast = SWRAST_CONTEXT(ctx); - const GLubyte *mask = span->array->mask; - GLfloat (*col0)[4] = span->array->attribs[FRAG_ATTRIB_COL0]; - GLfloat (*col1)[4] = span->array->attribs[FRAG_ATTRIB_COL1]; - GLuint i; - - ASSERT(!ctx->FragmentProgram._Current); - ASSERT(span->arrayMask & SPAN_RGBA); - ASSERT(swrast->_ActiveAttribMask & FRAG_BIT_COL1); - (void) swrast; /* silence warning */ - - if (span->array->ChanType == GL_FLOAT) { - if ((span->arrayAttribs & FRAG_BIT_COL0) == 0) { - interpolate_active_attribs(ctx, span, FRAG_BIT_COL0); - } - } - else { - /* need float colors */ - if ((span->arrayAttribs & FRAG_BIT_COL0) == 0) { - interpolate_float_colors(span); - } - } - - if ((span->arrayAttribs & FRAG_BIT_COL1) == 0) { - /* XXX could avoid this and interpolate COL1 in the loop below */ - interpolate_active_attribs(ctx, span, FRAG_BIT_COL1); - } - - ASSERT(span->arrayAttribs & FRAG_BIT_COL0); - ASSERT(span->arrayAttribs & FRAG_BIT_COL1); - - for (i = 0; i < span->end; i++) { - if (mask[i]) { - col0[i][0] += col1[i][0]; - col0[i][1] += col1[i][1]; - col0[i][2] += col1[i][2]; - } - } - - span->array->ChanType = GL_FLOAT; -} - - -/** - * Apply antialiasing coverage value to alpha values. - */ -static INLINE void -apply_aa_coverage(SWspan *span) -{ - const GLfloat *coverage = span->array->coverage; - GLuint i; - if (span->array->ChanType == GL_UNSIGNED_BYTE) { - GLubyte (*rgba)[4] = span->array->rgba8; - for (i = 0; i < span->end; i++) { - const GLfloat a = rgba[i][ACOMP] * coverage[i]; - rgba[i][ACOMP] = (GLubyte) CLAMP(a, 0.0, 255.0); - ASSERT(coverage[i] >= 0.0); - ASSERT(coverage[i] <= 1.0); - } - } - else if (span->array->ChanType == GL_UNSIGNED_SHORT) { - GLushort (*rgba)[4] = span->array->rgba16; - for (i = 0; i < span->end; i++) { - const GLfloat a = rgba[i][ACOMP] * coverage[i]; - rgba[i][ACOMP] = (GLushort) CLAMP(a, 0.0, 65535.0); - } - } - else { - GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL0]; - for (i = 0; i < span->end; i++) { - rgba[i][ACOMP] = rgba[i][ACOMP] * coverage[i]; - /* clamp later */ - } - } -} - - -/** - * Clamp span's float colors to [0,1] - */ -static INLINE void -clamp_colors(SWspan *span) -{ - GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL0]; - GLuint i; - ASSERT(span->array->ChanType == GL_FLOAT); - for (i = 0; i < span->end; i++) { - rgba[i][RCOMP] = CLAMP(rgba[i][RCOMP], 0.0F, 1.0F); - rgba[i][GCOMP] = CLAMP(rgba[i][GCOMP], 0.0F, 1.0F); - rgba[i][BCOMP] = CLAMP(rgba[i][BCOMP], 0.0F, 1.0F); - rgba[i][ACOMP] = CLAMP(rgba[i][ACOMP], 0.0F, 1.0F); - } -} - - -/** - * Convert the span's color arrays to the given type. - * The only way 'output' can be greater than zero is when we have a fragment - * program that writes to gl_FragData[1] or higher. - * \param output which fragment program color output is being processed - */ -static INLINE void -convert_color_type(SWspan *span, GLenum newType, GLuint output) -{ - GLvoid *src, *dst; - - if (output > 0 || span->array->ChanType == GL_FLOAT) { - src = span->array->attribs[FRAG_ATTRIB_COL0 + output]; - span->array->ChanType = GL_FLOAT; - } - else if (span->array->ChanType == GL_UNSIGNED_BYTE) { - src = span->array->rgba8; - } - else { - ASSERT(span->array->ChanType == GL_UNSIGNED_SHORT); - src = span->array->rgba16; - } - - if (newType == GL_UNSIGNED_BYTE) { - dst = span->array->rgba8; - } - else if (newType == GL_UNSIGNED_SHORT) { - dst = span->array->rgba16; - } - else { - dst = span->array->attribs[FRAG_ATTRIB_COL0]; - } - - _mesa_convert_colors(span->array->ChanType, src, - newType, dst, - span->end, span->array->mask); - - span->array->ChanType = newType; - span->array->rgba = dst; -} - - - -/** - * Apply fragment shader, fragment program or normal texturing to span. - */ -static INLINE void -shade_texture_span(struct gl_context *ctx, SWspan *span) -{ - GLbitfield inputsRead; - - /* Determine which fragment attributes are actually needed */ - if (ctx->FragmentProgram._Current) { - inputsRead = ctx->FragmentProgram._Current->Base.InputsRead; - } - else { - /* XXX we could be a bit smarter about this */ - inputsRead = ~0; - } - - if (ctx->FragmentProgram._Current || - ctx->ATIFragmentShader._Enabled) { - /* programmable shading */ - if (span->primitive == GL_BITMAP && span->array->ChanType != GL_FLOAT) { - convert_color_type(span, GL_FLOAT, 0); - } - else { - span->array->rgba = (void *) span->array->attribs[FRAG_ATTRIB_COL0]; - } - - if (span->primitive != GL_POINT || - (span->interpMask & SPAN_RGBA) || - ctx->Point.PointSprite) { - /* for single-pixel points, we populated the arrays already */ - interpolate_active_attribs(ctx, span, ~0); - } - span->array->ChanType = GL_FLOAT; - - if (!(span->arrayMask & SPAN_Z)) - _swrast_span_interpolate_z (ctx, span); - -#if 0 - if (inputsRead & FRAG_BIT_WPOS) -#else - /* XXX always interpolate wpos so that DDX/DDY work */ -#endif - interpolate_wpos(ctx, span); - - /* Run fragment program/shader now */ - if (ctx->FragmentProgram._Current) { - _swrast_exec_fragment_program(ctx, span); - } - else { - ASSERT(ctx->ATIFragmentShader._Enabled); - _swrast_exec_fragment_shader(ctx, span); - } - } - else if (ctx->Texture._EnabledCoordUnits) { - /* conventional texturing */ - -#if CHAN_BITS == 32 - if ((span->arrayAttribs & FRAG_BIT_COL0) == 0) { - interpolate_int_colors(ctx, span); - } -#else - if (!(span->arrayMask & SPAN_RGBA)) - interpolate_int_colors(ctx, span); -#endif - if ((span->arrayAttribs & FRAG_BITS_TEX_ANY) == 0x0) - interpolate_texcoords(ctx, span); - - _swrast_texture_span(ctx, span); - } -} - - - -/** - * Apply all the per-fragment operations to a span. - * This now includes texturing (_swrast_write_texture_span() is history). - * This function may modify any of the array values in the span. - * span->interpMask and span->arrayMask may be changed but will be restored - * to their original values before returning. - */ -void -_swrast_write_rgba_span( struct gl_context *ctx, SWspan *span) -{ - const SWcontext *swrast = SWRAST_CONTEXT(ctx); - const GLuint *colorMask = (GLuint *) ctx->Color.ColorMask; - const GLbitfield origInterpMask = span->interpMask; - const GLbitfield origArrayMask = span->arrayMask; - const GLbitfield origArrayAttribs = span->arrayAttribs; - const GLenum origChanType = span->array->ChanType; - void * const origRgba = span->array->rgba; - const GLboolean shader = (ctx->FragmentProgram._Current - || ctx->ATIFragmentShader._Enabled); - const GLboolean shaderOrTexture = shader || ctx->Texture._EnabledCoordUnits; - struct gl_framebuffer *fb = ctx->DrawBuffer; - - /* - printf("%s() interp 0x%x array 0x%x\n", __FUNCTION__, - span->interpMask, span->arrayMask); - */ - - ASSERT(span->primitive == GL_POINT || - span->primitive == GL_LINE || - span->primitive == GL_POLYGON || - span->primitive == GL_BITMAP); - - /* Fragment write masks */ - if (span->arrayMask & SPAN_MASK) { - /* mask was initialized by caller, probably glBitmap */ - span->writeAll = GL_FALSE; - } - else { - memset(span->array->mask, 1, span->end); - span->writeAll = GL_TRUE; - } - - /* Clip to window/scissor box */ - if (!clip_span(ctx, span)) { - return; - } - - ASSERT(span->end <= MAX_WIDTH); - - /* Depth bounds test */ - if (ctx->Depth.BoundsTest && fb->Visual.depthBits > 0) { - if (!_swrast_depth_bounds_test(ctx, span)) { - return; - } - } - -#ifdef DEBUG - /* Make sure all fragments are within window bounds */ - if (span->arrayMask & SPAN_XY) { - /* array of pixel locations */ - GLuint i; - for (i = 0; i < span->end; i++) { - if (span->array->mask[i]) { - assert(span->array->x[i] >= fb->_Xmin); - assert(span->array->x[i] < fb->_Xmax); - assert(span->array->y[i] >= fb->_Ymin); - assert(span->array->y[i] < fb->_Ymax); - } - } - } -#endif - - /* Polygon Stippling */ - if (ctx->Polygon.StippleFlag && span->primitive == GL_POLYGON) { - stipple_polygon_span(ctx, span); - } - - /* This is the normal place to compute the fragment color/Z - * from texturing or shading. - */ - if (shaderOrTexture && !swrast->_DeferredTexture) { - shade_texture_span(ctx, span); - } - - /* Do the alpha test */ - if (ctx->Color.AlphaEnabled) { - if (!_swrast_alpha_test(ctx, span)) { - /* all fragments failed test */ - goto end; - } - } - - /* Stencil and Z testing */ - if (ctx->Stencil._Enabled || ctx->Depth.Test) { - if (!(span->arrayMask & SPAN_Z)) - _swrast_span_interpolate_z(ctx, span); - - if (ctx->Transform.DepthClamp) - _swrast_depth_clamp_span(ctx, span); - - if (ctx->Stencil._Enabled) { - /* Combined Z/stencil tests */ - if (!_swrast_stencil_and_ztest_span(ctx, span)) { - /* all fragments failed test */ - goto end; - } - } - else if (fb->Visual.depthBits > 0) { - /* Just regular depth testing */ - ASSERT(ctx->Depth.Test); - ASSERT(span->arrayMask & SPAN_Z); - if (!_swrast_depth_test_span(ctx, span)) { - /* all fragments failed test */ - goto end; - } - } - } - - if (ctx->Query.CurrentOcclusionObject) { - /* update count of 'passed' fragments */ - struct gl_query_object *q = ctx->Query.CurrentOcclusionObject; - GLuint i; - for (i = 0; i < span->end; i++) - q->Result += span->array->mask[i]; - } - - /* We had to wait until now to check for glColorMask(0,0,0,0) because of - * the occlusion test. - */ - if (fb->_NumColorDrawBuffers == 1 && colorMask[0] == 0x0) { - /* no colors to write */ - goto end; - } - - /* If we were able to defer fragment color computation to now, there's - * a good chance that many fragments will have already been killed by - * Z/stencil testing. - */ - if (shaderOrTexture && swrast->_DeferredTexture) { - shade_texture_span(ctx, span); - } - -#if CHAN_BITS == 32 - if ((span->arrayAttribs & FRAG_BIT_COL0) == 0) { - interpolate_active_attribs(ctx, span, FRAG_BIT_COL0); - } -#else - if ((span->arrayMask & SPAN_RGBA) == 0) { - interpolate_int_colors(ctx, span); - } -#endif - - ASSERT(span->arrayMask & SPAN_RGBA); - - if (span->primitive == GL_BITMAP || !swrast->SpecularVertexAdd) { - /* Add primary and specular (diffuse + specular) colors */ - if (!shader) { - if (ctx->Fog.ColorSumEnabled || - (ctx->Light.Enabled && - ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)) { - add_specular(ctx, span); - } - } - } - - /* Fog */ - if (swrast->_FogEnabled) { - _swrast_fog_rgba_span(ctx, span); - } - - /* Antialias coverage application */ - if (span->arrayMask & SPAN_COVERAGE) { - apply_aa_coverage(span); - } - - /* Clamp color/alpha values over the range [0.0, 1.0] before storage */ - if (ctx->Color.ClampFragmentColor == GL_TRUE && - span->array->ChanType == GL_FLOAT) { - clamp_colors(span); - } - - /* - * Write to renderbuffers. - * Depending on glDrawBuffer() state and the which color outputs are - * written by the fragment shader, we may either replicate one color to - * all renderbuffers or write a different color to each renderbuffer. - * multiFragOutputs=TRUE for the later case. - */ - { - const GLuint numBuffers = fb->_NumColorDrawBuffers; - const struct gl_fragment_program *fp = ctx->FragmentProgram._Current; - const GLboolean multiFragOutputs = - (fp && fp->Base.OutputsWritten >= (1 << FRAG_RESULT_DATA0)); - GLuint buf; - - for (buf = 0; buf < numBuffers; buf++) { - struct gl_renderbuffer *rb = fb->_ColorDrawBuffers[buf]; - - /* color[fragOutput] will be written to buffer[buf] */ - - if (rb) { - GLchan rgbaSave[MAX_WIDTH][4]; - const GLuint fragOutput = multiFragOutputs ? buf : 0; - - /* set span->array->rgba to colors for render buffer's datatype */ - if (rb->DataType != span->array->ChanType || fragOutput > 0) { - convert_color_type(span, rb->DataType, fragOutput); - } - else { - if (rb->DataType == GL_UNSIGNED_BYTE) { - span->array->rgba = span->array->rgba8; - } - else if (rb->DataType == GL_UNSIGNED_SHORT) { - span->array->rgba = (void *) span->array->rgba16; - } - else { - span->array->rgba = (void *) - span->array->attribs[FRAG_ATTRIB_COL0]; - } - } - - if (!multiFragOutputs && numBuffers > 1) { - /* save colors for second, third renderbuffer writes */ - memcpy(rgbaSave, span->array->rgba, - 4 * span->end * sizeof(GLchan)); - } - - ASSERT(rb->_BaseFormat == GL_RGBA || rb->_BaseFormat == GL_RGB || - rb->_BaseFormat == GL_ALPHA); - - if (ctx->Color._LogicOpEnabled) { - _swrast_logicop_rgba_span(ctx, rb, span); - } - else if ((ctx->Color.BlendEnabled >> buf) & 1) { - _swrast_blend_span(ctx, rb, span); - } - - if (colorMask[buf] != 0xffffffff) { - _swrast_mask_rgba_span(ctx, rb, span, buf); - } - - if (span->arrayMask & SPAN_XY) { - /* array of pixel coords */ - ASSERT(rb->PutValues); - rb->PutValues(ctx, rb, span->end, - span->array->x, span->array->y, - span->array->rgba, span->array->mask); - } - else { - /* horizontal run of pixels */ - ASSERT(rb->PutRow); - rb->PutRow(ctx, rb, span->end, span->x, span->y, - span->array->rgba, - span->writeAll ? NULL: span->array->mask); - } - - if (!multiFragOutputs && numBuffers > 1) { - /* restore original span values */ - memcpy(span->array->rgba, rgbaSave, - 4 * span->end * sizeof(GLchan)); - } - - } /* if rb */ - } /* for buf */ - } - -end: - /* restore these values before returning */ - span->interpMask = origInterpMask; - span->arrayMask = origArrayMask; - span->arrayAttribs = origArrayAttribs; - span->array->ChanType = origChanType; - span->array->rgba = origRgba; -} - - -/** - * Read RGBA pixels from a renderbuffer. Clipping will be done to prevent - * reading ouside the buffer's boundaries. - * \param dstType datatype for returned colors - * \param rgba the returned colors - */ -void -_swrast_read_rgba_span( struct gl_context *ctx, struct gl_renderbuffer *rb, - GLuint n, GLint x, GLint y, GLenum dstType, - GLvoid *rgba) -{ - const GLint bufWidth = (GLint) rb->Width; - const GLint bufHeight = (GLint) rb->Height; - - if (y < 0 || y >= bufHeight || x + (GLint) n < 0 || x >= bufWidth) { - /* completely above, below, or right */ - /* XXX maybe leave rgba values undefined? */ - memset(rgba, 0, 4 * n * sizeof(GLchan)); - } - else { - GLint skip, length; - if (x < 0) { - /* left edge clipping */ - skip = -x; - length = (GLint) n - skip; - if (length < 0) { - /* completely left of window */ - return; - } - if (length > bufWidth) { - length = bufWidth; - } - } - else if ((GLint) (x + n) > bufWidth) { - /* right edge clipping */ - skip = 0; - length = bufWidth - x; - if (length < 0) { - /* completely to right of window */ - return; - } - } - else { - /* no clipping */ - skip = 0; - length = (GLint) n; - } - - ASSERT(rb); - ASSERT(rb->GetRow); - ASSERT(rb->_BaseFormat == GL_RGBA || - rb->_BaseFormat == GL_RGB || - rb->_BaseFormat == GL_RG || - rb->_BaseFormat == GL_RED || - rb->_BaseFormat == GL_LUMINANCE || - rb->_BaseFormat == GL_INTENSITY || - rb->_BaseFormat == GL_LUMINANCE_ALPHA || - rb->_BaseFormat == GL_ALPHA); - - if (rb->DataType == dstType) { - rb->GetRow(ctx, rb, length, x + skip, y, - (GLubyte *) rgba + skip * RGBA_PIXEL_SIZE(rb->DataType)); - } - else { - GLuint temp[MAX_WIDTH * 4]; - rb->GetRow(ctx, rb, length, x + skip, y, temp); - _mesa_convert_colors(rb->DataType, temp, - dstType, (GLubyte *) rgba + skip * RGBA_PIXEL_SIZE(dstType), - length, NULL); - } - } -} - - -/** - * Wrapper for gl_renderbuffer::GetValues() which does clipping to avoid - * reading values outside the buffer bounds. - * We can use this for reading any format/type of renderbuffer. - * \param valueSize is the size in bytes of each value (pixel) put into the - * values array. - */ -void -_swrast_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb, - GLuint count, const GLint x[], const GLint y[], - void *values, GLuint valueSize) -{ - GLuint i, inCount = 0, inStart = 0; - - for (i = 0; i < count; i++) { - if (x[i] >= 0 && y[i] >= 0 && - x[i] < (GLint) rb->Width && y[i] < (GLint) rb->Height) { - /* inside */ - if (inCount == 0) - inStart = i; - inCount++; - } - else { - if (inCount > 0) { - /* read [inStart, inStart + inCount) */ - rb->GetValues(ctx, rb, inCount, x + inStart, y + inStart, - (GLubyte *) values + inStart * valueSize); - inCount = 0; - } - } - } - if (inCount > 0) { - /* read last values */ - rb->GetValues(ctx, rb, inCount, x + inStart, y + inStart, - (GLubyte *) values + inStart * valueSize); - } -} - - -/** - * Wrapper for gl_renderbuffer::PutRow() which does clipping. - * \param valueSize size of each value (pixel) in bytes - */ -void -_swrast_put_row(struct gl_context *ctx, struct gl_renderbuffer *rb, - GLuint count, GLint x, GLint y, - const GLvoid *values, GLuint valueSize) -{ - GLint skip = 0; - - if (y < 0 || y >= (GLint) rb->Height) - return; /* above or below */ - - if (x + (GLint) count <= 0 || x >= (GLint) rb->Width) - return; /* entirely left or right */ - - if ((GLint) (x + count) > (GLint) rb->Width) { - /* right clip */ - GLint clip = x + count - rb->Width; - count -= clip; - } - - if (x < 0) { - /* left clip */ - skip = -x; - x = 0; - count -= skip; - } - - rb->PutRow(ctx, rb, count, x, y, - (const GLubyte *) values + skip * valueSize, NULL); -} - - -/** - * Wrapper for gl_renderbuffer::GetRow() which does clipping. - * \param valueSize size of each value (pixel) in bytes - */ -void -_swrast_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb, - GLuint count, GLint x, GLint y, - GLvoid *values, GLuint valueSize) -{ - GLint skip = 0; - - if (y < 0 || y >= (GLint) rb->Height) - return; /* above or below */ - - if (x + (GLint) count <= 0 || x >= (GLint) rb->Width) - return; /* entirely left or right */ - - if (x + count > rb->Width) { - /* right clip */ - GLint clip = x + count - rb->Width; - count -= clip; - } - - if (x < 0) { - /* left clip */ - skip = -x; - x = 0; - count -= skip; - } - - rb->GetRow(ctx, rb, count, x, y, (GLubyte *) values + skip * valueSize); -} - - -/** - * Get RGBA pixels from the given renderbuffer. - * Used by blending, logicop and masking functions. - * \return pointer to the colors we read. - */ -void * -_swrast_get_dest_rgba(struct gl_context *ctx, struct gl_renderbuffer *rb, - SWspan *span) -{ - const GLuint pixelSize = RGBA_PIXEL_SIZE(span->array->ChanType); - void *rbPixels; - - /* Point rbPixels to a temporary space */ - rbPixels = span->array->attribs[FRAG_ATTRIB_MAX - 1]; - - /* Get destination values from renderbuffer */ - if (span->arrayMask & SPAN_XY) { - _swrast_get_values(ctx, rb, span->end, span->array->x, span->array->y, - rbPixels, pixelSize); - } - else { - _swrast_get_row(ctx, rb, span->end, span->x, span->y, - rbPixels, pixelSize); - } - - return rbPixels; -} +/* + * Mesa 3-D graphics library + * Version: 7.5 + * + * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. + * Copyright (C) 2009 VMware, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +/** + * \file swrast/s_span.c + * \brief Span processing functions used by all rasterization functions. + * This is where all the per-fragment tests are performed + * \author Brian Paul + */ + +#include "main/glheader.h" +#include "main/colormac.h" +#include "main/macros.h" +#include "main/imports.h" +#include "main/image.h" + +#include "s_atifragshader.h" +#include "s_alpha.h" +#include "s_blend.h" +#include "s_context.h" +#include "s_depth.h" +#include "s_fog.h" +#include "s_logic.h" +#include "s_masking.h" +#include "s_fragprog.h" +#include "s_span.h" +#include "s_stencil.h" +#include "s_texcombine.h" + + +/** + * Set default fragment attributes for the span using the + * current raster values. Used prior to glDraw/CopyPixels + * and glBitmap. + */ +void +_swrast_span_default_attribs(struct gl_context *ctx, SWspan *span) +{ + GLchan r, g, b, a; + /* Z*/ + { + const GLfloat depthMax = ctx->DrawBuffer->_DepthMaxF; + if (ctx->DrawBuffer->Visual.depthBits <= 16) + span->z = FloatToFixed(ctx->Current.RasterPos[2] * depthMax + 0.5F); + else { + GLfloat tmpf = ctx->Current.RasterPos[2] * depthMax; + tmpf = MIN2(tmpf, depthMax); + span->z = (GLint)tmpf; + } + span->zStep = 0; + span->interpMask |= SPAN_Z; + } + + /* W (for perspective correction) */ + span->attrStart[FRAG_ATTRIB_WPOS][3] = 1.0; + span->attrStepX[FRAG_ATTRIB_WPOS][3] = 0.0; + span->attrStepY[FRAG_ATTRIB_WPOS][3] = 0.0; + + /* primary color, or color index */ + UNCLAMPED_FLOAT_TO_CHAN(r, ctx->Current.RasterColor[0]); + UNCLAMPED_FLOAT_TO_CHAN(g, ctx->Current.RasterColor[1]); + UNCLAMPED_FLOAT_TO_CHAN(b, ctx->Current.RasterColor[2]); + UNCLAMPED_FLOAT_TO_CHAN(a, ctx->Current.RasterColor[3]); +#if CHAN_TYPE == GL_FLOAT + span->red = r; + span->green = g; + span->blue = b; + span->alpha = a; +#else + span->red = IntToFixed(r); + span->green = IntToFixed(g); + span->blue = IntToFixed(b); + span->alpha = IntToFixed(a); +#endif + span->redStep = 0; + span->greenStep = 0; + span->blueStep = 0; + span->alphaStep = 0; + span->interpMask |= SPAN_RGBA; + + COPY_4V(span->attrStart[FRAG_ATTRIB_COL0], ctx->Current.RasterColor); + ASSIGN_4V(span->attrStepX[FRAG_ATTRIB_COL0], 0.0, 0.0, 0.0, 0.0); + ASSIGN_4V(span->attrStepY[FRAG_ATTRIB_COL0], 0.0, 0.0, 0.0, 0.0); + + /* Secondary color */ + if (ctx->Light.Enabled || ctx->Fog.ColorSumEnabled) + { + COPY_4V(span->attrStart[FRAG_ATTRIB_COL1], ctx->Current.RasterSecondaryColor); + ASSIGN_4V(span->attrStepX[FRAG_ATTRIB_COL1], 0.0, 0.0, 0.0, 0.0); + ASSIGN_4V(span->attrStepY[FRAG_ATTRIB_COL1], 0.0, 0.0, 0.0, 0.0); + } + + /* fog */ + { + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + GLfloat fogVal; /* a coord or a blend factor */ + if (swrast->_PreferPixelFog) { + /* fog blend factors will be computed from fog coordinates per pixel */ + fogVal = ctx->Current.RasterDistance; + } + else { + /* fog blend factor should be computed from fogcoord now */ + fogVal = _swrast_z_to_fogfactor(ctx, ctx->Current.RasterDistance); + } + span->attrStart[FRAG_ATTRIB_FOGC][0] = fogVal; + span->attrStepX[FRAG_ATTRIB_FOGC][0] = 0.0; + span->attrStepY[FRAG_ATTRIB_FOGC][0] = 0.0; + } + + /* texcoords */ + { + GLuint i; + for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) { + const GLuint attr = FRAG_ATTRIB_TEX0 + i; + const GLfloat *tc = ctx->Current.RasterTexCoords[i]; + if (ctx->FragmentProgram._Current || ctx->ATIFragmentShader._Enabled) { + COPY_4V(span->attrStart[attr], tc); + } + else if (tc[3] > 0.0F) { + /* use (s/q, t/q, r/q, 1) */ + span->attrStart[attr][0] = tc[0] / tc[3]; + span->attrStart[attr][1] = tc[1] / tc[3]; + span->attrStart[attr][2] = tc[2] / tc[3]; + span->attrStart[attr][3] = 1.0; + } + else { + ASSIGN_4V(span->attrStart[attr], 0.0F, 0.0F, 0.0F, 1.0F); + } + ASSIGN_4V(span->attrStepX[attr], 0.0F, 0.0F, 0.0F, 0.0F); + ASSIGN_4V(span->attrStepY[attr], 0.0F, 0.0F, 0.0F, 0.0F); + } + } +} + + +/** + * Interpolate the active attributes (and'd with attrMask) to + * fill in span->array->attribs[]. + * Perspective correction will be done. The point/line/triangle function + * should have computed attrStart/Step values for FRAG_ATTRIB_WPOS[3]! + */ +static INLINE void +interpolate_active_attribs(struct gl_context *ctx, SWspan *span, GLbitfield attrMask) +{ + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + + /* + * Don't overwrite existing array values, such as colors that may have + * been produced by glDraw/CopyPixels. + */ + attrMask &= ~span->arrayAttribs; + + ATTRIB_LOOP_BEGIN + if (attrMask & (1 << attr)) { + const GLfloat dwdx = span->attrStepX[FRAG_ATTRIB_WPOS][3]; + GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3]; + const GLfloat dv0dx = span->attrStepX[attr][0]; + const GLfloat dv1dx = span->attrStepX[attr][1]; + const GLfloat dv2dx = span->attrStepX[attr][2]; + const GLfloat dv3dx = span->attrStepX[attr][3]; + GLfloat v0 = span->attrStart[attr][0] + span->leftClip * dv0dx; + GLfloat v1 = span->attrStart[attr][1] + span->leftClip * dv1dx; + GLfloat v2 = span->attrStart[attr][2] + span->leftClip * dv2dx; + GLfloat v3 = span->attrStart[attr][3] + span->leftClip * dv3dx; + GLuint k; + for (k = 0; k < span->end; k++) { + const GLfloat invW = 1.0f / w; + span->array->attribs[attr][k][0] = v0 * invW; + span->array->attribs[attr][k][1] = v1 * invW; + span->array->attribs[attr][k][2] = v2 * invW; + span->array->attribs[attr][k][3] = v3 * invW; + v0 += dv0dx; + v1 += dv1dx; + v2 += dv2dx; + v3 += dv3dx; + w += dwdx; + } + ASSERT((span->arrayAttribs & (1 << attr)) == 0); + span->arrayAttribs |= (1 << attr); + } + ATTRIB_LOOP_END +} + + +/** + * Interpolate primary colors to fill in the span->array->rgba8 (or rgb16) + * color array. + */ +static INLINE void +interpolate_int_colors(struct gl_context *ctx, SWspan *span) +{ + const GLuint n = span->end; + GLuint i; + +#if CHAN_BITS != 32 + ASSERT(!(span->arrayMask & SPAN_RGBA)); +#endif + + switch (span->array->ChanType) { +#if CHAN_BITS != 32 + case GL_UNSIGNED_BYTE: + { + GLubyte (*rgba)[4] = span->array->rgba8; + if (span->interpMask & SPAN_FLAT) { + GLubyte color[4]; + color[RCOMP] = FixedToInt(span->red); + color[GCOMP] = FixedToInt(span->green); + color[BCOMP] = FixedToInt(span->blue); + color[ACOMP] = FixedToInt(span->alpha); + for (i = 0; i < n; i++) { + COPY_4UBV(rgba[i], color); + } + } + else { + GLfixed r = span->red; + GLfixed g = span->green; + GLfixed b = span->blue; + GLfixed a = span->alpha; + GLint dr = span->redStep; + GLint dg = span->greenStep; + GLint db = span->blueStep; + GLint da = span->alphaStep; + for (i = 0; i < n; i++) { + rgba[i][RCOMP] = FixedToChan(r); + rgba[i][GCOMP] = FixedToChan(g); + rgba[i][BCOMP] = FixedToChan(b); + rgba[i][ACOMP] = FixedToChan(a); + r += dr; + g += dg; + b += db; + a += da; + } + } + } + break; + case GL_UNSIGNED_SHORT: + { + GLushort (*rgba)[4] = span->array->rgba16; + if (span->interpMask & SPAN_FLAT) { + GLushort color[4]; + color[RCOMP] = FixedToInt(span->red); + color[GCOMP] = FixedToInt(span->green); + color[BCOMP] = FixedToInt(span->blue); + color[ACOMP] = FixedToInt(span->alpha); + for (i = 0; i < n; i++) { + COPY_4V(rgba[i], color); + } + } + else { + GLushort (*rgba)[4] = span->array->rgba16; + GLfixed r, g, b, a; + GLint dr, dg, db, da; + r = span->red; + g = span->green; + b = span->blue; + a = span->alpha; + dr = span->redStep; + dg = span->greenStep; + db = span->blueStep; + da = span->alphaStep; + for (i = 0; i < n; i++) { + rgba[i][RCOMP] = FixedToChan(r); + rgba[i][GCOMP] = FixedToChan(g); + rgba[i][BCOMP] = FixedToChan(b); + rgba[i][ACOMP] = FixedToChan(a); + r += dr; + g += dg; + b += db; + a += da; + } + } + } + break; +#endif + case GL_FLOAT: + interpolate_active_attribs(ctx, span, FRAG_BIT_COL0); + break; + default: + _mesa_problem(ctx, "bad datatype 0x%x in interpolate_int_colors", + span->array->ChanType); + } + span->arrayMask |= SPAN_RGBA; +} + + +/** + * Populate the FRAG_ATTRIB_COL0 array. + */ +static INLINE void +interpolate_float_colors(SWspan *span) +{ + GLfloat (*col0)[4] = span->array->attribs[FRAG_ATTRIB_COL0]; + const GLuint n = span->end; + GLuint i; + + assert(!(span->arrayAttribs & FRAG_BIT_COL0)); + + if (span->arrayMask & SPAN_RGBA) { + /* convert array of int colors */ + for (i = 0; i < n; i++) { + col0[i][0] = UBYTE_TO_FLOAT(span->array->rgba8[i][0]); + col0[i][1] = UBYTE_TO_FLOAT(span->array->rgba8[i][1]); + col0[i][2] = UBYTE_TO_FLOAT(span->array->rgba8[i][2]); + col0[i][3] = UBYTE_TO_FLOAT(span->array->rgba8[i][3]); + } + } + else { + /* interpolate red/green/blue/alpha to get float colors */ + ASSERT(span->interpMask & SPAN_RGBA); + if (span->interpMask & SPAN_FLAT) { + GLfloat r = FixedToFloat(span->red); + GLfloat g = FixedToFloat(span->green); + GLfloat b = FixedToFloat(span->blue); + GLfloat a = FixedToFloat(span->alpha); + for (i = 0; i < n; i++) { + ASSIGN_4V(col0[i], r, g, b, a); + } + } + else { + GLfloat r = FixedToFloat(span->red); + GLfloat g = FixedToFloat(span->green); + GLfloat b = FixedToFloat(span->blue); + GLfloat a = FixedToFloat(span->alpha); + GLfloat dr = FixedToFloat(span->redStep); + GLfloat dg = FixedToFloat(span->greenStep); + GLfloat db = FixedToFloat(span->blueStep); + GLfloat da = FixedToFloat(span->alphaStep); + for (i = 0; i < n; i++) { + col0[i][0] = r; + col0[i][1] = g; + col0[i][2] = b; + col0[i][3] = a; + r += dr; + g += dg; + b += db; + a += da; + } + } + } + + span->arrayAttribs |= FRAG_BIT_COL0; + span->array->ChanType = GL_FLOAT; +} + + + +/** + * Fill in the span.zArray array from the span->z, zStep values. + */ +void +_swrast_span_interpolate_z( const struct gl_context *ctx, SWspan *span ) +{ + const GLuint n = span->end; + GLuint i; + + ASSERT(!(span->arrayMask & SPAN_Z)); + + if (ctx->DrawBuffer->Visual.depthBits <= 16) { + GLfixed zval = span->z; + GLuint *z = span->array->z; + for (i = 0; i < n; i++) { + z[i] = FixedToInt(zval); + zval += span->zStep; + } + } + else { + /* Deep Z buffer, no fixed->int shift */ + GLuint zval = span->z; + GLuint *z = span->array->z; + for (i = 0; i < n; i++) { + z[i] = zval; + zval += span->zStep; + } + } + span->interpMask &= ~SPAN_Z; + span->arrayMask |= SPAN_Z; +} + + +/** + * Compute mipmap LOD from partial derivatives. + * This the ideal solution, as given in the OpenGL spec. + */ +GLfloat +_swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy, + GLfloat dqdx, GLfloat dqdy, GLfloat texW, GLfloat texH, + GLfloat s, GLfloat t, GLfloat q, GLfloat invQ) +{ + GLfloat dudx = texW * ((s + dsdx) / (q + dqdx) - s * invQ); + GLfloat dvdx = texH * ((t + dtdx) / (q + dqdx) - t * invQ); + GLfloat dudy = texW * ((s + dsdy) / (q + dqdy) - s * invQ); + GLfloat dvdy = texH * ((t + dtdy) / (q + dqdy) - t * invQ); + GLfloat x = SQRTF(dudx * dudx + dvdx * dvdx); + GLfloat y = SQRTF(dudy * dudy + dvdy * dvdy); + GLfloat rho = MAX2(x, y); + GLfloat lambda = LOG2(rho); + return lambda; +} + + +/** + * Compute mipmap LOD from partial derivatives. + * This is a faster approximation than above function. + */ +#if 0 +GLfloat +_swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy, + GLfloat dqdx, GLfloat dqdy, GLfloat texW, GLfloat texH, + GLfloat s, GLfloat t, GLfloat q, GLfloat invQ) +{ + GLfloat dsdx2 = (s + dsdx) / (q + dqdx) - s * invQ; + GLfloat dtdx2 = (t + dtdx) / (q + dqdx) - t * invQ; + GLfloat dsdy2 = (s + dsdy) / (q + dqdy) - s * invQ; + GLfloat dtdy2 = (t + dtdy) / (q + dqdy) - t * invQ; + GLfloat maxU, maxV, rho, lambda; + dsdx2 = FABSF(dsdx2); + dsdy2 = FABSF(dsdy2); + dtdx2 = FABSF(dtdx2); + dtdy2 = FABSF(dtdy2); + maxU = MAX2(dsdx2, dsdy2) * texW; + maxV = MAX2(dtdx2, dtdy2) * texH; + rho = MAX2(maxU, maxV); + lambda = LOG2(rho); + return lambda; +} +#endif + + +/** + * Fill in the span.array->attrib[FRAG_ATTRIB_TEXn] arrays from the + * using the attrStart/Step values. + * + * This function only used during fixed-function fragment processing. + * + * Note: in the places where we divide by Q (or mult by invQ) we're + * really doing two things: perspective correction and texcoord + * projection. Remember, for texcoord (s,t,r,q) we need to index + * texels with (s/q, t/q, r/q). + */ +static void +interpolate_texcoords(struct gl_context *ctx, SWspan *span) +{ + const GLuint maxUnit + = (ctx->Texture._EnabledCoordUnits > 1) ? ctx->Const.MaxTextureUnits : 1; + GLuint u; + + /* XXX CoordUnits vs. ImageUnits */ + for (u = 0; u < maxUnit; u++) { + if (ctx->Texture._EnabledCoordUnits & (1 << u)) { + const GLuint attr = FRAG_ATTRIB_TEX0 + u; + const struct gl_texture_object *obj = ctx->Texture.Unit[u]._Current; + GLfloat texW, texH; + GLboolean needLambda; + GLfloat (*texcoord)[4] = span->array->attribs[attr]; + GLfloat *lambda = span->array->lambda[u]; + const GLfloat dsdx = span->attrStepX[attr][0]; + const GLfloat dsdy = span->attrStepY[attr][0]; + const GLfloat dtdx = span->attrStepX[attr][1]; + const GLfloat dtdy = span->attrStepY[attr][1]; + const GLfloat drdx = span->attrStepX[attr][2]; + const GLfloat dqdx = span->attrStepX[attr][3]; + const GLfloat dqdy = span->attrStepY[attr][3]; + GLfloat s = span->attrStart[attr][0] + span->leftClip * dsdx; + GLfloat t = span->attrStart[attr][1] + span->leftClip * dtdx; + GLfloat r = span->attrStart[attr][2] + span->leftClip * drdx; + GLfloat q = span->attrStart[attr][3] + span->leftClip * dqdx; + + if (obj) { + const struct gl_texture_image *img = obj->Image[0][obj->BaseLevel]; + needLambda = (obj->Sampler.MinFilter != obj->Sampler.MagFilter) + || ctx->FragmentProgram._Current; + /* LOD is calculated directly in the ansiotropic filter, we can + * skip the normal lambda function as the result is ignored. + */ + if (obj->Sampler.MaxAnisotropy > 1.0 && + obj->Sampler.MinFilter == GL_LINEAR_MIPMAP_LINEAR) { + needLambda = GL_FALSE; + } + texW = img->WidthScale; + texH = img->HeightScale; + } + else { + /* using a fragment program */ + texW = 1.0; + texH = 1.0; + needLambda = GL_FALSE; + } + + if (needLambda) { + GLuint i; + if (ctx->FragmentProgram._Current + || ctx->ATIFragmentShader._Enabled) { + /* do perspective correction but don't divide s, t, r by q */ + const GLfloat dwdx = span->attrStepX[FRAG_ATTRIB_WPOS][3]; + GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3] + span->leftClip * dwdx; + for (i = 0; i < span->end; i++) { + const GLfloat invW = 1.0F / w; + texcoord[i][0] = s * invW; + texcoord[i][1] = t * invW; + texcoord[i][2] = r * invW; + texcoord[i][3] = q * invW; + lambda[i] = _swrast_compute_lambda(dsdx, dsdy, dtdx, dtdy, + dqdx, dqdy, texW, texH, + s, t, q, invW); + s += dsdx; + t += dtdx; + r += drdx; + q += dqdx; + w += dwdx; + } + } + else { + for (i = 0; i < span->end; i++) { + const GLfloat invQ = (q == 0.0F) ? 1.0F : (1.0F / q); + texcoord[i][0] = s * invQ; + texcoord[i][1] = t * invQ; + texcoord[i][2] = r * invQ; + texcoord[i][3] = q; + lambda[i] = _swrast_compute_lambda(dsdx, dsdy, dtdx, dtdy, + dqdx, dqdy, texW, texH, + s, t, q, invQ); + s += dsdx; + t += dtdx; + r += drdx; + q += dqdx; + } + } + span->arrayMask |= SPAN_LAMBDA; + } + else { + GLuint i; + if (ctx->FragmentProgram._Current || + ctx->ATIFragmentShader._Enabled) { + /* do perspective correction but don't divide s, t, r by q */ + const GLfloat dwdx = span->attrStepX[FRAG_ATTRIB_WPOS][3]; + GLfloat w = span->attrStart[FRAG_ATTRIB_WPOS][3] + span->leftClip * dwdx; + for (i = 0; i < span->end; i++) { + const GLfloat invW = 1.0F / w; + texcoord[i][0] = s * invW; + texcoord[i][1] = t * invW; + texcoord[i][2] = r * invW; + texcoord[i][3] = q * invW; + lambda[i] = 0.0; + s += dsdx; + t += dtdx; + r += drdx; + q += dqdx; + w += dwdx; + } + } + else if (dqdx == 0.0F) { + /* Ortho projection or polygon's parallel to window X axis */ + const GLfloat invQ = (q == 0.0F) ? 1.0F : (1.0F / q); + for (i = 0; i < span->end; i++) { + texcoord[i][0] = s * invQ; + texcoord[i][1] = t * invQ; + texcoord[i][2] = r * invQ; + texcoord[i][3] = q; + lambda[i] = 0.0; + s += dsdx; + t += dtdx; + r += drdx; + } + } + else { + for (i = 0; i < span->end; i++) { + const GLfloat invQ = (q == 0.0F) ? 1.0F : (1.0F / q); + texcoord[i][0] = s * invQ; + texcoord[i][1] = t * invQ; + texcoord[i][2] = r * invQ; + texcoord[i][3] = q; + lambda[i] = 0.0; + s += dsdx; + t += dtdx; + r += drdx; + q += dqdx; + } + } + } /* lambda */ + } /* if */ + } /* for */ +} + + +/** + * Fill in the arrays->attribs[FRAG_ATTRIB_WPOS] array. + */ +static INLINE void +interpolate_wpos(struct gl_context *ctx, SWspan *span) +{ + GLfloat (*wpos)[4] = span->array->attribs[FRAG_ATTRIB_WPOS]; + GLuint i; + const GLfloat zScale = 1.0F / ctx->DrawBuffer->_DepthMaxF; + GLfloat w, dw; + + if (span->arrayMask & SPAN_XY) { + for (i = 0; i < span->end; i++) { + wpos[i][0] = (GLfloat) span->array->x[i]; + wpos[i][1] = (GLfloat) span->array->y[i]; + } + } + else { + for (i = 0; i < span->end; i++) { + wpos[i][0] = (GLfloat) span->x + i; + wpos[i][1] = (GLfloat) span->y; + } + } + + dw = span->attrStepX[FRAG_ATTRIB_WPOS][3]; + w = span->attrStart[FRAG_ATTRIB_WPOS][3] + span->leftClip * dw; + for (i = 0; i < span->end; i++) { + wpos[i][2] = (GLfloat) span->array->z[i] * zScale; + wpos[i][3] = w; + w += dw; + } +} + + +/** + * Apply the current polygon stipple pattern to a span of pixels. + */ +static INLINE void +stipple_polygon_span(struct gl_context *ctx, SWspan *span) +{ + GLubyte *mask = span->array->mask; + + ASSERT(ctx->Polygon.StippleFlag); + + if (span->arrayMask & SPAN_XY) { + /* arrays of x/y pixel coords */ + GLuint i; + for (i = 0; i < span->end; i++) { + const GLint col = span->array->x[i] % 32; + const GLint row = span->array->y[i] % 32; + const GLuint stipple = ctx->PolygonStipple[row]; + if (((1 << col) & stipple) == 0) { + mask[i] = 0; + } + } + } + else { + /* horizontal span of pixels */ + const GLuint highBit = 1 << 31; + const GLuint stipple = ctx->PolygonStipple[span->y % 32]; + GLuint i, m = highBit >> (GLuint) (span->x % 32); + for (i = 0; i < span->end; i++) { + if ((m & stipple) == 0) { + mask[i] = 0; + } + m = m >> 1; + if (m == 0) { + m = highBit; + } + } + } + span->writeAll = GL_FALSE; +} + + +/** + * Clip a pixel span to the current buffer/window boundaries: + * DrawBuffer->_Xmin, _Xmax, _Ymin, _Ymax. This will accomplish + * window clipping and scissoring. + * Return: GL_TRUE some pixels still visible + * GL_FALSE nothing visible + */ +static INLINE GLuint +clip_span( struct gl_context *ctx, SWspan *span ) +{ + const GLint xmin = ctx->DrawBuffer->_Xmin; + const GLint xmax = ctx->DrawBuffer->_Xmax; + const GLint ymin = ctx->DrawBuffer->_Ymin; + const GLint ymax = ctx->DrawBuffer->_Ymax; + + span->leftClip = 0; + + if (span->arrayMask & SPAN_XY) { + /* arrays of x/y pixel coords */ + const GLint *x = span->array->x; + const GLint *y = span->array->y; + const GLint n = span->end; + GLubyte *mask = span->array->mask; + GLint i; + if (span->arrayMask & SPAN_MASK) { + /* note: using & intead of && to reduce branches */ + for (i = 0; i < n; i++) { + mask[i] &= (x[i] >= xmin) & (x[i] < xmax) + & (y[i] >= ymin) & (y[i] < ymax); + } + } + else { + /* note: using & intead of && to reduce branches */ + for (i = 0; i < n; i++) { + mask[i] = (x[i] >= xmin) & (x[i] < xmax) + & (y[i] >= ymin) & (y[i] < ymax); + } + } + return GL_TRUE; /* some pixels visible */ + } + else { + /* horizontal span of pixels */ + const GLint x = span->x; + const GLint y = span->y; + GLint n = span->end; + + /* Trivial rejection tests */ + if (y < ymin || y >= ymax || x + n <= xmin || x >= xmax) { + span->end = 0; + return GL_FALSE; /* all pixels clipped */ + } + + /* Clip to right */ + if (x + n > xmax) { + ASSERT(x < xmax); + n = span->end = xmax - x; + } + + /* Clip to the left */ + if (x < xmin) { + const GLint leftClip = xmin - x; + GLuint i; + + ASSERT(leftClip > 0); + ASSERT(x + n > xmin); + + /* Clip 'leftClip' pixels from the left side. + * The span->leftClip field will be applied when we interpolate + * fragment attributes. + * For arrays of values, shift them left. + */ + for (i = 0; i < FRAG_ATTRIB_MAX; i++) { + if (span->interpMask & (1 << i)) { + GLuint j; + for (j = 0; j < 4; j++) { + span->attrStart[i][j] += leftClip * span->attrStepX[i][j]; + } + } + } + + span->red += leftClip * span->redStep; + span->green += leftClip * span->greenStep; + span->blue += leftClip * span->blueStep; + span->alpha += leftClip * span->alphaStep; + span->index += leftClip * span->indexStep; + span->z += leftClip * span->zStep; + span->intTex[0] += leftClip * span->intTexStep[0]; + span->intTex[1] += leftClip * span->intTexStep[1]; + +#define SHIFT_ARRAY(ARRAY, SHIFT, LEN) \ + memcpy(ARRAY, ARRAY + (SHIFT), (LEN) * sizeof(ARRAY[0])) + + for (i = 0; i < FRAG_ATTRIB_MAX; i++) { + if (span->arrayAttribs & (1 << i)) { + /* shift array elements left by 'leftClip' */ + SHIFT_ARRAY(span->array->attribs[i], leftClip, n - leftClip); + } + } + + SHIFT_ARRAY(span->array->mask, leftClip, n - leftClip); + SHIFT_ARRAY(span->array->rgba8, leftClip, n - leftClip); + SHIFT_ARRAY(span->array->rgba16, leftClip, n - leftClip); + SHIFT_ARRAY(span->array->x, leftClip, n - leftClip); + SHIFT_ARRAY(span->array->y, leftClip, n - leftClip); + SHIFT_ARRAY(span->array->z, leftClip, n - leftClip); + SHIFT_ARRAY(span->array->index, leftClip, n - leftClip); + for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) { + SHIFT_ARRAY(span->array->lambda[i], leftClip, n - leftClip); + } + SHIFT_ARRAY(span->array->coverage, leftClip, n - leftClip); + +#undef SHIFT_ARRAY + + span->leftClip = leftClip; + span->x = xmin; + span->end -= leftClip; + span->writeAll = GL_FALSE; + } + + ASSERT(span->x >= xmin); + ASSERT(span->x + span->end <= xmax); + ASSERT(span->y >= ymin); + ASSERT(span->y < ymax); + + return GL_TRUE; /* some pixels visible */ + } +} + + +/** + * Add specular colors to primary colors. + * Only called during fixed-function operation. + * Result is float color array (FRAG_ATTRIB_COL0). + */ +static INLINE void +add_specular(struct gl_context *ctx, SWspan *span) +{ + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + const GLubyte *mask = span->array->mask; + GLfloat (*col0)[4] = span->array->attribs[FRAG_ATTRIB_COL0]; + GLfloat (*col1)[4] = span->array->attribs[FRAG_ATTRIB_COL1]; + GLuint i; + + ASSERT(!ctx->FragmentProgram._Current); + ASSERT(span->arrayMask & SPAN_RGBA); + ASSERT(swrast->_ActiveAttribMask & FRAG_BIT_COL1); + (void) swrast; /* silence warning */ + + if (span->array->ChanType == GL_FLOAT) { + if ((span->arrayAttribs & FRAG_BIT_COL0) == 0) { + interpolate_active_attribs(ctx, span, FRAG_BIT_COL0); + } + } + else { + /* need float colors */ + if ((span->arrayAttribs & FRAG_BIT_COL0) == 0) { + interpolate_float_colors(span); + } + } + + if ((span->arrayAttribs & FRAG_BIT_COL1) == 0) { + /* XXX could avoid this and interpolate COL1 in the loop below */ + interpolate_active_attribs(ctx, span, FRAG_BIT_COL1); + } + + ASSERT(span->arrayAttribs & FRAG_BIT_COL0); + ASSERT(span->arrayAttribs & FRAG_BIT_COL1); + + for (i = 0; i < span->end; i++) { + if (mask[i]) { + col0[i][0] += col1[i][0]; + col0[i][1] += col1[i][1]; + col0[i][2] += col1[i][2]; + } + } + + span->array->ChanType = GL_FLOAT; +} + + +/** + * Apply antialiasing coverage value to alpha values. + */ +static INLINE void +apply_aa_coverage(SWspan *span) +{ + const GLfloat *coverage = span->array->coverage; + GLuint i; + if (span->array->ChanType == GL_UNSIGNED_BYTE) { + GLubyte (*rgba)[4] = span->array->rgba8; + for (i = 0; i < span->end; i++) { + const GLfloat a = rgba[i][ACOMP] * coverage[i]; + rgba[i][ACOMP] = (GLubyte) CLAMP(a, 0.0, 255.0); + ASSERT(coverage[i] >= 0.0); + ASSERT(coverage[i] <= 1.0); + } + } + else if (span->array->ChanType == GL_UNSIGNED_SHORT) { + GLushort (*rgba)[4] = span->array->rgba16; + for (i = 0; i < span->end; i++) { + const GLfloat a = rgba[i][ACOMP] * coverage[i]; + rgba[i][ACOMP] = (GLushort) CLAMP(a, 0.0, 65535.0); + } + } + else { + GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL0]; + for (i = 0; i < span->end; i++) { + rgba[i][ACOMP] = rgba[i][ACOMP] * coverage[i]; + /* clamp later */ + } + } +} + + +/** + * Clamp span's float colors to [0,1] + */ +static INLINE void +clamp_colors(SWspan *span) +{ + GLfloat (*rgba)[4] = span->array->attribs[FRAG_ATTRIB_COL0]; + GLuint i; + ASSERT(span->array->ChanType == GL_FLOAT); + for (i = 0; i < span->end; i++) { + rgba[i][RCOMP] = CLAMP(rgba[i][RCOMP], 0.0F, 1.0F); + rgba[i][GCOMP] = CLAMP(rgba[i][GCOMP], 0.0F, 1.0F); + rgba[i][BCOMP] = CLAMP(rgba[i][BCOMP], 0.0F, 1.0F); + rgba[i][ACOMP] = CLAMP(rgba[i][ACOMP], 0.0F, 1.0F); + } +} + + +/** + * Convert the span's color arrays to the given type. + * The only way 'output' can be greater than zero is when we have a fragment + * program that writes to gl_FragData[1] or higher. + * \param output which fragment program color output is being processed + */ +static INLINE void +convert_color_type(SWspan *span, GLenum newType, GLuint output) +{ + GLvoid *src, *dst; + + if (output > 0 || span->array->ChanType == GL_FLOAT) { + src = span->array->attribs[FRAG_ATTRIB_COL0 + output]; + span->array->ChanType = GL_FLOAT; + } + else if (span->array->ChanType == GL_UNSIGNED_BYTE) { + src = span->array->rgba8; + } + else { + ASSERT(span->array->ChanType == GL_UNSIGNED_SHORT); + src = span->array->rgba16; + } + + if (newType == GL_UNSIGNED_BYTE) { + dst = span->array->rgba8; + } + else if (newType == GL_UNSIGNED_SHORT) { + dst = span->array->rgba16; + } + else { + dst = span->array->attribs[FRAG_ATTRIB_COL0]; + } + + _mesa_convert_colors(span->array->ChanType, src, + newType, dst, + span->end, span->array->mask); + + span->array->ChanType = newType; + span->array->rgba = dst; +} + + + +/** + * Apply fragment shader, fragment program or normal texturing to span. + */ +static INLINE void +shade_texture_span(struct gl_context *ctx, SWspan *span) +{ + GLbitfield inputsRead; + + /* Determine which fragment attributes are actually needed */ + if (ctx->FragmentProgram._Current) { + inputsRead = ctx->FragmentProgram._Current->Base.InputsRead; + } + else { + /* XXX we could be a bit smarter about this */ + inputsRead = ~0; + } + + if (ctx->FragmentProgram._Current || + ctx->ATIFragmentShader._Enabled) { + /* programmable shading */ + if (span->primitive == GL_BITMAP && span->array->ChanType != GL_FLOAT) { + convert_color_type(span, GL_FLOAT, 0); + } + else { + span->array->rgba = (void *) span->array->attribs[FRAG_ATTRIB_COL0]; + } + + if (span->primitive != GL_POINT || + (span->interpMask & SPAN_RGBA) || + ctx->Point.PointSprite) { + /* for single-pixel points, we populated the arrays already */ + interpolate_active_attribs(ctx, span, ~0); + } + span->array->ChanType = GL_FLOAT; + + if (!(span->arrayMask & SPAN_Z)) + _swrast_span_interpolate_z (ctx, span); + +#if 0 + if (inputsRead & FRAG_BIT_WPOS) +#else + /* XXX always interpolate wpos so that DDX/DDY work */ +#endif + interpolate_wpos(ctx, span); + + /* Run fragment program/shader now */ + if (ctx->FragmentProgram._Current) { + _swrast_exec_fragment_program(ctx, span); + } + else { + ASSERT(ctx->ATIFragmentShader._Enabled); + _swrast_exec_fragment_shader(ctx, span); + } + } + else if (ctx->Texture._EnabledCoordUnits) { + /* conventional texturing */ + +#if CHAN_BITS == 32 + if ((span->arrayAttribs & FRAG_BIT_COL0) == 0) { + interpolate_int_colors(ctx, span); + } +#else + if (!(span->arrayMask & SPAN_RGBA)) + interpolate_int_colors(ctx, span); +#endif + if ((span->arrayAttribs & FRAG_BITS_TEX_ANY) == 0x0) + interpolate_texcoords(ctx, span); + + _swrast_texture_span(ctx, span); + } +} + + + +/** + * Apply all the per-fragment operations to a span. + * This now includes texturing (_swrast_write_texture_span() is history). + * This function may modify any of the array values in the span. + * span->interpMask and span->arrayMask may be changed but will be restored + * to their original values before returning. + */ +void +_swrast_write_rgba_span( struct gl_context *ctx, SWspan *span) +{ + const SWcontext *swrast = SWRAST_CONTEXT(ctx); + const GLuint *colorMask = (GLuint *) ctx->Color.ColorMask; + const GLbitfield origInterpMask = span->interpMask; + const GLbitfield origArrayMask = span->arrayMask; + const GLbitfield origArrayAttribs = span->arrayAttribs; + const GLenum origChanType = span->array->ChanType; + void * const origRgba = span->array->rgba; + const GLboolean shader = (ctx->FragmentProgram._Current + || ctx->ATIFragmentShader._Enabled); + const GLboolean shaderOrTexture = shader || ctx->Texture._EnabledCoordUnits; + struct gl_framebuffer *fb = ctx->DrawBuffer; + + /* + printf("%s() interp 0x%x array 0x%x\n", __FUNCTION__, + span->interpMask, span->arrayMask); + */ + + ASSERT(span->primitive == GL_POINT || + span->primitive == GL_LINE || + span->primitive == GL_POLYGON || + span->primitive == GL_BITMAP); + + /* Fragment write masks */ + if (span->arrayMask & SPAN_MASK) { + /* mask was initialized by caller, probably glBitmap */ + span->writeAll = GL_FALSE; + } + else { + memset(span->array->mask, 1, span->end); + span->writeAll = GL_TRUE; + } + + /* Clip to window/scissor box */ + if (!clip_span(ctx, span)) { + return; + } + + ASSERT(span->end <= MAX_WIDTH); + + /* Depth bounds test */ + if (ctx->Depth.BoundsTest && fb->Visual.depthBits > 0) { + if (!_swrast_depth_bounds_test(ctx, span)) { + return; + } + } + +#ifdef DEBUG + /* Make sure all fragments are within window bounds */ + if (span->arrayMask & SPAN_XY) { + /* array of pixel locations */ + GLuint i; + for (i = 0; i < span->end; i++) { + if (span->array->mask[i]) { + assert(span->array->x[i] >= fb->_Xmin); + assert(span->array->x[i] < fb->_Xmax); + assert(span->array->y[i] >= fb->_Ymin); + assert(span->array->y[i] < fb->_Ymax); + } + } + } +#endif + + /* Polygon Stippling */ + if (ctx->Polygon.StippleFlag && span->primitive == GL_POLYGON) { + stipple_polygon_span(ctx, span); + } + + /* This is the normal place to compute the fragment color/Z + * from texturing or shading. + */ + if (shaderOrTexture && !swrast->_DeferredTexture) { + shade_texture_span(ctx, span); + } + + /* Do the alpha test */ + if (ctx->Color.AlphaEnabled) { + if (!_swrast_alpha_test(ctx, span)) { + /* all fragments failed test */ + goto end; + } + } + + /* Stencil and Z testing */ + if (ctx->Stencil._Enabled || ctx->Depth.Test) { + if (!(span->arrayMask & SPAN_Z)) + _swrast_span_interpolate_z(ctx, span); + + if (ctx->Transform.DepthClamp) + _swrast_depth_clamp_span(ctx, span); + + if (ctx->Stencil._Enabled) { + /* Combined Z/stencil tests */ + if (!_swrast_stencil_and_ztest_span(ctx, span)) { + /* all fragments failed test */ + goto end; + } + } + else if (fb->Visual.depthBits > 0) { + /* Just regular depth testing */ + ASSERT(ctx->Depth.Test); + ASSERT(span->arrayMask & SPAN_Z); + if (!_swrast_depth_test_span(ctx, span)) { + /* all fragments failed test */ + goto end; + } + } + } + + if (ctx->Query.CurrentOcclusionObject) { + /* update count of 'passed' fragments */ + struct gl_query_object *q = ctx->Query.CurrentOcclusionObject; + GLuint i; + for (i = 0; i < span->end; i++) + q->Result += span->array->mask[i]; + } + + /* We had to wait until now to check for glColorMask(0,0,0,0) because of + * the occlusion test. + */ + if (fb->_NumColorDrawBuffers == 1 && colorMask[0] == 0x0) { + /* no colors to write */ + goto end; + } + + /* If we were able to defer fragment color computation to now, there's + * a good chance that many fragments will have already been killed by + * Z/stencil testing. + */ + if (shaderOrTexture && swrast->_DeferredTexture) { + shade_texture_span(ctx, span); + } + +#if CHAN_BITS == 32 + if ((span->arrayAttribs & FRAG_BIT_COL0) == 0) { + interpolate_active_attribs(ctx, span, FRAG_BIT_COL0); + } +#else + if ((span->arrayMask & SPAN_RGBA) == 0) { + interpolate_int_colors(ctx, span); + } +#endif + + ASSERT(span->arrayMask & SPAN_RGBA); + + if (span->primitive == GL_BITMAP || !swrast->SpecularVertexAdd) { + /* Add primary and specular (diffuse + specular) colors */ + if (!shader) { + if (ctx->Fog.ColorSumEnabled || + (ctx->Light.Enabled && + ctx->Light.Model.ColorControl == GL_SEPARATE_SPECULAR_COLOR)) { + add_specular(ctx, span); + } + } + } + + /* Fog */ + if (swrast->_FogEnabled) { + _swrast_fog_rgba_span(ctx, span); + } + + /* Antialias coverage application */ + if (span->arrayMask & SPAN_COVERAGE) { + apply_aa_coverage(span); + } + + /* Clamp color/alpha values over the range [0.0, 1.0] before storage */ + if (ctx->Color.ClampFragmentColor == GL_TRUE && + span->array->ChanType == GL_FLOAT) { + clamp_colors(span); + } + + /* + * Write to renderbuffers. + * Depending on glDrawBuffer() state and the which color outputs are + * written by the fragment shader, we may either replicate one color to + * all renderbuffers or write a different color to each renderbuffer. + * multiFragOutputs=TRUE for the later case. + */ + { + const GLuint numBuffers = fb->_NumColorDrawBuffers; + const struct gl_fragment_program *fp = ctx->FragmentProgram._Current; + const GLboolean multiFragOutputs = + (fp && fp->Base.OutputsWritten >= (1 << FRAG_RESULT_DATA0)); + GLuint buf; + + for (buf = 0; buf < numBuffers; buf++) { + struct gl_renderbuffer *rb = fb->_ColorDrawBuffers[buf]; + + /* color[fragOutput] will be written to buffer[buf] */ + + if (rb) { + GLchan rgbaSave[MAX_WIDTH][4]; + const GLuint fragOutput = multiFragOutputs ? buf : 0; + + /* set span->array->rgba to colors for render buffer's datatype */ + if (rb->DataType != span->array->ChanType || fragOutput > 0) { + convert_color_type(span, rb->DataType, fragOutput); + } + else { + if (rb->DataType == GL_UNSIGNED_BYTE) { + span->array->rgba = span->array->rgba8; + } + else if (rb->DataType == GL_UNSIGNED_SHORT) { + span->array->rgba = (void *) span->array->rgba16; + } + else { + span->array->rgba = (void *) + span->array->attribs[FRAG_ATTRIB_COL0]; + } + } + + if (!multiFragOutputs && numBuffers > 1) { + /* save colors for second, third renderbuffer writes */ + memcpy(rgbaSave, span->array->rgba, + 4 * span->end * sizeof(GLchan)); + } + + ASSERT(rb->_BaseFormat == GL_RGBA || rb->_BaseFormat == GL_RGB || + rb->_BaseFormat == GL_ALPHA); + + if (ctx->Color._LogicOpEnabled) { + _swrast_logicop_rgba_span(ctx, rb, span); + } + else if ((ctx->Color.BlendEnabled >> buf) & 1) { + _swrast_blend_span(ctx, rb, span); + } + + if (colorMask[buf] != 0xffffffff) { + _swrast_mask_rgba_span(ctx, rb, span, buf); + } + + if (span->arrayMask & SPAN_XY) { + /* array of pixel coords */ + ASSERT(rb->PutValues); + rb->PutValues(ctx, rb, span->end, + span->array->x, span->array->y, + span->array->rgba, span->array->mask); + } + else { + /* horizontal run of pixels */ + ASSERT(rb->PutRow); + rb->PutRow(ctx, rb, span->end, span->x, span->y, + span->array->rgba, + span->writeAll ? NULL: span->array->mask); + } + + if (!multiFragOutputs && numBuffers > 1) { + /* restore original span values */ + memcpy(span->array->rgba, rgbaSave, + 4 * span->end * sizeof(GLchan)); + } + + } /* if rb */ + } /* for buf */ + } + +end: + /* restore these values before returning */ + span->interpMask = origInterpMask; + span->arrayMask = origArrayMask; + span->arrayAttribs = origArrayAttribs; + span->array->ChanType = origChanType; + span->array->rgba = origRgba; +} + + +/** + * Read RGBA pixels from a renderbuffer. Clipping will be done to prevent + * reading ouside the buffer's boundaries. + * \param dstType datatype for returned colors + * \param rgba the returned colors + */ +void +_swrast_read_rgba_span( struct gl_context *ctx, struct gl_renderbuffer *rb, + GLuint n, GLint x, GLint y, GLenum dstType, + GLvoid *rgba) +{ + const GLint bufWidth = (GLint) rb->Width; + const GLint bufHeight = (GLint) rb->Height; + + if (y < 0 || y >= bufHeight || x + (GLint) n < 0 || x >= bufWidth) { + /* completely above, below, or right */ + /* XXX maybe leave rgba values undefined? */ + memset(rgba, 0, 4 * n * sizeof(GLchan)); + } + else { + GLint skip, length; + if (x < 0) { + /* left edge clipping */ + skip = -x; + length = (GLint) n - skip; + if (length < 0) { + /* completely left of window */ + return; + } + if (length > bufWidth) { + length = bufWidth; + } + } + else if ((GLint) (x + n) > bufWidth) { + /* right edge clipping */ + skip = 0; + length = bufWidth - x; + if (length < 0) { + /* completely to right of window */ + return; + } + } + else { + /* no clipping */ + skip = 0; + length = (GLint) n; + } + + ASSERT(rb); + ASSERT(rb->GetRow); + ASSERT(rb->_BaseFormat == GL_RGBA || + rb->_BaseFormat == GL_RGB || + rb->_BaseFormat == GL_RG || + rb->_BaseFormat == GL_RED || + rb->_BaseFormat == GL_LUMINANCE || + rb->_BaseFormat == GL_INTENSITY || + rb->_BaseFormat == GL_LUMINANCE_ALPHA || + rb->_BaseFormat == GL_ALPHA); + + if (rb->DataType == dstType) { + rb->GetRow(ctx, rb, length, x + skip, y, + (GLubyte *) rgba + skip * RGBA_PIXEL_SIZE(rb->DataType)); + } + else { + GLuint temp[MAX_WIDTH * 4]; + rb->GetRow(ctx, rb, length, x + skip, y, temp); + _mesa_convert_colors(rb->DataType, temp, + dstType, (GLubyte *) rgba + skip * RGBA_PIXEL_SIZE(dstType), + length, NULL); + } + } +} + + +/** + * Wrapper for gl_renderbuffer::GetValues() which does clipping to avoid + * reading values outside the buffer bounds. + * We can use this for reading any format/type of renderbuffer. + * \param valueSize is the size in bytes of each value (pixel) put into the + * values array. + */ +void +_swrast_get_values(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLuint count, const GLint x[], const GLint y[], + void *values, GLuint valueSize) +{ + GLuint i, inCount = 0, inStart = 0; + + for (i = 0; i < count; i++) { + if (x[i] >= 0 && y[i] >= 0 && + x[i] < (GLint) rb->Width && y[i] < (GLint) rb->Height) { + /* inside */ + if (inCount == 0) + inStart = i; + inCount++; + } + else { + if (inCount > 0) { + /* read [inStart, inStart + inCount) */ + rb->GetValues(ctx, rb, inCount, x + inStart, y + inStart, + (GLubyte *) values + inStart * valueSize); + inCount = 0; + } + } + } + if (inCount > 0) { + /* read last values */ + rb->GetValues(ctx, rb, inCount, x + inStart, y + inStart, + (GLubyte *) values + inStart * valueSize); + } +} + + +/** + * Wrapper for gl_renderbuffer::PutRow() which does clipping. + * \param valueSize size of each value (pixel) in bytes + */ +void +_swrast_put_row(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLuint count, GLint x, GLint y, + const GLvoid *values, GLuint valueSize) +{ + GLint skip = 0; + + if (y < 0 || y >= (GLint) rb->Height) + return; /* above or below */ + + if (x + (GLint) count <= 0 || x >= (GLint) rb->Width) + return; /* entirely left or right */ + + if ((GLint) (x + count) > (GLint) rb->Width) { + /* right clip */ + GLint clip = x + count - rb->Width; + count -= clip; + } + + if (x < 0) { + /* left clip */ + skip = -x; + x = 0; + count -= skip; + } + + rb->PutRow(ctx, rb, count, x, y, + (const GLubyte *) values + skip * valueSize, NULL); +} + + +/** + * Wrapper for gl_renderbuffer::GetRow() which does clipping. + * \param valueSize size of each value (pixel) in bytes + */ +void +_swrast_get_row(struct gl_context *ctx, struct gl_renderbuffer *rb, + GLuint count, GLint x, GLint y, + GLvoid *values, GLuint valueSize) +{ + GLint skip = 0; + + if (y < 0 || y >= (GLint) rb->Height) + return; /* above or below */ + + if (x + (GLint) count <= 0 || x >= (GLint) rb->Width) + return; /* entirely left or right */ + + if (x + count > rb->Width) { + /* right clip */ + GLint clip = x + count - rb->Width; + count -= clip; + } + + if (x < 0) { + /* left clip */ + skip = -x; + x = 0; + count -= skip; + } + + rb->GetRow(ctx, rb, count, x, y, (GLubyte *) values + skip * valueSize); +} + + +/** + * Get RGBA pixels from the given renderbuffer. + * Used by blending, logicop and masking functions. + * \return pointer to the colors we read. + */ +void * +_swrast_get_dest_rgba(struct gl_context *ctx, struct gl_renderbuffer *rb, + SWspan *span) +{ + const GLuint pixelSize = RGBA_PIXEL_SIZE(span->array->ChanType); + void *rbPixels; + + /* Point rbPixels to a temporary space */ + rbPixels = span->array->attribs[FRAG_ATTRIB_MAX - 1]; + + /* Get destination values from renderbuffer */ + if (span->arrayMask & SPAN_XY) { + _swrast_get_values(ctx, rb, span->end, span->array->x, span->array->y, + rbPixels, pixelSize); + } + else { + _swrast_get_row(ctx, rb, span->end, span->x, span->y, + rbPixels, pixelSize); + } + + return rbPixels; +} diff --git a/mesalib/src/mesa/swrast/s_texcombine.c b/mesalib/src/mesa/swrast/s_texcombine.c index 7f49b6ffa..53ef2f890 100644 --- a/mesalib/src/mesa/swrast/s_texcombine.c +++ b/mesalib/src/mesa/swrast/s_texcombine.c @@ -1,739 +1,751 @@ -/* - * Mesa 3-D graphics library - * Version: 7.5 - * - * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. - * Copyright (C) 2009 VMware, Inc. All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "main/glheader.h" -#include "main/context.h" -#include "main/colormac.h" -#include "main/imports.h" -#include "main/pixeltransfer.h" -#include "program/prog_instruction.h" - -#include "s_context.h" -#include "s_texcombine.h" - - -/** - * Pointer to array of float[4] - * This type makes the code below more concise and avoids a lot of casting. - */ -typedef float (*float4_array)[4]; - - -/** - * Return array of texels for given unit. - */ -static INLINE float4_array -get_texel_array(SWcontext *swrast, GLuint unit) -{ - return (float4_array) (swrast->TexelBuffer + unit * MAX_WIDTH * 4); -} - - - -/** - * Do texture application for: - * GL_EXT_texture_env_combine - * GL_ARB_texture_env_combine - * GL_EXT_texture_env_dot3 - * GL_ARB_texture_env_dot3 - * GL_ATI_texture_env_combine3 - * GL_NV_texture_env_combine4 - * conventional GL texture env modes - * - * \param ctx rendering context - * \param unit the texture combiner unit - * \param n number of fragments to process (span width) - * \param primary_rgba incoming fragment color array - * \param texelBuffer pointer to texel colors for all texture units - * - * \param rgba incoming/result fragment colors - */ -static void -texture_combine( struct gl_context *ctx, GLuint unit, GLuint n, - const float4_array primary_rgba, - const GLfloat *texelBuffer, - GLchan (*rgbaChan)[4] ) -{ - SWcontext *swrast = SWRAST_CONTEXT(ctx); - const struct gl_texture_unit *textureUnit = &(ctx->Texture.Unit[unit]); - const struct gl_tex_env_combine_state *combine = textureUnit->_CurrentCombine; - float4_array argRGB[MAX_COMBINER_TERMS]; - float4_array argA[MAX_COMBINER_TERMS]; - const GLfloat scaleRGB = (GLfloat) (1 << combine->ScaleShiftRGB); - const GLfloat scaleA = (GLfloat) (1 << combine->ScaleShiftA); - const GLuint numArgsRGB = combine->_NumArgsRGB; - const GLuint numArgsA = combine->_NumArgsA; - float4_array ccolor[4], rgba; - GLuint i, term; - - /* alloc temp pixel buffers */ - rgba = (float4_array) malloc(4 * n * sizeof(GLfloat)); - if (!rgba) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "texture_combine"); - return; - } - - for (i = 0; i < numArgsRGB || i < numArgsA; i++) { - ccolor[i] = (float4_array) malloc(4 * n * sizeof(GLfloat)); - if (!ccolor[i]) { - while (i) { - free(ccolor[i]); - i--; - } - _mesa_error(ctx, GL_OUT_OF_MEMORY, "texture_combine"); - return; - } - } - - for (i = 0; i < n; i++) { - rgba[i][RCOMP] = CHAN_TO_FLOAT(rgbaChan[i][RCOMP]); - rgba[i][GCOMP] = CHAN_TO_FLOAT(rgbaChan[i][GCOMP]); - rgba[i][BCOMP] = CHAN_TO_FLOAT(rgbaChan[i][BCOMP]); - rgba[i][ACOMP] = CHAN_TO_FLOAT(rgbaChan[i][ACOMP]); - } - - /* - printf("modeRGB 0x%x modeA 0x%x srcRGB1 0x%x srcA1 0x%x srcRGB2 0x%x srcA2 0x%x\n", - combine->ModeRGB, - combine->ModeA, - combine->SourceRGB[0], - combine->SourceA[0], - combine->SourceRGB[1], - combine->SourceA[1]); - */ - - /* - * Do operand setup for up to 4 operands. Loop over the terms. - */ - for (term = 0; term < numArgsRGB; term++) { - const GLenum srcRGB = combine->SourceRGB[term]; - const GLenum operandRGB = combine->OperandRGB[term]; - - switch (srcRGB) { - case GL_TEXTURE: - argRGB[term] = get_texel_array(swrast, unit); - break; - case GL_PRIMARY_COLOR: - argRGB[term] = primary_rgba; - break; - case GL_PREVIOUS: - argRGB[term] = rgba; - break; - case GL_CONSTANT: - { - float4_array c = ccolor[term]; - GLfloat red = textureUnit->EnvColor[0]; - GLfloat green = textureUnit->EnvColor[1]; - GLfloat blue = textureUnit->EnvColor[2]; - GLfloat alpha = textureUnit->EnvColor[3]; - for (i = 0; i < n; i++) { - ASSIGN_4V(c[i], red, green, blue, alpha); - } - argRGB[term] = ccolor[term]; - } - break; - /* GL_ATI_texture_env_combine3 allows GL_ZERO & GL_ONE as sources. - */ - case GL_ZERO: - { - float4_array c = ccolor[term]; - for (i = 0; i < n; i++) { - ASSIGN_4V(c[i], 0.0F, 0.0F, 0.0F, 0.0F); - } - argRGB[term] = ccolor[term]; - } - break; - case GL_ONE: - { - float4_array c = ccolor[term]; - for (i = 0; i < n; i++) { - ASSIGN_4V(c[i], 1.0F, 1.0F, 1.0F, 1.0F); - } - argRGB[term] = ccolor[term]; - } - break; - default: - /* ARB_texture_env_crossbar source */ - { - const GLuint srcUnit = srcRGB - GL_TEXTURE0; - ASSERT(srcUnit < ctx->Const.MaxTextureUnits); - if (!ctx->Texture.Unit[srcUnit]._ReallyEnabled) - goto end; - argRGB[term] = get_texel_array(swrast, srcUnit); - } - } - - if (operandRGB != GL_SRC_COLOR) { - float4_array src = argRGB[term]; - float4_array dst = ccolor[term]; - - /* point to new arg[term] storage */ - argRGB[term] = ccolor[term]; - - switch (operandRGB) { - case GL_ONE_MINUS_SRC_COLOR: - for (i = 0; i < n; i++) { - dst[i][RCOMP] = 1.0F - src[i][RCOMP]; - dst[i][GCOMP] = 1.0F - src[i][GCOMP]; - dst[i][BCOMP] = 1.0F - src[i][BCOMP]; - } - break; - case GL_SRC_ALPHA: - for (i = 0; i < n; i++) { - dst[i][RCOMP] = - dst[i][GCOMP] = - dst[i][BCOMP] = src[i][ACOMP]; - } - break; - case GL_ONE_MINUS_SRC_ALPHA: - for (i = 0; i < n; i++) { - dst[i][RCOMP] = - dst[i][GCOMP] = - dst[i][BCOMP] = 1.0F - src[i][ACOMP]; - } - break; - default: - _mesa_problem(ctx, "Bad operandRGB"); - } - } - } - - /* - * Set up the argA[term] pointers - */ - for (term = 0; term < numArgsA; term++) { - const GLenum srcA = combine->SourceA[term]; - const GLenum operandA = combine->OperandA[term]; - - switch (srcA) { - case GL_TEXTURE: - argA[term] = get_texel_array(swrast, unit); - break; - case GL_PRIMARY_COLOR: - argA[term] = primary_rgba; - break; - case GL_PREVIOUS: - argA[term] = rgba; - break; - case GL_CONSTANT: - { - float4_array c = ccolor[term]; - GLfloat alpha = textureUnit->EnvColor[3]; - for (i = 0; i < n; i++) - c[i][ACOMP] = alpha; - argA[term] = ccolor[term]; - } - break; - /* GL_ATI_texture_env_combine3 allows GL_ZERO & GL_ONE as sources. - */ - case GL_ZERO: - { - float4_array c = ccolor[term]; - for (i = 0; i < n; i++) - c[i][ACOMP] = 0.0F; - argA[term] = ccolor[term]; - } - break; - case GL_ONE: - { - float4_array c = ccolor[term]; - for (i = 0; i < n; i++) - c[i][ACOMP] = 1.0F; - argA[term] = ccolor[term]; - } - break; - default: - /* ARB_texture_env_crossbar source */ - { - const GLuint srcUnit = srcA - GL_TEXTURE0; - ASSERT(srcUnit < ctx->Const.MaxTextureUnits); - if (!ctx->Texture.Unit[srcUnit]._ReallyEnabled) - goto end; - argA[term] = get_texel_array(swrast, srcUnit); - } - } - - if (operandA == GL_ONE_MINUS_SRC_ALPHA) { - float4_array src = argA[term]; - float4_array dst = ccolor[term]; - argA[term] = ccolor[term]; - for (i = 0; i < n; i++) { - dst[i][ACOMP] = 1.0F - src[i][ACOMP]; - } - } - } - - /* RGB channel combine */ - { - float4_array arg0 = argRGB[0]; - float4_array arg1 = argRGB[1]; - float4_array arg2 = argRGB[2]; - float4_array arg3 = argRGB[3]; - - switch (combine->ModeRGB) { - case GL_REPLACE: - for (i = 0; i < n; i++) { - rgba[i][RCOMP] = arg0[i][RCOMP] * scaleRGB; - rgba[i][GCOMP] = arg0[i][GCOMP] * scaleRGB; - rgba[i][BCOMP] = arg0[i][BCOMP] * scaleRGB; - } - break; - case GL_MODULATE: - for (i = 0; i < n; i++) { - rgba[i][RCOMP] = arg0[i][RCOMP] * arg1[i][RCOMP] * scaleRGB; - rgba[i][GCOMP] = arg0[i][GCOMP] * arg1[i][GCOMP] * scaleRGB; - rgba[i][BCOMP] = arg0[i][BCOMP] * arg1[i][BCOMP] * scaleRGB; - } - break; - case GL_ADD: - if (textureUnit->EnvMode == GL_COMBINE4_NV) { - /* (a * b) + (c * d) */ - for (i = 0; i < n; i++) { - rgba[i][RCOMP] = (arg0[i][RCOMP] * arg1[i][RCOMP] + - arg2[i][RCOMP] * arg3[i][RCOMP]) * scaleRGB; - rgba[i][GCOMP] = (arg0[i][GCOMP] * arg1[i][GCOMP] + - arg2[i][GCOMP] * arg3[i][GCOMP]) * scaleRGB; - rgba[i][BCOMP] = (arg0[i][BCOMP] * arg1[i][BCOMP] + - arg2[i][BCOMP] * arg3[i][BCOMP]) * scaleRGB; - } - } - else { - /* 2-term addition */ - for (i = 0; i < n; i++) { - rgba[i][RCOMP] = (arg0[i][RCOMP] + arg1[i][RCOMP]) * scaleRGB; - rgba[i][GCOMP] = (arg0[i][GCOMP] + arg1[i][GCOMP]) * scaleRGB; - rgba[i][BCOMP] = (arg0[i][BCOMP] + arg1[i][BCOMP]) * scaleRGB; - } - } - break; - case GL_ADD_SIGNED: - if (textureUnit->EnvMode == GL_COMBINE4_NV) { - /* (a * b) + (c * d) - 0.5 */ - for (i = 0; i < n; i++) { - rgba[i][RCOMP] = (arg0[i][RCOMP] * arg1[i][RCOMP] + - arg2[i][RCOMP] * arg3[i][RCOMP] - 0.5F) * scaleRGB; - rgba[i][GCOMP] = (arg0[i][GCOMP] * arg1[i][GCOMP] + - arg2[i][GCOMP] * arg3[i][GCOMP] - 0.5F) * scaleRGB; - rgba[i][BCOMP] = (arg0[i][BCOMP] * arg1[i][BCOMP] + - arg2[i][BCOMP] * arg3[i][BCOMP] - 0.5F) * scaleRGB; - } - } - else { - for (i = 0; i < n; i++) { - rgba[i][RCOMP] = (arg0[i][RCOMP] + arg1[i][RCOMP] - 0.5F) * scaleRGB; - rgba[i][GCOMP] = (arg0[i][GCOMP] + arg1[i][GCOMP] - 0.5F) * scaleRGB; - rgba[i][BCOMP] = (arg0[i][BCOMP] + arg1[i][BCOMP] - 0.5F) * scaleRGB; - } - } - break; - case GL_INTERPOLATE: - for (i = 0; i < n; i++) { - rgba[i][RCOMP] = (arg0[i][RCOMP] * arg2[i][RCOMP] + - arg1[i][RCOMP] * (1.0F - arg2[i][RCOMP])) * scaleRGB; - rgba[i][GCOMP] = (arg0[i][GCOMP] * arg2[i][GCOMP] + - arg1[i][GCOMP] * (1.0F - arg2[i][GCOMP])) * scaleRGB; - rgba[i][BCOMP] = (arg0[i][BCOMP] * arg2[i][BCOMP] + - arg1[i][BCOMP] * (1.0F - arg2[i][BCOMP])) * scaleRGB; - } - break; - case GL_SUBTRACT: - for (i = 0; i < n; i++) { - rgba[i][RCOMP] = (arg0[i][RCOMP] - arg1[i][RCOMP]) * scaleRGB; - rgba[i][GCOMP] = (arg0[i][GCOMP] - arg1[i][GCOMP]) * scaleRGB; - rgba[i][BCOMP] = (arg0[i][BCOMP] - arg1[i][BCOMP]) * scaleRGB; - } - break; - case GL_DOT3_RGB_EXT: - case GL_DOT3_RGBA_EXT: - /* Do not scale the result by 1 2 or 4 */ - for (i = 0; i < n; i++) { - GLfloat dot = ((arg0[i][RCOMP] - 0.5F) * (arg1[i][RCOMP] - 0.5F) + - (arg0[i][GCOMP] - 0.5F) * (arg1[i][GCOMP] - 0.5F) + - (arg0[i][BCOMP] - 0.5F) * (arg1[i][BCOMP] - 0.5F)) - * 4.0F; - dot = CLAMP(dot, 0.0F, 1.0F); - rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = dot; - } - break; - case GL_DOT3_RGB: - case GL_DOT3_RGBA: - /* DO scale the result by 1 2 or 4 */ - for (i = 0; i < n; i++) { - GLfloat dot = ((arg0[i][RCOMP] - 0.5F) * (arg1[i][RCOMP] - 0.5F) + - (arg0[i][GCOMP] - 0.5F) * (arg1[i][GCOMP] - 0.5F) + - (arg0[i][BCOMP] - 0.5F) * (arg1[i][BCOMP] - 0.5F)) - * 4.0F * scaleRGB; - dot = CLAMP(dot, 0.0F, 1.0F); - rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = dot; - } - break; - case GL_MODULATE_ADD_ATI: - for (i = 0; i < n; i++) { - rgba[i][RCOMP] = ((arg0[i][RCOMP] * arg2[i][RCOMP]) + - arg1[i][RCOMP]) * scaleRGB; - rgba[i][GCOMP] = ((arg0[i][GCOMP] * arg2[i][GCOMP]) + - arg1[i][GCOMP]) * scaleRGB; - rgba[i][BCOMP] = ((arg0[i][BCOMP] * arg2[i][BCOMP]) + - arg1[i][BCOMP]) * scaleRGB; - } - break; - case GL_MODULATE_SIGNED_ADD_ATI: - for (i = 0; i < n; i++) { - rgba[i][RCOMP] = ((arg0[i][RCOMP] * arg2[i][RCOMP]) + - arg1[i][RCOMP] - 0.5F) * scaleRGB; - rgba[i][GCOMP] = ((arg0[i][GCOMP] * arg2[i][GCOMP]) + - arg1[i][GCOMP] - 0.5F) * scaleRGB; - rgba[i][BCOMP] = ((arg0[i][BCOMP] * arg2[i][BCOMP]) + - arg1[i][BCOMP] - 0.5F) * scaleRGB; - } - break; - case GL_MODULATE_SUBTRACT_ATI: - for (i = 0; i < n; i++) { - rgba[i][RCOMP] = ((arg0[i][RCOMP] * arg2[i][RCOMP]) - - arg1[i][RCOMP]) * scaleRGB; - rgba[i][GCOMP] = ((arg0[i][GCOMP] * arg2[i][GCOMP]) - - arg1[i][GCOMP]) * scaleRGB; - rgba[i][BCOMP] = ((arg0[i][BCOMP] * arg2[i][BCOMP]) - - arg1[i][BCOMP]) * scaleRGB; - } - break; - case GL_BUMP_ENVMAP_ATI: - /* this produces a fixed rgba color, and the coord calc is done elsewhere */ - for (i = 0; i < n; i++) { - /* rgba result is 0,0,0,1 */ - rgba[i][RCOMP] = 0.0; - rgba[i][GCOMP] = 0.0; - rgba[i][BCOMP] = 0.0; - rgba[i][ACOMP] = 1.0; - } - goto end; /* no alpha processing */ - default: - _mesa_problem(ctx, "invalid combine mode"); - } - } - - /* Alpha channel combine */ - { - float4_array arg0 = argA[0]; - float4_array arg1 = argA[1]; - float4_array arg2 = argA[2]; - float4_array arg3 = argA[3]; - - switch (combine->ModeA) { - case GL_REPLACE: - for (i = 0; i < n; i++) { - rgba[i][ACOMP] = arg0[i][ACOMP] * scaleA; - } - break; - case GL_MODULATE: - for (i = 0; i < n; i++) { - rgba[i][ACOMP] = arg0[i][ACOMP] * arg1[i][ACOMP] * scaleA; - } - break; - case GL_ADD: - if (textureUnit->EnvMode == GL_COMBINE4_NV) { - /* (a * b) + (c * d) */ - for (i = 0; i < n; i++) { - rgba[i][ACOMP] = (arg0[i][ACOMP] * arg1[i][ACOMP] + - arg2[i][ACOMP] * arg3[i][ACOMP]) * scaleA; - } - } - else { - /* two-term add */ - for (i = 0; i < n; i++) { - rgba[i][ACOMP] = (arg0[i][ACOMP] + arg1[i][ACOMP]) * scaleA; - } - } - break; - case GL_ADD_SIGNED: - if (textureUnit->EnvMode == GL_COMBINE4_NV) { - /* (a * b) + (c * d) - 0.5 */ - for (i = 0; i < n; i++) { - rgba[i][ACOMP] = (arg0[i][ACOMP] * arg1[i][ACOMP] + - arg2[i][ACOMP] * arg3[i][ACOMP] - - 0.5F) * scaleA; - } - } - else { - /* a + b - 0.5 */ - for (i = 0; i < n; i++) { - rgba[i][ACOMP] = (arg0[i][ACOMP] + arg1[i][ACOMP] - 0.5F) * scaleA; - } - } - break; - case GL_INTERPOLATE: - for (i = 0; i < n; i++) { - rgba[i][ACOMP] = (arg0[i][ACOMP] * arg2[i][ACOMP] + - arg1[i][ACOMP] * (1.0F - arg2[i][ACOMP])) - * scaleA; - } - break; - case GL_SUBTRACT: - for (i = 0; i < n; i++) { - rgba[i][ACOMP] = (arg0[i][ACOMP] - arg1[i][ACOMP]) * scaleA; - } - break; - case GL_MODULATE_ADD_ATI: - for (i = 0; i < n; i++) { - rgba[i][ACOMP] = ((arg0[i][ACOMP] * arg2[i][ACOMP]) - + arg1[i][ACOMP]) * scaleA; - } - break; - case GL_MODULATE_SIGNED_ADD_ATI: - for (i = 0; i < n; i++) { - rgba[i][ACOMP] = ((arg0[i][ACOMP] * arg2[i][ACOMP]) + - arg1[i][ACOMP] - 0.5F) * scaleA; - } - break; - case GL_MODULATE_SUBTRACT_ATI: - for (i = 0; i < n; i++) { - rgba[i][ACOMP] = ((arg0[i][ACOMP] * arg2[i][ACOMP]) - - arg1[i][ACOMP]) * scaleA; - } - break; - default: - _mesa_problem(ctx, "invalid combine mode"); - } - } - - /* Fix the alpha component for GL_DOT3_RGBA_EXT/ARB combining. - * This is kind of a kludge. It would have been better if the spec - * were written such that the GL_COMBINE_ALPHA value could be set to - * GL_DOT3. - */ - if (combine->ModeRGB == GL_DOT3_RGBA_EXT || - combine->ModeRGB == GL_DOT3_RGBA) { - for (i = 0; i < n; i++) { - rgba[i][ACOMP] = rgba[i][RCOMP]; - } - } - - for (i = 0; i < n; i++) { - UNCLAMPED_FLOAT_TO_CHAN(rgbaChan[i][RCOMP], rgba[i][RCOMP]); - UNCLAMPED_FLOAT_TO_CHAN(rgbaChan[i][GCOMP], rgba[i][GCOMP]); - UNCLAMPED_FLOAT_TO_CHAN(rgbaChan[i][BCOMP], rgba[i][BCOMP]); - UNCLAMPED_FLOAT_TO_CHAN(rgbaChan[i][ACOMP], rgba[i][ACOMP]); - } - -end: - for (i = 0; i < numArgsRGB || i < numArgsA; i++) { - free(ccolor[i]); - } - free(rgba); -} - - -/** - * Apply X/Y/Z/W/0/1 swizzle to an array of colors/texels. - * See GL_EXT_texture_swizzle. - */ -static void -swizzle_texels(GLuint swizzle, GLuint count, float4_array texels) -{ - const GLuint swzR = GET_SWZ(swizzle, 0); - const GLuint swzG = GET_SWZ(swizzle, 1); - const GLuint swzB = GET_SWZ(swizzle, 2); - const GLuint swzA = GET_SWZ(swizzle, 3); - GLfloat vector[6]; - GLuint i; - - vector[SWIZZLE_ZERO] = 0; - vector[SWIZZLE_ONE] = 1.0F; - - for (i = 0; i < count; i++) { - vector[SWIZZLE_X] = texels[i][0]; - vector[SWIZZLE_Y] = texels[i][1]; - vector[SWIZZLE_Z] = texels[i][2]; - vector[SWIZZLE_W] = texels[i][3]; - texels[i][RCOMP] = vector[swzR]; - texels[i][GCOMP] = vector[swzG]; - texels[i][BCOMP] = vector[swzB]; - texels[i][ACOMP] = vector[swzA]; - } -} - - -/** - * Apply texture mapping to a span of fragments. - */ -void -_swrast_texture_span( struct gl_context *ctx, SWspan *span ) -{ - SWcontext *swrast = SWRAST_CONTEXT(ctx); - float4_array primary_rgba; - GLuint unit; - - primary_rgba = (float4_array) malloc(span->end * 4 * sizeof(GLfloat)); - - if (!primary_rgba) { - _mesa_error(ctx, GL_OUT_OF_MEMORY, "texture_span"); - return; - } - - ASSERT(span->end <= MAX_WIDTH); - - /* - * Save copy of the incoming fragment colors (the GL_PRIMARY_COLOR) - */ - if (swrast->_TextureCombinePrimary) { - GLuint i; - for (i = 0; i < span->end; i++) { - primary_rgba[i][RCOMP] = CHAN_TO_FLOAT(span->array->rgba[i][RCOMP]); - primary_rgba[i][GCOMP] = CHAN_TO_FLOAT(span->array->rgba[i][GCOMP]); - primary_rgba[i][BCOMP] = CHAN_TO_FLOAT(span->array->rgba[i][BCOMP]); - primary_rgba[i][ACOMP] = CHAN_TO_FLOAT(span->array->rgba[i][ACOMP]); - } - } - - /* First must sample all bump maps */ - for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) { - const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; - - if (texUnit->_ReallyEnabled && - texUnit->_CurrentCombine->ModeRGB == GL_BUMP_ENVMAP_ATI) { - const GLfloat (*texcoords)[4] = (const GLfloat (*)[4]) - span->array->attribs[FRAG_ATTRIB_TEX0 + unit]; - float4_array targetcoords = - span->array->attribs[FRAG_ATTRIB_TEX0 + - ctx->Texture.Unit[unit].BumpTarget - GL_TEXTURE0]; - - const struct gl_texture_object *curObj = texUnit->_Current; - GLfloat *lambda = span->array->lambda[unit]; - float4_array texels = get_texel_array(swrast, unit); - GLuint i; - GLfloat rotMatrix00 = ctx->Texture.Unit[unit].RotMatrix[0]; - GLfloat rotMatrix01 = ctx->Texture.Unit[unit].RotMatrix[1]; - GLfloat rotMatrix10 = ctx->Texture.Unit[unit].RotMatrix[2]; - GLfloat rotMatrix11 = ctx->Texture.Unit[unit].RotMatrix[3]; - - /* adjust texture lod (lambda) */ - if (span->arrayMask & SPAN_LAMBDA) { - if (texUnit->LodBias + curObj->Sampler.LodBias != 0.0F) { - /* apply LOD bias, but don't clamp yet */ - const GLfloat bias = CLAMP(texUnit->LodBias + curObj->Sampler.LodBias, - -ctx->Const.MaxTextureLodBias, - ctx->Const.MaxTextureLodBias); - GLuint i; - for (i = 0; i < span->end; i++) { - lambda[i] += bias; - } - } - - if (curObj->Sampler.MinLod != -1000.0 || - curObj->Sampler.MaxLod != 1000.0) { - /* apply LOD clamping to lambda */ - const GLfloat min = curObj->Sampler.MinLod; - const GLfloat max = curObj->Sampler.MaxLod; - GLuint i; - for (i = 0; i < span->end; i++) { - GLfloat l = lambda[i]; - lambda[i] = CLAMP(l, min, max); - } - } - } - - /* Sample the texture (span->end = number of fragments) */ - swrast->TextureSample[unit]( ctx, texUnit->_Current, span->end, - texcoords, lambda, texels ); - - /* manipulate the span values of the bump target - not sure this can work correctly even ignoring - the problem that channel is unsigned */ - for (i = 0; i < span->end; i++) { - targetcoords[i][0] += (texels[i][0] * rotMatrix00 + texels[i][1] * - rotMatrix01) / targetcoords[i][3]; - targetcoords[i][1] += (texels[i][0] * rotMatrix10 + texels[i][1] * - rotMatrix11) / targetcoords[i][3]; - } - } - } - - /* - * Must do all texture sampling before combining in order to - * accomodate GL_ARB_texture_env_crossbar. - */ - for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) { - const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; - if (texUnit->_ReallyEnabled && - texUnit->_CurrentCombine->ModeRGB != GL_BUMP_ENVMAP_ATI) { - const GLfloat (*texcoords)[4] = (const GLfloat (*)[4]) - span->array->attribs[FRAG_ATTRIB_TEX0 + unit]; - const struct gl_texture_object *curObj = texUnit->_Current; - GLfloat *lambda = span->array->lambda[unit]; - float4_array texels = get_texel_array(swrast, unit); - - /* adjust texture lod (lambda) */ - if (span->arrayMask & SPAN_LAMBDA) { - if (texUnit->LodBias + curObj->Sampler.LodBias != 0.0F) { - /* apply LOD bias, but don't clamp yet */ - const GLfloat bias = CLAMP(texUnit->LodBias + curObj->Sampler.LodBias, - -ctx->Const.MaxTextureLodBias, - ctx->Const.MaxTextureLodBias); - GLuint i; - for (i = 0; i < span->end; i++) { - lambda[i] += bias; - } - } - - if (curObj->Sampler.MinLod != -1000.0 || - curObj->Sampler.MaxLod != 1000.0) { - /* apply LOD clamping to lambda */ - const GLfloat min = curObj->Sampler.MinLod; - const GLfloat max = curObj->Sampler.MaxLod; - GLuint i; - for (i = 0; i < span->end; i++) { - GLfloat l = lambda[i]; - lambda[i] = CLAMP(l, min, max); - } - } - } - - /* Sample the texture (span->end = number of fragments) */ - swrast->TextureSample[unit]( ctx, texUnit->_Current, span->end, - texcoords, lambda, texels ); - - /* GL_EXT_texture_swizzle */ - if (curObj->_Swizzle != SWIZZLE_NOOP) { - swizzle_texels(curObj->_Swizzle, span->end, texels); - } - } - } - - /* - * OK, now apply the texture (aka texture combine/blend). - * We modify the span->color.rgba values. - */ - for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) { - if (ctx->Texture.Unit[unit]._ReallyEnabled) { - texture_combine( ctx, unit, span->end, - primary_rgba, - swrast->TexelBuffer, - span->array->rgba ); - } - } - - free(primary_rgba); -} +/* + * Mesa 3-D graphics library + * Version: 7.5 + * + * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. + * Copyright (C) 2009 VMware, Inc. All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#include "main/glheader.h" +#include "main/context.h" +#include "main/colormac.h" +#include "main/imports.h" +#include "main/pixeltransfer.h" +#include "program/prog_instruction.h" + +#include "s_context.h" +#include "s_texcombine.h" + + +/** + * Pointer to array of float[4] + * This type makes the code below more concise and avoids a lot of casting. + */ +typedef float (*float4_array)[4]; + + +/** + * Return array of texels for given unit. + */ +static INLINE float4_array +get_texel_array(SWcontext *swrast, GLuint unit) +{ + return (float4_array) (swrast->TexelBuffer + unit * MAX_WIDTH * 4); +} + + + +/** + * Do texture application for: + * GL_EXT_texture_env_combine + * GL_ARB_texture_env_combine + * GL_EXT_texture_env_dot3 + * GL_ARB_texture_env_dot3 + * GL_ATI_texture_env_combine3 + * GL_NV_texture_env_combine4 + * conventional GL texture env modes + * + * \param ctx rendering context + * \param unit the texture combiner unit + * \param n number of fragments to process (span width) + * \param primary_rgba incoming fragment color array + * \param texelBuffer pointer to texel colors for all texture units + * + * \param rgba incoming/result fragment colors + */ +static void +texture_combine( struct gl_context *ctx, GLuint unit, GLuint n, + const float4_array primary_rgba, + const GLfloat *texelBuffer, + GLchan (*rgbaChan)[4] ) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + const struct gl_texture_unit *textureUnit = &(ctx->Texture.Unit[unit]); + const struct gl_tex_env_combine_state *combine = textureUnit->_CurrentCombine; + float4_array argRGB[MAX_COMBINER_TERMS]; + float4_array argA[MAX_COMBINER_TERMS]; + const GLfloat scaleRGB = (GLfloat) (1 << combine->ScaleShiftRGB); + const GLfloat scaleA = (GLfloat) (1 << combine->ScaleShiftA); + const GLuint numArgsRGB = combine->_NumArgsRGB; + const GLuint numArgsA = combine->_NumArgsA; + float4_array ccolor[4], rgba; + GLuint i, term; + + /* alloc temp pixel buffers */ + rgba = (float4_array) malloc(4 * n * sizeof(GLfloat)); + if (!rgba) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "texture_combine"); + return; + } + + for (i = 0; i < numArgsRGB || i < numArgsA; i++) { + ccolor[i] = (float4_array) malloc(4 * n * sizeof(GLfloat)); + if (!ccolor[i]) { + while (i) { + free(ccolor[i]); + i--; + } + _mesa_error(ctx, GL_OUT_OF_MEMORY, "texture_combine"); + return; + } + } + + for (i = 0; i < n; i++) { + rgba[i][RCOMP] = CHAN_TO_FLOAT(rgbaChan[i][RCOMP]); + rgba[i][GCOMP] = CHAN_TO_FLOAT(rgbaChan[i][GCOMP]); + rgba[i][BCOMP] = CHAN_TO_FLOAT(rgbaChan[i][BCOMP]); + rgba[i][ACOMP] = CHAN_TO_FLOAT(rgbaChan[i][ACOMP]); + } + + /* + printf("modeRGB 0x%x modeA 0x%x srcRGB1 0x%x srcA1 0x%x srcRGB2 0x%x srcA2 0x%x\n", + combine->ModeRGB, + combine->ModeA, + combine->SourceRGB[0], + combine->SourceA[0], + combine->SourceRGB[1], + combine->SourceA[1]); + */ + + /* + * Do operand setup for up to 4 operands. Loop over the terms. + */ + for (term = 0; term < numArgsRGB; term++) { + const GLenum srcRGB = combine->SourceRGB[term]; + const GLenum operandRGB = combine->OperandRGB[term]; + + switch (srcRGB) { + case GL_TEXTURE: + argRGB[term] = get_texel_array(swrast, unit); + break; + case GL_PRIMARY_COLOR: + argRGB[term] = primary_rgba; + break; + case GL_PREVIOUS: + argRGB[term] = rgba; + break; + case GL_CONSTANT: + { + float4_array c = ccolor[term]; + GLfloat red = textureUnit->EnvColor[0]; + GLfloat green = textureUnit->EnvColor[1]; + GLfloat blue = textureUnit->EnvColor[2]; + GLfloat alpha = textureUnit->EnvColor[3]; + for (i = 0; i < n; i++) { + ASSIGN_4V(c[i], red, green, blue, alpha); + } + argRGB[term] = ccolor[term]; + } + break; + /* GL_ATI_texture_env_combine3 allows GL_ZERO & GL_ONE as sources. + */ + case GL_ZERO: + { + float4_array c = ccolor[term]; + for (i = 0; i < n; i++) { + ASSIGN_4V(c[i], 0.0F, 0.0F, 0.0F, 0.0F); + } + argRGB[term] = ccolor[term]; + } + break; + case GL_ONE: + { + float4_array c = ccolor[term]; + for (i = 0; i < n; i++) { + ASSIGN_4V(c[i], 1.0F, 1.0F, 1.0F, 1.0F); + } + argRGB[term] = ccolor[term]; + } + break; + default: + /* ARB_texture_env_crossbar source */ + { + const GLuint srcUnit = srcRGB - GL_TEXTURE0; + ASSERT(srcUnit < ctx->Const.MaxTextureUnits); + if (!ctx->Texture.Unit[srcUnit]._ReallyEnabled) + goto end; + argRGB[term] = get_texel_array(swrast, srcUnit); + } + } + + if (operandRGB != GL_SRC_COLOR) { + float4_array src = argRGB[term]; + float4_array dst = ccolor[term]; + + /* point to new arg[term] storage */ + argRGB[term] = ccolor[term]; + + switch (operandRGB) { + case GL_ONE_MINUS_SRC_COLOR: + for (i = 0; i < n; i++) { + dst[i][RCOMP] = 1.0F - src[i][RCOMP]; + dst[i][GCOMP] = 1.0F - src[i][GCOMP]; + dst[i][BCOMP] = 1.0F - src[i][BCOMP]; + } + break; + case GL_SRC_ALPHA: + for (i = 0; i < n; i++) { + dst[i][RCOMP] = + dst[i][GCOMP] = + dst[i][BCOMP] = src[i][ACOMP]; + } + break; + case GL_ONE_MINUS_SRC_ALPHA: + for (i = 0; i < n; i++) { + dst[i][RCOMP] = + dst[i][GCOMP] = + dst[i][BCOMP] = 1.0F - src[i][ACOMP]; + } + break; + default: + _mesa_problem(ctx, "Bad operandRGB"); + } + } + } + + /* + * Set up the argA[term] pointers + */ + for (term = 0; term < numArgsA; term++) { + const GLenum srcA = combine->SourceA[term]; + const GLenum operandA = combine->OperandA[term]; + + switch (srcA) { + case GL_TEXTURE: + argA[term] = get_texel_array(swrast, unit); + break; + case GL_PRIMARY_COLOR: + argA[term] = primary_rgba; + break; + case GL_PREVIOUS: + argA[term] = rgba; + break; + case GL_CONSTANT: + { + float4_array c = ccolor[term]; + GLfloat alpha = textureUnit->EnvColor[3]; + for (i = 0; i < n; i++) + c[i][ACOMP] = alpha; + argA[term] = ccolor[term]; + } + break; + /* GL_ATI_texture_env_combine3 allows GL_ZERO & GL_ONE as sources. + */ + case GL_ZERO: + { + float4_array c = ccolor[term]; + for (i = 0; i < n; i++) + c[i][ACOMP] = 0.0F; + argA[term] = ccolor[term]; + } + break; + case GL_ONE: + { + float4_array c = ccolor[term]; + for (i = 0; i < n; i++) + c[i][ACOMP] = 1.0F; + argA[term] = ccolor[term]; + } + break; + default: + /* ARB_texture_env_crossbar source */ + { + const GLuint srcUnit = srcA - GL_TEXTURE0; + ASSERT(srcUnit < ctx->Const.MaxTextureUnits); + if (!ctx->Texture.Unit[srcUnit]._ReallyEnabled) + goto end; + argA[term] = get_texel_array(swrast, srcUnit); + } + } + + if (operandA == GL_ONE_MINUS_SRC_ALPHA) { + float4_array src = argA[term]; + float4_array dst = ccolor[term]; + argA[term] = ccolor[term]; + for (i = 0; i < n; i++) { + dst[i][ACOMP] = 1.0F - src[i][ACOMP]; + } + } + } + + /* RGB channel combine */ + { + float4_array arg0 = argRGB[0]; + float4_array arg1 = argRGB[1]; + float4_array arg2 = argRGB[2]; + float4_array arg3 = argRGB[3]; + + switch (combine->ModeRGB) { + case GL_REPLACE: + for (i = 0; i < n; i++) { + rgba[i][RCOMP] = arg0[i][RCOMP] * scaleRGB; + rgba[i][GCOMP] = arg0[i][GCOMP] * scaleRGB; + rgba[i][BCOMP] = arg0[i][BCOMP] * scaleRGB; + } + break; + case GL_MODULATE: + for (i = 0; i < n; i++) { + rgba[i][RCOMP] = arg0[i][RCOMP] * arg1[i][RCOMP] * scaleRGB; + rgba[i][GCOMP] = arg0[i][GCOMP] * arg1[i][GCOMP] * scaleRGB; + rgba[i][BCOMP] = arg0[i][BCOMP] * arg1[i][BCOMP] * scaleRGB; + } + break; + case GL_ADD: + if (textureUnit->EnvMode == GL_COMBINE4_NV) { + /* (a * b) + (c * d) */ + for (i = 0; i < n; i++) { + rgba[i][RCOMP] = (arg0[i][RCOMP] * arg1[i][RCOMP] + + arg2[i][RCOMP] * arg3[i][RCOMP]) * scaleRGB; + rgba[i][GCOMP] = (arg0[i][GCOMP] * arg1[i][GCOMP] + + arg2[i][GCOMP] * arg3[i][GCOMP]) * scaleRGB; + rgba[i][BCOMP] = (arg0[i][BCOMP] * arg1[i][BCOMP] + + arg2[i][BCOMP] * arg3[i][BCOMP]) * scaleRGB; + } + } + else { + /* 2-term addition */ + for (i = 0; i < n; i++) { + rgba[i][RCOMP] = (arg0[i][RCOMP] + arg1[i][RCOMP]) * scaleRGB; + rgba[i][GCOMP] = (arg0[i][GCOMP] + arg1[i][GCOMP]) * scaleRGB; + rgba[i][BCOMP] = (arg0[i][BCOMP] + arg1[i][BCOMP]) * scaleRGB; + } + } + break; + case GL_ADD_SIGNED: + if (textureUnit->EnvMode == GL_COMBINE4_NV) { + /* (a * b) + (c * d) - 0.5 */ + for (i = 0; i < n; i++) { + rgba[i][RCOMP] = (arg0[i][RCOMP] * arg1[i][RCOMP] + + arg2[i][RCOMP] * arg3[i][RCOMP] - 0.5F) * scaleRGB; + rgba[i][GCOMP] = (arg0[i][GCOMP] * arg1[i][GCOMP] + + arg2[i][GCOMP] * arg3[i][GCOMP] - 0.5F) * scaleRGB; + rgba[i][BCOMP] = (arg0[i][BCOMP] * arg1[i][BCOMP] + + arg2[i][BCOMP] * arg3[i][BCOMP] - 0.5F) * scaleRGB; + } + } + else { + for (i = 0; i < n; i++) { + rgba[i][RCOMP] = (arg0[i][RCOMP] + arg1[i][RCOMP] - 0.5F) * scaleRGB; + rgba[i][GCOMP] = (arg0[i][GCOMP] + arg1[i][GCOMP] - 0.5F) * scaleRGB; + rgba[i][BCOMP] = (arg0[i][BCOMP] + arg1[i][BCOMP] - 0.5F) * scaleRGB; + } + } + break; + case GL_INTERPOLATE: + for (i = 0; i < n; i++) { + rgba[i][RCOMP] = (arg0[i][RCOMP] * arg2[i][RCOMP] + + arg1[i][RCOMP] * (1.0F - arg2[i][RCOMP])) * scaleRGB; + rgba[i][GCOMP] = (arg0[i][GCOMP] * arg2[i][GCOMP] + + arg1[i][GCOMP] * (1.0F - arg2[i][GCOMP])) * scaleRGB; + rgba[i][BCOMP] = (arg0[i][BCOMP] * arg2[i][BCOMP] + + arg1[i][BCOMP] * (1.0F - arg2[i][BCOMP])) * scaleRGB; + } + break; + case GL_SUBTRACT: + for (i = 0; i < n; i++) { + rgba[i][RCOMP] = (arg0[i][RCOMP] - arg1[i][RCOMP]) * scaleRGB; + rgba[i][GCOMP] = (arg0[i][GCOMP] - arg1[i][GCOMP]) * scaleRGB; + rgba[i][BCOMP] = (arg0[i][BCOMP] - arg1[i][BCOMP]) * scaleRGB; + } + break; + case GL_DOT3_RGB_EXT: + case GL_DOT3_RGBA_EXT: + /* Do not scale the result by 1 2 or 4 */ + for (i = 0; i < n; i++) { + GLfloat dot = ((arg0[i][RCOMP] - 0.5F) * (arg1[i][RCOMP] - 0.5F) + + (arg0[i][GCOMP] - 0.5F) * (arg1[i][GCOMP] - 0.5F) + + (arg0[i][BCOMP] - 0.5F) * (arg1[i][BCOMP] - 0.5F)) + * 4.0F; + dot = CLAMP(dot, 0.0F, 1.0F); + rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = dot; + } + break; + case GL_DOT3_RGB: + case GL_DOT3_RGBA: + /* DO scale the result by 1 2 or 4 */ + for (i = 0; i < n; i++) { + GLfloat dot = ((arg0[i][RCOMP] - 0.5F) * (arg1[i][RCOMP] - 0.5F) + + (arg0[i][GCOMP] - 0.5F) * (arg1[i][GCOMP] - 0.5F) + + (arg0[i][BCOMP] - 0.5F) * (arg1[i][BCOMP] - 0.5F)) + * 4.0F * scaleRGB; + dot = CLAMP(dot, 0.0F, 1.0F); + rgba[i][RCOMP] = rgba[i][GCOMP] = rgba[i][BCOMP] = dot; + } + break; + case GL_MODULATE_ADD_ATI: + for (i = 0; i < n; i++) { + rgba[i][RCOMP] = ((arg0[i][RCOMP] * arg2[i][RCOMP]) + + arg1[i][RCOMP]) * scaleRGB; + rgba[i][GCOMP] = ((arg0[i][GCOMP] * arg2[i][GCOMP]) + + arg1[i][GCOMP]) * scaleRGB; + rgba[i][BCOMP] = ((arg0[i][BCOMP] * arg2[i][BCOMP]) + + arg1[i][BCOMP]) * scaleRGB; + } + break; + case GL_MODULATE_SIGNED_ADD_ATI: + for (i = 0; i < n; i++) { + rgba[i][RCOMP] = ((arg0[i][RCOMP] * arg2[i][RCOMP]) + + arg1[i][RCOMP] - 0.5F) * scaleRGB; + rgba[i][GCOMP] = ((arg0[i][GCOMP] * arg2[i][GCOMP]) + + arg1[i][GCOMP] - 0.5F) * scaleRGB; + rgba[i][BCOMP] = ((arg0[i][BCOMP] * arg2[i][BCOMP]) + + arg1[i][BCOMP] - 0.5F) * scaleRGB; + } + break; + case GL_MODULATE_SUBTRACT_ATI: + for (i = 0; i < n; i++) { + rgba[i][RCOMP] = ((arg0[i][RCOMP] * arg2[i][RCOMP]) - + arg1[i][RCOMP]) * scaleRGB; + rgba[i][GCOMP] = ((arg0[i][GCOMP] * arg2[i][GCOMP]) - + arg1[i][GCOMP]) * scaleRGB; + rgba[i][BCOMP] = ((arg0[i][BCOMP] * arg2[i][BCOMP]) - + arg1[i][BCOMP]) * scaleRGB; + } + break; + case GL_BUMP_ENVMAP_ATI: + /* this produces a fixed rgba color, and the coord calc is done elsewhere */ + for (i = 0; i < n; i++) { + /* rgba result is 0,0,0,1 */ + rgba[i][RCOMP] = 0.0; + rgba[i][GCOMP] = 0.0; + rgba[i][BCOMP] = 0.0; + rgba[i][ACOMP] = 1.0; + } + goto end; /* no alpha processing */ + default: + _mesa_problem(ctx, "invalid combine mode"); + } + } + + /* Alpha channel combine */ + { + float4_array arg0 = argA[0]; + float4_array arg1 = argA[1]; + float4_array arg2 = argA[2]; + float4_array arg3 = argA[3]; + + switch (combine->ModeA) { + case GL_REPLACE: + for (i = 0; i < n; i++) { + rgba[i][ACOMP] = arg0[i][ACOMP] * scaleA; + } + break; + case GL_MODULATE: + for (i = 0; i < n; i++) { + rgba[i][ACOMP] = arg0[i][ACOMP] * arg1[i][ACOMP] * scaleA; + } + break; + case GL_ADD: + if (textureUnit->EnvMode == GL_COMBINE4_NV) { + /* (a * b) + (c * d) */ + for (i = 0; i < n; i++) { + rgba[i][ACOMP] = (arg0[i][ACOMP] * arg1[i][ACOMP] + + arg2[i][ACOMP] * arg3[i][ACOMP]) * scaleA; + } + } + else { + /* two-term add */ + for (i = 0; i < n; i++) { + rgba[i][ACOMP] = (arg0[i][ACOMP] + arg1[i][ACOMP]) * scaleA; + } + } + break; + case GL_ADD_SIGNED: + if (textureUnit->EnvMode == GL_COMBINE4_NV) { + /* (a * b) + (c * d) - 0.5 */ + for (i = 0; i < n; i++) { + rgba[i][ACOMP] = (arg0[i][ACOMP] * arg1[i][ACOMP] + + arg2[i][ACOMP] * arg3[i][ACOMP] - + 0.5F) * scaleA; + } + } + else { + /* a + b - 0.5 */ + for (i = 0; i < n; i++) { + rgba[i][ACOMP] = (arg0[i][ACOMP] + arg1[i][ACOMP] - 0.5F) * scaleA; + } + } + break; + case GL_INTERPOLATE: + for (i = 0; i < n; i++) { + rgba[i][ACOMP] = (arg0[i][ACOMP] * arg2[i][ACOMP] + + arg1[i][ACOMP] * (1.0F - arg2[i][ACOMP])) + * scaleA; + } + break; + case GL_SUBTRACT: + for (i = 0; i < n; i++) { + rgba[i][ACOMP] = (arg0[i][ACOMP] - arg1[i][ACOMP]) * scaleA; + } + break; + case GL_MODULATE_ADD_ATI: + for (i = 0; i < n; i++) { + rgba[i][ACOMP] = ((arg0[i][ACOMP] * arg2[i][ACOMP]) + + arg1[i][ACOMP]) * scaleA; + } + break; + case GL_MODULATE_SIGNED_ADD_ATI: + for (i = 0; i < n; i++) { + rgba[i][ACOMP] = ((arg0[i][ACOMP] * arg2[i][ACOMP]) + + arg1[i][ACOMP] - 0.5F) * scaleA; + } + break; + case GL_MODULATE_SUBTRACT_ATI: + for (i = 0; i < n; i++) { + rgba[i][ACOMP] = ((arg0[i][ACOMP] * arg2[i][ACOMP]) + - arg1[i][ACOMP]) * scaleA; + } + break; + default: + _mesa_problem(ctx, "invalid combine mode"); + } + } + + /* Fix the alpha component for GL_DOT3_RGBA_EXT/ARB combining. + * This is kind of a kludge. It would have been better if the spec + * were written such that the GL_COMBINE_ALPHA value could be set to + * GL_DOT3. + */ + if (combine->ModeRGB == GL_DOT3_RGBA_EXT || + combine->ModeRGB == GL_DOT3_RGBA) { + for (i = 0; i < n; i++) { + rgba[i][ACOMP] = rgba[i][RCOMP]; + } + } + + for (i = 0; i < n; i++) { + UNCLAMPED_FLOAT_TO_CHAN(rgbaChan[i][RCOMP], rgba[i][RCOMP]); + UNCLAMPED_FLOAT_TO_CHAN(rgbaChan[i][GCOMP], rgba[i][GCOMP]); + UNCLAMPED_FLOAT_TO_CHAN(rgbaChan[i][BCOMP], rgba[i][BCOMP]); + UNCLAMPED_FLOAT_TO_CHAN(rgbaChan[i][ACOMP], rgba[i][ACOMP]); + } + +end: + for (i = 0; i < numArgsRGB || i < numArgsA; i++) { + free(ccolor[i]); + } + free(rgba); +} + + +/** + * Apply X/Y/Z/W/0/1 swizzle to an array of colors/texels. + * See GL_EXT_texture_swizzle. + */ +static void +swizzle_texels(GLuint swizzle, GLuint count, float4_array texels) +{ + const GLuint swzR = GET_SWZ(swizzle, 0); + const GLuint swzG = GET_SWZ(swizzle, 1); + const GLuint swzB = GET_SWZ(swizzle, 2); + const GLuint swzA = GET_SWZ(swizzle, 3); + GLfloat vector[6]; + GLuint i; + + vector[SWIZZLE_ZERO] = 0; + vector[SWIZZLE_ONE] = 1.0F; + + for (i = 0; i < count; i++) { + vector[SWIZZLE_X] = texels[i][0]; + vector[SWIZZLE_Y] = texels[i][1]; + vector[SWIZZLE_Z] = texels[i][2]; + vector[SWIZZLE_W] = texels[i][3]; + texels[i][RCOMP] = vector[swzR]; + texels[i][GCOMP] = vector[swzG]; + texels[i][BCOMP] = vector[swzB]; + texels[i][ACOMP] = vector[swzA]; + } +} + + +/** + * Apply texture mapping to a span of fragments. + */ +void +_swrast_texture_span( struct gl_context *ctx, SWspan *span ) +{ + SWcontext *swrast = SWRAST_CONTEXT(ctx); + float4_array primary_rgba; + GLuint unit; + + primary_rgba = (float4_array) malloc(span->end * 4 * sizeof(GLfloat)); + + if (!primary_rgba) { + _mesa_error(ctx, GL_OUT_OF_MEMORY, "texture_span"); + return; + } + + ASSERT(span->end <= MAX_WIDTH); + + /* + * Save copy of the incoming fragment colors (the GL_PRIMARY_COLOR) + */ + if (swrast->_TextureCombinePrimary) { + GLuint i; + for (i = 0; i < span->end; i++) { + primary_rgba[i][RCOMP] = CHAN_TO_FLOAT(span->array->rgba[i][RCOMP]); + primary_rgba[i][GCOMP] = CHAN_TO_FLOAT(span->array->rgba[i][GCOMP]); + primary_rgba[i][BCOMP] = CHAN_TO_FLOAT(span->array->rgba[i][BCOMP]); + primary_rgba[i][ACOMP] = CHAN_TO_FLOAT(span->array->rgba[i][ACOMP]); + } + } + + /* First must sample all bump maps */ + for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) { + const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + + if (texUnit->_ReallyEnabled && + texUnit->_CurrentCombine->ModeRGB == GL_BUMP_ENVMAP_ATI) { + const GLfloat (*texcoords)[4] = (const GLfloat (*)[4]) + span->array->attribs[FRAG_ATTRIB_TEX0 + unit]; + float4_array targetcoords = + span->array->attribs[FRAG_ATTRIB_TEX0 + + ctx->Texture.Unit[unit].BumpTarget - GL_TEXTURE0]; + + const struct gl_texture_object *curObj = texUnit->_Current; + GLfloat *lambda = span->array->lambda[unit]; + float4_array texels = get_texel_array(swrast, unit); + GLuint i; + GLfloat rotMatrix00 = ctx->Texture.Unit[unit].RotMatrix[0]; + GLfloat rotMatrix01 = ctx->Texture.Unit[unit].RotMatrix[1]; + GLfloat rotMatrix10 = ctx->Texture.Unit[unit].RotMatrix[2]; + GLfloat rotMatrix11 = ctx->Texture.Unit[unit].RotMatrix[3]; + + /* adjust texture lod (lambda) */ + if (span->arrayMask & SPAN_LAMBDA) { + if (texUnit->LodBias + curObj->Sampler.LodBias != 0.0F) { + /* apply LOD bias, but don't clamp yet */ + const GLfloat bias = CLAMP(texUnit->LodBias + curObj->Sampler.LodBias, + -ctx->Const.MaxTextureLodBias, + ctx->Const.MaxTextureLodBias); + GLuint i; + for (i = 0; i < span->end; i++) { + lambda[i] += bias; + } + } + + if (curObj->Sampler.MinLod != -1000.0 || + curObj->Sampler.MaxLod != 1000.0) { + /* apply LOD clamping to lambda */ + const GLfloat min = curObj->Sampler.MinLod; + const GLfloat max = curObj->Sampler.MaxLod; + GLuint i; + for (i = 0; i < span->end; i++) { + GLfloat l = lambda[i]; + lambda[i] = CLAMP(l, min, max); + } + } + } + + /* Sample the texture (span->end = number of fragments) */ + swrast->TextureSample[unit]( ctx, texUnit->_Current, span->end, + texcoords, lambda, texels ); + + /* manipulate the span values of the bump target + not sure this can work correctly even ignoring + the problem that channel is unsigned */ + for (i = 0; i < span->end; i++) { + targetcoords[i][0] += (texels[i][0] * rotMatrix00 + texels[i][1] * + rotMatrix01) / targetcoords[i][3]; + targetcoords[i][1] += (texels[i][0] * rotMatrix10 + texels[i][1] * + rotMatrix11) / targetcoords[i][3]; + } + } + } + + /* + * Must do all texture sampling before combining in order to + * accomodate GL_ARB_texture_env_crossbar. + */ + for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) { + const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit]; + if (texUnit->_ReallyEnabled && + texUnit->_CurrentCombine->ModeRGB != GL_BUMP_ENVMAP_ATI) { + const GLfloat (*texcoords)[4] = (const GLfloat (*)[4]) + span->array->attribs[FRAG_ATTRIB_TEX0 + unit]; + const struct gl_texture_object *curObj = texUnit->_Current; + GLfloat *lambda = span->array->lambda[unit]; + float4_array texels = get_texel_array(swrast, unit); + + /* adjust texture lod (lambda) */ + if (span->arrayMask & SPAN_LAMBDA) { + if (texUnit->LodBias + curObj->Sampler.LodBias != 0.0F) { + /* apply LOD bias, but don't clamp yet */ + const GLfloat bias = CLAMP(texUnit->LodBias + curObj->Sampler.LodBias, + -ctx->Const.MaxTextureLodBias, + ctx->Const.MaxTextureLodBias); + GLuint i; + for (i = 0; i < span->end; i++) { + lambda[i] += bias; + } + } + + if (curObj->Sampler.MinLod != -1000.0 || + curObj->Sampler.MaxLod != 1000.0) { + /* apply LOD clamping to lambda */ + const GLfloat min = curObj->Sampler.MinLod; + const GLfloat max = curObj->Sampler.MaxLod; + GLuint i; + for (i = 0; i < span->end; i++) { + GLfloat l = lambda[i]; + lambda[i] = CLAMP(l, min, max); + } + } + } + else if (curObj->Sampler.MaxAnisotropy > 1.0 && + curObj->Sampler.MinFilter == GL_LINEAR_MIPMAP_LINEAR) { + /* sample_lambda_2d_aniso is beeing used as texture_sample_func, + * it requires the current SWspan *span as an additional parameter. + * In order to keep the same function signature, the unused lambda + * parameter will be modified to actually contain the SWspan pointer. + * This is a Hack. To make it right, the texture_sample_func + * signature and all implementing functions need to be modified. + */ + /* "hide" SWspan struct; cast to (GLfloat *) to suppress warning */ + lambda = (GLfloat *)span; + } + + /* Sample the texture (span->end = number of fragments) */ + swrast->TextureSample[unit]( ctx, texUnit->_Current, span->end, + texcoords, lambda, texels ); + + /* GL_EXT_texture_swizzle */ + if (curObj->_Swizzle != SWIZZLE_NOOP) { + swizzle_texels(curObj->_Swizzle, span->end, texels); + } + } + } + + /* + * OK, now apply the texture (aka texture combine/blend). + * We modify the span->color.rgba values. + */ + for (unit = 0; unit < ctx->Const.MaxTextureUnits; unit++) { + if (ctx->Texture.Unit[unit]._ReallyEnabled) { + texture_combine( ctx, unit, span->end, + primary_rgba, + swrast->TexelBuffer, + span->array->rgba ); + } + } + + free(primary_rgba); +} diff --git a/mesalib/src/mesa/swrast/s_texfilter.c b/mesalib/src/mesa/swrast/s_texfilter.c index 106f8b75f..237e5d28a 100644 --- a/mesalib/src/mesa/swrast/s_texfilter.c +++ b/mesalib/src/mesa/swrast/s_texfilter.c @@ -1,3315 +1,3710 @@ -/* - * Mesa 3-D graphics library - * Version: 7.3 - * - * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. - * - * Permission is hereby granted, free of charge, to any person obtaining a - * copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included - * in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL - * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN - * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - - -#include "main/glheader.h" -#include "main/context.h" -#include "main/colormac.h" -#include "main/imports.h" - -#include "s_context.h" -#include "s_texfilter.h" - - -/* - * Note, the FRAC macro has to work perfectly. Otherwise you'll sometimes - * see 1-pixel bands of improperly weighted linear-filtered textures. - * The tests/texwrap.c demo is a good test. - * Also note, FRAC(x) doesn't truly return the fractional part of x for x < 0. - * Instead, if x < 0 then FRAC(x) = 1 - true_frac(x). - */ -#define FRAC(f) ((f) - IFLOOR(f)) - - - -/** - * Linear interpolation macro - */ -#define LERP(T, A, B) ( (A) + (T) * ((B) - (A)) ) - - -/** - * Do 2D/biliner interpolation of float values. - * v00, v10, v01 and v11 are typically four texture samples in a square/box. - * a and b are the horizontal and vertical interpolants. - * It's important that this function is inlined when compiled with - * optimization! If we find that's not true on some systems, convert - * to a macro. - */ -static INLINE GLfloat -lerp_2d(GLfloat a, GLfloat b, - GLfloat v00, GLfloat v10, GLfloat v01, GLfloat v11) -{ - const GLfloat temp0 = LERP(a, v00, v10); - const GLfloat temp1 = LERP(a, v01, v11); - return LERP(b, temp0, temp1); -} - - -/** - * Do 3D/trilinear interpolation of float values. - * \sa lerp_2d - */ -static INLINE GLfloat -lerp_3d(GLfloat a, GLfloat b, GLfloat c, - GLfloat v000, GLfloat v100, GLfloat v010, GLfloat v110, - GLfloat v001, GLfloat v101, GLfloat v011, GLfloat v111) -{ - const GLfloat temp00 = LERP(a, v000, v100); - const GLfloat temp10 = LERP(a, v010, v110); - const GLfloat temp01 = LERP(a, v001, v101); - const GLfloat temp11 = LERP(a, v011, v111); - const GLfloat temp0 = LERP(b, temp00, temp10); - const GLfloat temp1 = LERP(b, temp01, temp11); - return LERP(c, temp0, temp1); -} - - -/** - * Do linear interpolation of colors. - */ -static INLINE void -lerp_rgba(GLfloat result[4], GLfloat t, const GLfloat a[4], const GLfloat b[4]) -{ - result[0] = LERP(t, a[0], b[0]); - result[1] = LERP(t, a[1], b[1]); - result[2] = LERP(t, a[2], b[2]); - result[3] = LERP(t, a[3], b[3]); -} - - -/** - * Do bilinear interpolation of colors. - */ -static INLINE void -lerp_rgba_2d(GLfloat result[4], GLfloat a, GLfloat b, - const GLfloat t00[4], const GLfloat t10[4], - const GLfloat t01[4], const GLfloat t11[4]) -{ - result[0] = lerp_2d(a, b, t00[0], t10[0], t01[0], t11[0]); - result[1] = lerp_2d(a, b, t00[1], t10[1], t01[1], t11[1]); - result[2] = lerp_2d(a, b, t00[2], t10[2], t01[2], t11[2]); - result[3] = lerp_2d(a, b, t00[3], t10[3], t01[3], t11[3]); -} - - -/** - * Do trilinear interpolation of colors. - */ -static INLINE void -lerp_rgba_3d(GLfloat result[4], GLfloat a, GLfloat b, GLfloat c, - const GLfloat t000[4], const GLfloat t100[4], - const GLfloat t010[4], const GLfloat t110[4], - const GLfloat t001[4], const GLfloat t101[4], - const GLfloat t011[4], const GLfloat t111[4]) -{ - GLuint k; - /* compiler should unroll these short loops */ - for (k = 0; k < 4; k++) { - result[k] = lerp_3d(a, b, c, t000[k], t100[k], t010[k], t110[k], - t001[k], t101[k], t011[k], t111[k]); - } -} - - -/** - * Used for GL_REPEAT wrap mode. Using A % B doesn't produce the - * right results for A<0. Casting to A to be unsigned only works if B - * is a power of two. Adding a bias to A (which is a multiple of B) - * avoids the problems with A < 0 (for reasonable A) without using a - * conditional. - */ -#define REMAINDER(A, B) (((A) + (B) * 1024) % (B)) - - -/** - * Used to compute texel locations for linear sampling. - * Input: - * wrapMode = GL_REPEAT, GL_CLAMP, GL_CLAMP_TO_EDGE, GL_CLAMP_TO_BORDER - * s = texcoord in [0,1] - * size = width (or height or depth) of texture - * Output: - * i0, i1 = returns two nearest texel indexes - * weight = returns blend factor between texels - */ -static INLINE void -linear_texel_locations(GLenum wrapMode, - const struct gl_texture_image *img, - GLint size, GLfloat s, - GLint *i0, GLint *i1, GLfloat *weight) -{ - GLfloat u; - switch (wrapMode) { - case GL_REPEAT: - u = s * size - 0.5F; - if (img->_IsPowerOfTwo) { - *i0 = IFLOOR(u) & (size - 1); - *i1 = (*i0 + 1) & (size - 1); - } - else { - *i0 = REMAINDER(IFLOOR(u), size); - *i1 = REMAINDER(*i0 + 1, size); - } - break; - case GL_CLAMP_TO_EDGE: - if (s <= 0.0F) - u = 0.0F; - else if (s >= 1.0F) - u = (GLfloat) size; - else - u = s * size; - u -= 0.5F; - *i0 = IFLOOR(u); - *i1 = *i0 + 1; - if (*i0 < 0) - *i0 = 0; - if (*i1 >= (GLint) size) - *i1 = size - 1; - break; - case GL_CLAMP_TO_BORDER: - { - const GLfloat min = -1.0F / (2.0F * size); - const GLfloat max = 1.0F - min; - if (s <= min) - u = min * size; - else if (s >= max) - u = max * size; - else - u = s * size; - u -= 0.5F; - *i0 = IFLOOR(u); - *i1 = *i0 + 1; - } - break; - case GL_MIRRORED_REPEAT: - { - const GLint flr = IFLOOR(s); - if (flr & 1) - u = 1.0F - (s - (GLfloat) flr); - else - u = s - (GLfloat) flr; - u = (u * size) - 0.5F; - *i0 = IFLOOR(u); - *i1 = *i0 + 1; - if (*i0 < 0) - *i0 = 0; - if (*i1 >= (GLint) size) - *i1 = size - 1; - } - break; - case GL_MIRROR_CLAMP_EXT: - u = FABSF(s); - if (u >= 1.0F) - u = (GLfloat) size; - else - u *= size; - u -= 0.5F; - *i0 = IFLOOR(u); - *i1 = *i0 + 1; - break; - case GL_MIRROR_CLAMP_TO_EDGE_EXT: - u = FABSF(s); - if (u >= 1.0F) - u = (GLfloat) size; - else - u *= size; - u -= 0.5F; - *i0 = IFLOOR(u); - *i1 = *i0 + 1; - if (*i0 < 0) - *i0 = 0; - if (*i1 >= (GLint) size) - *i1 = size - 1; - break; - case GL_MIRROR_CLAMP_TO_BORDER_EXT: - { - const GLfloat min = -1.0F / (2.0F * size); - const GLfloat max = 1.0F - min; - u = FABSF(s); - if (u <= min) - u = min * size; - else if (u >= max) - u = max * size; - else - u *= size; - u -= 0.5F; - *i0 = IFLOOR(u); - *i1 = *i0 + 1; - } - break; - case GL_CLAMP: - if (s <= 0.0F) - u = 0.0F; - else if (s >= 1.0F) - u = (GLfloat) size; - else - u = s * size; - u -= 0.5F; - *i0 = IFLOOR(u); - *i1 = *i0 + 1; - break; - default: - _mesa_problem(NULL, "Bad wrap mode"); - u = 0.0F; - } - *weight = FRAC(u); -} - - -/** - * Used to compute texel location for nearest sampling. - */ -static INLINE GLint -nearest_texel_location(GLenum wrapMode, - const struct gl_texture_image *img, - GLint size, GLfloat s) -{ - GLint i; - - switch (wrapMode) { - case GL_REPEAT: - /* s limited to [0,1) */ - /* i limited to [0,size-1] */ - i = IFLOOR(s * size); - if (img->_IsPowerOfTwo) - i &= (size - 1); - else - i = REMAINDER(i, size); - return i; - case GL_CLAMP_TO_EDGE: - { - /* s limited to [min,max] */ - /* i limited to [0, size-1] */ - const GLfloat min = 1.0F / (2.0F * size); - const GLfloat max = 1.0F - min; - if (s < min) - i = 0; - else if (s > max) - i = size - 1; - else - i = IFLOOR(s * size); - } - return i; - case GL_CLAMP_TO_BORDER: - { - /* s limited to [min,max] */ - /* i limited to [-1, size] */ - const GLfloat min = -1.0F / (2.0F * size); - const GLfloat max = 1.0F - min; - if (s <= min) - i = -1; - else if (s >= max) - i = size; - else - i = IFLOOR(s * size); - } - return i; - case GL_MIRRORED_REPEAT: - { - const GLfloat min = 1.0F / (2.0F * size); - const GLfloat max = 1.0F - min; - const GLint flr = IFLOOR(s); - GLfloat u; - if (flr & 1) - u = 1.0F - (s - (GLfloat) flr); - else - u = s - (GLfloat) flr; - if (u < min) - i = 0; - else if (u > max) - i = size - 1; - else - i = IFLOOR(u * size); - } - return i; - case GL_MIRROR_CLAMP_EXT: - { - /* s limited to [0,1] */ - /* i limited to [0,size-1] */ - const GLfloat u = FABSF(s); - if (u <= 0.0F) - i = 0; - else if (u >= 1.0F) - i = size - 1; - else - i = IFLOOR(u * size); - } - return i; - case GL_MIRROR_CLAMP_TO_EDGE_EXT: - { - /* s limited to [min,max] */ - /* i limited to [0, size-1] */ - const GLfloat min = 1.0F / (2.0F * size); - const GLfloat max = 1.0F - min; - const GLfloat u = FABSF(s); - if (u < min) - i = 0; - else if (u > max) - i = size - 1; - else - i = IFLOOR(u * size); - } - return i; - case GL_MIRROR_CLAMP_TO_BORDER_EXT: - { - /* s limited to [min,max] */ - /* i limited to [0, size-1] */ - const GLfloat min = -1.0F / (2.0F * size); - const GLfloat max = 1.0F - min; - const GLfloat u = FABSF(s); - if (u < min) - i = -1; - else if (u > max) - i = size; - else - i = IFLOOR(u * size); - } - return i; - case GL_CLAMP: - /* s limited to [0,1] */ - /* i limited to [0,size-1] */ - if (s <= 0.0F) - i = 0; - else if (s >= 1.0F) - i = size - 1; - else - i = IFLOOR(s * size); - return i; - default: - _mesa_problem(NULL, "Bad wrap mode"); - return 0; - } -} - - -/* Power of two image sizes only */ -static INLINE void -linear_repeat_texel_location(GLuint size, GLfloat s, - GLint *i0, GLint *i1, GLfloat *weight) -{ - GLfloat u = s * size - 0.5F; - *i0 = IFLOOR(u) & (size - 1); - *i1 = (*i0 + 1) & (size - 1); - *weight = FRAC(u); -} - - -/** - * Do clamp/wrap for a texture rectangle coord, GL_NEAREST filter mode. - */ -static INLINE GLint -clamp_rect_coord_nearest(GLenum wrapMode, GLfloat coord, GLint max) -{ - switch (wrapMode) { - case GL_CLAMP: - return IFLOOR( CLAMP(coord, 0.0F, max - 1) ); - case GL_CLAMP_TO_EDGE: - return IFLOOR( CLAMP(coord, 0.5F, max - 0.5F) ); - case GL_CLAMP_TO_BORDER: - return IFLOOR( CLAMP(coord, -0.5F, max + 0.5F) ); - default: - _mesa_problem(NULL, "bad wrapMode in clamp_rect_coord_nearest"); - return 0; - } -} - - -/** - * As above, but GL_LINEAR filtering. - */ -static INLINE void -clamp_rect_coord_linear(GLenum wrapMode, GLfloat coord, GLint max, - GLint *i0out, GLint *i1out, GLfloat *weight) -{ - GLfloat fcol; - GLint i0, i1; - switch (wrapMode) { - case GL_CLAMP: - /* Not exactly what the spec says, but it matches NVIDIA output */ - fcol = CLAMP(coord - 0.5F, 0.0F, max - 1); - i0 = IFLOOR(fcol); - i1 = i0 + 1; - break; - case GL_CLAMP_TO_EDGE: - fcol = CLAMP(coord, 0.5F, max - 0.5F); - fcol -= 0.5F; - i0 = IFLOOR(fcol); - i1 = i0 + 1; - if (i1 > max - 1) - i1 = max - 1; - break; - case GL_CLAMP_TO_BORDER: - fcol = CLAMP(coord, -0.5F, max + 0.5F); - fcol -= 0.5F; - i0 = IFLOOR(fcol); - i1 = i0 + 1; - break; - default: - _mesa_problem(NULL, "bad wrapMode in clamp_rect_coord_linear"); - i0 = i1 = 0; - fcol = 0.0F; - } - *i0out = i0; - *i1out = i1; - *weight = FRAC(fcol); -} - - -/** - * Compute slice/image to use for 1D or 2D array texture. - */ -static INLINE GLint -tex_array_slice(GLfloat coord, GLsizei size) -{ - GLint slice = IFLOOR(coord + 0.5f); - slice = CLAMP(slice, 0, size - 1); - return slice; -} - - -/** - * Compute nearest integer texcoords for given texobj and coordinate. - * NOTE: only used for depth texture sampling. - */ -static INLINE void -nearest_texcoord(const struct gl_texture_object *texObj, - GLuint level, - const GLfloat texcoord[4], - GLint *i, GLint *j, GLint *k) -{ - const struct gl_texture_image *img = texObj->Image[0][level]; - const GLint width = img->Width; - const GLint height = img->Height; - const GLint depth = img->Depth; - - switch (texObj->Target) { - case GL_TEXTURE_RECTANGLE_ARB: - *i = clamp_rect_coord_nearest(texObj->Sampler.WrapS, texcoord[0], width); - *j = clamp_rect_coord_nearest(texObj->Sampler.WrapT, texcoord[1], height); - *k = 0; - break; - case GL_TEXTURE_1D: - *i = nearest_texel_location(texObj->Sampler.WrapS, img, width, texcoord[0]); - *j = 0; - *k = 0; - break; - case GL_TEXTURE_2D: - *i = nearest_texel_location(texObj->Sampler.WrapS, img, width, texcoord[0]); - *j = nearest_texel_location(texObj->Sampler.WrapT, img, height, texcoord[1]); - *k = 0; - break; - case GL_TEXTURE_1D_ARRAY_EXT: - *i = nearest_texel_location(texObj->Sampler.WrapS, img, width, texcoord[0]); - *j = tex_array_slice(texcoord[1], height); - *k = 0; - break; - case GL_TEXTURE_2D_ARRAY_EXT: - *i = nearest_texel_location(texObj->Sampler.WrapS, img, width, texcoord[0]); - *j = nearest_texel_location(texObj->Sampler.WrapT, img, height, texcoord[1]); - *k = tex_array_slice(texcoord[2], depth); - break; - default: - *i = *j = *k = 0; - } -} - - -/** - * Compute linear integer texcoords for given texobj and coordinate. - * NOTE: only used for depth texture sampling. - */ -static INLINE void -linear_texcoord(const struct gl_texture_object *texObj, - GLuint level, - const GLfloat texcoord[4], - GLint *i0, GLint *i1, GLint *j0, GLint *j1, GLint *slice, - GLfloat *wi, GLfloat *wj) -{ - const struct gl_texture_image *img = texObj->Image[0][level]; - const GLint width = img->Width; - const GLint height = img->Height; - const GLint depth = img->Depth; - - switch (texObj->Target) { - case GL_TEXTURE_RECTANGLE_ARB: - clamp_rect_coord_linear(texObj->Sampler.WrapS, texcoord[0], - width, i0, i1, wi); - clamp_rect_coord_linear(texObj->Sampler.WrapT, texcoord[1], - height, j0, j1, wj); - *slice = 0; - break; - - case GL_TEXTURE_1D: - case GL_TEXTURE_2D: - linear_texel_locations(texObj->Sampler.WrapS, img, width, - texcoord[0], i0, i1, wi); - linear_texel_locations(texObj->Sampler.WrapT, img, height, - texcoord[1], j0, j1, wj); - *slice = 0; - break; - - case GL_TEXTURE_1D_ARRAY_EXT: - linear_texel_locations(texObj->Sampler.WrapS, img, width, - texcoord[0], i0, i1, wi); - *j0 = tex_array_slice(texcoord[1], height); - *j1 = *j0; - *slice = 0; - break; - - case GL_TEXTURE_2D_ARRAY_EXT: - linear_texel_locations(texObj->Sampler.WrapS, img, width, - texcoord[0], i0, i1, wi); - linear_texel_locations(texObj->Sampler.WrapT, img, height, - texcoord[1], j0, j1, wj); - *slice = tex_array_slice(texcoord[2], depth); - break; - - default: - *slice = 0; - } -} - - - -/** - * For linear interpolation between mipmap levels N and N+1, this function - * computes N. - */ -static INLINE GLint -linear_mipmap_level(const struct gl_texture_object *tObj, GLfloat lambda) -{ - if (lambda < 0.0F) - return tObj->BaseLevel; - else if (lambda > tObj->_MaxLambda) - return (GLint) (tObj->BaseLevel + tObj->_MaxLambda); - else - return (GLint) (tObj->BaseLevel + lambda); -} - - -/** - * Compute the nearest mipmap level to take texels from. - */ -static INLINE GLint -nearest_mipmap_level(const struct gl_texture_object *tObj, GLfloat lambda) -{ - GLfloat l; - GLint level; - if (lambda <= 0.5F) - l = 0.0F; - else if (lambda > tObj->_MaxLambda + 0.4999F) - l = tObj->_MaxLambda + 0.4999F; - else - l = lambda; - level = (GLint) (tObj->BaseLevel + l + 0.5F); - if (level > tObj->_MaxLevel) - level = tObj->_MaxLevel; - return level; -} - - - -/* - * Bitflags for texture border color sampling. - */ -#define I0BIT 1 -#define I1BIT 2 -#define J0BIT 4 -#define J1BIT 8 -#define K0BIT 16 -#define K1BIT 32 - - - -/** - * The lambda[] array values are always monotonic. Either the whole span - * will be minified, magnified, or split between the two. This function - * determines the subranges in [0, n-1] that are to be minified or magnified. - */ -static INLINE void -compute_min_mag_ranges(const struct gl_texture_object *tObj, - GLuint n, const GLfloat lambda[], - GLuint *minStart, GLuint *minEnd, - GLuint *magStart, GLuint *magEnd) -{ - GLfloat minMagThresh; - - /* we shouldn't be here if minfilter == magfilter */ - ASSERT(tObj->Sampler.MinFilter != tObj->Sampler.MagFilter); - - /* This bit comes from the OpenGL spec: */ - if (tObj->Sampler.MagFilter == GL_LINEAR - && (tObj->Sampler.MinFilter == GL_NEAREST_MIPMAP_NEAREST || - tObj->Sampler.MinFilter == GL_NEAREST_MIPMAP_LINEAR)) { - minMagThresh = 0.5F; - } - else { - minMagThresh = 0.0F; - } - -#if 0 - /* DEBUG CODE: Verify that lambda[] is monotonic. - * We can't really use this because the inaccuracy in the LOG2 function - * causes this test to fail, yet the resulting texturing is correct. - */ - if (n > 1) { - GLuint i; - printf("lambda delta = %g\n", lambda[0] - lambda[n-1]); - if (lambda[0] >= lambda[n-1]) { /* decreasing */ - for (i = 0; i < n - 1; i++) { - ASSERT((GLint) (lambda[i] * 10) >= (GLint) (lambda[i+1] * 10)); - } - } - else { /* increasing */ - for (i = 0; i < n - 1; i++) { - ASSERT((GLint) (lambda[i] * 10) <= (GLint) (lambda[i+1] * 10)); - } - } - } -#endif /* DEBUG */ - - if (lambda[0] <= minMagThresh && (n <= 1 || lambda[n-1] <= minMagThresh)) { - /* magnification for whole span */ - *magStart = 0; - *magEnd = n; - *minStart = *minEnd = 0; - } - else if (lambda[0] > minMagThresh && (n <=1 || lambda[n-1] > minMagThresh)) { - /* minification for whole span */ - *minStart = 0; - *minEnd = n; - *magStart = *magEnd = 0; - } - else { - /* a mix of minification and magnification */ - GLuint i; - if (lambda[0] > minMagThresh) { - /* start with minification */ - for (i = 1; i < n; i++) { - if (lambda[i] <= minMagThresh) - break; - } - *minStart = 0; - *minEnd = i; - *magStart = i; - *magEnd = n; - } - else { - /* start with magnification */ - for (i = 1; i < n; i++) { - if (lambda[i] > minMagThresh) - break; - } - *magStart = 0; - *magEnd = i; - *minStart = i; - *minEnd = n; - } - } - -#if 0 - /* Verify the min/mag Start/End values - * We don't use this either (see above) - */ - { - GLint i; - for (i = 0; i < n; i++) { - if (lambda[i] > minMagThresh) { - /* minification */ - ASSERT(i >= *minStart); - ASSERT(i < *minEnd); - } - else { - /* magnification */ - ASSERT(i >= *magStart); - ASSERT(i < *magEnd); - } - } - } -#endif -} - - -/** - * When we sample the border color, it must be interpreted according to - * the base texture format. Ex: if the texture base format it GL_ALPHA, - * we return (0,0,0,BorderAlpha). - */ -static INLINE void -get_border_color(const struct gl_texture_object *tObj, - const struct gl_texture_image *img, - GLfloat rgba[4]) -{ - switch (img->_BaseFormat) { - case GL_RGB: - rgba[0] = tObj->Sampler.BorderColor.f[0]; - rgba[1] = tObj->Sampler.BorderColor.f[1]; - rgba[2] = tObj->Sampler.BorderColor.f[2]; - rgba[3] = 1.0F; - break; - case GL_ALPHA: - rgba[0] = rgba[1] = rgba[2] = 0.0; - rgba[3] = tObj->Sampler.BorderColor.f[3]; - break; - case GL_LUMINANCE: - rgba[0] = rgba[1] = rgba[2] = tObj->Sampler.BorderColor.f[0]; - rgba[3] = 1.0; - break; - case GL_LUMINANCE_ALPHA: - rgba[0] = rgba[1] = rgba[2] = tObj->Sampler.BorderColor.f[0]; - rgba[3] = tObj->Sampler.BorderColor.f[3]; - break; - case GL_INTENSITY: - rgba[0] = rgba[1] = rgba[2] = rgba[3] = tObj->Sampler.BorderColor.f[0]; - break; - default: - COPY_4V(rgba, tObj->Sampler.BorderColor.f); - } -} - - -/**********************************************************************/ -/* 1-D Texture Sampling Functions */ -/**********************************************************************/ - -/** - * Return the texture sample for coordinate (s) using GL_NEAREST filter. - */ -static INLINE void -sample_1d_nearest(struct gl_context *ctx, - const struct gl_texture_object *tObj, - const struct gl_texture_image *img, - const GLfloat texcoord[4], GLfloat rgba[4]) -{ - const GLint width = img->Width2; /* without border, power of two */ - GLint i; - i = nearest_texel_location(tObj->Sampler.WrapS, img, width, texcoord[0]); - /* skip over the border, if any */ - i += img->Border; - if (i < 0 || i >= (GLint) img->Width) { - /* Need this test for GL_CLAMP_TO_BORDER mode */ - get_border_color(tObj, img, rgba); - } - else { - img->FetchTexelf(img, i, 0, 0, rgba); - } -} - - -/** - * Return the texture sample for coordinate (s) using GL_LINEAR filter. - */ -static INLINE void -sample_1d_linear(struct gl_context *ctx, - const struct gl_texture_object *tObj, - const struct gl_texture_image *img, - const GLfloat texcoord[4], GLfloat rgba[4]) -{ - const GLint width = img->Width2; - GLint i0, i1; - GLbitfield useBorderColor = 0x0; - GLfloat a; - GLfloat t0[4], t1[4]; /* texels */ - - linear_texel_locations(tObj->Sampler.WrapS, img, width, texcoord[0], &i0, &i1, &a); - - if (img->Border) { - i0 += img->Border; - i1 += img->Border; - } - else { - if (i0 < 0 || i0 >= width) useBorderColor |= I0BIT; - if (i1 < 0 || i1 >= width) useBorderColor |= I1BIT; - } - - /* fetch texel colors */ - if (useBorderColor & I0BIT) { - get_border_color(tObj, img, t0); - } - else { - img->FetchTexelf(img, i0, 0, 0, t0); - } - if (useBorderColor & I1BIT) { - get_border_color(tObj, img, t1); - } - else { - img->FetchTexelf(img, i1, 0, 0, t1); - } - - lerp_rgba(rgba, a, t0, t1); -} - - -static void -sample_1d_nearest_mipmap_nearest(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - ASSERT(lambda != NULL); - for (i = 0; i < n; i++) { - GLint level = nearest_mipmap_level(tObj, lambda[i]); - sample_1d_nearest(ctx, tObj, tObj->Image[0][level], texcoord[i], rgba[i]); - } -} - - -static void -sample_1d_linear_mipmap_nearest(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - ASSERT(lambda != NULL); - for (i = 0; i < n; i++) { - GLint level = nearest_mipmap_level(tObj, lambda[i]); - sample_1d_linear(ctx, tObj, tObj->Image[0][level], texcoord[i], rgba[i]); - } -} - - -static void -sample_1d_nearest_mipmap_linear(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - ASSERT(lambda != NULL); - for (i = 0; i < n; i++) { - GLint level = linear_mipmap_level(tObj, lambda[i]); - if (level >= tObj->_MaxLevel) { - sample_1d_nearest(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], - texcoord[i], rgba[i]); - } - else { - GLfloat t0[4], t1[4]; - const GLfloat f = FRAC(lambda[i]); - sample_1d_nearest(ctx, tObj, tObj->Image[0][level ], texcoord[i], t0); - sample_1d_nearest(ctx, tObj, tObj->Image[0][level+1], texcoord[i], t1); - lerp_rgba(rgba[i], f, t0, t1); - } - } -} - - -static void -sample_1d_linear_mipmap_linear(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - ASSERT(lambda != NULL); - for (i = 0; i < n; i++) { - GLint level = linear_mipmap_level(tObj, lambda[i]); - if (level >= tObj->_MaxLevel) { - sample_1d_linear(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], - texcoord[i], rgba[i]); - } - else { - GLfloat t0[4], t1[4]; - const GLfloat f = FRAC(lambda[i]); - sample_1d_linear(ctx, tObj, tObj->Image[0][level ], texcoord[i], t0); - sample_1d_linear(ctx, tObj, tObj->Image[0][level+1], texcoord[i], t1); - lerp_rgba(rgba[i], f, t0, t1); - } - } -} - - -/** Sample 1D texture, nearest filtering for both min/magnification */ -static void -sample_nearest_1d( struct gl_context *ctx, - const struct gl_texture_object *tObj, GLuint n, - const GLfloat texcoords[][4], const GLfloat lambda[], - GLfloat rgba[][4] ) -{ - GLuint i; - struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel]; - (void) lambda; - for (i = 0; i < n; i++) { - sample_1d_nearest(ctx, tObj, image, texcoords[i], rgba[i]); - } -} - - -/** Sample 1D texture, linear filtering for both min/magnification */ -static void -sample_linear_1d( struct gl_context *ctx, - const struct gl_texture_object *tObj, GLuint n, - const GLfloat texcoords[][4], const GLfloat lambda[], - GLfloat rgba[][4] ) -{ - GLuint i; - struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel]; - (void) lambda; - for (i = 0; i < n; i++) { - sample_1d_linear(ctx, tObj, image, texcoords[i], rgba[i]); - } -} - - -/** Sample 1D texture, using lambda to choose between min/magnification */ -static void -sample_lambda_1d( struct gl_context *ctx, - const struct gl_texture_object *tObj, GLuint n, - const GLfloat texcoords[][4], - const GLfloat lambda[], GLfloat rgba[][4] ) -{ - GLuint minStart, minEnd; /* texels with minification */ - GLuint magStart, magEnd; /* texels with magnification */ - GLuint i; - - ASSERT(lambda != NULL); - compute_min_mag_ranges(tObj, n, lambda, - &minStart, &minEnd, &magStart, &magEnd); - - if (minStart < minEnd) { - /* do the minified texels */ - const GLuint m = minEnd - minStart; - switch (tObj->Sampler.MinFilter) { - case GL_NEAREST: - for (i = minStart; i < minEnd; i++) - sample_1d_nearest(ctx, tObj, tObj->Image[0][tObj->BaseLevel], - texcoords[i], rgba[i]); - break; - case GL_LINEAR: - for (i = minStart; i < minEnd; i++) - sample_1d_linear(ctx, tObj, tObj->Image[0][tObj->BaseLevel], - texcoords[i], rgba[i]); - break; - case GL_NEAREST_MIPMAP_NEAREST: - sample_1d_nearest_mipmap_nearest(ctx, tObj, m, texcoords + minStart, - lambda + minStart, rgba + minStart); - break; - case GL_LINEAR_MIPMAP_NEAREST: - sample_1d_linear_mipmap_nearest(ctx, tObj, m, texcoords + minStart, - lambda + minStart, rgba + minStart); - break; - case GL_NEAREST_MIPMAP_LINEAR: - sample_1d_nearest_mipmap_linear(ctx, tObj, m, texcoords + minStart, - lambda + minStart, rgba + minStart); - break; - case GL_LINEAR_MIPMAP_LINEAR: - sample_1d_linear_mipmap_linear(ctx, tObj, m, texcoords + minStart, - lambda + minStart, rgba + minStart); - break; - default: - _mesa_problem(ctx, "Bad min filter in sample_1d_texture"); - return; - } - } - - if (magStart < magEnd) { - /* do the magnified texels */ - switch (tObj->Sampler.MagFilter) { - case GL_NEAREST: - for (i = magStart; i < magEnd; i++) - sample_1d_nearest(ctx, tObj, tObj->Image[0][tObj->BaseLevel], - texcoords[i], rgba[i]); - break; - case GL_LINEAR: - for (i = magStart; i < magEnd; i++) - sample_1d_linear(ctx, tObj, tObj->Image[0][tObj->BaseLevel], - texcoords[i], rgba[i]); - break; - default: - _mesa_problem(ctx, "Bad mag filter in sample_1d_texture"); - return; - } - } -} - - -/**********************************************************************/ -/* 2-D Texture Sampling Functions */ -/**********************************************************************/ - - -/** - * Return the texture sample for coordinate (s,t) using GL_NEAREST filter. - */ -static INLINE void -sample_2d_nearest(struct gl_context *ctx, - const struct gl_texture_object *tObj, - const struct gl_texture_image *img, - const GLfloat texcoord[4], - GLfloat rgba[]) -{ - const GLint width = img->Width2; /* without border, power of two */ - const GLint height = img->Height2; /* without border, power of two */ - GLint i, j; - (void) ctx; - - i = nearest_texel_location(tObj->Sampler.WrapS, img, width, texcoord[0]); - j = nearest_texel_location(tObj->Sampler.WrapT, img, height, texcoord[1]); - - /* skip over the border, if any */ - i += img->Border; - j += img->Border; - - if (i < 0 || i >= (GLint) img->Width || j < 0 || j >= (GLint) img->Height) { - /* Need this test for GL_CLAMP_TO_BORDER mode */ - get_border_color(tObj, img, rgba); - } - else { - img->FetchTexelf(img, i, j, 0, rgba); - } -} - - -/** - * Return the texture sample for coordinate (s,t) using GL_LINEAR filter. - * New sampling code contributed by Lynn Quam . - */ -static INLINE void -sample_2d_linear(struct gl_context *ctx, - const struct gl_texture_object *tObj, - const struct gl_texture_image *img, - const GLfloat texcoord[4], - GLfloat rgba[]) -{ - const GLint width = img->Width2; - const GLint height = img->Height2; - GLint i0, j0, i1, j1; - GLbitfield useBorderColor = 0x0; - GLfloat a, b; - GLfloat t00[4], t10[4], t01[4], t11[4]; /* sampled texel colors */ - - linear_texel_locations(tObj->Sampler.WrapS, img, width, texcoord[0], &i0, &i1, &a); - linear_texel_locations(tObj->Sampler.WrapT, img, height, texcoord[1], &j0, &j1, &b); - - if (img->Border) { - i0 += img->Border; - i1 += img->Border; - j0 += img->Border; - j1 += img->Border; - } - else { - if (i0 < 0 || i0 >= width) useBorderColor |= I0BIT; - if (i1 < 0 || i1 >= width) useBorderColor |= I1BIT; - if (j0 < 0 || j0 >= height) useBorderColor |= J0BIT; - if (j1 < 0 || j1 >= height) useBorderColor |= J1BIT; - } - - /* fetch four texel colors */ - if (useBorderColor & (I0BIT | J0BIT)) { - get_border_color(tObj, img, t00); - } - else { - img->FetchTexelf(img, i0, j0, 0, t00); - } - if (useBorderColor & (I1BIT | J0BIT)) { - get_border_color(tObj, img, t10); - } - else { - img->FetchTexelf(img, i1, j0, 0, t10); - } - if (useBorderColor & (I0BIT | J1BIT)) { - get_border_color(tObj, img, t01); - } - else { - img->FetchTexelf(img, i0, j1, 0, t01); - } - if (useBorderColor & (I1BIT | J1BIT)) { - get_border_color(tObj, img, t11); - } - else { - img->FetchTexelf(img, i1, j1, 0, t11); - } - - lerp_rgba_2d(rgba, a, b, t00, t10, t01, t11); -} - - -/** - * As above, but we know WRAP_S == REPEAT and WRAP_T == REPEAT. - * We don't have to worry about the texture border. - */ -static INLINE void -sample_2d_linear_repeat(struct gl_context *ctx, - const struct gl_texture_object *tObj, - const struct gl_texture_image *img, - const GLfloat texcoord[4], - GLfloat rgba[]) -{ - const GLint width = img->Width2; - const GLint height = img->Height2; - GLint i0, j0, i1, j1; - GLfloat wi, wj; - GLfloat t00[4], t10[4], t01[4], t11[4]; /* sampled texel colors */ - - (void) ctx; - - ASSERT(tObj->Sampler.WrapS == GL_REPEAT); - ASSERT(tObj->Sampler.WrapT == GL_REPEAT); - ASSERT(img->Border == 0); - ASSERT(img->_BaseFormat != GL_COLOR_INDEX); - ASSERT(img->_IsPowerOfTwo); - - linear_repeat_texel_location(width, texcoord[0], &i0, &i1, &wi); - linear_repeat_texel_location(height, texcoord[1], &j0, &j1, &wj); - - img->FetchTexelf(img, i0, j0, 0, t00); - img->FetchTexelf(img, i1, j0, 0, t10); - img->FetchTexelf(img, i0, j1, 0, t01); - img->FetchTexelf(img, i1, j1, 0, t11); - - lerp_rgba_2d(rgba, wi, wj, t00, t10, t01, t11); -} - - -static void -sample_2d_nearest_mipmap_nearest(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - for (i = 0; i < n; i++) { - GLint level = nearest_mipmap_level(tObj, lambda[i]); - sample_2d_nearest(ctx, tObj, tObj->Image[0][level], texcoord[i], rgba[i]); - } -} - - -static void -sample_2d_linear_mipmap_nearest(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - ASSERT(lambda != NULL); - for (i = 0; i < n; i++) { - GLint level = nearest_mipmap_level(tObj, lambda[i]); - sample_2d_linear(ctx, tObj, tObj->Image[0][level], texcoord[i], rgba[i]); - } -} - - -static void -sample_2d_nearest_mipmap_linear(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - ASSERT(lambda != NULL); - for (i = 0; i < n; i++) { - GLint level = linear_mipmap_level(tObj, lambda[i]); - if (level >= tObj->_MaxLevel) { - sample_2d_nearest(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], - texcoord[i], rgba[i]); - } - else { - GLfloat t0[4], t1[4]; /* texels */ - const GLfloat f = FRAC(lambda[i]); - sample_2d_nearest(ctx, tObj, tObj->Image[0][level ], texcoord[i], t0); - sample_2d_nearest(ctx, tObj, tObj->Image[0][level+1], texcoord[i], t1); - lerp_rgba(rgba[i], f, t0, t1); - } - } -} - - -static void -sample_2d_linear_mipmap_linear( struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4] ) -{ - GLuint i; - ASSERT(lambda != NULL); - for (i = 0; i < n; i++) { - GLint level = linear_mipmap_level(tObj, lambda[i]); - if (level >= tObj->_MaxLevel) { - sample_2d_linear(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], - texcoord[i], rgba[i]); - } - else { - GLfloat t0[4], t1[4]; /* texels */ - const GLfloat f = FRAC(lambda[i]); - sample_2d_linear(ctx, tObj, tObj->Image[0][level ], texcoord[i], t0); - sample_2d_linear(ctx, tObj, tObj->Image[0][level+1], texcoord[i], t1); - lerp_rgba(rgba[i], f, t0, t1); - } - } -} - - -static void -sample_2d_linear_mipmap_linear_repeat(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - ASSERT(lambda != NULL); - ASSERT(tObj->Sampler.WrapS == GL_REPEAT); - ASSERT(tObj->Sampler.WrapT == GL_REPEAT); - for (i = 0; i < n; i++) { - GLint level = linear_mipmap_level(tObj, lambda[i]); - if (level >= tObj->_MaxLevel) { - sample_2d_linear_repeat(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], - texcoord[i], rgba[i]); - } - else { - GLfloat t0[4], t1[4]; /* texels */ - const GLfloat f = FRAC(lambda[i]); - sample_2d_linear_repeat(ctx, tObj, tObj->Image[0][level ], - texcoord[i], t0); - sample_2d_linear_repeat(ctx, tObj, tObj->Image[0][level+1], - texcoord[i], t1); - lerp_rgba(rgba[i], f, t0, t1); - } - } -} - - -/** Sample 2D texture, nearest filtering for both min/magnification */ -static void -sample_nearest_2d(struct gl_context *ctx, - const struct gl_texture_object *tObj, GLuint n, - const GLfloat texcoords[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel]; - (void) lambda; - for (i = 0; i < n; i++) { - sample_2d_nearest(ctx, tObj, image, texcoords[i], rgba[i]); - } -} - - -/** Sample 2D texture, linear filtering for both min/magnification */ -static void -sample_linear_2d(struct gl_context *ctx, - const struct gl_texture_object *tObj, GLuint n, - const GLfloat texcoords[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel]; - (void) lambda; - if (tObj->Sampler.WrapS == GL_REPEAT && - tObj->Sampler.WrapT == GL_REPEAT && - image->_IsPowerOfTwo && - image->Border == 0) { - for (i = 0; i < n; i++) { - sample_2d_linear_repeat(ctx, tObj, image, texcoords[i], rgba[i]); - } - } - else { - for (i = 0; i < n; i++) { - sample_2d_linear(ctx, tObj, image, texcoords[i], rgba[i]); - } - } -} - - -/** - * Optimized 2-D texture sampling: - * S and T wrap mode == GL_REPEAT - * GL_NEAREST min/mag filter - * No border, - * RowStride == Width, - * Format = GL_RGB - */ -static void -opt_sample_rgb_2d(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoords[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - const struct gl_texture_image *img = tObj->Image[0][tObj->BaseLevel]; - const GLfloat width = (GLfloat) img->Width; - const GLfloat height = (GLfloat) img->Height; - const GLint colMask = img->Width - 1; - const GLint rowMask = img->Height - 1; - const GLint shift = img->WidthLog2; - GLuint k; - (void) ctx; - (void) lambda; - ASSERT(tObj->Sampler.WrapS==GL_REPEAT); - ASSERT(tObj->Sampler.WrapT==GL_REPEAT); - ASSERT(img->Border==0); - ASSERT(img->TexFormat == MESA_FORMAT_RGB888); - ASSERT(img->_IsPowerOfTwo); - - for (k=0; kData) + 3*pos; - rgba[k][RCOMP] = UBYTE_TO_FLOAT(texel[2]); - rgba[k][GCOMP] = UBYTE_TO_FLOAT(texel[1]); - rgba[k][BCOMP] = UBYTE_TO_FLOAT(texel[0]); - rgba[k][ACOMP] = 1.0F; - } -} - - -/** - * Optimized 2-D texture sampling: - * S and T wrap mode == GL_REPEAT - * GL_NEAREST min/mag filter - * No border - * RowStride == Width, - * Format = GL_RGBA - */ -static void -opt_sample_rgba_2d(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoords[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - const struct gl_texture_image *img = tObj->Image[0][tObj->BaseLevel]; - const GLfloat width = (GLfloat) img->Width; - const GLfloat height = (GLfloat) img->Height; - const GLint colMask = img->Width - 1; - const GLint rowMask = img->Height - 1; - const GLint shift = img->WidthLog2; - GLuint i; - (void) ctx; - (void) lambda; - ASSERT(tObj->Sampler.WrapS==GL_REPEAT); - ASSERT(tObj->Sampler.WrapT==GL_REPEAT); - ASSERT(img->Border==0); - ASSERT(img->TexFormat == MESA_FORMAT_RGBA8888); - ASSERT(img->_IsPowerOfTwo); - - for (i = 0; i < n; i++) { - const GLint col = IFLOOR(texcoords[i][0] * width) & colMask; - const GLint row = IFLOOR(texcoords[i][1] * height) & rowMask; - const GLint pos = (row << shift) | col; - const GLuint texel = *((GLuint *) img->Data + pos); - rgba[i][RCOMP] = UBYTE_TO_FLOAT( (texel >> 24) ); - rgba[i][GCOMP] = UBYTE_TO_FLOAT( (texel >> 16) & 0xff ); - rgba[i][BCOMP] = UBYTE_TO_FLOAT( (texel >> 8) & 0xff ); - rgba[i][ACOMP] = UBYTE_TO_FLOAT( (texel ) & 0xff ); - } -} - - -/** Sample 2D texture, using lambda to choose between min/magnification */ -static void -sample_lambda_2d(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoords[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - const struct gl_texture_image *tImg = tObj->Image[0][tObj->BaseLevel]; - GLuint minStart, minEnd; /* texels with minification */ - GLuint magStart, magEnd; /* texels with magnification */ - - const GLboolean repeatNoBorderPOT = (tObj->Sampler.WrapS == GL_REPEAT) - && (tObj->Sampler.WrapT == GL_REPEAT) - && (tImg->Border == 0 && (tImg->Width == tImg->RowStride)) - && (tImg->_BaseFormat != GL_COLOR_INDEX) - && tImg->_IsPowerOfTwo; - - ASSERT(lambda != NULL); - compute_min_mag_ranges(tObj, n, lambda, - &minStart, &minEnd, &magStart, &magEnd); - - if (minStart < minEnd) { - /* do the minified texels */ - const GLuint m = minEnd - minStart; - switch (tObj->Sampler.MinFilter) { - case GL_NEAREST: - if (repeatNoBorderPOT) { - switch (tImg->TexFormat) { - case MESA_FORMAT_RGB888: - opt_sample_rgb_2d(ctx, tObj, m, texcoords + minStart, - NULL, rgba + minStart); - break; - case MESA_FORMAT_RGBA8888: - opt_sample_rgba_2d(ctx, tObj, m, texcoords + minStart, - NULL, rgba + minStart); - break; - default: - sample_nearest_2d(ctx, tObj, m, texcoords + minStart, - NULL, rgba + minStart ); - } - } - else { - sample_nearest_2d(ctx, tObj, m, texcoords + minStart, - NULL, rgba + minStart); - } - break; - case GL_LINEAR: - sample_linear_2d(ctx, tObj, m, texcoords + minStart, - NULL, rgba + minStart); - break; - case GL_NEAREST_MIPMAP_NEAREST: - sample_2d_nearest_mipmap_nearest(ctx, tObj, m, - texcoords + minStart, - lambda + minStart, rgba + minStart); - break; - case GL_LINEAR_MIPMAP_NEAREST: - sample_2d_linear_mipmap_nearest(ctx, tObj, m, texcoords + minStart, - lambda + minStart, rgba + minStart); - break; - case GL_NEAREST_MIPMAP_LINEAR: - sample_2d_nearest_mipmap_linear(ctx, tObj, m, texcoords + minStart, - lambda + minStart, rgba + minStart); - break; - case GL_LINEAR_MIPMAP_LINEAR: - if (repeatNoBorderPOT) - sample_2d_linear_mipmap_linear_repeat(ctx, tObj, m, - texcoords + minStart, lambda + minStart, rgba + minStart); - else - sample_2d_linear_mipmap_linear(ctx, tObj, m, texcoords + minStart, - lambda + minStart, rgba + minStart); - break; - default: - _mesa_problem(ctx, "Bad min filter in sample_2d_texture"); - return; - } - } - - if (magStart < magEnd) { - /* do the magnified texels */ - const GLuint m = magEnd - magStart; - - switch (tObj->Sampler.MagFilter) { - case GL_NEAREST: - if (repeatNoBorderPOT) { - switch (tImg->TexFormat) { - case MESA_FORMAT_RGB888: - opt_sample_rgb_2d(ctx, tObj, m, texcoords + magStart, - NULL, rgba + magStart); - break; - case MESA_FORMAT_RGBA8888: - opt_sample_rgba_2d(ctx, tObj, m, texcoords + magStart, - NULL, rgba + magStart); - break; - default: - sample_nearest_2d(ctx, tObj, m, texcoords + magStart, - NULL, rgba + magStart ); - } - } - else { - sample_nearest_2d(ctx, tObj, m, texcoords + magStart, - NULL, rgba + magStart); - } - break; - case GL_LINEAR: - sample_linear_2d(ctx, tObj, m, texcoords + magStart, - NULL, rgba + magStart); - break; - default: - _mesa_problem(ctx, "Bad mag filter in sample_lambda_2d"); - } - } -} - - - -/**********************************************************************/ -/* 3-D Texture Sampling Functions */ -/**********************************************************************/ - -/** - * Return the texture sample for coordinate (s,t,r) using GL_NEAREST filter. - */ -static INLINE void -sample_3d_nearest(struct gl_context *ctx, - const struct gl_texture_object *tObj, - const struct gl_texture_image *img, - const GLfloat texcoord[4], - GLfloat rgba[4]) -{ - const GLint width = img->Width2; /* without border, power of two */ - const GLint height = img->Height2; /* without border, power of two */ - const GLint depth = img->Depth2; /* without border, power of two */ - GLint i, j, k; - (void) ctx; - - i = nearest_texel_location(tObj->Sampler.WrapS, img, width, texcoord[0]); - j = nearest_texel_location(tObj->Sampler.WrapT, img, height, texcoord[1]); - k = nearest_texel_location(tObj->Sampler.WrapR, img, depth, texcoord[2]); - - if (i < 0 || i >= (GLint) img->Width || - j < 0 || j >= (GLint) img->Height || - k < 0 || k >= (GLint) img->Depth) { - /* Need this test for GL_CLAMP_TO_BORDER mode */ - get_border_color(tObj, img, rgba); - } - else { - img->FetchTexelf(img, i, j, k, rgba); - } -} - - -/** - * Return the texture sample for coordinate (s,t,r) using GL_LINEAR filter. - */ -static void -sample_3d_linear(struct gl_context *ctx, - const struct gl_texture_object *tObj, - const struct gl_texture_image *img, - const GLfloat texcoord[4], - GLfloat rgba[4]) -{ - const GLint width = img->Width2; - const GLint height = img->Height2; - const GLint depth = img->Depth2; - GLint i0, j0, k0, i1, j1, k1; - GLbitfield useBorderColor = 0x0; - GLfloat a, b, c; - GLfloat t000[4], t010[4], t001[4], t011[4]; - GLfloat t100[4], t110[4], t101[4], t111[4]; - - linear_texel_locations(tObj->Sampler.WrapS, img, width, texcoord[0], &i0, &i1, &a); - linear_texel_locations(tObj->Sampler.WrapT, img, height, texcoord[1], &j0, &j1, &b); - linear_texel_locations(tObj->Sampler.WrapR, img, depth, texcoord[2], &k0, &k1, &c); - - if (img->Border) { - i0 += img->Border; - i1 += img->Border; - j0 += img->Border; - j1 += img->Border; - k0 += img->Border; - k1 += img->Border; - } - else { - /* check if sampling texture border color */ - if (i0 < 0 || i0 >= width) useBorderColor |= I0BIT; - if (i1 < 0 || i1 >= width) useBorderColor |= I1BIT; - if (j0 < 0 || j0 >= height) useBorderColor |= J0BIT; - if (j1 < 0 || j1 >= height) useBorderColor |= J1BIT; - if (k0 < 0 || k0 >= depth) useBorderColor |= K0BIT; - if (k1 < 0 || k1 >= depth) useBorderColor |= K1BIT; - } - - /* Fetch texels */ - if (useBorderColor & (I0BIT | J0BIT | K0BIT)) { - get_border_color(tObj, img, t000); - } - else { - img->FetchTexelf(img, i0, j0, k0, t000); - } - if (useBorderColor & (I1BIT | J0BIT | K0BIT)) { - get_border_color(tObj, img, t100); - } - else { - img->FetchTexelf(img, i1, j0, k0, t100); - } - if (useBorderColor & (I0BIT | J1BIT | K0BIT)) { - get_border_color(tObj, img, t010); - } - else { - img->FetchTexelf(img, i0, j1, k0, t010); - } - if (useBorderColor & (I1BIT | J1BIT | K0BIT)) { - get_border_color(tObj, img, t110); - } - else { - img->FetchTexelf(img, i1, j1, k0, t110); - } - - if (useBorderColor & (I0BIT | J0BIT | K1BIT)) { - get_border_color(tObj, img, t001); - } - else { - img->FetchTexelf(img, i0, j0, k1, t001); - } - if (useBorderColor & (I1BIT | J0BIT | K1BIT)) { - get_border_color(tObj, img, t101); - } - else { - img->FetchTexelf(img, i1, j0, k1, t101); - } - if (useBorderColor & (I0BIT | J1BIT | K1BIT)) { - get_border_color(tObj, img, t011); - } - else { - img->FetchTexelf(img, i0, j1, k1, t011); - } - if (useBorderColor & (I1BIT | J1BIT | K1BIT)) { - get_border_color(tObj, img, t111); - } - else { - img->FetchTexelf(img, i1, j1, k1, t111); - } - - /* trilinear interpolation of samples */ - lerp_rgba_3d(rgba, a, b, c, t000, t100, t010, t110, t001, t101, t011, t111); -} - - -static void -sample_3d_nearest_mipmap_nearest(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4] ) -{ - GLuint i; - for (i = 0; i < n; i++) { - GLint level = nearest_mipmap_level(tObj, lambda[i]); - sample_3d_nearest(ctx, tObj, tObj->Image[0][level], texcoord[i], rgba[i]); - } -} - - -static void -sample_3d_linear_mipmap_nearest(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - ASSERT(lambda != NULL); - for (i = 0; i < n; i++) { - GLint level = nearest_mipmap_level(tObj, lambda[i]); - sample_3d_linear(ctx, tObj, tObj->Image[0][level], texcoord[i], rgba[i]); - } -} - - -static void -sample_3d_nearest_mipmap_linear(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - ASSERT(lambda != NULL); - for (i = 0; i < n; i++) { - GLint level = linear_mipmap_level(tObj, lambda[i]); - if (level >= tObj->_MaxLevel) { - sample_3d_nearest(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], - texcoord[i], rgba[i]); - } - else { - GLfloat t0[4], t1[4]; /* texels */ - const GLfloat f = FRAC(lambda[i]); - sample_3d_nearest(ctx, tObj, tObj->Image[0][level ], texcoord[i], t0); - sample_3d_nearest(ctx, tObj, tObj->Image[0][level+1], texcoord[i], t1); - lerp_rgba(rgba[i], f, t0, t1); - } - } -} - - -static void -sample_3d_linear_mipmap_linear(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - ASSERT(lambda != NULL); - for (i = 0; i < n; i++) { - GLint level = linear_mipmap_level(tObj, lambda[i]); - if (level >= tObj->_MaxLevel) { - sample_3d_linear(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], - texcoord[i], rgba[i]); - } - else { - GLfloat t0[4], t1[4]; /* texels */ - const GLfloat f = FRAC(lambda[i]); - sample_3d_linear(ctx, tObj, tObj->Image[0][level ], texcoord[i], t0); - sample_3d_linear(ctx, tObj, tObj->Image[0][level+1], texcoord[i], t1); - lerp_rgba(rgba[i], f, t0, t1); - } - } -} - - -/** Sample 3D texture, nearest filtering for both min/magnification */ -static void -sample_nearest_3d(struct gl_context *ctx, - const struct gl_texture_object *tObj, GLuint n, - const GLfloat texcoords[][4], const GLfloat lambda[], - GLfloat rgba[][4]) -{ - GLuint i; - struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel]; - (void) lambda; - for (i = 0; i < n; i++) { - sample_3d_nearest(ctx, tObj, image, texcoords[i], rgba[i]); - } -} - - -/** Sample 3D texture, linear filtering for both min/magnification */ -static void -sample_linear_3d(struct gl_context *ctx, - const struct gl_texture_object *tObj, GLuint n, - const GLfloat texcoords[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel]; - (void) lambda; - for (i = 0; i < n; i++) { - sample_3d_linear(ctx, tObj, image, texcoords[i], rgba[i]); - } -} - - -/** Sample 3D texture, using lambda to choose between min/magnification */ -static void -sample_lambda_3d(struct gl_context *ctx, - const struct gl_texture_object *tObj, GLuint n, - const GLfloat texcoords[][4], const GLfloat lambda[], - GLfloat rgba[][4]) -{ - GLuint minStart, minEnd; /* texels with minification */ - GLuint magStart, magEnd; /* texels with magnification */ - GLuint i; - - ASSERT(lambda != NULL); - compute_min_mag_ranges(tObj, n, lambda, - &minStart, &minEnd, &magStart, &magEnd); - - if (minStart < minEnd) { - /* do the minified texels */ - GLuint m = minEnd - minStart; - switch (tObj->Sampler.MinFilter) { - case GL_NEAREST: - for (i = minStart; i < minEnd; i++) - sample_3d_nearest(ctx, tObj, tObj->Image[0][tObj->BaseLevel], - texcoords[i], rgba[i]); - break; - case GL_LINEAR: - for (i = minStart; i < minEnd; i++) - sample_3d_linear(ctx, tObj, tObj->Image[0][tObj->BaseLevel], - texcoords[i], rgba[i]); - break; - case GL_NEAREST_MIPMAP_NEAREST: - sample_3d_nearest_mipmap_nearest(ctx, tObj, m, texcoords + minStart, - lambda + minStart, rgba + minStart); - break; - case GL_LINEAR_MIPMAP_NEAREST: - sample_3d_linear_mipmap_nearest(ctx, tObj, m, texcoords + minStart, - lambda + minStart, rgba + minStart); - break; - case GL_NEAREST_MIPMAP_LINEAR: - sample_3d_nearest_mipmap_linear(ctx, tObj, m, texcoords + minStart, - lambda + minStart, rgba + minStart); - break; - case GL_LINEAR_MIPMAP_LINEAR: - sample_3d_linear_mipmap_linear(ctx, tObj, m, texcoords + minStart, - lambda + minStart, rgba + minStart); - break; - default: - _mesa_problem(ctx, "Bad min filter in sample_3d_texture"); - return; - } - } - - if (magStart < magEnd) { - /* do the magnified texels */ - switch (tObj->Sampler.MagFilter) { - case GL_NEAREST: - for (i = magStart; i < magEnd; i++) - sample_3d_nearest(ctx, tObj, tObj->Image[0][tObj->BaseLevel], - texcoords[i], rgba[i]); - break; - case GL_LINEAR: - for (i = magStart; i < magEnd; i++) - sample_3d_linear(ctx, tObj, tObj->Image[0][tObj->BaseLevel], - texcoords[i], rgba[i]); - break; - default: - _mesa_problem(ctx, "Bad mag filter in sample_3d_texture"); - return; - } - } -} - - -/**********************************************************************/ -/* Texture Cube Map Sampling Functions */ -/**********************************************************************/ - -/** - * Choose one of six sides of a texture cube map given the texture - * coord (rx,ry,rz). Return pointer to corresponding array of texture - * images. - */ -static const struct gl_texture_image ** -choose_cube_face(const struct gl_texture_object *texObj, - const GLfloat texcoord[4], GLfloat newCoord[4]) -{ - /* - major axis - direction target sc tc ma - ---------- ------------------------------- --- --- --- - +rx TEXTURE_CUBE_MAP_POSITIVE_X_EXT -rz -ry rx - -rx TEXTURE_CUBE_MAP_NEGATIVE_X_EXT +rz -ry rx - +ry TEXTURE_CUBE_MAP_POSITIVE_Y_EXT +rx +rz ry - -ry TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT +rx -rz ry - +rz TEXTURE_CUBE_MAP_POSITIVE_Z_EXT +rx -ry rz - -rz TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT -rx -ry rz - */ - const GLfloat rx = texcoord[0]; - const GLfloat ry = texcoord[1]; - const GLfloat rz = texcoord[2]; - const GLfloat arx = FABSF(rx), ary = FABSF(ry), arz = FABSF(rz); - GLuint face; - GLfloat sc, tc, ma; - - if (arx >= ary && arx >= arz) { - if (rx >= 0.0F) { - face = FACE_POS_X; - sc = -rz; - tc = -ry; - ma = arx; - } - else { - face = FACE_NEG_X; - sc = rz; - tc = -ry; - ma = arx; - } - } - else if (ary >= arx && ary >= arz) { - if (ry >= 0.0F) { - face = FACE_POS_Y; - sc = rx; - tc = rz; - ma = ary; - } - else { - face = FACE_NEG_Y; - sc = rx; - tc = -rz; - ma = ary; - } - } - else { - if (rz > 0.0F) { - face = FACE_POS_Z; - sc = rx; - tc = -ry; - ma = arz; - } - else { - face = FACE_NEG_Z; - sc = -rx; - tc = -ry; - ma = arz; - } - } - - { - const float ima = 1.0F / ma; - newCoord[0] = ( sc * ima + 1.0F ) * 0.5F; - newCoord[1] = ( tc * ima + 1.0F ) * 0.5F; - } - - return (const struct gl_texture_image **) texObj->Image[face]; -} - - -static void -sample_nearest_cube(struct gl_context *ctx, - const struct gl_texture_object *tObj, GLuint n, - const GLfloat texcoords[][4], const GLfloat lambda[], - GLfloat rgba[][4]) -{ - GLuint i; - (void) lambda; - for (i = 0; i < n; i++) { - const struct gl_texture_image **images; - GLfloat newCoord[4]; - images = choose_cube_face(tObj, texcoords[i], newCoord); - sample_2d_nearest(ctx, tObj, images[tObj->BaseLevel], - newCoord, rgba[i]); - } -} - - -static void -sample_linear_cube(struct gl_context *ctx, - const struct gl_texture_object *tObj, GLuint n, - const GLfloat texcoords[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - (void) lambda; - for (i = 0; i < n; i++) { - const struct gl_texture_image **images; - GLfloat newCoord[4]; - images = choose_cube_face(tObj, texcoords[i], newCoord); - sample_2d_linear(ctx, tObj, images[tObj->BaseLevel], - newCoord, rgba[i]); - } -} - - -static void -sample_cube_nearest_mipmap_nearest(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - ASSERT(lambda != NULL); - for (i = 0; i < n; i++) { - const struct gl_texture_image **images; - GLfloat newCoord[4]; - GLint level; - images = choose_cube_face(tObj, texcoord[i], newCoord); - - /* XXX we actually need to recompute lambda here based on the newCoords. - * But we would need the texcoords of adjacent fragments to compute that - * properly, and we don't have those here. - * For now, do an approximation: subtracting 1 from the chosen mipmap - * level seems to work in some test cases. - * The same adjustment is done in the next few functions. - */ - level = nearest_mipmap_level(tObj, lambda[i]); - level = MAX2(level - 1, 0); - - sample_2d_nearest(ctx, tObj, images[level], newCoord, rgba[i]); - } -} - - -static void -sample_cube_linear_mipmap_nearest(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - ASSERT(lambda != NULL); - for (i = 0; i < n; i++) { - const struct gl_texture_image **images; - GLfloat newCoord[4]; - GLint level = nearest_mipmap_level(tObj, lambda[i]); - level = MAX2(level - 1, 0); /* see comment above */ - images = choose_cube_face(tObj, texcoord[i], newCoord); - sample_2d_linear(ctx, tObj, images[level], newCoord, rgba[i]); - } -} - - -static void -sample_cube_nearest_mipmap_linear(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - ASSERT(lambda != NULL); - for (i = 0; i < n; i++) { - const struct gl_texture_image **images; - GLfloat newCoord[4]; - GLint level = linear_mipmap_level(tObj, lambda[i]); - level = MAX2(level - 1, 0); /* see comment above */ - images = choose_cube_face(tObj, texcoord[i], newCoord); - if (level >= tObj->_MaxLevel) { - sample_2d_nearest(ctx, tObj, images[tObj->_MaxLevel], - newCoord, rgba[i]); - } - else { - GLfloat t0[4], t1[4]; /* texels */ - const GLfloat f = FRAC(lambda[i]); - sample_2d_nearest(ctx, tObj, images[level ], newCoord, t0); - sample_2d_nearest(ctx, tObj, images[level+1], newCoord, t1); - lerp_rgba(rgba[i], f, t0, t1); - } - } -} - - -static void -sample_cube_linear_mipmap_linear(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - ASSERT(lambda != NULL); - for (i = 0; i < n; i++) { - const struct gl_texture_image **images; - GLfloat newCoord[4]; - GLint level = linear_mipmap_level(tObj, lambda[i]); - level = MAX2(level - 1, 0); /* see comment above */ - images = choose_cube_face(tObj, texcoord[i], newCoord); - if (level >= tObj->_MaxLevel) { - sample_2d_linear(ctx, tObj, images[tObj->_MaxLevel], - newCoord, rgba[i]); - } - else { - GLfloat t0[4], t1[4]; - const GLfloat f = FRAC(lambda[i]); - sample_2d_linear(ctx, tObj, images[level ], newCoord, t0); - sample_2d_linear(ctx, tObj, images[level+1], newCoord, t1); - lerp_rgba(rgba[i], f, t0, t1); - } - } -} - - -/** Sample cube texture, using lambda to choose between min/magnification */ -static void -sample_lambda_cube(struct gl_context *ctx, - const struct gl_texture_object *tObj, GLuint n, - const GLfloat texcoords[][4], const GLfloat lambda[], - GLfloat rgba[][4]) -{ - GLuint minStart, minEnd; /* texels with minification */ - GLuint magStart, magEnd; /* texels with magnification */ - - ASSERT(lambda != NULL); - compute_min_mag_ranges(tObj, n, lambda, - &minStart, &minEnd, &magStart, &magEnd); - - if (minStart < minEnd) { - /* do the minified texels */ - const GLuint m = minEnd - minStart; - switch (tObj->Sampler.MinFilter) { - case GL_NEAREST: - sample_nearest_cube(ctx, tObj, m, texcoords + minStart, - lambda + minStart, rgba + minStart); - break; - case GL_LINEAR: - sample_linear_cube(ctx, tObj, m, texcoords + minStart, - lambda + minStart, rgba + minStart); - break; - case GL_NEAREST_MIPMAP_NEAREST: - sample_cube_nearest_mipmap_nearest(ctx, tObj, m, - texcoords + minStart, - lambda + minStart, rgba + minStart); - break; - case GL_LINEAR_MIPMAP_NEAREST: - sample_cube_linear_mipmap_nearest(ctx, tObj, m, - texcoords + minStart, - lambda + minStart, rgba + minStart); - break; - case GL_NEAREST_MIPMAP_LINEAR: - sample_cube_nearest_mipmap_linear(ctx, tObj, m, - texcoords + minStart, - lambda + minStart, rgba + minStart); - break; - case GL_LINEAR_MIPMAP_LINEAR: - sample_cube_linear_mipmap_linear(ctx, tObj, m, - texcoords + minStart, - lambda + minStart, rgba + minStart); - break; - default: - _mesa_problem(ctx, "Bad min filter in sample_lambda_cube"); - } - } - - if (magStart < magEnd) { - /* do the magnified texels */ - const GLuint m = magEnd - magStart; - switch (tObj->Sampler.MagFilter) { - case GL_NEAREST: - sample_nearest_cube(ctx, tObj, m, texcoords + magStart, - lambda + magStart, rgba + magStart); - break; - case GL_LINEAR: - sample_linear_cube(ctx, tObj, m, texcoords + magStart, - lambda + magStart, rgba + magStart); - break; - default: - _mesa_problem(ctx, "Bad mag filter in sample_lambda_cube"); - } - } -} - - -/**********************************************************************/ -/* Texture Rectangle Sampling Functions */ -/**********************************************************************/ - - -static void -sample_nearest_rect(struct gl_context *ctx, - const struct gl_texture_object *tObj, GLuint n, - const GLfloat texcoords[][4], const GLfloat lambda[], - GLfloat rgba[][4]) -{ - const struct gl_texture_image *img = tObj->Image[0][0]; - const GLint width = img->Width; - const GLint height = img->Height; - GLuint i; - - (void) ctx; - (void) lambda; - - ASSERT(tObj->Sampler.WrapS == GL_CLAMP || - tObj->Sampler.WrapS == GL_CLAMP_TO_EDGE || - tObj->Sampler.WrapS == GL_CLAMP_TO_BORDER); - ASSERT(tObj->Sampler.WrapT == GL_CLAMP || - tObj->Sampler.WrapT == GL_CLAMP_TO_EDGE || - tObj->Sampler.WrapT == GL_CLAMP_TO_BORDER); - ASSERT(img->_BaseFormat != GL_COLOR_INDEX); - - for (i = 0; i < n; i++) { - GLint row, col; - col = clamp_rect_coord_nearest(tObj->Sampler.WrapS, texcoords[i][0], width); - row = clamp_rect_coord_nearest(tObj->Sampler.WrapT, texcoords[i][1], height); - if (col < 0 || col >= width || row < 0 || row >= height) - get_border_color(tObj, img, rgba[i]); - else - img->FetchTexelf(img, col, row, 0, rgba[i]); - } -} - - -static void -sample_linear_rect(struct gl_context *ctx, - const struct gl_texture_object *tObj, GLuint n, - const GLfloat texcoords[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - const struct gl_texture_image *img = tObj->Image[0][0]; - const GLint width = img->Width; - const GLint height = img->Height; - GLuint i; - - (void) ctx; - (void) lambda; - - ASSERT(tObj->Sampler.WrapS == GL_CLAMP || - tObj->Sampler.WrapS == GL_CLAMP_TO_EDGE || - tObj->Sampler.WrapS == GL_CLAMP_TO_BORDER); - ASSERT(tObj->Sampler.WrapT == GL_CLAMP || - tObj->Sampler.WrapT == GL_CLAMP_TO_EDGE || - tObj->Sampler.WrapT == GL_CLAMP_TO_BORDER); - ASSERT(img->_BaseFormat != GL_COLOR_INDEX); - - for (i = 0; i < n; i++) { - GLint i0, j0, i1, j1; - GLfloat t00[4], t01[4], t10[4], t11[4]; - GLfloat a, b; - GLbitfield useBorderColor = 0x0; - - clamp_rect_coord_linear(tObj->Sampler.WrapS, texcoords[i][0], width, - &i0, &i1, &a); - clamp_rect_coord_linear(tObj->Sampler.WrapT, texcoords[i][1], height, - &j0, &j1, &b); - - /* compute integer rows/columns */ - if (i0 < 0 || i0 >= width) useBorderColor |= I0BIT; - if (i1 < 0 || i1 >= width) useBorderColor |= I1BIT; - if (j0 < 0 || j0 >= height) useBorderColor |= J0BIT; - if (j1 < 0 || j1 >= height) useBorderColor |= J1BIT; - - /* get four texel samples */ - if (useBorderColor & (I0BIT | J0BIT)) - get_border_color(tObj, img, t00); - else - img->FetchTexelf(img, i0, j0, 0, t00); - - if (useBorderColor & (I1BIT | J0BIT)) - get_border_color(tObj, img, t10); - else - img->FetchTexelf(img, i1, j0, 0, t10); - - if (useBorderColor & (I0BIT | J1BIT)) - get_border_color(tObj, img, t01); - else - img->FetchTexelf(img, i0, j1, 0, t01); - - if (useBorderColor & (I1BIT | J1BIT)) - get_border_color(tObj, img, t11); - else - img->FetchTexelf(img, i1, j1, 0, t11); - - lerp_rgba_2d(rgba[i], a, b, t00, t10, t01, t11); - } -} - - -/** Sample Rect texture, using lambda to choose between min/magnification */ -static void -sample_lambda_rect(struct gl_context *ctx, - const struct gl_texture_object *tObj, GLuint n, - const GLfloat texcoords[][4], const GLfloat lambda[], - GLfloat rgba[][4]) -{ - GLuint minStart, minEnd, magStart, magEnd; - - /* We only need lambda to decide between minification and magnification. - * There is no mipmapping with rectangular textures. - */ - compute_min_mag_ranges(tObj, n, lambda, - &minStart, &minEnd, &magStart, &magEnd); - - if (minStart < minEnd) { - if (tObj->Sampler.MinFilter == GL_NEAREST) { - sample_nearest_rect(ctx, tObj, minEnd - minStart, - texcoords + minStart, NULL, rgba + minStart); - } - else { - sample_linear_rect(ctx, tObj, minEnd - minStart, - texcoords + minStart, NULL, rgba + minStart); - } - } - if (magStart < magEnd) { - if (tObj->Sampler.MagFilter == GL_NEAREST) { - sample_nearest_rect(ctx, tObj, magEnd - magStart, - texcoords + magStart, NULL, rgba + magStart); - } - else { - sample_linear_rect(ctx, tObj, magEnd - magStart, - texcoords + magStart, NULL, rgba + magStart); - } - } -} - - -/**********************************************************************/ -/* 2D Texture Array Sampling Functions */ -/**********************************************************************/ - -/** - * Return the texture sample for coordinate (s,t,r) using GL_NEAREST filter. - */ -static void -sample_2d_array_nearest(struct gl_context *ctx, - const struct gl_texture_object *tObj, - const struct gl_texture_image *img, - const GLfloat texcoord[4], - GLfloat rgba[4]) -{ - const GLint width = img->Width2; /* without border, power of two */ - const GLint height = img->Height2; /* without border, power of two */ - const GLint depth = img->Depth; - GLint i, j; - GLint array; - (void) ctx; - - i = nearest_texel_location(tObj->Sampler.WrapS, img, width, texcoord[0]); - j = nearest_texel_location(tObj->Sampler.WrapT, img, height, texcoord[1]); - array = tex_array_slice(texcoord[2], depth); - - if (i < 0 || i >= (GLint) img->Width || - j < 0 || j >= (GLint) img->Height || - array < 0 || array >= (GLint) img->Depth) { - /* Need this test for GL_CLAMP_TO_BORDER mode */ - get_border_color(tObj, img, rgba); - } - else { - img->FetchTexelf(img, i, j, array, rgba); - } -} - - -/** - * Return the texture sample for coordinate (s,t,r) using GL_LINEAR filter. - */ -static void -sample_2d_array_linear(struct gl_context *ctx, - const struct gl_texture_object *tObj, - const struct gl_texture_image *img, - const GLfloat texcoord[4], - GLfloat rgba[4]) -{ - const GLint width = img->Width2; - const GLint height = img->Height2; - const GLint depth = img->Depth; - GLint i0, j0, i1, j1; - GLint array; - GLbitfield useBorderColor = 0x0; - GLfloat a, b; - GLfloat t00[4], t01[4], t10[4], t11[4]; - - linear_texel_locations(tObj->Sampler.WrapS, img, width, texcoord[0], &i0, &i1, &a); - linear_texel_locations(tObj->Sampler.WrapT, img, height, texcoord[1], &j0, &j1, &b); - array = tex_array_slice(texcoord[2], depth); - - if (array < 0 || array >= depth) { - COPY_4V(rgba, tObj->Sampler.BorderColor.f); - } - else { - if (img->Border) { - i0 += img->Border; - i1 += img->Border; - j0 += img->Border; - j1 += img->Border; - } - else { - /* check if sampling texture border color */ - if (i0 < 0 || i0 >= width) useBorderColor |= I0BIT; - if (i1 < 0 || i1 >= width) useBorderColor |= I1BIT; - if (j0 < 0 || j0 >= height) useBorderColor |= J0BIT; - if (j1 < 0 || j1 >= height) useBorderColor |= J1BIT; - } - - /* Fetch texels */ - if (useBorderColor & (I0BIT | J0BIT)) { - get_border_color(tObj, img, t00); - } - else { - img->FetchTexelf(img, i0, j0, array, t00); - } - if (useBorderColor & (I1BIT | J0BIT)) { - get_border_color(tObj, img, t10); - } - else { - img->FetchTexelf(img, i1, j0, array, t10); - } - if (useBorderColor & (I0BIT | J1BIT)) { - get_border_color(tObj, img, t01); - } - else { - img->FetchTexelf(img, i0, j1, array, t01); - } - if (useBorderColor & (I1BIT | J1BIT)) { - get_border_color(tObj, img, t11); - } - else { - img->FetchTexelf(img, i1, j1, array, t11); - } - - /* trilinear interpolation of samples */ - lerp_rgba_2d(rgba, a, b, t00, t10, t01, t11); - } -} - - -static void -sample_2d_array_nearest_mipmap_nearest(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - for (i = 0; i < n; i++) { - GLint level = nearest_mipmap_level(tObj, lambda[i]); - sample_2d_array_nearest(ctx, tObj, tObj->Image[0][level], texcoord[i], - rgba[i]); - } -} - - -static void -sample_2d_array_linear_mipmap_nearest(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - ASSERT(lambda != NULL); - for (i = 0; i < n; i++) { - GLint level = nearest_mipmap_level(tObj, lambda[i]); - sample_2d_array_linear(ctx, tObj, tObj->Image[0][level], - texcoord[i], rgba[i]); - } -} - - -static void -sample_2d_array_nearest_mipmap_linear(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - ASSERT(lambda != NULL); - for (i = 0; i < n; i++) { - GLint level = linear_mipmap_level(tObj, lambda[i]); - if (level >= tObj->_MaxLevel) { - sample_2d_array_nearest(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], - texcoord[i], rgba[i]); - } - else { - GLfloat t0[4], t1[4]; /* texels */ - const GLfloat f = FRAC(lambda[i]); - sample_2d_array_nearest(ctx, tObj, tObj->Image[0][level ], - texcoord[i], t0); - sample_2d_array_nearest(ctx, tObj, tObj->Image[0][level+1], - texcoord[i], t1); - lerp_rgba(rgba[i], f, t0, t1); - } - } -} - - -static void -sample_2d_array_linear_mipmap_linear(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - ASSERT(lambda != NULL); - for (i = 0; i < n; i++) { - GLint level = linear_mipmap_level(tObj, lambda[i]); - if (level >= tObj->_MaxLevel) { - sample_2d_array_linear(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], - texcoord[i], rgba[i]); - } - else { - GLfloat t0[4], t1[4]; /* texels */ - const GLfloat f = FRAC(lambda[i]); - sample_2d_array_linear(ctx, tObj, tObj->Image[0][level ], - texcoord[i], t0); - sample_2d_array_linear(ctx, tObj, tObj->Image[0][level+1], - texcoord[i], t1); - lerp_rgba(rgba[i], f, t0, t1); - } - } -} - - -/** Sample 2D Array texture, nearest filtering for both min/magnification */ -static void -sample_nearest_2d_array(struct gl_context *ctx, - const struct gl_texture_object *tObj, GLuint n, - const GLfloat texcoords[][4], const GLfloat lambda[], - GLfloat rgba[][4]) -{ - GLuint i; - struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel]; - (void) lambda; - for (i = 0; i < n; i++) { - sample_2d_array_nearest(ctx, tObj, image, texcoords[i], rgba[i]); - } -} - - - -/** Sample 2D Array texture, linear filtering for both min/magnification */ -static void -sample_linear_2d_array(struct gl_context *ctx, - const struct gl_texture_object *tObj, GLuint n, - const GLfloat texcoords[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel]; - (void) lambda; - for (i = 0; i < n; i++) { - sample_2d_array_linear(ctx, tObj, image, texcoords[i], rgba[i]); - } -} - - -/** Sample 2D Array texture, using lambda to choose between min/magnification */ -static void -sample_lambda_2d_array(struct gl_context *ctx, - const struct gl_texture_object *tObj, GLuint n, - const GLfloat texcoords[][4], const GLfloat lambda[], - GLfloat rgba[][4]) -{ - GLuint minStart, minEnd; /* texels with minification */ - GLuint magStart, magEnd; /* texels with magnification */ - GLuint i; - - ASSERT(lambda != NULL); - compute_min_mag_ranges(tObj, n, lambda, - &minStart, &minEnd, &magStart, &magEnd); - - if (minStart < minEnd) { - /* do the minified texels */ - GLuint m = minEnd - minStart; - switch (tObj->Sampler.MinFilter) { - case GL_NEAREST: - for (i = minStart; i < minEnd; i++) - sample_2d_array_nearest(ctx, tObj, tObj->Image[0][tObj->BaseLevel], - texcoords[i], rgba[i]); - break; - case GL_LINEAR: - for (i = minStart; i < minEnd; i++) - sample_2d_array_linear(ctx, tObj, tObj->Image[0][tObj->BaseLevel], - texcoords[i], rgba[i]); - break; - case GL_NEAREST_MIPMAP_NEAREST: - sample_2d_array_nearest_mipmap_nearest(ctx, tObj, m, - texcoords + minStart, - lambda + minStart, - rgba + minStart); - break; - case GL_LINEAR_MIPMAP_NEAREST: - sample_2d_array_linear_mipmap_nearest(ctx, tObj, m, - texcoords + minStart, - lambda + minStart, - rgba + minStart); - break; - case GL_NEAREST_MIPMAP_LINEAR: - sample_2d_array_nearest_mipmap_linear(ctx, tObj, m, - texcoords + minStart, - lambda + minStart, - rgba + minStart); - break; - case GL_LINEAR_MIPMAP_LINEAR: - sample_2d_array_linear_mipmap_linear(ctx, tObj, m, - texcoords + minStart, - lambda + minStart, - rgba + minStart); - break; - default: - _mesa_problem(ctx, "Bad min filter in sample_2d_array_texture"); - return; - } - } - - if (magStart < magEnd) { - /* do the magnified texels */ - switch (tObj->Sampler.MagFilter) { - case GL_NEAREST: - for (i = magStart; i < magEnd; i++) - sample_2d_array_nearest(ctx, tObj, tObj->Image[0][tObj->BaseLevel], - texcoords[i], rgba[i]); - break; - case GL_LINEAR: - for (i = magStart; i < magEnd; i++) - sample_2d_array_linear(ctx, tObj, tObj->Image[0][tObj->BaseLevel], - texcoords[i], rgba[i]); - break; - default: - _mesa_problem(ctx, "Bad mag filter in sample_2d_array_texture"); - return; - } - } -} - - - - -/**********************************************************************/ -/* 1D Texture Array Sampling Functions */ -/**********************************************************************/ - -/** - * Return the texture sample for coordinate (s,t,r) using GL_NEAREST filter. - */ -static void -sample_1d_array_nearest(struct gl_context *ctx, - const struct gl_texture_object *tObj, - const struct gl_texture_image *img, - const GLfloat texcoord[4], - GLfloat rgba[4]) -{ - const GLint width = img->Width2; /* without border, power of two */ - const GLint height = img->Height; - GLint i; - GLint array; - (void) ctx; - - i = nearest_texel_location(tObj->Sampler.WrapS, img, width, texcoord[0]); - array = tex_array_slice(texcoord[1], height); - - if (i < 0 || i >= (GLint) img->Width || - array < 0 || array >= (GLint) img->Height) { - /* Need this test for GL_CLAMP_TO_BORDER mode */ - get_border_color(tObj, img, rgba); - } - else { - img->FetchTexelf(img, i, array, 0, rgba); - } -} - - -/** - * Return the texture sample for coordinate (s,t,r) using GL_LINEAR filter. - */ -static void -sample_1d_array_linear(struct gl_context *ctx, - const struct gl_texture_object *tObj, - const struct gl_texture_image *img, - const GLfloat texcoord[4], - GLfloat rgba[4]) -{ - const GLint width = img->Width2; - const GLint height = img->Height; - GLint i0, i1; - GLint array; - GLbitfield useBorderColor = 0x0; - GLfloat a; - GLfloat t0[4], t1[4]; - - linear_texel_locations(tObj->Sampler.WrapS, img, width, texcoord[0], &i0, &i1, &a); - array = tex_array_slice(texcoord[1], height); - - if (img->Border) { - i0 += img->Border; - i1 += img->Border; - } - else { - /* check if sampling texture border color */ - if (i0 < 0 || i0 >= width) useBorderColor |= I0BIT; - if (i1 < 0 || i1 >= width) useBorderColor |= I1BIT; - } - - if (array < 0 || array >= height) useBorderColor |= K0BIT; - - /* Fetch texels */ - if (useBorderColor & (I0BIT | K0BIT)) { - get_border_color(tObj, img, t0); - } - else { - img->FetchTexelf(img, i0, array, 0, t0); - } - if (useBorderColor & (I1BIT | K0BIT)) { - get_border_color(tObj, img, t1); - } - else { - img->FetchTexelf(img, i1, array, 0, t1); - } - - /* bilinear interpolation of samples */ - lerp_rgba(rgba, a, t0, t1); -} - - -static void -sample_1d_array_nearest_mipmap_nearest(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - for (i = 0; i < n; i++) { - GLint level = nearest_mipmap_level(tObj, lambda[i]); - sample_1d_array_nearest(ctx, tObj, tObj->Image[0][level], texcoord[i], - rgba[i]); - } -} - - -static void -sample_1d_array_linear_mipmap_nearest(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - ASSERT(lambda != NULL); - for (i = 0; i < n; i++) { - GLint level = nearest_mipmap_level(tObj, lambda[i]); - sample_1d_array_linear(ctx, tObj, tObj->Image[0][level], - texcoord[i], rgba[i]); - } -} - - -static void -sample_1d_array_nearest_mipmap_linear(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - ASSERT(lambda != NULL); - for (i = 0; i < n; i++) { - GLint level = linear_mipmap_level(tObj, lambda[i]); - if (level >= tObj->_MaxLevel) { - sample_1d_array_nearest(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], - texcoord[i], rgba[i]); - } - else { - GLfloat t0[4], t1[4]; /* texels */ - const GLfloat f = FRAC(lambda[i]); - sample_1d_array_nearest(ctx, tObj, tObj->Image[0][level ], texcoord[i], t0); - sample_1d_array_nearest(ctx, tObj, tObj->Image[0][level+1], texcoord[i], t1); - lerp_rgba(rgba[i], f, t0, t1); - } - } -} - - -static void -sample_1d_array_linear_mipmap_linear(struct gl_context *ctx, - const struct gl_texture_object *tObj, - GLuint n, const GLfloat texcoord[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - ASSERT(lambda != NULL); - for (i = 0; i < n; i++) { - GLint level = linear_mipmap_level(tObj, lambda[i]); - if (level >= tObj->_MaxLevel) { - sample_1d_array_linear(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], - texcoord[i], rgba[i]); - } - else { - GLfloat t0[4], t1[4]; /* texels */ - const GLfloat f = FRAC(lambda[i]); - sample_1d_array_linear(ctx, tObj, tObj->Image[0][level ], texcoord[i], t0); - sample_1d_array_linear(ctx, tObj, tObj->Image[0][level+1], texcoord[i], t1); - lerp_rgba(rgba[i], f, t0, t1); - } - } -} - - -/** Sample 1D Array texture, nearest filtering for both min/magnification */ -static void -sample_nearest_1d_array(struct gl_context *ctx, - const struct gl_texture_object *tObj, GLuint n, - const GLfloat texcoords[][4], const GLfloat lambda[], - GLfloat rgba[][4]) -{ - GLuint i; - struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel]; - (void) lambda; - for (i = 0; i < n; i++) { - sample_1d_array_nearest(ctx, tObj, image, texcoords[i], rgba[i]); - } -} - - -/** Sample 1D Array texture, linear filtering for both min/magnification */ -static void -sample_linear_1d_array(struct gl_context *ctx, - const struct gl_texture_object *tObj, GLuint n, - const GLfloat texcoords[][4], - const GLfloat lambda[], GLfloat rgba[][4]) -{ - GLuint i; - struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel]; - (void) lambda; - for (i = 0; i < n; i++) { - sample_1d_array_linear(ctx, tObj, image, texcoords[i], rgba[i]); - } -} - - -/** Sample 1D Array texture, using lambda to choose between min/magnification */ -static void -sample_lambda_1d_array(struct gl_context *ctx, - const struct gl_texture_object *tObj, GLuint n, - const GLfloat texcoords[][4], const GLfloat lambda[], - GLfloat rgba[][4]) -{ - GLuint minStart, minEnd; /* texels with minification */ - GLuint magStart, magEnd; /* texels with magnification */ - GLuint i; - - ASSERT(lambda != NULL); - compute_min_mag_ranges(tObj, n, lambda, - &minStart, &minEnd, &magStart, &magEnd); - - if (minStart < minEnd) { - /* do the minified texels */ - GLuint m = minEnd - minStart; - switch (tObj->Sampler.MinFilter) { - case GL_NEAREST: - for (i = minStart; i < minEnd; i++) - sample_1d_array_nearest(ctx, tObj, tObj->Image[0][tObj->BaseLevel], - texcoords[i], rgba[i]); - break; - case GL_LINEAR: - for (i = minStart; i < minEnd; i++) - sample_1d_array_linear(ctx, tObj, tObj->Image[0][tObj->BaseLevel], - texcoords[i], rgba[i]); - break; - case GL_NEAREST_MIPMAP_NEAREST: - sample_1d_array_nearest_mipmap_nearest(ctx, tObj, m, texcoords + minStart, - lambda + minStart, rgba + minStart); - break; - case GL_LINEAR_MIPMAP_NEAREST: - sample_1d_array_linear_mipmap_nearest(ctx, tObj, m, - texcoords + minStart, - lambda + minStart, - rgba + minStart); - break; - case GL_NEAREST_MIPMAP_LINEAR: - sample_1d_array_nearest_mipmap_linear(ctx, tObj, m, texcoords + minStart, - lambda + minStart, rgba + minStart); - break; - case GL_LINEAR_MIPMAP_LINEAR: - sample_1d_array_linear_mipmap_linear(ctx, tObj, m, - texcoords + minStart, - lambda + minStart, - rgba + minStart); - break; - default: - _mesa_problem(ctx, "Bad min filter in sample_1d_array_texture"); - return; - } - } - - if (magStart < magEnd) { - /* do the magnified texels */ - switch (tObj->Sampler.MagFilter) { - case GL_NEAREST: - for (i = magStart; i < magEnd; i++) - sample_1d_array_nearest(ctx, tObj, tObj->Image[0][tObj->BaseLevel], - texcoords[i], rgba[i]); - break; - case GL_LINEAR: - for (i = magStart; i < magEnd; i++) - sample_1d_array_linear(ctx, tObj, tObj->Image[0][tObj->BaseLevel], - texcoords[i], rgba[i]); - break; - default: - _mesa_problem(ctx, "Bad mag filter in sample_1d_array_texture"); - return; - } - } -} - - -/** - * Compare texcoord against depth sample. Return 1.0 or the ambient value. - */ -static INLINE GLfloat -shadow_compare(GLenum function, GLfloat coord, GLfloat depthSample, - GLfloat ambient) -{ - switch (function) { - case GL_LEQUAL: - return (coord <= depthSample) ? 1.0F : ambient; - case GL_GEQUAL: - return (coord >= depthSample) ? 1.0F : ambient; - case GL_LESS: - return (coord < depthSample) ? 1.0F : ambient; - case GL_GREATER: - return (coord > depthSample) ? 1.0F : ambient; - case GL_EQUAL: - return (coord == depthSample) ? 1.0F : ambient; - case GL_NOTEQUAL: - return (coord != depthSample) ? 1.0F : ambient; - case GL_ALWAYS: - return 1.0F; - case GL_NEVER: - return ambient; - case GL_NONE: - return depthSample; - default: - _mesa_problem(NULL, "Bad compare func in shadow_compare"); - return ambient; - } -} - - -/** - * Compare texcoord against four depth samples. - */ -static INLINE GLfloat -shadow_compare4(GLenum function, GLfloat coord, - GLfloat depth00, GLfloat depth01, - GLfloat depth10, GLfloat depth11, - GLfloat ambient, GLfloat wi, GLfloat wj) -{ - const GLfloat d = (1.0F - (GLfloat) ambient) * 0.25F; - GLfloat luminance = 1.0F; - - switch (function) { - case GL_LEQUAL: - if (coord > depth00) luminance -= d; - if (coord > depth01) luminance -= d; - if (coord > depth10) luminance -= d; - if (coord > depth11) luminance -= d; - return luminance; - case GL_GEQUAL: - if (coord < depth00) luminance -= d; - if (coord < depth01) luminance -= d; - if (coord < depth10) luminance -= d; - if (coord < depth11) luminance -= d; - return luminance; - case GL_LESS: - if (coord >= depth00) luminance -= d; - if (coord >= depth01) luminance -= d; - if (coord >= depth10) luminance -= d; - if (coord >= depth11) luminance -= d; - return luminance; - case GL_GREATER: - if (coord <= depth00) luminance -= d; - if (coord <= depth01) luminance -= d; - if (coord <= depth10) luminance -= d; - if (coord <= depth11) luminance -= d; - return luminance; - case GL_EQUAL: - if (coord != depth00) luminance -= d; - if (coord != depth01) luminance -= d; - if (coord != depth10) luminance -= d; - if (coord != depth11) luminance -= d; - return luminance; - case GL_NOTEQUAL: - if (coord == depth00) luminance -= d; - if (coord == depth01) luminance -= d; - if (coord == depth10) luminance -= d; - if (coord == depth11) luminance -= d; - return luminance; - case GL_ALWAYS: - return 1.0F; - case GL_NEVER: - return ambient; - case GL_NONE: - /* ordinary bilinear filtering */ - return lerp_2d(wi, wj, depth00, depth10, depth01, depth11); - default: - _mesa_problem(NULL, "Bad compare func in sample_compare4"); - return ambient; - } -} - - -/** - * Choose the mipmap level to use when sampling from a depth texture. - */ -static int -choose_depth_texture_level(const struct gl_texture_object *tObj, GLfloat lambda) -{ - GLint level; - - if (tObj->Sampler.MinFilter == GL_NEAREST || tObj->Sampler.MinFilter == GL_LINEAR) { - /* no mipmapping - use base level */ - level = tObj->BaseLevel; - } - else { - /* choose mipmap level */ - lambda = CLAMP(lambda, tObj->Sampler.MinLod, tObj->Sampler.MaxLod); - level = (GLint) lambda; - level = CLAMP(level, tObj->BaseLevel, tObj->_MaxLevel); - } - - return level; -} - - -/** - * Sample a shadow/depth texture. This function is incomplete. It doesn't - * check for minification vs. magnification, etc. - */ -static void -sample_depth_texture( struct gl_context *ctx, - const struct gl_texture_object *tObj, GLuint n, - const GLfloat texcoords[][4], const GLfloat lambda[], - GLfloat texel[][4] ) -{ - const GLint level = choose_depth_texture_level(tObj, lambda[0]); - const struct gl_texture_image *img = tObj->Image[0][level]; - const GLint width = img->Width; - const GLint height = img->Height; - const GLint depth = img->Depth; - const GLuint compare_coord = (tObj->Target == GL_TEXTURE_2D_ARRAY_EXT) - ? 3 : 2; - GLfloat ambient; - GLenum function; - GLfloat result; - - ASSERT(img->_BaseFormat == GL_DEPTH_COMPONENT || - img->_BaseFormat == GL_DEPTH_STENCIL_EXT); - - ASSERT(tObj->Target == GL_TEXTURE_1D || - tObj->Target == GL_TEXTURE_2D || - tObj->Target == GL_TEXTURE_RECTANGLE_NV || - tObj->Target == GL_TEXTURE_1D_ARRAY_EXT || - tObj->Target == GL_TEXTURE_2D_ARRAY_EXT); - - ambient = tObj->Sampler.CompareFailValue; - - /* XXXX if tObj->Sampler.MinFilter != tObj->Sampler.MagFilter, we're ignoring lambda */ - - function = (tObj->Sampler.CompareMode == GL_COMPARE_R_TO_TEXTURE_ARB) ? - tObj->Sampler.CompareFunc : GL_NONE; - - if (tObj->Sampler.MagFilter == GL_NEAREST) { - GLuint i; - for (i = 0; i < n; i++) { - GLfloat depthSample, depthRef; - GLint col, row, slice; - - nearest_texcoord(tObj, level, texcoords[i], &col, &row, &slice); - - if (col >= 0 && row >= 0 && col < width && row < height && - slice >= 0 && slice < depth) { - img->FetchTexelf(img, col, row, slice, &depthSample); - } - else { - depthSample = tObj->Sampler.BorderColor.f[0]; - } - - depthRef = CLAMP(texcoords[i][compare_coord], 0.0F, 1.0F); - - result = shadow_compare(function, depthRef, depthSample, ambient); - - switch (tObj->Sampler.DepthMode) { - case GL_LUMINANCE: - ASSIGN_4V(texel[i], result, result, result, 1.0F); - break; - case GL_INTENSITY: - ASSIGN_4V(texel[i], result, result, result, result); - break; - case GL_ALPHA: - ASSIGN_4V(texel[i], 0.0F, 0.0F, 0.0F, result); - break; - case GL_RED: - ASSIGN_4V(texel[i], result, 0.0F, 0.0F, 1.0F); - break; - default: - _mesa_problem(ctx, "Bad depth texture mode"); - } - } - } - else { - GLuint i; - ASSERT(tObj->Sampler.MagFilter == GL_LINEAR); - for (i = 0; i < n; i++) { - GLfloat depth00, depth01, depth10, depth11, depthRef; - GLint i0, i1, j0, j1; - GLint slice; - GLfloat wi, wj; - GLuint useBorderTexel; - - linear_texcoord(tObj, level, texcoords[i], &i0, &i1, &j0, &j1, &slice, - &wi, &wj); - - useBorderTexel = 0; - if (img->Border) { - i0 += img->Border; - i1 += img->Border; - if (tObj->Target != GL_TEXTURE_1D_ARRAY_EXT) { - j0 += img->Border; - j1 += img->Border; - } - } - else { - if (i0 < 0 || i0 >= (GLint) width) useBorderTexel |= I0BIT; - if (i1 < 0 || i1 >= (GLint) width) useBorderTexel |= I1BIT; - if (j0 < 0 || j0 >= (GLint) height) useBorderTexel |= J0BIT; - if (j1 < 0 || j1 >= (GLint) height) useBorderTexel |= J1BIT; - } - - if (slice < 0 || slice >= (GLint) depth) { - depth00 = tObj->Sampler.BorderColor.f[0]; - depth01 = tObj->Sampler.BorderColor.f[0]; - depth10 = tObj->Sampler.BorderColor.f[0]; - depth11 = tObj->Sampler.BorderColor.f[0]; - } - else { - /* get four depth samples from the texture */ - if (useBorderTexel & (I0BIT | J0BIT)) { - depth00 = tObj->Sampler.BorderColor.f[0]; - } - else { - img->FetchTexelf(img, i0, j0, slice, &depth00); - } - if (useBorderTexel & (I1BIT | J0BIT)) { - depth10 = tObj->Sampler.BorderColor.f[0]; - } - else { - img->FetchTexelf(img, i1, j0, slice, &depth10); - } - - if (tObj->Target != GL_TEXTURE_1D_ARRAY_EXT) { - if (useBorderTexel & (I0BIT | J1BIT)) { - depth01 = tObj->Sampler.BorderColor.f[0]; - } - else { - img->FetchTexelf(img, i0, j1, slice, &depth01); - } - if (useBorderTexel & (I1BIT | J1BIT)) { - depth11 = tObj->Sampler.BorderColor.f[0]; - } - else { - img->FetchTexelf(img, i1, j1, slice, &depth11); - } - } - else { - depth01 = depth00; - depth11 = depth10; - } - } - - depthRef = CLAMP(texcoords[i][compare_coord], 0.0F, 1.0F); - - result = shadow_compare4(function, depthRef, - depth00, depth01, depth10, depth11, - ambient, wi, wj); - - switch (tObj->Sampler.DepthMode) { - case GL_LUMINANCE: - ASSIGN_4V(texel[i], result, result, result, 1.0F); - break; - case GL_INTENSITY: - ASSIGN_4V(texel[i], result, result, result, result); - break; - case GL_ALPHA: - ASSIGN_4V(texel[i], 0.0F, 0.0F, 0.0F, result); - break; - default: - _mesa_problem(ctx, "Bad depth texture mode"); - } - - } /* for */ - } /* if filter */ -} - - -/** - * We use this function when a texture object is in an "incomplete" state. - * When a fragment program attempts to sample an incomplete texture we - * return black (see issue 23 in GL_ARB_fragment_program spec). - * Note: fragment programs don't observe the texture enable/disable flags. - */ -static void -null_sample_func( struct gl_context *ctx, - const struct gl_texture_object *tObj, GLuint n, - const GLfloat texcoords[][4], const GLfloat lambda[], - GLfloat rgba[][4]) -{ - GLuint i; - (void) ctx; - (void) tObj; - (void) texcoords; - (void) lambda; - for (i = 0; i < n; i++) { - rgba[i][RCOMP] = 0; - rgba[i][GCOMP] = 0; - rgba[i][BCOMP] = 0; - rgba[i][ACOMP] = 1.0; - } -} - - -/** - * Choose the texture sampling function for the given texture object. - */ -texture_sample_func -_swrast_choose_texture_sample_func( struct gl_context *ctx, - const struct gl_texture_object *t ) -{ - if (!t || !t->_Complete) { - return &null_sample_func; - } - else { - const GLboolean needLambda = - (GLboolean) (t->Sampler.MinFilter != t->Sampler.MagFilter); - const GLenum format = t->Image[0][t->BaseLevel]->_BaseFormat; - - switch (t->Target) { - case GL_TEXTURE_1D: - if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) { - return &sample_depth_texture; - } - else if (needLambda) { - return &sample_lambda_1d; - } - else if (t->Sampler.MinFilter == GL_LINEAR) { - return &sample_linear_1d; - } - else { - ASSERT(t->Sampler.MinFilter == GL_NEAREST); - return &sample_nearest_1d; - } - case GL_TEXTURE_2D: - if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) { - return &sample_depth_texture; - } - else if (needLambda) { - return &sample_lambda_2d; - } - else if (t->Sampler.MinFilter == GL_LINEAR) { - return &sample_linear_2d; - } - else { - /* check for a few optimized cases */ - const struct gl_texture_image *img = t->Image[0][t->BaseLevel]; - ASSERT(t->Sampler.MinFilter == GL_NEAREST); - if (t->Sampler.WrapS == GL_REPEAT && - t->Sampler.WrapT == GL_REPEAT && - img->_IsPowerOfTwo && - img->Border == 0 && - img->TexFormat == MESA_FORMAT_RGB888) { - return &opt_sample_rgb_2d; - } - else if (t->Sampler.WrapS == GL_REPEAT && - t->Sampler.WrapT == GL_REPEAT && - img->_IsPowerOfTwo && - img->Border == 0 && - img->TexFormat == MESA_FORMAT_RGBA8888) { - return &opt_sample_rgba_2d; - } - else { - return &sample_nearest_2d; - } - } - case GL_TEXTURE_3D: - if (needLambda) { - return &sample_lambda_3d; - } - else if (t->Sampler.MinFilter == GL_LINEAR) { - return &sample_linear_3d; - } - else { - ASSERT(t->Sampler.MinFilter == GL_NEAREST); - return &sample_nearest_3d; - } - case GL_TEXTURE_CUBE_MAP: - if (needLambda) { - return &sample_lambda_cube; - } - else if (t->Sampler.MinFilter == GL_LINEAR) { - return &sample_linear_cube; - } - else { - ASSERT(t->Sampler.MinFilter == GL_NEAREST); - return &sample_nearest_cube; - } - case GL_TEXTURE_RECTANGLE_NV: - if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) { - return &sample_depth_texture; - } - else if (needLambda) { - return &sample_lambda_rect; - } - else if (t->Sampler.MinFilter == GL_LINEAR) { - return &sample_linear_rect; - } - else { - ASSERT(t->Sampler.MinFilter == GL_NEAREST); - return &sample_nearest_rect; - } - case GL_TEXTURE_1D_ARRAY_EXT: - if (needLambda) { - return &sample_lambda_1d_array; - } - else if (t->Sampler.MinFilter == GL_LINEAR) { - return &sample_linear_1d_array; - } - else { - ASSERT(t->Sampler.MinFilter == GL_NEAREST); - return &sample_nearest_1d_array; - } - case GL_TEXTURE_2D_ARRAY_EXT: - if (needLambda) { - return &sample_lambda_2d_array; - } - else if (t->Sampler.MinFilter == GL_LINEAR) { - return &sample_linear_2d_array; - } - else { - ASSERT(t->Sampler.MinFilter == GL_NEAREST); - return &sample_nearest_2d_array; - } - default: - _mesa_problem(ctx, - "invalid target in _swrast_choose_texture_sample_func"); - return &null_sample_func; - } - } -} +/* + * Mesa 3-D graphics library + * Version: 7.3 + * + * Copyright (C) 1999-2008 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + + +#include "main/glheader.h" +#include "main/context.h" +#include "main/colormac.h" +#include "main/imports.h" + +#include "s_context.h" +#include "s_texfilter.h" + + +/* + * Note, the FRAC macro has to work perfectly. Otherwise you'll sometimes + * see 1-pixel bands of improperly weighted linear-filtered textures. + * The tests/texwrap.c demo is a good test. + * Also note, FRAC(x) doesn't truly return the fractional part of x for x < 0. + * Instead, if x < 0 then FRAC(x) = 1 - true_frac(x). + */ +#define FRAC(f) ((f) - IFLOOR(f)) + + + +/** + * Linear interpolation macro + */ +#define LERP(T, A, B) ( (A) + (T) * ((B) - (A)) ) + + +/** + * Do 2D/biliner interpolation of float values. + * v00, v10, v01 and v11 are typically four texture samples in a square/box. + * a and b are the horizontal and vertical interpolants. + * It's important that this function is inlined when compiled with + * optimization! If we find that's not true on some systems, convert + * to a macro. + */ +static INLINE GLfloat +lerp_2d(GLfloat a, GLfloat b, + GLfloat v00, GLfloat v10, GLfloat v01, GLfloat v11) +{ + const GLfloat temp0 = LERP(a, v00, v10); + const GLfloat temp1 = LERP(a, v01, v11); + return LERP(b, temp0, temp1); +} + + +/** + * Do 3D/trilinear interpolation of float values. + * \sa lerp_2d + */ +static INLINE GLfloat +lerp_3d(GLfloat a, GLfloat b, GLfloat c, + GLfloat v000, GLfloat v100, GLfloat v010, GLfloat v110, + GLfloat v001, GLfloat v101, GLfloat v011, GLfloat v111) +{ + const GLfloat temp00 = LERP(a, v000, v100); + const GLfloat temp10 = LERP(a, v010, v110); + const GLfloat temp01 = LERP(a, v001, v101); + const GLfloat temp11 = LERP(a, v011, v111); + const GLfloat temp0 = LERP(b, temp00, temp10); + const GLfloat temp1 = LERP(b, temp01, temp11); + return LERP(c, temp0, temp1); +} + + +/** + * Do linear interpolation of colors. + */ +static INLINE void +lerp_rgba(GLfloat result[4], GLfloat t, const GLfloat a[4], const GLfloat b[4]) +{ + result[0] = LERP(t, a[0], b[0]); + result[1] = LERP(t, a[1], b[1]); + result[2] = LERP(t, a[2], b[2]); + result[3] = LERP(t, a[3], b[3]); +} + + +/** + * Do bilinear interpolation of colors. + */ +static INLINE void +lerp_rgba_2d(GLfloat result[4], GLfloat a, GLfloat b, + const GLfloat t00[4], const GLfloat t10[4], + const GLfloat t01[4], const GLfloat t11[4]) +{ + result[0] = lerp_2d(a, b, t00[0], t10[0], t01[0], t11[0]); + result[1] = lerp_2d(a, b, t00[1], t10[1], t01[1], t11[1]); + result[2] = lerp_2d(a, b, t00[2], t10[2], t01[2], t11[2]); + result[3] = lerp_2d(a, b, t00[3], t10[3], t01[3], t11[3]); +} + + +/** + * Do trilinear interpolation of colors. + */ +static INLINE void +lerp_rgba_3d(GLfloat result[4], GLfloat a, GLfloat b, GLfloat c, + const GLfloat t000[4], const GLfloat t100[4], + const GLfloat t010[4], const GLfloat t110[4], + const GLfloat t001[4], const GLfloat t101[4], + const GLfloat t011[4], const GLfloat t111[4]) +{ + GLuint k; + /* compiler should unroll these short loops */ + for (k = 0; k < 4; k++) { + result[k] = lerp_3d(a, b, c, t000[k], t100[k], t010[k], t110[k], + t001[k], t101[k], t011[k], t111[k]); + } +} + + +/** + * Used for GL_REPEAT wrap mode. Using A % B doesn't produce the + * right results for A<0. Casting to A to be unsigned only works if B + * is a power of two. Adding a bias to A (which is a multiple of B) + * avoids the problems with A < 0 (for reasonable A) without using a + * conditional. + */ +#define REMAINDER(A, B) (((A) + (B) * 1024) % (B)) + + +/** + * Used to compute texel locations for linear sampling. + * Input: + * wrapMode = GL_REPEAT, GL_CLAMP, GL_CLAMP_TO_EDGE, GL_CLAMP_TO_BORDER + * s = texcoord in [0,1] + * size = width (or height or depth) of texture + * Output: + * i0, i1 = returns two nearest texel indexes + * weight = returns blend factor between texels + */ +static INLINE void +linear_texel_locations(GLenum wrapMode, + const struct gl_texture_image *img, + GLint size, GLfloat s, + GLint *i0, GLint *i1, GLfloat *weight) +{ + GLfloat u; + switch (wrapMode) { + case GL_REPEAT: + u = s * size - 0.5F; + if (img->_IsPowerOfTwo) { + *i0 = IFLOOR(u) & (size - 1); + *i1 = (*i0 + 1) & (size - 1); + } + else { + *i0 = REMAINDER(IFLOOR(u), size); + *i1 = REMAINDER(*i0 + 1, size); + } + break; + case GL_CLAMP_TO_EDGE: + if (s <= 0.0F) + u = 0.0F; + else if (s >= 1.0F) + u = (GLfloat) size; + else + u = s * size; + u -= 0.5F; + *i0 = IFLOOR(u); + *i1 = *i0 + 1; + if (*i0 < 0) + *i0 = 0; + if (*i1 >= (GLint) size) + *i1 = size - 1; + break; + case GL_CLAMP_TO_BORDER: + { + const GLfloat min = -1.0F / (2.0F * size); + const GLfloat max = 1.0F - min; + if (s <= min) + u = min * size; + else if (s >= max) + u = max * size; + else + u = s * size; + u -= 0.5F; + *i0 = IFLOOR(u); + *i1 = *i0 + 1; + } + break; + case GL_MIRRORED_REPEAT: + { + const GLint flr = IFLOOR(s); + if (flr & 1) + u = 1.0F - (s - (GLfloat) flr); + else + u = s - (GLfloat) flr; + u = (u * size) - 0.5F; + *i0 = IFLOOR(u); + *i1 = *i0 + 1; + if (*i0 < 0) + *i0 = 0; + if (*i1 >= (GLint) size) + *i1 = size - 1; + } + break; + case GL_MIRROR_CLAMP_EXT: + u = FABSF(s); + if (u >= 1.0F) + u = (GLfloat) size; + else + u *= size; + u -= 0.5F; + *i0 = IFLOOR(u); + *i1 = *i0 + 1; + break; + case GL_MIRROR_CLAMP_TO_EDGE_EXT: + u = FABSF(s); + if (u >= 1.0F) + u = (GLfloat) size; + else + u *= size; + u -= 0.5F; + *i0 = IFLOOR(u); + *i1 = *i0 + 1; + if (*i0 < 0) + *i0 = 0; + if (*i1 >= (GLint) size) + *i1 = size - 1; + break; + case GL_MIRROR_CLAMP_TO_BORDER_EXT: + { + const GLfloat min = -1.0F / (2.0F * size); + const GLfloat max = 1.0F - min; + u = FABSF(s); + if (u <= min) + u = min * size; + else if (u >= max) + u = max * size; + else + u *= size; + u -= 0.5F; + *i0 = IFLOOR(u); + *i1 = *i0 + 1; + } + break; + case GL_CLAMP: + if (s <= 0.0F) + u = 0.0F; + else if (s >= 1.0F) + u = (GLfloat) size; + else + u = s * size; + u -= 0.5F; + *i0 = IFLOOR(u); + *i1 = *i0 + 1; + break; + default: + _mesa_problem(NULL, "Bad wrap mode"); + u = 0.0F; + } + *weight = FRAC(u); +} + + +/** + * Used to compute texel location for nearest sampling. + */ +static INLINE GLint +nearest_texel_location(GLenum wrapMode, + const struct gl_texture_image *img, + GLint size, GLfloat s) +{ + GLint i; + + switch (wrapMode) { + case GL_REPEAT: + /* s limited to [0,1) */ + /* i limited to [0,size-1] */ + i = IFLOOR(s * size); + if (img->_IsPowerOfTwo) + i &= (size - 1); + else + i = REMAINDER(i, size); + return i; + case GL_CLAMP_TO_EDGE: + { + /* s limited to [min,max] */ + /* i limited to [0, size-1] */ + const GLfloat min = 1.0F / (2.0F * size); + const GLfloat max = 1.0F - min; + if (s < min) + i = 0; + else if (s > max) + i = size - 1; + else + i = IFLOOR(s * size); + } + return i; + case GL_CLAMP_TO_BORDER: + { + /* s limited to [min,max] */ + /* i limited to [-1, size] */ + const GLfloat min = -1.0F / (2.0F * size); + const GLfloat max = 1.0F - min; + if (s <= min) + i = -1; + else if (s >= max) + i = size; + else + i = IFLOOR(s * size); + } + return i; + case GL_MIRRORED_REPEAT: + { + const GLfloat min = 1.0F / (2.0F * size); + const GLfloat max = 1.0F - min; + const GLint flr = IFLOOR(s); + GLfloat u; + if (flr & 1) + u = 1.0F - (s - (GLfloat) flr); + else + u = s - (GLfloat) flr; + if (u < min) + i = 0; + else if (u > max) + i = size - 1; + else + i = IFLOOR(u * size); + } + return i; + case GL_MIRROR_CLAMP_EXT: + { + /* s limited to [0,1] */ + /* i limited to [0,size-1] */ + const GLfloat u = FABSF(s); + if (u <= 0.0F) + i = 0; + else if (u >= 1.0F) + i = size - 1; + else + i = IFLOOR(u * size); + } + return i; + case GL_MIRROR_CLAMP_TO_EDGE_EXT: + { + /* s limited to [min,max] */ + /* i limited to [0, size-1] */ + const GLfloat min = 1.0F / (2.0F * size); + const GLfloat max = 1.0F - min; + const GLfloat u = FABSF(s); + if (u < min) + i = 0; + else if (u > max) + i = size - 1; + else + i = IFLOOR(u * size); + } + return i; + case GL_MIRROR_CLAMP_TO_BORDER_EXT: + { + /* s limited to [min,max] */ + /* i limited to [0, size-1] */ + const GLfloat min = -1.0F / (2.0F * size); + const GLfloat max = 1.0F - min; + const GLfloat u = FABSF(s); + if (u < min) + i = -1; + else if (u > max) + i = size; + else + i = IFLOOR(u * size); + } + return i; + case GL_CLAMP: + /* s limited to [0,1] */ + /* i limited to [0,size-1] */ + if (s <= 0.0F) + i = 0; + else if (s >= 1.0F) + i = size - 1; + else + i = IFLOOR(s * size); + return i; + default: + _mesa_problem(NULL, "Bad wrap mode"); + return 0; + } +} + + +/* Power of two image sizes only */ +static INLINE void +linear_repeat_texel_location(GLuint size, GLfloat s, + GLint *i0, GLint *i1, GLfloat *weight) +{ + GLfloat u = s * size - 0.5F; + *i0 = IFLOOR(u) & (size - 1); + *i1 = (*i0 + 1) & (size - 1); + *weight = FRAC(u); +} + + +/** + * Do clamp/wrap for a texture rectangle coord, GL_NEAREST filter mode. + */ +static INLINE GLint +clamp_rect_coord_nearest(GLenum wrapMode, GLfloat coord, GLint max) +{ + switch (wrapMode) { + case GL_CLAMP: + return IFLOOR( CLAMP(coord, 0.0F, max - 1) ); + case GL_CLAMP_TO_EDGE: + return IFLOOR( CLAMP(coord, 0.5F, max - 0.5F) ); + case GL_CLAMP_TO_BORDER: + return IFLOOR( CLAMP(coord, -0.5F, max + 0.5F) ); + default: + _mesa_problem(NULL, "bad wrapMode in clamp_rect_coord_nearest"); + return 0; + } +} + + +/** + * As above, but GL_LINEAR filtering. + */ +static INLINE void +clamp_rect_coord_linear(GLenum wrapMode, GLfloat coord, GLint max, + GLint *i0out, GLint *i1out, GLfloat *weight) +{ + GLfloat fcol; + GLint i0, i1; + switch (wrapMode) { + case GL_CLAMP: + /* Not exactly what the spec says, but it matches NVIDIA output */ + fcol = CLAMP(coord - 0.5F, 0.0F, max - 1); + i0 = IFLOOR(fcol); + i1 = i0 + 1; + break; + case GL_CLAMP_TO_EDGE: + fcol = CLAMP(coord, 0.5F, max - 0.5F); + fcol -= 0.5F; + i0 = IFLOOR(fcol); + i1 = i0 + 1; + if (i1 > max - 1) + i1 = max - 1; + break; + case GL_CLAMP_TO_BORDER: + fcol = CLAMP(coord, -0.5F, max + 0.5F); + fcol -= 0.5F; + i0 = IFLOOR(fcol); + i1 = i0 + 1; + break; + default: + _mesa_problem(NULL, "bad wrapMode in clamp_rect_coord_linear"); + i0 = i1 = 0; + fcol = 0.0F; + } + *i0out = i0; + *i1out = i1; + *weight = FRAC(fcol); +} + + +/** + * Compute slice/image to use for 1D or 2D array texture. + */ +static INLINE GLint +tex_array_slice(GLfloat coord, GLsizei size) +{ + GLint slice = IFLOOR(coord + 0.5f); + slice = CLAMP(slice, 0, size - 1); + return slice; +} + + +/** + * Compute nearest integer texcoords for given texobj and coordinate. + * NOTE: only used for depth texture sampling. + */ +static INLINE void +nearest_texcoord(const struct gl_texture_object *texObj, + GLuint level, + const GLfloat texcoord[4], + GLint *i, GLint *j, GLint *k) +{ + const struct gl_texture_image *img = texObj->Image[0][level]; + const GLint width = img->Width; + const GLint height = img->Height; + const GLint depth = img->Depth; + + switch (texObj->Target) { + case GL_TEXTURE_RECTANGLE_ARB: + *i = clamp_rect_coord_nearest(texObj->Sampler.WrapS, texcoord[0], width); + *j = clamp_rect_coord_nearest(texObj->Sampler.WrapT, texcoord[1], height); + *k = 0; + break; + case GL_TEXTURE_1D: + *i = nearest_texel_location(texObj->Sampler.WrapS, img, width, texcoord[0]); + *j = 0; + *k = 0; + break; + case GL_TEXTURE_2D: + *i = nearest_texel_location(texObj->Sampler.WrapS, img, width, texcoord[0]); + *j = nearest_texel_location(texObj->Sampler.WrapT, img, height, texcoord[1]); + *k = 0; + break; + case GL_TEXTURE_1D_ARRAY_EXT: + *i = nearest_texel_location(texObj->Sampler.WrapS, img, width, texcoord[0]); + *j = tex_array_slice(texcoord[1], height); + *k = 0; + break; + case GL_TEXTURE_2D_ARRAY_EXT: + *i = nearest_texel_location(texObj->Sampler.WrapS, img, width, texcoord[0]); + *j = nearest_texel_location(texObj->Sampler.WrapT, img, height, texcoord[1]); + *k = tex_array_slice(texcoord[2], depth); + break; + default: + *i = *j = *k = 0; + } +} + + +/** + * Compute linear integer texcoords for given texobj and coordinate. + * NOTE: only used for depth texture sampling. + */ +static INLINE void +linear_texcoord(const struct gl_texture_object *texObj, + GLuint level, + const GLfloat texcoord[4], + GLint *i0, GLint *i1, GLint *j0, GLint *j1, GLint *slice, + GLfloat *wi, GLfloat *wj) +{ + const struct gl_texture_image *img = texObj->Image[0][level]; + const GLint width = img->Width; + const GLint height = img->Height; + const GLint depth = img->Depth; + + switch (texObj->Target) { + case GL_TEXTURE_RECTANGLE_ARB: + clamp_rect_coord_linear(texObj->Sampler.WrapS, texcoord[0], + width, i0, i1, wi); + clamp_rect_coord_linear(texObj->Sampler.WrapT, texcoord[1], + height, j0, j1, wj); + *slice = 0; + break; + + case GL_TEXTURE_1D: + case GL_TEXTURE_2D: + linear_texel_locations(texObj->Sampler.WrapS, img, width, + texcoord[0], i0, i1, wi); + linear_texel_locations(texObj->Sampler.WrapT, img, height, + texcoord[1], j0, j1, wj); + *slice = 0; + break; + + case GL_TEXTURE_1D_ARRAY_EXT: + linear_texel_locations(texObj->Sampler.WrapS, img, width, + texcoord[0], i0, i1, wi); + *j0 = tex_array_slice(texcoord[1], height); + *j1 = *j0; + *slice = 0; + break; + + case GL_TEXTURE_2D_ARRAY_EXT: + linear_texel_locations(texObj->Sampler.WrapS, img, width, + texcoord[0], i0, i1, wi); + linear_texel_locations(texObj->Sampler.WrapT, img, height, + texcoord[1], j0, j1, wj); + *slice = tex_array_slice(texcoord[2], depth); + break; + + default: + *slice = 0; + } +} + + + +/** + * For linear interpolation between mipmap levels N and N+1, this function + * computes N. + */ +static INLINE GLint +linear_mipmap_level(const struct gl_texture_object *tObj, GLfloat lambda) +{ + if (lambda < 0.0F) + return tObj->BaseLevel; + else if (lambda > tObj->_MaxLambda) + return (GLint) (tObj->BaseLevel + tObj->_MaxLambda); + else + return (GLint) (tObj->BaseLevel + lambda); +} + + +/** + * Compute the nearest mipmap level to take texels from. + */ +static INLINE GLint +nearest_mipmap_level(const struct gl_texture_object *tObj, GLfloat lambda) +{ + GLfloat l; + GLint level; + if (lambda <= 0.5F) + l = 0.0F; + else if (lambda > tObj->_MaxLambda + 0.4999F) + l = tObj->_MaxLambda + 0.4999F; + else + l = lambda; + level = (GLint) (tObj->BaseLevel + l + 0.5F); + if (level > tObj->_MaxLevel) + level = tObj->_MaxLevel; + return level; +} + + + +/* + * Bitflags for texture border color sampling. + */ +#define I0BIT 1 +#define I1BIT 2 +#define J0BIT 4 +#define J1BIT 8 +#define K0BIT 16 +#define K1BIT 32 + + + +/** + * The lambda[] array values are always monotonic. Either the whole span + * will be minified, magnified, or split between the two. This function + * determines the subranges in [0, n-1] that are to be minified or magnified. + */ +static INLINE void +compute_min_mag_ranges(const struct gl_texture_object *tObj, + GLuint n, const GLfloat lambda[], + GLuint *minStart, GLuint *minEnd, + GLuint *magStart, GLuint *magEnd) +{ + GLfloat minMagThresh; + + /* we shouldn't be here if minfilter == magfilter */ + ASSERT(tObj->Sampler.MinFilter != tObj->Sampler.MagFilter); + + /* This bit comes from the OpenGL spec: */ + if (tObj->Sampler.MagFilter == GL_LINEAR + && (tObj->Sampler.MinFilter == GL_NEAREST_MIPMAP_NEAREST || + tObj->Sampler.MinFilter == GL_NEAREST_MIPMAP_LINEAR)) { + minMagThresh = 0.5F; + } + else { + minMagThresh = 0.0F; + } + +#if 0 + /* DEBUG CODE: Verify that lambda[] is monotonic. + * We can't really use this because the inaccuracy in the LOG2 function + * causes this test to fail, yet the resulting texturing is correct. + */ + if (n > 1) { + GLuint i; + printf("lambda delta = %g\n", lambda[0] - lambda[n-1]); + if (lambda[0] >= lambda[n-1]) { /* decreasing */ + for (i = 0; i < n - 1; i++) { + ASSERT((GLint) (lambda[i] * 10) >= (GLint) (lambda[i+1] * 10)); + } + } + else { /* increasing */ + for (i = 0; i < n - 1; i++) { + ASSERT((GLint) (lambda[i] * 10) <= (GLint) (lambda[i+1] * 10)); + } + } + } +#endif /* DEBUG */ + + if (lambda[0] <= minMagThresh && (n <= 1 || lambda[n-1] <= minMagThresh)) { + /* magnification for whole span */ + *magStart = 0; + *magEnd = n; + *minStart = *minEnd = 0; + } + else if (lambda[0] > minMagThresh && (n <=1 || lambda[n-1] > minMagThresh)) { + /* minification for whole span */ + *minStart = 0; + *minEnd = n; + *magStart = *magEnd = 0; + } + else { + /* a mix of minification and magnification */ + GLuint i; + if (lambda[0] > minMagThresh) { + /* start with minification */ + for (i = 1; i < n; i++) { + if (lambda[i] <= minMagThresh) + break; + } + *minStart = 0; + *minEnd = i; + *magStart = i; + *magEnd = n; + } + else { + /* start with magnification */ + for (i = 1; i < n; i++) { + if (lambda[i] > minMagThresh) + break; + } + *magStart = 0; + *magEnd = i; + *minStart = i; + *minEnd = n; + } + } + +#if 0 + /* Verify the min/mag Start/End values + * We don't use this either (see above) + */ + { + GLint i; + for (i = 0; i < n; i++) { + if (lambda[i] > minMagThresh) { + /* minification */ + ASSERT(i >= *minStart); + ASSERT(i < *minEnd); + } + else { + /* magnification */ + ASSERT(i >= *magStart); + ASSERT(i < *magEnd); + } + } + } +#endif +} + + +/** + * When we sample the border color, it must be interpreted according to + * the base texture format. Ex: if the texture base format it GL_ALPHA, + * we return (0,0,0,BorderAlpha). + */ +static INLINE void +get_border_color(const struct gl_texture_object *tObj, + const struct gl_texture_image *img, + GLfloat rgba[4]) +{ + switch (img->_BaseFormat) { + case GL_RGB: + rgba[0] = tObj->Sampler.BorderColor.f[0]; + rgba[1] = tObj->Sampler.BorderColor.f[1]; + rgba[2] = tObj->Sampler.BorderColor.f[2]; + rgba[3] = 1.0F; + break; + case GL_ALPHA: + rgba[0] = rgba[1] = rgba[2] = 0.0; + rgba[3] = tObj->Sampler.BorderColor.f[3]; + break; + case GL_LUMINANCE: + rgba[0] = rgba[1] = rgba[2] = tObj->Sampler.BorderColor.f[0]; + rgba[3] = 1.0; + break; + case GL_LUMINANCE_ALPHA: + rgba[0] = rgba[1] = rgba[2] = tObj->Sampler.BorderColor.f[0]; + rgba[3] = tObj->Sampler.BorderColor.f[3]; + break; + case GL_INTENSITY: + rgba[0] = rgba[1] = rgba[2] = rgba[3] = tObj->Sampler.BorderColor.f[0]; + break; + default: + COPY_4V(rgba, tObj->Sampler.BorderColor.f); + } +} + + +/**********************************************************************/ +/* 1-D Texture Sampling Functions */ +/**********************************************************************/ + +/** + * Return the texture sample for coordinate (s) using GL_NEAREST filter. + */ +static INLINE void +sample_1d_nearest(struct gl_context *ctx, + const struct gl_texture_object *tObj, + const struct gl_texture_image *img, + const GLfloat texcoord[4], GLfloat rgba[4]) +{ + const GLint width = img->Width2; /* without border, power of two */ + GLint i; + i = nearest_texel_location(tObj->Sampler.WrapS, img, width, texcoord[0]); + /* skip over the border, if any */ + i += img->Border; + if (i < 0 || i >= (GLint) img->Width) { + /* Need this test for GL_CLAMP_TO_BORDER mode */ + get_border_color(tObj, img, rgba); + } + else { + img->FetchTexelf(img, i, 0, 0, rgba); + } +} + + +/** + * Return the texture sample for coordinate (s) using GL_LINEAR filter. + */ +static INLINE void +sample_1d_linear(struct gl_context *ctx, + const struct gl_texture_object *tObj, + const struct gl_texture_image *img, + const GLfloat texcoord[4], GLfloat rgba[4]) +{ + const GLint width = img->Width2; + GLint i0, i1; + GLbitfield useBorderColor = 0x0; + GLfloat a; + GLfloat t0[4], t1[4]; /* texels */ + + linear_texel_locations(tObj->Sampler.WrapS, img, width, texcoord[0], &i0, &i1, &a); + + if (img->Border) { + i0 += img->Border; + i1 += img->Border; + } + else { + if (i0 < 0 || i0 >= width) useBorderColor |= I0BIT; + if (i1 < 0 || i1 >= width) useBorderColor |= I1BIT; + } + + /* fetch texel colors */ + if (useBorderColor & I0BIT) { + get_border_color(tObj, img, t0); + } + else { + img->FetchTexelf(img, i0, 0, 0, t0); + } + if (useBorderColor & I1BIT) { + get_border_color(tObj, img, t1); + } + else { + img->FetchTexelf(img, i1, 0, 0, t1); + } + + lerp_rgba(rgba, a, t0, t1); +} + + +static void +sample_1d_nearest_mipmap_nearest(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + ASSERT(lambda != NULL); + for (i = 0; i < n; i++) { + GLint level = nearest_mipmap_level(tObj, lambda[i]); + sample_1d_nearest(ctx, tObj, tObj->Image[0][level], texcoord[i], rgba[i]); + } +} + + +static void +sample_1d_linear_mipmap_nearest(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + ASSERT(lambda != NULL); + for (i = 0; i < n; i++) { + GLint level = nearest_mipmap_level(tObj, lambda[i]); + sample_1d_linear(ctx, tObj, tObj->Image[0][level], texcoord[i], rgba[i]); + } +} + + +static void +sample_1d_nearest_mipmap_linear(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + ASSERT(lambda != NULL); + for (i = 0; i < n; i++) { + GLint level = linear_mipmap_level(tObj, lambda[i]); + if (level >= tObj->_MaxLevel) { + sample_1d_nearest(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], + texcoord[i], rgba[i]); + } + else { + GLfloat t0[4], t1[4]; + const GLfloat f = FRAC(lambda[i]); + sample_1d_nearest(ctx, tObj, tObj->Image[0][level ], texcoord[i], t0); + sample_1d_nearest(ctx, tObj, tObj->Image[0][level+1], texcoord[i], t1); + lerp_rgba(rgba[i], f, t0, t1); + } + } +} + + +static void +sample_1d_linear_mipmap_linear(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + ASSERT(lambda != NULL); + for (i = 0; i < n; i++) { + GLint level = linear_mipmap_level(tObj, lambda[i]); + if (level >= tObj->_MaxLevel) { + sample_1d_linear(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], + texcoord[i], rgba[i]); + } + else { + GLfloat t0[4], t1[4]; + const GLfloat f = FRAC(lambda[i]); + sample_1d_linear(ctx, tObj, tObj->Image[0][level ], texcoord[i], t0); + sample_1d_linear(ctx, tObj, tObj->Image[0][level+1], texcoord[i], t1); + lerp_rgba(rgba[i], f, t0, t1); + } + } +} + + +/** Sample 1D texture, nearest filtering for both min/magnification */ +static void +sample_nearest_1d( struct gl_context *ctx, + const struct gl_texture_object *tObj, GLuint n, + const GLfloat texcoords[][4], const GLfloat lambda[], + GLfloat rgba[][4] ) +{ + GLuint i; + struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel]; + (void) lambda; + for (i = 0; i < n; i++) { + sample_1d_nearest(ctx, tObj, image, texcoords[i], rgba[i]); + } +} + + +/** Sample 1D texture, linear filtering for both min/magnification */ +static void +sample_linear_1d( struct gl_context *ctx, + const struct gl_texture_object *tObj, GLuint n, + const GLfloat texcoords[][4], const GLfloat lambda[], + GLfloat rgba[][4] ) +{ + GLuint i; + struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel]; + (void) lambda; + for (i = 0; i < n; i++) { + sample_1d_linear(ctx, tObj, image, texcoords[i], rgba[i]); + } +} + + +/** Sample 1D texture, using lambda to choose between min/magnification */ +static void +sample_lambda_1d( struct gl_context *ctx, + const struct gl_texture_object *tObj, GLuint n, + const GLfloat texcoords[][4], + const GLfloat lambda[], GLfloat rgba[][4] ) +{ + GLuint minStart, minEnd; /* texels with minification */ + GLuint magStart, magEnd; /* texels with magnification */ + GLuint i; + + ASSERT(lambda != NULL); + compute_min_mag_ranges(tObj, n, lambda, + &minStart, &minEnd, &magStart, &magEnd); + + if (minStart < minEnd) { + /* do the minified texels */ + const GLuint m = minEnd - minStart; + switch (tObj->Sampler.MinFilter) { + case GL_NEAREST: + for (i = minStart; i < minEnd; i++) + sample_1d_nearest(ctx, tObj, tObj->Image[0][tObj->BaseLevel], + texcoords[i], rgba[i]); + break; + case GL_LINEAR: + for (i = minStart; i < minEnd; i++) + sample_1d_linear(ctx, tObj, tObj->Image[0][tObj->BaseLevel], + texcoords[i], rgba[i]); + break; + case GL_NEAREST_MIPMAP_NEAREST: + sample_1d_nearest_mipmap_nearest(ctx, tObj, m, texcoords + minStart, + lambda + minStart, rgba + minStart); + break; + case GL_LINEAR_MIPMAP_NEAREST: + sample_1d_linear_mipmap_nearest(ctx, tObj, m, texcoords + minStart, + lambda + minStart, rgba + minStart); + break; + case GL_NEAREST_MIPMAP_LINEAR: + sample_1d_nearest_mipmap_linear(ctx, tObj, m, texcoords + minStart, + lambda + minStart, rgba + minStart); + break; + case GL_LINEAR_MIPMAP_LINEAR: + sample_1d_linear_mipmap_linear(ctx, tObj, m, texcoords + minStart, + lambda + minStart, rgba + minStart); + break; + default: + _mesa_problem(ctx, "Bad min filter in sample_1d_texture"); + return; + } + } + + if (magStart < magEnd) { + /* do the magnified texels */ + switch (tObj->Sampler.MagFilter) { + case GL_NEAREST: + for (i = magStart; i < magEnd; i++) + sample_1d_nearest(ctx, tObj, tObj->Image[0][tObj->BaseLevel], + texcoords[i], rgba[i]); + break; + case GL_LINEAR: + for (i = magStart; i < magEnd; i++) + sample_1d_linear(ctx, tObj, tObj->Image[0][tObj->BaseLevel], + texcoords[i], rgba[i]); + break; + default: + _mesa_problem(ctx, "Bad mag filter in sample_1d_texture"); + return; + } + } +} + + +/**********************************************************************/ +/* 2-D Texture Sampling Functions */ +/**********************************************************************/ + + +/** + * Return the texture sample for coordinate (s,t) using GL_NEAREST filter. + */ +static INLINE void +sample_2d_nearest(struct gl_context *ctx, + const struct gl_texture_object *tObj, + const struct gl_texture_image *img, + const GLfloat texcoord[4], + GLfloat rgba[]) +{ + const GLint width = img->Width2; /* without border, power of two */ + const GLint height = img->Height2; /* without border, power of two */ + GLint i, j; + (void) ctx; + + i = nearest_texel_location(tObj->Sampler.WrapS, img, width, texcoord[0]); + j = nearest_texel_location(tObj->Sampler.WrapT, img, height, texcoord[1]); + + /* skip over the border, if any */ + i += img->Border; + j += img->Border; + + if (i < 0 || i >= (GLint) img->Width || j < 0 || j >= (GLint) img->Height) { + /* Need this test for GL_CLAMP_TO_BORDER mode */ + get_border_color(tObj, img, rgba); + } + else { + img->FetchTexelf(img, i, j, 0, rgba); + } +} + + +/** + * Return the texture sample for coordinate (s,t) using GL_LINEAR filter. + * New sampling code contributed by Lynn Quam . + */ +static INLINE void +sample_2d_linear(struct gl_context *ctx, + const struct gl_texture_object *tObj, + const struct gl_texture_image *img, + const GLfloat texcoord[4], + GLfloat rgba[]) +{ + const GLint width = img->Width2; + const GLint height = img->Height2; + GLint i0, j0, i1, j1; + GLbitfield useBorderColor = 0x0; + GLfloat a, b; + GLfloat t00[4], t10[4], t01[4], t11[4]; /* sampled texel colors */ + + linear_texel_locations(tObj->Sampler.WrapS, img, width, texcoord[0], &i0, &i1, &a); + linear_texel_locations(tObj->Sampler.WrapT, img, height, texcoord[1], &j0, &j1, &b); + + if (img->Border) { + i0 += img->Border; + i1 += img->Border; + j0 += img->Border; + j1 += img->Border; + } + else { + if (i0 < 0 || i0 >= width) useBorderColor |= I0BIT; + if (i1 < 0 || i1 >= width) useBorderColor |= I1BIT; + if (j0 < 0 || j0 >= height) useBorderColor |= J0BIT; + if (j1 < 0 || j1 >= height) useBorderColor |= J1BIT; + } + + /* fetch four texel colors */ + if (useBorderColor & (I0BIT | J0BIT)) { + get_border_color(tObj, img, t00); + } + else { + img->FetchTexelf(img, i0, j0, 0, t00); + } + if (useBorderColor & (I1BIT | J0BIT)) { + get_border_color(tObj, img, t10); + } + else { + img->FetchTexelf(img, i1, j0, 0, t10); + } + if (useBorderColor & (I0BIT | J1BIT)) { + get_border_color(tObj, img, t01); + } + else { + img->FetchTexelf(img, i0, j1, 0, t01); + } + if (useBorderColor & (I1BIT | J1BIT)) { + get_border_color(tObj, img, t11); + } + else { + img->FetchTexelf(img, i1, j1, 0, t11); + } + + lerp_rgba_2d(rgba, a, b, t00, t10, t01, t11); +} + + +/** + * As above, but we know WRAP_S == REPEAT and WRAP_T == REPEAT. + * We don't have to worry about the texture border. + */ +static INLINE void +sample_2d_linear_repeat(struct gl_context *ctx, + const struct gl_texture_object *tObj, + const struct gl_texture_image *img, + const GLfloat texcoord[4], + GLfloat rgba[]) +{ + const GLint width = img->Width2; + const GLint height = img->Height2; + GLint i0, j0, i1, j1; + GLfloat wi, wj; + GLfloat t00[4], t10[4], t01[4], t11[4]; /* sampled texel colors */ + + (void) ctx; + + ASSERT(tObj->Sampler.WrapS == GL_REPEAT); + ASSERT(tObj->Sampler.WrapT == GL_REPEAT); + ASSERT(img->Border == 0); + ASSERT(img->_BaseFormat != GL_COLOR_INDEX); + ASSERT(img->_IsPowerOfTwo); + + linear_repeat_texel_location(width, texcoord[0], &i0, &i1, &wi); + linear_repeat_texel_location(height, texcoord[1], &j0, &j1, &wj); + + img->FetchTexelf(img, i0, j0, 0, t00); + img->FetchTexelf(img, i1, j0, 0, t10); + img->FetchTexelf(img, i0, j1, 0, t01); + img->FetchTexelf(img, i1, j1, 0, t11); + + lerp_rgba_2d(rgba, wi, wj, t00, t10, t01, t11); +} + + +static void +sample_2d_nearest_mipmap_nearest(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + for (i = 0; i < n; i++) { + GLint level = nearest_mipmap_level(tObj, lambda[i]); + sample_2d_nearest(ctx, tObj, tObj->Image[0][level], texcoord[i], rgba[i]); + } +} + + +static void +sample_2d_linear_mipmap_nearest(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + ASSERT(lambda != NULL); + for (i = 0; i < n; i++) { + GLint level = nearest_mipmap_level(tObj, lambda[i]); + sample_2d_linear(ctx, tObj, tObj->Image[0][level], texcoord[i], rgba[i]); + } +} + + +static void +sample_2d_nearest_mipmap_linear(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + ASSERT(lambda != NULL); + for (i = 0; i < n; i++) { + GLint level = linear_mipmap_level(tObj, lambda[i]); + if (level >= tObj->_MaxLevel) { + sample_2d_nearest(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], + texcoord[i], rgba[i]); + } + else { + GLfloat t0[4], t1[4]; /* texels */ + const GLfloat f = FRAC(lambda[i]); + sample_2d_nearest(ctx, tObj, tObj->Image[0][level ], texcoord[i], t0); + sample_2d_nearest(ctx, tObj, tObj->Image[0][level+1], texcoord[i], t1); + lerp_rgba(rgba[i], f, t0, t1); + } + } +} + + +static void +sample_2d_linear_mipmap_linear( struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4] ) +{ + GLuint i; + ASSERT(lambda != NULL); + for (i = 0; i < n; i++) { + GLint level = linear_mipmap_level(tObj, lambda[i]); + if (level >= tObj->_MaxLevel) { + sample_2d_linear(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], + texcoord[i], rgba[i]); + } + else { + GLfloat t0[4], t1[4]; /* texels */ + const GLfloat f = FRAC(lambda[i]); + sample_2d_linear(ctx, tObj, tObj->Image[0][level ], texcoord[i], t0); + sample_2d_linear(ctx, tObj, tObj->Image[0][level+1], texcoord[i], t1); + lerp_rgba(rgba[i], f, t0, t1); + } + } +} + + +static void +sample_2d_linear_mipmap_linear_repeat(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + ASSERT(lambda != NULL); + ASSERT(tObj->Sampler.WrapS == GL_REPEAT); + ASSERT(tObj->Sampler.WrapT == GL_REPEAT); + for (i = 0; i < n; i++) { + GLint level = linear_mipmap_level(tObj, lambda[i]); + if (level >= tObj->_MaxLevel) { + sample_2d_linear_repeat(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], + texcoord[i], rgba[i]); + } + else { + GLfloat t0[4], t1[4]; /* texels */ + const GLfloat f = FRAC(lambda[i]); + sample_2d_linear_repeat(ctx, tObj, tObj->Image[0][level ], + texcoord[i], t0); + sample_2d_linear_repeat(ctx, tObj, tObj->Image[0][level+1], + texcoord[i], t1); + lerp_rgba(rgba[i], f, t0, t1); + } + } +} + + +/** Sample 2D texture, nearest filtering for both min/magnification */ +static void +sample_nearest_2d(struct gl_context *ctx, + const struct gl_texture_object *tObj, GLuint n, + const GLfloat texcoords[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel]; + (void) lambda; + for (i = 0; i < n; i++) { + sample_2d_nearest(ctx, tObj, image, texcoords[i], rgba[i]); + } +} + + +/** Sample 2D texture, linear filtering for both min/magnification */ +static void +sample_linear_2d(struct gl_context *ctx, + const struct gl_texture_object *tObj, GLuint n, + const GLfloat texcoords[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel]; + (void) lambda; + if (tObj->Sampler.WrapS == GL_REPEAT && + tObj->Sampler.WrapT == GL_REPEAT && + image->_IsPowerOfTwo && + image->Border == 0) { + for (i = 0; i < n; i++) { + sample_2d_linear_repeat(ctx, tObj, image, texcoords[i], rgba[i]); + } + } + else { + for (i = 0; i < n; i++) { + sample_2d_linear(ctx, tObj, image, texcoords[i], rgba[i]); + } + } +} + + +/** + * Optimized 2-D texture sampling: + * S and T wrap mode == GL_REPEAT + * GL_NEAREST min/mag filter + * No border, + * RowStride == Width, + * Format = GL_RGB + */ +static void +opt_sample_rgb_2d(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoords[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + const struct gl_texture_image *img = tObj->Image[0][tObj->BaseLevel]; + const GLfloat width = (GLfloat) img->Width; + const GLfloat height = (GLfloat) img->Height; + const GLint colMask = img->Width - 1; + const GLint rowMask = img->Height - 1; + const GLint shift = img->WidthLog2; + GLuint k; + (void) ctx; + (void) lambda; + ASSERT(tObj->Sampler.WrapS==GL_REPEAT); + ASSERT(tObj->Sampler.WrapT==GL_REPEAT); + ASSERT(img->Border==0); + ASSERT(img->TexFormat == MESA_FORMAT_RGB888); + ASSERT(img->_IsPowerOfTwo); + + for (k=0; kData) + 3*pos; + rgba[k][RCOMP] = UBYTE_TO_FLOAT(texel[2]); + rgba[k][GCOMP] = UBYTE_TO_FLOAT(texel[1]); + rgba[k][BCOMP] = UBYTE_TO_FLOAT(texel[0]); + rgba[k][ACOMP] = 1.0F; + } +} + + +/** + * Optimized 2-D texture sampling: + * S and T wrap mode == GL_REPEAT + * GL_NEAREST min/mag filter + * No border + * RowStride == Width, + * Format = GL_RGBA + */ +static void +opt_sample_rgba_2d(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoords[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + const struct gl_texture_image *img = tObj->Image[0][tObj->BaseLevel]; + const GLfloat width = (GLfloat) img->Width; + const GLfloat height = (GLfloat) img->Height; + const GLint colMask = img->Width - 1; + const GLint rowMask = img->Height - 1; + const GLint shift = img->WidthLog2; + GLuint i; + (void) ctx; + (void) lambda; + ASSERT(tObj->Sampler.WrapS==GL_REPEAT); + ASSERT(tObj->Sampler.WrapT==GL_REPEAT); + ASSERT(img->Border==0); + ASSERT(img->TexFormat == MESA_FORMAT_RGBA8888); + ASSERT(img->_IsPowerOfTwo); + + for (i = 0; i < n; i++) { + const GLint col = IFLOOR(texcoords[i][0] * width) & colMask; + const GLint row = IFLOOR(texcoords[i][1] * height) & rowMask; + const GLint pos = (row << shift) | col; + const GLuint texel = *((GLuint *) img->Data + pos); + rgba[i][RCOMP] = UBYTE_TO_FLOAT( (texel >> 24) ); + rgba[i][GCOMP] = UBYTE_TO_FLOAT( (texel >> 16) & 0xff ); + rgba[i][BCOMP] = UBYTE_TO_FLOAT( (texel >> 8) & 0xff ); + rgba[i][ACOMP] = UBYTE_TO_FLOAT( (texel ) & 0xff ); + } +} + + +/** Sample 2D texture, using lambda to choose between min/magnification */ +static void +sample_lambda_2d(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoords[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + const struct gl_texture_image *tImg = tObj->Image[0][tObj->BaseLevel]; + GLuint minStart, minEnd; /* texels with minification */ + GLuint magStart, magEnd; /* texels with magnification */ + + const GLboolean repeatNoBorderPOT = (tObj->Sampler.WrapS == GL_REPEAT) + && (tObj->Sampler.WrapT == GL_REPEAT) + && (tImg->Border == 0 && (tImg->Width == tImg->RowStride)) + && (tImg->_BaseFormat != GL_COLOR_INDEX) + && tImg->_IsPowerOfTwo; + + ASSERT(lambda != NULL); + compute_min_mag_ranges(tObj, n, lambda, + &minStart, &minEnd, &magStart, &magEnd); + + if (minStart < minEnd) { + /* do the minified texels */ + const GLuint m = minEnd - minStart; + switch (tObj->Sampler.MinFilter) { + case GL_NEAREST: + if (repeatNoBorderPOT) { + switch (tImg->TexFormat) { + case MESA_FORMAT_RGB888: + opt_sample_rgb_2d(ctx, tObj, m, texcoords + minStart, + NULL, rgba + minStart); + break; + case MESA_FORMAT_RGBA8888: + opt_sample_rgba_2d(ctx, tObj, m, texcoords + minStart, + NULL, rgba + minStart); + break; + default: + sample_nearest_2d(ctx, tObj, m, texcoords + minStart, + NULL, rgba + minStart ); + } + } + else { + sample_nearest_2d(ctx, tObj, m, texcoords + minStart, + NULL, rgba + minStart); + } + break; + case GL_LINEAR: + sample_linear_2d(ctx, tObj, m, texcoords + minStart, + NULL, rgba + minStart); + break; + case GL_NEAREST_MIPMAP_NEAREST: + sample_2d_nearest_mipmap_nearest(ctx, tObj, m, + texcoords + minStart, + lambda + minStart, rgba + minStart); + break; + case GL_LINEAR_MIPMAP_NEAREST: + sample_2d_linear_mipmap_nearest(ctx, tObj, m, texcoords + minStart, + lambda + minStart, rgba + minStart); + break; + case GL_NEAREST_MIPMAP_LINEAR: + sample_2d_nearest_mipmap_linear(ctx, tObj, m, texcoords + minStart, + lambda + minStart, rgba + minStart); + break; + case GL_LINEAR_MIPMAP_LINEAR: + if (repeatNoBorderPOT) + sample_2d_linear_mipmap_linear_repeat(ctx, tObj, m, + texcoords + minStart, lambda + minStart, rgba + minStart); + else + sample_2d_linear_mipmap_linear(ctx, tObj, m, texcoords + minStart, + lambda + minStart, rgba + minStart); + break; + default: + _mesa_problem(ctx, "Bad min filter in sample_2d_texture"); + return; + } + } + + if (magStart < magEnd) { + /* do the magnified texels */ + const GLuint m = magEnd - magStart; + + switch (tObj->Sampler.MagFilter) { + case GL_NEAREST: + if (repeatNoBorderPOT) { + switch (tImg->TexFormat) { + case MESA_FORMAT_RGB888: + opt_sample_rgb_2d(ctx, tObj, m, texcoords + magStart, + NULL, rgba + magStart); + break; + case MESA_FORMAT_RGBA8888: + opt_sample_rgba_2d(ctx, tObj, m, texcoords + magStart, + NULL, rgba + magStart); + break; + default: + sample_nearest_2d(ctx, tObj, m, texcoords + magStart, + NULL, rgba + magStart ); + } + } + else { + sample_nearest_2d(ctx, tObj, m, texcoords + magStart, + NULL, rgba + magStart); + } + break; + case GL_LINEAR: + sample_linear_2d(ctx, tObj, m, texcoords + magStart, + NULL, rgba + magStart); + break; + default: + _mesa_problem(ctx, "Bad mag filter in sample_lambda_2d"); + } + } +} + + +/* For anisotropic filtering */ +#define WEIGHT_LUT_SIZE 1024 + +static GLfloat *weightLut = NULL; + +/** + * Creates the look-up table used to speed-up EWA sampling + */ +static void +create_filter_table(void) +{ + GLuint i; + if (!weightLut) { + weightLut = (GLfloat *) malloc(WEIGHT_LUT_SIZE * sizeof(GLfloat)); + + for (i = 0; i < WEIGHT_LUT_SIZE; ++i) { + GLfloat alpha = 2; + GLfloat r2 = (GLfloat) i / (GLfloat) (WEIGHT_LUT_SIZE - 1); + GLfloat weight = (GLfloat) exp(-alpha * r2); + weightLut[i] = weight; + } + } +} + + +/** + * Elliptical weighted average (EWA) filter for producing high quality + * anisotropic filtered results. + * Based on the Higher Quality Elliptical Weighted Avarage Filter + * published by Paul S. Heckbert in his Master's Thesis + * "Fundamentals of Texture Mapping and Image Warping" (1989) + */ +static void +sample_2d_ewa(struct gl_context *ctx, + const struct gl_texture_object *tObj, + const GLfloat texcoord[4], + const GLfloat dudx, const GLfloat dvdx, + const GLfloat dudy, const GLfloat dvdy, const GLint lod, + GLfloat rgba[]) +{ + GLint level = lod > 0 ? lod : 0; + GLfloat scaling = 1.0 / (1 << level); + const struct gl_texture_image *img = tObj->Image[0][level]; + const struct gl_texture_image *mostDetailedImage = + tObj->Image[0][tObj->BaseLevel]; + GLfloat tex_u=-0.5 + texcoord[0] * mostDetailedImage->WidthScale * scaling; + GLfloat tex_v=-0.5 + texcoord[1] * mostDetailedImage->HeightScale * scaling; + + GLfloat ux = dudx * scaling; + GLfloat vx = dvdx * scaling; + GLfloat uy = dudy * scaling; + GLfloat vy = dvdy * scaling; + + /* compute ellipse coefficients to bound the region: + * A*x*x + B*x*y + C*y*y = F. + */ + GLfloat A = vx*vx+vy*vy+1; + GLfloat B = -2*(ux*vx+uy*vy); + GLfloat C = ux*ux+uy*uy+1; + GLfloat F = A*C-B*B/4.0; + + /* check if it is an ellipse */ + /* ASSERT(F > 0.0); */ + + /* Compute the ellipse's (u,v) bounding box in texture space */ + GLfloat d = -B*B+4.0*C*A; + GLfloat box_u = 2.0 / d * sqrt(d*C*F); /* box_u -> half of bbox with */ + GLfloat box_v = 2.0 / d * sqrt(A*d*F); /* box_v -> half of bbox height */ + + GLint u0 = floor(tex_u - box_u); + GLint u1 = ceil (tex_u + box_u); + GLint v0 = floor(tex_v - box_v); + GLint v1 = ceil (tex_v + box_v); + + GLfloat num[4] = {0.0F, 0.0F, 0.0F, 0.0F}; + GLfloat newCoord[2]; + GLfloat den = 0.0F; + GLfloat ddq; + GLfloat U = u0 - tex_u; + GLint v; + + /* Scale ellipse formula to directly index the Filter Lookup Table. + * i.e. scale so that F = WEIGHT_LUT_SIZE-1 + */ + double formScale = (double) (WEIGHT_LUT_SIZE - 1) / F; + A *= formScale; + B *= formScale; + C *= formScale; + /* F *= formScale; */ /* no need to scale F as we don't use it below here */ + + /* Heckbert MS thesis, p. 59; scan over the bounding box of the ellipse + * and incrementally update the value of Ax^2+Bxy*Cy^2; when this + * value, q, is less than F, we're inside the ellipse + */ + ddq = 2 * A; + for (v = v0; v <= v1; ++v) { + GLfloat V = v - tex_v; + GLfloat dq = A * (2 * U + 1) + B * V; + GLfloat q = (C * V + B * U) * V + A * U * U; + + GLint u; + for (u = u0; u <= u1; ++u) { + /* Note that the ellipse has been pre-scaled so F = WEIGHT_LUT_SIZE - 1 */ + if (q < WEIGHT_LUT_SIZE) { + /* as a LUT is used, q must never be negative; + * should not happen, though + */ + const GLint qClamped = q >= 0.0F ? q : 0; + GLfloat weight = weightLut[qClamped]; + + newCoord[0] = u / ((GLfloat) img->Width2); + newCoord[1] = v / ((GLfloat) img->Height2); + + sample_2d_nearest(ctx, tObj, img, newCoord, rgba); + num[0] += weight * rgba[0]; + num[1] += weight * rgba[1]; + num[2] += weight * rgba[2]; + num[3] += weight * rgba[3]; + + den += weight; + } + q += dq; + dq += ddq; + } + } + + if (den <= 0.0F) { + /* Reaching this place would mean + * that no pixels intersected the ellipse. + * This should never happen because + * the filter we use always + * intersects at least one pixel. + */ + + /*rgba[0]=0; + rgba[1]=0; + rgba[2]=0; + rgba[3]=0;*/ + /* not enough pixels in resampling, resort to direct interpolation */ + sample_2d_linear(ctx, tObj, img, texcoord, rgba); + return; + } + + rgba[0] = num[0] / den; + rgba[1] = num[1] / den; + rgba[2] = num[2] / den; + rgba[3] = num[3] / den; +} + + +/** + * Anisotropic filtering using footprint assembly as outlined in the + * EXT_texture_filter_anisotropic spec: + * http://www.opengl.org/registry/specs/EXT/texture_filter_anisotropic.txt + * Faster than EWA but has less quality (more aliasing effects) + */ +static void +sample_2d_footprint(struct gl_context *ctx, + const struct gl_texture_object *tObj, + const GLfloat texcoord[4], + const GLfloat dudx, const GLfloat dvdx, + const GLfloat dudy, const GLfloat dvdy, const GLint lod, + GLfloat rgba[]) +{ + GLint level = lod > 0 ? lod : 0; + GLfloat scaling = 1.0F / (1 << level); + const struct gl_texture_image *img = tObj->Image[0][level]; + + GLfloat ux = dudx * scaling; + GLfloat vx = dvdx * scaling; + GLfloat uy = dudy * scaling; + GLfloat vy = dvdy * scaling; + + GLfloat Px2 = ux * ux + vx * vx; /* squared length of dx */ + GLfloat Py2 = uy * uy + vy * vy; /* squared length of dy */ + + GLint numSamples; + GLfloat ds; + GLfloat dt; + + GLfloat num[4] = {0.0F, 0.0F, 0.0F, 0.0F}; + GLfloat newCoord[2]; + GLint s; + + /* Calculate the per anisotropic sample offsets in s,t space. */ + if (Px2 > Py2) { + numSamples = ceil(SQRTF(Px2)); + ds = ux / ((GLfloat) img->Width2); + dt = vx / ((GLfloat) img->Height2); + } + else { + numSamples = ceil(SQRTF(Py2)); + ds = uy / ((GLfloat) img->Width2); + dt = vy / ((GLfloat) img->Height2); + } + + for (s = 0; sTexture._EnabledCoordUnits > 1) ? ctx->Const.MaxTextureUnits : 1; + GLuint u; + + /* XXX CoordUnits vs. ImageUnits */ + for (u = 0; u < maxUnit; u++) { + if (ctx->Texture.Unit[u]._Current == tObj) + break; /* found */ + } + if (u >= maxUnit) + u = 0; /* not found, use 1st one; should never happen */ + + return u; +} + + +/** + * Sample 2D texture using an anisotropic filter. + * NOTE: the const GLfloat lambda_iso[] parameter does *NOT* contain + * the lambda float array but a "hidden" SWspan struct which is required + * by this function but is not available in the texture_sample_func signature. + * See _swrast_texture_span( struct gl_context *ctx, SWspan *span ) on how + * this function is called. + */ +static void +sample_lambda_2d_aniso(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoords[][4], + const GLfloat lambda_iso[], GLfloat rgba[][4]) +{ + const struct gl_texture_image *tImg = tObj->Image[0][tObj->BaseLevel]; + const GLfloat maxEccentricity = + tObj->Sampler.MaxAnisotropy * tObj->Sampler.MaxAnisotropy; + + /* re-calculate the lambda values so that they are usable with anisotropic + * filtering + */ + SWspan *span = (SWspan *)lambda_iso; /* access the "hidden" SWspan struct */ + + /* based on interpolate_texcoords(struct gl_context *ctx, SWspan *span) + * in swrast/s_span.c + */ + + /* find the texture unit index by looking up the current texture object + * from the context list of available texture objects. + */ + const GLuint u = texture_unit_index(ctx, tObj); + const GLuint attr = FRAG_ATTRIB_TEX0 + u; + GLfloat texW, texH; + + const GLfloat dsdx = span->attrStepX[attr][0]; + const GLfloat dsdy = span->attrStepY[attr][0]; + const GLfloat dtdx = span->attrStepX[attr][1]; + const GLfloat dtdy = span->attrStepY[attr][1]; + const GLfloat dqdx = span->attrStepX[attr][3]; + const GLfloat dqdy = span->attrStepY[attr][3]; + GLfloat s = span->attrStart[attr][0] + span->leftClip * dsdx; + GLfloat t = span->attrStart[attr][1] + span->leftClip * dtdx; + GLfloat q = span->attrStart[attr][3] + span->leftClip * dqdx; + + /* from swrast/s_texcombine.c _swrast_texture_span */ + const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[u]; + const GLboolean adjustLOD = + (texUnit->LodBias + tObj->Sampler.LodBias != 0.0F) + || (tObj->Sampler.MinLod != -1000.0 || tObj->Sampler.MaxLod != 1000.0); + + GLuint i; + + /* on first access create the lookup table containing the filter weights. */ + if (!weightLut) { + create_filter_table(); + } + + texW = tImg->WidthScale; + texH = tImg->HeightScale; + + for (i = 0; i < n; i++) { + const GLfloat invQ = (q == 0.0F) ? 1.0F : (1.0F / q); + + GLfloat dudx = texW * ((s + dsdx) / (q + dqdx) - s * invQ); + GLfloat dvdx = texH * ((t + dtdx) / (q + dqdx) - t * invQ); + GLfloat dudy = texW * ((s + dsdy) / (q + dqdy) - s * invQ); + GLfloat dvdy = texH * ((t + dtdy) / (q + dqdy) - t * invQ); + + /* note: instead of working with Px and Py, we will use the + * squared length instead, to avoid sqrt. + */ + GLfloat Px2 = dudx * dudx + dvdx * dvdx; + GLfloat Py2 = dudy * dudy + dvdy * dvdy; + + GLfloat Pmax2; + GLfloat Pmin2; + GLfloat e; + GLfloat lod; + + s += dsdx; + t += dtdx; + q += dqdx; + + if (Px2 < Py2) { + Pmax2 = Py2; + Pmin2 = Px2; + } + else { + Pmax2 = Px2; + Pmin2 = Py2; + } + + /* if the eccentricity of the ellipse is too big, scale up the shorter + * of the two vectors to limit the maximum amount of work per pixel + */ + e = Pmax2 / Pmin2; + if (e > maxEccentricity) { + /* GLfloat s=e / maxEccentricity; + minor[0] *= s; + minor[1] *= s; + Pmin2 *= s; */ + Pmin2 = Pmax2 / maxEccentricity; + } + + /* note: we need to have Pmin=sqrt(Pmin2) here, but we can avoid + * this since 0.5*log(x) = log(sqrt(x)) + */ + lod = 0.5 * LOG2(Pmin2); + + if (adjustLOD) { + /* from swrast/s_texcombine.c _swrast_texture_span */ + if (texUnit->LodBias + tObj->Sampler.LodBias != 0.0F) { + /* apply LOD bias, but don't clamp yet */ + const GLfloat bias = + CLAMP(texUnit->LodBias + tObj->Sampler.LodBias, + -ctx->Const.MaxTextureLodBias, + ctx->Const.MaxTextureLodBias); + lod += bias; + + if (tObj->Sampler.MinLod != -1000.0 || + tObj->Sampler.MaxLod != 1000.0) { + /* apply LOD clamping to lambda */ + lod = CLAMP(lod, tObj->Sampler.MinLod, tObj->Sampler.MaxLod); + } + } + } + + /* If the ellipse covers the whole image, we can + * simply return the average of the whole image. + */ + if (lod >= tObj->_MaxLevel) { + sample_2d_linear(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], + texcoords[i], rgba[i]); + } + else { + /* don't bother interpolating between multiple LODs; it doesn't + * seem to be worth the extra running time. + */ + sample_2d_ewa(ctx, tObj, texcoords[i], + dudx, dvdx, dudy, dvdy, floor(lod), rgba[i]); + + /* unused: */ + (void) sample_2d_footprint; + /* + sample_2d_footprint(ctx, tObj, texcoords[i], + dudx, dvdx, dudy, dvdy, floor(lod), rgba[i]); + */ + } + } +} + + + +/**********************************************************************/ +/* 3-D Texture Sampling Functions */ +/**********************************************************************/ + +/** + * Return the texture sample for coordinate (s,t,r) using GL_NEAREST filter. + */ +static INLINE void +sample_3d_nearest(struct gl_context *ctx, + const struct gl_texture_object *tObj, + const struct gl_texture_image *img, + const GLfloat texcoord[4], + GLfloat rgba[4]) +{ + const GLint width = img->Width2; /* without border, power of two */ + const GLint height = img->Height2; /* without border, power of two */ + const GLint depth = img->Depth2; /* without border, power of two */ + GLint i, j, k; + (void) ctx; + + i = nearest_texel_location(tObj->Sampler.WrapS, img, width, texcoord[0]); + j = nearest_texel_location(tObj->Sampler.WrapT, img, height, texcoord[1]); + k = nearest_texel_location(tObj->Sampler.WrapR, img, depth, texcoord[2]); + + if (i < 0 || i >= (GLint) img->Width || + j < 0 || j >= (GLint) img->Height || + k < 0 || k >= (GLint) img->Depth) { + /* Need this test for GL_CLAMP_TO_BORDER mode */ + get_border_color(tObj, img, rgba); + } + else { + img->FetchTexelf(img, i, j, k, rgba); + } +} + + +/** + * Return the texture sample for coordinate (s,t,r) using GL_LINEAR filter. + */ +static void +sample_3d_linear(struct gl_context *ctx, + const struct gl_texture_object *tObj, + const struct gl_texture_image *img, + const GLfloat texcoord[4], + GLfloat rgba[4]) +{ + const GLint width = img->Width2; + const GLint height = img->Height2; + const GLint depth = img->Depth2; + GLint i0, j0, k0, i1, j1, k1; + GLbitfield useBorderColor = 0x0; + GLfloat a, b, c; + GLfloat t000[4], t010[4], t001[4], t011[4]; + GLfloat t100[4], t110[4], t101[4], t111[4]; + + linear_texel_locations(tObj->Sampler.WrapS, img, width, texcoord[0], &i0, &i1, &a); + linear_texel_locations(tObj->Sampler.WrapT, img, height, texcoord[1], &j0, &j1, &b); + linear_texel_locations(tObj->Sampler.WrapR, img, depth, texcoord[2], &k0, &k1, &c); + + if (img->Border) { + i0 += img->Border; + i1 += img->Border; + j0 += img->Border; + j1 += img->Border; + k0 += img->Border; + k1 += img->Border; + } + else { + /* check if sampling texture border color */ + if (i0 < 0 || i0 >= width) useBorderColor |= I0BIT; + if (i1 < 0 || i1 >= width) useBorderColor |= I1BIT; + if (j0 < 0 || j0 >= height) useBorderColor |= J0BIT; + if (j1 < 0 || j1 >= height) useBorderColor |= J1BIT; + if (k0 < 0 || k0 >= depth) useBorderColor |= K0BIT; + if (k1 < 0 || k1 >= depth) useBorderColor |= K1BIT; + } + + /* Fetch texels */ + if (useBorderColor & (I0BIT | J0BIT | K0BIT)) { + get_border_color(tObj, img, t000); + } + else { + img->FetchTexelf(img, i0, j0, k0, t000); + } + if (useBorderColor & (I1BIT | J0BIT | K0BIT)) { + get_border_color(tObj, img, t100); + } + else { + img->FetchTexelf(img, i1, j0, k0, t100); + } + if (useBorderColor & (I0BIT | J1BIT | K0BIT)) { + get_border_color(tObj, img, t010); + } + else { + img->FetchTexelf(img, i0, j1, k0, t010); + } + if (useBorderColor & (I1BIT | J1BIT | K0BIT)) { + get_border_color(tObj, img, t110); + } + else { + img->FetchTexelf(img, i1, j1, k0, t110); + } + + if (useBorderColor & (I0BIT | J0BIT | K1BIT)) { + get_border_color(tObj, img, t001); + } + else { + img->FetchTexelf(img, i0, j0, k1, t001); + } + if (useBorderColor & (I1BIT | J0BIT | K1BIT)) { + get_border_color(tObj, img, t101); + } + else { + img->FetchTexelf(img, i1, j0, k1, t101); + } + if (useBorderColor & (I0BIT | J1BIT | K1BIT)) { + get_border_color(tObj, img, t011); + } + else { + img->FetchTexelf(img, i0, j1, k1, t011); + } + if (useBorderColor & (I1BIT | J1BIT | K1BIT)) { + get_border_color(tObj, img, t111); + } + else { + img->FetchTexelf(img, i1, j1, k1, t111); + } + + /* trilinear interpolation of samples */ + lerp_rgba_3d(rgba, a, b, c, t000, t100, t010, t110, t001, t101, t011, t111); +} + + +static void +sample_3d_nearest_mipmap_nearest(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4] ) +{ + GLuint i; + for (i = 0; i < n; i++) { + GLint level = nearest_mipmap_level(tObj, lambda[i]); + sample_3d_nearest(ctx, tObj, tObj->Image[0][level], texcoord[i], rgba[i]); + } +} + + +static void +sample_3d_linear_mipmap_nearest(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + ASSERT(lambda != NULL); + for (i = 0; i < n; i++) { + GLint level = nearest_mipmap_level(tObj, lambda[i]); + sample_3d_linear(ctx, tObj, tObj->Image[0][level], texcoord[i], rgba[i]); + } +} + + +static void +sample_3d_nearest_mipmap_linear(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + ASSERT(lambda != NULL); + for (i = 0; i < n; i++) { + GLint level = linear_mipmap_level(tObj, lambda[i]); + if (level >= tObj->_MaxLevel) { + sample_3d_nearest(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], + texcoord[i], rgba[i]); + } + else { + GLfloat t0[4], t1[4]; /* texels */ + const GLfloat f = FRAC(lambda[i]); + sample_3d_nearest(ctx, tObj, tObj->Image[0][level ], texcoord[i], t0); + sample_3d_nearest(ctx, tObj, tObj->Image[0][level+1], texcoord[i], t1); + lerp_rgba(rgba[i], f, t0, t1); + } + } +} + + +static void +sample_3d_linear_mipmap_linear(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + ASSERT(lambda != NULL); + for (i = 0; i < n; i++) { + GLint level = linear_mipmap_level(tObj, lambda[i]); + if (level >= tObj->_MaxLevel) { + sample_3d_linear(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], + texcoord[i], rgba[i]); + } + else { + GLfloat t0[4], t1[4]; /* texels */ + const GLfloat f = FRAC(lambda[i]); + sample_3d_linear(ctx, tObj, tObj->Image[0][level ], texcoord[i], t0); + sample_3d_linear(ctx, tObj, tObj->Image[0][level+1], texcoord[i], t1); + lerp_rgba(rgba[i], f, t0, t1); + } + } +} + + +/** Sample 3D texture, nearest filtering for both min/magnification */ +static void +sample_nearest_3d(struct gl_context *ctx, + const struct gl_texture_object *tObj, GLuint n, + const GLfloat texcoords[][4], const GLfloat lambda[], + GLfloat rgba[][4]) +{ + GLuint i; + struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel]; + (void) lambda; + for (i = 0; i < n; i++) { + sample_3d_nearest(ctx, tObj, image, texcoords[i], rgba[i]); + } +} + + +/** Sample 3D texture, linear filtering for both min/magnification */ +static void +sample_linear_3d(struct gl_context *ctx, + const struct gl_texture_object *tObj, GLuint n, + const GLfloat texcoords[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel]; + (void) lambda; + for (i = 0; i < n; i++) { + sample_3d_linear(ctx, tObj, image, texcoords[i], rgba[i]); + } +} + + +/** Sample 3D texture, using lambda to choose between min/magnification */ +static void +sample_lambda_3d(struct gl_context *ctx, + const struct gl_texture_object *tObj, GLuint n, + const GLfloat texcoords[][4], const GLfloat lambda[], + GLfloat rgba[][4]) +{ + GLuint minStart, minEnd; /* texels with minification */ + GLuint magStart, magEnd; /* texels with magnification */ + GLuint i; + + ASSERT(lambda != NULL); + compute_min_mag_ranges(tObj, n, lambda, + &minStart, &minEnd, &magStart, &magEnd); + + if (minStart < minEnd) { + /* do the minified texels */ + GLuint m = minEnd - minStart; + switch (tObj->Sampler.MinFilter) { + case GL_NEAREST: + for (i = minStart; i < minEnd; i++) + sample_3d_nearest(ctx, tObj, tObj->Image[0][tObj->BaseLevel], + texcoords[i], rgba[i]); + break; + case GL_LINEAR: + for (i = minStart; i < minEnd; i++) + sample_3d_linear(ctx, tObj, tObj->Image[0][tObj->BaseLevel], + texcoords[i], rgba[i]); + break; + case GL_NEAREST_MIPMAP_NEAREST: + sample_3d_nearest_mipmap_nearest(ctx, tObj, m, texcoords + minStart, + lambda + minStart, rgba + minStart); + break; + case GL_LINEAR_MIPMAP_NEAREST: + sample_3d_linear_mipmap_nearest(ctx, tObj, m, texcoords + minStart, + lambda + minStart, rgba + minStart); + break; + case GL_NEAREST_MIPMAP_LINEAR: + sample_3d_nearest_mipmap_linear(ctx, tObj, m, texcoords + minStart, + lambda + minStart, rgba + minStart); + break; + case GL_LINEAR_MIPMAP_LINEAR: + sample_3d_linear_mipmap_linear(ctx, tObj, m, texcoords + minStart, + lambda + minStart, rgba + minStart); + break; + default: + _mesa_problem(ctx, "Bad min filter in sample_3d_texture"); + return; + } + } + + if (magStart < magEnd) { + /* do the magnified texels */ + switch (tObj->Sampler.MagFilter) { + case GL_NEAREST: + for (i = magStart; i < magEnd; i++) + sample_3d_nearest(ctx, tObj, tObj->Image[0][tObj->BaseLevel], + texcoords[i], rgba[i]); + break; + case GL_LINEAR: + for (i = magStart; i < magEnd; i++) + sample_3d_linear(ctx, tObj, tObj->Image[0][tObj->BaseLevel], + texcoords[i], rgba[i]); + break; + default: + _mesa_problem(ctx, "Bad mag filter in sample_3d_texture"); + return; + } + } +} + + +/**********************************************************************/ +/* Texture Cube Map Sampling Functions */ +/**********************************************************************/ + +/** + * Choose one of six sides of a texture cube map given the texture + * coord (rx,ry,rz). Return pointer to corresponding array of texture + * images. + */ +static const struct gl_texture_image ** +choose_cube_face(const struct gl_texture_object *texObj, + const GLfloat texcoord[4], GLfloat newCoord[4]) +{ + /* + major axis + direction target sc tc ma + ---------- ------------------------------- --- --- --- + +rx TEXTURE_CUBE_MAP_POSITIVE_X_EXT -rz -ry rx + -rx TEXTURE_CUBE_MAP_NEGATIVE_X_EXT +rz -ry rx + +ry TEXTURE_CUBE_MAP_POSITIVE_Y_EXT +rx +rz ry + -ry TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT +rx -rz ry + +rz TEXTURE_CUBE_MAP_POSITIVE_Z_EXT +rx -ry rz + -rz TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT -rx -ry rz + */ + const GLfloat rx = texcoord[0]; + const GLfloat ry = texcoord[1]; + const GLfloat rz = texcoord[2]; + const GLfloat arx = FABSF(rx), ary = FABSF(ry), arz = FABSF(rz); + GLuint face; + GLfloat sc, tc, ma; + + if (arx >= ary && arx >= arz) { + if (rx >= 0.0F) { + face = FACE_POS_X; + sc = -rz; + tc = -ry; + ma = arx; + } + else { + face = FACE_NEG_X; + sc = rz; + tc = -ry; + ma = arx; + } + } + else if (ary >= arx && ary >= arz) { + if (ry >= 0.0F) { + face = FACE_POS_Y; + sc = rx; + tc = rz; + ma = ary; + } + else { + face = FACE_NEG_Y; + sc = rx; + tc = -rz; + ma = ary; + } + } + else { + if (rz > 0.0F) { + face = FACE_POS_Z; + sc = rx; + tc = -ry; + ma = arz; + } + else { + face = FACE_NEG_Z; + sc = -rx; + tc = -ry; + ma = arz; + } + } + + { + const float ima = 1.0F / ma; + newCoord[0] = ( sc * ima + 1.0F ) * 0.5F; + newCoord[1] = ( tc * ima + 1.0F ) * 0.5F; + } + + return (const struct gl_texture_image **) texObj->Image[face]; +} + + +static void +sample_nearest_cube(struct gl_context *ctx, + const struct gl_texture_object *tObj, GLuint n, + const GLfloat texcoords[][4], const GLfloat lambda[], + GLfloat rgba[][4]) +{ + GLuint i; + (void) lambda; + for (i = 0; i < n; i++) { + const struct gl_texture_image **images; + GLfloat newCoord[4]; + images = choose_cube_face(tObj, texcoords[i], newCoord); + sample_2d_nearest(ctx, tObj, images[tObj->BaseLevel], + newCoord, rgba[i]); + } +} + + +static void +sample_linear_cube(struct gl_context *ctx, + const struct gl_texture_object *tObj, GLuint n, + const GLfloat texcoords[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + (void) lambda; + for (i = 0; i < n; i++) { + const struct gl_texture_image **images; + GLfloat newCoord[4]; + images = choose_cube_face(tObj, texcoords[i], newCoord); + sample_2d_linear(ctx, tObj, images[tObj->BaseLevel], + newCoord, rgba[i]); + } +} + + +static void +sample_cube_nearest_mipmap_nearest(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + ASSERT(lambda != NULL); + for (i = 0; i < n; i++) { + const struct gl_texture_image **images; + GLfloat newCoord[4]; + GLint level; + images = choose_cube_face(tObj, texcoord[i], newCoord); + + /* XXX we actually need to recompute lambda here based on the newCoords. + * But we would need the texcoords of adjacent fragments to compute that + * properly, and we don't have those here. + * For now, do an approximation: subtracting 1 from the chosen mipmap + * level seems to work in some test cases. + * The same adjustment is done in the next few functions. + */ + level = nearest_mipmap_level(tObj, lambda[i]); + level = MAX2(level - 1, 0); + + sample_2d_nearest(ctx, tObj, images[level], newCoord, rgba[i]); + } +} + + +static void +sample_cube_linear_mipmap_nearest(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + ASSERT(lambda != NULL); + for (i = 0; i < n; i++) { + const struct gl_texture_image **images; + GLfloat newCoord[4]; + GLint level = nearest_mipmap_level(tObj, lambda[i]); + level = MAX2(level - 1, 0); /* see comment above */ + images = choose_cube_face(tObj, texcoord[i], newCoord); + sample_2d_linear(ctx, tObj, images[level], newCoord, rgba[i]); + } +} + + +static void +sample_cube_nearest_mipmap_linear(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + ASSERT(lambda != NULL); + for (i = 0; i < n; i++) { + const struct gl_texture_image **images; + GLfloat newCoord[4]; + GLint level = linear_mipmap_level(tObj, lambda[i]); + level = MAX2(level - 1, 0); /* see comment above */ + images = choose_cube_face(tObj, texcoord[i], newCoord); + if (level >= tObj->_MaxLevel) { + sample_2d_nearest(ctx, tObj, images[tObj->_MaxLevel], + newCoord, rgba[i]); + } + else { + GLfloat t0[4], t1[4]; /* texels */ + const GLfloat f = FRAC(lambda[i]); + sample_2d_nearest(ctx, tObj, images[level ], newCoord, t0); + sample_2d_nearest(ctx, tObj, images[level+1], newCoord, t1); + lerp_rgba(rgba[i], f, t0, t1); + } + } +} + + +static void +sample_cube_linear_mipmap_linear(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + ASSERT(lambda != NULL); + for (i = 0; i < n; i++) { + const struct gl_texture_image **images; + GLfloat newCoord[4]; + GLint level = linear_mipmap_level(tObj, lambda[i]); + level = MAX2(level - 1, 0); /* see comment above */ + images = choose_cube_face(tObj, texcoord[i], newCoord); + if (level >= tObj->_MaxLevel) { + sample_2d_linear(ctx, tObj, images[tObj->_MaxLevel], + newCoord, rgba[i]); + } + else { + GLfloat t0[4], t1[4]; + const GLfloat f = FRAC(lambda[i]); + sample_2d_linear(ctx, tObj, images[level ], newCoord, t0); + sample_2d_linear(ctx, tObj, images[level+1], newCoord, t1); + lerp_rgba(rgba[i], f, t0, t1); + } + } +} + + +/** Sample cube texture, using lambda to choose between min/magnification */ +static void +sample_lambda_cube(struct gl_context *ctx, + const struct gl_texture_object *tObj, GLuint n, + const GLfloat texcoords[][4], const GLfloat lambda[], + GLfloat rgba[][4]) +{ + GLuint minStart, minEnd; /* texels with minification */ + GLuint magStart, magEnd; /* texels with magnification */ + + ASSERT(lambda != NULL); + compute_min_mag_ranges(tObj, n, lambda, + &minStart, &minEnd, &magStart, &magEnd); + + if (minStart < minEnd) { + /* do the minified texels */ + const GLuint m = minEnd - minStart; + switch (tObj->Sampler.MinFilter) { + case GL_NEAREST: + sample_nearest_cube(ctx, tObj, m, texcoords + minStart, + lambda + minStart, rgba + minStart); + break; + case GL_LINEAR: + sample_linear_cube(ctx, tObj, m, texcoords + minStart, + lambda + minStart, rgba + minStart); + break; + case GL_NEAREST_MIPMAP_NEAREST: + sample_cube_nearest_mipmap_nearest(ctx, tObj, m, + texcoords + minStart, + lambda + minStart, rgba + minStart); + break; + case GL_LINEAR_MIPMAP_NEAREST: + sample_cube_linear_mipmap_nearest(ctx, tObj, m, + texcoords + minStart, + lambda + minStart, rgba + minStart); + break; + case GL_NEAREST_MIPMAP_LINEAR: + sample_cube_nearest_mipmap_linear(ctx, tObj, m, + texcoords + minStart, + lambda + minStart, rgba + minStart); + break; + case GL_LINEAR_MIPMAP_LINEAR: + sample_cube_linear_mipmap_linear(ctx, tObj, m, + texcoords + minStart, + lambda + minStart, rgba + minStart); + break; + default: + _mesa_problem(ctx, "Bad min filter in sample_lambda_cube"); + } + } + + if (magStart < magEnd) { + /* do the magnified texels */ + const GLuint m = magEnd - magStart; + switch (tObj->Sampler.MagFilter) { + case GL_NEAREST: + sample_nearest_cube(ctx, tObj, m, texcoords + magStart, + lambda + magStart, rgba + magStart); + break; + case GL_LINEAR: + sample_linear_cube(ctx, tObj, m, texcoords + magStart, + lambda + magStart, rgba + magStart); + break; + default: + _mesa_problem(ctx, "Bad mag filter in sample_lambda_cube"); + } + } +} + + +/**********************************************************************/ +/* Texture Rectangle Sampling Functions */ +/**********************************************************************/ + + +static void +sample_nearest_rect(struct gl_context *ctx, + const struct gl_texture_object *tObj, GLuint n, + const GLfloat texcoords[][4], const GLfloat lambda[], + GLfloat rgba[][4]) +{ + const struct gl_texture_image *img = tObj->Image[0][0]; + const GLint width = img->Width; + const GLint height = img->Height; + GLuint i; + + (void) ctx; + (void) lambda; + + ASSERT(tObj->Sampler.WrapS == GL_CLAMP || + tObj->Sampler.WrapS == GL_CLAMP_TO_EDGE || + tObj->Sampler.WrapS == GL_CLAMP_TO_BORDER); + ASSERT(tObj->Sampler.WrapT == GL_CLAMP || + tObj->Sampler.WrapT == GL_CLAMP_TO_EDGE || + tObj->Sampler.WrapT == GL_CLAMP_TO_BORDER); + ASSERT(img->_BaseFormat != GL_COLOR_INDEX); + + for (i = 0; i < n; i++) { + GLint row, col; + col = clamp_rect_coord_nearest(tObj->Sampler.WrapS, texcoords[i][0], width); + row = clamp_rect_coord_nearest(tObj->Sampler.WrapT, texcoords[i][1], height); + if (col < 0 || col >= width || row < 0 || row >= height) + get_border_color(tObj, img, rgba[i]); + else + img->FetchTexelf(img, col, row, 0, rgba[i]); + } +} + + +static void +sample_linear_rect(struct gl_context *ctx, + const struct gl_texture_object *tObj, GLuint n, + const GLfloat texcoords[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + const struct gl_texture_image *img = tObj->Image[0][0]; + const GLint width = img->Width; + const GLint height = img->Height; + GLuint i; + + (void) ctx; + (void) lambda; + + ASSERT(tObj->Sampler.WrapS == GL_CLAMP || + tObj->Sampler.WrapS == GL_CLAMP_TO_EDGE || + tObj->Sampler.WrapS == GL_CLAMP_TO_BORDER); + ASSERT(tObj->Sampler.WrapT == GL_CLAMP || + tObj->Sampler.WrapT == GL_CLAMP_TO_EDGE || + tObj->Sampler.WrapT == GL_CLAMP_TO_BORDER); + ASSERT(img->_BaseFormat != GL_COLOR_INDEX); + + for (i = 0; i < n; i++) { + GLint i0, j0, i1, j1; + GLfloat t00[4], t01[4], t10[4], t11[4]; + GLfloat a, b; + GLbitfield useBorderColor = 0x0; + + clamp_rect_coord_linear(tObj->Sampler.WrapS, texcoords[i][0], width, + &i0, &i1, &a); + clamp_rect_coord_linear(tObj->Sampler.WrapT, texcoords[i][1], height, + &j0, &j1, &b); + + /* compute integer rows/columns */ + if (i0 < 0 || i0 >= width) useBorderColor |= I0BIT; + if (i1 < 0 || i1 >= width) useBorderColor |= I1BIT; + if (j0 < 0 || j0 >= height) useBorderColor |= J0BIT; + if (j1 < 0 || j1 >= height) useBorderColor |= J1BIT; + + /* get four texel samples */ + if (useBorderColor & (I0BIT | J0BIT)) + get_border_color(tObj, img, t00); + else + img->FetchTexelf(img, i0, j0, 0, t00); + + if (useBorderColor & (I1BIT | J0BIT)) + get_border_color(tObj, img, t10); + else + img->FetchTexelf(img, i1, j0, 0, t10); + + if (useBorderColor & (I0BIT | J1BIT)) + get_border_color(tObj, img, t01); + else + img->FetchTexelf(img, i0, j1, 0, t01); + + if (useBorderColor & (I1BIT | J1BIT)) + get_border_color(tObj, img, t11); + else + img->FetchTexelf(img, i1, j1, 0, t11); + + lerp_rgba_2d(rgba[i], a, b, t00, t10, t01, t11); + } +} + + +/** Sample Rect texture, using lambda to choose between min/magnification */ +static void +sample_lambda_rect(struct gl_context *ctx, + const struct gl_texture_object *tObj, GLuint n, + const GLfloat texcoords[][4], const GLfloat lambda[], + GLfloat rgba[][4]) +{ + GLuint minStart, minEnd, magStart, magEnd; + + /* We only need lambda to decide between minification and magnification. + * There is no mipmapping with rectangular textures. + */ + compute_min_mag_ranges(tObj, n, lambda, + &minStart, &minEnd, &magStart, &magEnd); + + if (minStart < minEnd) { + if (tObj->Sampler.MinFilter == GL_NEAREST) { + sample_nearest_rect(ctx, tObj, minEnd - minStart, + texcoords + minStart, NULL, rgba + minStart); + } + else { + sample_linear_rect(ctx, tObj, minEnd - minStart, + texcoords + minStart, NULL, rgba + minStart); + } + } + if (magStart < magEnd) { + if (tObj->Sampler.MagFilter == GL_NEAREST) { + sample_nearest_rect(ctx, tObj, magEnd - magStart, + texcoords + magStart, NULL, rgba + magStart); + } + else { + sample_linear_rect(ctx, tObj, magEnd - magStart, + texcoords + magStart, NULL, rgba + magStart); + } + } +} + + +/**********************************************************************/ +/* 2D Texture Array Sampling Functions */ +/**********************************************************************/ + +/** + * Return the texture sample for coordinate (s,t,r) using GL_NEAREST filter. + */ +static void +sample_2d_array_nearest(struct gl_context *ctx, + const struct gl_texture_object *tObj, + const struct gl_texture_image *img, + const GLfloat texcoord[4], + GLfloat rgba[4]) +{ + const GLint width = img->Width2; /* without border, power of two */ + const GLint height = img->Height2; /* without border, power of two */ + const GLint depth = img->Depth; + GLint i, j; + GLint array; + (void) ctx; + + i = nearest_texel_location(tObj->Sampler.WrapS, img, width, texcoord[0]); + j = nearest_texel_location(tObj->Sampler.WrapT, img, height, texcoord[1]); + array = tex_array_slice(texcoord[2], depth); + + if (i < 0 || i >= (GLint) img->Width || + j < 0 || j >= (GLint) img->Height || + array < 0 || array >= (GLint) img->Depth) { + /* Need this test for GL_CLAMP_TO_BORDER mode */ + get_border_color(tObj, img, rgba); + } + else { + img->FetchTexelf(img, i, j, array, rgba); + } +} + + +/** + * Return the texture sample for coordinate (s,t,r) using GL_LINEAR filter. + */ +static void +sample_2d_array_linear(struct gl_context *ctx, + const struct gl_texture_object *tObj, + const struct gl_texture_image *img, + const GLfloat texcoord[4], + GLfloat rgba[4]) +{ + const GLint width = img->Width2; + const GLint height = img->Height2; + const GLint depth = img->Depth; + GLint i0, j0, i1, j1; + GLint array; + GLbitfield useBorderColor = 0x0; + GLfloat a, b; + GLfloat t00[4], t01[4], t10[4], t11[4]; + + linear_texel_locations(tObj->Sampler.WrapS, img, width, texcoord[0], &i0, &i1, &a); + linear_texel_locations(tObj->Sampler.WrapT, img, height, texcoord[1], &j0, &j1, &b); + array = tex_array_slice(texcoord[2], depth); + + if (array < 0 || array >= depth) { + COPY_4V(rgba, tObj->Sampler.BorderColor.f); + } + else { + if (img->Border) { + i0 += img->Border; + i1 += img->Border; + j0 += img->Border; + j1 += img->Border; + } + else { + /* check if sampling texture border color */ + if (i0 < 0 || i0 >= width) useBorderColor |= I0BIT; + if (i1 < 0 || i1 >= width) useBorderColor |= I1BIT; + if (j0 < 0 || j0 >= height) useBorderColor |= J0BIT; + if (j1 < 0 || j1 >= height) useBorderColor |= J1BIT; + } + + /* Fetch texels */ + if (useBorderColor & (I0BIT | J0BIT)) { + get_border_color(tObj, img, t00); + } + else { + img->FetchTexelf(img, i0, j0, array, t00); + } + if (useBorderColor & (I1BIT | J0BIT)) { + get_border_color(tObj, img, t10); + } + else { + img->FetchTexelf(img, i1, j0, array, t10); + } + if (useBorderColor & (I0BIT | J1BIT)) { + get_border_color(tObj, img, t01); + } + else { + img->FetchTexelf(img, i0, j1, array, t01); + } + if (useBorderColor & (I1BIT | J1BIT)) { + get_border_color(tObj, img, t11); + } + else { + img->FetchTexelf(img, i1, j1, array, t11); + } + + /* trilinear interpolation of samples */ + lerp_rgba_2d(rgba, a, b, t00, t10, t01, t11); + } +} + + +static void +sample_2d_array_nearest_mipmap_nearest(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + for (i = 0; i < n; i++) { + GLint level = nearest_mipmap_level(tObj, lambda[i]); + sample_2d_array_nearest(ctx, tObj, tObj->Image[0][level], texcoord[i], + rgba[i]); + } +} + + +static void +sample_2d_array_linear_mipmap_nearest(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + ASSERT(lambda != NULL); + for (i = 0; i < n; i++) { + GLint level = nearest_mipmap_level(tObj, lambda[i]); + sample_2d_array_linear(ctx, tObj, tObj->Image[0][level], + texcoord[i], rgba[i]); + } +} + + +static void +sample_2d_array_nearest_mipmap_linear(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + ASSERT(lambda != NULL); + for (i = 0; i < n; i++) { + GLint level = linear_mipmap_level(tObj, lambda[i]); + if (level >= tObj->_MaxLevel) { + sample_2d_array_nearest(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], + texcoord[i], rgba[i]); + } + else { + GLfloat t0[4], t1[4]; /* texels */ + const GLfloat f = FRAC(lambda[i]); + sample_2d_array_nearest(ctx, tObj, tObj->Image[0][level ], + texcoord[i], t0); + sample_2d_array_nearest(ctx, tObj, tObj->Image[0][level+1], + texcoord[i], t1); + lerp_rgba(rgba[i], f, t0, t1); + } + } +} + + +static void +sample_2d_array_linear_mipmap_linear(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + ASSERT(lambda != NULL); + for (i = 0; i < n; i++) { + GLint level = linear_mipmap_level(tObj, lambda[i]); + if (level >= tObj->_MaxLevel) { + sample_2d_array_linear(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], + texcoord[i], rgba[i]); + } + else { + GLfloat t0[4], t1[4]; /* texels */ + const GLfloat f = FRAC(lambda[i]); + sample_2d_array_linear(ctx, tObj, tObj->Image[0][level ], + texcoord[i], t0); + sample_2d_array_linear(ctx, tObj, tObj->Image[0][level+1], + texcoord[i], t1); + lerp_rgba(rgba[i], f, t0, t1); + } + } +} + + +/** Sample 2D Array texture, nearest filtering for both min/magnification */ +static void +sample_nearest_2d_array(struct gl_context *ctx, + const struct gl_texture_object *tObj, GLuint n, + const GLfloat texcoords[][4], const GLfloat lambda[], + GLfloat rgba[][4]) +{ + GLuint i; + struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel]; + (void) lambda; + for (i = 0; i < n; i++) { + sample_2d_array_nearest(ctx, tObj, image, texcoords[i], rgba[i]); + } +} + + + +/** Sample 2D Array texture, linear filtering for both min/magnification */ +static void +sample_linear_2d_array(struct gl_context *ctx, + const struct gl_texture_object *tObj, GLuint n, + const GLfloat texcoords[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel]; + (void) lambda; + for (i = 0; i < n; i++) { + sample_2d_array_linear(ctx, tObj, image, texcoords[i], rgba[i]); + } +} + + +/** Sample 2D Array texture, using lambda to choose between min/magnification */ +static void +sample_lambda_2d_array(struct gl_context *ctx, + const struct gl_texture_object *tObj, GLuint n, + const GLfloat texcoords[][4], const GLfloat lambda[], + GLfloat rgba[][4]) +{ + GLuint minStart, minEnd; /* texels with minification */ + GLuint magStart, magEnd; /* texels with magnification */ + GLuint i; + + ASSERT(lambda != NULL); + compute_min_mag_ranges(tObj, n, lambda, + &minStart, &minEnd, &magStart, &magEnd); + + if (minStart < minEnd) { + /* do the minified texels */ + GLuint m = minEnd - minStart; + switch (tObj->Sampler.MinFilter) { + case GL_NEAREST: + for (i = minStart; i < minEnd; i++) + sample_2d_array_nearest(ctx, tObj, tObj->Image[0][tObj->BaseLevel], + texcoords[i], rgba[i]); + break; + case GL_LINEAR: + for (i = minStart; i < minEnd; i++) + sample_2d_array_linear(ctx, tObj, tObj->Image[0][tObj->BaseLevel], + texcoords[i], rgba[i]); + break; + case GL_NEAREST_MIPMAP_NEAREST: + sample_2d_array_nearest_mipmap_nearest(ctx, tObj, m, + texcoords + minStart, + lambda + minStart, + rgba + minStart); + break; + case GL_LINEAR_MIPMAP_NEAREST: + sample_2d_array_linear_mipmap_nearest(ctx, tObj, m, + texcoords + minStart, + lambda + minStart, + rgba + minStart); + break; + case GL_NEAREST_MIPMAP_LINEAR: + sample_2d_array_nearest_mipmap_linear(ctx, tObj, m, + texcoords + minStart, + lambda + minStart, + rgba + minStart); + break; + case GL_LINEAR_MIPMAP_LINEAR: + sample_2d_array_linear_mipmap_linear(ctx, tObj, m, + texcoords + minStart, + lambda + minStart, + rgba + minStart); + break; + default: + _mesa_problem(ctx, "Bad min filter in sample_2d_array_texture"); + return; + } + } + + if (magStart < magEnd) { + /* do the magnified texels */ + switch (tObj->Sampler.MagFilter) { + case GL_NEAREST: + for (i = magStart; i < magEnd; i++) + sample_2d_array_nearest(ctx, tObj, tObj->Image[0][tObj->BaseLevel], + texcoords[i], rgba[i]); + break; + case GL_LINEAR: + for (i = magStart; i < magEnd; i++) + sample_2d_array_linear(ctx, tObj, tObj->Image[0][tObj->BaseLevel], + texcoords[i], rgba[i]); + break; + default: + _mesa_problem(ctx, "Bad mag filter in sample_2d_array_texture"); + return; + } + } +} + + + + +/**********************************************************************/ +/* 1D Texture Array Sampling Functions */ +/**********************************************************************/ + +/** + * Return the texture sample for coordinate (s,t,r) using GL_NEAREST filter. + */ +static void +sample_1d_array_nearest(struct gl_context *ctx, + const struct gl_texture_object *tObj, + const struct gl_texture_image *img, + const GLfloat texcoord[4], + GLfloat rgba[4]) +{ + const GLint width = img->Width2; /* without border, power of two */ + const GLint height = img->Height; + GLint i; + GLint array; + (void) ctx; + + i = nearest_texel_location(tObj->Sampler.WrapS, img, width, texcoord[0]); + array = tex_array_slice(texcoord[1], height); + + if (i < 0 || i >= (GLint) img->Width || + array < 0 || array >= (GLint) img->Height) { + /* Need this test for GL_CLAMP_TO_BORDER mode */ + get_border_color(tObj, img, rgba); + } + else { + img->FetchTexelf(img, i, array, 0, rgba); + } +} + + +/** + * Return the texture sample for coordinate (s,t,r) using GL_LINEAR filter. + */ +static void +sample_1d_array_linear(struct gl_context *ctx, + const struct gl_texture_object *tObj, + const struct gl_texture_image *img, + const GLfloat texcoord[4], + GLfloat rgba[4]) +{ + const GLint width = img->Width2; + const GLint height = img->Height; + GLint i0, i1; + GLint array; + GLbitfield useBorderColor = 0x0; + GLfloat a; + GLfloat t0[4], t1[4]; + + linear_texel_locations(tObj->Sampler.WrapS, img, width, texcoord[0], &i0, &i1, &a); + array = tex_array_slice(texcoord[1], height); + + if (img->Border) { + i0 += img->Border; + i1 += img->Border; + } + else { + /* check if sampling texture border color */ + if (i0 < 0 || i0 >= width) useBorderColor |= I0BIT; + if (i1 < 0 || i1 >= width) useBorderColor |= I1BIT; + } + + if (array < 0 || array >= height) useBorderColor |= K0BIT; + + /* Fetch texels */ + if (useBorderColor & (I0BIT | K0BIT)) { + get_border_color(tObj, img, t0); + } + else { + img->FetchTexelf(img, i0, array, 0, t0); + } + if (useBorderColor & (I1BIT | K0BIT)) { + get_border_color(tObj, img, t1); + } + else { + img->FetchTexelf(img, i1, array, 0, t1); + } + + /* bilinear interpolation of samples */ + lerp_rgba(rgba, a, t0, t1); +} + + +static void +sample_1d_array_nearest_mipmap_nearest(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + for (i = 0; i < n; i++) { + GLint level = nearest_mipmap_level(tObj, lambda[i]); + sample_1d_array_nearest(ctx, tObj, tObj->Image[0][level], texcoord[i], + rgba[i]); + } +} + + +static void +sample_1d_array_linear_mipmap_nearest(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + ASSERT(lambda != NULL); + for (i = 0; i < n; i++) { + GLint level = nearest_mipmap_level(tObj, lambda[i]); + sample_1d_array_linear(ctx, tObj, tObj->Image[0][level], + texcoord[i], rgba[i]); + } +} + + +static void +sample_1d_array_nearest_mipmap_linear(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + ASSERT(lambda != NULL); + for (i = 0; i < n; i++) { + GLint level = linear_mipmap_level(tObj, lambda[i]); + if (level >= tObj->_MaxLevel) { + sample_1d_array_nearest(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], + texcoord[i], rgba[i]); + } + else { + GLfloat t0[4], t1[4]; /* texels */ + const GLfloat f = FRAC(lambda[i]); + sample_1d_array_nearest(ctx, tObj, tObj->Image[0][level ], texcoord[i], t0); + sample_1d_array_nearest(ctx, tObj, tObj->Image[0][level+1], texcoord[i], t1); + lerp_rgba(rgba[i], f, t0, t1); + } + } +} + + +static void +sample_1d_array_linear_mipmap_linear(struct gl_context *ctx, + const struct gl_texture_object *tObj, + GLuint n, const GLfloat texcoord[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + ASSERT(lambda != NULL); + for (i = 0; i < n; i++) { + GLint level = linear_mipmap_level(tObj, lambda[i]); + if (level >= tObj->_MaxLevel) { + sample_1d_array_linear(ctx, tObj, tObj->Image[0][tObj->_MaxLevel], + texcoord[i], rgba[i]); + } + else { + GLfloat t0[4], t1[4]; /* texels */ + const GLfloat f = FRAC(lambda[i]); + sample_1d_array_linear(ctx, tObj, tObj->Image[0][level ], texcoord[i], t0); + sample_1d_array_linear(ctx, tObj, tObj->Image[0][level+1], texcoord[i], t1); + lerp_rgba(rgba[i], f, t0, t1); + } + } +} + + +/** Sample 1D Array texture, nearest filtering for both min/magnification */ +static void +sample_nearest_1d_array(struct gl_context *ctx, + const struct gl_texture_object *tObj, GLuint n, + const GLfloat texcoords[][4], const GLfloat lambda[], + GLfloat rgba[][4]) +{ + GLuint i; + struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel]; + (void) lambda; + for (i = 0; i < n; i++) { + sample_1d_array_nearest(ctx, tObj, image, texcoords[i], rgba[i]); + } +} + + +/** Sample 1D Array texture, linear filtering for both min/magnification */ +static void +sample_linear_1d_array(struct gl_context *ctx, + const struct gl_texture_object *tObj, GLuint n, + const GLfloat texcoords[][4], + const GLfloat lambda[], GLfloat rgba[][4]) +{ + GLuint i; + struct gl_texture_image *image = tObj->Image[0][tObj->BaseLevel]; + (void) lambda; + for (i = 0; i < n; i++) { + sample_1d_array_linear(ctx, tObj, image, texcoords[i], rgba[i]); + } +} + + +/** Sample 1D Array texture, using lambda to choose between min/magnification */ +static void +sample_lambda_1d_array(struct gl_context *ctx, + const struct gl_texture_object *tObj, GLuint n, + const GLfloat texcoords[][4], const GLfloat lambda[], + GLfloat rgba[][4]) +{ + GLuint minStart, minEnd; /* texels with minification */ + GLuint magStart, magEnd; /* texels with magnification */ + GLuint i; + + ASSERT(lambda != NULL); + compute_min_mag_ranges(tObj, n, lambda, + &minStart, &minEnd, &magStart, &magEnd); + + if (minStart < minEnd) { + /* do the minified texels */ + GLuint m = minEnd - minStart; + switch (tObj->Sampler.MinFilter) { + case GL_NEAREST: + for (i = minStart; i < minEnd; i++) + sample_1d_array_nearest(ctx, tObj, tObj->Image[0][tObj->BaseLevel], + texcoords[i], rgba[i]); + break; + case GL_LINEAR: + for (i = minStart; i < minEnd; i++) + sample_1d_array_linear(ctx, tObj, tObj->Image[0][tObj->BaseLevel], + texcoords[i], rgba[i]); + break; + case GL_NEAREST_MIPMAP_NEAREST: + sample_1d_array_nearest_mipmap_nearest(ctx, tObj, m, texcoords + minStart, + lambda + minStart, rgba + minStart); + break; + case GL_LINEAR_MIPMAP_NEAREST: + sample_1d_array_linear_mipmap_nearest(ctx, tObj, m, + texcoords + minStart, + lambda + minStart, + rgba + minStart); + break; + case GL_NEAREST_MIPMAP_LINEAR: + sample_1d_array_nearest_mipmap_linear(ctx, tObj, m, texcoords + minStart, + lambda + minStart, rgba + minStart); + break; + case GL_LINEAR_MIPMAP_LINEAR: + sample_1d_array_linear_mipmap_linear(ctx, tObj, m, + texcoords + minStart, + lambda + minStart, + rgba + minStart); + break; + default: + _mesa_problem(ctx, "Bad min filter in sample_1d_array_texture"); + return; + } + } + + if (magStart < magEnd) { + /* do the magnified texels */ + switch (tObj->Sampler.MagFilter) { + case GL_NEAREST: + for (i = magStart; i < magEnd; i++) + sample_1d_array_nearest(ctx, tObj, tObj->Image[0][tObj->BaseLevel], + texcoords[i], rgba[i]); + break; + case GL_LINEAR: + for (i = magStart; i < magEnd; i++) + sample_1d_array_linear(ctx, tObj, tObj->Image[0][tObj->BaseLevel], + texcoords[i], rgba[i]); + break; + default: + _mesa_problem(ctx, "Bad mag filter in sample_1d_array_texture"); + return; + } + } +} + + +/** + * Compare texcoord against depth sample. Return 1.0 or the ambient value. + */ +static INLINE GLfloat +shadow_compare(GLenum function, GLfloat coord, GLfloat depthSample, + GLfloat ambient) +{ + switch (function) { + case GL_LEQUAL: + return (coord <= depthSample) ? 1.0F : ambient; + case GL_GEQUAL: + return (coord >= depthSample) ? 1.0F : ambient; + case GL_LESS: + return (coord < depthSample) ? 1.0F : ambient; + case GL_GREATER: + return (coord > depthSample) ? 1.0F : ambient; + case GL_EQUAL: + return (coord == depthSample) ? 1.0F : ambient; + case GL_NOTEQUAL: + return (coord != depthSample) ? 1.0F : ambient; + case GL_ALWAYS: + return 1.0F; + case GL_NEVER: + return ambient; + case GL_NONE: + return depthSample; + default: + _mesa_problem(NULL, "Bad compare func in shadow_compare"); + return ambient; + } +} + + +/** + * Compare texcoord against four depth samples. + */ +static INLINE GLfloat +shadow_compare4(GLenum function, GLfloat coord, + GLfloat depth00, GLfloat depth01, + GLfloat depth10, GLfloat depth11, + GLfloat ambient, GLfloat wi, GLfloat wj) +{ + const GLfloat d = (1.0F - (GLfloat) ambient) * 0.25F; + GLfloat luminance = 1.0F; + + switch (function) { + case GL_LEQUAL: + if (coord > depth00) luminance -= d; + if (coord > depth01) luminance -= d; + if (coord > depth10) luminance -= d; + if (coord > depth11) luminance -= d; + return luminance; + case GL_GEQUAL: + if (coord < depth00) luminance -= d; + if (coord < depth01) luminance -= d; + if (coord < depth10) luminance -= d; + if (coord < depth11) luminance -= d; + return luminance; + case GL_LESS: + if (coord >= depth00) luminance -= d; + if (coord >= depth01) luminance -= d; + if (coord >= depth10) luminance -= d; + if (coord >= depth11) luminance -= d; + return luminance; + case GL_GREATER: + if (coord <= depth00) luminance -= d; + if (coord <= depth01) luminance -= d; + if (coord <= depth10) luminance -= d; + if (coord <= depth11) luminance -= d; + return luminance; + case GL_EQUAL: + if (coord != depth00) luminance -= d; + if (coord != depth01) luminance -= d; + if (coord != depth10) luminance -= d; + if (coord != depth11) luminance -= d; + return luminance; + case GL_NOTEQUAL: + if (coord == depth00) luminance -= d; + if (coord == depth01) luminance -= d; + if (coord == depth10) luminance -= d; + if (coord == depth11) luminance -= d; + return luminance; + case GL_ALWAYS: + return 1.0F; + case GL_NEVER: + return ambient; + case GL_NONE: + /* ordinary bilinear filtering */ + return lerp_2d(wi, wj, depth00, depth10, depth01, depth11); + default: + _mesa_problem(NULL, "Bad compare func in sample_compare4"); + return ambient; + } +} + + +/** + * Choose the mipmap level to use when sampling from a depth texture. + */ +static int +choose_depth_texture_level(const struct gl_texture_object *tObj, GLfloat lambda) +{ + GLint level; + + if (tObj->Sampler.MinFilter == GL_NEAREST || tObj->Sampler.MinFilter == GL_LINEAR) { + /* no mipmapping - use base level */ + level = tObj->BaseLevel; + } + else { + /* choose mipmap level */ + lambda = CLAMP(lambda, tObj->Sampler.MinLod, tObj->Sampler.MaxLod); + level = (GLint) lambda; + level = CLAMP(level, tObj->BaseLevel, tObj->_MaxLevel); + } + + return level; +} + + +/** + * Sample a shadow/depth texture. This function is incomplete. It doesn't + * check for minification vs. magnification, etc. + */ +static void +sample_depth_texture( struct gl_context *ctx, + const struct gl_texture_object *tObj, GLuint n, + const GLfloat texcoords[][4], const GLfloat lambda[], + GLfloat texel[][4] ) +{ + const GLint level = choose_depth_texture_level(tObj, lambda[0]); + const struct gl_texture_image *img = tObj->Image[0][level]; + const GLint width = img->Width; + const GLint height = img->Height; + const GLint depth = img->Depth; + const GLuint compare_coord = (tObj->Target == GL_TEXTURE_2D_ARRAY_EXT) + ? 3 : 2; + GLfloat ambient; + GLenum function; + GLfloat result; + + ASSERT(img->_BaseFormat == GL_DEPTH_COMPONENT || + img->_BaseFormat == GL_DEPTH_STENCIL_EXT); + + ASSERT(tObj->Target == GL_TEXTURE_1D || + tObj->Target == GL_TEXTURE_2D || + tObj->Target == GL_TEXTURE_RECTANGLE_NV || + tObj->Target == GL_TEXTURE_1D_ARRAY_EXT || + tObj->Target == GL_TEXTURE_2D_ARRAY_EXT); + + ambient = tObj->Sampler.CompareFailValue; + + /* XXXX if tObj->Sampler.MinFilter != tObj->Sampler.MagFilter, we're ignoring lambda */ + + function = (tObj->Sampler.CompareMode == GL_COMPARE_R_TO_TEXTURE_ARB) ? + tObj->Sampler.CompareFunc : GL_NONE; + + if (tObj->Sampler.MagFilter == GL_NEAREST) { + GLuint i; + for (i = 0; i < n; i++) { + GLfloat depthSample, depthRef; + GLint col, row, slice; + + nearest_texcoord(tObj, level, texcoords[i], &col, &row, &slice); + + if (col >= 0 && row >= 0 && col < width && row < height && + slice >= 0 && slice < depth) { + img->FetchTexelf(img, col, row, slice, &depthSample); + } + else { + depthSample = tObj->Sampler.BorderColor.f[0]; + } + + depthRef = CLAMP(texcoords[i][compare_coord], 0.0F, 1.0F); + + result = shadow_compare(function, depthRef, depthSample, ambient); + + switch (tObj->Sampler.DepthMode) { + case GL_LUMINANCE: + ASSIGN_4V(texel[i], result, result, result, 1.0F); + break; + case GL_INTENSITY: + ASSIGN_4V(texel[i], result, result, result, result); + break; + case GL_ALPHA: + ASSIGN_4V(texel[i], 0.0F, 0.0F, 0.0F, result); + break; + case GL_RED: + ASSIGN_4V(texel[i], result, 0.0F, 0.0F, 1.0F); + break; + default: + _mesa_problem(ctx, "Bad depth texture mode"); + } + } + } + else { + GLuint i; + ASSERT(tObj->Sampler.MagFilter == GL_LINEAR); + for (i = 0; i < n; i++) { + GLfloat depth00, depth01, depth10, depth11, depthRef; + GLint i0, i1, j0, j1; + GLint slice; + GLfloat wi, wj; + GLuint useBorderTexel; + + linear_texcoord(tObj, level, texcoords[i], &i0, &i1, &j0, &j1, &slice, + &wi, &wj); + + useBorderTexel = 0; + if (img->Border) { + i0 += img->Border; + i1 += img->Border; + if (tObj->Target != GL_TEXTURE_1D_ARRAY_EXT) { + j0 += img->Border; + j1 += img->Border; + } + } + else { + if (i0 < 0 || i0 >= (GLint) width) useBorderTexel |= I0BIT; + if (i1 < 0 || i1 >= (GLint) width) useBorderTexel |= I1BIT; + if (j0 < 0 || j0 >= (GLint) height) useBorderTexel |= J0BIT; + if (j1 < 0 || j1 >= (GLint) height) useBorderTexel |= J1BIT; + } + + if (slice < 0 || slice >= (GLint) depth) { + depth00 = tObj->Sampler.BorderColor.f[0]; + depth01 = tObj->Sampler.BorderColor.f[0]; + depth10 = tObj->Sampler.BorderColor.f[0]; + depth11 = tObj->Sampler.BorderColor.f[0]; + } + else { + /* get four depth samples from the texture */ + if (useBorderTexel & (I0BIT | J0BIT)) { + depth00 = tObj->Sampler.BorderColor.f[0]; + } + else { + img->FetchTexelf(img, i0, j0, slice, &depth00); + } + if (useBorderTexel & (I1BIT | J0BIT)) { + depth10 = tObj->Sampler.BorderColor.f[0]; + } + else { + img->FetchTexelf(img, i1, j0, slice, &depth10); + } + + if (tObj->Target != GL_TEXTURE_1D_ARRAY_EXT) { + if (useBorderTexel & (I0BIT | J1BIT)) { + depth01 = tObj->Sampler.BorderColor.f[0]; + } + else { + img->FetchTexelf(img, i0, j1, slice, &depth01); + } + if (useBorderTexel & (I1BIT | J1BIT)) { + depth11 = tObj->Sampler.BorderColor.f[0]; + } + else { + img->FetchTexelf(img, i1, j1, slice, &depth11); + } + } + else { + depth01 = depth00; + depth11 = depth10; + } + } + + depthRef = CLAMP(texcoords[i][compare_coord], 0.0F, 1.0F); + + result = shadow_compare4(function, depthRef, + depth00, depth01, depth10, depth11, + ambient, wi, wj); + + switch (tObj->Sampler.DepthMode) { + case GL_LUMINANCE: + ASSIGN_4V(texel[i], result, result, result, 1.0F); + break; + case GL_INTENSITY: + ASSIGN_4V(texel[i], result, result, result, result); + break; + case GL_ALPHA: + ASSIGN_4V(texel[i], 0.0F, 0.0F, 0.0F, result); + break; + default: + _mesa_problem(ctx, "Bad depth texture mode"); + } + + } /* for */ + } /* if filter */ +} + + +/** + * We use this function when a texture object is in an "incomplete" state. + * When a fragment program attempts to sample an incomplete texture we + * return black (see issue 23 in GL_ARB_fragment_program spec). + * Note: fragment programs don't observe the texture enable/disable flags. + */ +static void +null_sample_func( struct gl_context *ctx, + const struct gl_texture_object *tObj, GLuint n, + const GLfloat texcoords[][4], const GLfloat lambda[], + GLfloat rgba[][4]) +{ + GLuint i; + (void) ctx; + (void) tObj; + (void) texcoords; + (void) lambda; + for (i = 0; i < n; i++) { + rgba[i][RCOMP] = 0; + rgba[i][GCOMP] = 0; + rgba[i][BCOMP] = 0; + rgba[i][ACOMP] = 1.0; + } +} + + +/** + * Choose the texture sampling function for the given texture object. + */ +texture_sample_func +_swrast_choose_texture_sample_func( struct gl_context *ctx, + const struct gl_texture_object *t ) +{ + if (!t || !t->_Complete) { + return &null_sample_func; + } + else { + const GLboolean needLambda = + (GLboolean) (t->Sampler.MinFilter != t->Sampler.MagFilter); + const GLenum format = t->Image[0][t->BaseLevel]->_BaseFormat; + + switch (t->Target) { + case GL_TEXTURE_1D: + if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) { + return &sample_depth_texture; + } + else if (needLambda) { + return &sample_lambda_1d; + } + else if (t->Sampler.MinFilter == GL_LINEAR) { + return &sample_linear_1d; + } + else { + ASSERT(t->Sampler.MinFilter == GL_NEAREST); + return &sample_nearest_1d; + } + case GL_TEXTURE_2D: + if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) { + return &sample_depth_texture; + } + else if (needLambda) { + /* Anisotropic filtering extension. Activated only if mipmaps are used */ + if (t->Sampler.MaxAnisotropy > 1.0 && + t->Sampler.MinFilter == GL_LINEAR_MIPMAP_LINEAR) { + return &sample_lambda_2d_aniso; + } + return &sample_lambda_2d; + } + else if (t->Sampler.MinFilter == GL_LINEAR) { + return &sample_linear_2d; + } + else { + /* check for a few optimized cases */ + const struct gl_texture_image *img = t->Image[0][t->BaseLevel]; + ASSERT(t->Sampler.MinFilter == GL_NEAREST); + if (t->Sampler.WrapS == GL_REPEAT && + t->Sampler.WrapT == GL_REPEAT && + img->_IsPowerOfTwo && + img->Border == 0 && + img->TexFormat == MESA_FORMAT_RGB888) { + return &opt_sample_rgb_2d; + } + else if (t->Sampler.WrapS == GL_REPEAT && + t->Sampler.WrapT == GL_REPEAT && + img->_IsPowerOfTwo && + img->Border == 0 && + img->TexFormat == MESA_FORMAT_RGBA8888) { + return &opt_sample_rgba_2d; + } + else { + return &sample_nearest_2d; + } + } + case GL_TEXTURE_3D: + if (needLambda) { + return &sample_lambda_3d; + } + else if (t->Sampler.MinFilter == GL_LINEAR) { + return &sample_linear_3d; + } + else { + ASSERT(t->Sampler.MinFilter == GL_NEAREST); + return &sample_nearest_3d; + } + case GL_TEXTURE_CUBE_MAP: + if (needLambda) { + return &sample_lambda_cube; + } + else if (t->Sampler.MinFilter == GL_LINEAR) { + return &sample_linear_cube; + } + else { + ASSERT(t->Sampler.MinFilter == GL_NEAREST); + return &sample_nearest_cube; + } + case GL_TEXTURE_RECTANGLE_NV: + if (format == GL_DEPTH_COMPONENT || format == GL_DEPTH_STENCIL_EXT) { + return &sample_depth_texture; + } + else if (needLambda) { + return &sample_lambda_rect; + } + else if (t->Sampler.MinFilter == GL_LINEAR) { + return &sample_linear_rect; + } + else { + ASSERT(t->Sampler.MinFilter == GL_NEAREST); + return &sample_nearest_rect; + } + case GL_TEXTURE_1D_ARRAY_EXT: + if (needLambda) { + return &sample_lambda_1d_array; + } + else if (t->Sampler.MinFilter == GL_LINEAR) { + return &sample_linear_1d_array; + } + else { + ASSERT(t->Sampler.MinFilter == GL_NEAREST); + return &sample_nearest_1d_array; + } + case GL_TEXTURE_2D_ARRAY_EXT: + if (needLambda) { + return &sample_lambda_2d_array; + } + else if (t->Sampler.MinFilter == GL_LINEAR) { + return &sample_linear_2d_array; + } + else { + ASSERT(t->Sampler.MinFilter == GL_NEAREST); + return &sample_nearest_2d_array; + } + default: + _mesa_problem(ctx, + "invalid target in _swrast_choose_texture_sample_func"); + return &null_sample_func; + } + } +} diff --git a/pixman/pixman/Makefile.am b/pixman/pixman/Makefile.am index be0826680..acc273145 100644 --- a/pixman/pixman/Makefile.am +++ b/pixman/pixman/Makefile.am @@ -1,128 +1,129 @@ -lib_LTLIBRARIES = libpixman-1.la -libpixman_1_la_LDFLAGS = -version-info $(LT_VERSION_INFO) -no-undefined @PTHREAD_LDFLAGS@ -libpixman_1_la_LIBADD = @PTHREAD_LIBS@ @DEP_LIBS@ -lm -libpixman_1_la_SOURCES = \ - pixman.h \ - pixman-accessor.h \ - pixman-access.c \ - pixman-access-accessors.c \ - pixman-cpu.c \ - pixman-gradient-walker.c \ - pixman-region16.c \ - pixman-region32.c \ - pixman-compiler.h \ - pixman-private.h \ - pixman-image.c \ - pixman-implementation.c \ - pixman-combine32.c \ - pixman-combine32.h \ - pixman-combine64.c \ - pixman-combine64.h \ - pixman-general.c \ - pixman.c \ - pixman-fast-path.c \ - pixman-fast-path.h \ - pixman-solid-fill.c \ - pixman-conical-gradient.c \ - pixman-linear-gradient.c \ - pixman-radial-gradient.c \ - pixman-bits-image.c \ - pixman-utils.c \ - pixman-edge.c \ - pixman-edge-accessors.c \ - pixman-edge-imp.h \ - pixman-trap.c \ - pixman-timer.c \ - pixman-matrix.c - -libpixmanincludedir = $(includedir)/pixman-1 -libpixmaninclude_HEADERS = pixman.h pixman-version.h -noinst_LTLIBRARIES = - -BUILT_SOURCES = pixman-combine32.h pixman-combine32.c pixman-combine64.h pixman-combine64.c - -pixman-combine32.c : pixman-combine.c.template pixman-combine32.h make-combine.pl - $(PERL) $(srcdir)/make-combine.pl 8 < $(srcdir)/pixman-combine.c.template > $@ || ($(RM) $@; exit 1) -pixman-combine32.h : pixman-combine.h.template make-combine.pl - $(PERL) $(srcdir)/make-combine.pl 8 < $(srcdir)/pixman-combine.h.template > $@ || ($(RM) $@; exit 1) - -pixman-combine64.c : pixman-combine.c.template pixman-combine64.h make-combine.pl - $(PERL) $(srcdir)/make-combine.pl 16 < $(srcdir)/pixman-combine.c.template > $@ || ($(RM) $@; exit 1) -pixman-combine64.h : pixman-combine.h.template make-combine.pl - $(PERL) $(srcdir)/make-combine.pl 16 < $(srcdir)/pixman-combine.h.template > $@ || ($(RM) $@; exit 1) - -EXTRA_DIST = Makefile.win32 pixman-combine.c.template make-combine.pl pixman-region.c \ - pixman-combine.h.template solaris-hwcap.mapfile -CLEANFILES = pixman-combine32.c pixman-combine64.c pixman-combine32.h pixman-combine64.h - -# mmx code -if USE_MMX -noinst_LTLIBRARIES += libpixman-mmx.la -libpixman_mmx_la_SOURCES = \ - pixman-mmx.c -libpixman_mmx_la_CFLAGS = $(DEP_CFLAGS) $(MMX_CFLAGS) -libpixman_mmx_la_LIBADD = $(DEP_LIBS) -libpixman_1_la_LDFLAGS += $(MMX_LDFLAGS) -libpixman_1_la_LIBADD += libpixman-mmx.la - -ASM_CFLAGS_mmx=$(MMX_CFLAGS) -endif - -# vmx code -if USE_VMX -noinst_LTLIBRARIES += libpixman-vmx.la -libpixman_vmx_la_SOURCES = \ - pixman-vmx.c \ - pixman-combine32.h -libpixman_vmx_la_CFLAGS = $(DEP_CFLAGS) $(VMX_CFLAGS) -libpixman_vmx_la_LIBADD = $(DEP_LIBS) -libpixman_1_la_LIBADD += libpixman-vmx.la - -ASM_CFLAGS_vmx=$(VMX_CFLAGS) -endif - -# sse2 code -if USE_SSE2 -noinst_LTLIBRARIES += libpixman-sse2.la -libpixman_sse2_la_SOURCES = \ - pixman-sse2.c -libpixman_sse2_la_CFLAGS = $(DEP_CFLAGS) $(SSE2_CFLAGS) -libpixman_sse2_la_LIBADD = $(DEP_LIBS) -libpixman_1_la_LDFLAGS += $(SSE2_LDFLAGS) -libpixman_1_la_LIBADD += libpixman-sse2.la - -ASM_CFLAGS_sse2=$(SSE2_CFLAGS) -endif - -# arm simd code -if USE_ARM_SIMD -noinst_LTLIBRARIES += libpixman-arm-simd.la -libpixman_arm_simd_la_SOURCES = \ - pixman-arm-simd.c \ - pixman-arm-common.h \ - pixman-arm-simd-asm.S -libpixman_arm_simd_la_CFLAGS = $(DEP_CFLAGS) -libpixman_arm_simd_la_LIBADD = $(DEP_LIBS) -libpixman_1_la_LIBADD += libpixman-arm-simd.la - -ASM_CFLAGS_arm_simd= -endif - -# arm neon code -if USE_ARM_NEON -noinst_LTLIBRARIES += libpixman-arm-neon.la -libpixman_arm_neon_la_SOURCES = \ - pixman-arm-neon.c \ - pixman-arm-common.h \ - pixman-arm-neon-asm.S \ - pixman-arm-neon-asm-bilinear.S \ - pixman-arm-neon-asm.h -libpixman_arm_neon_la_CFLAGS = $(DEP_CFLAGS) -libpixman_arm_neon_la_LIBADD = $(DEP_LIBS) -libpixman_1_la_LIBADD += libpixman-arm-neon.la - -ASM_CFLAGS_arm_neon= -endif - -.c.s : $(libpixmaninclude_HEADERS) $(BUILT_SOURCES) - $(CC) $(CFLAGS) $(ASM_CFLAGS_$(@:pixman-%.s=%)) $(ASM_CFLAGS_$(@:pixman-arm-%.s=arm_%)) -DHAVE_CONFIG_H -I$(srcdir) -I$(builddir) -I$(top_builddir) -S -o $@ $< +lib_LTLIBRARIES = libpixman-1.la +libpixman_1_la_LDFLAGS = -version-info $(LT_VERSION_INFO) -no-undefined @PTHREAD_LDFLAGS@ +libpixman_1_la_LIBADD = @PTHREAD_LIBS@ @DEP_LIBS@ -lm +libpixman_1_la_SOURCES = \ + pixman.h \ + pixman-accessor.h \ + pixman-access.c \ + pixman-access-accessors.c \ + pixman-cpu.c \ + pixman-gradient-walker.c \ + pixman-region16.c \ + pixman-region32.c \ + pixman-compiler.h \ + pixman-private.h \ + pixman-image.c \ + pixman-implementation.c \ + pixman-combine32.c \ + pixman-combine32.h \ + pixman-combine64.c \ + pixman-combine64.h \ + pixman-general.c \ + pixman.c \ + pixman-noop.c \ + pixman-fast-path.c \ + pixman-fast-path.h \ + pixman-solid-fill.c \ + pixman-conical-gradient.c \ + pixman-linear-gradient.c \ + pixman-radial-gradient.c \ + pixman-bits-image.c \ + pixman-utils.c \ + pixman-edge.c \ + pixman-edge-accessors.c \ + pixman-edge-imp.h \ + pixman-trap.c \ + pixman-timer.c \ + pixman-matrix.c + +libpixmanincludedir = $(includedir)/pixman-1 +libpixmaninclude_HEADERS = pixman.h pixman-version.h +noinst_LTLIBRARIES = + +BUILT_SOURCES = pixman-combine32.h pixman-combine32.c pixman-combine64.h pixman-combine64.c + +pixman-combine32.c : pixman-combine.c.template pixman-combine32.h make-combine.pl + $(PERL) $(srcdir)/make-combine.pl 8 < $(srcdir)/pixman-combine.c.template > $@ || ($(RM) $@; exit 1) +pixman-combine32.h : pixman-combine.h.template make-combine.pl + $(PERL) $(srcdir)/make-combine.pl 8 < $(srcdir)/pixman-combine.h.template > $@ || ($(RM) $@; exit 1) + +pixman-combine64.c : pixman-combine.c.template pixman-combine64.h make-combine.pl + $(PERL) $(srcdir)/make-combine.pl 16 < $(srcdir)/pixman-combine.c.template > $@ || ($(RM) $@; exit 1) +pixman-combine64.h : pixman-combine.h.template make-combine.pl + $(PERL) $(srcdir)/make-combine.pl 16 < $(srcdir)/pixman-combine.h.template > $@ || ($(RM) $@; exit 1) + +EXTRA_DIST = Makefile.win32 pixman-combine.c.template make-combine.pl pixman-region.c \ + pixman-combine.h.template solaris-hwcap.mapfile +CLEANFILES = pixman-combine32.c pixman-combine64.c pixman-combine32.h pixman-combine64.h + +# mmx code +if USE_MMX +noinst_LTLIBRARIES += libpixman-mmx.la +libpixman_mmx_la_SOURCES = \ + pixman-mmx.c +libpixman_mmx_la_CFLAGS = $(DEP_CFLAGS) $(MMX_CFLAGS) +libpixman_mmx_la_LIBADD = $(DEP_LIBS) +libpixman_1_la_LDFLAGS += $(MMX_LDFLAGS) +libpixman_1_la_LIBADD += libpixman-mmx.la + +ASM_CFLAGS_mmx=$(MMX_CFLAGS) +endif + +# vmx code +if USE_VMX +noinst_LTLIBRARIES += libpixman-vmx.la +libpixman_vmx_la_SOURCES = \ + pixman-vmx.c \ + pixman-combine32.h +libpixman_vmx_la_CFLAGS = $(DEP_CFLAGS) $(VMX_CFLAGS) +libpixman_vmx_la_LIBADD = $(DEP_LIBS) +libpixman_1_la_LIBADD += libpixman-vmx.la + +ASM_CFLAGS_vmx=$(VMX_CFLAGS) +endif + +# sse2 code +if USE_SSE2 +noinst_LTLIBRARIES += libpixman-sse2.la +libpixman_sse2_la_SOURCES = \ + pixman-sse2.c +libpixman_sse2_la_CFLAGS = $(DEP_CFLAGS) $(SSE2_CFLAGS) +libpixman_sse2_la_LIBADD = $(DEP_LIBS) +libpixman_1_la_LDFLAGS += $(SSE2_LDFLAGS) +libpixman_1_la_LIBADD += libpixman-sse2.la + +ASM_CFLAGS_sse2=$(SSE2_CFLAGS) +endif + +# arm simd code +if USE_ARM_SIMD +noinst_LTLIBRARIES += libpixman-arm-simd.la +libpixman_arm_simd_la_SOURCES = \ + pixman-arm-simd.c \ + pixman-arm-common.h \ + pixman-arm-simd-asm.S +libpixman_arm_simd_la_CFLAGS = $(DEP_CFLAGS) +libpixman_arm_simd_la_LIBADD = $(DEP_LIBS) +libpixman_1_la_LIBADD += libpixman-arm-simd.la + +ASM_CFLAGS_arm_simd= +endif + +# arm neon code +if USE_ARM_NEON +noinst_LTLIBRARIES += libpixman-arm-neon.la +libpixman_arm_neon_la_SOURCES = \ + pixman-arm-neon.c \ + pixman-arm-common.h \ + pixman-arm-neon-asm.S \ + pixman-arm-neon-asm-bilinear.S \ + pixman-arm-neon-asm.h +libpixman_arm_neon_la_CFLAGS = $(DEP_CFLAGS) +libpixman_arm_neon_la_LIBADD = $(DEP_LIBS) +libpixman_1_la_LIBADD += libpixman-arm-neon.la + +ASM_CFLAGS_arm_neon= +endif + +.c.s : $(libpixmaninclude_HEADERS) $(BUILT_SOURCES) + $(CC) $(CFLAGS) $(ASM_CFLAGS_$(@:pixman-%.s=%)) $(ASM_CFLAGS_$(@:pixman-arm-%.s=arm_%)) -DHAVE_CONFIG_H -I$(srcdir) -I$(builddir) -I$(top_builddir) -S -o $@ $< diff --git a/pixman/pixman/pixman-bits-image.c b/pixman/pixman/pixman-bits-image.c index 88c2f0eea..40ccaa8bd 100644 --- a/pixman/pixman/pixman-bits-image.c +++ b/pixman/pixman/pixman-bits-image.c @@ -1462,43 +1462,22 @@ dest_write_back_wide (pixman_iter_t *iter) iter->y++; } -static void -dest_write_back_direct (pixman_iter_t *iter) -{ - iter->buffer += iter->image->bits.rowstride; -} - void _pixman_bits_image_dest_iter_init (pixman_image_t *image, pixman_iter_t *iter) { if (iter->flags & ITER_NARROW) { - if (((image->common.flags & - (FAST_PATH_NO_ALPHA_MAP | FAST_PATH_NO_ACCESSORS)) == - (FAST_PATH_NO_ALPHA_MAP | FAST_PATH_NO_ACCESSORS)) && - (image->bits.format == PIXMAN_a8r8g8b8 || - (image->bits.format == PIXMAN_x8r8g8b8 && - (iter->flags & ITER_LOCALIZED_ALPHA)))) + if ((iter->flags & (ITER_IGNORE_RGB | ITER_IGNORE_ALPHA)) == + (ITER_IGNORE_RGB | ITER_IGNORE_ALPHA)) { - iter->buffer = image->bits.bits + iter->y * image->bits.rowstride + iter->x; - iter->get_scanline = _pixman_iter_get_scanline_noop; - iter->write_back = dest_write_back_direct; } else { - if ((iter->flags & (ITER_IGNORE_RGB | ITER_IGNORE_ALPHA)) == - (ITER_IGNORE_RGB | ITER_IGNORE_ALPHA)) - { - iter->get_scanline = _pixman_iter_get_scanline_noop; - } - else - { - iter->get_scanline = dest_get_scanline_narrow; - } - - iter->write_back = dest_write_back_narrow; + iter->get_scanline = dest_get_scanline_narrow; } + + iter->write_back = dest_write_back_narrow; } else { diff --git a/pixman/pixman/pixman-cpu.c b/pixman/pixman/pixman-cpu.c index 0e14ecb6f..77e5b7f7a 100644 --- a/pixman/pixman/pixman-cpu.c +++ b/pixman/pixman/pixman-cpu.c @@ -1,611 +1,613 @@ -/* - * Copyright © 2000 SuSE, Inc. - * Copyright © 2007 Red Hat, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ -#ifdef HAVE_CONFIG_H -#include -#endif - -#include - -#if defined(USE_ARM_SIMD) && defined(_MSC_VER) -/* Needed for EXCEPTION_ILLEGAL_INSTRUCTION */ -#include -#endif - -#include "pixman-private.h" - -#ifdef USE_VMX - -/* The CPU detection code needs to be in a file not compiled with - * "-maltivec -mabi=altivec", as gcc would try to save vector register - * across function calls causing SIGILL on cpus without Altivec/vmx. - */ -static pixman_bool_t initialized = FALSE; -static volatile pixman_bool_t have_vmx = TRUE; - -#ifdef __APPLE__ -#include - -static pixman_bool_t -pixman_have_vmx (void) -{ - if (!initialized) - { - size_t length = sizeof(have_vmx); - int error = - sysctlbyname ("hw.optional.altivec", &have_vmx, &length, NULL, 0); - - if (error) - have_vmx = FALSE; - - initialized = TRUE; - } - return have_vmx; -} - -#elif defined (__OpenBSD__) -#include -#include -#include - -static pixman_bool_t -pixman_have_vmx (void) -{ - if (!initialized) - { - int mib[2] = { CTL_MACHDEP, CPU_ALTIVEC }; - size_t length = sizeof(have_vmx); - int error = - sysctl (mib, 2, &have_vmx, &length, NULL, 0); - - if (error != 0) - have_vmx = FALSE; - - initialized = TRUE; - } - return have_vmx; -} - -#elif defined (__linux__) -#include -#include -#include -#include -#include -#include -#include - -static pixman_bool_t -pixman_have_vmx (void) -{ - if (!initialized) - { - char fname[64]; - unsigned long buf[64]; - ssize_t count = 0; - pid_t pid; - int fd, i; - - pid = getpid (); - snprintf (fname, sizeof(fname) - 1, "/proc/%d/auxv", pid); - - fd = open (fname, O_RDONLY); - if (fd >= 0) - { - for (i = 0; i <= (count / sizeof(unsigned long)); i += 2) - { - /* Read more if buf is empty... */ - if (i == (count / sizeof(unsigned long))) - { - count = read (fd, buf, sizeof(buf)); - if (count <= 0) - break; - i = 0; - } - - if (buf[i] == AT_HWCAP) - { - have_vmx = !!(buf[i + 1] & PPC_FEATURE_HAS_ALTIVEC); - initialized = TRUE; - break; - } - else if (buf[i] == AT_NULL) - { - break; - } - } - close (fd); - } - } - if (!initialized) - { - /* Something went wrong. Assume 'no' rather than playing - fragile tricks with catching SIGILL. */ - have_vmx = FALSE; - initialized = TRUE; - } - - return have_vmx; -} - -#else /* !__APPLE__ && !__OpenBSD__ && !__linux__ */ -#include -#include - -static jmp_buf jump_env; - -static void -vmx_test (int sig, - siginfo_t *si, - void * unused) -{ - longjmp (jump_env, 1); -} - -static pixman_bool_t -pixman_have_vmx (void) -{ - struct sigaction sa, osa; - int jmp_result; - - if (!initialized) - { - sa.sa_flags = SA_SIGINFO; - sigemptyset (&sa.sa_mask); - sa.sa_sigaction = vmx_test; - sigaction (SIGILL, &sa, &osa); - jmp_result = setjmp (jump_env); - if (jmp_result == 0) - { - asm volatile ( "vor 0, 0, 0" ); - } - sigaction (SIGILL, &osa, NULL); - have_vmx = (jmp_result == 0); - initialized = TRUE; - } - return have_vmx; -} - -#endif /* __APPLE__ */ -#endif /* USE_VMX */ - -#if defined(USE_ARM_SIMD) || defined(USE_ARM_NEON) - -#if defined(_MSC_VER) - -#if defined(USE_ARM_SIMD) -extern int pixman_msvc_try_arm_simd_op (); - -pixman_bool_t -pixman_have_arm_simd (void) -{ - static pixman_bool_t initialized = FALSE; - static pixman_bool_t have_arm_simd = FALSE; - - if (!initialized) - { - __try { - pixman_msvc_try_arm_simd_op (); - have_arm_simd = TRUE; - } __except (GetExceptionCode () == EXCEPTION_ILLEGAL_INSTRUCTION) { - have_arm_simd = FALSE; - } - initialized = TRUE; - } - - return have_arm_simd; -} - -#endif /* USE_ARM_SIMD */ - -#if defined(USE_ARM_NEON) -extern int pixman_msvc_try_arm_neon_op (); - -pixman_bool_t -pixman_have_arm_neon (void) -{ - static pixman_bool_t initialized = FALSE; - static pixman_bool_t have_arm_neon = FALSE; - - if (!initialized) - { - __try - { - pixman_msvc_try_arm_neon_op (); - have_arm_neon = TRUE; - } - __except (GetExceptionCode () == EXCEPTION_ILLEGAL_INSTRUCTION) - { - have_arm_neon = FALSE; - } - initialized = TRUE; - } - - return have_arm_neon; -} - -#endif /* USE_ARM_NEON */ - -#elif defined (__linux__) /* linux ELF */ - -#include -#include -#include -#include -#include -#include -#include -#include - -static pixman_bool_t arm_has_v7 = FALSE; -static pixman_bool_t arm_has_v6 = FALSE; -static pixman_bool_t arm_has_vfp = FALSE; -static pixman_bool_t arm_has_neon = FALSE; -static pixman_bool_t arm_has_iwmmxt = FALSE; -static pixman_bool_t arm_tests_initialized = FALSE; - -static void -pixman_arm_read_auxv () -{ - int fd; - Elf32_auxv_t aux; - - fd = open ("/proc/self/auxv", O_RDONLY); - if (fd >= 0) - { - while (read (fd, &aux, sizeof(Elf32_auxv_t)) == sizeof(Elf32_auxv_t)) - { - if (aux.a_type == AT_HWCAP) - { - uint32_t hwcap = aux.a_un.a_val; - /* hardcode these values to avoid depending on specific - * versions of the hwcap header, e.g. HWCAP_NEON - */ - arm_has_vfp = (hwcap & 64) != 0; - arm_has_iwmmxt = (hwcap & 512) != 0; - /* this flag is only present on kernel 2.6.29 */ - arm_has_neon = (hwcap & 4096) != 0; - } - else if (aux.a_type == AT_PLATFORM) - { - const char *plat = (const char*) aux.a_un.a_val; - if (strncmp (plat, "v7l", 3) == 0) - { - arm_has_v7 = TRUE; - arm_has_v6 = TRUE; - } - else if (strncmp (plat, "v6l", 3) == 0) - { - arm_has_v6 = TRUE; - } - } - } - close (fd); - } - - arm_tests_initialized = TRUE; -} - -#if defined(USE_ARM_SIMD) -pixman_bool_t -pixman_have_arm_simd (void) -{ - if (!arm_tests_initialized) - pixman_arm_read_auxv (); - - return arm_has_v6; -} - -#endif /* USE_ARM_SIMD */ - -#if defined(USE_ARM_NEON) -pixman_bool_t -pixman_have_arm_neon (void) -{ - if (!arm_tests_initialized) - pixman_arm_read_auxv (); - - return arm_has_neon; -} - -#endif /* USE_ARM_NEON */ - -#else /* linux ELF */ - -#define pixman_have_arm_simd() FALSE -#define pixman_have_arm_neon() FALSE - -#endif - -#endif /* USE_ARM_SIMD || USE_ARM_NEON */ - -#if defined(USE_MMX) || defined(USE_SSE2) -/* The CPU detection code needs to be in a file not compiled with - * "-mmmx -msse", as gcc would generate CMOV instructions otherwise - * that would lead to SIGILL instructions on old CPUs that don't have - * it. - */ -#if !defined(__amd64__) && !defined(__x86_64__) && !defined(_M_AMD64) - -#ifdef HAVE_GETISAX -#include -#endif - -typedef enum -{ - NO_FEATURES = 0, - MMX = 0x1, - MMX_EXTENSIONS = 0x2, - SSE = 0x6, - SSE2 = 0x8, - CMOV = 0x10 -} cpu_features_t; - - -static unsigned int -detect_cpu_features (void) -{ - unsigned int features = 0; - unsigned int result = 0; - -#ifdef HAVE_GETISAX - if (getisax (&result, 1)) - { - if (result & AV_386_CMOV) - features |= CMOV; - if (result & AV_386_MMX) - features |= MMX; - if (result & AV_386_AMD_MMX) - features |= MMX_EXTENSIONS; - if (result & AV_386_SSE) - features |= SSE; - if (result & AV_386_SSE2) - features |= SSE2; - } -#else - char vendor[13]; -#ifdef _MSC_VER - int vendor0 = 0, vendor1, vendor2; -#endif - vendor[0] = 0; - vendor[12] = 0; - -#ifdef __GNUC__ - /* see p. 118 of amd64 instruction set manual Vol3 */ - /* We need to be careful about the handling of %ebx and - * %esp here. We can't declare either one as clobbered - * since they are special registers (%ebx is the "PIC - * register" holding an offset to global data, %esp the - * stack pointer), so we need to make sure they have their - * original values when we access the output operands. - */ - __asm__ ( - "pushf\n" - "pop %%eax\n" - "mov %%eax, %%ecx\n" - "xor $0x00200000, %%eax\n" - "push %%eax\n" - "popf\n" - "pushf\n" - "pop %%eax\n" - "mov $0x0, %%edx\n" - "xor %%ecx, %%eax\n" - "jz 1f\n" - - "mov $0x00000000, %%eax\n" - "push %%ebx\n" - "cpuid\n" - "mov %%ebx, %%eax\n" - "pop %%ebx\n" - "mov %%eax, %1\n" - "mov %%edx, %2\n" - "mov %%ecx, %3\n" - "mov $0x00000001, %%eax\n" - "push %%ebx\n" - "cpuid\n" - "pop %%ebx\n" - "1:\n" - "mov %%edx, %0\n" - : "=r" (result), - "=m" (vendor[0]), - "=m" (vendor[4]), - "=m" (vendor[8]) - : - : "%eax", "%ecx", "%edx" - ); - -#elif defined (_MSC_VER) - - _asm { - pushfd - pop eax - mov ecx, eax - xor eax, 00200000h - push eax - popfd - pushfd - pop eax - mov edx, 0 - xor eax, ecx - jz nocpuid - - mov eax, 0 - push ebx - cpuid - mov eax, ebx - pop ebx - mov vendor0, eax - mov vendor1, edx - mov vendor2, ecx - mov eax, 1 - push ebx - cpuid - pop ebx - nocpuid: - mov result, edx - } - memmove (vendor + 0, &vendor0, 4); - memmove (vendor + 4, &vendor1, 4); - memmove (vendor + 8, &vendor2, 4); - -#else -# error unsupported compiler -#endif - - features = 0; - if (result) - { - /* result now contains the standard feature bits */ - if (result & (1 << 15)) - features |= CMOV; - if (result & (1 << 23)) - features |= MMX; - if (result & (1 << 25)) - features |= SSE; - if (result & (1 << 26)) - features |= SSE2; - if ((features & MMX) && !(features & SSE) && - (strcmp (vendor, "AuthenticAMD") == 0 || - strcmp (vendor, "Geode by NSC") == 0)) - { - /* check for AMD MMX extensions */ -#ifdef __GNUC__ - __asm__ ( - " push %%ebx\n" - " mov $0x80000000, %%eax\n" - " cpuid\n" - " xor %%edx, %%edx\n" - " cmp $0x1, %%eax\n" - " jge 2f\n" - " mov $0x80000001, %%eax\n" - " cpuid\n" - "2:\n" - " pop %%ebx\n" - " mov %%edx, %0\n" - : "=r" (result) - : - : "%eax", "%ecx", "%edx" - ); -#elif defined _MSC_VER - _asm { - push ebx - mov eax, 80000000h - cpuid - xor edx, edx - cmp eax, 1 - jge notamd - mov eax, 80000001h - cpuid - notamd: - pop ebx - mov result, edx - } -#endif - if (result & (1 << 22)) - features |= MMX_EXTENSIONS; - } - } -#endif /* HAVE_GETISAX */ - - return features; -} - -static pixman_bool_t -pixman_have_mmx (void) -{ - static pixman_bool_t initialized = FALSE; - static pixman_bool_t mmx_present; - - if (!initialized) - { - unsigned int features = detect_cpu_features (); - mmx_present = (features & (MMX | MMX_EXTENSIONS)) == (MMX | MMX_EXTENSIONS); - initialized = TRUE; - } - - return mmx_present; -} - -#ifdef USE_SSE2 -static pixman_bool_t -pixman_have_sse2 (void) -{ - static pixman_bool_t initialized = FALSE; - static pixman_bool_t sse2_present; - - if (!initialized) - { - unsigned int features = detect_cpu_features (); - sse2_present = (features & (MMX | MMX_EXTENSIONS | SSE | SSE2)) == (MMX | MMX_EXTENSIONS | SSE | SSE2); - initialized = TRUE; - } - - return sse2_present; -} - -#endif - -#else /* __amd64__ */ -#ifdef USE_MMX -#define pixman_have_mmx() TRUE -#endif -#ifdef USE_SSE2 -#define pixman_have_sse2() TRUE -#endif -#endif /* __amd64__ */ -#endif - -pixman_implementation_t * -_pixman_choose_implementation (void) -{ - pixman_implementation_t *imp; - - imp = _pixman_implementation_create_general(); - imp = _pixman_implementation_create_fast_path (imp); - -#ifdef USE_MMX - if (pixman_have_mmx ()) - imp = _pixman_implementation_create_mmx (imp); -#endif - -#ifdef USE_SSE2 - if (pixman_have_sse2 ()) - imp = _pixman_implementation_create_sse2 (imp); -#endif - -#ifdef USE_ARM_SIMD - if (pixman_have_arm_simd ()) - imp = _pixman_implementation_create_arm_simd (imp); -#endif - -#ifdef USE_ARM_NEON - if (pixman_have_arm_neon ()) - imp = _pixman_implementation_create_arm_neon (imp); -#endif - -#ifdef USE_VMX - if (pixman_have_vmx ()) - imp = _pixman_implementation_create_vmx (imp); -#endif - - return imp; -} - +/* + * Copyright © 2000 SuSE, Inc. + * Copyright © 2007 Red Hat, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of SuSE not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. SuSE makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE + * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ +#ifdef HAVE_CONFIG_H +#include +#endif + +#include + +#if defined(USE_ARM_SIMD) && defined(_MSC_VER) +/* Needed for EXCEPTION_ILLEGAL_INSTRUCTION */ +#include +#endif + +#include "pixman-private.h" + +#ifdef USE_VMX + +/* The CPU detection code needs to be in a file not compiled with + * "-maltivec -mabi=altivec", as gcc would try to save vector register + * across function calls causing SIGILL on cpus without Altivec/vmx. + */ +static pixman_bool_t initialized = FALSE; +static volatile pixman_bool_t have_vmx = TRUE; + +#ifdef __APPLE__ +#include + +static pixman_bool_t +pixman_have_vmx (void) +{ + if (!initialized) + { + size_t length = sizeof(have_vmx); + int error = + sysctlbyname ("hw.optional.altivec", &have_vmx, &length, NULL, 0); + + if (error) + have_vmx = FALSE; + + initialized = TRUE; + } + return have_vmx; +} + +#elif defined (__OpenBSD__) +#include +#include +#include + +static pixman_bool_t +pixman_have_vmx (void) +{ + if (!initialized) + { + int mib[2] = { CTL_MACHDEP, CPU_ALTIVEC }; + size_t length = sizeof(have_vmx); + int error = + sysctl (mib, 2, &have_vmx, &length, NULL, 0); + + if (error != 0) + have_vmx = FALSE; + + initialized = TRUE; + } + return have_vmx; +} + +#elif defined (__linux__) +#include +#include +#include +#include +#include +#include +#include + +static pixman_bool_t +pixman_have_vmx (void) +{ + if (!initialized) + { + char fname[64]; + unsigned long buf[64]; + ssize_t count = 0; + pid_t pid; + int fd, i; + + pid = getpid (); + snprintf (fname, sizeof(fname) - 1, "/proc/%d/auxv", pid); + + fd = open (fname, O_RDONLY); + if (fd >= 0) + { + for (i = 0; i <= (count / sizeof(unsigned long)); i += 2) + { + /* Read more if buf is empty... */ + if (i == (count / sizeof(unsigned long))) + { + count = read (fd, buf, sizeof(buf)); + if (count <= 0) + break; + i = 0; + } + + if (buf[i] == AT_HWCAP) + { + have_vmx = !!(buf[i + 1] & PPC_FEATURE_HAS_ALTIVEC); + initialized = TRUE; + break; + } + else if (buf[i] == AT_NULL) + { + break; + } + } + close (fd); + } + } + if (!initialized) + { + /* Something went wrong. Assume 'no' rather than playing + fragile tricks with catching SIGILL. */ + have_vmx = FALSE; + initialized = TRUE; + } + + return have_vmx; +} + +#else /* !__APPLE__ && !__OpenBSD__ && !__linux__ */ +#include +#include + +static jmp_buf jump_env; + +static void +vmx_test (int sig, + siginfo_t *si, + void * unused) +{ + longjmp (jump_env, 1); +} + +static pixman_bool_t +pixman_have_vmx (void) +{ + struct sigaction sa, osa; + int jmp_result; + + if (!initialized) + { + sa.sa_flags = SA_SIGINFO; + sigemptyset (&sa.sa_mask); + sa.sa_sigaction = vmx_test; + sigaction (SIGILL, &sa, &osa); + jmp_result = setjmp (jump_env); + if (jmp_result == 0) + { + asm volatile ( "vor 0, 0, 0" ); + } + sigaction (SIGILL, &osa, NULL); + have_vmx = (jmp_result == 0); + initialized = TRUE; + } + return have_vmx; +} + +#endif /* __APPLE__ */ +#endif /* USE_VMX */ + +#if defined(USE_ARM_SIMD) || defined(USE_ARM_NEON) + +#if defined(_MSC_VER) + +#if defined(USE_ARM_SIMD) +extern int pixman_msvc_try_arm_simd_op (); + +pixman_bool_t +pixman_have_arm_simd (void) +{ + static pixman_bool_t initialized = FALSE; + static pixman_bool_t have_arm_simd = FALSE; + + if (!initialized) + { + __try { + pixman_msvc_try_arm_simd_op (); + have_arm_simd = TRUE; + } __except (GetExceptionCode () == EXCEPTION_ILLEGAL_INSTRUCTION) { + have_arm_simd = FALSE; + } + initialized = TRUE; + } + + return have_arm_simd; +} + +#endif /* USE_ARM_SIMD */ + +#if defined(USE_ARM_NEON) +extern int pixman_msvc_try_arm_neon_op (); + +pixman_bool_t +pixman_have_arm_neon (void) +{ + static pixman_bool_t initialized = FALSE; + static pixman_bool_t have_arm_neon = FALSE; + + if (!initialized) + { + __try + { + pixman_msvc_try_arm_neon_op (); + have_arm_neon = TRUE; + } + __except (GetExceptionCode () == EXCEPTION_ILLEGAL_INSTRUCTION) + { + have_arm_neon = FALSE; + } + initialized = TRUE; + } + + return have_arm_neon; +} + +#endif /* USE_ARM_NEON */ + +#elif defined (__linux__) /* linux ELF */ + +#include +#include +#include +#include +#include +#include +#include +#include + +static pixman_bool_t arm_has_v7 = FALSE; +static pixman_bool_t arm_has_v6 = FALSE; +static pixman_bool_t arm_has_vfp = FALSE; +static pixman_bool_t arm_has_neon = FALSE; +static pixman_bool_t arm_has_iwmmxt = FALSE; +static pixman_bool_t arm_tests_initialized = FALSE; + +static void +pixman_arm_read_auxv () +{ + int fd; + Elf32_auxv_t aux; + + fd = open ("/proc/self/auxv", O_RDONLY); + if (fd >= 0) + { + while (read (fd, &aux, sizeof(Elf32_auxv_t)) == sizeof(Elf32_auxv_t)) + { + if (aux.a_type == AT_HWCAP) + { + uint32_t hwcap = aux.a_un.a_val; + /* hardcode these values to avoid depending on specific + * versions of the hwcap header, e.g. HWCAP_NEON + */ + arm_has_vfp = (hwcap & 64) != 0; + arm_has_iwmmxt = (hwcap & 512) != 0; + /* this flag is only present on kernel 2.6.29 */ + arm_has_neon = (hwcap & 4096) != 0; + } + else if (aux.a_type == AT_PLATFORM) + { + const char *plat = (const char*) aux.a_un.a_val; + if (strncmp (plat, "v7l", 3) == 0) + { + arm_has_v7 = TRUE; + arm_has_v6 = TRUE; + } + else if (strncmp (plat, "v6l", 3) == 0) + { + arm_has_v6 = TRUE; + } + } + } + close (fd); + } + + arm_tests_initialized = TRUE; +} + +#if defined(USE_ARM_SIMD) +pixman_bool_t +pixman_have_arm_simd (void) +{ + if (!arm_tests_initialized) + pixman_arm_read_auxv (); + + return arm_has_v6; +} + +#endif /* USE_ARM_SIMD */ + +#if defined(USE_ARM_NEON) +pixman_bool_t +pixman_have_arm_neon (void) +{ + if (!arm_tests_initialized) + pixman_arm_read_auxv (); + + return arm_has_neon; +} + +#endif /* USE_ARM_NEON */ + +#else /* linux ELF */ + +#define pixman_have_arm_simd() FALSE +#define pixman_have_arm_neon() FALSE + +#endif + +#endif /* USE_ARM_SIMD || USE_ARM_NEON */ + +#if defined(USE_MMX) || defined(USE_SSE2) +/* The CPU detection code needs to be in a file not compiled with + * "-mmmx -msse", as gcc would generate CMOV instructions otherwise + * that would lead to SIGILL instructions on old CPUs that don't have + * it. + */ +#if !defined(__amd64__) && !defined(__x86_64__) && !defined(_M_AMD64) + +#ifdef HAVE_GETISAX +#include +#endif + +typedef enum +{ + NO_FEATURES = 0, + MMX = 0x1, + MMX_EXTENSIONS = 0x2, + SSE = 0x6, + SSE2 = 0x8, + CMOV = 0x10 +} cpu_features_t; + + +static unsigned int +detect_cpu_features (void) +{ + unsigned int features = 0; + unsigned int result = 0; + +#ifdef HAVE_GETISAX + if (getisax (&result, 1)) + { + if (result & AV_386_CMOV) + features |= CMOV; + if (result & AV_386_MMX) + features |= MMX; + if (result & AV_386_AMD_MMX) + features |= MMX_EXTENSIONS; + if (result & AV_386_SSE) + features |= SSE; + if (result & AV_386_SSE2) + features |= SSE2; + } +#else + char vendor[13]; +#ifdef _MSC_VER + int vendor0 = 0, vendor1, vendor2; +#endif + vendor[0] = 0; + vendor[12] = 0; + +#ifdef __GNUC__ + /* see p. 118 of amd64 instruction set manual Vol3 */ + /* We need to be careful about the handling of %ebx and + * %esp here. We can't declare either one as clobbered + * since they are special registers (%ebx is the "PIC + * register" holding an offset to global data, %esp the + * stack pointer), so we need to make sure they have their + * original values when we access the output operands. + */ + __asm__ ( + "pushf\n" + "pop %%eax\n" + "mov %%eax, %%ecx\n" + "xor $0x00200000, %%eax\n" + "push %%eax\n" + "popf\n" + "pushf\n" + "pop %%eax\n" + "mov $0x0, %%edx\n" + "xor %%ecx, %%eax\n" + "jz 1f\n" + + "mov $0x00000000, %%eax\n" + "push %%ebx\n" + "cpuid\n" + "mov %%ebx, %%eax\n" + "pop %%ebx\n" + "mov %%eax, %1\n" + "mov %%edx, %2\n" + "mov %%ecx, %3\n" + "mov $0x00000001, %%eax\n" + "push %%ebx\n" + "cpuid\n" + "pop %%ebx\n" + "1:\n" + "mov %%edx, %0\n" + : "=r" (result), + "=m" (vendor[0]), + "=m" (vendor[4]), + "=m" (vendor[8]) + : + : "%eax", "%ecx", "%edx" + ); + +#elif defined (_MSC_VER) + + _asm { + pushfd + pop eax + mov ecx, eax + xor eax, 00200000h + push eax + popfd + pushfd + pop eax + mov edx, 0 + xor eax, ecx + jz nocpuid + + mov eax, 0 + push ebx + cpuid + mov eax, ebx + pop ebx + mov vendor0, eax + mov vendor1, edx + mov vendor2, ecx + mov eax, 1 + push ebx + cpuid + pop ebx + nocpuid: + mov result, edx + } + memmove (vendor + 0, &vendor0, 4); + memmove (vendor + 4, &vendor1, 4); + memmove (vendor + 8, &vendor2, 4); + +#else +# error unsupported compiler +#endif + + features = 0; + if (result) + { + /* result now contains the standard feature bits */ + if (result & (1 << 15)) + features |= CMOV; + if (result & (1 << 23)) + features |= MMX; + if (result & (1 << 25)) + features |= SSE; + if (result & (1 << 26)) + features |= SSE2; + if ((features & MMX) && !(features & SSE) && + (strcmp (vendor, "AuthenticAMD") == 0 || + strcmp (vendor, "Geode by NSC") == 0)) + { + /* check for AMD MMX extensions */ +#ifdef __GNUC__ + __asm__ ( + " push %%ebx\n" + " mov $0x80000000, %%eax\n" + " cpuid\n" + " xor %%edx, %%edx\n" + " cmp $0x1, %%eax\n" + " jge 2f\n" + " mov $0x80000001, %%eax\n" + " cpuid\n" + "2:\n" + " pop %%ebx\n" + " mov %%edx, %0\n" + : "=r" (result) + : + : "%eax", "%ecx", "%edx" + ); +#elif defined _MSC_VER + _asm { + push ebx + mov eax, 80000000h + cpuid + xor edx, edx + cmp eax, 1 + jge notamd + mov eax, 80000001h + cpuid + notamd: + pop ebx + mov result, edx + } +#endif + if (result & (1 << 22)) + features |= MMX_EXTENSIONS; + } + } +#endif /* HAVE_GETISAX */ + + return features; +} + +static pixman_bool_t +pixman_have_mmx (void) +{ + static pixman_bool_t initialized = FALSE; + static pixman_bool_t mmx_present; + + if (!initialized) + { + unsigned int features = detect_cpu_features (); + mmx_present = (features & (MMX | MMX_EXTENSIONS)) == (MMX | MMX_EXTENSIONS); + initialized = TRUE; + } + + return mmx_present; +} + +#ifdef USE_SSE2 +static pixman_bool_t +pixman_have_sse2 (void) +{ + static pixman_bool_t initialized = FALSE; + static pixman_bool_t sse2_present; + + if (!initialized) + { + unsigned int features = detect_cpu_features (); + sse2_present = (features & (MMX | MMX_EXTENSIONS | SSE | SSE2)) == (MMX | MMX_EXTENSIONS | SSE | SSE2); + initialized = TRUE; + } + + return sse2_present; +} + +#endif + +#else /* __amd64__ */ +#ifdef USE_MMX +#define pixman_have_mmx() TRUE +#endif +#ifdef USE_SSE2 +#define pixman_have_sse2() TRUE +#endif +#endif /* __amd64__ */ +#endif + +pixman_implementation_t * +_pixman_choose_implementation (void) +{ + pixman_implementation_t *imp; + + imp = _pixman_implementation_create_general(); + imp = _pixman_implementation_create_fast_path (imp); + +#ifdef USE_MMX + if (pixman_have_mmx ()) + imp = _pixman_implementation_create_mmx (imp); +#endif + +#ifdef USE_SSE2 + if (pixman_have_sse2 ()) + imp = _pixman_implementation_create_sse2 (imp); +#endif + +#ifdef USE_ARM_SIMD + if (pixman_have_arm_simd ()) + imp = _pixman_implementation_create_arm_simd (imp); +#endif + +#ifdef USE_ARM_NEON + if (pixman_have_arm_neon ()) + imp = _pixman_implementation_create_arm_neon (imp); +#endif + +#ifdef USE_VMX + if (pixman_have_vmx ()) + imp = _pixman_implementation_create_vmx (imp); +#endif + + imp = _pixman_implementation_create_noop (imp); + + return imp; +} + diff --git a/pixman/pixman/pixman-implementation.c b/pixman/pixman/pixman-implementation.c index caade9332..bbabec089 100644 --- a/pixman/pixman/pixman-implementation.c +++ b/pixman/pixman/pixman-implementation.c @@ -241,12 +241,6 @@ _pixman_implementation_fill (pixman_implementation_t *imp, return (*imp->fill) (imp, bits, stride, bpp, x, y, width, height, xor); } -static uint32_t * -get_scanline_null (pixman_iter_t *iter, const uint32_t *mask) -{ - return NULL; -} - void _pixman_implementation_src_iter_init (pixman_implementation_t *imp, pixman_iter_t *iter, @@ -266,19 +260,7 @@ _pixman_implementation_src_iter_init (pixman_implementation_t *imp, iter->height = height; iter->flags = flags; - if (!image) - { - iter->get_scanline = get_scanline_null; - } - else if ((flags & (ITER_IGNORE_ALPHA | ITER_IGNORE_RGB)) == - (ITER_IGNORE_ALPHA | ITER_IGNORE_RGB)) - { - iter->get_scanline = _pixman_iter_get_scanline_noop; - } - else - { - (*imp->src_iter_init) (imp, iter); - } + (*imp->src_iter_init) (imp, iter); } void diff --git a/pixman/pixman/pixman-noop.c b/pixman/pixman/pixman-noop.c new file mode 100644 index 000000000..54ff17f87 --- /dev/null +++ b/pixman/pixman/pixman-noop.c @@ -0,0 +1,148 @@ +/* -*- Mode: c; c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t; -*- */ +/* + * Copyright © 2011 Red Hat, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice (including the next + * paragraph) shall be included in all copies or substantial portions of the + * Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ +#ifdef HAVE_CONFIG_H +#include +#endif +#include +#include +#include "pixman-private.h" +#include "pixman-combine32.h" +#include "pixman-fast-path.h" + +static void +noop_composite (pixman_implementation_t *imp, + pixman_op_t op, + pixman_image_t * src, + pixman_image_t * mask, + pixman_image_t * dest, + int32_t src_x, + int32_t src_y, + int32_t mask_x, + int32_t mask_y, + int32_t dest_x, + int32_t dest_y, + int32_t width, + int32_t height) +{ + return; +} + +static void +dest_write_back_direct (pixman_iter_t *iter) +{ + iter->buffer += iter->image->bits.rowstride; +} + +static uint32_t * +noop_get_scanline (pixman_iter_t *iter, const uint32_t *mask) +{ + uint32_t *result = iter->buffer; + + iter->buffer += iter->image->bits.rowstride; + + return result; +} + +static uint32_t * +get_scanline_null (pixman_iter_t *iter, const uint32_t *mask) +{ + return NULL; +} + +static void +noop_src_iter_init (pixman_implementation_t *imp, pixman_iter_t *iter) +{ + pixman_image_t *image = iter->image; + +#define FLAGS \ + (FAST_PATH_STANDARD_FLAGS | FAST_PATH_ID_TRANSFORM) + + if (!image) + { + iter->get_scanline = get_scanline_null; + } + else if ((iter->flags & (ITER_IGNORE_ALPHA | ITER_IGNORE_RGB)) == + (ITER_IGNORE_ALPHA | ITER_IGNORE_RGB)) + { + iter->get_scanline = _pixman_iter_get_scanline_noop; + } + else if ((iter->flags & ITER_NARROW) && + (image->common.flags & FLAGS) == FLAGS && + iter->x >= 0 && iter->y >= 0 && + iter->x + iter->width <= image->bits.width && + iter->y + iter->height <= image->bits.height && + image->common.extended_format_code == PIXMAN_a8r8g8b8) + { + iter->buffer = + image->bits.bits + iter->y * image->bits.rowstride + iter->x; + + iter->get_scanline = noop_get_scanline; + } + else + { + (* imp->delegate->src_iter_init) (imp->delegate, iter); + } +} + +static void +noop_dest_iter_init (pixman_implementation_t *imp, pixman_iter_t *iter) +{ + pixman_image_t *image = iter->image; + uint32_t image_flags = image->common.flags; + uint32_t iter_flags = iter->flags; + + if ((image_flags & FAST_PATH_STD_DEST_FLAGS) == FAST_PATH_STD_DEST_FLAGS && + (iter_flags & ITER_NARROW) == ITER_NARROW && + ((image->common.extended_format_code == PIXMAN_a8r8g8b8) || + (image->common.extended_format_code == PIXMAN_x8r8g8b8 && + (iter_flags & (ITER_LOCALIZED_ALPHA))))) + { + iter->buffer = image->bits.bits + iter->y * image->bits.rowstride + iter->x; + + iter->get_scanline = _pixman_iter_get_scanline_noop; + iter->write_back = dest_write_back_direct; + } + else + { + (* imp->delegate->dest_iter_init) (imp->delegate, iter); + } +} + +static const pixman_fast_path_t noop_fast_paths[] = +{ + { PIXMAN_OP_DST, PIXMAN_any, 0, PIXMAN_any, 0, PIXMAN_any, 0, noop_composite }, + { PIXMAN_OP_NONE }, +}; + +pixman_implementation_t * +_pixman_implementation_create_noop (pixman_implementation_t *fallback) +{ + pixman_implementation_t *imp = + _pixman_implementation_create (fallback, noop_fast_paths); + + imp->src_iter_init = noop_src_iter_init; + imp->dest_iter_init = noop_dest_iter_init; + + return imp; +} diff --git a/pixman/pixman/pixman-private.h b/pixman/pixman/pixman-private.h index 658aeea8a..323ae5d1e 100644 --- a/pixman/pixman/pixman-private.h +++ b/pixman/pixman/pixman-private.h @@ -523,6 +523,9 @@ _pixman_implementation_create_general (void); pixman_implementation_t * _pixman_implementation_create_fast_path (pixman_implementation_t *fallback); +pixman_implementation_t * +_pixman_implementation_create_noop (pixman_implementation_t *fallback); + #ifdef USE_MMX pixman_implementation_t * _pixman_implementation_create_mmx (pixman_implementation_t *fallback); diff --git a/pixman/pixman/pixman.c b/pixman/pixman/pixman.c index f21af2f36..7ccb2952f 100644 --- a/pixman/pixman/pixman.c +++ b/pixman/pixman/pixman.c @@ -1,1217 +1,1215 @@ -/* -*- Mode: c; c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t; -*- */ -/* - * Copyright © 2000 SuSE, Inc. - * Copyright © 2007 Red Hat, Inc. - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE - * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * Author: Keith Packard, SuSE, Inc. - */ - -#ifdef HAVE_CONFIG_H -#include -#endif -#include "pixman-private.h" - -#include - -static pixman_implementation_t *global_implementation; - -#ifdef TOOLCHAIN_SUPPORTS_ATTRIBUTE_CONSTRUCTOR -static void __attribute__((constructor)) -pixman_constructor (void) -{ - global_implementation = _pixman_choose_implementation (); -} -#endif - -static force_inline pixman_implementation_t * -get_implementation (void) -{ -#ifndef TOOLCHAIN_SUPPORTS_ATTRIBUTE_CONSTRUCTOR - if (!global_implementation) - global_implementation = _pixman_choose_implementation (); -#endif - return global_implementation; -} - -typedef struct operator_info_t operator_info_t; - -struct operator_info_t -{ - uint8_t opaque_info[4]; -}; - -#define PACK(neither, src, dest, both) \ - {{ (uint8_t)PIXMAN_OP_ ## neither, \ - (uint8_t)PIXMAN_OP_ ## src, \ - (uint8_t)PIXMAN_OP_ ## dest, \ - (uint8_t)PIXMAN_OP_ ## both }} - -static const operator_info_t operator_table[] = -{ - /* Neither Opaque Src Opaque Dst Opaque Both Opaque */ - PACK (CLEAR, CLEAR, CLEAR, CLEAR), - PACK (SRC, SRC, SRC, SRC), - PACK (DST, DST, DST, DST), - PACK (OVER, SRC, OVER, SRC), - PACK (OVER_REVERSE, OVER_REVERSE, DST, DST), - PACK (IN, IN, SRC, SRC), - PACK (IN_REVERSE, DST, IN_REVERSE, DST), - PACK (OUT, OUT, CLEAR, CLEAR), - PACK (OUT_REVERSE, CLEAR, OUT_REVERSE, CLEAR), - PACK (ATOP, IN, OVER, SRC), - PACK (ATOP_REVERSE, OVER_REVERSE, IN_REVERSE, DST), - PACK (XOR, OUT, OUT_REVERSE, CLEAR), - PACK (ADD, ADD, ADD, ADD), - PACK (SATURATE, OVER_REVERSE, DST, DST), - - {{ 0 /* 0x0e */ }}, - {{ 0 /* 0x0f */ }}, - - PACK (CLEAR, CLEAR, CLEAR, CLEAR), - PACK (SRC, SRC, SRC, SRC), - PACK (DST, DST, DST, DST), - PACK (DISJOINT_OVER, DISJOINT_OVER, DISJOINT_OVER, DISJOINT_OVER), - PACK (DISJOINT_OVER_REVERSE, DISJOINT_OVER_REVERSE, DISJOINT_OVER_REVERSE, DISJOINT_OVER_REVERSE), - PACK (DISJOINT_IN, DISJOINT_IN, DISJOINT_IN, DISJOINT_IN), - PACK (DISJOINT_IN_REVERSE, DISJOINT_IN_REVERSE, DISJOINT_IN_REVERSE, DISJOINT_IN_REVERSE), - PACK (DISJOINT_OUT, DISJOINT_OUT, DISJOINT_OUT, DISJOINT_OUT), - PACK (DISJOINT_OUT_REVERSE, DISJOINT_OUT_REVERSE, DISJOINT_OUT_REVERSE, DISJOINT_OUT_REVERSE), - PACK (DISJOINT_ATOP, DISJOINT_ATOP, DISJOINT_ATOP, DISJOINT_ATOP), - PACK (DISJOINT_ATOP_REVERSE, DISJOINT_ATOP_REVERSE, DISJOINT_ATOP_REVERSE, DISJOINT_ATOP_REVERSE), - PACK (DISJOINT_XOR, DISJOINT_XOR, DISJOINT_XOR, DISJOINT_XOR), - - {{ 0 /* 0x1c */ }}, - {{ 0 /* 0x1d */ }}, - {{ 0 /* 0x1e */ }}, - {{ 0 /* 0x1f */ }}, - - PACK (CLEAR, CLEAR, CLEAR, CLEAR), - PACK (SRC, SRC, SRC, SRC), - PACK (DST, DST, DST, DST), - PACK (CONJOINT_OVER, CONJOINT_OVER, CONJOINT_OVER, CONJOINT_OVER), - PACK (CONJOINT_OVER_REVERSE, CONJOINT_OVER_REVERSE, CONJOINT_OVER_REVERSE, CONJOINT_OVER_REVERSE), - PACK (CONJOINT_IN, CONJOINT_IN, CONJOINT_IN, CONJOINT_IN), - PACK (CONJOINT_IN_REVERSE, CONJOINT_IN_REVERSE, CONJOINT_IN_REVERSE, CONJOINT_IN_REVERSE), - PACK (CONJOINT_OUT, CONJOINT_OUT, CONJOINT_OUT, CONJOINT_OUT), - PACK (CONJOINT_OUT_REVERSE, CONJOINT_OUT_REVERSE, CONJOINT_OUT_REVERSE, CONJOINT_OUT_REVERSE), - PACK (CONJOINT_ATOP, CONJOINT_ATOP, CONJOINT_ATOP, CONJOINT_ATOP), - PACK (CONJOINT_ATOP_REVERSE, CONJOINT_ATOP_REVERSE, CONJOINT_ATOP_REVERSE, CONJOINT_ATOP_REVERSE), - PACK (CONJOINT_XOR, CONJOINT_XOR, CONJOINT_XOR, CONJOINT_XOR), - - {{ 0 /* 0x2c */ }}, - {{ 0 /* 0x2d */ }}, - {{ 0 /* 0x2e */ }}, - {{ 0 /* 0x2f */ }}, - - PACK (MULTIPLY, MULTIPLY, MULTIPLY, MULTIPLY), - PACK (SCREEN, SCREEN, SCREEN, SCREEN), - PACK (OVERLAY, OVERLAY, OVERLAY, OVERLAY), - PACK (DARKEN, DARKEN, DARKEN, DARKEN), - PACK (LIGHTEN, LIGHTEN, LIGHTEN, LIGHTEN), - PACK (COLOR_DODGE, COLOR_DODGE, COLOR_DODGE, COLOR_DODGE), - PACK (COLOR_BURN, COLOR_BURN, COLOR_BURN, COLOR_BURN), - PACK (HARD_LIGHT, HARD_LIGHT, HARD_LIGHT, HARD_LIGHT), - PACK (SOFT_LIGHT, SOFT_LIGHT, SOFT_LIGHT, SOFT_LIGHT), - PACK (DIFFERENCE, DIFFERENCE, DIFFERENCE, DIFFERENCE), - PACK (EXCLUSION, EXCLUSION, EXCLUSION, EXCLUSION), - PACK (HSL_HUE, HSL_HUE, HSL_HUE, HSL_HUE), - PACK (HSL_SATURATION, HSL_SATURATION, HSL_SATURATION, HSL_SATURATION), - PACK (HSL_COLOR, HSL_COLOR, HSL_COLOR, HSL_COLOR), - PACK (HSL_LUMINOSITY, HSL_LUMINOSITY, HSL_LUMINOSITY, HSL_LUMINOSITY), -}; - -/* - * Optimize the current operator based on opacity of source or destination - * The output operator should be mathematically equivalent to the source. - */ -static pixman_op_t -optimize_operator (pixman_op_t op, - uint32_t src_flags, - uint32_t mask_flags, - uint32_t dst_flags) -{ - pixman_bool_t is_source_opaque, is_dest_opaque; - -#define OPAQUE_SHIFT 13 - - COMPILE_TIME_ASSERT (FAST_PATH_IS_OPAQUE == (1 << OPAQUE_SHIFT)); - - is_dest_opaque = (dst_flags & FAST_PATH_IS_OPAQUE); - is_source_opaque = ((src_flags & mask_flags) & FAST_PATH_IS_OPAQUE); - - is_dest_opaque >>= OPAQUE_SHIFT - 1; - is_source_opaque >>= OPAQUE_SHIFT; - - return operator_table[op].opaque_info[is_dest_opaque | is_source_opaque]; -} - -/* - * Computing composite region - */ -static inline pixman_bool_t -clip_general_image (pixman_region32_t * region, - pixman_region32_t * clip, - int dx, - int dy) -{ - if (pixman_region32_n_rects (region) == 1 && - pixman_region32_n_rects (clip) == 1) - { - pixman_box32_t * rbox = pixman_region32_rectangles (region, NULL); - pixman_box32_t * cbox = pixman_region32_rectangles (clip, NULL); - int v; - - if (rbox->x1 < (v = cbox->x1 + dx)) - rbox->x1 = v; - if (rbox->x2 > (v = cbox->x2 + dx)) - rbox->x2 = v; - if (rbox->y1 < (v = cbox->y1 + dy)) - rbox->y1 = v; - if (rbox->y2 > (v = cbox->y2 + dy)) - rbox->y2 = v; - if (rbox->x1 >= rbox->x2 || rbox->y1 >= rbox->y2) - { - pixman_region32_init (region); - return FALSE; - } - } - else if (!pixman_region32_not_empty (clip)) - { - return FALSE; - } - else - { - if (dx || dy) - pixman_region32_translate (region, -dx, -dy); - - if (!pixman_region32_intersect (region, region, clip)) - return FALSE; - - if (dx || dy) - pixman_region32_translate (region, dx, dy); - } - - return pixman_region32_not_empty (region); -} - -static inline pixman_bool_t -clip_source_image (pixman_region32_t * region, - pixman_image_t * image, - int dx, - int dy) -{ - /* Source clips are ignored, unless they are explicitly turned on - * and the clip in question was set by an X client. (Because if - * the clip was not set by a client, then it is a hierarchy - * clip and those should always be ignored for sources). - */ - if (!image->common.clip_sources || !image->common.client_clip) - return TRUE; - - return clip_general_image (region, - &image->common.clip_region, - dx, dy); -} - -/* - * returns FALSE if the final region is empty. Indistinguishable from - * an allocation failure, but rendering ignores those anyways. - */ -static pixman_bool_t -pixman_compute_composite_region32 (pixman_region32_t * region, - pixman_image_t * src_image, - pixman_image_t * mask_image, - pixman_image_t * dst_image, - int32_t src_x, - int32_t src_y, - int32_t mask_x, - int32_t mask_y, - int32_t dest_x, - int32_t dest_y, - int32_t width, - int32_t height) -{ - region->extents.x1 = dest_x; - region->extents.x2 = dest_x + width; - region->extents.y1 = dest_y; - region->extents.y2 = dest_y + height; - - region->extents.x1 = MAX (region->extents.x1, 0); - region->extents.y1 = MAX (region->extents.y1, 0); - region->extents.x2 = MIN (region->extents.x2, dst_image->bits.width); - region->extents.y2 = MIN (region->extents.y2, dst_image->bits.height); - - region->data = 0; - - /* Check for empty operation */ - if (region->extents.x1 >= region->extents.x2 || - region->extents.y1 >= region->extents.y2) - { - region->extents.x1 = 0; - region->extents.x2 = 0; - region->extents.y1 = 0; - region->extents.y2 = 0; - return FALSE; - } - - if (dst_image->common.have_clip_region) - { - if (!clip_general_image (region, &dst_image->common.clip_region, 0, 0)) - return FALSE; - } - - if (dst_image->common.alpha_map) - { - if (!pixman_region32_intersect_rect (region, region, - dst_image->common.alpha_origin_x, - dst_image->common.alpha_origin_y, - dst_image->common.alpha_map->width, - dst_image->common.alpha_map->height)) - { - return FALSE; - } - if (!pixman_region32_not_empty (region)) - return FALSE; - if (dst_image->common.alpha_map->common.have_clip_region) - { - if (!clip_general_image (region, &dst_image->common.alpha_map->common.clip_region, - -dst_image->common.alpha_origin_x, - -dst_image->common.alpha_origin_y)) - { - return FALSE; - } - } - } - - /* clip against src */ - if (src_image->common.have_clip_region) - { - if (!clip_source_image (region, src_image, dest_x - src_x, dest_y - src_y)) - return FALSE; - } - if (src_image->common.alpha_map && src_image->common.alpha_map->common.have_clip_region) - { - if (!clip_source_image (region, (pixman_image_t *)src_image->common.alpha_map, - dest_x - (src_x - src_image->common.alpha_origin_x), - dest_y - (src_y - src_image->common.alpha_origin_y))) - { - return FALSE; - } - } - /* clip against mask */ - if (mask_image && mask_image->common.have_clip_region) - { - if (!clip_source_image (region, mask_image, dest_x - mask_x, dest_y - mask_y)) - return FALSE; - - if (mask_image->common.alpha_map && mask_image->common.alpha_map->common.have_clip_region) - { - if (!clip_source_image (region, (pixman_image_t *)mask_image->common.alpha_map, - dest_x - (mask_x - mask_image->common.alpha_origin_x), - dest_y - (mask_y - mask_image->common.alpha_origin_y))) - { - return FALSE; - } - } - } - - return TRUE; -} - -#define N_CACHED_FAST_PATHS 8 - -typedef struct -{ - struct - { - pixman_implementation_t * imp; - pixman_fast_path_t fast_path; - } cache [N_CACHED_FAST_PATHS]; -} cache_t; - -PIXMAN_DEFINE_THREAD_LOCAL (cache_t, fast_path_cache); - -static force_inline pixman_bool_t -lookup_composite_function (pixman_op_t op, - pixman_format_code_t src_format, - uint32_t src_flags, - pixman_format_code_t mask_format, - uint32_t mask_flags, - pixman_format_code_t dest_format, - uint32_t dest_flags, - pixman_implementation_t **out_imp, - pixman_composite_func_t *out_func) -{ - pixman_implementation_t *imp; - cache_t *cache; - int i; - - /* Check cache for fast paths */ - cache = PIXMAN_GET_THREAD_LOCAL (fast_path_cache); - - for (i = 0; i < N_CACHED_FAST_PATHS; ++i) - { - const pixman_fast_path_t *info = &(cache->cache[i].fast_path); - - /* Note that we check for equality here, not whether - * the cached fast path matches. This is to prevent - * us from selecting an overly general fast path - * when a more specific one would work. - */ - if (info->op == op && - info->src_format == src_format && - info->mask_format == mask_format && - info->dest_format == dest_format && - info->src_flags == src_flags && - info->mask_flags == mask_flags && - info->dest_flags == dest_flags && - info->func) - { - *out_imp = cache->cache[i].imp; - *out_func = cache->cache[i].fast_path.func; - - goto update_cache; - } - } - - for (imp = get_implementation (); imp != NULL; imp = imp->delegate) - { - const pixman_fast_path_t *info = imp->fast_paths; - - while (info->op != PIXMAN_OP_NONE) - { - if ((info->op == op || info->op == PIXMAN_OP_any) && - /* Formats */ - ((info->src_format == src_format) || - (info->src_format == PIXMAN_any)) && - ((info->mask_format == mask_format) || - (info->mask_format == PIXMAN_any)) && - ((info->dest_format == dest_format) || - (info->dest_format == PIXMAN_any)) && - /* Flags */ - (info->src_flags & src_flags) == info->src_flags && - (info->mask_flags & mask_flags) == info->mask_flags && - (info->dest_flags & dest_flags) == info->dest_flags) - { - *out_imp = imp; - *out_func = info->func; - - /* Set i to the last spot in the cache so that the - * move-to-front code below will work - */ - i = N_CACHED_FAST_PATHS - 1; - - goto update_cache; - } - - ++info; - } - } - return FALSE; - -update_cache: - if (i) - { - while (i--) - cache->cache[i + 1] = cache->cache[i]; - - cache->cache[0].imp = *out_imp; - cache->cache[0].fast_path.op = op; - cache->cache[0].fast_path.src_format = src_format; - cache->cache[0].fast_path.src_flags = src_flags; - cache->cache[0].fast_path.mask_format = mask_format; - cache->cache[0].fast_path.mask_flags = mask_flags; - cache->cache[0].fast_path.dest_format = dest_format; - cache->cache[0].fast_path.dest_flags = dest_flags; - cache->cache[0].fast_path.func = *out_func; - } - - return TRUE; -} - -static pixman_bool_t -compute_sample_extents (pixman_transform_t *transform, - pixman_box32_t *extents, int x, int y, - pixman_fixed_t x_off, pixman_fixed_t y_off, - pixman_fixed_t width, pixman_fixed_t height) -{ - pixman_fixed_t x1, y1, x2, y2; - pixman_fixed_48_16_t tx1, ty1, tx2, ty2; - - /* We have checked earlier that (extents->x1 - x) etc. fit in a pixman_fixed_t */ - x1 = (pixman_fixed_48_16_t)pixman_int_to_fixed (extents->x1 - x) + pixman_fixed_1 / 2; - y1 = (pixman_fixed_48_16_t)pixman_int_to_fixed (extents->y1 - y) + pixman_fixed_1 / 2; - x2 = (pixman_fixed_48_16_t)pixman_int_to_fixed (extents->x2 - x) - pixman_fixed_1 / 2; - y2 = (pixman_fixed_48_16_t)pixman_int_to_fixed (extents->y2 - y) - pixman_fixed_1 / 2; - - if (!transform) - { - tx1 = (pixman_fixed_48_16_t)x1; - ty1 = (pixman_fixed_48_16_t)y1; - tx2 = (pixman_fixed_48_16_t)x2; - ty2 = (pixman_fixed_48_16_t)y2; - } - else - { - int i; - - /* Silence GCC */ - tx1 = ty1 = tx2 = ty2 = 0; - - for (i = 0; i < 4; ++i) - { - pixman_fixed_48_16_t tx, ty; - pixman_vector_t v; - - v.vector[0] = (i & 0x01)? x1 : x2; - v.vector[1] = (i & 0x02)? y1 : y2; - v.vector[2] = pixman_fixed_1; - - if (!pixman_transform_point (transform, &v)) - return FALSE; - - tx = (pixman_fixed_48_16_t)v.vector[0]; - ty = (pixman_fixed_48_16_t)v.vector[1]; - - if (i == 0) - { - tx1 = tx; - ty1 = ty; - tx2 = tx; - ty2 = ty; - } - else - { - if (tx < tx1) - tx1 = tx; - if (ty < ty1) - ty1 = ty; - if (tx > tx2) - tx2 = tx; - if (ty > ty2) - ty2 = ty; - } - } - } - - /* Expand the source area by a tiny bit so account of different rounding that - * may happen during sampling. Note that (8 * pixman_fixed_e) is very far from - * 0.5 so this won't cause the area computed to be overly pessimistic. - */ - tx1 += x_off - 8 * pixman_fixed_e; - ty1 += y_off - 8 * pixman_fixed_e; - tx2 += x_off + width + 8 * pixman_fixed_e; - ty2 += y_off + height + 8 * pixman_fixed_e; - - if (tx1 < pixman_min_fixed_48_16 || tx1 > pixman_max_fixed_48_16 || - ty1 < pixman_min_fixed_48_16 || ty1 > pixman_max_fixed_48_16 || - tx2 < pixman_min_fixed_48_16 || tx2 > pixman_max_fixed_48_16 || - ty2 < pixman_min_fixed_48_16 || ty2 > pixman_max_fixed_48_16) - { - return FALSE; - } - else - { - extents->x1 = pixman_fixed_to_int (tx1); - extents->y1 = pixman_fixed_to_int (ty1); - extents->x2 = pixman_fixed_to_int (tx2) + 1; - extents->y2 = pixman_fixed_to_int (ty2) + 1; - - return TRUE; - } -} - -#define IS_16BIT(x) (((x) >= INT16_MIN) && ((x) <= INT16_MAX)) - -static pixman_bool_t -analyze_extent (pixman_image_t *image, int x, int y, - const pixman_box32_t *extents, uint32_t *flags) -{ - pixman_transform_t *transform; - pixman_fixed_t *params; - pixman_fixed_t x_off, y_off; - pixman_fixed_t width, height; - pixman_box32_t ex; - - if (!image) - return TRUE; - - /* Some compositing functions walk one step - * outside the destination rectangle, so we - * check here that the expanded-by-one source - * extents in destination space fits in 16 bits - */ - if (!IS_16BIT (extents->x1 - x - 1) || - !IS_16BIT (extents->y1 - y - 1) || - !IS_16BIT (extents->x2 - x + 1) || - !IS_16BIT (extents->y2 - y + 1)) - { - return FALSE; - } - - transform = image->common.transform; - if (image->common.type == BITS) - { - /* During repeat mode calculations we might convert the - * width/height of an image to fixed 16.16, so we need - * them to be smaller than 16 bits. - */ - if (image->bits.width >= 0x7fff || image->bits.height >= 0x7fff) - return FALSE; - -#define ID_AND_NEAREST (FAST_PATH_ID_TRANSFORM | FAST_PATH_NEAREST_FILTER) - - if ((image->common.flags & ID_AND_NEAREST) == ID_AND_NEAREST && - extents->x1 - x >= 0 && - extents->y1 - y >= 0 && - extents->x2 - x <= image->bits.width && - extents->y2 - y <= image->bits.height) - { - *flags |= FAST_PATH_SAMPLES_COVER_CLIP; - return TRUE; - } - - switch (image->common.filter) - { - case PIXMAN_FILTER_CONVOLUTION: - params = image->common.filter_params; - x_off = - pixman_fixed_e - ((params[0] - pixman_fixed_1) >> 1); - y_off = - pixman_fixed_e - ((params[1] - pixman_fixed_1) >> 1); - width = params[0]; - height = params[1]; - break; - - case PIXMAN_FILTER_GOOD: - case PIXMAN_FILTER_BEST: - case PIXMAN_FILTER_BILINEAR: - x_off = - pixman_fixed_1 / 2; - y_off = - pixman_fixed_1 / 2; - width = pixman_fixed_1; - height = pixman_fixed_1; - break; - - case PIXMAN_FILTER_FAST: - case PIXMAN_FILTER_NEAREST: - x_off = - pixman_fixed_e; - y_off = - pixman_fixed_e; - width = 0; - height = 0; - break; - - default: - return FALSE; - } - - /* Check whether the non-expanded, transformed extent is entirely within - * the source image, and set the FAST_PATH_SAMPLES_COVER_CLIP if it is. - */ - ex = *extents; - if (compute_sample_extents (transform, &ex, x, y, x_off, y_off, width, height) && - ex.x1 >= 0 && ex.y1 >= 0 && - ex.x2 <= image->bits.width && ex.y2 <= image->bits.height) - { - *flags |= FAST_PATH_SAMPLES_COVER_CLIP; - } - } - else - { - x_off = 0; - y_off = 0; - width = 0; - height = 0; - } - - /* Check that the extents expanded by one don't overflow. This ensures that - * compositing functions can simply walk the source space using 16.16 - * variables without worrying about overflow. - */ - ex.x1 = extents->x1 - 1; - ex.y1 = extents->y1 - 1; - ex.x2 = extents->x2 + 1; - ex.y2 = extents->y2 + 1; - - if (!compute_sample_extents (transform, &ex, x, y, x_off, y_off, width, height)) - return FALSE; - - return TRUE; -} - -/* - * Work around GCC bug causing crashes in Mozilla with SSE2 - * - * When using -msse, gcc generates movdqa instructions assuming that - * the stack is 16 byte aligned. Unfortunately some applications, such - * as Mozilla and Mono, end up aligning the stack to 4 bytes, which - * causes the movdqa instructions to fail. - * - * The __force_align_arg_pointer__ makes gcc generate a prologue that - * realigns the stack pointer to 16 bytes. - * - * On x86-64 this is not necessary because the standard ABI already - * calls for a 16 byte aligned stack. - * - * See https://bugs.freedesktop.org/show_bug.cgi?id=15693 - */ -#if defined (USE_SSE2) && defined(__GNUC__) && !defined(__x86_64__) && !defined(__amd64__) -__attribute__((__force_align_arg_pointer__)) -#endif -PIXMAN_EXPORT void -pixman_image_composite32 (pixman_op_t op, - pixman_image_t * src, - pixman_image_t * mask, - pixman_image_t * dest, - int32_t src_x, - int32_t src_y, - int32_t mask_x, - int32_t mask_y, - int32_t dest_x, - int32_t dest_y, - int32_t width, - int32_t height) -{ - pixman_format_code_t src_format, mask_format, dest_format; - uint32_t src_flags, mask_flags, dest_flags; - pixman_region32_t region; - pixman_box32_t *extents; - pixman_implementation_t *imp; - pixman_composite_func_t func; - - _pixman_image_validate (src); - if (mask) - _pixman_image_validate (mask); - _pixman_image_validate (dest); - - src_format = src->common.extended_format_code; - src_flags = src->common.flags; - - if (mask) - { - mask_format = mask->common.extended_format_code; - mask_flags = mask->common.flags; - } - else - { - mask_format = PIXMAN_null; - mask_flags = FAST_PATH_IS_OPAQUE; - } - - dest_format = dest->common.extended_format_code; - dest_flags = dest->common.flags; - - /* Check for pixbufs */ - if ((mask_format == PIXMAN_a8r8g8b8 || mask_format == PIXMAN_a8b8g8r8) && - (src->type == BITS && src->bits.bits == mask->bits.bits) && - (src->common.repeat == mask->common.repeat) && - (src_x == mask_x && src_y == mask_y)) - { - if (src_format == PIXMAN_x8b8g8r8) - src_format = mask_format = PIXMAN_pixbuf; - else if (src_format == PIXMAN_x8r8g8b8) - src_format = mask_format = PIXMAN_rpixbuf; - } - - pixman_region32_init (®ion); - - if (!pixman_compute_composite_region32 ( - ®ion, src, mask, dest, - src_x, src_y, mask_x, mask_y, dest_x, dest_y, width, height)) - { - goto out; - } - - extents = pixman_region32_extents (®ion); - - if (!analyze_extent (src, dest_x - src_x, dest_y - src_y, extents, &src_flags)) - goto out; - - if (!analyze_extent (mask, dest_x - mask_x, dest_y - mask_y, extents, &mask_flags)) - goto out; - - /* If the clip is within the source samples, and the samples are opaque, - * then the source is effectively opaque. - */ -#define BOTH (FAST_PATH_SAMPLES_OPAQUE | FAST_PATH_SAMPLES_COVER_CLIP) - - if ((src_flags & BOTH) == BOTH) - src_flags |= FAST_PATH_IS_OPAQUE; - - if ((mask_flags & BOTH) == BOTH) - mask_flags |= FAST_PATH_IS_OPAQUE; - - /* - * Check if we can replace our operator by a simpler one - * if the src or dest are opaque. The output operator should be - * mathematically equivalent to the source. - */ - op = optimize_operator (op, src_flags, mask_flags, dest_flags); - if (op == PIXMAN_OP_DST) - goto out; - - if (lookup_composite_function (op, - src_format, src_flags, - mask_format, mask_flags, - dest_format, dest_flags, - &imp, &func)) - { - const pixman_box32_t *pbox; - int n; - - pbox = pixman_region32_rectangles (®ion, &n); - - while (n--) - { - func (imp, op, - src, mask, dest, - pbox->x1 + src_x - dest_x, - pbox->y1 + src_y - dest_y, - pbox->x1 + mask_x - dest_x, - pbox->y1 + mask_y - dest_y, - pbox->x1, - pbox->y1, - pbox->x2 - pbox->x1, - pbox->y2 - pbox->y1); - - pbox++; - } - } - -out: - pixman_region32_fini (®ion); -} - -PIXMAN_EXPORT void -pixman_image_composite (pixman_op_t op, - pixman_image_t * src, - pixman_image_t * mask, - pixman_image_t * dest, - int16_t src_x, - int16_t src_y, - int16_t mask_x, - int16_t mask_y, - int16_t dest_x, - int16_t dest_y, - uint16_t width, - uint16_t height) -{ - pixman_image_composite32 (op, src, mask, dest, src_x, src_y, - mask_x, mask_y, dest_x, dest_y, width, height); -} - -PIXMAN_EXPORT pixman_bool_t -pixman_blt (uint32_t *src_bits, - uint32_t *dst_bits, - int src_stride, - int dst_stride, - int src_bpp, - int dst_bpp, - int src_x, - int src_y, - int dst_x, - int dst_y, - int width, - int height) -{ - return _pixman_implementation_blt (get_implementation(), - src_bits, dst_bits, src_stride, dst_stride, - src_bpp, dst_bpp, - src_x, src_y, - dst_x, dst_y, - width, height); -} - -PIXMAN_EXPORT pixman_bool_t -pixman_fill (uint32_t *bits, - int stride, - int bpp, - int x, - int y, - int width, - int height, - uint32_t xor) -{ - return _pixman_implementation_fill ( - get_implementation(), bits, stride, bpp, x, y, width, height, xor); -} - -static uint32_t -color_to_uint32 (const pixman_color_t *color) -{ - return - (color->alpha >> 8 << 24) | - (color->red >> 8 << 16) | - (color->green & 0xff00) | - (color->blue >> 8); -} - -static pixman_bool_t -color_to_pixel (pixman_color_t * color, - uint32_t * pixel, - pixman_format_code_t format) -{ - uint32_t c = color_to_uint32 (color); - - if (!(format == PIXMAN_a8r8g8b8 || - format == PIXMAN_x8r8g8b8 || - format == PIXMAN_a8b8g8r8 || - format == PIXMAN_x8b8g8r8 || - format == PIXMAN_b8g8r8a8 || - format == PIXMAN_b8g8r8x8 || - format == PIXMAN_r8g8b8a8 || - format == PIXMAN_r8g8b8x8 || - format == PIXMAN_r5g6b5 || - format == PIXMAN_b5g6r5 || - format == PIXMAN_a8 || - format == PIXMAN_a1)) - { - return FALSE; - } - - if (PIXMAN_FORMAT_TYPE (format) == PIXMAN_TYPE_ABGR) - { - c = ((c & 0xff000000) >> 0) | - ((c & 0x00ff0000) >> 16) | - ((c & 0x0000ff00) >> 0) | - ((c & 0x000000ff) << 16); - } - if (PIXMAN_FORMAT_TYPE (format) == PIXMAN_TYPE_BGRA) - { - c = ((c & 0xff000000) >> 24) | - ((c & 0x00ff0000) >> 8) | - ((c & 0x0000ff00) << 8) | - ((c & 0x000000ff) << 24); - } - if (PIXMAN_FORMAT_TYPE (format) == PIXMAN_TYPE_RGBA) - c = ((c & 0xff000000) >> 24) | (c << 8); - - if (format == PIXMAN_a1) - c = c >> 31; - else if (format == PIXMAN_a8) - c = c >> 24; - else if (format == PIXMAN_r5g6b5 || - format == PIXMAN_b5g6r5) - c = CONVERT_8888_TO_0565 (c); - -#if 0 - printf ("color: %x %x %x %x\n", color->alpha, color->red, color->green, color->blue); - printf ("pixel: %x\n", c); -#endif - - *pixel = c; - return TRUE; -} - -PIXMAN_EXPORT pixman_bool_t -pixman_image_fill_rectangles (pixman_op_t op, - pixman_image_t * dest, - pixman_color_t * color, - int n_rects, - const pixman_rectangle16_t *rects) -{ - pixman_box32_t stack_boxes[6]; - pixman_box32_t *boxes; - pixman_bool_t result; - int i; - - if (n_rects > 6) - { - boxes = pixman_malloc_ab (sizeof (pixman_box32_t), n_rects); - if (boxes == NULL) - return FALSE; - } - else - { - boxes = stack_boxes; - } - - for (i = 0; i < n_rects; ++i) - { - boxes[i].x1 = rects[i].x; - boxes[i].y1 = rects[i].y; - boxes[i].x2 = boxes[i].x1 + rects[i].width; - boxes[i].y2 = boxes[i].y1 + rects[i].height; - } - - result = pixman_image_fill_boxes (op, dest, color, n_rects, boxes); - - if (boxes != stack_boxes) - free (boxes); - - return result; -} - -PIXMAN_EXPORT pixman_bool_t -pixman_image_fill_boxes (pixman_op_t op, - pixman_image_t * dest, - pixman_color_t * color, - int n_boxes, - const pixman_box32_t *boxes) -{ - pixman_image_t *solid; - pixman_color_t c; - int i; - - _pixman_image_validate (dest); - - if (color->alpha == 0xffff) - { - if (op == PIXMAN_OP_OVER) - op = PIXMAN_OP_SRC; - } - - if (op == PIXMAN_OP_CLEAR) - { - c.red = 0; - c.green = 0; - c.blue = 0; - c.alpha = 0; - - color = &c; - - op = PIXMAN_OP_SRC; - } - - if (op == PIXMAN_OP_SRC) - { - uint32_t pixel; - - if (color_to_pixel (color, &pixel, dest->bits.format)) - { - pixman_region32_t fill_region; - int n_rects, j; - pixman_box32_t *rects; - - if (!pixman_region32_init_rects (&fill_region, boxes, n_boxes)) - return FALSE; - - if (dest->common.have_clip_region) - { - if (!pixman_region32_intersect (&fill_region, - &fill_region, - &dest->common.clip_region)) - return FALSE; - } - - rects = pixman_region32_rectangles (&fill_region, &n_rects); - for (j = 0; j < n_rects; ++j) - { - const pixman_box32_t *rect = &(rects[j]); - pixman_fill (dest->bits.bits, dest->bits.rowstride, PIXMAN_FORMAT_BPP (dest->bits.format), - rect->x1, rect->y1, rect->x2 - rect->x1, rect->y2 - rect->y1, - pixel); - } - - pixman_region32_fini (&fill_region); - return TRUE; - } - } - - solid = pixman_image_create_solid_fill (color); - if (!solid) - return FALSE; - - for (i = 0; i < n_boxes; ++i) - { - const pixman_box32_t *box = &(boxes[i]); - - pixman_image_composite32 (op, solid, NULL, dest, - 0, 0, 0, 0, - box->x1, box->y1, - box->x2 - box->x1, box->y2 - box->y1); - } - - pixman_image_unref (solid); - - return TRUE; -} - -/** - * pixman_version: - * - * Returns the version of the pixman library encoded in a single - * integer as per %PIXMAN_VERSION_ENCODE. The encoding ensures that - * later versions compare greater than earlier versions. - * - * A run-time comparison to check that pixman's version is greater than - * or equal to version X.Y.Z could be performed as follows: - * - * - * if (pixman_version() >= PIXMAN_VERSION_ENCODE(X,Y,Z)) {...} - * - * - * See also pixman_version_string() as well as the compile-time - * equivalents %PIXMAN_VERSION and %PIXMAN_VERSION_STRING. - * - * Return value: the encoded version. - **/ -PIXMAN_EXPORT int -pixman_version (void) -{ - return PIXMAN_VERSION; -} - -/** - * pixman_version_string: - * - * Returns the version of the pixman library as a human-readable string - * of the form "X.Y.Z". - * - * See also pixman_version() as well as the compile-time equivalents - * %PIXMAN_VERSION_STRING and %PIXMAN_VERSION. - * - * Return value: a string containing the version. - **/ -PIXMAN_EXPORT const char* -pixman_version_string (void) -{ - return PIXMAN_VERSION_STRING; -} - -/** - * pixman_format_supported_source: - * @format: A pixman_format_code_t format - * - * Return value: whether the provided format code is a supported - * format for a pixman surface used as a source in - * rendering. - * - * Currently, all pixman_format_code_t values are supported. - **/ -PIXMAN_EXPORT pixman_bool_t -pixman_format_supported_source (pixman_format_code_t format) -{ - switch (format) - { - /* 32 bpp formats */ - case PIXMAN_a2b10g10r10: - case PIXMAN_x2b10g10r10: - case PIXMAN_a2r10g10b10: - case PIXMAN_x2r10g10b10: - case PIXMAN_a8r8g8b8: - case PIXMAN_x8r8g8b8: - case PIXMAN_a8b8g8r8: - case PIXMAN_x8b8g8r8: - case PIXMAN_b8g8r8a8: - case PIXMAN_b8g8r8x8: - case PIXMAN_r8g8b8a8: - case PIXMAN_r8g8b8x8: - case PIXMAN_r8g8b8: - case PIXMAN_b8g8r8: - case PIXMAN_r5g6b5: - case PIXMAN_b5g6r5: - case PIXMAN_x14r6g6b6: - /* 16 bpp formats */ - case PIXMAN_a1r5g5b5: - case PIXMAN_x1r5g5b5: - case PIXMAN_a1b5g5r5: - case PIXMAN_x1b5g5r5: - case PIXMAN_a4r4g4b4: - case PIXMAN_x4r4g4b4: - case PIXMAN_a4b4g4r4: - case PIXMAN_x4b4g4r4: - /* 8bpp formats */ - case PIXMAN_a8: - case PIXMAN_r3g3b2: - case PIXMAN_b2g3r3: - case PIXMAN_a2r2g2b2: - case PIXMAN_a2b2g2r2: - case PIXMAN_c8: - case PIXMAN_g8: - case PIXMAN_x4a4: - /* Collides with PIXMAN_c8 - case PIXMAN_x4c4: - */ - /* Collides with PIXMAN_g8 - case PIXMAN_x4g4: - */ - /* 4bpp formats */ - case PIXMAN_a4: - case PIXMAN_r1g2b1: - case PIXMAN_b1g2r1: - case PIXMAN_a1r1g1b1: - case PIXMAN_a1b1g1r1: - case PIXMAN_c4: - case PIXMAN_g4: - /* 1bpp formats */ - case PIXMAN_a1: - case PIXMAN_g1: - /* YUV formats */ - case PIXMAN_yuy2: - case PIXMAN_yv12: - return TRUE; - - default: - return FALSE; - } -} - -/** - * pixman_format_supported_destination: - * @format: A pixman_format_code_t format - * - * Return value: whether the provided format code is a supported - * format for a pixman surface used as a destination in - * rendering. - * - * Currently, all pixman_format_code_t values are supported - * except for the YUV formats. - **/ -PIXMAN_EXPORT pixman_bool_t -pixman_format_supported_destination (pixman_format_code_t format) -{ - /* YUV formats cannot be written to at the moment */ - if (format == PIXMAN_yuy2 || format == PIXMAN_yv12) - return FALSE; - - return pixman_format_supported_source (format); -} - -PIXMAN_EXPORT pixman_bool_t -pixman_compute_composite_region (pixman_region16_t * region, - pixman_image_t * src_image, - pixman_image_t * mask_image, - pixman_image_t * dst_image, - int16_t src_x, - int16_t src_y, - int16_t mask_x, - int16_t mask_y, - int16_t dest_x, - int16_t dest_y, - uint16_t width, - uint16_t height) -{ - pixman_region32_t r32; - pixman_bool_t retval; - - pixman_region32_init (&r32); - - retval = pixman_compute_composite_region32 ( - &r32, src_image, mask_image, dst_image, - src_x, src_y, mask_x, mask_y, dest_x, dest_y, - width, height); - - if (retval) - { - if (!pixman_region16_copy_from_region32 (region, &r32)) - retval = FALSE; - } - - pixman_region32_fini (&r32); - return retval; -} +/* -*- Mode: c; c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t; -*- */ +/* + * Copyright © 2000 SuSE, Inc. + * Copyright © 2007 Red Hat, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of SuSE not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. SuSE makes no representations about the + * suitability of this software for any purpose. It is provided "as is" + * without express or implied warranty. + * + * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE + * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION + * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Author: Keith Packard, SuSE, Inc. + */ + +#ifdef HAVE_CONFIG_H +#include +#endif +#include "pixman-private.h" + +#include + +static pixman_implementation_t *global_implementation; + +#ifdef TOOLCHAIN_SUPPORTS_ATTRIBUTE_CONSTRUCTOR +static void __attribute__((constructor)) +pixman_constructor (void) +{ + global_implementation = _pixman_choose_implementation (); +} +#endif + +static force_inline pixman_implementation_t * +get_implementation (void) +{ +#ifndef TOOLCHAIN_SUPPORTS_ATTRIBUTE_CONSTRUCTOR + if (!global_implementation) + global_implementation = _pixman_choose_implementation (); +#endif + return global_implementation; +} + +typedef struct operator_info_t operator_info_t; + +struct operator_info_t +{ + uint8_t opaque_info[4]; +}; + +#define PACK(neither, src, dest, both) \ + {{ (uint8_t)PIXMAN_OP_ ## neither, \ + (uint8_t)PIXMAN_OP_ ## src, \ + (uint8_t)PIXMAN_OP_ ## dest, \ + (uint8_t)PIXMAN_OP_ ## both }} + +static const operator_info_t operator_table[] = +{ + /* Neither Opaque Src Opaque Dst Opaque Both Opaque */ + PACK (CLEAR, CLEAR, CLEAR, CLEAR), + PACK (SRC, SRC, SRC, SRC), + PACK (DST, DST, DST, DST), + PACK (OVER, SRC, OVER, SRC), + PACK (OVER_REVERSE, OVER_REVERSE, DST, DST), + PACK (IN, IN, SRC, SRC), + PACK (IN_REVERSE, DST, IN_REVERSE, DST), + PACK (OUT, OUT, CLEAR, CLEAR), + PACK (OUT_REVERSE, CLEAR, OUT_REVERSE, CLEAR), + PACK (ATOP, IN, OVER, SRC), + PACK (ATOP_REVERSE, OVER_REVERSE, IN_REVERSE, DST), + PACK (XOR, OUT, OUT_REVERSE, CLEAR), + PACK (ADD, ADD, ADD, ADD), + PACK (SATURATE, OVER_REVERSE, DST, DST), + + {{ 0 /* 0x0e */ }}, + {{ 0 /* 0x0f */ }}, + + PACK (CLEAR, CLEAR, CLEAR, CLEAR), + PACK (SRC, SRC, SRC, SRC), + PACK (DST, DST, DST, DST), + PACK (DISJOINT_OVER, DISJOINT_OVER, DISJOINT_OVER, DISJOINT_OVER), + PACK (DISJOINT_OVER_REVERSE, DISJOINT_OVER_REVERSE, DISJOINT_OVER_REVERSE, DISJOINT_OVER_REVERSE), + PACK (DISJOINT_IN, DISJOINT_IN, DISJOINT_IN, DISJOINT_IN), + PACK (DISJOINT_IN_REVERSE, DISJOINT_IN_REVERSE, DISJOINT_IN_REVERSE, DISJOINT_IN_REVERSE), + PACK (DISJOINT_OUT, DISJOINT_OUT, DISJOINT_OUT, DISJOINT_OUT), + PACK (DISJOINT_OUT_REVERSE, DISJOINT_OUT_REVERSE, DISJOINT_OUT_REVERSE, DISJOINT_OUT_REVERSE), + PACK (DISJOINT_ATOP, DISJOINT_ATOP, DISJOINT_ATOP, DISJOINT_ATOP), + PACK (DISJOINT_ATOP_REVERSE, DISJOINT_ATOP_REVERSE, DISJOINT_ATOP_REVERSE, DISJOINT_ATOP_REVERSE), + PACK (DISJOINT_XOR, DISJOINT_XOR, DISJOINT_XOR, DISJOINT_XOR), + + {{ 0 /* 0x1c */ }}, + {{ 0 /* 0x1d */ }}, + {{ 0 /* 0x1e */ }}, + {{ 0 /* 0x1f */ }}, + + PACK (CLEAR, CLEAR, CLEAR, CLEAR), + PACK (SRC, SRC, SRC, SRC), + PACK (DST, DST, DST, DST), + PACK (CONJOINT_OVER, CONJOINT_OVER, CONJOINT_OVER, CONJOINT_OVER), + PACK (CONJOINT_OVER_REVERSE, CONJOINT_OVER_REVERSE, CONJOINT_OVER_REVERSE, CONJOINT_OVER_REVERSE), + PACK (CONJOINT_IN, CONJOINT_IN, CONJOINT_IN, CONJOINT_IN), + PACK (CONJOINT_IN_REVERSE, CONJOINT_IN_REVERSE, CONJOINT_IN_REVERSE, CONJOINT_IN_REVERSE), + PACK (CONJOINT_OUT, CONJOINT_OUT, CONJOINT_OUT, CONJOINT_OUT), + PACK (CONJOINT_OUT_REVERSE, CONJOINT_OUT_REVERSE, CONJOINT_OUT_REVERSE, CONJOINT_OUT_REVERSE), + PACK (CONJOINT_ATOP, CONJOINT_ATOP, CONJOINT_ATOP, CONJOINT_ATOP), + PACK (CONJOINT_ATOP_REVERSE, CONJOINT_ATOP_REVERSE, CONJOINT_ATOP_REVERSE, CONJOINT_ATOP_REVERSE), + PACK (CONJOINT_XOR, CONJOINT_XOR, CONJOINT_XOR, CONJOINT_XOR), + + {{ 0 /* 0x2c */ }}, + {{ 0 /* 0x2d */ }}, + {{ 0 /* 0x2e */ }}, + {{ 0 /* 0x2f */ }}, + + PACK (MULTIPLY, MULTIPLY, MULTIPLY, MULTIPLY), + PACK (SCREEN, SCREEN, SCREEN, SCREEN), + PACK (OVERLAY, OVERLAY, OVERLAY, OVERLAY), + PACK (DARKEN, DARKEN, DARKEN, DARKEN), + PACK (LIGHTEN, LIGHTEN, LIGHTEN, LIGHTEN), + PACK (COLOR_DODGE, COLOR_DODGE, COLOR_DODGE, COLOR_DODGE), + PACK (COLOR_BURN, COLOR_BURN, COLOR_BURN, COLOR_BURN), + PACK (HARD_LIGHT, HARD_LIGHT, HARD_LIGHT, HARD_LIGHT), + PACK (SOFT_LIGHT, SOFT_LIGHT, SOFT_LIGHT, SOFT_LIGHT), + PACK (DIFFERENCE, DIFFERENCE, DIFFERENCE, DIFFERENCE), + PACK (EXCLUSION, EXCLUSION, EXCLUSION, EXCLUSION), + PACK (HSL_HUE, HSL_HUE, HSL_HUE, HSL_HUE), + PACK (HSL_SATURATION, HSL_SATURATION, HSL_SATURATION, HSL_SATURATION), + PACK (HSL_COLOR, HSL_COLOR, HSL_COLOR, HSL_COLOR), + PACK (HSL_LUMINOSITY, HSL_LUMINOSITY, HSL_LUMINOSITY, HSL_LUMINOSITY), +}; + +/* + * Optimize the current operator based on opacity of source or destination + * The output operator should be mathematically equivalent to the source. + */ +static pixman_op_t +optimize_operator (pixman_op_t op, + uint32_t src_flags, + uint32_t mask_flags, + uint32_t dst_flags) +{ + pixman_bool_t is_source_opaque, is_dest_opaque; + +#define OPAQUE_SHIFT 13 + + COMPILE_TIME_ASSERT (FAST_PATH_IS_OPAQUE == (1 << OPAQUE_SHIFT)); + + is_dest_opaque = (dst_flags & FAST_PATH_IS_OPAQUE); + is_source_opaque = ((src_flags & mask_flags) & FAST_PATH_IS_OPAQUE); + + is_dest_opaque >>= OPAQUE_SHIFT - 1; + is_source_opaque >>= OPAQUE_SHIFT; + + return operator_table[op].opaque_info[is_dest_opaque | is_source_opaque]; +} + +/* + * Computing composite region + */ +static inline pixman_bool_t +clip_general_image (pixman_region32_t * region, + pixman_region32_t * clip, + int dx, + int dy) +{ + if (pixman_region32_n_rects (region) == 1 && + pixman_region32_n_rects (clip) == 1) + { + pixman_box32_t * rbox = pixman_region32_rectangles (region, NULL); + pixman_box32_t * cbox = pixman_region32_rectangles (clip, NULL); + int v; + + if (rbox->x1 < (v = cbox->x1 + dx)) + rbox->x1 = v; + if (rbox->x2 > (v = cbox->x2 + dx)) + rbox->x2 = v; + if (rbox->y1 < (v = cbox->y1 + dy)) + rbox->y1 = v; + if (rbox->y2 > (v = cbox->y2 + dy)) + rbox->y2 = v; + if (rbox->x1 >= rbox->x2 || rbox->y1 >= rbox->y2) + { + pixman_region32_init (region); + return FALSE; + } + } + else if (!pixman_region32_not_empty (clip)) + { + return FALSE; + } + else + { + if (dx || dy) + pixman_region32_translate (region, -dx, -dy); + + if (!pixman_region32_intersect (region, region, clip)) + return FALSE; + + if (dx || dy) + pixman_region32_translate (region, dx, dy); + } + + return pixman_region32_not_empty (region); +} + +static inline pixman_bool_t +clip_source_image (pixman_region32_t * region, + pixman_image_t * image, + int dx, + int dy) +{ + /* Source clips are ignored, unless they are explicitly turned on + * and the clip in question was set by an X client. (Because if + * the clip was not set by a client, then it is a hierarchy + * clip and those should always be ignored for sources). + */ + if (!image->common.clip_sources || !image->common.client_clip) + return TRUE; + + return clip_general_image (region, + &image->common.clip_region, + dx, dy); +} + +/* + * returns FALSE if the final region is empty. Indistinguishable from + * an allocation failure, but rendering ignores those anyways. + */ +static pixman_bool_t +pixman_compute_composite_region32 (pixman_region32_t * region, + pixman_image_t * src_image, + pixman_image_t * mask_image, + pixman_image_t * dst_image, + int32_t src_x, + int32_t src_y, + int32_t mask_x, + int32_t mask_y, + int32_t dest_x, + int32_t dest_y, + int32_t width, + int32_t height) +{ + region->extents.x1 = dest_x; + region->extents.x2 = dest_x + width; + region->extents.y1 = dest_y; + region->extents.y2 = dest_y + height; + + region->extents.x1 = MAX (region->extents.x1, 0); + region->extents.y1 = MAX (region->extents.y1, 0); + region->extents.x2 = MIN (region->extents.x2, dst_image->bits.width); + region->extents.y2 = MIN (region->extents.y2, dst_image->bits.height); + + region->data = 0; + + /* Check for empty operation */ + if (region->extents.x1 >= region->extents.x2 || + region->extents.y1 >= region->extents.y2) + { + region->extents.x1 = 0; + region->extents.x2 = 0; + region->extents.y1 = 0; + region->extents.y2 = 0; + return FALSE; + } + + if (dst_image->common.have_clip_region) + { + if (!clip_general_image (region, &dst_image->common.clip_region, 0, 0)) + return FALSE; + } + + if (dst_image->common.alpha_map) + { + if (!pixman_region32_intersect_rect (region, region, + dst_image->common.alpha_origin_x, + dst_image->common.alpha_origin_y, + dst_image->common.alpha_map->width, + dst_image->common.alpha_map->height)) + { + return FALSE; + } + if (!pixman_region32_not_empty (region)) + return FALSE; + if (dst_image->common.alpha_map->common.have_clip_region) + { + if (!clip_general_image (region, &dst_image->common.alpha_map->common.clip_region, + -dst_image->common.alpha_origin_x, + -dst_image->common.alpha_origin_y)) + { + return FALSE; + } + } + } + + /* clip against src */ + if (src_image->common.have_clip_region) + { + if (!clip_source_image (region, src_image, dest_x - src_x, dest_y - src_y)) + return FALSE; + } + if (src_image->common.alpha_map && src_image->common.alpha_map->common.have_clip_region) + { + if (!clip_source_image (region, (pixman_image_t *)src_image->common.alpha_map, + dest_x - (src_x - src_image->common.alpha_origin_x), + dest_y - (src_y - src_image->common.alpha_origin_y))) + { + return FALSE; + } + } + /* clip against mask */ + if (mask_image && mask_image->common.have_clip_region) + { + if (!clip_source_image (region, mask_image, dest_x - mask_x, dest_y - mask_y)) + return FALSE; + + if (mask_image->common.alpha_map && mask_image->common.alpha_map->common.have_clip_region) + { + if (!clip_source_image (region, (pixman_image_t *)mask_image->common.alpha_map, + dest_x - (mask_x - mask_image->common.alpha_origin_x), + dest_y - (mask_y - mask_image->common.alpha_origin_y))) + { + return FALSE; + } + } + } + + return TRUE; +} + +#define N_CACHED_FAST_PATHS 8 + +typedef struct +{ + struct + { + pixman_implementation_t * imp; + pixman_fast_path_t fast_path; + } cache [N_CACHED_FAST_PATHS]; +} cache_t; + +PIXMAN_DEFINE_THREAD_LOCAL (cache_t, fast_path_cache); + +static force_inline pixman_bool_t +lookup_composite_function (pixman_op_t op, + pixman_format_code_t src_format, + uint32_t src_flags, + pixman_format_code_t mask_format, + uint32_t mask_flags, + pixman_format_code_t dest_format, + uint32_t dest_flags, + pixman_implementation_t **out_imp, + pixman_composite_func_t *out_func) +{ + pixman_implementation_t *imp; + cache_t *cache; + int i; + + /* Check cache for fast paths */ + cache = PIXMAN_GET_THREAD_LOCAL (fast_path_cache); + + for (i = 0; i < N_CACHED_FAST_PATHS; ++i) + { + const pixman_fast_path_t *info = &(cache->cache[i].fast_path); + + /* Note that we check for equality here, not whether + * the cached fast path matches. This is to prevent + * us from selecting an overly general fast path + * when a more specific one would work. + */ + if (info->op == op && + info->src_format == src_format && + info->mask_format == mask_format && + info->dest_format == dest_format && + info->src_flags == src_flags && + info->mask_flags == mask_flags && + info->dest_flags == dest_flags && + info->func) + { + *out_imp = cache->cache[i].imp; + *out_func = cache->cache[i].fast_path.func; + + goto update_cache; + } + } + + for (imp = get_implementation (); imp != NULL; imp = imp->delegate) + { + const pixman_fast_path_t *info = imp->fast_paths; + + while (info->op != PIXMAN_OP_NONE) + { + if ((info->op == op || info->op == PIXMAN_OP_any) && + /* Formats */ + ((info->src_format == src_format) || + (info->src_format == PIXMAN_any)) && + ((info->mask_format == mask_format) || + (info->mask_format == PIXMAN_any)) && + ((info->dest_format == dest_format) || + (info->dest_format == PIXMAN_any)) && + /* Flags */ + (info->src_flags & src_flags) == info->src_flags && + (info->mask_flags & mask_flags) == info->mask_flags && + (info->dest_flags & dest_flags) == info->dest_flags) + { + *out_imp = imp; + *out_func = info->func; + + /* Set i to the last spot in the cache so that the + * move-to-front code below will work + */ + i = N_CACHED_FAST_PATHS - 1; + + goto update_cache; + } + + ++info; + } + } + return FALSE; + +update_cache: + if (i) + { + while (i--) + cache->cache[i + 1] = cache->cache[i]; + + cache->cache[0].imp = *out_imp; + cache->cache[0].fast_path.op = op; + cache->cache[0].fast_path.src_format = src_format; + cache->cache[0].fast_path.src_flags = src_flags; + cache->cache[0].fast_path.mask_format = mask_format; + cache->cache[0].fast_path.mask_flags = mask_flags; + cache->cache[0].fast_path.dest_format = dest_format; + cache->cache[0].fast_path.dest_flags = dest_flags; + cache->cache[0].fast_path.func = *out_func; + } + + return TRUE; +} + +static pixman_bool_t +compute_sample_extents (pixman_transform_t *transform, + pixman_box32_t *extents, int x, int y, + pixman_fixed_t x_off, pixman_fixed_t y_off, + pixman_fixed_t width, pixman_fixed_t height) +{ + pixman_fixed_t x1, y1, x2, y2; + pixman_fixed_48_16_t tx1, ty1, tx2, ty2; + + /* We have checked earlier that (extents->x1 - x) etc. fit in a pixman_fixed_t */ + x1 = (pixman_fixed_48_16_t)pixman_int_to_fixed (extents->x1 - x) + pixman_fixed_1 / 2; + y1 = (pixman_fixed_48_16_t)pixman_int_to_fixed (extents->y1 - y) + pixman_fixed_1 / 2; + x2 = (pixman_fixed_48_16_t)pixman_int_to_fixed (extents->x2 - x) - pixman_fixed_1 / 2; + y2 = (pixman_fixed_48_16_t)pixman_int_to_fixed (extents->y2 - y) - pixman_fixed_1 / 2; + + if (!transform) + { + tx1 = (pixman_fixed_48_16_t)x1; + ty1 = (pixman_fixed_48_16_t)y1; + tx2 = (pixman_fixed_48_16_t)x2; + ty2 = (pixman_fixed_48_16_t)y2; + } + else + { + int i; + + /* Silence GCC */ + tx1 = ty1 = tx2 = ty2 = 0; + + for (i = 0; i < 4; ++i) + { + pixman_fixed_48_16_t tx, ty; + pixman_vector_t v; + + v.vector[0] = (i & 0x01)? x1 : x2; + v.vector[1] = (i & 0x02)? y1 : y2; + v.vector[2] = pixman_fixed_1; + + if (!pixman_transform_point (transform, &v)) + return FALSE; + + tx = (pixman_fixed_48_16_t)v.vector[0]; + ty = (pixman_fixed_48_16_t)v.vector[1]; + + if (i == 0) + { + tx1 = tx; + ty1 = ty; + tx2 = tx; + ty2 = ty; + } + else + { + if (tx < tx1) + tx1 = tx; + if (ty < ty1) + ty1 = ty; + if (tx > tx2) + tx2 = tx; + if (ty > ty2) + ty2 = ty; + } + } + } + + /* Expand the source area by a tiny bit so account of different rounding that + * may happen during sampling. Note that (8 * pixman_fixed_e) is very far from + * 0.5 so this won't cause the area computed to be overly pessimistic. + */ + tx1 += x_off - 8 * pixman_fixed_e; + ty1 += y_off - 8 * pixman_fixed_e; + tx2 += x_off + width + 8 * pixman_fixed_e; + ty2 += y_off + height + 8 * pixman_fixed_e; + + if (tx1 < pixman_min_fixed_48_16 || tx1 > pixman_max_fixed_48_16 || + ty1 < pixman_min_fixed_48_16 || ty1 > pixman_max_fixed_48_16 || + tx2 < pixman_min_fixed_48_16 || tx2 > pixman_max_fixed_48_16 || + ty2 < pixman_min_fixed_48_16 || ty2 > pixman_max_fixed_48_16) + { + return FALSE; + } + else + { + extents->x1 = pixman_fixed_to_int (tx1); + extents->y1 = pixman_fixed_to_int (ty1); + extents->x2 = pixman_fixed_to_int (tx2) + 1; + extents->y2 = pixman_fixed_to_int (ty2) + 1; + + return TRUE; + } +} + +#define IS_16BIT(x) (((x) >= INT16_MIN) && ((x) <= INT16_MAX)) + +static pixman_bool_t +analyze_extent (pixman_image_t *image, int x, int y, + const pixman_box32_t *extents, uint32_t *flags) +{ + pixman_transform_t *transform; + pixman_fixed_t *params; + pixman_fixed_t x_off, y_off; + pixman_fixed_t width, height; + pixman_box32_t ex; + + if (!image) + return TRUE; + + /* Some compositing functions walk one step + * outside the destination rectangle, so we + * check here that the expanded-by-one source + * extents in destination space fits in 16 bits + */ + if (!IS_16BIT (extents->x1 - x - 1) || + !IS_16BIT (extents->y1 - y - 1) || + !IS_16BIT (extents->x2 - x + 1) || + !IS_16BIT (extents->y2 - y + 1)) + { + return FALSE; + } + + transform = image->common.transform; + if (image->common.type == BITS) + { + /* During repeat mode calculations we might convert the + * width/height of an image to fixed 16.16, so we need + * them to be smaller than 16 bits. + */ + if (image->bits.width >= 0x7fff || image->bits.height >= 0x7fff) + return FALSE; + +#define ID_AND_NEAREST (FAST_PATH_ID_TRANSFORM | FAST_PATH_NEAREST_FILTER) + + if ((image->common.flags & ID_AND_NEAREST) == ID_AND_NEAREST && + extents->x1 - x >= 0 && + extents->y1 - y >= 0 && + extents->x2 - x <= image->bits.width && + extents->y2 - y <= image->bits.height) + { + *flags |= FAST_PATH_SAMPLES_COVER_CLIP; + return TRUE; + } + + switch (image->common.filter) + { + case PIXMAN_FILTER_CONVOLUTION: + params = image->common.filter_params; + x_off = - pixman_fixed_e - ((params[0] - pixman_fixed_1) >> 1); + y_off = - pixman_fixed_e - ((params[1] - pixman_fixed_1) >> 1); + width = params[0]; + height = params[1]; + break; + + case PIXMAN_FILTER_GOOD: + case PIXMAN_FILTER_BEST: + case PIXMAN_FILTER_BILINEAR: + x_off = - pixman_fixed_1 / 2; + y_off = - pixman_fixed_1 / 2; + width = pixman_fixed_1; + height = pixman_fixed_1; + break; + + case PIXMAN_FILTER_FAST: + case PIXMAN_FILTER_NEAREST: + x_off = - pixman_fixed_e; + y_off = - pixman_fixed_e; + width = 0; + height = 0; + break; + + default: + return FALSE; + } + + /* Check whether the non-expanded, transformed extent is entirely within + * the source image, and set the FAST_PATH_SAMPLES_COVER_CLIP if it is. + */ + ex = *extents; + if (compute_sample_extents (transform, &ex, x, y, x_off, y_off, width, height) && + ex.x1 >= 0 && ex.y1 >= 0 && + ex.x2 <= image->bits.width && ex.y2 <= image->bits.height) + { + *flags |= FAST_PATH_SAMPLES_COVER_CLIP; + } + } + else + { + x_off = 0; + y_off = 0; + width = 0; + height = 0; + } + + /* Check that the extents expanded by one don't overflow. This ensures that + * compositing functions can simply walk the source space using 16.16 + * variables without worrying about overflow. + */ + ex.x1 = extents->x1 - 1; + ex.y1 = extents->y1 - 1; + ex.x2 = extents->x2 + 1; + ex.y2 = extents->y2 + 1; + + if (!compute_sample_extents (transform, &ex, x, y, x_off, y_off, width, height)) + return FALSE; + + return TRUE; +} + +/* + * Work around GCC bug causing crashes in Mozilla with SSE2 + * + * When using -msse, gcc generates movdqa instructions assuming that + * the stack is 16 byte aligned. Unfortunately some applications, such + * as Mozilla and Mono, end up aligning the stack to 4 bytes, which + * causes the movdqa instructions to fail. + * + * The __force_align_arg_pointer__ makes gcc generate a prologue that + * realigns the stack pointer to 16 bytes. + * + * On x86-64 this is not necessary because the standard ABI already + * calls for a 16 byte aligned stack. + * + * See https://bugs.freedesktop.org/show_bug.cgi?id=15693 + */ +#if defined (USE_SSE2) && defined(__GNUC__) && !defined(__x86_64__) && !defined(__amd64__) +__attribute__((__force_align_arg_pointer__)) +#endif +PIXMAN_EXPORT void +pixman_image_composite32 (pixman_op_t op, + pixman_image_t * src, + pixman_image_t * mask, + pixman_image_t * dest, + int32_t src_x, + int32_t src_y, + int32_t mask_x, + int32_t mask_y, + int32_t dest_x, + int32_t dest_y, + int32_t width, + int32_t height) +{ + pixman_format_code_t src_format, mask_format, dest_format; + uint32_t src_flags, mask_flags, dest_flags; + pixman_region32_t region; + pixman_box32_t *extents; + pixman_implementation_t *imp; + pixman_composite_func_t func; + + _pixman_image_validate (src); + if (mask) + _pixman_image_validate (mask); + _pixman_image_validate (dest); + + src_format = src->common.extended_format_code; + src_flags = src->common.flags; + + if (mask) + { + mask_format = mask->common.extended_format_code; + mask_flags = mask->common.flags; + } + else + { + mask_format = PIXMAN_null; + mask_flags = FAST_PATH_IS_OPAQUE; + } + + dest_format = dest->common.extended_format_code; + dest_flags = dest->common.flags; + + /* Check for pixbufs */ + if ((mask_format == PIXMAN_a8r8g8b8 || mask_format == PIXMAN_a8b8g8r8) && + (src->type == BITS && src->bits.bits == mask->bits.bits) && + (src->common.repeat == mask->common.repeat) && + (src_x == mask_x && src_y == mask_y)) + { + if (src_format == PIXMAN_x8b8g8r8) + src_format = mask_format = PIXMAN_pixbuf; + else if (src_format == PIXMAN_x8r8g8b8) + src_format = mask_format = PIXMAN_rpixbuf; + } + + pixman_region32_init (®ion); + + if (!pixman_compute_composite_region32 ( + ®ion, src, mask, dest, + src_x, src_y, mask_x, mask_y, dest_x, dest_y, width, height)) + { + goto out; + } + + extents = pixman_region32_extents (®ion); + + if (!analyze_extent (src, dest_x - src_x, dest_y - src_y, extents, &src_flags)) + goto out; + + if (!analyze_extent (mask, dest_x - mask_x, dest_y - mask_y, extents, &mask_flags)) + goto out; + + /* If the clip is within the source samples, and the samples are opaque, + * then the source is effectively opaque. + */ +#define BOTH (FAST_PATH_SAMPLES_OPAQUE | FAST_PATH_SAMPLES_COVER_CLIP) + + if ((src_flags & BOTH) == BOTH) + src_flags |= FAST_PATH_IS_OPAQUE; + + if ((mask_flags & BOTH) == BOTH) + mask_flags |= FAST_PATH_IS_OPAQUE; + + /* + * Check if we can replace our operator by a simpler one + * if the src or dest are opaque. The output operator should be + * mathematically equivalent to the source. + */ + op = optimize_operator (op, src_flags, mask_flags, dest_flags); + + if (lookup_composite_function (op, + src_format, src_flags, + mask_format, mask_flags, + dest_format, dest_flags, + &imp, &func)) + { + const pixman_box32_t *pbox; + int n; + + pbox = pixman_region32_rectangles (®ion, &n); + + while (n--) + { + func (imp, op, + src, mask, dest, + pbox->x1 + src_x - dest_x, + pbox->y1 + src_y - dest_y, + pbox->x1 + mask_x - dest_x, + pbox->y1 + mask_y - dest_y, + pbox->x1, + pbox->y1, + pbox->x2 - pbox->x1, + pbox->y2 - pbox->y1); + + pbox++; + } + } + +out: + pixman_region32_fini (®ion); +} + +PIXMAN_EXPORT void +pixman_image_composite (pixman_op_t op, + pixman_image_t * src, + pixman_image_t * mask, + pixman_image_t * dest, + int16_t src_x, + int16_t src_y, + int16_t mask_x, + int16_t mask_y, + int16_t dest_x, + int16_t dest_y, + uint16_t width, + uint16_t height) +{ + pixman_image_composite32 (op, src, mask, dest, src_x, src_y, + mask_x, mask_y, dest_x, dest_y, width, height); +} + +PIXMAN_EXPORT pixman_bool_t +pixman_blt (uint32_t *src_bits, + uint32_t *dst_bits, + int src_stride, + int dst_stride, + int src_bpp, + int dst_bpp, + int src_x, + int src_y, + int dst_x, + int dst_y, + int width, + int height) +{ + return _pixman_implementation_blt (get_implementation(), + src_bits, dst_bits, src_stride, dst_stride, + src_bpp, dst_bpp, + src_x, src_y, + dst_x, dst_y, + width, height); +} + +PIXMAN_EXPORT pixman_bool_t +pixman_fill (uint32_t *bits, + int stride, + int bpp, + int x, + int y, + int width, + int height, + uint32_t xor) +{ + return _pixman_implementation_fill ( + get_implementation(), bits, stride, bpp, x, y, width, height, xor); +} + +static uint32_t +color_to_uint32 (const pixman_color_t *color) +{ + return + (color->alpha >> 8 << 24) | + (color->red >> 8 << 16) | + (color->green & 0xff00) | + (color->blue >> 8); +} + +static pixman_bool_t +color_to_pixel (pixman_color_t * color, + uint32_t * pixel, + pixman_format_code_t format) +{ + uint32_t c = color_to_uint32 (color); + + if (!(format == PIXMAN_a8r8g8b8 || + format == PIXMAN_x8r8g8b8 || + format == PIXMAN_a8b8g8r8 || + format == PIXMAN_x8b8g8r8 || + format == PIXMAN_b8g8r8a8 || + format == PIXMAN_b8g8r8x8 || + format == PIXMAN_r8g8b8a8 || + format == PIXMAN_r8g8b8x8 || + format == PIXMAN_r5g6b5 || + format == PIXMAN_b5g6r5 || + format == PIXMAN_a8 || + format == PIXMAN_a1)) + { + return FALSE; + } + + if (PIXMAN_FORMAT_TYPE (format) == PIXMAN_TYPE_ABGR) + { + c = ((c & 0xff000000) >> 0) | + ((c & 0x00ff0000) >> 16) | + ((c & 0x0000ff00) >> 0) | + ((c & 0x000000ff) << 16); + } + if (PIXMAN_FORMAT_TYPE (format) == PIXMAN_TYPE_BGRA) + { + c = ((c & 0xff000000) >> 24) | + ((c & 0x00ff0000) >> 8) | + ((c & 0x0000ff00) << 8) | + ((c & 0x000000ff) << 24); + } + if (PIXMAN_FORMAT_TYPE (format) == PIXMAN_TYPE_RGBA) + c = ((c & 0xff000000) >> 24) | (c << 8); + + if (format == PIXMAN_a1) + c = c >> 31; + else if (format == PIXMAN_a8) + c = c >> 24; + else if (format == PIXMAN_r5g6b5 || + format == PIXMAN_b5g6r5) + c = CONVERT_8888_TO_0565 (c); + +#if 0 + printf ("color: %x %x %x %x\n", color->alpha, color->red, color->green, color->blue); + printf ("pixel: %x\n", c); +#endif + + *pixel = c; + return TRUE; +} + +PIXMAN_EXPORT pixman_bool_t +pixman_image_fill_rectangles (pixman_op_t op, + pixman_image_t * dest, + pixman_color_t * color, + int n_rects, + const pixman_rectangle16_t *rects) +{ + pixman_box32_t stack_boxes[6]; + pixman_box32_t *boxes; + pixman_bool_t result; + int i; + + if (n_rects > 6) + { + boxes = pixman_malloc_ab (sizeof (pixman_box32_t), n_rects); + if (boxes == NULL) + return FALSE; + } + else + { + boxes = stack_boxes; + } + + for (i = 0; i < n_rects; ++i) + { + boxes[i].x1 = rects[i].x; + boxes[i].y1 = rects[i].y; + boxes[i].x2 = boxes[i].x1 + rects[i].width; + boxes[i].y2 = boxes[i].y1 + rects[i].height; + } + + result = pixman_image_fill_boxes (op, dest, color, n_rects, boxes); + + if (boxes != stack_boxes) + free (boxes); + + return result; +} + +PIXMAN_EXPORT pixman_bool_t +pixman_image_fill_boxes (pixman_op_t op, + pixman_image_t * dest, + pixman_color_t * color, + int n_boxes, + const pixman_box32_t *boxes) +{ + pixman_image_t *solid; + pixman_color_t c; + int i; + + _pixman_image_validate (dest); + + if (color->alpha == 0xffff) + { + if (op == PIXMAN_OP_OVER) + op = PIXMAN_OP_SRC; + } + + if (op == PIXMAN_OP_CLEAR) + { + c.red = 0; + c.green = 0; + c.blue = 0; + c.alpha = 0; + + color = &c; + + op = PIXMAN_OP_SRC; + } + + if (op == PIXMAN_OP_SRC) + { + uint32_t pixel; + + if (color_to_pixel (color, &pixel, dest->bits.format)) + { + pixman_region32_t fill_region; + int n_rects, j; + pixman_box32_t *rects; + + if (!pixman_region32_init_rects (&fill_region, boxes, n_boxes)) + return FALSE; + + if (dest->common.have_clip_region) + { + if (!pixman_region32_intersect (&fill_region, + &fill_region, + &dest->common.clip_region)) + return FALSE; + } + + rects = pixman_region32_rectangles (&fill_region, &n_rects); + for (j = 0; j < n_rects; ++j) + { + const pixman_box32_t *rect = &(rects[j]); + pixman_fill (dest->bits.bits, dest->bits.rowstride, PIXMAN_FORMAT_BPP (dest->bits.format), + rect->x1, rect->y1, rect->x2 - rect->x1, rect->y2 - rect->y1, + pixel); + } + + pixman_region32_fini (&fill_region); + return TRUE; + } + } + + solid = pixman_image_create_solid_fill (color); + if (!solid) + return FALSE; + + for (i = 0; i < n_boxes; ++i) + { + const pixman_box32_t *box = &(boxes[i]); + + pixman_image_composite32 (op, solid, NULL, dest, + 0, 0, 0, 0, + box->x1, box->y1, + box->x2 - box->x1, box->y2 - box->y1); + } + + pixman_image_unref (solid); + + return TRUE; +} + +/** + * pixman_version: + * + * Returns the version of the pixman library encoded in a single + * integer as per %PIXMAN_VERSION_ENCODE. The encoding ensures that + * later versions compare greater than earlier versions. + * + * A run-time comparison to check that pixman's version is greater than + * or equal to version X.Y.Z could be performed as follows: + * + * + * if (pixman_version() >= PIXMAN_VERSION_ENCODE(X,Y,Z)) {...} + * + * + * See also pixman_version_string() as well as the compile-time + * equivalents %PIXMAN_VERSION and %PIXMAN_VERSION_STRING. + * + * Return value: the encoded version. + **/ +PIXMAN_EXPORT int +pixman_version (void) +{ + return PIXMAN_VERSION; +} + +/** + * pixman_version_string: + * + * Returns the version of the pixman library as a human-readable string + * of the form "X.Y.Z". + * + * See also pixman_version() as well as the compile-time equivalents + * %PIXMAN_VERSION_STRING and %PIXMAN_VERSION. + * + * Return value: a string containing the version. + **/ +PIXMAN_EXPORT const char* +pixman_version_string (void) +{ + return PIXMAN_VERSION_STRING; +} + +/** + * pixman_format_supported_source: + * @format: A pixman_format_code_t format + * + * Return value: whether the provided format code is a supported + * format for a pixman surface used as a source in + * rendering. + * + * Currently, all pixman_format_code_t values are supported. + **/ +PIXMAN_EXPORT pixman_bool_t +pixman_format_supported_source (pixman_format_code_t format) +{ + switch (format) + { + /* 32 bpp formats */ + case PIXMAN_a2b10g10r10: + case PIXMAN_x2b10g10r10: + case PIXMAN_a2r10g10b10: + case PIXMAN_x2r10g10b10: + case PIXMAN_a8r8g8b8: + case PIXMAN_x8r8g8b8: + case PIXMAN_a8b8g8r8: + case PIXMAN_x8b8g8r8: + case PIXMAN_b8g8r8a8: + case PIXMAN_b8g8r8x8: + case PIXMAN_r8g8b8a8: + case PIXMAN_r8g8b8x8: + case PIXMAN_r8g8b8: + case PIXMAN_b8g8r8: + case PIXMAN_r5g6b5: + case PIXMAN_b5g6r5: + case PIXMAN_x14r6g6b6: + /* 16 bpp formats */ + case PIXMAN_a1r5g5b5: + case PIXMAN_x1r5g5b5: + case PIXMAN_a1b5g5r5: + case PIXMAN_x1b5g5r5: + case PIXMAN_a4r4g4b4: + case PIXMAN_x4r4g4b4: + case PIXMAN_a4b4g4r4: + case PIXMAN_x4b4g4r4: + /* 8bpp formats */ + case PIXMAN_a8: + case PIXMAN_r3g3b2: + case PIXMAN_b2g3r3: + case PIXMAN_a2r2g2b2: + case PIXMAN_a2b2g2r2: + case PIXMAN_c8: + case PIXMAN_g8: + case PIXMAN_x4a4: + /* Collides with PIXMAN_c8 + case PIXMAN_x4c4: + */ + /* Collides with PIXMAN_g8 + case PIXMAN_x4g4: + */ + /* 4bpp formats */ + case PIXMAN_a4: + case PIXMAN_r1g2b1: + case PIXMAN_b1g2r1: + case PIXMAN_a1r1g1b1: + case PIXMAN_a1b1g1r1: + case PIXMAN_c4: + case PIXMAN_g4: + /* 1bpp formats */ + case PIXMAN_a1: + case PIXMAN_g1: + /* YUV formats */ + case PIXMAN_yuy2: + case PIXMAN_yv12: + return TRUE; + + default: + return FALSE; + } +} + +/** + * pixman_format_supported_destination: + * @format: A pixman_format_code_t format + * + * Return value: whether the provided format code is a supported + * format for a pixman surface used as a destination in + * rendering. + * + * Currently, all pixman_format_code_t values are supported + * except for the YUV formats. + **/ +PIXMAN_EXPORT pixman_bool_t +pixman_format_supported_destination (pixman_format_code_t format) +{ + /* YUV formats cannot be written to at the moment */ + if (format == PIXMAN_yuy2 || format == PIXMAN_yv12) + return FALSE; + + return pixman_format_supported_source (format); +} + +PIXMAN_EXPORT pixman_bool_t +pixman_compute_composite_region (pixman_region16_t * region, + pixman_image_t * src_image, + pixman_image_t * mask_image, + pixman_image_t * dst_image, + int16_t src_x, + int16_t src_y, + int16_t mask_x, + int16_t mask_y, + int16_t dest_x, + int16_t dest_y, + uint16_t width, + uint16_t height) +{ + pixman_region32_t r32; + pixman_bool_t retval; + + pixman_region32_init (&r32); + + retval = pixman_compute_composite_region32 ( + &r32, src_image, mask_image, dst_image, + src_x, src_y, mask_x, mask_y, dest_x, dest_y, + width, height); + + if (retval) + { + if (!pixman_region16_copy_from_region32 (region, &r32)) + retval = FALSE; + } + + pixman_region32_fini (&r32); + return retval; +} diff --git a/xorg-server/doc/dtrace/Xserver-DTrace.xml b/xorg-server/doc/dtrace/Xserver-DTrace.xml index e0425c8ee..72b8f4fa6 100644 --- a/xorg-server/doc/dtrace/Xserver-DTrace.xml +++ b/xorg-server/doc/dtrace/Xserver-DTrace.xml @@ -576,4 +576,3 @@ Xserver$1:::client-disconnect - diff --git a/xorg-server/hw/xfree86/doc/README.DRIcomp b/xorg-server/hw/xfree86/doc/README.DRIcomp index 89f40a759..617897949 100644 --- a/xorg-server/hw/xfree86/doc/README.DRIcomp +++ b/xorg-server/hw/xfree86/doc/README.DRIcomp @@ -1,556 +1,554 @@ - DRI Compilation Guide - - VA Linux Systems, Inc. Professional Services - Graphics. - - 21 April 2001 - -1. Preamble - -1.1 Copyright - -Copyright 2000-2001 by VA Linux Systems, Inc. All Rights Reserved. - -Permission is granted to make and distribute verbatim copies of this document -provided the copyright notice and this permission notice are preserved on all -copies. - -1.2 Trademarks - -OpenGL is a registered trademark and SGI is a trademark of Silicon Graphics, -Inc. Unix is a registered trademark of The Open Group. The `X' device and X -Window System are trademarks of The Open Group. XFree86 is a trademark of -The XFree86 Project. Linux is a registered trademark of Linus Torvalds. -Intel is a registered trademark of Intel Corporation. 3Dlabs, GLINT, and -Oxygen are either registered trademarks or trademarks of 3Dlabs Inc. Ltd. -3dfx, Voodoo3, Voodoo4, and Voodoo5 are registered trademarks of 3dfx Inter- -active, Incorporated. Matrox is a registered trademark of Matrox Electronic -Systems Ltd. ATI Rage and Radeon is a registered trademark of ATI Technolo- -gies, Inc. All other trademarks mentioned are the property of their respec- -tive owners. - -2. Introduction - -This document describes how to download, compile and install the DRI. The -DRI provides 3D graphics hardware acceleration for the XFree86 project. This -information is intended for experienced Linux developers. Beginners are -probably better off installing precompiled packages. - -Edits, corrections and updates to this document may be mailed to . - -Last updated on 13 February 2002 by Brian Paul. - -3. Prerequisites - -You'll need the following: - - o An installation of XFree86 4.1 or later. The DRI tree has been pruned - down to minimize its size. But in order to build the DRI tree you need - to have recent X header files, etc. already installed. If you don't - have XFree86 4.1 (or later) installed you can probably install it from - RPMs (or another package format). Or, you can download XFree86 as - sources and compile/install it yourself. - - o At least 200MB of free disk space. If you compile for debugging (the -g - option) then you'll need about 600MB. - - o GCC compiler and related tools. - - o ssh (secure shell) if you're a DRI developer and don't want to use - anonymous CVS download. - - o A 2.4.x Linux Kernel. See below for details. - - o FreeBSD support is not currently being maintained and may not work. - -The DRI 3D drivers generally work on systems with Intel or AMD CPUs. How- -ever, limited support for Alpha and PowerPC support is underway. - -For 3dfx Voodoo hardware, you'll also need the Glide3 runtime library -(libglide3-v3.so for Voodoo3 or libglide3-v5.so for Voodoo4/5). These can be -downloaded from the DRI website. You can compile them yourself, but it's -often a painful process. - -For Matrox G200/G400, Intel i810/i830 or ATI Rage128/Radeon hardware, you'll -also need AGP support in your Linux kernel, either built-in or as a loadable -module. - -4. Linux Kernel Preparation - -Only the Linux 2.4.x kernels are currently supported by the DRI hardware -drivers. 2.5.x kernels may work, but aren't tested. - -Most of the DRI drivers require AGP support and using Intel Pentium III SSE -optimizations also requires an up-to-date Linux kernel. Configuring your -kernel correctly is very important, as features such as SSE optimizations -will be disabled if your kernel does not support them. Thus, if you have a -Pentium III processor, you must configure your kernel for the Pentium III -processor family. - -Building a new Linux kernel can be difficult for beginners but there are -resources on the Internet to help. This document assumes experience with -configuring, building and installing Linux kernels. - -Linux kernels can be downloaded from www.kernel.org - -Here are the basic steps for kernel setup. - - o Download the needed kernel and put it in /usr/src. Create a directory - for the source and unpack it. For example: - - cd /usr/src - rm -f linux - mkdir linux-2.4.x - ln -s linux-2.4.x linux - bzcat linux-2.4.x.tar.bz2 | tar xf - - - It is critical that /usr/src/linux point to your new kernel sources, - otherwise the kernel headers will not be used when building the DRI. - This will almost certainly cause compilation problems. - - o Read /usr/src/linux/Documentation/Changes. This file lists the minimum - requirements for all software packages required to build the kernel. - You must upgrade at least gcc, make, binutils and modutils to at least - the versions specified in this file. The other packages may not be - needed. If you are upgrading from Linux 2.2.x you must upgrade your - modutils package for Linux 2.4.x. - - o Configure your kernel. You might, for example, use make menuconfig and - do the following: - - o Go to Code maturity level options - - o Enable Prompt for development and/or incomplete code/drivers - - o hit ESC to return to the top-level menu - - o Go to Processor type and features - - o Select your processor type from Processor Family - - o hit ESC to return to the top-level menu - - o Go to Character devices - - o Disable Direct Rendering Manager (XFree86 DRI support) since we'll - use the DRI code from the XFree86/DRI tree and will compile it - there. - - o Go to /dev/agpgart (AGP Support) (EXPERIMENTAL) (NEW) - - o Hit SPACE twice to build AGP support into the kernel - - o Enable all chipsets' support for AGP - - o It's recommended that you turn on MTRRs under Processor type and - Features, but not required. - - o Configure the rest of the kernel as required for your system (i.e. Eth- - ernet, SCSI, etc) - - o Exit, saving your kernel configuration. - - o Edit your /etc/lilo.conf file. Make sure you have an image entry as - follows (or similar): - - image=/boot/vmlinuz - label=linux.2.4.x - read-only - root=/dev/hda1 - - The important part is that you have /boot/vmlinuz without a trailing - version number. If this is the first entry in your /etc/lilo.conf AND - you haven't set a default, then this will be your default kernel. - - o Compile the new kernel. - - cd /usr/src/linux-2.4.x - make dep - make bzImage - make modules - make modules_install - make install - - Note that last make command will automatically run lilo for you. - - o Now reboot to use the new kernel. - -5. CPU Architectures - -In general, nothing special has to be done to use the DRI on different CPU -architectures. There are, however, a few optimizations that are CPU-depen- -dent. Mesa will determine at runtime which CPU-dependent optimizations -should be used and enable them where appropriate. - -5.1 Intel Pentium III Features - -The Pentium III SSE instructions are used in optimized vertex transformation -functions in the Mesa-based DRI drivers. On Linux, SSE requires a recent -kernel (such as 2.4.0-test11 or later) both at compile time and runtime. - -5.2 AMD 3DNow! Features - -AMD's 3DNow! instructions are used in optimized vertex transformation func- -tions in the Mesa-based DRI drivers. 3DNow! is supported in most versions of -Linux. - -5.3 Alpha Features - -On newer Alpha processors a significant performance increase can be seen with -the addition of the -mcpu= option to GCC. This option is dependent on the -architecture of the processor. For example, -mcpu=ev6 will build specifi- -cally for the EV6 based AXP's, giving both byte and word alignment access to -the DRI/Mesa drivers. - -To enable this optimization edit your xc/config/host.def file and add the -line: - -#define DefaultGcc2AxpOpt -O2 -mcpu=ev6 - -Additional speed improvements to 3D rendering can be achieved by installing -Compaq's Math Libraries (CPML) which can be obtained from http://www.sup- -port.compaq.com/alpha-tools/software/index.html - -Once installed, you can add this line to your host.def to build with the CPML -libraries: - -#define UseCompaqMathLibrary YES - -The host.def file is explained below. - -6. Downloading the XFree86/DRI CVS Sources - -The DRI project is hosted by SourceForge. The DRI source code, which is a -subset of the XFree86 source tree, is kept in a CVS repository there. - -The DRI CVS sources may be accessed either anonymously or as a registered -SourceForge user. It's recommended that you become a registered SourceForge -user so that you may submit non-anonymous bug reports and can participate in -the mailing lists. - -6.1 Anonymous CVS download: - - 1. Create a directory to store the CVS files: - - cd ~ - mkdir DRI-CVS - - You could put your CVS directory in a different place but we'll use - ~/DRI-CVS/ here. - - 2. Check out the CVS sources: - - cd ~/DRI-CVS - cvs -d:pserver:anonymous@cvs.dri.sourceforge.net:/cvsroot/dri login - (hit ENTER when prompted for a password) - cvs -z3 -d:pserver:anonymous@cvs.dri.sourceforge.net:/cvsroot/dri co xc - - The -z3 flag causes compression to be used in order to reduce the down- - load time. - -6.2 Registered CVS download: - - 1. Create a directory to store the CVS files: - - cd ~ - mkdir DRI-CVS - - You could put your CVS directory in a different place but we'll use - ~/DRI-CVS/ here. - - 2. Set the CVS_RSH environment variable: - - setenv CVS_RSH ssh // if using csh or tcsh - export CVS_RSH=ssh // if using sh or bash - - 3. Check out the CVS sources: - - cd ~/DRI-CVS - cvs -z3 -d:ext:YOURID@cvs.dri.sourceforge.net:/cvsroot/dri co xc - - Replace YOURID with your CVS login name. You'll be prompted to enter - your sourceforge password. - - The -z3 flag causes compression to be used in order to reduce the down- - load time. - -6.3 Updating your CVS sources - -In the future you'll want to occasionally update your local copy of the DRI -source code to get the latest changes. This can be done with: - - cd ~/DRI-CVS - cvs -z3 update -dA xc - -The -d flag causes any new subdirectories to be created and -A causes most -recent trunk sources to be fetched, not branch sources. - -7. Mesa - -Most of the DRI 3D drivers are based on Mesa (the free implementation of the -OpenGL API). The relevant files from Mesa are already included in the -XFree86/DRI source tree. There is no need to download or install the Mesa -source files separately. - -Sometimes a newer version of Mesa will be available than the version included -in XFree86/DRI. Upgrading Mesa within XFree86/DRI is not always straightfor- -ward. It can be an error-prone undertaking, especially for beginners, and is -not generally recommended. The DRI developers will upgrade Mesa when appro- -priate. - -8. Compiling the XFree86/DRI tree - -8.1 Make a build tree - -Rather than placing object files and library files right in the source tree, -they're instead put into a parallel build tree. The build tree is made with -the lndir command: - - cd ~/DRI-CVS - ln -s xc XFree40 - mkdir build - cd build - lndir -silent -ignorelinks ../XFree40 - -The build tree will be populated with symbolic links which point back into -the CVS source tree. - -Advanced users may have several build trees for compiling and testing with -different options. - -8.2 Edit the host.def file - -The ~/DRI-CVS/build/xc/config/cf/host.def file is used to configure the -XFree86 build process. You can change it to customize your build options or -make adjustments for your particular system configuration - -The default host.def file will look something like this: - - #define DefaultCCOptions -Wall - (i386) #define DefaultGcc2i386Opt -O2 - (Alpha) #define DefaultGcc2AxpOpt -O2 -mcpu=ev6 (or similar) - #define LibraryCDebugFlags -O2 - #define BuildServersOnly YES - #define XF86CardDrivers vga tdfx mga ati i810 - #define LinuxDistribution LinuxRedHat - #define DefaultCCOptions -ansi GccWarningOptions -pipe - #define BuildXF86DRI YES - /* Optionally turn these on for debugging */ - /* #define GlxBuiltInTdfx YES */ - /* #define GlxBuiltInMga YES */ - /* #define GlxBuiltInR128 YES */ - /* #define GlxBuiltInRadeon YES */ - /* #define DoLoadableServer NO */ - #define SharedLibFont NO - -The ProjectRoot variable specifies where the XFree86 files will be installed. -We recommend installing the DRI files over your existing XFree86 installation -- it's generally safe to do and less error-prone. This policy is different -than what we used to recommend. - -If XFree86 4.x is not installed in /usr/X11R6/ you'll have to add the follow- -ing to the host.def file: - - #define ProjectRoot pathToYourXFree86installation - -Note the XF86CardDrivers line to be sure your card's driver is listed. - -If you want to enable 3DNow! optimizations in Mesa and the DRI drivers, you -should add the following: - - #define MesaUse3DNow YES - -You don't have to be using an AMD processor in order to enable this option. -The DRI will look for 3DNow! support and runtime and only enable it if appli- -cable. - -If you want to enable SSE optimizations in Mesa and the DRI drivers, you must -upgrade to a Linux 2.4.x kernel. Mesa will verify that SSE is supported by -both your processor and your operating system, but to build Mesa inside the -DRI you need to have the Linux 2.4.x kernel headers in /usr/src/linux. If -you enable SSE optimizations with an earlier version of the Linux kernel in -/usr/src/linux, Mesa will not compile. You have been warned. If you do have -a 2.4.x kernel, you should add the following: - - #define MesaUseSSE YES - -If you want to build the DRM kernel modules as part of the full build pro- -cess, add the following: - - #define BuildXF86DRM YES - -Otherwise, you'll need to build them separately as described below. - -8.3 Compilation - -To compile the complete DRI tree: - - cd ~/DRI-CVS/build/xc/ - make World >& world.log - -Or if you want to watch the compilation progress: - - cd ~/DRI-CVS/build/xc/ - make World >& world.log & - tail -f world.log - -With the default compilation flags it's normal to get a lot of warnings dur- -ing compilation. - -Building will take some time so you may want to go check your email or visit -slashdot. - -WARNING: do not use the -j option with make. It's reported that it does not -work with XFree86/DRI. - -8.4 Check for compilation errors - -Using your text editor, examine world.log for errors by searching for the -pattern ***. - -After fixing the errors, run make World again. Later, you might just compile -parts of the source tree but it's important that the whole tree will build -first. - -If you edited your host.def file to enable automatic building of the DRI ker- -nel module(s), verify that they were built: - - cd ~/DRI-CVS/build/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel - ls - -Otherwise, build them now by running - - cd ~/DRI-CVS/build/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel - make -f Makefile.linux - -For the 3dfx Voodoo, you should see tdfx.o. For the Matrox G200/G400, you -should see mga.o. For the ATI Rage 128, you should see r128.o. For the ATI -Radeon, you should see radeon.o. For the Intel i810, you should see i810.o. - -If the DRI kernel module(s) failed to build you should verify that you're -using the right version of the Linux kernel. The most recent kernels are not -always supported. - -If your build machine is running a different version of the kernel than your -target machine (i.e. 2.2.x vs. 2.4.x), make will select the wrong kernel -source tree. This can be fixed by explicitly setting the value of LINUXDIR. -If the path to your kernel source is /usr/src/linux-2.4.x, - - cd ~/DRI-CVS/build/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel - make -f Makefile.linux LINUXDIR=/usr/src/linux-2.4.x - -or alternatively, edit Makefile.linux to set LINUXDIR before the ifndef LIN- -UXDIR line. - -8.5 DRI kernel module installation - -The DRI kernel modules will be in ~/DRI-CVS/build/xc/pro- -grams/Xserver/hw/xfree86/os-support/linux/drm/kernel/. - -To load the appropriate DRM module in your running kernel you can either use -ismod and restart your X server or copy the kernel module to /lib/mod- -ules/2.4.x/kernel/drivers/char/drm/ then run depmod and restart your X -server. - -Make sure you first unload any older DRI kernel modules that might be already -loaded. - -Note that some DRM modules require that the agpgart module be loaded first. - -9. Normal Installation and Configuration - -Most users will want to install the new X server and use it in place of their -old X server. This section explains how to do that. - -Developers, on the other hand, may just want to test the X server without -actually installing it as their default server. If you want to do that, skip -to the next section. - -9.1 Installation - -Here are the installation commands: - - su - cd ~/DRI-CVS/build/xc - make install - -9.2 Update the XF86Config File - -You may need to edit your XF86Config file to enable the DRI. The config file -is usually installed as /etc/X11/XF86Config-4. See the DRI User Guide for -details, but basically, you need to load the "glx" and "dri" modules and add -a "DRI" section. - -On the DRI web site, in the resources section, you'll find example XF86Config -files for a number of graphics cards. These configuration files also setup -DRI options so it's highly recommended that you look at these examples. - -The XFree86 4.x server can generate a basic configuration file itself. Sim- -ply do this: - - cd /usr/X11R6/bin - ./XFree86 -configure - -A file named /root/XF86Config.new will be created. It should allow you to -try your X server but you'll almost certainly have to edit it. For example, -you should add HorizSync and VertRefresh options to the Monitor section and -Modes options to the Screen section. Also, the ModulePath option in the -Files section should be set to /usr/X11R6/lib/modules. - -9.3 Start the New X Server - -The new X server should be ready to use now. Start your X server in your -usual manner. Often times the startx command is used: - - startx - -10. Testing the Server Without Installing It - -As mentioned at the start of section 9, developers may want to simply run the -X server without installing it. This can save some time and allow you to -keep a number of X servers available for testing. - -10.1 Configuration - -As described in the preceding section, you'll need to create a configuration -file for the new server. Put the XF86Config file in your ~/DRI- -CVS/build/xc/programs/Xserver directory. - -Be sure the ModulePath option in your XF86Config file is set correctly. - -10.2 A Startup Script - -A simple shell script can be used to start the X server. Here's an example. - - #!/bin/sh - export DISPLAY=:0 - ./XFree86 -xf86config XF86Config & \ - sleep 2 - fvwm2 & - xset b off - xmodmap -e "clear mod4" - xsetroot -solid "#00306f" - xterm -geometry 80x40+0+0 - -You might name this script start-dri. Put it in your ~/DRI-CVS/build/xc/pro- -grams/Xserver directory. - -To test the server run the script: - - cd ~/DRI-CVS/build/xc/programs/Xserver - ./start-dri - -For debugging, you may also want to capture the log messages printed by the -server in a file. If you're using the C-shell: - - ./start-dri >& log - -11. Where To Go From Here - -At this point your X server should be up and running with hardware-acceler- -ated direct rendering. Please read the DRI User Guide for information about -trouble shooting and how to use the DRI-enabled X server for 3D applications. - - Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/DRIcomp.sgml,v 1.19 dawes Exp $ - - + DRI Compilation Guide + + VA Linux Systems, Inc. Professional Services - Graphics. + + 21 April 2001 + +1. Preamble + +1.1 Copyright + +Copyright 2000-2001 by VA Linux Systems, Inc. All Rights Reserved. + +Permission is granted to make and distribute verbatim copies of this document +provided the copyright notice and this permission notice are preserved on all +copies. + +1.2 Trademarks + +OpenGL is a registered trademark and SGI is a trademark of Silicon Graphics, +Inc. Unix is a registered trademark of The Open Group. The `X' device and X +Window System are trademarks of The Open Group. XFree86 is a trademark of +The XFree86 Project. Linux is a registered trademark of Linus Torvalds. +Intel is a registered trademark of Intel Corporation. 3Dlabs, GLINT, and +Oxygen are either registered trademarks or trademarks of 3Dlabs Inc. Ltd. +3dfx, Voodoo3, Voodoo4, and Voodoo5 are registered trademarks of 3dfx Inter- +active, Incorporated. Matrox is a registered trademark of Matrox Electronic +Systems Ltd. ATI Rage and Radeon is a registered trademark of ATI Technolo- +gies, Inc. All other trademarks mentioned are the property of their respec- +tive owners. + +2. Introduction + +This document describes how to download, compile and install the DRI. The +DRI provides 3D graphics hardware acceleration for the XFree86 project. This +information is intended for experienced Linux developers. Beginners are +probably better off installing precompiled packages. + +Edits, corrections and updates to this document may be mailed to . + +Last updated on 13 February 2002 by Brian Paul. + +3. Prerequisites + +You'll need the following: + + o An installation of XFree86 4.1 or later. The DRI tree has been pruned + down to minimize its size. But in order to build the DRI tree you need + to have recent X header files, etc. already installed. If you don't + have XFree86 4.1 (or later) installed you can probably install it from + RPMs (or another package format). Or, you can download XFree86 as + sources and compile/install it yourself. + + o At least 200MB of free disk space. If you compile for debugging (the -g + option) then you'll need about 600MB. + + o GCC compiler and related tools. + + o ssh (secure shell) if you're a DRI developer and don't want to use + anonymous CVS download. + + o A 2.4.x Linux Kernel. See below for details. + + o FreeBSD support is not currently being maintained and may not work. + +The DRI 3D drivers generally work on systems with Intel or AMD CPUs. How- +ever, limited support for Alpha and PowerPC support is underway. + +For 3dfx Voodoo hardware, you'll also need the Glide3 runtime library +(libglide3-v3.so for Voodoo3 or libglide3-v5.so for Voodoo4/5). These can be +downloaded from the DRI website. You can compile them yourself, but it's +often a painful process. + +For Matrox G200/G400, Intel i810/i830 or ATI Rage128/Radeon hardware, you'll +also need AGP support in your Linux kernel, either built-in or as a loadable +module. + +4. Linux Kernel Preparation + +Only the Linux 2.4.x kernels are currently supported by the DRI hardware +drivers. 2.5.x kernels may work, but aren't tested. + +Most of the DRI drivers require AGP support and using Intel Pentium III SSE +optimizations also requires an up-to-date Linux kernel. Configuring your +kernel correctly is very important, as features such as SSE optimizations +will be disabled if your kernel does not support them. Thus, if you have a +Pentium III processor, you must configure your kernel for the Pentium III +processor family. + +Building a new Linux kernel can be difficult for beginners but there are +resources on the Internet to help. This document assumes experience with +configuring, building and installing Linux kernels. + +Linux kernels can be downloaded from www.kernel.org + +Here are the basic steps for kernel setup. + + o Download the needed kernel and put it in /usr/src. Create a directory + for the source and unpack it. For example: + + cd /usr/src + rm -f linux + mkdir linux-2.4.x + ln -s linux-2.4.x linux + bzcat linux-2.4.x.tar.bz2 | tar xf - + + It is critical that /usr/src/linux point to your new kernel sources, + otherwise the kernel headers will not be used when building the DRI. + This will almost certainly cause compilation problems. + + o Read /usr/src/linux/Documentation/Changes. This file lists the minimum + requirements for all software packages required to build the kernel. + You must upgrade at least gcc, make, binutils and modutils to at least + the versions specified in this file. The other packages may not be + needed. If you are upgrading from Linux 2.2.x you must upgrade your + modutils package for Linux 2.4.x. + + o Configure your kernel. You might, for example, use make menuconfig and + do the following: + + o Go to Code maturity level options + + o Enable Prompt for development and/or incomplete code/drivers + + o hit ESC to return to the top-level menu + + o Go to Processor type and features + + o Select your processor type from Processor Family + + o hit ESC to return to the top-level menu + + o Go to Character devices + + o Disable Direct Rendering Manager (XFree86 DRI support) since we'll + use the DRI code from the XFree86/DRI tree and will compile it + there. + + o Go to /dev/agpgart (AGP Support) (EXPERIMENTAL) (NEW) + + o Hit SPACE twice to build AGP support into the kernel + + o Enable all chipsets' support for AGP + + o It's recommended that you turn on MTRRs under Processor type and + Features, but not required. + + o Configure the rest of the kernel as required for your system (i.e. Eth- + ernet, SCSI, etc) + + o Exit, saving your kernel configuration. + + o Edit your /etc/lilo.conf file. Make sure you have an image entry as + follows (or similar): + + image=/boot/vmlinuz + label=linux.2.4.x + read-only + root=/dev/hda1 + + The important part is that you have /boot/vmlinuz without a trailing + version number. If this is the first entry in your /etc/lilo.conf AND + you haven't set a default, then this will be your default kernel. + + o Compile the new kernel. + + cd /usr/src/linux-2.4.x + make dep + make bzImage + make modules + make modules_install + make install + + Note that last make command will automatically run lilo for you. + + o Now reboot to use the new kernel. + +5. CPU Architectures + +In general, nothing special has to be done to use the DRI on different CPU +architectures. There are, however, a few optimizations that are CPU-depen- +dent. Mesa will determine at runtime which CPU-dependent optimizations +should be used and enable them where appropriate. + +5.1 Intel Pentium III Features + +The Pentium III SSE instructions are used in optimized vertex transformation +functions in the Mesa-based DRI drivers. On Linux, SSE requires a recent +kernel (such as 2.4.0-test11 or later) both at compile time and runtime. + +5.2 AMD 3DNow! Features + +AMD's 3DNow! instructions are used in optimized vertex transformation func- +tions in the Mesa-based DRI drivers. 3DNow! is supported in most versions of +Linux. + +5.3 Alpha Features + +On newer Alpha processors a significant performance increase can be seen with +the addition of the -mcpu= option to GCC. This option is dependent on the +architecture of the processor. For example, -mcpu=ev6 will build specifi- +cally for the EV6 based AXP's, giving both byte and word alignment access to +the DRI/Mesa drivers. + +To enable this optimization edit your xc/config/host.def file and add the +line: + +#define DefaultGcc2AxpOpt -O2 -mcpu=ev6 + +Additional speed improvements to 3D rendering can be achieved by installing +Compaq's Math Libraries (CPML) which can be obtained from http://www.sup- +port.compaq.com/alpha-tools/software/index.html + +Once installed, you can add this line to your host.def to build with the CPML +libraries: + +#define UseCompaqMathLibrary YES + +The host.def file is explained below. + +6. Downloading the XFree86/DRI CVS Sources + +The DRI project is hosted by SourceForge. The DRI source code, which is a +subset of the XFree86 source tree, is kept in a CVS repository there. + +The DRI CVS sources may be accessed either anonymously or as a registered +SourceForge user. It's recommended that you become a registered SourceForge +user so that you may submit non-anonymous bug reports and can participate in +the mailing lists. + +6.1 Anonymous CVS download: + + 1. Create a directory to store the CVS files: + + cd ~ + mkdir DRI-CVS + + You could put your CVS directory in a different place but we'll use + ~/DRI-CVS/ here. + + 2. Check out the CVS sources: + + cd ~/DRI-CVS + cvs -d:pserver:anonymous@cvs.dri.sourceforge.net:/cvsroot/dri login + (hit ENTER when prompted for a password) + cvs -z3 -d:pserver:anonymous@cvs.dri.sourceforge.net:/cvsroot/dri co xc + + The -z3 flag causes compression to be used in order to reduce the down- + load time. + +6.2 Registered CVS download: + + 1. Create a directory to store the CVS files: + + cd ~ + mkdir DRI-CVS + + You could put your CVS directory in a different place but we'll use + ~/DRI-CVS/ here. + + 2. Set the CVS_RSH environment variable: + + setenv CVS_RSH ssh // if using csh or tcsh + export CVS_RSH=ssh // if using sh or bash + + 3. Check out the CVS sources: + + cd ~/DRI-CVS + cvs -z3 -d:ext:YOURID@cvs.dri.sourceforge.net:/cvsroot/dri co xc + + Replace YOURID with your CVS login name. You'll be prompted to enter + your sourceforge password. + + The -z3 flag causes compression to be used in order to reduce the down- + load time. + +6.3 Updating your CVS sources + +In the future you'll want to occasionally update your local copy of the DRI +source code to get the latest changes. This can be done with: + + cd ~/DRI-CVS + cvs -z3 update -dA xc + +The -d flag causes any new subdirectories to be created and -A causes most +recent trunk sources to be fetched, not branch sources. + +7. Mesa + +Most of the DRI 3D drivers are based on Mesa (the free implementation of the +OpenGL API). The relevant files from Mesa are already included in the +XFree86/DRI source tree. There is no need to download or install the Mesa +source files separately. + +Sometimes a newer version of Mesa will be available than the version included +in XFree86/DRI. Upgrading Mesa within XFree86/DRI is not always straightfor- +ward. It can be an error-prone undertaking, especially for beginners, and is +not generally recommended. The DRI developers will upgrade Mesa when appro- +priate. + +8. Compiling the XFree86/DRI tree + +8.1 Make a build tree + +Rather than placing object files and library files right in the source tree, +they're instead put into a parallel build tree. The build tree is made with +the lndir command: + + cd ~/DRI-CVS + ln -s xc XFree40 + mkdir build + cd build + lndir -silent -ignorelinks ../XFree40 + +The build tree will be populated with symbolic links which point back into +the CVS source tree. + +Advanced users may have several build trees for compiling and testing with +different options. + +8.2 Edit the host.def file + +The ~/DRI-CVS/build/xc/config/cf/host.def file is used to configure the +XFree86 build process. You can change it to customize your build options or +make adjustments for your particular system configuration + +The default host.def file will look something like this: + + #define DefaultCCOptions -Wall + (i386) #define DefaultGcc2i386Opt -O2 + (Alpha) #define DefaultGcc2AxpOpt -O2 -mcpu=ev6 (or similar) + #define LibraryCDebugFlags -O2 + #define BuildServersOnly YES + #define XF86CardDrivers vga tdfx mga ati i810 + #define LinuxDistribution LinuxRedHat + #define DefaultCCOptions -ansi GccWarningOptions -pipe + #define BuildXF86DRI YES + /* Optionally turn these on for debugging */ + /* #define GlxBuiltInTdfx YES */ + /* #define GlxBuiltInMga YES */ + /* #define GlxBuiltInR128 YES */ + /* #define GlxBuiltInRadeon YES */ + /* #define DoLoadableServer NO */ + #define SharedLibFont NO + +The ProjectRoot variable specifies where the XFree86 files will be installed. +We recommend installing the DRI files over your existing XFree86 installation +- it's generally safe to do and less error-prone. This policy is different +than what we used to recommend. + +If XFree86 4.x is not installed in /usr/X11R6/ you'll have to add the follow- +ing to the host.def file: + + #define ProjectRoot pathToYourXFree86installation + +Note the XF86CardDrivers line to be sure your card's driver is listed. + +If you want to enable 3DNow! optimizations in Mesa and the DRI drivers, you +should add the following: + + #define MesaUse3DNow YES + +You don't have to be using an AMD processor in order to enable this option. +The DRI will look for 3DNow! support and runtime and only enable it if appli- +cable. + +If you want to enable SSE optimizations in Mesa and the DRI drivers, you must +upgrade to a Linux 2.4.x kernel. Mesa will verify that SSE is supported by +both your processor and your operating system, but to build Mesa inside the +DRI you need to have the Linux 2.4.x kernel headers in /usr/src/linux. If +you enable SSE optimizations with an earlier version of the Linux kernel in +/usr/src/linux, Mesa will not compile. You have been warned. If you do have +a 2.4.x kernel, you should add the following: + + #define MesaUseSSE YES + +If you want to build the DRM kernel modules as part of the full build pro- +cess, add the following: + + #define BuildXF86DRM YES + +Otherwise, you'll need to build them separately as described below. + +8.3 Compilation + +To compile the complete DRI tree: + + cd ~/DRI-CVS/build/xc/ + make World >& world.log + +Or if you want to watch the compilation progress: + + cd ~/DRI-CVS/build/xc/ + make World >& world.log & + tail -f world.log + +With the default compilation flags it's normal to get a lot of warnings dur- +ing compilation. + +Building will take some time so you may want to go check your email or visit +slashdot. + +WARNING: do not use the -j option with make. It's reported that it does not +work with XFree86/DRI. + +8.4 Check for compilation errors + +Using your text editor, examine world.log for errors by searching for the +pattern ***. + +After fixing the errors, run make World again. Later, you might just compile +parts of the source tree but it's important that the whole tree will build +first. + +If you edited your host.def file to enable automatic building of the DRI ker- +nel module(s), verify that they were built: + + cd ~/DRI-CVS/build/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel + ls + +Otherwise, build them now by running + + cd ~/DRI-CVS/build/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel + make -f Makefile.linux + +For the 3dfx Voodoo, you should see tdfx.o. For the Matrox G200/G400, you +should see mga.o. For the ATI Rage 128, you should see r128.o. For the ATI +Radeon, you should see radeon.o. For the Intel i810, you should see i810.o. + +If the DRI kernel module(s) failed to build you should verify that you're +using the right version of the Linux kernel. The most recent kernels are not +always supported. + +If your build machine is running a different version of the kernel than your +target machine (i.e. 2.2.x vs. 2.4.x), make will select the wrong kernel +source tree. This can be fixed by explicitly setting the value of LINUXDIR. +If the path to your kernel source is /usr/src/linux-2.4.x, + + cd ~/DRI-CVS/build/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel + make -f Makefile.linux LINUXDIR=/usr/src/linux-2.4.x + +or alternatively, edit Makefile.linux to set LINUXDIR before the ifndef LIN- +UXDIR line. + +8.5 DRI kernel module installation + +The DRI kernel modules will be in ~/DRI-CVS/build/xc/pro- +grams/Xserver/hw/xfree86/os-support/linux/drm/kernel/. + +To load the appropriate DRM module in your running kernel you can either use +ismod and restart your X server or copy the kernel module to /lib/mod- +ules/2.4.x/kernel/drivers/char/drm/ then run depmod and restart your X +server. + +Make sure you first unload any older DRI kernel modules that might be already +loaded. + +Note that some DRM modules require that the agpgart module be loaded first. + +9. Normal Installation and Configuration + +Most users will want to install the new X server and use it in place of their +old X server. This section explains how to do that. + +Developers, on the other hand, may just want to test the X server without +actually installing it as their default server. If you want to do that, skip +to the next section. + +9.1 Installation + +Here are the installation commands: + + su + cd ~/DRI-CVS/build/xc + make install + +9.2 Update the XF86Config File + +You may need to edit your XF86Config file to enable the DRI. The config file +is usually installed as /etc/X11/XF86Config-4. See the DRI User Guide for +details, but basically, you need to load the "glx" and "dri" modules and add +a "DRI" section. + +On the DRI web site, in the resources section, you'll find example XF86Config +files for a number of graphics cards. These configuration files also setup +DRI options so it's highly recommended that you look at these examples. + +The XFree86 4.x server can generate a basic configuration file itself. Sim- +ply do this: + + cd /usr/X11R6/bin + ./XFree86 -configure + +A file named /root/XF86Config.new will be created. It should allow you to +try your X server but you'll almost certainly have to edit it. For example, +you should add HorizSync and VertRefresh options to the Monitor section and +Modes options to the Screen section. Also, the ModulePath option in the +Files section should be set to /usr/X11R6/lib/modules. + +9.3 Start the New X Server + +The new X server should be ready to use now. Start your X server in your +usual manner. Often times the startx command is used: + + startx + +10. Testing the Server Without Installing It + +As mentioned at the start of section 9, developers may want to simply run the +X server without installing it. This can save some time and allow you to +keep a number of X servers available for testing. + +10.1 Configuration + +As described in the preceding section, you'll need to create a configuration +file for the new server. Put the XF86Config file in your ~/DRI- +CVS/build/xc/programs/Xserver directory. + +Be sure the ModulePath option in your XF86Config file is set correctly. + +10.2 A Startup Script + +A simple shell script can be used to start the X server. Here's an example. + + #!/bin/sh + export DISPLAY=:0 + ./XFree86 -xf86config XF86Config & \ + sleep 2 + fvwm2 & + xset b off + xmodmap -e "clear mod4" + xsetroot -solid "#00306f" + xterm -geometry 80x40+0+0 + +You might name this script start-dri. Put it in your ~/DRI-CVS/build/xc/pro- +grams/Xserver directory. + +To test the server run the script: + + cd ~/DRI-CVS/build/xc/programs/Xserver + ./start-dri + +For debugging, you may also want to capture the log messages printed by the +server in a file. If you're using the C-shell: + + ./start-dri >& log + +11. Where To Go From Here + +At this point your X server should be up and running with hardware-acceler- +ated direct rendering. Please read the DRI User Guide for information about +trouble shooting and how to use the DRI-enabled X server for 3D applications. + + Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/DRIcomp.sgml,v 1.19 dawes Exp $ diff --git a/xorg-server/xkeyboard-config/symbols/cm b/xorg-server/xkeyboard-config/symbols/cm index 449bbcad3..1757ae05b 100644 --- a/xorg-server/xkeyboard-config/symbols/cm +++ b/xorg-server/xkeyboard-config/symbols/cm @@ -1,331 +1,331 @@ -// ========== Cameroon Keyboards ========== -// ****** For Instructions, see "Use of Cameroon Keyboards" section below ****** - - -// The XKB versions of these keyboards were developed by Matthew Lee, Jenni Beadle, and Bruce Cox of SIL Cameroon in association with Going Komputya, Uwe Yung of the Goethe Institute, Yaoundé, and Centre ANACLAC. - -// Cameroon is officially a bilingual country, using French and English, but there are over 270 minority languages. - -// * Cameroon Français is an exact copy of the French France keyboard intended for AZERTY users. -// * Cameroon is an exact copy of the Basic US Keyboard. I can not currently name this "Cameroon English" due to a limitation of XKB. -// * Cameroon QWERTY and Cameroon AZERTY are based largely on SIL Cameroon's Keyman and Microsoft keyboards of the same style already in wide use. These keyboards are designed to allow the user to type any of Cameroon's 270+ languages and dialects that use the approved orthography. This Approved Orthography was adopted in 1979 by the National Committee for the Unification and Harmonisation of Alphabets of Camerooninan Languages. -// * Cameroon Dvorak is described below. - -// ===== Use of Cameroon Keyboards ===== - -// == Fonts == -// These keyboards are fully Unicode (5.1), so we recommend using a good unicode font for diacritics to position correctly. Recommended fonts are: ttf-sil-charis, ttf-sil-doulos, ttf-sil-gentium and ttf-sil-andika (All of which are free for Linux, Mac, and Windows). - - -// == Cameroon AZERTY == -// Cameroon AZERTY uses the French France (AZERTY) layout, as french keyboards are widely used here. While this keyboard is designed for Cameroonian orthography, it still is possible but not recommended, to type French with minimal discomfort using this keyboard. -// Cameroon AZERTY uses the "!" (exclamation) key as the "Cameroon" key. Pressing this key before another key allows you to access the special letters and diacritics needed in Cameroonian orthography. -// For example, press "!" then "a" and get "ɛ" (small epsilon). "!" then "Shift" + "a" (A) will get an "Ɛ" (capital epsilon). Press the "!" key twice to get a "!". -// If you prefer, you can hold the AltGr (and/or Shift) key to access the same letters, but we have found this to be much more awkward in practice. If you really don't like our Cameroon key, simply comment out "include "cm(exclamation_switch)"" and the exclamation key will return to normal. -// All Diacritics (with the exception of French Trema and Circumflex) must be typed (in order of stacking) after the letter. - - -// == Cameroon QWERTY == -// Cameroon QWERTY uses the US QWERTY layout, as US keyboards are also widely used here. While this keyboard is designed for Cameroonian orthography, it is possible, but not recommended, to type English with minimal discomfort using this keyboard. -// Cameroon QWERTY uses the ";" (semicolon) key as the "Cameroon" key. Pressing this key before another key allows you to access the special letters and diacritics needed in Cameroonian orthography. -// For example, press ";" then "a" and get "ɛ" (small epsilon). ";" then "Shift" + "a" (A) will get an "Ɛ" (capital epsilon). Press ";" twice to get a ";", or press Shift + ; (:) twice to get a ":" (colon). -// If you prefer, you can hold the AltGr (and/or Shift) key to access the same letters, but we have found this to be much more awkward in practice. If you really don't like our Cameroon key, simply comment out "include "cm(semicolon_switch)"" and the semicolon key will return to normal. -// All Diacritics must be typed (in order of stacking) after the letter. - - -// == Cameroon Dvorak == -// Cameroon Dvorak is uses a similar system to Cameroon QWERTY. - -default -partial alphanumeric_keys -xkb_symbols "basic" { - - name[Group1]="English (Cameroon)"; - - // Alphanumeric section - key { [ grave, asciitilde ] }; - key { [ 1, exclam ] }; - key { [ 2, at ] }; - key { [ 3, numbersign ] }; - key { [ 4, dollar ] }; - key { [ 5, percent ] }; - key { [ 6, asciicircum ] }; - key { [ 7, ampersand ] }; - key { [ 8, asterisk ] }; - key { [ 9, parenleft ] }; - key { [ 0, parenright ] }; - key { [ minus, underscore ] }; - key { [ equal, plus ] }; - - key { [ q, Q ] }; - key { [ w, W ] }; - key { [ e, E ] }; - key { [ r, R ] }; - key { [ t, T ] }; - key { [ y, Y ] }; - key { [ u, U ] }; - key { [ i, I ] }; - key { [ o, O ] }; - key { [ p, P ] }; - key { [ bracketleft, braceleft ] }; - key { [ bracketright, braceright ] }; - key { [ a, A ] }; - key { [ s, S ] }; - key { [ d, D ] }; - key { [ f, F ] }; - key { [ g, G ] }; - key { [ h, H ] }; - key { [ j, J ] }; - key { [ k, K ] }; - key { [ l, L ] }; - key { [ semicolon, colon ] }; - key { [ apostrophe, quotedbl ] }; - - key { [ z, Z ] }; - key { [ x, X ] }; - key { [ c, C ] }; - key { [ v, V ] }; - key { [ b, B ] }; - key { [ n, N ] }; - key { [ m, M ] }; - key { [ comma, less ] }; - key { [ period, greater ] }; - key { [ slash, U003F ] }; - - key { [ backslash, bar ] }; - // End alphanumeric section -}; - -partial alphanumeric_keys -xkb_symbols "french" -{ - name[Group1]="French (Cameroon)"; - include "latin" - - key { [ ampersand, 1, onesuperior, exclamdown ] }; - key { [ eacute, 2, asciitilde, oneeighth ] }; - key { [ quotedbl, 3, numbersign, sterling ] }; - key { [apostrophe, 4, braceleft, dollar ] }; - key { [ parenleft, 5, bracketleft, threeeighths ] }; - key { [ minus, 6, bar, fiveeighths ] }; - key { [ egrave, 7, grave, seveneighths ] }; - key { [underscore, 8, backslash, trademark ] }; - key { [ ccedilla, 9, asciicircum, plusminus ] }; - key { [ agrave, 0, at, degree ] }; - key { [parenright, degree, bracketright, questiondown ] }; - key { [ equal, plus, braceright, dead_ogonek ] }; - - key { [ a, A, ae, AE ] }; - key { [ z, Z, guillemotleft, less ] }; - key { [ e, E, EuroSign, cent ] }; - key { [dead_circumflex, dead_diaeresis, dead_diaeresis, dead_abovering ] }; - key { [ dollar, sterling, currency, dead_macron ] }; - - key { [ q, Q, at, Greek_OMEGA ] }; - key { [ m, M, mu, masculine ] }; - key { [ ugrave, percent, dead_circumflex, dead_caron] }; - key { [twosuperior, asciitilde, notsign, notsign ] }; - - key { [ asterisk, mu, dead_grave, dead_breve ] }; - key { [ w, W, lstroke, Lstroke ] }; - key { [ comma, U003F, dead_acute, dead_doubleacute ] }; - key { [ semicolon, period, horizconnector, multiply ] }; - key { [ colon, slash, periodcentered, division ] }; - key { [ exclam, section, dead_belowdot, dead_abovedot ] }; - - include "level3(ralt_switch)" -}; - - -partial alphanumeric_keys -xkb_symbols "azerty" -{ - name[Group1] = "French (Cameroon azerty)"; - include "level3(ralt_switch)" - include "cm(basic)" - key { [ w, W, U1E85, U1E84 ] }; // SMALL LETTER W, CAPITAL LETTER W, SMALL LETTER W WITH DIAERESIS, CAPITAL LETTER W WITH DIAERESIS - key { [ x, X, U2039, U203A ] }; // SMALL LETTER X, CAPITAL LETTER X, SINGLE LEFT-POINTING ANGLE QUOTATION MARK, SINGLE RIGHT-POINTING ANGLE QUOTATION MARK - key { [ c, C, U0327, copyright ] }; // SMALL LETTER C, CAPITAL LETTER C, COMBINING CEDILLA, COPYRIGHT SIGN - key { [ v, V, U25CC, NoSymbol ] }; // SMALL LETTER V, CAPITAL LETTER V, PLACEHOLDER CHARACTER - key { [ b, B, U0253, U0181 ] }; // SMALL LETTER B, CAPITAL LETTER B, SMALL LETTER B WITH HOOK, CAPITAL LETTER B WITH HOOK - key { [ n, N, U014B, U014A ] }; // SMALL LETTER N, CAPITAL LETTER N, SMALL LETTER ENG, CAPITAL LETTER ENG - key { [ U002C, U003F, NoSymbol, U00D7 ] }; // COMMA, QUESTION MARK, , MULTIPLY - key { [ semicolon, period, dead_acute, dead_grave ] }; // SEMICOLON, PERIOD - key { [ colon, slash, U0323 ] }; // COLON, SLASH, COMBINING DOT BELOW - key { [ exclam, U00A7 ] }; // EXCLAMATION MARK, SECTION SIGN - key { [ q, Q, U2014, U2013 ] }; // SMALL LETTER Q, CAPITAL LETTER Q, EM DASH, EN DASH - key { [ s, S, U201C, U201D ] }; // SMALL LETTER S, CAPITAL LETTER S, LEFT DOUBLE QUOTES, RIGHT DOUBLE QUOTES - key { [ d, D, U0257, U018A ] }; // SMALL LETTER D, CAPITAL LETTER D, SMALL LETTER D WITH HOOK, CAPITAL LETTER D WITH HOOK - key { [ f, F, U00E6, U00C6 ] }; // SMALL LETTER F, CAPITAL LETTER F, SMALL LIGATURE AE, CAPITAL LIGATURE AE - key { [ g, G, UA78C, UA78B ] }; // SMALL LETTER G, CAPITAL LETTER G, SMALL LETTER GLOTTAL (SALTILLO), CAPITAL LETTER GLOTTAL (SALTILLO) - key { [ h, H, U0251, U2C6D ] }; // SMALL LETTER H, CAPITAL LETTER H, SMALL LETTER ALPHA, CAPITAL LETTER ALPHA - key { [ j, J, leftarrow, U2122 ] }; //SMALL LETTER J, CAPITAL LETTER J, LEFT ARROW, TRADE MARK SIGN - key { [ k, K, downarrow, uparrow ] }; // SMALL LETTER K, CAPITAL LETTER K, DOWN ARROW, UP ARROW - key { [ l, L, rightarrow, U00A3 ] }; // SMALL LETTER L, CAPITAL LETTER L, RIGHT ARROW, POUND STERLING - key { [ m, M, U00F9, U00B5 ] }; // SMALL LETTER M, CAPITAL LETTER M, SMALL LETTER U WITH GRAVE, MICRO SYMBOL - key { [ U0300, U0302, U1DC5, U1DC4 ] }; // COMBINING LOW TONE, COMBINING FALLING TONE, COMBINING LOW-MID TONE, COMBINING MID-HIGH TONE - key { [ a, A, U025B, U0190 ] }; // SMALL LETTER A, CAPITAL LETTER A, SMALL LETTER OPEN E, CAPITAL LETTER OPEN E - key { [ z, Z, U2026, U2020 ] }; // SMALL LETTER Z, CAPITAL LETTER Z, ELLIPSIS, DAGGER - key { [ e, E, U0259, U018F ] }; // SMALL LETTER E, CAPITAL LETTER E, SMALL LETTER SCHWA, CAPITAL LETTER SCHWA - key { [ r, R, NoSymbol, U00AE ] }; // SMALL LETTER R, CAPITAL LETTER R, , REGISTERED SIGN - key { [ t, T, U0153, U0152 ] }; // SMALL LETTER T, CAPITAL LETTER T, SMALL LIGATURE OE, CAPITAL LIGATURE OE - key { [ y, Y, U01B4, U01B3 ] }; // SMALL LETTER Y, CAPITAL LETTER Y, SMALL LETTER Y WITH HOOK, CAPITAL LETTER Y WITH HOOK - key { [ u, U, U0289, U0244 ] }; // SMALL LETTER U, CAPITAL LETTER U, SMALL LETTER U BAR, CAPITAL LETTER U BAR - key { [ i, I, U0268, U0197 ] }; // SMALL LETTER I, CAPITAL LETTER I, SMALL LETTER I BAR, CAPITAL LETTER I BAR - key { [ o, O, U0254, U0186 ] }; // SMALL LETTER O, CAPITAL LETTER O, SMALL LETTER OPEN O, CAPITAL LETTER OPEN O - key { [ p, P, U00F8, U00D8 ] }; // SMALL LETTER P, CAPITAL LETTER P, SMALL LETTER O BAR, CAPITAL LETTER O BAR - key { [ U0301, U030C, dead_circumflex, dead_diaeresis ] }; // COMBINING HIGH TONE, COMBINING RISING TONE, DEAD CIRCUMFLEX, DEAD DIAERESIS - key { [ U0330, U0303, U0304, U030D ] }; // COMBINING TILDE (NASAL) BELOW, COMBINING TILDE (NASAL), COMBINING MID TONE, COMBINING VERTICAL LINE ABOVE - key { [ U0026, KP_1, U00B9, U2018 ] }; // AMPERSAND, 1, SUPERSCRIPT 1, LEFT SINGLE QUOTE - key { [ eacute, KP_2, asciitilde, U2019 ] }; // SMALL LETTER E WITH ACUTE, 2, TILDE, RIGHT SINGLE QUOTE - key { [ U0022, KP_3, U0025 ] }; // QUOTATION MARK, 3, PERCENT SIGN - key { [ U0027, KP_4, U007B ] }; // APOSTROPHE, 4, LEFT CURLY BRACKET - key { [ U0028, KP_5, U005B, numbersign ] }; // LEFT PARENTHESIS, 5, LEFT SQUARE BRACKET, NUMBER SIGN - key { [ U002D, KP_6, U007C ] }; // HYPHEN/MINUS, 6, BAR - key { [ U00E8, KP_7, U0300 ] }; // SMALL LETTER E WITH GRAVE, 7, COMBINING GRAVE - key { [ underscore, KP_8, backslash, U20D6 ] }; // UNDERSCORE, 8, BACKSLASH, COMBINING LEFT ARROW ABOVE - key { [ ccedilla, KP_9, U005E] }; // SMALL LETTER C WITH CEDILLA, 9, CIRCUMFLEX - key { [ U00E0, KP_0, at, U20D7 ] }; // SMALL LETTER A WITH GRAVE - key { [ U0029, U00B0, U005D ] }; // RIGHT PARENTHESIS, DEGREE, RIGHT SQUARE BRACKET - key { [ U003D, U002B, U007D, U00B1 ] }; // EQUAL SIGN, PLUS SIGN, RIGHT CURLY BRACKET, PLUS-MINUS SIGN - key { [ U1DC6, U1DC7, KP_Multiply, U00A4 ] }; // COMBINING MID-LOW, COMBINING HIGH-MID, MULTIPLY, CURRENCY SIGN - key { [ U003C, U003E, U00AB, U00BB ] }; // LESS THAN, GREATER THAN, LEFT GUILLEMET, RIGHT GUILLEMET - key { [ U0024, U20AC, U00B2, U00B3 ] }; // DOLLAR, EURO, SUPERSCRIPT 2, SUPERSCRIPT 3 - include "cm(exclamation_switch)" -}; - -partial alphanumeric_keys -xkb_symbols "qwerty" -{ - name[Group1] = "English (Cameroon qwerty)"; - include "level3(ralt_switch)" - include "cm(basic)" - key { [ z, Z, U2026, U2020 ] }; // SMALL LETTER Z, CAPITAL LETTER Z, ELLIPSIS, DAGGER - key { [ x, X ] }; // SMALL LETTER X, CAPITAL LETTER X - key { [ c, C, NoSymbol, U00A9 ] }; // SMALL LETTER C, CAPITAL LETTER C, , COPYRIGHT - key { [ v, V, U25CC, NoSymbol ] }; // SMALL LETTER V, CAPITAL LETTER V, PLACEHOLDER CHARACTER - key { [ b, B, U0253, U0181 ] }; // SMALL LETTER B, CAPITAL LETTER B, SMALL LETTER B WITH HOOK, CAPITAL LETTER B WITH HOOK - key { [ n, N, U014B, U014A ] }; // SMALL LETTER N, CAPITAL LETTER N, SMALL LETTER ENG, CAPITAL LETTER ENG - key { [ m, M, NoSymbol, U2122 ] }; // SMALL LETTER M, CAPITAL LETTER M, , TRADEMARK SIGN - key { [ U002C, U003C, U2039, U00AB ] }; // COMMA, LESS THAN SIGN, LEFT SINGLE GUILLEMET, LEFT DOUBLE GUILLEMET - key { [ U002B, U003E, U203A, U00BB ] }; // PERIOD, GREATER THAN SIGN, RIGHT SINGLE GUILLEMET, RIGHT DOUBLE GUILLEMET - key { [ U002F, U003F, U00F7, U0294 ] }; // SLASH, QUESTION MARK, DIVISION SIGN, GLOTTAL STOP - key { [ a, A, U025B, U0190 ] }; // SMALL LETTER A, CAPITAL LETTER A, SMALL LETTER OPEN E, CAPITAL LETTER OPEN E - key { [ s, S ] }; // SMALL LETTER S, CAPITAL LETTER S - key { [ d, D, U0257, U018A ] }; // SMALL LETTER D, CAPITAL LETTER D, SMALL LETTER D WITH HOOK, CAPITAL LETTER D WITH HOOK - key { [ f, F, U00E6, U00C6 ] }; // SMALL LETTER F, CAPITAL LETTER F, SMALL LIGATURE AE, CAPITAL LIGATURE AE - key { [ g, G, UA78C, UA78B ] }; // SMALL LETTER G, CAPITAL LETTER G, SMALL LETTER GLOTTAL (SALTILLO), CAPITAL LETTER GLOTTAL (SALTILLO) - key { [ h, H, U0251, U2C6D ] }; // SMALL LETTER H, CAPITAL LETTER H, SMALL LETTER ALPHA, CAPITAL LETTER ALPHA - key { [ j, J, U0330, U0323 ] }; // SMALL LETTER J, CAPITAL LETTER J, COMBINING TILDE (NASAL) BELOW, COMBINING DOT BELOW - key { [ k, K, U1DC5, U1DC7 ] }; // SMALL LETTER K, CAPITAL LETTER K, COMBINING LOW-MID TONE, COMBINING HIGH-MID - key { [ l, L, U1DC6, U1DC4 ] }; // SMALL LETTER L, CAPITAL LETTER L, COMBINING MID-LOW, COMBINING MID-HIGH TONE - key { [ U003B, U003A ] }; // SEMICOLON, COLON - key { [ U0300, U0302, U0027, U0022 ] }; // COMBINING LOW TONE, COMBINING FALLING TONE, APOSTROPHE, QUOTATION MARK - key { [ q, Q, U2014, U2013 ] }; // SMALL LETTER Q, CAPITAL LETTER Q, EM DASH, EN DASH - key { [ w, W, U1E85, U1E84 ] }; // SMALL LETTER W, CAPITAL LETTER W, SMALL LETTER W WITH DIAERESIS, CAPITAL LETTER W WITH DIAERESIS - key { [ e, E, U0259, U018F ] }; // SMALL LETTER E, CAPITAL LETTER E, SMALL LETTER SCHWA, CAPITAL LETTER SCHWA - key { [ r, R, NoSymbol, U00AE ] }; // SMALL LETTER R, CAPITAL LETTER R, , REGISTERED SIGN - key { [ t, T, U0153, U0152 ] }; // SMALL LETTER T, CAPITAL LETTER T, SMALL LIGATURE OE, CAPITAL LIGATURE OE - key { [ y, Y, U01B4, U01B3 ] }; // SMALL LETTER Y, CAPITAL LETTER Y, SMALL LETTER Y WITH HOOK, CAPITAL LETTER Y WITH HOOK - key { [ u, U, U0289, U0244 ] }; // SMALL LETTER U, CAPITAL LETTER U, SMALL LETTER U BAR, CAPITAL LETTER U BAR - key { [ i, I, U0268, U0197 ] }; // SMALL LETTER I, CAPITAL LETTER I, SMALL LETTER I BAR, CAPITAL LETTER I BAR - key { [ o, O, U0254, U0186 ] }; // SMALL LETTER O, CAPITAL LETTER O, SMALL LETTER OPEN O, CAPITAL LETTER OPEN O - key { [ p, P, U00F8, U00D8 ] }; // SMALL LETTER P, CAPITAL LETTER P, SMALL LETTER O BAR, CAPITAL LETTER O BAR - key { [ U0301, U030C, U005B, U007B ] }; // COMBINING HIGH TONE, COMBINING RISING TONE, LEFT SQUARE BRACKET, LEFT CURLY BRACKET - key { [ U0327, U0308, U005D, U007D ] }; // COMBINING CEDILLA, COMBINING DIAERESIS, RIGHT SQUARE BRACKET, RIGHT CURLY BRACKET - key { [ U0031, U0021, U00BC ] }; // 1, EXCLAMATION POINT, ONE QUARTER - key { [ U0032, U0040, U00BD ] }; //2, AT SYMBOL, ONE HALF - key { [ U0033, U0023, U00BE ] }; // 3, NUMBER SIGN, THREE QUARTERS - key { [ U0034, U0024, NoSymbol, U20AC ] }; // 4, DOLLAR, , EURO SIGN - key { [ U0038, U002A, NoSymbol, U00D7 ] }; // 8, ASTERISK, , MATH MULTIPLY - key { [ U0039, U0028, U2018, U201C ] }; // 9, LEFT PARENTHESIS, LEFT SINGLE QUOTE MARK, LEFT DOUBLE QUOTE MARK - key { [ U0030, U0029, U2019, U201D ] }; // 0, RIGHT PARENTHESIS, RIGHT SINGLE QUOTE MARK, LEFT DOUBLE QUOTE MARK - key { [ U002D, U005F, U0304 ] }; // MINUS, UNDERSCORE, COMBINING MID TONE, COMBINING MID TONE - key { [ U003D, U002B, NoSymbol, U00B1 ] }; // EQUAL, PLUS, , PLUS-MINUS - key { [ U005C, U007C ] }; // BACKSLASH, BAR - key { [ U030D, U0303, U0060, U007E ] }; // COMBINING VERTICAL LINE ABOVE, COMBINING TILDE ABOVE, GRAVE ACCENT, TILDE - include "cm(semicolon_switch)" -}; - - -partial alphanumeric_keys -xkb_symbols "dvorak" -{ - name[Group1] = "English (Cameroon Dvorak)"; - include "level3(ralt_switch)" - include "us(dvorak)" - key { [ semicolon, colon ] }; // SEMICOLON, COLON - key { [ q, Q, U2014, U2013 ] }; // SMALL LETTER Q, CAPITAL LETTER Q, EM DASH, EN DASH - key { [ j, J, U0330, U0323 ] }; // SMALL LETTER J, CAPITAL LETTER J, COMBINING TILDE (NASAL) BELOW, COMBINING DOT BELOW - key { [ k, K, U1DC5, U1DC7 ] }; // SMALL LETTER K, CAPITAL LETTER K, COMBINING LOW-MID TONE, COMBINING HIGH-MID - key { [ x, X ] }; // SMALL LETTER X, CAPITAL LETTER X - key { [ b, B, U0253, U0181 ] }; // SMALL LETTER B, CAPITAL LETTER B, SMALL LETTER B WITH HOOK, CAPITAL LETTER B WITH HOOK - key { [ m, M, NoSymbol, U2122 ] }; // SMALL LETTER M, CAPITAL LETTER M, , TRADEMARK SIGN - key { [ w, W, U1E85, U1E84 ] }; // SMALL LETTER W, CAPITAL LETTER W, SMALL LETTER W WITH DIAERESIS, CAPITAL LETTER W WITH DIAERESIS - key { [ v, V, U25CC, NoSymbol ] }; // SMALL LETTER V, CAPITAL LETTER V, PLACEHOLDER CHARACTER - key { [ z, Z, U2026, U2020 ] }; // SMALL LETTER Z, CAPITAL LETTER Z, ELLIPSIS, DAGGER - key { [ a, A, U025B, U0190 ] }; // SMALL LETTER A, CAPITAL LETTER A, SMALL LETTER OPEN E, CAPITAL LETTER OPEN E - key { [ o, O, U0254, U0186 ] }; // SMALL LETTER O, CAPITAL LETTER O, SMALL LETTER OPEN O, CAPITAL LETTER OPEN O - key { [ e, E, U0259, U018F ] }; // SMALL LETTER E, CAPITAL LETTER E, SMALL LETTER SCHWA, CAPITAL LETTER SCHWA - key { [ u, U, U0289, U0244 ] }; // SMALL LETTER U, CAPITAL LETTER U, SMALL LETTER U BAR, CAPITAL LETTER U BAR - key { [ i, I, U0268, U0197 ] }; // SMALL LETTER I, CAPITAL LETTER I, SMALL LETTER I BAR, CAPITAL LETTER I BAR - key { [ d, D, U0257, U018A ] }; // SMALL LETTER D, CAPITAL LETTER D, SMALL LETTER D WITH HOOK, CAPITAL LETTER D WITH HOOK - key { [ h, H, U0251, U2C6D ] }; // SMALL LETTER H, CAPITAL LETTER H, SMALL LETTER ALPHA, CAPITAL LETTER ALPHA - key { [ t, T, U0153, U0152 ] }; // SMALL LETTER T, CAPITAL LETTER T, SMALL LIGATURE OE, CAPITAL LIGATURE OE - key { [ n, N, U014B, U014A ] }; // SMALL LETTER N, CAPITAL LETTER N, SMALL LETTER ENG, CAPITAL LETTER ENG - key { [ s, S ] }; // SMALL LETTER S, CAPITAL LETTER S - key { [ minus, underscore, U0304 ] }; // MINUS, UNDERSCORE, COMBINING MID TONE - key { [ U0300, U0302, U0027, U0022 ] }; // COMBINING LOW TONE, COMBINING FALLING TONE, APOSTROPHE, QUOTATION MARK - key { [ comma, less, U2039, U00AB ] }; // COMMA, LESS THAN SIGN, LEFT SINGLE GUILLEMET, LEFT DOUBLE GUILLEMET - key { [ period, greater, U203A, U00BB ] }; // PERIOD, GREATER THAN SIGN, RIGHT SINGLE GUILLEMET, RIGHT DOUBLE GUILLEMET - key { [ p, P, U00F8, U00D8 ] }; // SMALL LETTER P, CAPITAL LETTER P, SMALL LETTER O BAR, CAPITAL LETTER O BAR - key { [ y, Y, U01B4, U01B3 ] }; // SMALL LETTER Y, CAPITAL LETTER Y, SMALL LETTER Y WITH HOOK, CAPITAL LETTER Y WITH HOOK - key { [ f, F, U00E6, U00C6 ] }; // SMALL LETTER F, CAPITAL LETTER F, SMALL LIGATURE AE, CAPITAL LIGATURE AE - key { [ g, G, UA78C, UA78B ] }; // SMALL LETTER G, CAPITAL LETTER G, SMALL LETTER GLOTTAL (SALTILLO), CAPITAL LETTER GLOTTAL (SALTILLO) - key { [ c, C, NoSymbol, U00A9 ] }; // SMALL LETTER C, CAPITAL LETTER C, , COPYRIGHT - key { [ r, R, NoSymbol, U00AE ] }; // SMALL LETTER R, CAPITAL LETTER R, , REGISTERED SIGN - key { [ l, L, U1DC6, U1DC4 ] }; // SMALL LETTER L, CAPITAL LETTER L, COMBINING MID-LOW, COMBINING MID-HIGH TONE - key { [ slash, U003F, U00F7, U0294 ] }; // SLASH, QUESTION MARK, DIVISION SIGN, GLOTTAL STOP - key { [ equal, plus, NoSymbol, plusminus ] }; // EQUAL, PLUS, , PLUS-MINUS - key { [ KP_1, exclam, U00BC ] }; // 1, EXCLAMATION POINT, ONE QUARTER - key { [ KP_2, at, U00BD ] }; // 2, AT SYMBOL, ONE HALF - key { [ KP_3, numbersign, U00BE ] }; // 3, NUMBER SIGN, THREE QUARTERS - key { [ KP_4, dollar, NoSymbol, U20AC ] }; // 4, DOLLAR, , EURO SIGN - key { [ KP_5, percent ] }; // 5, PERCENT - key { [ KP_6, asciicircum ] }; // 6, CARET - key { [ KP_7, ampersand ] }; // 7, AMPERSAND - key { [ KP_8, asterisk, NoSymbol, multiply ] }; // 8, ASTERISK, , MULTIPLY - key { [ KP_9, parenleft, leftsinglequotemark, leftdoublequotemark ] }; // 9, LEFT PARENTHESIS, LEFT SINGLE QUOTE MARK, LEFT DOUBLE QUOTE MARK - key { [ KP_0, parenright, rightsinglequotemark, rightdoublequotemark ] }; // 0, RIGHT PARENTHESIS, RIGHT SINGLE QUOTE MARK, LEFT DOUBLE QUOTE MARK - key { [ U0301, U030C, U005B, U007B ] }; // COMBINING HIGH TONE, COMBINING RISING TONE, LEFT SQUARE BRACKET, LEFT CURLY BRACKET - key { [ U0327, dead_diaeresis, U005D, braceright ] }; // COMBINING CEDILLA, DEAD DIAERESIS, RIGHT SQUARE BRACKET, RIGHT CURLY BRACKET - key { [ backslash, bar ] }; // BACKSLASH, BAR - key { [ U030D, U0303, U0060, U007E ] }; // COMBINING VERTICAL LINE ABOVE, COMBINING TILDE ABOVE, GRAVE ACCENT, TILDE - include "cm(semicolon_switch_dvorak)" -}; - -// The following code creates the "Cameroon key" phenomenon. - -partial modifier_keys -xkb_symbols "semicolon_switch" { - key { - symbols[Group1] = [ ISO_Level3_Latch, colon, semicolon, colon ]}; - modifier_map Mod5 { ISO_Level3_Latch }; -}; - -partial modifier_keys -xkb_symbols "exclamation_switch" { - key { - symbols[Group1] = [ ISO_Level3_Latch, U00A7, exclam, U00A7 ] - }; - modifier_map Mod5 { ISO_Level3_Latch }; -}; - -partial modifier_keys -xkb_symbols "semicolon_switch_dvorak" { - key { - symbols[Group1] = [ ISO_Level3_Latch, colon, semicolon, colon ] - }; -modifier_map Mod5 { ISO_Level3_Latch }; -}; - +// ========== Cameroon Keyboards ========== +// ****** For Instructions, see "Use of Cameroon Keyboards" section below ****** + + +// The XKB versions of these keyboards were developed by Matthew Lee, Jenni Beadle, and Bruce Cox of SIL Cameroon in association with Going Komputya, Uwe Yung of the Goethe Institute, Yaoundé, and Centre ANACLAC. + +// Cameroon is officially a bilingual country, using French and English, but there are over 270 minority languages. + +// * Cameroon Français is an exact copy of the French France keyboard intended for AZERTY users. +// * Cameroon is an exact copy of the Basic US Keyboard. I can not currently name this "Cameroon English" due to a limitation of XKB. +// * Cameroon QWERTY and Cameroon AZERTY are based largely on SIL Cameroon's Keyman and Microsoft keyboards of the same style already in wide use. These keyboards are designed to allow the user to type any of Cameroon's 270+ languages and dialects that use the approved orthography. This Approved Orthography was adopted in 1979 by the National Committee for the Unification and Harmonisation of Alphabets of Camerooninan Languages. +// * Cameroon Dvorak is described below. + +// ===== Use of Cameroon Keyboards ===== + +// == Fonts == +// These keyboards are fully Unicode (5.1), so we recommend using a good unicode font for diacritics to position correctly. Recommended fonts are: ttf-sil-charis, ttf-sil-doulos, ttf-sil-gentium and ttf-sil-andika (All of which are free for Linux, Mac, and Windows). + + +// == Cameroon AZERTY == +// Cameroon AZERTY uses the French France (AZERTY) layout, as french keyboards are widely used here. While this keyboard is designed for Cameroonian orthography, it still is possible but not recommended, to type French with minimal discomfort using this keyboard. +// Cameroon AZERTY uses the "!" (exclamation) key as the "Cameroon" key. Pressing this key before another key allows you to access the special letters and diacritics needed in Cameroonian orthography. +// For example, press "!" then "a" and get "ɛ" (small epsilon). "!" then "Shift" + "a" (A) will get an "Ɛ" (capital epsilon). Press the "!" key twice to get a "!". +// If you prefer, you can hold the AltGr (and/or Shift) key to access the same letters, but we have found this to be much more awkward in practice. If you really don't like our Cameroon key, simply comment out "include "cm(exclamation_switch)"" and the exclamation key will return to normal. +// All Diacritics (with the exception of French Trema and Circumflex) must be typed (in order of stacking) after the letter. + + +// == Cameroon QWERTY == +// Cameroon QWERTY uses the US QWERTY layout, as US keyboards are also widely used here. While this keyboard is designed for Cameroonian orthography, it is possible, but not recommended, to type English with minimal discomfort using this keyboard. +// Cameroon QWERTY uses the ";" (semicolon) key as the "Cameroon" key. Pressing this key before another key allows you to access the special letters and diacritics needed in Cameroonian orthography. +// For example, press ";" then "a" and get "ɛ" (small epsilon). ";" then "Shift" + "a" (A) will get an "Ɛ" (capital epsilon). Press ";" twice to get a ";", or press Shift + ; (:) twice to get a ":" (colon). +// If you prefer, you can hold the AltGr (and/or Shift) key to access the same letters, but we have found this to be much more awkward in practice. If you really don't like our Cameroon key, simply comment out "include "cm(semicolon_switch)"" and the semicolon key will return to normal. +// All Diacritics must be typed (in order of stacking) after the letter. + + +// == Cameroon Dvorak == +// Cameroon Dvorak is uses a similar system to Cameroon QWERTY. + +default +partial alphanumeric_keys +xkb_symbols "basic" { + + name[Group1]="English (Cameroon)"; + + // Alphanumeric section + key { [ grave, asciitilde ] }; + key { [ 1, exclam ] }; + key { [ 2, at ] }; + key { [ 3, numbersign ] }; + key { [ 4, dollar ] }; + key { [ 5, percent ] }; + key { [ 6, asciicircum ] }; + key { [ 7, ampersand ] }; + key { [ 8, asterisk ] }; + key { [ 9, parenleft ] }; + key { [ 0, parenright ] }; + key { [ minus, underscore ] }; + key { [ equal, plus ] }; + + key { [ q, Q ] }; + key { [ w, W ] }; + key { [ e, E ] }; + key { [ r, R ] }; + key { [ t, T ] }; + key { [ y, Y ] }; + key { [ u, U ] }; + key { [ i, I ] }; + key { [ o, O ] }; + key { [ p, P ] }; + key { [ bracketleft, braceleft ] }; + key { [ bracketright, braceright ] }; + key { [ a, A ] }; + key { [ s, S ] }; + key { [ d, D ] }; + key { [ f, F ] }; + key { [ g, G ] }; + key { [ h, H ] }; + key { [ j, J ] }; + key { [ k, K ] }; + key { [ l, L ] }; + key { [ semicolon, colon ] }; + key { [ apostrophe, quotedbl ] }; + + key { [ z, Z ] }; + key { [ x, X ] }; + key { [ c, C ] }; + key { [ v, V ] }; + key { [ b, B ] }; + key { [ n, N ] }; + key { [ m, M ] }; + key { [ comma, less ] }; + key { [ period, greater ] }; + key { [ slash, U003F ] }; + + key { [ backslash, bar ] }; + // End alphanumeric section +}; + +partial alphanumeric_keys +xkb_symbols "french" +{ + name[Group1]="French (Cameroon)"; + include "latin" + + key { [ ampersand, 1, onesuperior, exclamdown ] }; + key { [ eacute, 2, asciitilde, oneeighth ] }; + key { [ quotedbl, 3, numbersign, sterling ] }; + key { [apostrophe, 4, braceleft, dollar ] }; + key { [ parenleft, 5, bracketleft, threeeighths ] }; + key { [ minus, 6, bar, fiveeighths ] }; + key { [ egrave, 7, grave, seveneighths ] }; + key { [underscore, 8, backslash, trademark ] }; + key { [ ccedilla, 9, asciicircum, plusminus ] }; + key { [ agrave, 0, at, degree ] }; + key { [parenright, degree, bracketright, questiondown ] }; + key { [ equal, plus, braceright, dead_ogonek ] }; + + key { [ a, A, ae, AE ] }; + key { [ z, Z, guillemotleft, less ] }; + key { [ e, E, EuroSign, cent ] }; + key { [dead_circumflex, dead_diaeresis, dead_diaeresis, dead_abovering ] }; + key { [ dollar, sterling, currency, dead_macron ] }; + + key { [ q, Q, at, Greek_OMEGA ] }; + key { [ m, M, mu, masculine ] }; + key { [ ugrave, percent, dead_circumflex, dead_caron] }; + key { [twosuperior, asciitilde, notsign, notsign ] }; + + key { [ asterisk, mu, dead_grave, dead_breve ] }; + key { [ w, W, lstroke, Lstroke ] }; + key { [ comma, U003F, dead_acute, dead_doubleacute ] }; + key { [ semicolon, period, horizconnector, multiply ] }; + key { [ colon, slash, periodcentered, division ] }; + key { [ exclam, section, dead_belowdot, dead_abovedot ] }; + + include "level3(ralt_switch)" +}; + + +partial alphanumeric_keys +xkb_symbols "azerty" +{ + name[Group1] = "French (Cameroon azerty)"; + include "level3(ralt_switch)" + include "cm(basic)" + key { [ w, W, U1E85, U1E84 ] }; // SMALL LETTER W, CAPITAL LETTER W, SMALL LETTER W WITH DIAERESIS, CAPITAL LETTER W WITH DIAERESIS + key { [ x, X, U2039, U203A ] }; // SMALL LETTER X, CAPITAL LETTER X, SINGLE LEFT-POINTING ANGLE QUOTATION MARK, SINGLE RIGHT-POINTING ANGLE QUOTATION MARK + key { [ c, C, U0327, copyright ] }; // SMALL LETTER C, CAPITAL LETTER C, COMBINING CEDILLA, COPYRIGHT SIGN + key { [ v, V, U25CC, NoSymbol ] }; // SMALL LETTER V, CAPITAL LETTER V, PLACEHOLDER CHARACTER + key { [ b, B, U0253, U0181 ] }; // SMALL LETTER B, CAPITAL LETTER B, SMALL LETTER B WITH HOOK, CAPITAL LETTER B WITH HOOK + key { [ n, N, U014B, U014A ] }; // SMALL LETTER N, CAPITAL LETTER N, SMALL LETTER ENG, CAPITAL LETTER ENG + key { [ U002C, U003F, NoSymbol, U00D7 ] }; // COMMA, QUESTION MARK, , MULTIPLY + key { [ semicolon, period, dead_acute, dead_grave ] }; // SEMICOLON, PERIOD + key { [ colon, slash, U0323 ] }; // COLON, SLASH, COMBINING DOT BELOW + key { [ exclam, U00A7 ] }; // EXCLAMATION MARK, SECTION SIGN + key { [ q, Q, U2014, U2013 ] }; // SMALL LETTER Q, CAPITAL LETTER Q, EM DASH, EN DASH + key { [ s, S, U201C, U201D ] }; // SMALL LETTER S, CAPITAL LETTER S, LEFT DOUBLE QUOTES, RIGHT DOUBLE QUOTES + key { [ d, D, U0257, U018A ] }; // SMALL LETTER D, CAPITAL LETTER D, SMALL LETTER D WITH HOOK, CAPITAL LETTER D WITH HOOK + key { [ f, F, U00E6, U00C6 ] }; // SMALL LETTER F, CAPITAL LETTER F, SMALL LIGATURE AE, CAPITAL LIGATURE AE + key { [ g, G, UA78C, UA78B ] }; // SMALL LETTER G, CAPITAL LETTER G, SMALL LETTER GLOTTAL (SALTILLO), CAPITAL LETTER GLOTTAL (SALTILLO) + key { [ h, H, U0251, U2C6D ] }; // SMALL LETTER H, CAPITAL LETTER H, SMALL LETTER ALPHA, CAPITAL LETTER ALPHA + key { [ j, J, leftarrow, U2122 ] }; //SMALL LETTER J, CAPITAL LETTER J, LEFT ARROW, TRADE MARK SIGN + key { [ k, K, downarrow, uparrow ] }; // SMALL LETTER K, CAPITAL LETTER K, DOWN ARROW, UP ARROW + key { [ l, L, rightarrow, U00A3 ] }; // SMALL LETTER L, CAPITAL LETTER L, RIGHT ARROW, POUND STERLING + key { [ m, M, U00F9, U00B5 ] }; // SMALL LETTER M, CAPITAL LETTER M, SMALL LETTER U WITH GRAVE, MICRO SYMBOL + key { [ U0300, U0302, U1DC5, U1DC4 ] }; // COMBINING LOW TONE, COMBINING FALLING TONE, COMBINING LOW-MID TONE, COMBINING MID-HIGH TONE + key { [ a, A, U025B, U0190 ] }; // SMALL LETTER A, CAPITAL LETTER A, SMALL LETTER OPEN E, CAPITAL LETTER OPEN E + key { [ z, Z, U2026, U2020 ] }; // SMALL LETTER Z, CAPITAL LETTER Z, ELLIPSIS, DAGGER + key { [ e, E, U0259, U018F ] }; // SMALL LETTER E, CAPITAL LETTER E, SMALL LETTER SCHWA, CAPITAL LETTER SCHWA + key { [ r, R, NoSymbol, U00AE ] }; // SMALL LETTER R, CAPITAL LETTER R, , REGISTERED SIGN + key { [ t, T, U0153, U0152 ] }; // SMALL LETTER T, CAPITAL LETTER T, SMALL LIGATURE OE, CAPITAL LIGATURE OE + key { [ y, Y, U01B4, U01B3 ] }; // SMALL LETTER Y, CAPITAL LETTER Y, SMALL LETTER Y WITH HOOK, CAPITAL LETTER Y WITH HOOK + key { [ u, U, U0289, U0244 ] }; // SMALL LETTER U, CAPITAL LETTER U, SMALL LETTER U BAR, CAPITAL LETTER U BAR + key { [ i, I, U0268, U0197 ] }; // SMALL LETTER I, CAPITAL LETTER I, SMALL LETTER I BAR, CAPITAL LETTER I BAR + key { [ o, O, U0254, U0186 ] }; // SMALL LETTER O, CAPITAL LETTER O, SMALL LETTER OPEN O, CAPITAL LETTER OPEN O + key { [ p, P, U00F8, U00D8 ] }; // SMALL LETTER P, CAPITAL LETTER P, SMALL LETTER O BAR, CAPITAL LETTER O BAR + key { [ U0301, U030C, dead_circumflex, dead_diaeresis ] }; // COMBINING HIGH TONE, COMBINING RISING TONE, DEAD CIRCUMFLEX, DEAD DIAERESIS + key { [ U0330, U0303, U0304, U030D ] }; // COMBINING TILDE (NASAL) BELOW, COMBINING TILDE (NASAL), COMBINING MID TONE, COMBINING VERTICAL LINE ABOVE + key { [ U0026, KP_1, U00B9, U2018 ] }; // AMPERSAND, 1, SUPERSCRIPT 1, LEFT SINGLE QUOTE + key { [ eacute, KP_2, asciitilde, U2019 ] }; // SMALL LETTER E WITH ACUTE, 2, TILDE, RIGHT SINGLE QUOTE + key { [ U0022, KP_3, U0025 ] }; // QUOTATION MARK, 3, PERCENT SIGN + key { [ U0027, KP_4, U007B ] }; // APOSTROPHE, 4, LEFT CURLY BRACKET + key { [ U0028, KP_5, U005B, numbersign ] }; // LEFT PARENTHESIS, 5, LEFT SQUARE BRACKET, NUMBER SIGN + key { [ U002D, KP_6, U007C ] }; // HYPHEN/MINUS, 6, BAR + key { [ U00E8, KP_7, U0300 ] }; // SMALL LETTER E WITH GRAVE, 7, COMBINING GRAVE + key { [ underscore, KP_8, backslash, U20D6 ] }; // UNDERSCORE, 8, BACKSLASH, COMBINING LEFT ARROW ABOVE + key { [ ccedilla, KP_9, U005E] }; // SMALL LETTER C WITH CEDILLA, 9, CIRCUMFLEX + key { [ U00E0, KP_0, at, U20D7 ] }; // SMALL LETTER A WITH GRAVE + key { [ U0029, U00B0, U005D ] }; // RIGHT PARENTHESIS, DEGREE, RIGHT SQUARE BRACKET + key { [ U003D, U002B, U007D, U00B1 ] }; // EQUAL SIGN, PLUS SIGN, RIGHT CURLY BRACKET, PLUS-MINUS SIGN + key { [ U1DC6, U1DC7, KP_Multiply, U00A4 ] }; // COMBINING MID-LOW, COMBINING HIGH-MID, MULTIPLY, CURRENCY SIGN + key { [ U003C, U003E, U00AB, U00BB ] }; // LESS THAN, GREATER THAN, LEFT GUILLEMET, RIGHT GUILLEMET + key { [ U0024, U20AC, U00B2, U00B3 ] }; // DOLLAR, EURO, SUPERSCRIPT 2, SUPERSCRIPT 3 + include "cm(exclamation_switch)" +}; + +partial alphanumeric_keys +xkb_symbols "qwerty" +{ + name[Group1] = "English (Cameroon qwerty)"; + include "level3(ralt_switch)" + include "cm(basic)" + key { [ z, Z, U2026, U2020 ] }; // SMALL LETTER Z, CAPITAL LETTER Z, ELLIPSIS, DAGGER + key { [ x, X ] }; // SMALL LETTER X, CAPITAL LETTER X + key { [ c, C, NoSymbol, U00A9 ] }; // SMALL LETTER C, CAPITAL LETTER C, , COPYRIGHT + key { [ v, V, U25CC, NoSymbol ] }; // SMALL LETTER V, CAPITAL LETTER V, PLACEHOLDER CHARACTER + key { [ b, B, U0253, U0181 ] }; // SMALL LETTER B, CAPITAL LETTER B, SMALL LETTER B WITH HOOK, CAPITAL LETTER B WITH HOOK + key { [ n, N, U014B, U014A ] }; // SMALL LETTER N, CAPITAL LETTER N, SMALL LETTER ENG, CAPITAL LETTER ENG + key { [ m, M, NoSymbol, U2122 ] }; // SMALL LETTER M, CAPITAL LETTER M, , TRADEMARK SIGN + key { [ U002C, U003C, U2039, U00AB ] }; // COMMA, LESS THAN SIGN, LEFT SINGLE GUILLEMET, LEFT DOUBLE GUILLEMET + key { [ U002E, U003E, U203A, U00BB ] }; // PERIOD, GREATER THAN SIGN, RIGHT SINGLE GUILLEMET, RIGHT DOUBLE GUILLEMET + key { [ U002F, U003F, U00F7 ] }; // SLASH, QUESTION MARK, DIVISION SIGN + key { [ a, A, U025B, U0190 ] }; // SMALL LETTER A, CAPITAL LETTER A, SMALL LETTER OPEN E, CAPITAL LETTER OPEN E + key { [ s, S ] }; // SMALL LETTER S, CAPITAL LETTER S + key { [ d, D, U0257, U018A ] }; // SMALL LETTER D, CAPITAL LETTER D, SMALL LETTER D WITH HOOK, CAPITAL LETTER D WITH HOOK + key { [ f, F, U00E6, U00C6 ] }; // SMALL LETTER F, CAPITAL LETTER F, SMALL LIGATURE AE, CAPITAL LIGATURE AE + key { [ g, G, UA78C, UA78B ] }; // SMALL LETTER G, CAPITAL LETTER G, SMALL LETTER GLOTTAL (SALTILLO), CAPITAL LETTER GLOTTAL (SALTILLO) + key { [ h, H, U0251, U2C6D ] }; // SMALL LETTER H, CAPITAL LETTER H, SMALL LETTER ALPHA, CAPITAL LETTER ALPHA + key { [ j, J, U0330, U0323 ] }; // SMALL LETTER J, CAPITAL LETTER J, COMBINING TILDE (NASAL) BELOW, COMBINING DOT BELOW + key { [ k, K, U1DC5, U1DC7 ] }; // SMALL LETTER K, CAPITAL LETTER K, COMBINING LOW-MID TONE, COMBINING HIGH-MID + key { [ l, L, U1DC6, U1DC4 ] }; // SMALL LETTER L, CAPITAL LETTER L, COMBINING MID-LOW, COMBINING MID-HIGH TONE + key { [ U003B, U003A ] }; // SEMICOLON, COLON + key { [ U0300, U0302, U0027, U0022 ] }; // COMBINING LOW TONE, COMBINING FALLING TONE, APOSTROPHE, QUOTATION MARK + key { [ q, Q, U2014, U2013 ] }; // SMALL LETTER Q, CAPITAL LETTER Q, EM DASH, EN DASH + key { [ w, W, U1E85, U1E84 ] }; // SMALL LETTER W, CAPITAL LETTER W, SMALL LETTER W WITH DIAERESIS, CAPITAL LETTER W WITH DIAERESIS + key { [ e, E, U0259, U018F ] }; // SMALL LETTER E, CAPITAL LETTER E, SMALL LETTER SCHWA, CAPITAL LETTER SCHWA + key { [ r, R, NoSymbol, U00AE ] }; // SMALL LETTER R, CAPITAL LETTER R, , REGISTERED SIGN + key { [ t, T, U0153, U0152 ] }; // SMALL LETTER T, CAPITAL LETTER T, SMALL LIGATURE OE, CAPITAL LIGATURE OE + key { [ y, Y, U01B4, U01B3 ] }; // SMALL LETTER Y, CAPITAL LETTER Y, SMALL LETTER Y WITH HOOK, CAPITAL LETTER Y WITH HOOK + key { [ u, U, U0289, U0244 ] }; // SMALL LETTER U, CAPITAL LETTER U, SMALL LETTER U BAR, CAPITAL LETTER U BAR + key { [ i, I, U0268, U0197 ] }; // SMALL LETTER I, CAPITAL LETTER I, SMALL LETTER I BAR, CAPITAL LETTER I BAR + key { [ o, O, U0254, U0186 ] }; // SMALL LETTER O, CAPITAL LETTER O, SMALL LETTER OPEN O, CAPITAL LETTER OPEN O + key { [ p, P, U00F8, U00D8 ] }; // SMALL LETTER P, CAPITAL LETTER P, SMALL LETTER O BAR, CAPITAL LETTER O BAR + key { [ U0301, U030C, U005B, U007B ] }; // COMBINING HIGH TONE, COMBINING RISING TONE, LEFT SQUARE BRACKET, LEFT CURLY BRACKET + key { [ U0327, U0308, U005D, U007D ] }; // COMBINING CEDILLA, COMBINING DIAERESIS, RIGHT SQUARE BRACKET, RIGHT CURLY BRACKET + key { [ U0031, U0021, U00BC ] }; // 1, EXCLAMATION POINT, ONE QUARTER + key { [ U0032, U0040, U00BD ] }; //2, AT SYMBOL, ONE HALF + key { [ U0033, U0023, U00BE ] }; // 3, NUMBER SIGN, THREE QUARTERS + key { [ U0034, U0024, NoSymbol, U20AC ] }; // 4, DOLLAR, , EURO SIGN + key { [ U0038, U002A, NoSymbol, U00D7 ] }; // 8, ASTERISK, , MATH MULTIPLY + key { [ U0039, U0028, U2018, U201C ] }; // 9, LEFT PARENTHESIS, LEFT SINGLE QUOTE MARK, LEFT DOUBLE QUOTE MARK + key { [ U0030, U0029, U2019, U201D ] }; // 0, RIGHT PARENTHESIS, RIGHT SINGLE QUOTE MARK, LEFT DOUBLE QUOTE MARK + key { [ U002D, U005F, U0304 ] }; // MINUS, UNDERSCORE, COMBINING MID TONE, COMBINING MID TONE + key { [ U003D, U002B, NoSymbol, U00B1 ] }; // EQUAL, PLUS, , PLUS-MINUS + key { [ U005C, U007C ] }; // BACKSLASH, BAR + key { [ U030D, U0303, U0060, U007E ] }; // COMBINING VERTICAL LINE ABOVE, COMBINING TILDE ABOVE, GRAVE ACCENT, TILDE + include "cm(semicolon_switch)" +}; + + +partial alphanumeric_keys +xkb_symbols "dvorak" +{ + name[Group1] = "English (Cameroon Dvorak)"; + include "level3(ralt_switch)" + include "us(dvorak)" + key { [ semicolon, colon ] }; // SEMICOLON, COLON + key { [ q, Q, U2014, U2013 ] }; // SMALL LETTER Q, CAPITAL LETTER Q, EM DASH, EN DASH + key { [ j, J, U0330, U0323 ] }; // SMALL LETTER J, CAPITAL LETTER J, COMBINING TILDE (NASAL) BELOW, COMBINING DOT BELOW + key { [ k, K, U1DC5, U1DC7 ] }; // SMALL LETTER K, CAPITAL LETTER K, COMBINING LOW-MID TONE, COMBINING HIGH-MID + key { [ x, X ] }; // SMALL LETTER X, CAPITAL LETTER X + key { [ b, B, U0253, U0181 ] }; // SMALL LETTER B, CAPITAL LETTER B, SMALL LETTER B WITH HOOK, CAPITAL LETTER B WITH HOOK + key { [ m, M, NoSymbol, U2122 ] }; // SMALL LETTER M, CAPITAL LETTER M, , TRADEMARK SIGN + key { [ w, W, U1E85, U1E84 ] }; // SMALL LETTER W, CAPITAL LETTER W, SMALL LETTER W WITH DIAERESIS, CAPITAL LETTER W WITH DIAERESIS + key { [ v, V, U25CC, NoSymbol ] }; // SMALL LETTER V, CAPITAL LETTER V, PLACEHOLDER CHARACTER + key { [ z, Z, U2026, U2020 ] }; // SMALL LETTER Z, CAPITAL LETTER Z, ELLIPSIS, DAGGER + key { [ a, A, U025B, U0190 ] }; // SMALL LETTER A, CAPITAL LETTER A, SMALL LETTER OPEN E, CAPITAL LETTER OPEN E + key { [ o, O, U0254, U0186 ] }; // SMALL LETTER O, CAPITAL LETTER O, SMALL LETTER OPEN O, CAPITAL LETTER OPEN O + key { [ e, E, U0259, U018F ] }; // SMALL LETTER E, CAPITAL LETTER E, SMALL LETTER SCHWA, CAPITAL LETTER SCHWA + key { [ u, U, U0289, U0244 ] }; // SMALL LETTER U, CAPITAL LETTER U, SMALL LETTER U BAR, CAPITAL LETTER U BAR + key { [ i, I, U0268, U0197 ] }; // SMALL LETTER I, CAPITAL LETTER I, SMALL LETTER I BAR, CAPITAL LETTER I BAR + key { [ d, D, U0257, U018A ] }; // SMALL LETTER D, CAPITAL LETTER D, SMALL LETTER D WITH HOOK, CAPITAL LETTER D WITH HOOK + key { [ h, H, U0251, U2C6D ] }; // SMALL LETTER H, CAPITAL LETTER H, SMALL LETTER ALPHA, CAPITAL LETTER ALPHA + key { [ t, T, U0153, U0152 ] }; // SMALL LETTER T, CAPITAL LETTER T, SMALL LIGATURE OE, CAPITAL LIGATURE OE + key { [ n, N, U014B, U014A ] }; // SMALL LETTER N, CAPITAL LETTER N, SMALL LETTER ENG, CAPITAL LETTER ENG + key { [ s, S ] }; // SMALL LETTER S, CAPITAL LETTER S + key { [ minus, underscore, U0304 ] }; // MINUS, UNDERSCORE, COMBINING MID TONE + key { [ U0300, U0302, U0027, U0022 ] }; // COMBINING LOW TONE, COMBINING FALLING TONE, APOSTROPHE, QUOTATION MARK + key { [ comma, less, U2039, U00AB ] }; // COMMA, LESS THAN SIGN, LEFT SINGLE GUILLEMET, LEFT DOUBLE GUILLEMET + key { [ period, greater, U203A, U00BB ] }; // PERIOD, GREATER THAN SIGN, RIGHT SINGLE GUILLEMET, RIGHT DOUBLE GUILLEMET + key { [ p, P, U00F8, U00D8 ] }; // SMALL LETTER P, CAPITAL LETTER P, SMALL LETTER O BAR, CAPITAL LETTER O BAR + key { [ y, Y, U01B4, U01B3 ] }; // SMALL LETTER Y, CAPITAL LETTER Y, SMALL LETTER Y WITH HOOK, CAPITAL LETTER Y WITH HOOK + key { [ f, F, U00E6, U00C6 ] }; // SMALL LETTER F, CAPITAL LETTER F, SMALL LIGATURE AE, CAPITAL LIGATURE AE + key { [ g, G, UA78C, UA78B ] }; // SMALL LETTER G, CAPITAL LETTER G, SMALL LETTER GLOTTAL (SALTILLO), CAPITAL LETTER GLOTTAL (SALTILLO) + key { [ c, C, NoSymbol, U00A9 ] }; // SMALL LETTER C, CAPITAL LETTER C, , COPYRIGHT + key { [ r, R, NoSymbol, U00AE ] }; // SMALL LETTER R, CAPITAL LETTER R, , REGISTERED SIGN + key { [ l, L, U1DC6, U1DC4 ] }; // SMALL LETTER L, CAPITAL LETTER L, COMBINING MID-LOW, COMBINING MID-HIGH TONE + key { [ slash, U003F, U00F7, U0294 ] }; // SLASH, QUESTION MARK, DIVISION SIGN, GLOTTAL STOP + key { [ equal, plus, NoSymbol, plusminus ] }; // EQUAL, PLUS, , PLUS-MINUS + key { [ KP_1, exclam, U00BC ] }; // 1, EXCLAMATION POINT, ONE QUARTER + key { [ KP_2, at, U00BD ] }; // 2, AT SYMBOL, ONE HALF + key { [ KP_3, numbersign, U00BE ] }; // 3, NUMBER SIGN, THREE QUARTERS + key { [ KP_4, dollar, NoSymbol, U20AC ] }; // 4, DOLLAR, , EURO SIGN + key { [ KP_5, percent ] }; // 5, PERCENT + key { [ KP_6, asciicircum ] }; // 6, CARET + key { [ KP_7, ampersand ] }; // 7, AMPERSAND + key { [ KP_8, asterisk, NoSymbol, multiply ] }; // 8, ASTERISK, , MULTIPLY + key { [ KP_9, parenleft, leftsinglequotemark, leftdoublequotemark ] }; // 9, LEFT PARENTHESIS, LEFT SINGLE QUOTE MARK, LEFT DOUBLE QUOTE MARK + key { [ KP_0, parenright, rightsinglequotemark, rightdoublequotemark ] }; // 0, RIGHT PARENTHESIS, RIGHT SINGLE QUOTE MARK, LEFT DOUBLE QUOTE MARK + key { [ U0301, U030C, U005B, U007B ] }; // COMBINING HIGH TONE, COMBINING RISING TONE, LEFT SQUARE BRACKET, LEFT CURLY BRACKET + key { [ U0327, dead_diaeresis, U005D, braceright ] }; // COMBINING CEDILLA, DEAD DIAERESIS, RIGHT SQUARE BRACKET, RIGHT CURLY BRACKET + key { [ backslash, bar ] }; // BACKSLASH, BAR + key { [ U030D, U0303, U0060, U007E ] }; // COMBINING VERTICAL LINE ABOVE, COMBINING TILDE ABOVE, GRAVE ACCENT, TILDE + include "cm(semicolon_switch_dvorak)" +}; + +// The following code creates the "Cameroon key" phenomenon. + +partial modifier_keys +xkb_symbols "semicolon_switch" { + key { + symbols[Group1] = [ ISO_Level3_Latch, colon, semicolon, colon ]}; + modifier_map Mod5 { ISO_Level3_Latch }; +}; + +partial modifier_keys +xkb_symbols "exclamation_switch" { + key { + symbols[Group1] = [ ISO_Level3_Latch, U00A7, exclam, U00A7 ] + }; + modifier_map Mod5 { ISO_Level3_Latch }; +}; + +partial modifier_keys +xkb_symbols "semicolon_switch_dvorak" { + key { + symbols[Group1] = [ ISO_Level3_Latch, colon, semicolon, colon ] + }; +modifier_map Mod5 { ISO_Level3_Latch }; +}; + -- cgit v1.2.3