Clone of mesa.
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /**
  2. * \file sarea.h
  3. * SAREA definitions.
  4. *
  5. * \author Kevin E. Martin <kevin@precisioninsight.com>
  6. * \author Jens Owen <jens@tungstengraphics.com>
  7. * \author Rickard E. (Rik) Faith <faith@valinux.com>
  8. */
  9. /*
  10. * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
  11. * Copyright 2000 VA Linux Systems, Inc.
  12. * All Rights Reserved.
  13. *
  14. * Permission is hereby granted, free of charge, to any person obtaining a
  15. * copy of this software and associated documentation files (the
  16. * "Software"), to deal in the Software without restriction, including
  17. * without limitation the rights to use, copy, modify, merge, publish,
  18. * distribute, sub license, and/or sell copies of the Software, and to
  19. * permit persons to whom the Software is furnished to do so, subject to
  20. * the following conditions:
  21. *
  22. * The above copyright notice and this permission notice (including the
  23. * next paragraph) shall be included in all copies or substantial portions
  24. * of the Software.
  25. *
  26. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  27. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  28. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
  29. * IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
  30. * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  31. * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  32. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  33. */
  34. #ifndef _SAREA_H_
  35. #define _SAREA_H_
  36. #include "xf86drm.h"
  37. /* SAREA area needs to be at least a page */
  38. #if defined(__alpha__)
  39. #define SAREA_MAX 0x2000
  40. #elif defined(__ia64__)
  41. #define SAREA_MAX 0x10000 /* 64kB */
  42. #else
  43. /* Intel 830M driver needs at least 8k SAREA */
  44. #define SAREA_MAX 0x2000
  45. #endif
  46. #define SAREA_MAX_DRAWABLES 256
  47. #define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000
  48. /**
  49. * SAREA per drawable information.
  50. *
  51. * \sa _XF86DRISAREA.
  52. */
  53. typedef struct _XF86DRISAREADrawable {
  54. unsigned int stamp;
  55. unsigned int flags;
  56. } XF86DRISAREADrawableRec, *XF86DRISAREADrawablePtr;
  57. /**
  58. * SAREA frame information.
  59. *
  60. * \sa _XF86DRISAREA.
  61. */
  62. typedef struct _XF86DRISAREAFrame {
  63. unsigned int x;
  64. unsigned int y;
  65. unsigned int width;
  66. unsigned int height;
  67. unsigned int fullscreen;
  68. } XF86DRISAREAFrameRec, *XF86DRISAREAFramePtr;
  69. /**
  70. * SAREA definition.
  71. */
  72. typedef struct _XF86DRISAREA {
  73. /** first thing is always the DRM locking structure */
  74. drmLock lock;
  75. /** \todo Use readers/writer lock for drawable_lock */
  76. drmLock drawable_lock;
  77. XF86DRISAREADrawableRec drawableTable[SAREA_MAX_DRAWABLES];
  78. XF86DRISAREAFrameRec frame;
  79. drm_context_t dummy_context;
  80. } XF86DRISAREARec, *XF86DRISAREAPtr;
  81. #endif