Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygendri_interface.h
Go to the documentation of this file.
00001 /* 00002 * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. 00003 * Copyright 2007-2008 Red Hat, Inc. 00004 * (C) Copyright IBM Corporation 2004 00005 * All Rights Reserved. 00006 * 00007 * Permission is hereby granted, free of charge, to any person obtaining a 00008 * copy of this software and associated documentation files (the "Software"), 00009 * to deal in the Software without restriction, including without limitation 00010 * on the rights to use, copy, modify, merge, publish, distribute, sub 00011 * license, and/or sell copies of the Software, and to permit persons to whom 00012 * the Software is furnished to do so, subject to the following conditions: 00013 * 00014 * The above copyright notice and this permission notice (including the next 00015 * paragraph) shall be included in all copies or substantial portions of the 00016 * Software. 00017 * 00018 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00019 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00020 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 00021 * THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, 00022 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 00023 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE 00024 * USE OR OTHER DEALINGS IN THE SOFTWARE. 00025 */ 00026 00040 #ifndef DRI_INTERFACE_H 00041 #define DRI_INTERFACE_H 00042 00043 /* For archs with no drm.h */ 00044 #if !defined(__APPLE__) && !defined(__CYGWIN__) 00045 #include <drm.h> 00046 #else 00047 typedef unsigned int drm_context_t; 00048 typedef unsigned int drm_drawable_t; 00049 typedef struct drm_clip_rect drm_clip_rect_t; 00050 #endif 00051 00059 typedef struct __DRIdisplayRec __DRIdisplay; 00060 typedef struct __DRIscreenRec __DRIscreen; 00061 typedef struct __DRIcontextRec __DRIcontext; 00062 typedef struct __DRIdrawableRec __DRIdrawable; 00063 typedef struct __DRIconfigRec __DRIconfig; 00064 typedef struct __DRIframebufferRec __DRIframebuffer; 00065 typedef struct __DRIversionRec __DRIversion; 00066 00067 typedef struct __DRIcoreExtensionRec __DRIcoreExtension; 00068 typedef struct __DRIextensionRec __DRIextension; 00069 typedef struct __DRIcopySubBufferExtensionRec __DRIcopySubBufferExtension; 00070 typedef struct __DRIswapControlExtensionRec __DRIswapControlExtension; 00071 typedef struct __DRIallocateExtensionRec __DRIallocateExtension; 00072 typedef struct __DRIframeTrackingExtensionRec __DRIframeTrackingExtension; 00073 typedef struct __DRImediaStreamCounterExtensionRec __DRImediaStreamCounterExtension; 00074 typedef struct __DRItexOffsetExtensionRec __DRItexOffsetExtension; 00075 typedef struct __DRItexBufferExtensionRec __DRItexBufferExtension; 00076 typedef struct __DRIlegacyExtensionRec __DRIlegacyExtension; 00077 typedef struct __DRIswrastExtensionRec __DRIswrastExtension; 00078 typedef struct __DRIbufferRec __DRIbuffer; 00079 typedef struct __DRIdri2ExtensionRec __DRIdri2Extension; 00080 typedef struct __DRIdri2LoaderExtensionRec __DRIdri2LoaderExtension; 00081 00104 struct __DRIextensionRec { 00105 const char *name; 00106 int version; 00107 }; 00108 00120 #define __DRI_READ_DRAWABLE "DRI_ReadDrawable" 00121 #define __DRI_READ_DRAWABLE_VERSION 1 00122 00126 #define __DRI_COPY_SUB_BUFFER "DRI_CopySubBuffer" 00127 #define __DRI_COPY_SUB_BUFFER_VERSION 1 00128 struct __DRIcopySubBufferExtensionRec { 00129 __DRIextension base; 00130 void (*copySubBuffer)(__DRIdrawable *drawable, int x, int y, int w, int h); 00131 }; 00132 00137 #define __DRI_SWAP_CONTROL "DRI_SwapControl" 00138 #define __DRI_SWAP_CONTROL_VERSION 1 00139 struct __DRIswapControlExtensionRec { 00140 __DRIextension base; 00141 void (*setSwapInterval)(__DRIdrawable *drawable, unsigned int inteval); 00142 unsigned int (*getSwapInterval)(__DRIdrawable *drawable); 00143 }; 00144 00148 #define __DRI_ALLOCATE "DRI_Allocate" 00149 #define __DRI_ALLOCATE_VERSION 1 00150 struct __DRIallocateExtensionRec { 00151 __DRIextension base; 00152 00153 void *(*allocateMemory)(__DRIscreen *screen, GLsizei size, 00154 GLfloat readfreq, GLfloat writefreq, 00155 GLfloat priority); 00156 00157 void (*freeMemory)(__DRIscreen *screen, GLvoid *pointer); 00158 00159 GLuint (*memoryOffset)(__DRIscreen *screen, const GLvoid *pointer); 00160 }; 00161 00165 #define __DRI_FRAME_TRACKING "DRI_FrameTracking" 00166 #define __DRI_FRAME_TRACKING_VERSION 1 00167 struct __DRIframeTrackingExtensionRec { 00168 __DRIextension base; 00169 00175 int (*frameTracking)(__DRIdrawable *drawable, GLboolean enable); 00176 00182 int (*queryFrameTracking)(__DRIdrawable *drawable, 00183 int64_t * sbc, int64_t * missedFrames, 00184 float * lastMissedUsage, float * usage); 00185 }; 00186 00187 00191 #define __DRI_MEDIA_STREAM_COUNTER "DRI_MediaStreamCounter" 00192 #define __DRI_MEDIA_STREAM_COUNTER_VERSION 1 00193 struct __DRImediaStreamCounterExtensionRec { 00194 __DRIextension base; 00195 00202 int (*waitForMSC)(__DRIdrawable *drawable, 00203 int64_t target_msc, int64_t divisor, int64_t remainder, 00204 int64_t * msc, int64_t * sbc); 00205 00210 int (*getDrawableMSC)(__DRIscreen *screen, __DRIdrawable *drawable, 00211 int64_t *msc); 00212 }; 00213 00214 00215 #define __DRI_TEX_OFFSET "DRI_TexOffset" 00216 #define __DRI_TEX_OFFSET_VERSION 1 00217 struct __DRItexOffsetExtensionRec { 00218 __DRIextension base; 00219 00227 void (*setTexOffset)(__DRIcontext *pDRICtx, GLint texname, 00228 unsigned long long offset, GLint depth, GLuint pitch); 00229 }; 00230 00231 00232 #define __DRI_TEX_BUFFER "DRI_TexBuffer" 00233 #define __DRI_TEX_BUFFER_VERSION 1 00234 struct __DRItexBufferExtensionRec { 00235 __DRIextension base; 00236 00243 void (*setTexBuffer)(__DRIcontext *pDRICtx, 00244 GLint target, 00245 __DRIdrawable *pDraw); 00246 }; 00247 00248 00253 extern const char __driConfigOptions[]; 00254 00267 typedef struct __DRIgetDrawableInfoExtensionRec __DRIgetDrawableInfoExtension; 00268 typedef struct __DRIsystemTimeExtensionRec __DRIsystemTimeExtension; 00269 typedef struct __DRIdamageExtensionRec __DRIdamageExtension; 00270 typedef struct __DRIloaderExtensionRec __DRIloaderExtension; 00271 typedef struct __DRIswrastLoaderExtensionRec __DRIswrastLoaderExtension; 00272 00273 00277 #define __DRI_GET_DRAWABLE_INFO "DRI_GetDrawableInfo" 00278 #define __DRI_GET_DRAWABLE_INFO_VERSION 1 00279 struct __DRIgetDrawableInfoExtensionRec { 00280 __DRIextension base; 00281 00286 GLboolean (* getDrawableInfo) ( __DRIdrawable *drawable, 00287 unsigned int * index, unsigned int * stamp, 00288 int * x, int * y, int * width, int * height, 00289 int * numClipRects, drm_clip_rect_t ** pClipRects, 00290 int * backX, int * backY, 00291 int * numBackClipRects, drm_clip_rect_t ** pBackClipRects, 00292 void *loaderPrivate); 00293 }; 00294 00298 #define __DRI_SYSTEM_TIME "DRI_SystemTime" 00299 #define __DRI_SYSTEM_TIME_VERSION 1 00300 struct __DRIsystemTimeExtensionRec { 00301 __DRIextension base; 00302 00306 int (*getUST)(int64_t * ust); 00307 00315 GLboolean (*getMSCRate)(__DRIdrawable *draw, 00316 int32_t * numerator, int32_t * denominator, 00317 void *loaderPrivate); 00318 }; 00319 00323 #define __DRI_DAMAGE "DRI_Damage" 00324 #define __DRI_DAMAGE_VERSION 1 00325 struct __DRIdamageExtensionRec { 00326 __DRIextension base; 00327 00343 void (*reportDamage)(__DRIdrawable *draw, 00344 int x, int y, 00345 drm_clip_rect_t *rects, int num_rects, 00346 GLboolean front_buffer, 00347 void *loaderPrivate); 00348 }; 00349 00350 #define __DRI_SWRAST_IMAGE_OP_DRAW 1 00351 #define __DRI_SWRAST_IMAGE_OP_CLEAR 2 00352 #define __DRI_SWRAST_IMAGE_OP_SWAP 3 00353 00357 #define __DRI_SWRAST_LOADER "DRI_SWRastLoader" 00358 #define __DRI_SWRAST_LOADER_VERSION 1 00359 struct __DRIswrastLoaderExtensionRec { 00360 __DRIextension base; 00361 00362 /* 00363 * Drawable position and size 00364 */ 00365 void (*getDrawableInfo)(__DRIdrawable *drawable, 00366 int *x, int *y, int *width, int *height, 00367 void *loaderPrivate); 00368 00372 void (*putImage)(__DRIdrawable *drawable, int op, 00373 int x, int y, int width, int height, char *data, 00374 void *loaderPrivate); 00375 00379 void (*getImage)(__DRIdrawable *drawable, 00380 int x, int y, int width, int height, char *data, 00381 void *loaderPrivate); 00382 }; 00383 00390 #define __DRI_DRIVER_EXTENSIONS "__driDriverExtensions" 00391 00398 #define __DRI_ATTRIB_BUFFER_SIZE 1 00399 #define __DRI_ATTRIB_LEVEL 2 00400 #define __DRI_ATTRIB_RED_SIZE 3 00401 #define __DRI_ATTRIB_GREEN_SIZE 4 00402 #define __DRI_ATTRIB_BLUE_SIZE 5 00403 #define __DRI_ATTRIB_LUMINANCE_SIZE 6 00404 #define __DRI_ATTRIB_ALPHA_SIZE 7 00405 #define __DRI_ATTRIB_ALPHA_MASK_SIZE 8 00406 #define __DRI_ATTRIB_DEPTH_SIZE 9 00407 #define __DRI_ATTRIB_STENCIL_SIZE 10 00408 #define __DRI_ATTRIB_ACCUM_RED_SIZE 11 00409 #define __DRI_ATTRIB_ACCUM_GREEN_SIZE 12 00410 #define __DRI_ATTRIB_ACCUM_BLUE_SIZE 13 00411 #define __DRI_ATTRIB_ACCUM_ALPHA_SIZE 14 00412 #define __DRI_ATTRIB_SAMPLE_BUFFERS 15 00413 #define __DRI_ATTRIB_SAMPLES 16 00414 #define __DRI_ATTRIB_RENDER_TYPE 17 00415 #define __DRI_ATTRIB_CONFIG_CAVEAT 18 00416 #define __DRI_ATTRIB_CONFORMANT 19 00417 #define __DRI_ATTRIB_DOUBLE_BUFFER 20 00418 #define __DRI_ATTRIB_STEREO 21 00419 #define __DRI_ATTRIB_AUX_BUFFERS 22 00420 #define __DRI_ATTRIB_TRANSPARENT_TYPE 23 00421 #define __DRI_ATTRIB_TRANSPARENT_INDEX_VALUE 24 00422 #define __DRI_ATTRIB_TRANSPARENT_RED_VALUE 25 00423 #define __DRI_ATTRIB_TRANSPARENT_GREEN_VALUE 26 00424 #define __DRI_ATTRIB_TRANSPARENT_BLUE_VALUE 27 00425 #define __DRI_ATTRIB_TRANSPARENT_ALPHA_VALUE 28 00426 #define __DRI_ATTRIB_FLOAT_MODE 29 00427 #define __DRI_ATTRIB_RED_MASK 30 00428 #define __DRI_ATTRIB_GREEN_MASK 31 00429 #define __DRI_ATTRIB_BLUE_MASK 32 00430 #define __DRI_ATTRIB_ALPHA_MASK 33 00431 #define __DRI_ATTRIB_MAX_PBUFFER_WIDTH 34 00432 #define __DRI_ATTRIB_MAX_PBUFFER_HEIGHT 35 00433 #define __DRI_ATTRIB_MAX_PBUFFER_PIXELS 36 00434 #define __DRI_ATTRIB_OPTIMAL_PBUFFER_WIDTH 37 00435 #define __DRI_ATTRIB_OPTIMAL_PBUFFER_HEIGHT 38 00436 #define __DRI_ATTRIB_VISUAL_SELECT_GROUP 39 00437 #define __DRI_ATTRIB_SWAP_METHOD 40 00438 #define __DRI_ATTRIB_MAX_SWAP_INTERVAL 41 00439 #define __DRI_ATTRIB_MIN_SWAP_INTERVAL 42 00440 #define __DRI_ATTRIB_BIND_TO_TEXTURE_RGB 43 00441 #define __DRI_ATTRIB_BIND_TO_TEXTURE_RGBA 44 00442 #define __DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE 45 00443 #define __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS 46 00444 #define __DRI_ATTRIB_YINVERTED 47 00445 00446 /* __DRI_ATTRIB_RENDER_TYPE */ 00447 #define __DRI_ATTRIB_RGBA_BIT 0x01 00448 #define __DRI_ATTRIB_COLOR_INDEX_BIT 0x02 00449 #define __DRI_ATTRIB_LUMINANCE_BIT 0x04 00450 00451 /* __DRI_ATTRIB_CONFIG_CAVEAT */ 00452 #define __DRI_ATTRIB_SLOW_BIT 0x01 00453 #define __DRI_ATTRIB_NON_CONFORMANT_CONFIG 0x02 00454 00455 /* __DRI_ATTRIB_TRANSPARENT_TYPE */ 00456 #define __DRI_ATTRIB_TRANSPARENT_RGB 0x00 00457 #define __DRI_ATTRIB_TRANSPARENT_INDEX 0x01 00458 00459 /* __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS */ 00460 #define __DRI_ATTRIB_TEXTURE_1D_BIT 0x01 00461 #define __DRI_ATTRIB_TEXTURE_2D_BIT 0x02 00462 #define __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT 0x04 00463 00467 #define __DRI_CORE "DRI_Core" 00468 #define __DRI_CORE_VERSION 1 00469 00470 struct __DRIcoreExtensionRec { 00471 __DRIextension base; 00472 00473 __DRIscreen *(*createNewScreen)(int screen, int fd, 00474 unsigned int sarea_handle, 00475 const __DRIextension **extensions, 00476 const __DRIconfig ***driverConfigs, 00477 void *loaderPrivate); 00478 00479 void (*destroyScreen)(__DRIscreen *screen); 00480 00481 const __DRIextension **(*getExtensions)(__DRIscreen *screen); 00482 00483 int (*getConfigAttrib)(const __DRIconfig *config, 00484 unsigned int attrib, 00485 unsigned int *value); 00486 00487 int (*indexConfigAttrib)(const __DRIconfig *config, int index, 00488 unsigned int *attrib, unsigned int *value); 00489 00490 __DRIdrawable *(*createNewDrawable)(__DRIscreen *screen, 00491 const __DRIconfig *config, 00492 unsigned int drawable_id, 00493 unsigned int head, 00494 void *loaderPrivate); 00495 00496 void (*destroyDrawable)(__DRIdrawable *drawable); 00497 00498 void (*swapBuffers)(__DRIdrawable *drawable); 00499 00500 __DRIcontext *(*createNewContext)(__DRIscreen *screen, 00501 const __DRIconfig *config, 00502 __DRIcontext *shared, 00503 void *loaderPrivate); 00504 00505 int (*copyContext)(__DRIcontext *dest, 00506 __DRIcontext *src, 00507 unsigned long mask); 00508 00509 void (*destroyContext)(__DRIcontext *context); 00510 00511 int (*bindContext)(__DRIcontext *ctx, 00512 __DRIdrawable *pdraw, 00513 __DRIdrawable *pread); 00514 00515 int (*unbindContext)(__DRIcontext *ctx); 00516 }; 00517 00527 struct __DRIversionRec { 00528 int major; 00529 int minor; 00530 int patch; 00531 }; 00532 00545 struct __DRIframebufferRec { 00546 unsigned char *base; 00552 int size; 00553 int stride; 00554 int width; 00555 int height; 00556 int dev_priv_size; 00557 void *dev_priv; 00558 }; 00559 00560 00566 #define __DRI_LEGACY "DRI_Legacy" 00567 #define __DRI_LEGACY_VERSION 1 00568 00569 struct __DRIlegacyExtensionRec { 00570 __DRIextension base; 00571 00572 __DRIscreen *(*createNewScreen)(int screen, 00573 const __DRIversion *ddx_version, 00574 const __DRIversion *dri_version, 00575 const __DRIversion *drm_version, 00576 const __DRIframebuffer *frame_buffer, 00577 void *pSAREA, int fd, 00578 const __DRIextension **extensions, 00579 const __DRIconfig ***driver_configs, 00580 void *loaderPrivate); 00581 00582 __DRIdrawable *(*createNewDrawable)(__DRIscreen *screen, 00583 const __DRIconfig *config, 00584 drm_drawable_t hwDrawable, 00585 int renderType, const int *attrs, 00586 void *loaderPrivate); 00587 00588 __DRIcontext *(*createNewContext)(__DRIscreen *screen, 00589 const __DRIconfig *config, 00590 int render_type, 00591 __DRIcontext *shared, 00592 drm_context_t hwContext, 00593 void *loaderPrivate); 00594 }; 00595 00601 #define __DRI_SWRAST "DRI_SWRast" 00602 #define __DRI_SWRAST_VERSION 1 00603 00604 struct __DRIswrastExtensionRec { 00605 __DRIextension base; 00606 00607 __DRIscreen *(*createNewScreen)(int screen, 00608 const __DRIextension **extensions, 00609 const __DRIconfig ***driver_configs, 00610 void *loaderPrivate); 00611 00612 __DRIdrawable *(*createNewDrawable)(__DRIscreen *screen, 00613 const __DRIconfig *config, 00614 void *loaderPrivate); 00615 }; 00616 00620 #define __DRI_BUFFER_FRONT_LEFT 0 00621 #define __DRI_BUFFER_BACK_LEFT 1 00622 #define __DRI_BUFFER_FRONT_RIGHT 2 00623 #define __DRI_BUFFER_BACK_RIGHT 3 00624 #define __DRI_BUFFER_DEPTH 4 00625 #define __DRI_BUFFER_STENCIL 5 00626 #define __DRI_BUFFER_ACCUM 6 00627 #define __DRI_BUFFER_FAKE_FRONT_LEFT 7 00628 #define __DRI_BUFFER_FAKE_FRONT_RIGHT 8 00629 00630 struct __DRIbufferRec { 00631 unsigned int attachment; 00632 unsigned int name; 00633 unsigned int pitch; 00634 unsigned int cpp; 00635 unsigned int flags; 00636 }; 00637 00638 #define __DRI_DRI2_LOADER "DRI_DRI2Loader" 00639 #define __DRI_DRI2_LOADER_VERSION 1 00640 struct __DRIdri2LoaderExtensionRec { 00641 __DRIextension base; 00642 00643 __DRIbuffer *(*getBuffers)(__DRIdrawable *driDrawable, 00644 int *width, int *height, 00645 unsigned int *attachments, int count, 00646 int *out_count, void *loaderPrivate); 00647 }; 00648 00653 #define __DRI_DRI2 "DRI_DRI2" 00654 #define __DRI_DRI2_VERSION 1 00655 00656 struct __DRIdri2ExtensionRec { 00657 __DRIextension base; 00658 00659 __DRIscreen *(*createNewScreen)(int screen, int fd, 00660 const __DRIextension **extensions, 00661 const __DRIconfig ***driver_configs, 00662 void *loaderPrivate); 00663 00664 __DRIdrawable *(*createNewDrawable)(__DRIscreen *screen, 00665 const __DRIconfig *config, 00666 void *loaderPrivate); 00667 00668 __DRIcontext *(*createNewContext)(__DRIscreen *screen, 00669 const __DRIconfig *config, 00670 __DRIcontext *shared, 00671 void *loaderPrivate); 00672 00673 }; 00674 00675 #endif Generated on Sun May 27 2012 04:19:56 for ReactOS by
1.7.6.1
|