Leaked source code of windows server 2003
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.

216 lines
11 KiB

  1. /******************************Module*Header*******************************\
  2. *
  3. * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  4. * !! !!
  5. * !! WARNING: NOT DDK SAMPLE CODE !!
  6. * !! !!
  7. * !! This source code is provided for completeness only and should not be !!
  8. * !! used as sample code for display driver development. Only those sources !!
  9. * !! marked as sample code for a given driver component should be used for !!
  10. * !! development purposes. !!
  11. * !! !!
  12. * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  13. *
  14. * Module Name: glintdef.h
  15. *
  16. * Content:
  17. *
  18. * Copyright (c) 1994-1999 3Dlabs Inc. Ltd. All rights reserved.
  19. * Copyright (c) 1995-2003 Microsoft Corporation. All rights reserved.
  20. \*****************************************************************************/
  21. //************************************************************************
  22. // *
  23. // * DESCRIPTION : Register Field Values for Permedia 3
  24. // *
  25. // ***********************************************************************
  26. #define __PERMEDIA_ENABLE 1
  27. #define __PERMEDIA_DISABLE 0
  28. // From FBReadMode
  29. #define __GLINT_8BITPIXEL 0
  30. #define __GLINT_16BITPIXEL 1
  31. #define __GLINT_32BITPIXEL 2
  32. #define __GLINT_4BITPIXEL 3
  33. #define __GLINT_24BITPIXEL 4
  34. /* Host out (Filter) options. */
  35. #define __GLINT_FILTER_TAG 0x1
  36. #define __GLINT_FILTER_DATA 0x2
  37. #define __GLINT_FILTER_TAG_AND_DATA 0x3
  38. /* Rasterization */
  39. #define __GLINT_LINE_PRIMITIVE 0
  40. #define __GLINT_TRAPEZOID_PRIMITIVE 1
  41. #define __GLINT_POINT_PRIMITIVE 2
  42. #define __GLINT_FLAT_SHADE_MODE 0
  43. #define __GLINT_GOURAUD_SHADE_MODE 1
  44. #define __GLINT_START_BIAS_ZERO 0
  45. #define __GLINT_START_BIAS_HALF 1
  46. #define __GLINT_START_BIAS_ALMOST_HALF 2
  47. /* Stipple */
  48. #define __GLINT_AREA_STIPPLE_2_PIXEL_PATTERN 0
  49. #define __GLINT_AREA_STIPPLE_4_PIXEL_PATTERN 1
  50. #define __GLINT_AREA_STIPPLE_8_PIXEL_PATTERN 2
  51. #define __GLINT_AREA_STIPPLE_16_PIXEL_PATTERN 3
  52. #define __GLINT_AREA_STIPPLE_32_PIXEL_PATTERN 4
  53. /* Alpha Test */
  54. #define __GLINT_ALPHA_COMPARE_MODE_NEVER 0
  55. #define __GLINT_ALPHA_COMPARE_MODE_LESS 1
  56. #define __GLINT_ALPHA_COMPARE_MODE_EQUAL 2
  57. #define __GLINT_ALPHA_COMPARE_MODE_LESS_OR_EQUAL 3
  58. #define __GLINT_ALPHA_COMPARE_MODE_GREATER 4
  59. #define __GLINT_ALPHA_COMPARE_MODE_NOT_EQUAL 5
  60. #define __GLINT_ALPHA_COMPARE_MODE_GREATER_OR_EQUAL 6
  61. #define __GLINT_ALPHA_COMPARE_MODE_ALWAYS 7
  62. /* Chroma Test Mode */
  63. #define __GLINT_CHROMA_FBSOURCE 0
  64. #define __GLINT_CHROMA_FBDATA 1
  65. #define __GLINT_CHROMA_INPUT_COLOR 2
  66. #define __GLINT_CHROMA_OUTPUT_COLOR 3
  67. #define __GLINT_CHROMA_INCLUDE 0
  68. #define __GLINT_CHROMA_EXCLUDE 1
  69. /* Texture Filter Mode */
  70. #define __GLINT_TEXTUREFILTER_ALPHAMAPSENSE_INCLUDE 0
  71. #define __GLINT_TEXTUREFILTER_ALPHAMAPSENSE_EXCLUDE 1
  72. /* Local buffer read */
  73. #define __GLINT_LBDEFAULT 0
  74. #define __GLINT_LBSTENCIL 1
  75. #define __GLINT_LBDEPTH 2
  76. #define __GLINT_TOP_LEFT_WINDOW_ORIGIN 0
  77. #define __GLINT_BOTTOM_LEFT_WINDOW_ORIGIN 1
  78. #define __GLINT_DEPTH_WIDTH_16 0
  79. #define __GLINT_DEPTH_WIDTH_24 1
  80. #define __GLINT_DEPTH_WIDTH_32 2
  81. #define __GLINT_DEPTH_WIDTH_15 3
  82. /* Stencil Test */
  83. #define __GLINT_STENCIL_COMPARE_MODE_NEVER 0
  84. #define __GLINT_STENCIL_COMPARE_MODE_LESS 1
  85. #define __GLINT_STENCIL_COMPARE_MODE_EQUAL 2
  86. #define __GLINT_STENCIL_COMPARE_MODE_LESS_OR_EQUAL 3
  87. #define __GLINT_STENCIL_COMPARE_MODE_GREATER 4
  88. #define __GLINT_STENCIL_COMPARE_MODE_NOT_EQUAL 5
  89. #define __GLINT_STENCIL_COMPARE_MODE_GREATER_OR_EQUAL 6
  90. #define __GLINT_STENCIL_COMPARE_MODE_ALWAYS 7
  91. #define __GLINT_STENCIL_METHOD_KEEP 0
  92. #define __GLINT_STENCIL_METHOD_ZERO 1
  93. #define __GLINT_STENCIL_METHOD_REPLACE 2
  94. #define __GLINT_STENCIL_METHOD_INCR 3
  95. #define __GLINT_STENCIL_METHOD_DECR 4
  96. #define __GLINT_STENCIL_METHOD_INVERT 5
  97. #define __GLINT_STENCIL_METHOD_INCR_WRAP 6
  98. #define __GLINT_STENCIL_METHOD_DECR_WRAP 7
  99. /* Depth Test */
  100. #define __GLINT_DEPTH_SOURCE_DDA 0
  101. #define __GLINT_DEPTH_SOURCE_SOURCE_DEPTH 1
  102. #define __GLINT_DEPTH_SOURCE_DEPTH_MSG 2
  103. #define __GLINT_DEPTH_SOURCE_LBSOURCEDATA_MSG 3
  104. #define __GLINT_DEPTH_COMPARE_MODE_NEVER 0
  105. #define __GLINT_DEPTH_COMPARE_MODE_LESS 1
  106. #define __GLINT_DEPTH_COMPARE_MODE_EQUAL 2
  107. #define __GLINT_DEPTH_COMPARE_MODE_LESS_OR_EQUAL 3
  108. #define __GLINT_DEPTH_COMPARE_MODE_GREATER 4
  109. #define __GLINT_DEPTH_COMPARE_MODE_NOT_EQUAL 5
  110. #define __GLINT_DEPTH_COMPARE_MODE_GREATER_OR_EQUAL 6
  111. #define __GLINT_DEPTH_COMPARE_MODE_ALWAYS 7
  112. /* Texture AddressMode */
  113. #define __GLINT_TEXADDRESS_WRAP_CLAMP 0
  114. #define __GLINT_TEXADDRESS_WRAP_REPEAT 1
  115. #define __GLINT_TEXADDRESS_WRAP_MIRROR 2
  116. #define __GLINT_TEXADDRESS_OPERATION_2D 0
  117. #define __GLINT_TEXADDRESS_OPERATION_3D 1
  118. #define __GLINT_TEXADDRESS_TEXMAP_1D 0
  119. #define __GLINT_TEXADDRESS_TEXMAP_2D 1
  120. /* Texture ReadMode */
  121. #define __GLINT_TEXTUREREAD_FILTER_NEAREST 0
  122. #define __GLINT_TEXTUREREAD_FILTER_LINEAR 1
  123. #define __GLINT_TEXTUREREAD_FILTER_NEARMIPNEAREST 2
  124. #define __GLINT_TEXTUREREAD_FILTER_NEARMIPLINEAR 3
  125. #define __GLINT_TEXTUREREAD_FILTER_LINEARMIPNEAREST 4
  126. #define __GLINT_TEXTUREREAD_FILTER_LINEARMIPLINEAR 5
  127. /* Texture Color Mode */
  128. #define __GLINT_TEXCOLORMODE_APPLICATION_MODULATE 0
  129. #define __GLINT_TEXCOLORMODE_APPLICATION_DECAL 1
  130. #define __GLINT_TEXCOLORMODE_APPLICATION_BLEND 2
  131. #define __GLINT_TEXCOLORMODE_APPLICATION_COPY 3
  132. /* Alpha Blend */
  133. #define __GLINT_BLEND_FUNC_ZERO 0
  134. #define __GLINT_BLEND_FUNC_ONE 1
  135. #define __GLINT_BLEND_FUNC_SRC_COLOR 2
  136. #define __GLINT_BLEND_FUNC_DST_COLOR 2
  137. #define __GLINT_BLEND_FUNC_ONE_MINUS_SRC_COLOR 3
  138. #define __GLINT_BLEND_FUNC_ONE_MINUS_DST_COLOR 3
  139. #define __GLINT_BLEND_FUNC_SRC_ALPHA 4
  140. #define __GLINT_BLEND_FUNC_ONE_MINUS_SRC_ALPHA 5
  141. #define __GLINT_BLEND_FUNC_DST_ALPHA 6
  142. #define __GLINT_BLEND_FUNC_ONE_MINUS_DST_ALPHA 7
  143. #define __GLINT_BLEND_FUNC_SRC_ALPHA_SATURATE 8
  144. /* Dither */
  145. #define __GLINT_COLOR_FORMAT_RGBA_8888 0
  146. #define __GLINT_COLOR_FORMAT_RGBA_5555 1
  147. #define __GLINT_COLOR_FORMAT_RGBA_5551_FRONT 1
  148. #define __GLINT_COLOR_FORMAT_RGBA_4444 2
  149. #define __GLINT_COLOR_FORMAT_RGBA_4444_FRONT 3
  150. #define __GLINT_COLOR_FORMAT_RGBA_4444_BACK 4
  151. #define __GLINT_COLOR_FORMAT_RGB_332_FRONT 5
  152. #define __GLINT_COLOR_FORMAT_RGB_332_BACK 6
  153. #define __GLINT_COLOR_FORMAT_RGB_121_FRONT 7
  154. #define __GLINT_COLOR_FORMAT_RGB_121_BACK 8
  155. #define __GLINT_COLOR_FORMAT_CI_8 14
  156. #define __GLINT_COLOR_FORMAT_CI_4 15
  157. /* Logical Ops/Write mask */
  158. #define __GLINT_LOGICOP_CLEAR 0
  159. #define __GLINT_LOGICOP_AND 1
  160. #define __GLINT_LOGICOP_AND_REVERSE 2
  161. #define __GLINT_LOGICOP_COPY 3
  162. #define __GLINT_LOGICOP_AND_INVERTED 4
  163. #define __GLINT_LOGICOP_NOOP 5
  164. #define __GLINT_LOGICOP_XOR 6
  165. #define __GLINT_LOGICOP_OR 7
  166. #define __GLINT_LOGICOP_NOR 8
  167. #define __GLINT_LOGICOP_EQUIV 9
  168. #define __GLINT_LOGICOP_INVERT 10
  169. #define __GLINT_LOGICOP_OR_REVERSE 11
  170. #define __GLINT_LOGICOP_COPY_INVERT 12
  171. #define __GLINT_LOGICOP_OR_INVERT 13
  172. #define __GLINT_LOGICOP_NAND 14
  173. #define __GLINT_LOGICOP_SET 15
  174. #define __GLINT_ALL_WRITEMASKS_SET 0xFFFFFFFF
  175. /*-----------------------------------------------------*/
  176. #define COLOR_MODE /* 0=BGR, 1=RGB */ 1
  177. #define INV_COLOR_MODE 0
  178. #define DITHER_XOFFSET 0
  179. #define DITHER_YOFFSET 0
  180. // Config - combined mode register for P2
  181. #define __GLINT_CONFIG_FBREAD_SRC 1
  182. #define __GLINT_CONFIG_FBREAD_DST 2