Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MESA_packed_depth_stencil.spec 7.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. XXX - Not complete yet!!!
  2. Name
  3. MESA_packed_depth_stencil
  4. Name Strings
  5. GL_MESA_packed_depth_stencil
  6. Contact
  7. Keith Whitwell, VA Linux Systems Inc. (keithw 'at' valinux.com)
  8. Brian Paul, VA Linux Systems Inc. (brianp 'at' valinux.com)
  9. Status
  10. Not yet shipping.
  11. Version
  12. $Id: MESA_packed_depth_stencil.spec,v 1.1 2000/11/03 14:58:45 brianp Exp $
  13. Number
  14. ???
  15. Dependencies
  16. EXT_abgr affects the definition of this extension
  17. SGIS_texture4D affects the definition of this extension
  18. EXT_cmyka affects the definition of this extension
  19. ARB_packed_pixels affects the definition of this extension
  20. Overview
  21. Provides a mechanism for DrawPixels and ReadPixels to efficiently
  22. transfer depth and stencil image data. Specifically, we defined new
  23. packed pixel formats and types which pack both stencil and depth
  24. into one value.
  25. Issues:
  26. 1. Is this the right way to distinguish between 24/8 and 8/24
  27. pixel formats? Should we instead provide both:
  28. GL_DEPTH_STENCIL_MESA
  29. GL_STENCIL_DEPTH_MESA
  30. And perhaps just use GL_UNSIGNED_INT, GL_UNSIGNED_SHORT ?
  31. 2. If not, is it correct to use _REV to indicate that stencil
  32. preceeds depth in the 1_15 and 8_24 formats?
  33. 3. Do we really want the GL_UNSIGNED_SHORT formats?
  34. New Procedures and Functions
  35. None.
  36. New Tokens
  37. Accepted by the <format> parameter of ReadPixels and DrawPixels:
  38. GL_DEPTH_STENCIL_MESA 0x8750
  39. Accepted by the <type> parameter of ReadPixels and DrawPixels:
  40. GL_UNSIGNED_INT_24_8_MESA 0x8751
  41. GL_UNSIGNED_INT_8_24_REV_MESA 0x8752
  42. GL_UNSIGNED_SHORT_15_1_MESA 0x8753
  43. GL_UNSIGNED_SHORT_1_15_REV_MESA 0x8754
  44. Additions to Chapter 2 of the 1.1 Specification (OpenGL Operation)
  45. None
  46. Additions to Chapter 3 of the 1.1 Specification (Rasterization)
  47. One entry is added to table 3.5 (DrawPixels and ReadPixels formats).
  48. The new table is:
  49. Target
  50. Format Name Buffer Element Meaning and Order
  51. ----------- ------ -------------------------
  52. COLOR_INDEX Color Color index
  53. STENCIL_INDEX Stencil Stencil index
  54. DEPTH_COMPONENT Depth Depth component
  55. RED Color R component
  56. GREEN Color G component
  57. BLUE Color B component
  58. ALPHA Color A component
  59. RGB Color R, G, B components
  60. RGBA Color R, G, B, A components
  61. BGRA Color B, G, R, A components
  62. ABGR_EXT Color A, B, G, R components
  63. CMYK_EXT Color Cyan, Magenta, Yellow, Black components
  64. CMYKA_EXT Color Cyan, Magenta, Yellow, Black, A components
  65. LUMINANCE Color Luminance component
  66. LUMINANCE_ALPHA Color Luminance, A components
  67. DEPTH_STENCIL Depth, Depth component, stencil index.
  68. Stencil
  69. Table 3.5: DrawPixels and ReadPixels formats. The third column
  70. gives a description of and the number and order of elements in a
  71. group.
  72. Add to the description of packed pixel formats:
  73. <type> Parameter Data of Matching
  74. Token Name Type Elements Pixel Formats
  75. ---------------- ---- -------- -------------
  76. UNSIGNED_BYTE_3_3_2 ubyte 3 RGB
  77. UNSIGNED_BYTE_2_3_3_REV ubyte 3 RGB
  78. UNSIGNED_SHORT_5_6_5 ushort 3 RGB
  79. UNSIGNED_SHORT_5_6_5_REV ushort 3 RGB
  80. UNSIGNED_SHORT_4_4_4_4 ushort 4 RGBA,BGRA,ABGR_EXT,CMYK_EXT
  81. UNSIGNED_SHORT_4_4_4_4_REV ushort 4 RGBA,BGRA
  82. UNSIGNED_SHORT_5_5_5_1 ushort 4 RGBA,BGRA,ABGR_EXT,CMYK_EXT
  83. UNSIGNED_SHORT_1_5_5_5_REV ushort 4 RGBA,BGRA
  84. UNSIGNED_INT_8_8_8_8 uint 4 RGBA,BGRA,ABGR_EXT,CMYK_EXT
  85. UNSIGNED_INT_8_8_8_8_REV uint 4 RGBA,BGRA
  86. UNSIGNED_INT_10_10_10_2 uint 4 RGBA,BGRA,ABGR_EXT,CMYK_EXT
  87. UNSIGNED_INT_2_10_10_10_REV uint 4 RGBA,BGRA
  88. UNSIGNED_SHORT_15_1_MESA ushort 2 DEPTH_STENCIL_MESA
  89. UNSIGNED_SHORT_1_15_REV_MESA ushort 2 DEPTH_STENCIL_MESA
  90. UNSIGNED_SHORT_24_8_MESA ushort 2 DEPTH_STENCIL_MESA
  91. UNSIGNED_SHORT_8_24_REV_MESA ushort 2 DEPTH_STENCIL_MESA
  92. UNSIGNED_INT_8_24:
  93. 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  94. +-----------------------+-----------------------------------------------------------------------+
  95. | | |
  96. +-----------------------+-----------------------------------------------------------------------+
  97. first second
  98. element element
  99. UNSIGNED_INT_24_8:
  100. 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  101. +----------------------------------------------------------------------+------------------------+
  102. | | |
  103. +----------------------------------------------------------------------+------------------------+
  104. first second
  105. element element
  106. UNSIGNED_SHORT_15_1:
  107. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  108. +-----------------------------------------------------------+---+
  109. | | |
  110. +-----------------------------------------------------------+---+
  111. first second
  112. element element
  113. UNSIGNED_SHORT_1_15_REV:
  114. 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
  115. +---+-----------------------------------------------------------+
  116. | | |
  117. +---+-----------------------------------------------------------+
  118. second first
  119. element element
  120. The assignment of elements to fields in the packed pixel is as
  121. described in the table below:
  122. First Second Third Fourth
  123. Format Element Element Element Element
  124. ------ ------- ------- ------- -------
  125. RGB red green blue
  126. RGBA red green blue alpha
  127. BGRA blue green red alpha
  128. ABGR_EXT alpha blue green red
  129. CMYK_EXT cyan magenta yellow black
  130. DEPTH_STENCIL_MESA depth stencil
  131. Additions to Chapter 4 of the 1.1 Specification (Per-Fragment Operations
  132. and the Frame Buffer)
  133. The new format is added to the discussion of Obtaining Pixels from the
  134. Framebuffer. It should read " If the <format> is one of RED, GREEN,
  135. BLUE, ALPHA, RGB, RGBA, ABGR_EXT, LUMINANCE, or LUMINANCE_ALPHA, and
  136. the GL is in color index mode, then the color index is obtained."
  137. The new format is added to the discussion of Index Lookup. It should
  138. read "If <format> is one of RED, GREEN, BLUE, ALPHA, RGB, RGBA,
  139. ABGR_EXT, LUMINANCE, or LUMINANCE_ALPHA, then the index is used to
  140. reference 4 tables of color components: PIXEL_MAP_I_TO_R,
  141. PIXEL_MAP_I_TO_G, PIXEL_MAP_I_TO_B, and PIXEL_MAP_I_TO_A."
  142. Additions to Chapter 5 of the 1.1 Specification (Special Functions)
  143. None
  144. Additions to Chapter 6 of the 1.1 Specification (State and State Requests)
  145. None
  146. Additions to the GLX Specification
  147. None
  148. GLX Protocol
  149. TBD
  150. Errors
  151. None
  152. New State
  153. None
  154. Revision History
  155. Version 1.0 - 23 Sep 2000
  156. Keith's original version.
  157. Version 1.1 - 3 Nov 2000
  158. Brian's edits, assigned values to new enums.