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 6.8KB

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