svga3d_devcaps.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. /**********************************************************
  2. * Copyright 1998-2015 VMware, Inc. All rights reserved.
  3. *
  4. * Permission is hereby granted, free of charge, to any person
  5. * obtaining a copy of this software and associated documentation
  6. * files (the "Software"), to deal in the Software without
  7. * restriction, including without limitation the rights to use, copy,
  8. * modify, merge, publish, distribute, sublicense, and/or sell copies
  9. * of the Software, and to permit persons to whom the Software is
  10. * furnished to do so, subject to the following conditions:
  11. *
  12. * The above copyright notice and this permission notice shall be
  13. * included in all copies or substantial portions of the Software.
  14. *
  15. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  16. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  17. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  18. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
  19. * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  20. * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  21. * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  22. * SOFTWARE.
  23. *
  24. **********************************************************/
  25. /*
  26. * svga3d_devcaps.h --
  27. *
  28. * SVGA 3d caps definitions
  29. */
  30. #ifndef _SVGA3D_DEVCAPS_H_
  31. #define _SVGA3D_DEVCAPS_H_
  32. #define INCLUDE_ALLOW_MODULE
  33. #define INCLUDE_ALLOW_USERLEVEL
  34. #define INCLUDE_ALLOW_VMCORE
  35. #include "includeCheck.h"
  36. /*
  37. * 3D Hardware Version
  38. *
  39. * The hardware version is stored in the SVGA_FIFO_3D_HWVERSION fifo
  40. * register. Is set by the host and read by the guest. This lets
  41. * us make new guest drivers which are backwards-compatible with old
  42. * SVGA hardware revisions. It does not let us support old guest
  43. * drivers. Good enough for now.
  44. *
  45. */
  46. #define SVGA3D_MAKE_HWVERSION(major, minor) (((major) << 16) | ((minor) & 0xFF))
  47. #define SVGA3D_MAJOR_HWVERSION(version) ((version) >> 16)
  48. #define SVGA3D_MINOR_HWVERSION(version) ((version) & 0xFF)
  49. typedef enum {
  50. SVGA3D_HWVERSION_WS5_RC1 = SVGA3D_MAKE_HWVERSION(0, 1),
  51. SVGA3D_HWVERSION_WS5_RC2 = SVGA3D_MAKE_HWVERSION(0, 2),
  52. SVGA3D_HWVERSION_WS51_RC1 = SVGA3D_MAKE_HWVERSION(0, 3),
  53. SVGA3D_HWVERSION_WS6_B1 = SVGA3D_MAKE_HWVERSION(1, 1),
  54. SVGA3D_HWVERSION_FUSION_11 = SVGA3D_MAKE_HWVERSION(1, 4),
  55. SVGA3D_HWVERSION_WS65_B1 = SVGA3D_MAKE_HWVERSION(2, 0),
  56. SVGA3D_HWVERSION_WS8_B1 = SVGA3D_MAKE_HWVERSION(2, 1),
  57. SVGA3D_HWVERSION_CURRENT = SVGA3D_HWVERSION_WS8_B1,
  58. } SVGA3dHardwareVersion;
  59. /*
  60. * DevCap indexes.
  61. */
  62. typedef enum {
  63. SVGA3D_DEVCAP_INVALID = ((uint32)-1),
  64. SVGA3D_DEVCAP_3D = 0,
  65. SVGA3D_DEVCAP_MAX_LIGHTS = 1,
  66. /*
  67. * SVGA3D_DEVCAP_MAX_TEXTURES reflects the maximum number of
  68. * fixed-function texture units available. Each of these units
  69. * work in both FFP and Shader modes, and they support texture
  70. * transforms and texture coordinates. The host may have additional
  71. * texture image units that are only usable with shaders.
  72. */
  73. SVGA3D_DEVCAP_MAX_TEXTURES = 2,
  74. SVGA3D_DEVCAP_MAX_CLIP_PLANES = 3,
  75. SVGA3D_DEVCAP_VERTEX_SHADER_VERSION = 4,
  76. SVGA3D_DEVCAP_VERTEX_SHADER = 5,
  77. SVGA3D_DEVCAP_FRAGMENT_SHADER_VERSION = 6,
  78. SVGA3D_DEVCAP_FRAGMENT_SHADER = 7,
  79. SVGA3D_DEVCAP_MAX_RENDER_TARGETS = 8,
  80. SVGA3D_DEVCAP_S23E8_TEXTURES = 9,
  81. SVGA3D_DEVCAP_S10E5_TEXTURES = 10,
  82. SVGA3D_DEVCAP_MAX_FIXED_VERTEXBLEND = 11,
  83. SVGA3D_DEVCAP_D16_BUFFER_FORMAT = 12,
  84. SVGA3D_DEVCAP_D24S8_BUFFER_FORMAT = 13,
  85. SVGA3D_DEVCAP_D24X8_BUFFER_FORMAT = 14,
  86. SVGA3D_DEVCAP_QUERY_TYPES = 15,
  87. SVGA3D_DEVCAP_TEXTURE_GRADIENT_SAMPLING = 16,
  88. SVGA3D_DEVCAP_MAX_POINT_SIZE = 17,
  89. SVGA3D_DEVCAP_MAX_SHADER_TEXTURES = 18,
  90. SVGA3D_DEVCAP_MAX_TEXTURE_WIDTH = 19,
  91. SVGA3D_DEVCAP_MAX_TEXTURE_HEIGHT = 20,
  92. SVGA3D_DEVCAP_MAX_VOLUME_EXTENT = 21,
  93. SVGA3D_DEVCAP_MAX_TEXTURE_REPEAT = 22,
  94. SVGA3D_DEVCAP_MAX_TEXTURE_ASPECT_RATIO = 23,
  95. SVGA3D_DEVCAP_MAX_TEXTURE_ANISOTROPY = 24,
  96. SVGA3D_DEVCAP_MAX_PRIMITIVE_COUNT = 25,
  97. SVGA3D_DEVCAP_MAX_VERTEX_INDEX = 26,
  98. SVGA3D_DEVCAP_MAX_VERTEX_SHADER_INSTRUCTIONS = 27,
  99. SVGA3D_DEVCAP_MAX_FRAGMENT_SHADER_INSTRUCTIONS = 28,
  100. SVGA3D_DEVCAP_MAX_VERTEX_SHADER_TEMPS = 29,
  101. SVGA3D_DEVCAP_MAX_FRAGMENT_SHADER_TEMPS = 30,
  102. SVGA3D_DEVCAP_TEXTURE_OPS = 31,
  103. SVGA3D_DEVCAP_SURFACEFMT_X8R8G8B8 = 32,
  104. SVGA3D_DEVCAP_SURFACEFMT_A8R8G8B8 = 33,
  105. SVGA3D_DEVCAP_SURFACEFMT_A2R10G10B10 = 34,
  106. SVGA3D_DEVCAP_SURFACEFMT_X1R5G5B5 = 35,
  107. SVGA3D_DEVCAP_SURFACEFMT_A1R5G5B5 = 36,
  108. SVGA3D_DEVCAP_SURFACEFMT_A4R4G4B4 = 37,
  109. SVGA3D_DEVCAP_SURFACEFMT_R5G6B5 = 38,
  110. SVGA3D_DEVCAP_SURFACEFMT_LUMINANCE16 = 39,
  111. SVGA3D_DEVCAP_SURFACEFMT_LUMINANCE8_ALPHA8 = 40,
  112. SVGA3D_DEVCAP_SURFACEFMT_ALPHA8 = 41,
  113. SVGA3D_DEVCAP_SURFACEFMT_LUMINANCE8 = 42,
  114. SVGA3D_DEVCAP_SURFACEFMT_Z_D16 = 43,
  115. SVGA3D_DEVCAP_SURFACEFMT_Z_D24S8 = 44,
  116. SVGA3D_DEVCAP_SURFACEFMT_Z_D24X8 = 45,
  117. SVGA3D_DEVCAP_SURFACEFMT_DXT1 = 46,
  118. SVGA3D_DEVCAP_SURFACEFMT_DXT2 = 47,
  119. SVGA3D_DEVCAP_SURFACEFMT_DXT3 = 48,
  120. SVGA3D_DEVCAP_SURFACEFMT_DXT4 = 49,
  121. SVGA3D_DEVCAP_SURFACEFMT_DXT5 = 50,
  122. SVGA3D_DEVCAP_SURFACEFMT_BUMPX8L8V8U8 = 51,
  123. SVGA3D_DEVCAP_SURFACEFMT_A2W10V10U10 = 52,
  124. SVGA3D_DEVCAP_SURFACEFMT_BUMPU8V8 = 53,
  125. SVGA3D_DEVCAP_SURFACEFMT_Q8W8V8U8 = 54,
  126. SVGA3D_DEVCAP_SURFACEFMT_CxV8U8 = 55,
  127. SVGA3D_DEVCAP_SURFACEFMT_R_S10E5 = 56,
  128. SVGA3D_DEVCAP_SURFACEFMT_R_S23E8 = 57,
  129. SVGA3D_DEVCAP_SURFACEFMT_RG_S10E5 = 58,
  130. SVGA3D_DEVCAP_SURFACEFMT_RG_S23E8 = 59,
  131. SVGA3D_DEVCAP_SURFACEFMT_ARGB_S10E5 = 60,
  132. SVGA3D_DEVCAP_SURFACEFMT_ARGB_S23E8 = 61,
  133. /*
  134. * There is a hole in our devcap definitions for
  135. * historical reasons.
  136. *
  137. * Define a constant just for completeness.
  138. */
  139. SVGA3D_DEVCAP_MISSING62 = 62,
  140. SVGA3D_DEVCAP_MAX_VERTEX_SHADER_TEXTURES = 63,
  141. /*
  142. * Note that MAX_SIMULTANEOUS_RENDER_TARGETS is a maximum count of color
  143. * render targets. This does not include the depth or stencil targets.
  144. */
  145. SVGA3D_DEVCAP_MAX_SIMULTANEOUS_RENDER_TARGETS = 64,
  146. SVGA3D_DEVCAP_SURFACEFMT_V16U16 = 65,
  147. SVGA3D_DEVCAP_SURFACEFMT_G16R16 = 66,
  148. SVGA3D_DEVCAP_SURFACEFMT_A16B16G16R16 = 67,
  149. SVGA3D_DEVCAP_SURFACEFMT_UYVY = 68,
  150. SVGA3D_DEVCAP_SURFACEFMT_YUY2 = 69,
  151. SVGA3D_DEVCAP_MULTISAMPLE_NONMASKABLESAMPLES = 70,
  152. SVGA3D_DEVCAP_MULTISAMPLE_MASKABLESAMPLES = 71,
  153. SVGA3D_DEVCAP_ALPHATOCOVERAGE = 72,
  154. SVGA3D_DEVCAP_SUPERSAMPLE = 73,
  155. SVGA3D_DEVCAP_AUTOGENMIPMAPS = 74,
  156. SVGA3D_DEVCAP_SURFACEFMT_NV12 = 75,
  157. SVGA3D_DEVCAP_SURFACEFMT_AYUV = 76,
  158. /*
  159. * This is the maximum number of SVGA context IDs that the guest
  160. * can define using SVGA_3D_CMD_CONTEXT_DEFINE.
  161. */
  162. SVGA3D_DEVCAP_MAX_CONTEXT_IDS = 77,
  163. /*
  164. * This is the maximum number of SVGA surface IDs that the guest
  165. * can define using SVGA_3D_CMD_SURFACE_DEFINE*.
  166. */
  167. SVGA3D_DEVCAP_MAX_SURFACE_IDS = 78,
  168. SVGA3D_DEVCAP_SURFACEFMT_Z_DF16 = 79,
  169. SVGA3D_DEVCAP_SURFACEFMT_Z_DF24 = 80,
  170. SVGA3D_DEVCAP_SURFACEFMT_Z_D24S8_INT = 81,
  171. SVGA3D_DEVCAP_SURFACEFMT_ATI1 = 82,
  172. SVGA3D_DEVCAP_SURFACEFMT_ATI2 = 83,
  173. /*
  174. * Deprecated.
  175. */
  176. SVGA3D_DEVCAP_DEAD1 = 84,
  177. /*
  178. * This contains several SVGA_3D_CAPS_VIDEO_DECODE elements
  179. * ored together, one for every type of video decoding supported.
  180. */
  181. SVGA3D_DEVCAP_VIDEO_DECODE = 85,
  182. /*
  183. * This contains several SVGA_3D_CAPS_VIDEO_PROCESS elements
  184. * ored together, one for every type of video processing supported.
  185. */
  186. SVGA3D_DEVCAP_VIDEO_PROCESS = 86,
  187. SVGA3D_DEVCAP_LINE_AA = 87, /* boolean */
  188. SVGA3D_DEVCAP_LINE_STIPPLE = 88, /* boolean */
  189. SVGA3D_DEVCAP_MAX_LINE_WIDTH = 89, /* float */
  190. SVGA3D_DEVCAP_MAX_AA_LINE_WIDTH = 90, /* float */
  191. SVGA3D_DEVCAP_SURFACEFMT_YV12 = 91,
  192. /*
  193. * Does the host support the SVGA logic ops commands?
  194. */
  195. SVGA3D_DEVCAP_LOGICOPS = 92,
  196. /*
  197. * Are TS_CONSTANT, TS_COLOR_KEY, and TS_COLOR_KEY_ENABLE supported?
  198. */
  199. SVGA3D_DEVCAP_TS_COLOR_KEY = 93, /* boolean */
  200. /*
  201. * Deprecated.
  202. */
  203. SVGA3D_DEVCAP_DEAD2 = 94,
  204. /*
  205. * Does the device support the DX commands?
  206. */
  207. SVGA3D_DEVCAP_DX = 95,
  208. /*
  209. * What is the maximum size of a texture array?
  210. *
  211. * (Even if this cap is zero, cubemaps are still allowed.)
  212. */
  213. SVGA3D_DEVCAP_MAX_TEXTURE_ARRAY_SIZE = 96,
  214. /*
  215. * What is the maximum number of vertex buffers that can
  216. * be used in the DXContext inputAssembly?
  217. */
  218. SVGA3D_DEVCAP_DX_MAX_VERTEXBUFFERS = 97,
  219. /*
  220. * What is the maximum number of constant buffers
  221. * that can be expected to work correctly with a
  222. * DX context?
  223. */
  224. SVGA3D_DEVCAP_DX_MAX_CONSTANT_BUFFERS = 98,
  225. /*
  226. * Does the device support provoking vertex control?
  227. * If zero, the first vertex will always be the provoking vertex.
  228. */
  229. SVGA3D_DEVCAP_DX_PROVOKING_VERTEX = 99,
  230. SVGA3D_DEVCAP_DXFMT_X8R8G8B8 = 100,
  231. SVGA3D_DEVCAP_DXFMT_A8R8G8B8 = 101,
  232. SVGA3D_DEVCAP_DXFMT_R5G6B5 = 102,
  233. SVGA3D_DEVCAP_DXFMT_X1R5G5B5 = 103,
  234. SVGA3D_DEVCAP_DXFMT_A1R5G5B5 = 104,
  235. SVGA3D_DEVCAP_DXFMT_A4R4G4B4 = 105,
  236. SVGA3D_DEVCAP_DXFMT_Z_D32 = 106,
  237. SVGA3D_DEVCAP_DXFMT_Z_D16 = 107,
  238. SVGA3D_DEVCAP_DXFMT_Z_D24S8 = 108,
  239. SVGA3D_DEVCAP_DXFMT_Z_D15S1 = 109,
  240. SVGA3D_DEVCAP_DXFMT_LUMINANCE8 = 110,
  241. SVGA3D_DEVCAP_DXFMT_LUMINANCE4_ALPHA4 = 111,
  242. SVGA3D_DEVCAP_DXFMT_LUMINANCE16 = 112,
  243. SVGA3D_DEVCAP_DXFMT_LUMINANCE8_ALPHA8 = 113,
  244. SVGA3D_DEVCAP_DXFMT_DXT1 = 114,
  245. SVGA3D_DEVCAP_DXFMT_DXT2 = 115,
  246. SVGA3D_DEVCAP_DXFMT_DXT3 = 116,
  247. SVGA3D_DEVCAP_DXFMT_DXT4 = 117,
  248. SVGA3D_DEVCAP_DXFMT_DXT5 = 118,
  249. SVGA3D_DEVCAP_DXFMT_BUMPU8V8 = 119,
  250. SVGA3D_DEVCAP_DXFMT_BUMPL6V5U5 = 120,
  251. SVGA3D_DEVCAP_DXFMT_BUMPX8L8V8U8 = 121,
  252. SVGA3D_DEVCAP_DXFMT_BUMPL8V8U8 = 122,
  253. SVGA3D_DEVCAP_DXFMT_ARGB_S10E5 = 123,
  254. SVGA3D_DEVCAP_DXFMT_ARGB_S23E8 = 124,
  255. SVGA3D_DEVCAP_DXFMT_A2R10G10B10 = 125,
  256. SVGA3D_DEVCAP_DXFMT_V8U8 = 126,
  257. SVGA3D_DEVCAP_DXFMT_Q8W8V8U8 = 127,
  258. SVGA3D_DEVCAP_DXFMT_CxV8U8 = 128,
  259. SVGA3D_DEVCAP_DXFMT_X8L8V8U8 = 129,
  260. SVGA3D_DEVCAP_DXFMT_A2W10V10U10 = 130,
  261. SVGA3D_DEVCAP_DXFMT_ALPHA8 = 131,
  262. SVGA3D_DEVCAP_DXFMT_R_S10E5 = 132,
  263. SVGA3D_DEVCAP_DXFMT_R_S23E8 = 133,
  264. SVGA3D_DEVCAP_DXFMT_RG_S10E5 = 134,
  265. SVGA3D_DEVCAP_DXFMT_RG_S23E8 = 135,
  266. SVGA3D_DEVCAP_DXFMT_BUFFER = 136,
  267. SVGA3D_DEVCAP_DXFMT_Z_D24X8 = 137,
  268. SVGA3D_DEVCAP_DXFMT_V16U16 = 138,
  269. SVGA3D_DEVCAP_DXFMT_G16R16 = 139,
  270. SVGA3D_DEVCAP_DXFMT_A16B16G16R16 = 140,
  271. SVGA3D_DEVCAP_DXFMT_UYVY = 141,
  272. SVGA3D_DEVCAP_DXFMT_YUY2 = 142,
  273. SVGA3D_DEVCAP_DXFMT_NV12 = 143,
  274. SVGA3D_DEVCAP_DXFMT_AYUV = 144,
  275. SVGA3D_DEVCAP_DXFMT_R32G32B32A32_TYPELESS = 145,
  276. SVGA3D_DEVCAP_DXFMT_R32G32B32A32_UINT = 146,
  277. SVGA3D_DEVCAP_DXFMT_R32G32B32A32_SINT = 147,
  278. SVGA3D_DEVCAP_DXFMT_R32G32B32_TYPELESS = 148,
  279. SVGA3D_DEVCAP_DXFMT_R32G32B32_FLOAT = 149,
  280. SVGA3D_DEVCAP_DXFMT_R32G32B32_UINT = 150,
  281. SVGA3D_DEVCAP_DXFMT_R32G32B32_SINT = 151,
  282. SVGA3D_DEVCAP_DXFMT_R16G16B16A16_TYPELESS = 152,
  283. SVGA3D_DEVCAP_DXFMT_R16G16B16A16_UINT = 153,
  284. SVGA3D_DEVCAP_DXFMT_R16G16B16A16_SNORM = 154,
  285. SVGA3D_DEVCAP_DXFMT_R16G16B16A16_SINT = 155,
  286. SVGA3D_DEVCAP_DXFMT_R32G32_TYPELESS = 156,
  287. SVGA3D_DEVCAP_DXFMT_R32G32_UINT = 157,
  288. SVGA3D_DEVCAP_DXFMT_R32G32_SINT = 158,
  289. SVGA3D_DEVCAP_DXFMT_R32G8X24_TYPELESS = 159,
  290. SVGA3D_DEVCAP_DXFMT_D32_FLOAT_S8X24_UINT = 160,
  291. SVGA3D_DEVCAP_DXFMT_R32_FLOAT_X8X24_TYPELESS = 161,
  292. SVGA3D_DEVCAP_DXFMT_X32_TYPELESS_G8X24_UINT = 162,
  293. SVGA3D_DEVCAP_DXFMT_R10G10B10A2_TYPELESS = 163,
  294. SVGA3D_DEVCAP_DXFMT_R10G10B10A2_UINT = 164,
  295. SVGA3D_DEVCAP_DXFMT_R11G11B10_FLOAT = 165,
  296. SVGA3D_DEVCAP_DXFMT_R8G8B8A8_TYPELESS = 166,
  297. SVGA3D_DEVCAP_DXFMT_R8G8B8A8_UNORM = 167,
  298. SVGA3D_DEVCAP_DXFMT_R8G8B8A8_UNORM_SRGB = 168,
  299. SVGA3D_DEVCAP_DXFMT_R8G8B8A8_UINT = 169,
  300. SVGA3D_DEVCAP_DXFMT_R8G8B8A8_SINT = 170,
  301. SVGA3D_DEVCAP_DXFMT_R16G16_TYPELESS = 171,
  302. SVGA3D_DEVCAP_DXFMT_R16G16_UINT = 172,
  303. SVGA3D_DEVCAP_DXFMT_R16G16_SINT = 173,
  304. SVGA3D_DEVCAP_DXFMT_R32_TYPELESS = 174,
  305. SVGA3D_DEVCAP_DXFMT_D32_FLOAT = 175,
  306. SVGA3D_DEVCAP_DXFMT_R32_UINT = 176,
  307. SVGA3D_DEVCAP_DXFMT_R32_SINT = 177,
  308. SVGA3D_DEVCAP_DXFMT_R24G8_TYPELESS = 178,
  309. SVGA3D_DEVCAP_DXFMT_D24_UNORM_S8_UINT = 179,
  310. SVGA3D_DEVCAP_DXFMT_R24_UNORM_X8_TYPELESS = 180,
  311. SVGA3D_DEVCAP_DXFMT_X24_TYPELESS_G8_UINT = 181,
  312. SVGA3D_DEVCAP_DXFMT_R8G8_TYPELESS = 182,
  313. SVGA3D_DEVCAP_DXFMT_R8G8_UNORM = 183,
  314. SVGA3D_DEVCAP_DXFMT_R8G8_UINT = 184,
  315. SVGA3D_DEVCAP_DXFMT_R8G8_SINT = 185,
  316. SVGA3D_DEVCAP_DXFMT_R16_TYPELESS = 186,
  317. SVGA3D_DEVCAP_DXFMT_R16_UNORM = 187,
  318. SVGA3D_DEVCAP_DXFMT_R16_UINT = 188,
  319. SVGA3D_DEVCAP_DXFMT_R16_SNORM = 189,
  320. SVGA3D_DEVCAP_DXFMT_R16_SINT = 190,
  321. SVGA3D_DEVCAP_DXFMT_R8_TYPELESS = 191,
  322. SVGA3D_DEVCAP_DXFMT_R8_UNORM = 192,
  323. SVGA3D_DEVCAP_DXFMT_R8_UINT = 193,
  324. SVGA3D_DEVCAP_DXFMT_R8_SNORM = 194,
  325. SVGA3D_DEVCAP_DXFMT_R8_SINT = 195,
  326. SVGA3D_DEVCAP_DXFMT_P8 = 196,
  327. SVGA3D_DEVCAP_DXFMT_R9G9B9E5_SHAREDEXP = 197,
  328. SVGA3D_DEVCAP_DXFMT_R8G8_B8G8_UNORM = 198,
  329. SVGA3D_DEVCAP_DXFMT_G8R8_G8B8_UNORM = 199,
  330. SVGA3D_DEVCAP_DXFMT_BC1_TYPELESS = 200,
  331. SVGA3D_DEVCAP_DXFMT_BC1_UNORM_SRGB = 201,
  332. SVGA3D_DEVCAP_DXFMT_BC2_TYPELESS = 202,
  333. SVGA3D_DEVCAP_DXFMT_BC2_UNORM_SRGB = 203,
  334. SVGA3D_DEVCAP_DXFMT_BC3_TYPELESS = 204,
  335. SVGA3D_DEVCAP_DXFMT_BC3_UNORM_SRGB = 205,
  336. SVGA3D_DEVCAP_DXFMT_BC4_TYPELESS = 206,
  337. SVGA3D_DEVCAP_DXFMT_ATI1 = 207,
  338. SVGA3D_DEVCAP_DXFMT_BC4_SNORM = 208,
  339. SVGA3D_DEVCAP_DXFMT_BC5_TYPELESS = 209,
  340. SVGA3D_DEVCAP_DXFMT_ATI2 = 210,
  341. SVGA3D_DEVCAP_DXFMT_BC5_SNORM = 211,
  342. SVGA3D_DEVCAP_DXFMT_R10G10B10_XR_BIAS_A2_UNORM = 212,
  343. SVGA3D_DEVCAP_DXFMT_B8G8R8A8_TYPELESS = 213,
  344. SVGA3D_DEVCAP_DXFMT_B8G8R8A8_UNORM_SRGB = 214,
  345. SVGA3D_DEVCAP_DXFMT_B8G8R8X8_TYPELESS = 215,
  346. SVGA3D_DEVCAP_DXFMT_B8G8R8X8_UNORM_SRGB = 216,
  347. SVGA3D_DEVCAP_DXFMT_Z_DF16 = 217,
  348. SVGA3D_DEVCAP_DXFMT_Z_DF24 = 218,
  349. SVGA3D_DEVCAP_DXFMT_Z_D24S8_INT = 219,
  350. SVGA3D_DEVCAP_DXFMT_YV12 = 220,
  351. SVGA3D_DEVCAP_DXFMT_R32G32B32A32_FLOAT = 221,
  352. SVGA3D_DEVCAP_DXFMT_R16G16B16A16_FLOAT = 222,
  353. SVGA3D_DEVCAP_DXFMT_R16G16B16A16_UNORM = 223,
  354. SVGA3D_DEVCAP_DXFMT_R32G32_FLOAT = 224,
  355. SVGA3D_DEVCAP_DXFMT_R10G10B10A2_UNORM = 225,
  356. SVGA3D_DEVCAP_DXFMT_R8G8B8A8_SNORM = 226,
  357. SVGA3D_DEVCAP_DXFMT_R16G16_FLOAT = 227,
  358. SVGA3D_DEVCAP_DXFMT_R16G16_UNORM = 228,
  359. SVGA3D_DEVCAP_DXFMT_R16G16_SNORM = 229,
  360. SVGA3D_DEVCAP_DXFMT_R32_FLOAT = 230,
  361. SVGA3D_DEVCAP_DXFMT_R8G8_SNORM = 231,
  362. SVGA3D_DEVCAP_DXFMT_R16_FLOAT = 232,
  363. SVGA3D_DEVCAP_DXFMT_D16_UNORM = 233,
  364. SVGA3D_DEVCAP_DXFMT_A8_UNORM = 234,
  365. SVGA3D_DEVCAP_DXFMT_BC1_UNORM = 235,
  366. SVGA3D_DEVCAP_DXFMT_BC2_UNORM = 236,
  367. SVGA3D_DEVCAP_DXFMT_BC3_UNORM = 237,
  368. SVGA3D_DEVCAP_DXFMT_B5G6R5_UNORM = 238,
  369. SVGA3D_DEVCAP_DXFMT_B5G5R5A1_UNORM = 239,
  370. SVGA3D_DEVCAP_DXFMT_B8G8R8A8_UNORM = 240,
  371. SVGA3D_DEVCAP_DXFMT_B8G8R8X8_UNORM = 241,
  372. SVGA3D_DEVCAP_DXFMT_BC4_UNORM = 242,
  373. SVGA3D_DEVCAP_DXFMT_BC5_UNORM = 243,
  374. SVGA3D_DEVCAP_MAX /* This must be the last index. */
  375. } SVGA3dDevCapIndex;
  376. /*
  377. * Bit definitions for DXFMT devcaps
  378. *
  379. *
  380. * SUPPORTED: Can the format be defined?
  381. * SHADER_SAMPLE: Can the format be sampled from a shader?
  382. * COLOR_RENDERTARGET: Can the format be a color render target?
  383. * DEPTH_RENDERTARGET: Can the format be a depth render target?
  384. * BLENDABLE: Is the format blendable?
  385. * MIPS: Does the format support mip levels?
  386. * ARRAY: Does the format support texture arrays?
  387. * VOLUME: Does the format support having volume?
  388. * MULTISAMPLE_2: Does the format support 2x multisample?
  389. * MULTISAMPLE_4: Does the format support 4x multisample?
  390. * MULTISAMPLE_8: Does the format support 8x multisample?
  391. */
  392. #define SVGA3D_DXFMT_SUPPORTED (1 << 0)
  393. #define SVGA3D_DXFMT_SHADER_SAMPLE (1 << 1)
  394. #define SVGA3D_DXFMT_COLOR_RENDERTARGET (1 << 2)
  395. #define SVGA3D_DXFMT_DEPTH_RENDERTARGET (1 << 3)
  396. #define SVGA3D_DXFMT_BLENDABLE (1 << 4)
  397. #define SVGA3D_DXFMT_MIPS (1 << 5)
  398. #define SVGA3D_DXFMT_ARRAY (1 << 6)
  399. #define SVGA3D_DXFMT_VOLUME (1 << 7)
  400. #define SVGA3D_DXFMT_DX_VERTEX_BUFFER (1 << 8)
  401. #define SVGADX_DXFMT_MULTISAMPLE_2 (1 << 9)
  402. #define SVGADX_DXFMT_MULTISAMPLE_4 (1 << 10)
  403. #define SVGADX_DXFMT_MULTISAMPLE_8 (1 << 11)
  404. #define SVGADX_DXFMT_MAX (1 << 12)
  405. /*
  406. * Convenience mask for any multisample capability.
  407. *
  408. * The multisample bits imply both load and render capability.
  409. */
  410. #define SVGA3D_DXFMT_MULTISAMPLE ( \
  411. SVGADX_DXFMT_MULTISAMPLE_2 | \
  412. SVGADX_DXFMT_MULTISAMPLE_4 | \
  413. SVGADX_DXFMT_MULTISAMPLE_8 )
  414. typedef union {
  415. Bool b;
  416. uint32 u;
  417. int32 i;
  418. float f;
  419. } SVGA3dDevCapResult;
  420. #endif /* _SVGA3D_DEVCAPS_H_ */