Clone of mesa.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

p_defines.h 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529
  1. /**************************************************************************
  2. *
  3. * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
  4. * All Rights Reserved.
  5. *
  6. * Permission is hereby granted, free of charge, to any person obtaining a
  7. * copy of this software and associated documentation files (the
  8. * "Software"), to deal in the Software without restriction, including
  9. * without limitation the rights to use, copy, modify, merge, publish,
  10. * distribute, sub license, and/or sell copies of the Software, and to
  11. * permit persons to whom the Software is furnished to do so, subject to
  12. * the following conditions:
  13. *
  14. * The above copyright notice and this permission notice (including the
  15. * next paragraph) shall be included in all copies or substantial portions
  16. * of the Software.
  17. *
  18. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  19. * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  20. * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
  21. * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
  22. * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
  23. * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
  24. * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  25. *
  26. **************************************************************************/
  27. #ifndef PIPE_DEFINES_H
  28. #define PIPE_DEFINES_H
  29. #include "p_compiler.h"
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33. /**
  34. * Gallium error codes.
  35. *
  36. * - A zero value always means success.
  37. * - A negative value always means failure.
  38. * - The meaning of a positive value is function dependent.
  39. */
  40. enum pipe_error {
  41. PIPE_OK = 0,
  42. PIPE_ERROR = -1, /**< Generic error */
  43. PIPE_ERROR_BAD_INPUT = -2,
  44. PIPE_ERROR_OUT_OF_MEMORY = -3,
  45. PIPE_ERROR_RETRY = -4
  46. /* TODO */
  47. };
  48. #define PIPE_BLENDFACTOR_ONE 0x1
  49. #define PIPE_BLENDFACTOR_SRC_COLOR 0x2
  50. #define PIPE_BLENDFACTOR_SRC_ALPHA 0x3
  51. #define PIPE_BLENDFACTOR_DST_ALPHA 0x4
  52. #define PIPE_BLENDFACTOR_DST_COLOR 0x5
  53. #define PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE 0x6
  54. #define PIPE_BLENDFACTOR_CONST_COLOR 0x7
  55. #define PIPE_BLENDFACTOR_CONST_ALPHA 0x8
  56. #define PIPE_BLENDFACTOR_SRC1_COLOR 0x9
  57. #define PIPE_BLENDFACTOR_SRC1_ALPHA 0x0A
  58. #define PIPE_BLENDFACTOR_ZERO 0x11
  59. #define PIPE_BLENDFACTOR_INV_SRC_COLOR 0x12
  60. #define PIPE_BLENDFACTOR_INV_SRC_ALPHA 0x13
  61. #define PIPE_BLENDFACTOR_INV_DST_ALPHA 0x14
  62. #define PIPE_BLENDFACTOR_INV_DST_COLOR 0x15
  63. #define PIPE_BLENDFACTOR_INV_CONST_COLOR 0x17
  64. #define PIPE_BLENDFACTOR_INV_CONST_ALPHA 0x18
  65. #define PIPE_BLENDFACTOR_INV_SRC1_COLOR 0x19
  66. #define PIPE_BLENDFACTOR_INV_SRC1_ALPHA 0x1A
  67. #define PIPE_BLEND_ADD 0
  68. #define PIPE_BLEND_SUBTRACT 1
  69. #define PIPE_BLEND_REVERSE_SUBTRACT 2
  70. #define PIPE_BLEND_MIN 3
  71. #define PIPE_BLEND_MAX 4
  72. #define PIPE_LOGICOP_CLEAR 0
  73. #define PIPE_LOGICOP_NOR 1
  74. #define PIPE_LOGICOP_AND_INVERTED 2
  75. #define PIPE_LOGICOP_COPY_INVERTED 3
  76. #define PIPE_LOGICOP_AND_REVERSE 4
  77. #define PIPE_LOGICOP_INVERT 5
  78. #define PIPE_LOGICOP_XOR 6
  79. #define PIPE_LOGICOP_NAND 7
  80. #define PIPE_LOGICOP_AND 8
  81. #define PIPE_LOGICOP_EQUIV 9
  82. #define PIPE_LOGICOP_NOOP 10
  83. #define PIPE_LOGICOP_OR_INVERTED 11
  84. #define PIPE_LOGICOP_COPY 12
  85. #define PIPE_LOGICOP_OR_REVERSE 13
  86. #define PIPE_LOGICOP_OR 14
  87. #define PIPE_LOGICOP_SET 15
  88. #define PIPE_MASK_R 0x1
  89. #define PIPE_MASK_G 0x2
  90. #define PIPE_MASK_B 0x4
  91. #define PIPE_MASK_A 0x8
  92. #define PIPE_MASK_RGBA 0xf
  93. #define PIPE_MASK_Z 0x10
  94. #define PIPE_MASK_S 0x20
  95. #define PIPE_MASK_ZS 0x30
  96. /**
  97. * Inequality functions. Used for depth test, stencil compare, alpha
  98. * test, shadow compare, etc.
  99. */
  100. #define PIPE_FUNC_NEVER 0
  101. #define PIPE_FUNC_LESS 1
  102. #define PIPE_FUNC_EQUAL 2
  103. #define PIPE_FUNC_LEQUAL 3
  104. #define PIPE_FUNC_GREATER 4
  105. #define PIPE_FUNC_NOTEQUAL 5
  106. #define PIPE_FUNC_GEQUAL 6
  107. #define PIPE_FUNC_ALWAYS 7
  108. /** Polygon fill mode */
  109. #define PIPE_POLYGON_MODE_FILL 0
  110. #define PIPE_POLYGON_MODE_LINE 1
  111. #define PIPE_POLYGON_MODE_POINT 2
  112. /** Polygon face specification, eg for culling */
  113. #define PIPE_FACE_NONE 0
  114. #define PIPE_FACE_FRONT 1
  115. #define PIPE_FACE_BACK 2
  116. #define PIPE_FACE_FRONT_AND_BACK (PIPE_FACE_FRONT | PIPE_FACE_BACK)
  117. /** Stencil ops */
  118. #define PIPE_STENCIL_OP_KEEP 0
  119. #define PIPE_STENCIL_OP_ZERO 1
  120. #define PIPE_STENCIL_OP_REPLACE 2
  121. #define PIPE_STENCIL_OP_INCR 3
  122. #define PIPE_STENCIL_OP_DECR 4
  123. #define PIPE_STENCIL_OP_INCR_WRAP 5
  124. #define PIPE_STENCIL_OP_DECR_WRAP 6
  125. #define PIPE_STENCIL_OP_INVERT 7
  126. /** Texture types.
  127. * See the documentation for info on PIPE_TEXTURE_RECT vs PIPE_TEXTURE_2D */
  128. enum pipe_texture_target {
  129. PIPE_BUFFER = 0,
  130. PIPE_TEXTURE_1D = 1,
  131. PIPE_TEXTURE_2D = 2,
  132. PIPE_TEXTURE_3D = 3,
  133. PIPE_TEXTURE_CUBE = 4,
  134. PIPE_TEXTURE_RECT = 5,
  135. PIPE_TEXTURE_1D_ARRAY = 6,
  136. PIPE_TEXTURE_2D_ARRAY = 7,
  137. PIPE_MAX_TEXTURE_TYPES
  138. };
  139. #define PIPE_TEX_FACE_POS_X 0
  140. #define PIPE_TEX_FACE_NEG_X 1
  141. #define PIPE_TEX_FACE_POS_Y 2
  142. #define PIPE_TEX_FACE_NEG_Y 3
  143. #define PIPE_TEX_FACE_POS_Z 4
  144. #define PIPE_TEX_FACE_NEG_Z 5
  145. #define PIPE_TEX_FACE_MAX 6
  146. #define PIPE_TEX_WRAP_REPEAT 0
  147. #define PIPE_TEX_WRAP_CLAMP 1
  148. #define PIPE_TEX_WRAP_CLAMP_TO_EDGE 2
  149. #define PIPE_TEX_WRAP_CLAMP_TO_BORDER 3
  150. #define PIPE_TEX_WRAP_MIRROR_REPEAT 4
  151. #define PIPE_TEX_WRAP_MIRROR_CLAMP 5
  152. #define PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE 6
  153. #define PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER 7
  154. /* Between mipmaps, ie mipfilter
  155. */
  156. #define PIPE_TEX_MIPFILTER_NEAREST 0
  157. #define PIPE_TEX_MIPFILTER_LINEAR 1
  158. #define PIPE_TEX_MIPFILTER_NONE 2
  159. /* Within a mipmap, ie min/mag filter
  160. */
  161. #define PIPE_TEX_FILTER_NEAREST 0
  162. #define PIPE_TEX_FILTER_LINEAR 1
  163. #define PIPE_TEX_COMPARE_NONE 0
  164. #define PIPE_TEX_COMPARE_R_TO_TEXTURE 1
  165. /**
  166. * Clear buffer bits
  167. */
  168. /** All color buffers currently bound */
  169. #define PIPE_CLEAR_COLOR (1 << 0)
  170. #define PIPE_CLEAR_DEPTH (1 << 1)
  171. #define PIPE_CLEAR_STENCIL (1 << 2)
  172. /** Depth/stencil combined */
  173. #define PIPE_CLEAR_DEPTHSTENCIL (PIPE_CLEAR_DEPTH | PIPE_CLEAR_STENCIL)
  174. /**
  175. * Transfer object usage flags
  176. */
  177. enum pipe_transfer_usage {
  178. /**
  179. * Resource contents read back (or accessed directly) at transfer
  180. * create time.
  181. */
  182. PIPE_TRANSFER_READ = (1 << 0),
  183. /**
  184. * Resource contents will be written back at transfer_destroy
  185. * time (or modified as a result of being accessed directly).
  186. */
  187. PIPE_TRANSFER_WRITE = (1 << 1),
  188. /**
  189. * Read/modify/write
  190. */
  191. PIPE_TRANSFER_READ_WRITE = PIPE_TRANSFER_READ | PIPE_TRANSFER_WRITE,
  192. /**
  193. * The transfer should map the texture storage directly. The driver may
  194. * return NULL if that isn't possible, and the state tracker needs to cope
  195. * with that and use an alternative path without this flag.
  196. *
  197. * E.g. the state tracker could have a simpler path which maps textures and
  198. * does read/modify/write cycles on them directly, and a more complicated
  199. * path which uses minimal read and write transfers.
  200. */
  201. PIPE_TRANSFER_MAP_DIRECTLY = (1 << 2),
  202. /**
  203. * Discards the memory within the mapped region.
  204. *
  205. * It should not be used with PIPE_TRANSFER_READ.
  206. *
  207. * See also:
  208. * - OpenGL's ARB_map_buffer_range extension, MAP_INVALIDATE_RANGE_BIT flag.
  209. */
  210. PIPE_TRANSFER_DISCARD = (1 << 8), /* DEPRECATED */
  211. PIPE_TRANSFER_DISCARD_RANGE = (1 << 8),
  212. /**
  213. * Fail if the resource cannot be mapped immediately.
  214. *
  215. * See also:
  216. * - Direct3D's D3DLOCK_DONOTWAIT flag.
  217. * - Mesa3D's MESA_MAP_NOWAIT_BIT flag.
  218. * - WDDM's D3DDDICB_LOCKFLAGS.DonotWait flag.
  219. */
  220. PIPE_TRANSFER_DONTBLOCK = (1 << 9),
  221. /**
  222. * Do not attempt to synchronize pending operations on the resource when mapping.
  223. *
  224. * It should not be used with PIPE_TRANSFER_READ.
  225. *
  226. * See also:
  227. * - OpenGL's ARB_map_buffer_range extension, MAP_UNSYNCHRONIZED_BIT flag.
  228. * - Direct3D's D3DLOCK_NOOVERWRITE flag.
  229. * - WDDM's D3DDDICB_LOCKFLAGS.IgnoreSync flag.
  230. */
  231. PIPE_TRANSFER_UNSYNCHRONIZED = (1 << 10),
  232. PIPE_TRANSFER_NOOVERWRITE = (1 << 10), /* are these really the same?? */
  233. /**
  234. * Written ranges will be notified later with
  235. * pipe_context::transfer_flush_region.
  236. *
  237. * It should not be used with PIPE_TRANSFER_READ.
  238. *
  239. * See also:
  240. * - pipe_context::transfer_flush_region
  241. * - OpenGL's ARB_map_buffer_range extension, MAP_FLUSH_EXPLICIT_BIT flag.
  242. */
  243. PIPE_TRANSFER_FLUSH_EXPLICIT = (1 << 11),
  244. /**
  245. * Discards all memory backing the resource.
  246. *
  247. * It should not be used with PIPE_TRANSFER_READ.
  248. *
  249. * This is equivalent to:
  250. * - OpenGL's ARB_map_buffer_range extension, MAP_INVALIDATE_BUFFER_BIT
  251. * - BufferData(NULL) on a GL buffer
  252. * - Direct3D's D3DLOCK_DISCARD flag.
  253. * - WDDM's D3DDDICB_LOCKFLAGS.Discard flag.
  254. * - D3D10 DDI's D3D10_DDI_MAP_WRITE_DISCARD flag
  255. * - D3D10's D3D10_MAP_WRITE_DISCARD flag.
  256. */
  257. PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE = (1 << 12)
  258. };
  259. /*
  260. * Resource binding flags -- state tracker must specify in advance all
  261. * the ways a resource might be used.
  262. */
  263. #define PIPE_BIND_DEPTH_STENCIL (1 << 0) /* create_surface */
  264. #define PIPE_BIND_RENDER_TARGET (1 << 1) /* create_surface */
  265. #define PIPE_BIND_SAMPLER_VIEW (1 << 2) /* create_sampler_view */
  266. #define PIPE_BIND_VERTEX_BUFFER (1 << 3) /* set_vertex_buffers */
  267. #define PIPE_BIND_INDEX_BUFFER (1 << 4) /* draw_elements */
  268. #define PIPE_BIND_CONSTANT_BUFFER (1 << 5) /* set_constant_buffer */
  269. #define PIPE_BIND_DISPLAY_TARGET (1 << 8) /* flush_front_buffer */
  270. #define PIPE_BIND_TRANSFER_WRITE (1 << 9) /* get_transfer */
  271. #define PIPE_BIND_TRANSFER_READ (1 << 10) /* get_transfer */
  272. #define PIPE_BIND_STREAM_OUTPUT (1 << 11) /* set_stream_output_buffers */
  273. #define PIPE_BIND_CURSOR (1 << 16) /* mouse cursor */
  274. #define PIPE_BIND_CUSTOM (1 << 17) /* state-tracker/winsys usages */
  275. /* The first two flags above were previously part of the amorphous
  276. * TEXTURE_USAGE, most of which are now descriptions of the ways a
  277. * particular texture can be bound to the gallium pipeline. The two flags
  278. * below do not fit within that and probably need to be migrated to some
  279. * other place.
  280. *
  281. * It seems like scanout is used by the Xorg state tracker to ask for
  282. * a texture suitable for actual scanout (hence the name), which
  283. * implies extra layout constraints on some hardware. It may also
  284. * have some special meaning regarding mouse cursor images.
  285. *
  286. * The shared flag is quite underspecified, but certainly isn't a
  287. * binding flag - it seems more like a message to the winsys to create
  288. * a shareable allocation.
  289. */
  290. #define PIPE_BIND_SCANOUT (1 << 14) /* */
  291. #define PIPE_BIND_SHARED (1 << 15) /* get_texture_handle ??? */
  292. /* Flags for the driver about resource behaviour:
  293. */
  294. #define PIPE_RESOURCE_FLAG_GEN_MIPS (1 << 0) /* Driver performs autogen mips */
  295. #define PIPE_RESOURCE_FLAG_DRV_PRIV (1 << 16) /* driver/winsys private */
  296. #define PIPE_RESOURCE_FLAG_ST_PRIV (1 << 24) /* state-tracker/winsys private */
  297. /* Hint about the expected lifecycle of a resource.
  298. */
  299. #define PIPE_USAGE_DEFAULT 0 /* many uploads, draws intermixed */
  300. #define PIPE_USAGE_DYNAMIC 1 /* many uploads, draws intermixed */
  301. #define PIPE_USAGE_STATIC 2 /* same as immutable?? */
  302. #define PIPE_USAGE_IMMUTABLE 3 /* no change after first upload */
  303. #define PIPE_USAGE_STREAM 4 /* upload, draw, upload, draw */
  304. #define PIPE_USAGE_STAGING 5 /* supports data transfers from the GPU to the CPU */
  305. /**
  306. * Shaders
  307. */
  308. #define PIPE_SHADER_VERTEX 0
  309. #define PIPE_SHADER_FRAGMENT 1
  310. #define PIPE_SHADER_GEOMETRY 2
  311. #define PIPE_SHADER_TYPES 3
  312. /**
  313. * Primitive types:
  314. */
  315. #define PIPE_PRIM_POINTS 0
  316. #define PIPE_PRIM_LINES 1
  317. #define PIPE_PRIM_LINE_LOOP 2
  318. #define PIPE_PRIM_LINE_STRIP 3
  319. #define PIPE_PRIM_TRIANGLES 4
  320. #define PIPE_PRIM_TRIANGLE_STRIP 5
  321. #define PIPE_PRIM_TRIANGLE_FAN 6
  322. #define PIPE_PRIM_QUADS 7
  323. #define PIPE_PRIM_QUAD_STRIP 8
  324. #define PIPE_PRIM_POLYGON 9
  325. #define PIPE_PRIM_LINES_ADJACENCY 10
  326. #define PIPE_PRIM_LINE_STRIP_ADJACENCY 11
  327. #define PIPE_PRIM_TRIANGLES_ADJACENCY 12
  328. #define PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY 13
  329. #define PIPE_PRIM_MAX 14
  330. /**
  331. * Query object types
  332. */
  333. #define PIPE_QUERY_OCCLUSION_COUNTER 0
  334. #define PIPE_QUERY_PRIMITIVES_GENERATED 1
  335. #define PIPE_QUERY_PRIMITIVES_EMITTED 2
  336. #define PIPE_QUERY_TIME_ELAPSED 3
  337. #define PIPE_QUERY_SO_STATISTICS 5
  338. #define PIPE_QUERY_GPU_FINISHED 6
  339. #define PIPE_QUERY_TIMESTAMP_DISJOINT 7
  340. #define PIPE_QUERY_OCCLUSION_PREDICATE 8
  341. #define PIPE_QUERY_TYPES 9
  342. /**
  343. * Conditional rendering modes
  344. */
  345. #define PIPE_RENDER_COND_WAIT 0
  346. #define PIPE_RENDER_COND_NO_WAIT 1
  347. #define PIPE_RENDER_COND_BY_REGION_WAIT 2
  348. #define PIPE_RENDER_COND_BY_REGION_NO_WAIT 3
  349. /**
  350. * Point sprite coord modes
  351. */
  352. #define PIPE_SPRITE_COORD_UPPER_LEFT 0
  353. #define PIPE_SPRITE_COORD_LOWER_LEFT 1
  354. /**
  355. * Texture swizzles
  356. */
  357. #define PIPE_SWIZZLE_RED 0
  358. #define PIPE_SWIZZLE_GREEN 1
  359. #define PIPE_SWIZZLE_BLUE 2
  360. #define PIPE_SWIZZLE_ALPHA 3
  361. #define PIPE_SWIZZLE_ZERO 4
  362. #define PIPE_SWIZZLE_ONE 5
  363. #define PIPE_TIMEOUT_INFINITE 0xffffffffffffffffull
  364. /**
  365. * Implementation capabilities/limits which are queried through
  366. * pipe_screen::get_param() and pipe_screen::get_paramf().
  367. */
  368. enum pipe_cap {
  369. PIPE_CAP_NPOT_TEXTURES = 1,
  370. PIPE_CAP_TWO_SIDED_STENCIL = 2,
  371. PIPE_CAP_GLSL = 3, /* XXX need something better */
  372. PIPE_CAP_DUAL_SOURCE_BLEND = 4,
  373. PIPE_CAP_ANISOTROPIC_FILTER = 5,
  374. PIPE_CAP_POINT_SPRITE = 6,
  375. PIPE_CAP_MAX_RENDER_TARGETS = 7,
  376. PIPE_CAP_OCCLUSION_QUERY = 8,
  377. PIPE_CAP_TIMER_QUERY = 9,
  378. PIPE_CAP_TEXTURE_SHADOW_MAP = 10,
  379. PIPE_CAP_TEXTURE_SWIZZLE = 11,
  380. PIPE_CAP_MAX_TEXTURE_2D_LEVELS = 12,
  381. PIPE_CAP_MAX_TEXTURE_3D_LEVELS = 13,
  382. PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS = 14,
  383. PIPE_CAP_MAX_LINE_WIDTH = 15,
  384. PIPE_CAP_MAX_LINE_WIDTH_AA = 16,
  385. PIPE_CAP_MAX_POINT_WIDTH = 17,
  386. PIPE_CAP_MAX_POINT_WIDTH_AA = 18,
  387. PIPE_CAP_MAX_TEXTURE_ANISOTROPY = 19,
  388. PIPE_CAP_MAX_TEXTURE_LOD_BIAS = 20,
  389. PIPE_CAP_GUARD_BAND_LEFT = 21, /*< float */
  390. PIPE_CAP_GUARD_BAND_TOP = 22, /*< float */
  391. PIPE_CAP_GUARD_BAND_RIGHT = 23, /*< float */
  392. PIPE_CAP_GUARD_BAND_BOTTOM = 24, /*< float */
  393. PIPE_CAP_TEXTURE_MIRROR_CLAMP = 25,
  394. PIPE_CAP_BLEND_EQUATION_SEPARATE = 28,
  395. PIPE_CAP_SM3 = 29, /*< Shader Model, supported */
  396. PIPE_CAP_STREAM_OUTPUT = 30,
  397. PIPE_CAP_PRIMITIVE_RESTART = 31,
  398. /** Maximum texture image units accessible from vertex and fragment shaders
  399. * combined */
  400. PIPE_CAP_MAX_COMBINED_SAMPLERS = 32,
  401. /** blend enables and write masks per rendertarget */
  402. PIPE_CAP_INDEP_BLEND_ENABLE = 33,
  403. /** different blend funcs per rendertarget */
  404. PIPE_CAP_INDEP_BLEND_FUNC = 34,
  405. PIPE_CAP_DEPTHSTENCIL_CLEAR_SEPARATE = 35,
  406. PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS = 36,
  407. PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT = 37,
  408. PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT = 38,
  409. PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER = 39,
  410. PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER = 40,
  411. PIPE_CAP_DEPTH_CLAMP = 41,
  412. PIPE_CAP_SHADER_STENCIL_EXPORT = 42,
  413. PIPE_CAP_TGSI_INSTANCEID = 43,
  414. PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR = 44,
  415. PIPE_CAP_FRAGMENT_COLOR_CLAMP_CONTROL = 45,
  416. PIPE_CAP_MIXED_COLORBUFFER_FORMATS = 46,
  417. PIPE_CAP_SEAMLESS_CUBE_MAP = 47,
  418. PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE = 48,
  419. PIPE_CAP_SCALED_RESOLVE = 49,
  420. PIPE_CAP_MIN_TEXEL_OFFSET = 50,
  421. PIPE_CAP_MAX_TEXEL_OFFSET = 51,
  422. PIPE_CAP_CONDITIONAL_RENDER = 52,
  423. PIPE_CAP_TEXTURE_BARRIER = 53
  424. };
  425. /* Shader caps not specific to any single stage */
  426. enum pipe_shader_cap
  427. {
  428. PIPE_SHADER_CAP_MAX_INSTRUCTIONS = 0, /* if 0, it means the stage is unsupported */
  429. PIPE_SHADER_CAP_MAX_ALU_INSTRUCTIONS = 1,
  430. PIPE_SHADER_CAP_MAX_TEX_INSTRUCTIONS = 2,
  431. PIPE_SHADER_CAP_MAX_TEX_INDIRECTIONS = 3,
  432. PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH = 4,
  433. PIPE_SHADER_CAP_MAX_INPUTS = 5,
  434. PIPE_SHADER_CAP_MAX_CONSTS = 6,
  435. PIPE_SHADER_CAP_MAX_CONST_BUFFERS = 7,
  436. PIPE_SHADER_CAP_MAX_TEMPS = 8,
  437. PIPE_SHADER_CAP_MAX_ADDRS = 9,
  438. PIPE_SHADER_CAP_MAX_PREDS = 10,
  439. /* boolean caps */
  440. PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED = 11,
  441. PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR = 12,
  442. PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR = 13,
  443. PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR = 14,
  444. PIPE_SHADER_CAP_INDIRECT_CONST_ADDR = 15,
  445. PIPE_SHADER_CAP_SUBROUTINES = 16, /* BGNSUB, ENDSUB, CAL, RET */
  446. PIPE_SHADER_CAP_INTEGERS = 17,
  447. PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS = 18
  448. };
  449. /**
  450. * Composite query types
  451. */
  452. struct pipe_query_data_so_statistics
  453. {
  454. uint64_t num_primitives_written;
  455. uint64_t primitives_storage_needed;
  456. };
  457. struct pipe_query_data_timestamp_disjoint
  458. {
  459. uint64_t frequency;
  460. boolean disjoint;
  461. };
  462. union pipe_color_union
  463. {
  464. float f[4];
  465. int i[4];
  466. unsigned int ui[4];
  467. };
  468. #ifdef __cplusplus
  469. }
  470. #endif
  471. #endif