Brian | 7234550 | 2007-05-24 16:49:27 -0600 | [diff] [blame] | 1 | /************************************************************************** |
| 2 | * |
José Fonseca | 8771285 | 2014-01-17 16:27:50 +0000 | [diff] [blame] | 3 | * Copyright 2007 VMware, Inc. |
Brian | 7234550 | 2007-05-24 16:49:27 -0600 | [diff] [blame] | 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. |
José Fonseca | 8771285 | 2014-01-17 16:27:50 +0000 | [diff] [blame] | 21 | * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR |
Brian | 7234550 | 2007-05-24 16:49:27 -0600 | [diff] [blame] | 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 | |
Keith Whitwell | 943964a | 2007-06-14 18:23:43 +0100 | [diff] [blame] | 28 | #ifndef PIPE_DEFINES_H |
| 29 | #define PIPE_DEFINES_H |
Keith Whitwell | 8e4a95a | 2007-05-24 10:41:34 +0100 | [diff] [blame] | 30 | |
Vinson Lee | 121b6d6 | 2010-08-26 01:30:07 -0700 | [diff] [blame] | 31 | #include "p_compiler.h" |
michal | 26df9d1 | 2007-10-26 17:17:52 +0100 | [diff] [blame] | 32 | |
José Fonseca | e4e3008 | 2008-02-25 20:05:41 +0900 | [diff] [blame] | 33 | #ifdef __cplusplus |
| 34 | extern "C" { |
| 35 | #endif |
| 36 | |
José Fonseca | 3a49497 | 2009-10-25 21:11:54 +0000 | [diff] [blame] | 37 | /** |
| 38 | * Gallium error codes. |
| 39 | * |
| 40 | * - A zero value always means success. |
| 41 | * - A negative value always means failure. |
| 42 | * - The meaning of a positive value is function dependent. |
| 43 | */ |
Brian Paul | 36ea81d | 2015-02-25 17:04:05 -0700 | [diff] [blame] | 44 | enum pipe_error |
| 45 | { |
José Fonseca | 3a49497 | 2009-10-25 21:11:54 +0000 | [diff] [blame] | 46 | PIPE_OK = 0, |
| 47 | PIPE_ERROR = -1, /**< Generic error */ |
| 48 | PIPE_ERROR_BAD_INPUT = -2, |
| 49 | PIPE_ERROR_OUT_OF_MEMORY = -3, |
| 50 | PIPE_ERROR_RETRY = -4 |
| 51 | /* TODO */ |
| 52 | }; |
| 53 | |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 54 | enum pipe_blendfactor { |
| 55 | PIPE_BLENDFACTOR_ONE = 1, |
| 56 | PIPE_BLENDFACTOR_SRC_COLOR, |
| 57 | PIPE_BLENDFACTOR_SRC_ALPHA, |
| 58 | PIPE_BLENDFACTOR_DST_ALPHA, |
| 59 | PIPE_BLENDFACTOR_DST_COLOR, |
| 60 | PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE, |
| 61 | PIPE_BLENDFACTOR_CONST_COLOR, |
| 62 | PIPE_BLENDFACTOR_CONST_ALPHA, |
| 63 | PIPE_BLENDFACTOR_SRC1_COLOR, |
| 64 | PIPE_BLENDFACTOR_SRC1_ALPHA, |
José Fonseca | 3a49497 | 2009-10-25 21:11:54 +0000 | [diff] [blame] | 65 | |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 66 | PIPE_BLENDFACTOR_ZERO = 0x11, |
| 67 | PIPE_BLENDFACTOR_INV_SRC_COLOR, |
| 68 | PIPE_BLENDFACTOR_INV_SRC_ALPHA, |
| 69 | PIPE_BLENDFACTOR_INV_DST_ALPHA, |
| 70 | PIPE_BLENDFACTOR_INV_DST_COLOR, |
Keith Whitwell | 8e4a95a | 2007-05-24 10:41:34 +0100 | [diff] [blame] | 71 | |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 72 | PIPE_BLENDFACTOR_INV_CONST_COLOR = 0x17, |
| 73 | PIPE_BLENDFACTOR_INV_CONST_ALPHA, |
| 74 | PIPE_BLENDFACTOR_INV_SRC1_COLOR, |
| 75 | PIPE_BLENDFACTOR_INV_SRC1_ALPHA, |
| 76 | }; |
Keith Whitwell | 8e4a95a | 2007-05-24 10:41:34 +0100 | [diff] [blame] | 77 | |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 78 | enum pipe_blend_func { |
| 79 | PIPE_BLEND_ADD, |
| 80 | PIPE_BLEND_SUBTRACT, |
| 81 | PIPE_BLEND_REVERSE_SUBTRACT, |
| 82 | PIPE_BLEND_MIN, |
| 83 | PIPE_BLEND_MAX, |
| 84 | }; |
| 85 | |
| 86 | enum pipe_logicop { |
| 87 | PIPE_LOGICOP_CLEAR, |
| 88 | PIPE_LOGICOP_NOR, |
| 89 | PIPE_LOGICOP_AND_INVERTED, |
| 90 | PIPE_LOGICOP_COPY_INVERTED, |
| 91 | PIPE_LOGICOP_AND_REVERSE, |
| 92 | PIPE_LOGICOP_INVERT, |
| 93 | PIPE_LOGICOP_XOR, |
| 94 | PIPE_LOGICOP_NAND, |
| 95 | PIPE_LOGICOP_AND, |
| 96 | PIPE_LOGICOP_EQUIV, |
| 97 | PIPE_LOGICOP_NOOP, |
| 98 | PIPE_LOGICOP_OR_INVERTED, |
| 99 | PIPE_LOGICOP_COPY, |
| 100 | PIPE_LOGICOP_OR_REVERSE, |
| 101 | PIPE_LOGICOP_OR, |
| 102 | PIPE_LOGICOP_SET, |
| 103 | }; |
Keith Whitwell | 8e4a95a | 2007-05-24 10:41:34 +0100 | [diff] [blame] | 104 | |
Brian | 86352ff | 2007-07-12 12:20:14 -0600 | [diff] [blame] | 105 | #define PIPE_MASK_R 0x1 |
| 106 | #define PIPE_MASK_G 0x2 |
| 107 | #define PIPE_MASK_B 0x4 |
| 108 | #define PIPE_MASK_A 0x8 |
Brian | 5936b439 | 2007-08-02 10:29:04 -0600 | [diff] [blame] | 109 | #define PIPE_MASK_RGBA 0xf |
Christoph Bumiller | 94822c6 | 2011-08-03 15:43:16 +0200 | [diff] [blame] | 110 | #define PIPE_MASK_Z 0x10 |
| 111 | #define PIPE_MASK_S 0x20 |
| 112 | #define PIPE_MASK_ZS 0x30 |
Marek Olšák | 8842678 | 2012-07-27 21:31:59 +0200 | [diff] [blame] | 113 | #define PIPE_MASK_RGBAZS (PIPE_MASK_RGBA|PIPE_MASK_ZS) |
Brian | 5936b439 | 2007-08-02 10:29:04 -0600 | [diff] [blame] | 114 | |
Brian | 86352ff | 2007-07-12 12:20:14 -0600 | [diff] [blame] | 115 | |
Brian | efe6c50 | 2007-06-18 17:53:09 -0600 | [diff] [blame] | 116 | /** |
| 117 | * Inequality functions. Used for depth test, stencil compare, alpha |
| 118 | * test, shadow compare, etc. |
| 119 | */ |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 120 | enum pipe_compare_func { |
| 121 | PIPE_FUNC_NEVER, |
| 122 | PIPE_FUNC_LESS, |
| 123 | PIPE_FUNC_EQUAL, |
| 124 | PIPE_FUNC_LEQUAL, |
| 125 | PIPE_FUNC_GREATER, |
| 126 | PIPE_FUNC_NOTEQUAL, |
| 127 | PIPE_FUNC_GEQUAL, |
| 128 | PIPE_FUNC_ALWAYS, |
| 129 | }; |
Brian | 008fb50 | 2007-05-24 17:37:36 -0600 | [diff] [blame] | 130 | |
Brian | 2137e30 | 2007-06-19 08:43:05 -0600 | [diff] [blame] | 131 | /** Polygon fill mode */ |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 132 | enum { |
| 133 | PIPE_POLYGON_MODE_FILL, |
| 134 | PIPE_POLYGON_MODE_LINE, |
| 135 | PIPE_POLYGON_MODE_POINT, |
Lyude | 1cc7352 | 2017-03-07 20:06:39 -0500 | [diff] [blame] | 136 | PIPE_POLYGON_MODE_FILL_RECTANGLE, |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 137 | }; |
Brian | 2137e30 | 2007-06-19 08:43:05 -0600 | [diff] [blame] | 138 | |
Keith Whitwell | 0bd1cbc | 2010-05-14 13:04:42 +0100 | [diff] [blame] | 139 | /** Polygon face specification, eg for culling */ |
| 140 | #define PIPE_FACE_NONE 0 |
| 141 | #define PIPE_FACE_FRONT 1 |
| 142 | #define PIPE_FACE_BACK 2 |
| 143 | #define PIPE_FACE_FRONT_AND_BACK (PIPE_FACE_FRONT | PIPE_FACE_BACK) |
Brian | 2137e30 | 2007-06-19 08:43:05 -0600 | [diff] [blame] | 144 | |
Brian | f79c225 | 2007-06-22 12:47:04 -0600 | [diff] [blame] | 145 | /** Stencil ops */ |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 146 | enum pipe_stencil_op { |
| 147 | PIPE_STENCIL_OP_KEEP, |
| 148 | PIPE_STENCIL_OP_ZERO, |
| 149 | PIPE_STENCIL_OP_REPLACE, |
| 150 | PIPE_STENCIL_OP_INCR, |
| 151 | PIPE_STENCIL_OP_DECR, |
| 152 | PIPE_STENCIL_OP_INCR_WRAP, |
| 153 | PIPE_STENCIL_OP_DECR_WRAP, |
| 154 | PIPE_STENCIL_OP_INVERT, |
| 155 | }; |
Brian | 008fb50 | 2007-05-24 17:37:36 -0600 | [diff] [blame] | 156 | |
Luca Barbieri | 72b3e3f | 2010-04-15 09:02:29 +0200 | [diff] [blame] | 157 | /** Texture types. |
Brian Paul | 36ea81d | 2015-02-25 17:04:05 -0700 | [diff] [blame] | 158 | * See the documentation for info on PIPE_TEXTURE_RECT vs PIPE_TEXTURE_2D |
| 159 | */ |
| 160 | enum pipe_texture_target |
| 161 | { |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 162 | PIPE_BUFFER, |
| 163 | PIPE_TEXTURE_1D, |
| 164 | PIPE_TEXTURE_2D, |
| 165 | PIPE_TEXTURE_3D, |
| 166 | PIPE_TEXTURE_CUBE, |
| 167 | PIPE_TEXTURE_RECT, |
| 168 | PIPE_TEXTURE_1D_ARRAY, |
| 169 | PIPE_TEXTURE_2D_ARRAY, |
| 170 | PIPE_TEXTURE_CUBE_ARRAY, |
| 171 | PIPE_MAX_TEXTURE_TYPES, |
Michel Dänzer | 1c5f27a | 2008-01-04 17:06:55 +0100 | [diff] [blame] | 172 | }; |
Brian | eb147ed | 2007-08-08 10:26:16 -0600 | [diff] [blame] | 173 | |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 174 | enum pipe_tex_face { |
| 175 | PIPE_TEX_FACE_POS_X, |
| 176 | PIPE_TEX_FACE_NEG_X, |
| 177 | PIPE_TEX_FACE_POS_Y, |
| 178 | PIPE_TEX_FACE_NEG_Y, |
| 179 | PIPE_TEX_FACE_POS_Z, |
| 180 | PIPE_TEX_FACE_NEG_Z, |
| 181 | PIPE_TEX_FACE_MAX, |
| 182 | }; |
Brian | eb147ed | 2007-08-08 10:26:16 -0600 | [diff] [blame] | 183 | |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 184 | enum pipe_tex_wrap { |
| 185 | PIPE_TEX_WRAP_REPEAT, |
| 186 | PIPE_TEX_WRAP_CLAMP, |
| 187 | PIPE_TEX_WRAP_CLAMP_TO_EDGE, |
| 188 | PIPE_TEX_WRAP_CLAMP_TO_BORDER, |
| 189 | PIPE_TEX_WRAP_MIRROR_REPEAT, |
| 190 | PIPE_TEX_WRAP_MIRROR_CLAMP, |
| 191 | PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE, |
| 192 | PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER, |
| 193 | }; |
Brian | 02a4754 | 2007-05-30 16:26:55 -0600 | [diff] [blame] | 194 | |
Brian Paul | 36ea81d | 2015-02-25 17:04:05 -0700 | [diff] [blame] | 195 | /** Between mipmaps, ie mipfilter */ |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 196 | enum pipe_tex_mipfilter { |
| 197 | PIPE_TEX_MIPFILTER_NEAREST, |
| 198 | PIPE_TEX_MIPFILTER_LINEAR, |
| 199 | PIPE_TEX_MIPFILTER_NONE, |
| 200 | }; |
Keith Whitwell | 78b1a29 | 2007-08-09 19:09:19 +0100 | [diff] [blame] | 201 | |
Brian Paul | 36ea81d | 2015-02-25 17:04:05 -0700 | [diff] [blame] | 202 | /** Within a mipmap, ie min/mag filter */ |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 203 | enum pipe_tex_filter { |
| 204 | PIPE_TEX_FILTER_NEAREST, |
| 205 | PIPE_TEX_FILTER_LINEAR, |
| 206 | }; |
Brian | 02a4754 | 2007-05-30 16:26:55 -0600 | [diff] [blame] | 207 | |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 208 | enum pipe_tex_compare { |
| 209 | PIPE_TEX_COMPARE_NONE, |
| 210 | PIPE_TEX_COMPARE_R_TO_TEXTURE, |
| 211 | }; |
Brian | 8f28887 | 2007-05-30 16:07:39 -0600 | [diff] [blame] | 212 | |
Keith Whitwell | 8e6a380 | 2008-05-03 15:41:05 +0100 | [diff] [blame] | 213 | /** |
Michel Dänzer | eb168e2 | 2009-04-04 19:01:51 +0200 | [diff] [blame] | 214 | * Clear buffer bits |
| 215 | */ |
Marek Olšák | 164dc62 | 2013-12-04 00:56:24 +0100 | [diff] [blame] | 216 | #define PIPE_CLEAR_DEPTH (1 << 0) |
| 217 | #define PIPE_CLEAR_STENCIL (1 << 1) |
| 218 | #define PIPE_CLEAR_COLOR0 (1 << 2) |
| 219 | #define PIPE_CLEAR_COLOR1 (1 << 3) |
| 220 | #define PIPE_CLEAR_COLOR2 (1 << 4) |
| 221 | #define PIPE_CLEAR_COLOR3 (1 << 5) |
| 222 | #define PIPE_CLEAR_COLOR4 (1 << 6) |
| 223 | #define PIPE_CLEAR_COLOR5 (1 << 7) |
| 224 | #define PIPE_CLEAR_COLOR6 (1 << 8) |
| 225 | #define PIPE_CLEAR_COLOR7 (1 << 9) |
| 226 | /** Combined flags */ |
Michel Dänzer | eb168e2 | 2009-04-04 19:01:51 +0200 | [diff] [blame] | 227 | /** All color buffers currently bound */ |
Marek Olšák | 164dc62 | 2013-12-04 00:56:24 +0100 | [diff] [blame] | 228 | #define PIPE_CLEAR_COLOR (PIPE_CLEAR_COLOR0 | PIPE_CLEAR_COLOR1 | \ |
| 229 | PIPE_CLEAR_COLOR2 | PIPE_CLEAR_COLOR3 | \ |
| 230 | PIPE_CLEAR_COLOR4 | PIPE_CLEAR_COLOR5 | \ |
| 231 | PIPE_CLEAR_COLOR6 | PIPE_CLEAR_COLOR7) |
Roland Scheidegger | 0cd70b5 | 2010-05-28 23:57:47 +0200 | [diff] [blame] | 232 | #define PIPE_CLEAR_DEPTHSTENCIL (PIPE_CLEAR_DEPTH | PIPE_CLEAR_STENCIL) |
Michel Dänzer | eb168e2 | 2009-04-04 19:01:51 +0200 | [diff] [blame] | 233 | |
| 234 | /** |
Michel Dänzer | 4617981 | 2009-02-05 19:41:18 +0100 | [diff] [blame] | 235 | * Transfer object usage flags |
| 236 | */ |
Brian Paul | 36ea81d | 2015-02-25 17:04:05 -0700 | [diff] [blame] | 237 | enum pipe_transfer_usage |
| 238 | { |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 239 | /** |
| 240 | * Resource contents read back (or accessed directly) at transfer |
| 241 | * create time. |
| 242 | */ |
Maarten Maathuis | f199dbd | 2009-08-16 03:20:09 +0200 | [diff] [blame] | 243 | PIPE_TRANSFER_READ = (1 << 0), |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 244 | |
| 245 | /** |
Marek Olšák | 369e468 | 2012-10-08 04:06:42 +0200 | [diff] [blame] | 246 | * Resource contents will be written back at transfer_unmap |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 247 | * time (or modified as a result of being accessed directly). |
| 248 | */ |
Maarten Maathuis | f199dbd | 2009-08-16 03:20:09 +0200 | [diff] [blame] | 249 | PIPE_TRANSFER_WRITE = (1 << 1), |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 250 | |
| 251 | /** |
| 252 | * Read/modify/write |
| 253 | */ |
Michel Dänzer | 9db647b | 2009-10-02 18:13:26 +0200 | [diff] [blame] | 254 | PIPE_TRANSFER_READ_WRITE = PIPE_TRANSFER_READ | PIPE_TRANSFER_WRITE, |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 255 | |
Michel Dänzer | 9db647b | 2009-10-02 18:13:26 +0200 | [diff] [blame] | 256 | /** |
| 257 | * The transfer should map the texture storage directly. The driver may |
| 258 | * return NULL if that isn't possible, and the state tracker needs to cope |
| 259 | * with that and use an alternative path without this flag. |
| 260 | * |
| 261 | * E.g. the state tracker could have a simpler path which maps textures and |
| 262 | * does read/modify/write cycles on them directly, and a more complicated |
| 263 | * path which uses minimal read and write transfers. |
| 264 | */ |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 265 | PIPE_TRANSFER_MAP_DIRECTLY = (1 << 2), |
| 266 | |
| 267 | /** |
| 268 | * Discards the memory within the mapped region. |
| 269 | * |
José Fonseca | 7aeb610 | 2011-02-22 14:14:45 +0000 | [diff] [blame] | 270 | * It should not be used with PIPE_TRANSFER_READ. |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 271 | * |
| 272 | * See also: |
| 273 | * - OpenGL's ARB_map_buffer_range extension, MAP_INVALIDATE_RANGE_BIT flag. |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 274 | */ |
Keith Whitwell | fad8497 | 2011-01-05 17:33:43 +0000 | [diff] [blame] | 275 | PIPE_TRANSFER_DISCARD_RANGE = (1 << 8), |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 276 | |
| 277 | /** |
| 278 | * Fail if the resource cannot be mapped immediately. |
| 279 | * |
| 280 | * See also: |
| 281 | * - Direct3D's D3DLOCK_DONOTWAIT flag. |
Vedran Miletić | 7b9a0f4 | 2016-07-14 12:17:21 +0200 | [diff] [blame] | 282 | * - Mesa's MESA_MAP_NOWAIT_BIT flag. |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 283 | * - WDDM's D3DDDICB_LOCKFLAGS.DonotWait flag. |
| 284 | */ |
| 285 | PIPE_TRANSFER_DONTBLOCK = (1 << 9), |
| 286 | |
| 287 | /** |
| 288 | * Do not attempt to synchronize pending operations on the resource when mapping. |
| 289 | * |
José Fonseca | 7aeb610 | 2011-02-22 14:14:45 +0000 | [diff] [blame] | 290 | * It should not be used with PIPE_TRANSFER_READ. |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 291 | * |
| 292 | * See also: |
| 293 | * - OpenGL's ARB_map_buffer_range extension, MAP_UNSYNCHRONIZED_BIT flag. |
| 294 | * - Direct3D's D3DLOCK_NOOVERWRITE flag. |
| 295 | * - WDDM's D3DDDICB_LOCKFLAGS.IgnoreSync flag. |
| 296 | */ |
| 297 | PIPE_TRANSFER_UNSYNCHRONIZED = (1 << 10), |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 298 | |
| 299 | /** |
| 300 | * Written ranges will be notified later with |
| 301 | * pipe_context::transfer_flush_region. |
| 302 | * |
José Fonseca | 7aeb610 | 2011-02-22 14:14:45 +0000 | [diff] [blame] | 303 | * It should not be used with PIPE_TRANSFER_READ. |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 304 | * |
| 305 | * See also: |
| 306 | * - pipe_context::transfer_flush_region |
| 307 | * - OpenGL's ARB_map_buffer_range extension, MAP_FLUSH_EXPLICIT_BIT flag. |
| 308 | */ |
Keith Whitwell | fad8497 | 2011-01-05 17:33:43 +0000 | [diff] [blame] | 309 | PIPE_TRANSFER_FLUSH_EXPLICIT = (1 << 11), |
| 310 | |
| 311 | /** |
| 312 | * Discards all memory backing the resource. |
| 313 | * |
José Fonseca | 7aeb610 | 2011-02-22 14:14:45 +0000 | [diff] [blame] | 314 | * It should not be used with PIPE_TRANSFER_READ. |
Keith Whitwell | fad8497 | 2011-01-05 17:33:43 +0000 | [diff] [blame] | 315 | * |
| 316 | * This is equivalent to: |
| 317 | * - OpenGL's ARB_map_buffer_range extension, MAP_INVALIDATE_BUFFER_BIT |
| 318 | * - BufferData(NULL) on a GL buffer |
| 319 | * - Direct3D's D3DLOCK_DISCARD flag. |
| 320 | * - WDDM's D3DDDICB_LOCKFLAGS.Discard flag. |
| 321 | * - D3D10 DDI's D3D10_DDI_MAP_WRITE_DISCARD flag |
| 322 | * - D3D10's D3D10_MAP_WRITE_DISCARD flag. |
| 323 | */ |
Marek Olšák | 5f61f05 | 2014-01-27 21:42:07 +0100 | [diff] [blame] | 324 | PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE = (1 << 12), |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 325 | |
Marek Olšák | 5f61f05 | 2014-01-27 21:42:07 +0100 | [diff] [blame] | 326 | /** |
| 327 | * Allows the resource to be used for rendering while mapped. |
| 328 | * |
| 329 | * PIPE_RESOURCE_FLAG_MAP_PERSISTENT must be set when creating |
| 330 | * the resource. |
| 331 | * |
| 332 | * If COHERENT is not set, memory_barrier(PIPE_BARRIER_MAPPED_BUFFER) |
| 333 | * must be called to ensure the device can see what the CPU has written. |
| 334 | */ |
| 335 | PIPE_TRANSFER_PERSISTENT = (1 << 13), |
| 336 | |
| 337 | /** |
| 338 | * If PERSISTENT is set, this ensures any writes done by the device are |
| 339 | * immediately visible to the CPU and vice versa. |
| 340 | * |
| 341 | * PIPE_RESOURCE_FLAG_MAP_COHERENT must be set when creating |
| 342 | * the resource. |
| 343 | */ |
| 344 | PIPE_TRANSFER_COHERENT = (1 << 14) |
Michel Dänzer | 4617981 | 2009-02-05 19:41:18 +0100 | [diff] [blame] | 345 | }; |
| 346 | |
Marek Olšák | 598cc1f | 2012-12-21 17:03:22 +0100 | [diff] [blame] | 347 | /** |
| 348 | * Flags for the flush function. |
| 349 | */ |
Brian Paul | 36ea81d | 2015-02-25 17:04:05 -0700 | [diff] [blame] | 350 | enum pipe_flush_flags |
| 351 | { |
Marek Olšák | d17b35e | 2016-07-15 15:44:29 +0200 | [diff] [blame] | 352 | PIPE_FLUSH_END_OF_FRAME = (1 << 0), |
| 353 | PIPE_FLUSH_DEFERRED = (1 << 1), |
Rob Clark | 026a722 | 2016-04-01 16:10:42 -0400 | [diff] [blame] | 354 | PIPE_FLUSH_FENCE_FD = (1 << 2), |
Marek Olšák | 598cc1f | 2012-12-21 17:03:22 +0100 | [diff] [blame] | 355 | }; |
Michel Dänzer | 4617981 | 2009-02-05 19:41:18 +0100 | [diff] [blame] | 356 | |
Marek Olšák | 5f61f05 | 2014-01-27 21:42:07 +0100 | [diff] [blame] | 357 | /** |
Marek Olšák | 7b5c923 | 2015-07-11 12:34:46 +0200 | [diff] [blame] | 358 | * Flags for pipe_context::dump_debug_state. |
| 359 | */ |
Marek Olšák | 6bf81de | 2016-07-19 21:41:03 +0200 | [diff] [blame] | 360 | #define PIPE_DUMP_DEVICE_STATUS_REGISTERS (1 << 0) |
| 361 | #define PIPE_DUMP_CURRENT_STATES (1 << 1) |
| 362 | #define PIPE_DUMP_CURRENT_SHADERS (1 << 2) |
| 363 | #define PIPE_DUMP_LAST_COMMAND_BUFFER (1 << 3) |
Marek Olšák | 7b5c923 | 2015-07-11 12:34:46 +0200 | [diff] [blame] | 364 | |
| 365 | /** |
Marek Olšák | 0fc21ec | 2015-07-25 18:40:59 +0200 | [diff] [blame] | 366 | * Create a compute-only context. Use in pipe_screen::context_create. |
| 367 | * This disables draw, blit, and clear*, render_condition, and other graphics |
| 368 | * functions. Interop with other graphics contexts is still allowed. |
| 369 | * This allows scheduling jobs on a compute-only hardware command queue that |
| 370 | * can run in parallel with graphics without stalling it. |
| 371 | */ |
| 372 | #define PIPE_CONTEXT_COMPUTE_ONLY (1 << 0) |
| 373 | |
| 374 | /** |
| 375 | * Gather debug information and expect that pipe_context::dump_debug_state |
| 376 | * will be called. Use in pipe_screen::context_create. |
| 377 | */ |
| 378 | #define PIPE_CONTEXT_DEBUG (1 << 1) |
| 379 | |
| 380 | /** |
Marek Olšák | 17fe3fa | 2016-02-06 17:13:07 +0100 | [diff] [blame] | 381 | * Whether out-of-bounds shader loads must return zero and out-of-bounds |
| 382 | * shader stores must be dropped. |
| 383 | */ |
| 384 | #define PIPE_CONTEXT_ROBUST_BUFFER_ACCESS (1 << 2) |
| 385 | |
| 386 | /** |
Marek Olšák | 8559fa5 | 2017-03-24 01:57:40 +0100 | [diff] [blame] | 387 | * Prefer threaded pipe_context. It also implies that video codec functions |
| 388 | * will not be used. (they will be either no-ops or NULL when threading is |
| 389 | * enabled) |
| 390 | */ |
| 391 | #define PIPE_CONTEXT_PREFER_THREADED (1 << 3) |
| 392 | |
Marek Olšák | 118b200 | 2017-06-20 22:44:53 +0200 | [diff] [blame] | 393 | /** |
| 394 | * Implicit and explicit derivatives after KILL behave as if KILL didn't |
| 395 | * happen. |
| 396 | */ |
| 397 | #define PIPE_SCREEN_ENABLE_CORRECT_TGSI_DERIVATIVES_AFTER_KILL (1 << 0) |
| 398 | |
Marek Olšák | 8559fa5 | 2017-03-24 01:57:40 +0100 | [diff] [blame] | 399 | |
| 400 | /** |
Marek Olšák | 5f61f05 | 2014-01-27 21:42:07 +0100 | [diff] [blame] | 401 | * Flags for pipe_context::memory_barrier. |
| 402 | */ |
| 403 | #define PIPE_BARRIER_MAPPED_BUFFER (1 << 0) |
Ilia Mirkin | 6fb8fac | 2016-01-10 22:39:16 -0500 | [diff] [blame] | 404 | #define PIPE_BARRIER_SHADER_BUFFER (1 << 1) |
Ilia Mirkin | 40d7f02 | 2015-05-02 20:28:11 -0400 | [diff] [blame] | 405 | #define PIPE_BARRIER_QUERY_BUFFER (1 << 2) |
Nicolai Hähnle | 96cd908 | 2016-03-13 11:36:53 -0500 | [diff] [blame] | 406 | #define PIPE_BARRIER_VERTEX_BUFFER (1 << 3) |
| 407 | #define PIPE_BARRIER_INDEX_BUFFER (1 << 4) |
| 408 | #define PIPE_BARRIER_CONSTANT_BUFFER (1 << 5) |
| 409 | #define PIPE_BARRIER_INDIRECT_BUFFER (1 << 6) |
| 410 | #define PIPE_BARRIER_TEXTURE (1 << 7) |
| 411 | #define PIPE_BARRIER_IMAGE (1 << 8) |
| 412 | #define PIPE_BARRIER_FRAMEBUFFER (1 << 9) |
Nicolai Hähnle | b15b1fa | 2016-03-17 19:49:03 -0500 | [diff] [blame] | 413 | #define PIPE_BARRIER_STREAMOUT_BUFFER (1 << 10) |
Bas Nieuwenhuizen | be5899d | 2016-03-24 23:11:03 +0100 | [diff] [blame] | 414 | #define PIPE_BARRIER_GLOBAL_BUFFER (1 << 11) |
Nicolai Hähnle | 57f576f | 2016-04-26 21:22:37 -0500 | [diff] [blame] | 415 | #define PIPE_BARRIER_ALL ((1 << 12) - 1) |
Marek Olšák | 5f61f05 | 2014-01-27 21:42:07 +0100 | [diff] [blame] | 416 | |
Brian Paul | 36ea81d | 2015-02-25 17:04:05 -0700 | [diff] [blame] | 417 | /** |
Ilia Mirkin | a1c8484 | 2017-01-01 23:42:17 -0500 | [diff] [blame] | 418 | * Flags for pipe_context::texture_barrier. |
| 419 | */ |
| 420 | #define PIPE_TEXTURE_BARRIER_SAMPLER (1 << 0) |
| 421 | #define PIPE_TEXTURE_BARRIER_FRAMEBUFFER (1 << 1) |
| 422 | |
| 423 | /** |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 424 | * Resource binding flags -- state tracker must specify in advance all |
| 425 | * the ways a resource might be used. |
José Fonseca | fa1a66d | 2007-11-05 18:04:35 +0000 | [diff] [blame] | 426 | */ |
Roland Scheidegger | 4c70014 | 2010-12-02 04:33:43 +0100 | [diff] [blame] | 427 | #define PIPE_BIND_DEPTH_STENCIL (1 << 0) /* create_surface */ |
| 428 | #define PIPE_BIND_RENDER_TARGET (1 << 1) /* create_surface */ |
Christoph Bumiller | a4f26f2 | 2011-10-13 14:48:03 +0200 | [diff] [blame] | 429 | #define PIPE_BIND_BLENDABLE (1 << 2) /* create_surface */ |
| 430 | #define PIPE_BIND_SAMPLER_VIEW (1 << 3) /* create_sampler_view */ |
| 431 | #define PIPE_BIND_VERTEX_BUFFER (1 << 4) /* set_vertex_buffers */ |
| 432 | #define PIPE_BIND_INDEX_BUFFER (1 << 5) /* draw_elements */ |
| 433 | #define PIPE_BIND_CONSTANT_BUFFER (1 << 6) /* set_constant_buffer */ |
Brian Paul | 2069f2c | 2015-02-25 16:58:43 -0700 | [diff] [blame] | 434 | #define PIPE_BIND_DISPLAY_TARGET (1 << 7) /* flush_front_buffer */ |
Marek Olšák | 5981ab5 | 2016-09-07 21:24:08 +0200 | [diff] [blame] | 435 | /* gap */ |
Brian Paul | 2069f2c | 2015-02-25 16:58:43 -0700 | [diff] [blame] | 436 | #define PIPE_BIND_STREAM_OUTPUT (1 << 10) /* set_stream_output_buffers */ |
| 437 | #define PIPE_BIND_CURSOR (1 << 11) /* mouse cursor */ |
| 438 | #define PIPE_BIND_CUSTOM (1 << 12) /* state-tracker/winsys usages */ |
| 439 | #define PIPE_BIND_GLOBAL (1 << 13) /* set_global_binding */ |
Marek Olšák | f9f79d2 | 2015-07-05 13:51:16 +0200 | [diff] [blame] | 440 | #define PIPE_BIND_SHADER_BUFFER (1 << 14) /* set_shader_buffers */ |
| 441 | #define PIPE_BIND_SHADER_IMAGE (1 << 15) /* set_shader_images */ |
| 442 | #define PIPE_BIND_COMPUTE_RESOURCE (1 << 16) /* set_compute_resources */ |
| 443 | #define PIPE_BIND_COMMAND_ARGS_BUFFER (1 << 17) /* pipe_draw_info.indirect */ |
Ilia Mirkin | 40d7f02 | 2015-05-02 20:28:11 -0400 | [diff] [blame] | 444 | #define PIPE_BIND_QUERY_BUFFER (1 << 18) /* get_query_result_resource */ |
José Fonseca | 244591a | 2009-11-06 12:04:20 +0000 | [diff] [blame] | 445 | |
Brian Paul | 36ea81d | 2015-02-25 17:04:05 -0700 | [diff] [blame] | 446 | /** |
| 447 | * The first two flags above were previously part of the amorphous |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 448 | * TEXTURE_USAGE, most of which are now descriptions of the ways a |
Brian Paul | 50d77c7 | 2010-04-22 11:33:26 -0600 | [diff] [blame] | 449 | * particular texture can be bound to the gallium pipeline. The two flags |
| 450 | * below do not fit within that and probably need to be migrated to some |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 451 | * other place. |
José Fonseca | 244591a | 2009-11-06 12:04:20 +0000 | [diff] [blame] | 452 | * |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 453 | * It seems like scanout is used by the Xorg state tracker to ask for |
| 454 | * a texture suitable for actual scanout (hence the name), which |
| 455 | * implies extra layout constraints on some hardware. It may also |
| 456 | * have some special meaning regarding mouse cursor images. |
José Fonseca | 244591a | 2009-11-06 12:04:20 +0000 | [diff] [blame] | 457 | * |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 458 | * The shared flag is quite underspecified, but certainly isn't a |
| 459 | * binding flag - it seems more like a message to the winsys to create |
Brian Paul | 50d77c7 | 2010-04-22 11:33:26 -0600 | [diff] [blame] | 460 | * a shareable allocation. |
Axel Davy | e8f9195 | 2013-08-15 12:47:58 +0200 | [diff] [blame] | 461 | * |
| 462 | * The third flag has been added to be able to force textures to be created |
| 463 | * in linear mode (no tiling). |
José Fonseca | 244591a | 2009-11-06 12:04:20 +0000 | [diff] [blame] | 464 | */ |
Marek Olšák | 43f74ac | 2016-03-01 02:01:59 +0100 | [diff] [blame] | 465 | #define PIPE_BIND_SCANOUT (1 << 19) /* */ |
| 466 | #define PIPE_BIND_SHARED (1 << 20) /* get_texture_handle ??? */ |
| 467 | #define PIPE_BIND_LINEAR (1 << 21) |
José Fonseca | 244591a | 2009-11-06 12:04:20 +0000 | [diff] [blame] | 468 | |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 469 | |
Brian Paul | 36ea81d | 2015-02-25 17:04:05 -0700 | [diff] [blame] | 470 | /** |
| 471 | * Flags for the driver about resource behaviour: |
José Fonseca | 244591a | 2009-11-06 12:04:20 +0000 | [diff] [blame] | 472 | */ |
Marek Olšák | 5f61f05 | 2014-01-27 21:42:07 +0100 | [diff] [blame] | 473 | #define PIPE_RESOURCE_FLAG_MAP_PERSISTENT (1 << 0) |
| 474 | #define PIPE_RESOURCE_FLAG_MAP_COHERENT (1 << 1) |
Marek Olšák | a077185 | 2016-10-12 03:06:08 +0200 | [diff] [blame] | 475 | #define PIPE_RESOURCE_FLAG_TEXTURING_MORE_LIKELY (1 << 2) |
Nicolai Hähnle | d6e6fa0 | 2017-02-02 21:10:44 +0100 | [diff] [blame] | 476 | #define PIPE_RESOURCE_FLAG_SPARSE (1 << 3) |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 477 | #define PIPE_RESOURCE_FLAG_DRV_PRIV (1 << 16) /* driver/winsys private */ |
| 478 | #define PIPE_RESOURCE_FLAG_ST_PRIV (1 << 24) /* state-tracker/winsys private */ |
José Fonseca | 244591a | 2009-11-06 12:04:20 +0000 | [diff] [blame] | 479 | |
Brian Paul | 36ea81d | 2015-02-25 17:04:05 -0700 | [diff] [blame] | 480 | /** |
| 481 | * Hint about the expected lifecycle of a resource. |
Marek Olšák | eeb5a4a | 2014-02-03 03:21:29 +0100 | [diff] [blame] | 482 | * Sorted according to GPU vs CPU access. |
José Fonseca | 244591a | 2009-11-06 12:04:20 +0000 | [diff] [blame] | 483 | */ |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 484 | enum pipe_resource_usage { |
| 485 | PIPE_USAGE_DEFAULT, /* fast GPU access */ |
| 486 | PIPE_USAGE_IMMUTABLE, /* fast GPU access, immutable */ |
| 487 | PIPE_USAGE_DYNAMIC, /* uploaded data is used multiple times */ |
| 488 | PIPE_USAGE_STREAM, /* uploaded data is used once */ |
| 489 | PIPE_USAGE_STAGING, /* fast CPU access */ |
| 490 | }; |
Keith Whitwell | 287c94e | 2010-04-10 16:05:54 +0100 | [diff] [blame] | 491 | |
Brian | 94a4910 | 2007-08-15 19:13:03 -0600 | [diff] [blame] | 492 | /** |
Brian | c0bb4ba | 2007-08-22 12:24:51 -0600 | [diff] [blame] | 493 | * Shaders |
| 494 | */ |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 495 | enum pipe_shader_type { |
| 496 | PIPE_SHADER_VERTEX, |
| 497 | PIPE_SHADER_FRAGMENT, |
| 498 | PIPE_SHADER_GEOMETRY, |
| 499 | PIPE_SHADER_TESS_CTRL, |
| 500 | PIPE_SHADER_TESS_EVAL, |
| 501 | PIPE_SHADER_COMPUTE, |
| 502 | PIPE_SHADER_TYPES, |
| 503 | }; |
Brian | c0bb4ba | 2007-08-22 12:24:51 -0600 | [diff] [blame] | 504 | |
| 505 | /** |
Brian | 94a4910 | 2007-08-15 19:13:03 -0600 | [diff] [blame] | 506 | * Primitive types: |
| 507 | */ |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 508 | enum pipe_prim_type { |
| 509 | PIPE_PRIM_POINTS, |
| 510 | PIPE_PRIM_LINES, |
| 511 | PIPE_PRIM_LINE_LOOP, |
| 512 | PIPE_PRIM_LINE_STRIP, |
| 513 | PIPE_PRIM_TRIANGLES, |
| 514 | PIPE_PRIM_TRIANGLE_STRIP, |
| 515 | PIPE_PRIM_TRIANGLE_FAN, |
| 516 | PIPE_PRIM_QUADS, |
| 517 | PIPE_PRIM_QUAD_STRIP, |
| 518 | PIPE_PRIM_POLYGON, |
| 519 | PIPE_PRIM_LINES_ADJACENCY, |
| 520 | PIPE_PRIM_LINE_STRIP_ADJACENCY, |
| 521 | PIPE_PRIM_TRIANGLES_ADJACENCY, |
| 522 | PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY, |
| 523 | PIPE_PRIM_PATCHES, |
| 524 | PIPE_PRIM_MAX, |
| 525 | }; |
Keith Whitwell | 40a86b2 | 2007-08-13 16:07:11 +0100 | [diff] [blame] | 526 | |
Brian | 09fbb38 | 2007-09-11 16:01:17 -0600 | [diff] [blame] | 527 | /** |
Ilia Mirkin | 9e1ba1d | 2014-07-19 10:09:28 -0400 | [diff] [blame] | 528 | * Tessellator spacing types |
| 529 | */ |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 530 | enum pipe_tess_spacing { |
| 531 | PIPE_TESS_SPACING_FRACTIONAL_ODD, |
| 532 | PIPE_TESS_SPACING_FRACTIONAL_EVEN, |
| 533 | PIPE_TESS_SPACING_EQUAL, |
| 534 | }; |
Ilia Mirkin | 9e1ba1d | 2014-07-19 10:09:28 -0400 | [diff] [blame] | 535 | |
| 536 | /** |
Brian | 09fbb38 | 2007-09-11 16:01:17 -0600 | [diff] [blame] | 537 | * Query object types |
| 538 | */ |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 539 | enum pipe_query_type { |
| 540 | PIPE_QUERY_OCCLUSION_COUNTER, |
| 541 | PIPE_QUERY_OCCLUSION_PREDICATE, |
| 542 | PIPE_QUERY_TIMESTAMP, |
| 543 | PIPE_QUERY_TIMESTAMP_DISJOINT, |
| 544 | PIPE_QUERY_TIME_ELAPSED, |
| 545 | PIPE_QUERY_PRIMITIVES_GENERATED, |
| 546 | PIPE_QUERY_PRIMITIVES_EMITTED, |
| 547 | PIPE_QUERY_SO_STATISTICS, |
| 548 | PIPE_QUERY_SO_OVERFLOW_PREDICATE, |
Nicolai Hähnle | a677799 | 2017-07-26 19:16:14 +0200 | [diff] [blame] | 549 | PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE, |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 550 | PIPE_QUERY_GPU_FINISHED, |
| 551 | PIPE_QUERY_PIPELINE_STATISTICS, |
| 552 | PIPE_QUERY_TYPES, |
| 553 | /* start of driver queries, see pipe_screen::get_driver_query_info */ |
| 554 | PIPE_QUERY_DRIVER_SPECIFIC = 256, |
| 555 | }; |
Brian | 37cf13e | 2007-09-19 18:53:36 -0600 | [diff] [blame] | 556 | |
Brian | 1b48523 | 2007-10-22 12:10:30 -0600 | [diff] [blame] | 557 | /** |
Brian Paul | c0b4fb0 | 2009-12-31 14:44:40 -0700 | [diff] [blame] | 558 | * Conditional rendering modes |
| 559 | */ |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 560 | enum pipe_render_cond_flag { |
| 561 | PIPE_RENDER_COND_WAIT, |
| 562 | PIPE_RENDER_COND_NO_WAIT, |
| 563 | PIPE_RENDER_COND_BY_REGION_WAIT, |
| 564 | PIPE_RENDER_COND_BY_REGION_NO_WAIT, |
| 565 | }; |
Brian Paul | c0b4fb0 | 2009-12-31 14:44:40 -0700 | [diff] [blame] | 566 | |
| 567 | /** |
Brian | 1b48523 | 2007-10-22 12:10:30 -0600 | [diff] [blame] | 568 | * Point sprite coord modes |
| 569 | */ |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 570 | enum pipe_sprite_coord_mode { |
| 571 | PIPE_SPRITE_COORD_UPPER_LEFT, |
| 572 | PIPE_SPRITE_COORD_LOWER_LEFT, |
| 573 | }; |
Brian | c6499a7 | 2007-11-05 18:04:30 -0700 | [diff] [blame] | 574 | |
| 575 | /** |
Marek Olšák | fb523cb | 2016-04-16 14:05:47 +0200 | [diff] [blame] | 576 | * Texture & format swizzles |
Michal Krol | f610656 | 2010-02-19 19:00:26 +0100 | [diff] [blame] | 577 | */ |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 578 | enum pipe_swizzle { |
Marek Olšák | fb523cb | 2016-04-16 14:05:47 +0200 | [diff] [blame] | 579 | PIPE_SWIZZLE_X, |
| 580 | PIPE_SWIZZLE_Y, |
| 581 | PIPE_SWIZZLE_Z, |
| 582 | PIPE_SWIZZLE_W, |
| 583 | PIPE_SWIZZLE_0, |
| 584 | PIPE_SWIZZLE_1, |
| 585 | PIPE_SWIZZLE_NONE, |
| 586 | PIPE_SWIZZLE_MAX, /**< Number of enums counter (must be last) */ |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 587 | }; |
Michal Krol | f610656 | 2010-02-19 19:00:26 +0100 | [diff] [blame] | 588 | |
Marek Olšák | b39bccb | 2011-03-05 21:23:54 +0100 | [diff] [blame] | 589 | #define PIPE_TIMEOUT_INFINITE 0xffffffffffffffffull |
| 590 | |
Marek Olšák | cacd0e2 | 2015-04-29 15:04:34 +0200 | [diff] [blame] | 591 | |
| 592 | /** |
| 593 | * Device reset status. |
| 594 | */ |
| 595 | enum pipe_reset_status |
| 596 | { |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 597 | PIPE_NO_RESET, |
| 598 | PIPE_GUILTY_CONTEXT_RESET, |
| 599 | PIPE_INNOCENT_CONTEXT_RESET, |
| 600 | PIPE_UNKNOWN_CONTEXT_RESET, |
Marek Olšák | cacd0e2 | 2015-04-29 15:04:34 +0200 | [diff] [blame] | 601 | }; |
| 602 | |
| 603 | |
Michal Krol | f610656 | 2010-02-19 19:00:26 +0100 | [diff] [blame] | 604 | /** |
Marek Olšák | 82db518 | 2016-02-24 18:51:15 +0100 | [diff] [blame] | 605 | * resource_get_handle flags. |
| 606 | */ |
| 607 | /* Requires pipe_context::flush_resource before external use. */ |
| 608 | #define PIPE_HANDLE_USAGE_EXPLICIT_FLUSH (1 << 0) |
| 609 | /* Expected external use of the resource: */ |
| 610 | #define PIPE_HANDLE_USAGE_READ (1 << 1) |
| 611 | #define PIPE_HANDLE_USAGE_WRITE (1 << 2) |
| 612 | #define PIPE_HANDLE_USAGE_READ_WRITE (PIPE_HANDLE_USAGE_READ | \ |
| 613 | PIPE_HANDLE_USAGE_WRITE) |
| 614 | |
| 615 | /** |
Nicolai Hähnle | 71a1b54 | 2016-03-11 20:04:19 -0500 | [diff] [blame] | 616 | * pipe_image_view access flags. |
| 617 | */ |
| 618 | #define PIPE_IMAGE_ACCESS_READ (1 << 0) |
| 619 | #define PIPE_IMAGE_ACCESS_WRITE (1 << 1) |
| 620 | #define PIPE_IMAGE_ACCESS_READ_WRITE (PIPE_IMAGE_ACCESS_READ | \ |
| 621 | PIPE_IMAGE_ACCESS_WRITE) |
| 622 | |
| 623 | /** |
Brian Paul | aebc08b | 2009-06-09 11:10:09 -0600 | [diff] [blame] | 624 | * Implementation capabilities/limits which are queried through |
Marek Olšák | bb71f92 | 2011-11-19 22:38:22 +0100 | [diff] [blame] | 625 | * pipe_screen::get_param() |
Brian | c6499a7 | 2007-11-05 18:04:30 -0700 | [diff] [blame] | 626 | */ |
Brian Paul | 36ea81d | 2015-02-25 17:04:05 -0700 | [diff] [blame] | 627 | enum pipe_cap |
| 628 | { |
Brian Paul | 1a6e4f4 | 2015-06-10 10:59:37 -0600 | [diff] [blame] | 629 | PIPE_CAP_NPOT_TEXTURES, |
| 630 | PIPE_CAP_TWO_SIDED_STENCIL, |
| 631 | PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS, |
| 632 | PIPE_CAP_ANISOTROPIC_FILTER, |
| 633 | PIPE_CAP_POINT_SPRITE, |
| 634 | PIPE_CAP_MAX_RENDER_TARGETS, |
| 635 | PIPE_CAP_OCCLUSION_QUERY, |
| 636 | PIPE_CAP_QUERY_TIME_ELAPSED, |
| 637 | PIPE_CAP_TEXTURE_SHADOW_MAP, |
| 638 | PIPE_CAP_TEXTURE_SWIZZLE, |
| 639 | PIPE_CAP_MAX_TEXTURE_2D_LEVELS, |
| 640 | PIPE_CAP_MAX_TEXTURE_3D_LEVELS, |
| 641 | PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS, |
| 642 | PIPE_CAP_TEXTURE_MIRROR_CLAMP, |
| 643 | PIPE_CAP_BLEND_EQUATION_SEPARATE, |
| 644 | PIPE_CAP_SM3, |
| 645 | PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS, |
| 646 | PIPE_CAP_PRIMITIVE_RESTART, |
José Fonseca | e1238b5 | 2010-05-11 11:11:03 +0100 | [diff] [blame] | 647 | /** blend enables and write masks per rendertarget */ |
Brian Paul | 1a6e4f4 | 2015-06-10 10:59:37 -0600 | [diff] [blame] | 648 | PIPE_CAP_INDEP_BLEND_ENABLE, |
José Fonseca | e1238b5 | 2010-05-11 11:11:03 +0100 | [diff] [blame] | 649 | /** different blend funcs per rendertarget */ |
Brian Paul | 1a6e4f4 | 2015-06-10 10:59:37 -0600 | [diff] [blame] | 650 | PIPE_CAP_INDEP_BLEND_FUNC, |
| 651 | PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS, |
| 652 | PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT, |
| 653 | PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT, |
| 654 | PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER, |
| 655 | PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER, |
| 656 | PIPE_CAP_DEPTH_CLIP_DISABLE, |
| 657 | PIPE_CAP_SHADER_STENCIL_EXPORT, |
| 658 | PIPE_CAP_TGSI_INSTANCEID, |
| 659 | PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR, |
| 660 | PIPE_CAP_FRAGMENT_COLOR_CLAMPED, |
| 661 | PIPE_CAP_MIXED_COLORBUFFER_FORMATS, |
| 662 | PIPE_CAP_SEAMLESS_CUBE_MAP, |
| 663 | PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE, |
| 664 | PIPE_CAP_MIN_TEXEL_OFFSET, |
| 665 | PIPE_CAP_MAX_TEXEL_OFFSET, |
| 666 | PIPE_CAP_CONDITIONAL_RENDER, |
| 667 | PIPE_CAP_TEXTURE_BARRIER, |
| 668 | PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS, |
| 669 | PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS, |
| 670 | PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME, |
| 671 | PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS, |
| 672 | PIPE_CAP_VERTEX_COLOR_UNCLAMPED, |
| 673 | PIPE_CAP_VERTEX_COLOR_CLAMPED, |
| 674 | PIPE_CAP_GLSL_FEATURE_LEVEL, |
| 675 | PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION, |
| 676 | PIPE_CAP_USER_VERTEX_BUFFERS, |
| 677 | PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY, |
| 678 | PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY, |
| 679 | PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY, |
| 680 | PIPE_CAP_COMPUTE, |
Brian Paul | 1a6e4f4 | 2015-06-10 10:59:37 -0600 | [diff] [blame] | 681 | PIPE_CAP_USER_CONSTANT_BUFFERS, |
| 682 | PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT, |
| 683 | PIPE_CAP_START_INSTANCE, |
| 684 | PIPE_CAP_QUERY_TIMESTAMP, |
| 685 | PIPE_CAP_TEXTURE_MULTISAMPLE, |
| 686 | PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT, |
| 687 | PIPE_CAP_CUBE_MAP_ARRAY, |
| 688 | PIPE_CAP_TEXTURE_BUFFER_OBJECTS, |
| 689 | PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT, |
Nicolai Hähnle | 3abb548 | 2016-01-26 10:26:30 -0500 | [diff] [blame] | 690 | PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY, |
Brian Paul | 1a6e4f4 | 2015-06-10 10:59:37 -0600 | [diff] [blame] | 691 | PIPE_CAP_TGSI_TEXCOORD, |
| 692 | PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER, |
| 693 | PIPE_CAP_QUERY_PIPELINE_STATISTICS, |
| 694 | PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK, |
| 695 | PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE, |
| 696 | PIPE_CAP_MAX_VIEWPORTS, |
| 697 | PIPE_CAP_ENDIANNESS, |
| 698 | PIPE_CAP_MIXED_FRAMEBUFFER_SIZES, |
| 699 | PIPE_CAP_TGSI_VS_LAYER_VIEWPORT, |
| 700 | PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES, |
| 701 | PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS, |
| 702 | PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS, |
| 703 | PIPE_CAP_TEXTURE_GATHER_SM5, |
| 704 | PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT, |
| 705 | PIPE_CAP_FAKE_SW_MSAA, |
| 706 | PIPE_CAP_TEXTURE_QUERY_LOD, |
| 707 | PIPE_CAP_MIN_TEXTURE_GATHER_OFFSET, |
| 708 | PIPE_CAP_MAX_TEXTURE_GATHER_OFFSET, |
| 709 | PIPE_CAP_SAMPLE_SHADING, |
| 710 | PIPE_CAP_TEXTURE_GATHER_OFFSETS, |
| 711 | PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION, |
| 712 | PIPE_CAP_MAX_VERTEX_STREAMS, |
| 713 | PIPE_CAP_DRAW_INDIRECT, |
| 714 | PIPE_CAP_TGSI_FS_FINE_DERIVATIVE, |
| 715 | PIPE_CAP_VENDOR_ID, |
| 716 | PIPE_CAP_DEVICE_ID, |
| 717 | PIPE_CAP_ACCELERATED, |
| 718 | PIPE_CAP_VIDEO_MEMORY, |
| 719 | PIPE_CAP_UMA, |
| 720 | PIPE_CAP_CONDITIONAL_RENDER_INVERTED, |
| 721 | PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE, |
| 722 | PIPE_CAP_SAMPLER_VIEW_TARGET, |
| 723 | PIPE_CAP_CLIP_HALFZ, |
| 724 | PIPE_CAP_VERTEXID_NOBASE, |
| 725 | PIPE_CAP_POLYGON_OFFSET_CLAMP, |
| 726 | PIPE_CAP_MULTISAMPLE_Z_RESOLVE, |
| 727 | PIPE_CAP_RESOURCE_FROM_USER_MEMORY, |
| 728 | PIPE_CAP_DEVICE_RESET_STATUS_QUERY, |
Marek Olšák | 2622293 | 2015-06-12 14:24:17 +0200 | [diff] [blame] | 729 | PIPE_CAP_MAX_SHADER_PATCH_VARYINGS, |
Marek Olšák | 44dc1d3 | 2015-08-10 19:37:01 +0200 | [diff] [blame] | 730 | PIPE_CAP_TEXTURE_FLOAT_LINEAR, |
| 731 | PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR, |
Marek Olšák | 3b7800e | 2015-08-10 02:11:48 +0200 | [diff] [blame] | 732 | PIPE_CAP_DEPTH_BOUNDS_TEST, |
Ilia Mirkin | f46a53f | 2015-09-11 17:29:49 -0400 | [diff] [blame] | 733 | PIPE_CAP_TGSI_TXQS, |
Marek Olšák | f3b37e3 | 2015-09-27 19:32:07 +0200 | [diff] [blame] | 734 | PIPE_CAP_FORCE_PERSAMPLE_INTERP, |
Marek Olšák | d74e7b6 | 2015-09-27 21:02:15 +0200 | [diff] [blame] | 735 | PIPE_CAP_SHAREABLE_SHADERS, |
Marek Olšák | ce9db16 | 2015-08-24 01:19:35 +0200 | [diff] [blame] | 736 | PIPE_CAP_COPY_BETWEEN_COMPRESSED_AND_PLAIN_FORMATS, |
Ilia Mirkin | 3695b25 | 2015-11-09 13:27:07 -0500 | [diff] [blame] | 737 | PIPE_CAP_CLEAR_TEXTURE, |
Ilia Mirkin | 87b4e4e | 2015-12-29 16:49:32 -0500 | [diff] [blame] | 738 | PIPE_CAP_DRAW_PARAMETERS, |
Ilia Mirkin | e9f43d6 | 2016-01-02 18:55:48 -0500 | [diff] [blame] | 739 | PIPE_CAP_TGSI_PACK_HALF_FLOAT, |
Ilia Mirkin | d67b9ba | 2015-12-31 13:30:13 -0500 | [diff] [blame] | 740 | PIPE_CAP_MULTI_DRAW_INDIRECT, |
| 741 | PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS, |
Marek Olšák | 34738a9 | 2016-01-02 20:45:00 +0100 | [diff] [blame] | 742 | PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL, |
| 743 | PIPE_CAP_TGSI_FS_FACE_IS_INTEGER_SYSVAL, |
Ilia Mirkin | ebfb544 | 2016-01-02 21:56:45 -0500 | [diff] [blame] | 744 | PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT, |
Nicolai Hähnle | 654670b | 2016-01-11 17:38:08 -0500 | [diff] [blame] | 745 | PIPE_CAP_INVALIDATE_BUFFER, |
Charmaine Lee | 3038e89 | 2016-01-14 10:22:17 -0700 | [diff] [blame] | 746 | PIPE_CAP_GENERATE_MIPMAP, |
Rob Clark | d640837 | 2015-08-10 11:41:29 -0400 | [diff] [blame] | 747 | PIPE_CAP_STRING_MARKER, |
Nicolai Hähnle | 6af6d7b | 2016-01-26 10:27:58 -0500 | [diff] [blame] | 748 | PIPE_CAP_SURFACE_REINTERPRET_BLOCKS, |
Ilia Mirkin | f9e6f46 | 2016-01-09 23:30:16 -0500 | [diff] [blame] | 749 | PIPE_CAP_QUERY_BUFFER_OBJECT, |
Marek Olšák | d2e4c9e | 2016-02-01 21:56:50 +0100 | [diff] [blame] | 750 | PIPE_CAP_QUERY_MEMORY_INFO, |
Marek Olšák | dcb2b77 | 2016-02-29 20:22:37 +0100 | [diff] [blame] | 751 | PIPE_CAP_PCI_GROUP, |
| 752 | PIPE_CAP_PCI_BUS, |
| 753 | PIPE_CAP_PCI_DEVICE, |
| 754 | PIPE_CAP_PCI_FUNCTION, |
Edward O'Callaghan | 4bc9130 | 2016-02-17 20:59:52 +1100 | [diff] [blame] | 755 | PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT, |
Bas Nieuwenhuizen | 70dcd84 | 2016-04-12 15:00:31 +0200 | [diff] [blame] | 756 | PIPE_CAP_ROBUST_BUFFER_ACCESS_BEHAVIOR, |
Tobias Klausmann | 2be258e | 2016-05-08 22:44:07 +0200 | [diff] [blame] | 757 | PIPE_CAP_CULL_DISTANCE, |
Kenneth Graunke | 70048eb | 2016-05-20 21:05:34 -0700 | [diff] [blame] | 758 | PIPE_CAP_PRIMITIVE_RESTART_FOR_PATCHES, |
Ilia Mirkin | edfa7a4 | 2016-05-29 11:39:52 -0400 | [diff] [blame] | 759 | PIPE_CAP_TGSI_VOTE, |
Ilia Mirkin | 07fcb06 | 2016-06-11 15:26:45 -0400 | [diff] [blame] | 760 | PIPE_CAP_MAX_WINDOW_RECTANGLES, |
Axel Davy | 59a6929 | 2016-06-13 22:28:32 +0200 | [diff] [blame] | 761 | PIPE_CAP_POLYGON_OFFSET_UNITS_UNSCALED, |
Józef Kucia | 3cd28fe | 2016-07-19 13:07:24 +0200 | [diff] [blame] | 762 | PIPE_CAP_VIEWPORT_SUBPIXEL_BITS, |
Ilia Mirkin | 9515d65 | 2016-08-20 22:40:33 -0400 | [diff] [blame] | 763 | PIPE_CAP_MIXED_COLOR_DEPTH_BITS, |
Nicolai Hähnle | 700a571 | 2016-10-07 09:42:55 +0200 | [diff] [blame] | 764 | PIPE_CAP_TGSI_ARRAY_COMPONENTS, |
Ilia Mirkin | 3fdeb7c | 2016-10-14 00:03:12 -0400 | [diff] [blame] | 765 | PIPE_CAP_STREAM_OUTPUT_INTERLEAVE_BUFFERS, |
Nicolai Hähnle | 611166b | 2016-11-18 20:49:54 +0100 | [diff] [blame] | 766 | PIPE_CAP_TGSI_CAN_READ_OUTPUTS, |
Rob Clark | 026a722 | 2016-04-01 16:10:42 -0400 | [diff] [blame] | 767 | PIPE_CAP_NATIVE_FENCE_FD, |
Marek Olšák | e51baeb | 2016-12-31 13:34:11 +0100 | [diff] [blame] | 768 | PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY, |
Ilia Mirkin | ee3ebe6 | 2017-01-01 23:10:00 -0500 | [diff] [blame] | 769 | PIPE_CAP_TGSI_FS_FBFETCH, |
Ilia Mirkin | 6e40938 | 2017-01-16 22:14:38 -0500 | [diff] [blame] | 770 | PIPE_CAP_TGSI_MUL_ZERO_WINS, |
Nicolai Hähnle | a020cb3 | 2017-01-27 10:35:13 +0100 | [diff] [blame] | 771 | PIPE_CAP_DOUBLES, |
Dave Airlie | f804506 | 2016-06-09 10:13:03 +1000 | [diff] [blame] | 772 | PIPE_CAP_INT64, |
Ilia Mirkin | b090033 | 2017-02-04 22:31:29 -0500 | [diff] [blame] | 773 | PIPE_CAP_INT64_DIVMOD, |
Marek Olšák | bf3cdf0 | 2017-03-07 02:09:03 +0100 | [diff] [blame] | 774 | PIPE_CAP_TGSI_TEX_TXF_LZ, |
Nicolai Hähnle | d0c7f92 | 2017-03-29 20:44:57 +0200 | [diff] [blame] | 775 | PIPE_CAP_TGSI_CLOCK, |
Lyude | ffe2bd6 | 2017-03-16 18:00:05 -0400 | [diff] [blame] | 776 | PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE, |
Nicolai Hähnle | d6e6fa0 | 2017-02-02 21:10:44 +0100 | [diff] [blame] | 777 | PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE, |
Nicolai Hähnle | d3e6f6d | 2017-03-30 11:16:09 +0200 | [diff] [blame] | 778 | PIPE_CAP_TGSI_BALLOT, |
Nicolai Hähnle | 17f24a9 | 2017-04-13 21:54:54 +0200 | [diff] [blame] | 779 | PIPE_CAP_TGSI_TES_LAYER_VIEWPORT, |
Marek Olšák | 70dcb73 | 2017-04-30 01:18:43 +0200 | [diff] [blame] | 780 | PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX, |
Marek Olšák | 5018937 | 2017-05-15 16:30:30 +0200 | [diff] [blame] | 781 | PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION, |
Lyude | 467af44 | 2017-05-24 15:42:39 -0400 | [diff] [blame] | 782 | PIPE_CAP_POST_DEPTH_COVERAGE, |
Samuel Pitoiset | 973822b | 2017-02-16 13:43:16 +0100 | [diff] [blame] | 783 | PIPE_CAP_BINDLESS_TEXTURE, |
Nicolai Hähnle | 01f1598 | 2017-06-25 18:31:11 +0200 | [diff] [blame] | 784 | PIPE_CAP_NIR_SAMPLERS_AS_DEREF, |
Nicolai Hähnle | a677799 | 2017-07-26 19:16:14 +0200 | [diff] [blame] | 785 | PIPE_CAP_QUERY_SO_OVERFLOW, |
Timothy Arceri | 4e4042d | 2017-08-03 13:54:45 +1000 | [diff] [blame^] | 786 | PIPE_CAP_MEMOBJ, |
José Fonseca | e1238b5 | 2010-05-11 11:11:03 +0100 | [diff] [blame] | 787 | }; |
Brian Paul | be66a8f | 2008-08-06 17:22:29 -0600 | [diff] [blame] | 788 | |
Christoph Bumiller | 729abfd | 2013-04-12 13:42:01 +0200 | [diff] [blame] | 789 | #define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0) |
| 790 | #define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_R600 (1 << 1) |
| 791 | |
Brian Paul | 36ea81d | 2015-02-25 17:04:05 -0700 | [diff] [blame] | 792 | enum pipe_endian |
| 793 | { |
Tom Stellard | 4e90bc9 | 2013-07-09 21:21:39 -0700 | [diff] [blame] | 794 | PIPE_ENDIAN_LITTLE = 0, |
| 795 | PIPE_ENDIAN_BIG = 1, |
| 796 | #if defined(PIPE_ARCH_LITTLE_ENDIAN) |
| 797 | PIPE_ENDIAN_NATIVE = PIPE_ENDIAN_LITTLE |
| 798 | #elif defined(PIPE_ARCH_BIG_ENDIAN) |
| 799 | PIPE_ENDIAN_NATIVE = PIPE_ENDIAN_BIG |
| 800 | #endif |
| 801 | }; |
Christoph Bumiller | 729abfd | 2013-04-12 13:42:01 +0200 | [diff] [blame] | 802 | |
Marek Olšák | bb71f92 | 2011-11-19 22:38:22 +0100 | [diff] [blame] | 803 | /** |
| 804 | * Implementation limits which are queried through |
| 805 | * pipe_screen::get_paramf() |
| 806 | */ |
| 807 | enum pipe_capf |
| 808 | { |
Brian Paul | ed8bfab | 2014-05-03 07:27:48 -0600 | [diff] [blame] | 809 | PIPE_CAPF_MAX_LINE_WIDTH, |
| 810 | PIPE_CAPF_MAX_LINE_WIDTH_AA, |
| 811 | PIPE_CAPF_MAX_POINT_WIDTH, |
| 812 | PIPE_CAPF_MAX_POINT_WIDTH_AA, |
| 813 | PIPE_CAPF_MAX_TEXTURE_ANISOTROPY, |
| 814 | PIPE_CAPF_MAX_TEXTURE_LOD_BIAS, |
| 815 | PIPE_CAPF_GUARD_BAND_LEFT, |
| 816 | PIPE_CAPF_GUARD_BAND_TOP, |
| 817 | PIPE_CAPF_GUARD_BAND_RIGHT, |
| 818 | PIPE_CAPF_GUARD_BAND_BOTTOM |
Marek Olšák | bb71f92 | 2011-11-19 22:38:22 +0100 | [diff] [blame] | 819 | }; |
| 820 | |
Brian Paul | 36ea81d | 2015-02-25 17:04:05 -0700 | [diff] [blame] | 821 | /** Shader caps not specific to any single stage */ |
Luca Barbieri | a508d2d | 2010-09-05 20:50:50 +0200 | [diff] [blame] | 822 | enum pipe_shader_cap |
| 823 | { |
Brian Paul | ed8bfab | 2014-05-03 07:27:48 -0600 | [diff] [blame] | 824 | PIPE_SHADER_CAP_MAX_INSTRUCTIONS, /* if 0, it means the stage is unsupported */ |
| 825 | PIPE_SHADER_CAP_MAX_ALU_INSTRUCTIONS, |
| 826 | PIPE_SHADER_CAP_MAX_TEX_INSTRUCTIONS, |
| 827 | PIPE_SHADER_CAP_MAX_TEX_INDIRECTIONS, |
| 828 | PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH, |
| 829 | PIPE_SHADER_CAP_MAX_INPUTS, |
Marek Olšák | 5f5b83c | 2014-10-01 20:28:17 +0200 | [diff] [blame] | 830 | PIPE_SHADER_CAP_MAX_OUTPUTS, |
Marek Olšák | 04f2c88 | 2014-07-24 20:32:08 +0200 | [diff] [blame] | 831 | PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE, |
Brian Paul | ed8bfab | 2014-05-03 07:27:48 -0600 | [diff] [blame] | 832 | PIPE_SHADER_CAP_MAX_CONST_BUFFERS, |
| 833 | PIPE_SHADER_CAP_MAX_TEMPS, |
Marek Olšák | cbfdf26 | 2010-11-10 20:41:55 +0100 | [diff] [blame] | 834 | /* boolean caps */ |
Brian Paul | ed8bfab | 2014-05-03 07:27:48 -0600 | [diff] [blame] | 835 | PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED, |
| 836 | PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR, |
| 837 | PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR, |
| 838 | PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR, |
| 839 | PIPE_SHADER_CAP_INDIRECT_CONST_ADDR, |
| 840 | PIPE_SHADER_CAP_SUBROUTINES, /* BGNSUB, ENDSUB, CAL, RET */ |
| 841 | PIPE_SHADER_CAP_INTEGERS, |
| 842 | PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS, |
| 843 | PIPE_SHADER_CAP_PREFERRED_IR, |
| 844 | PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED, |
Tom Stellard | fea996c | 2014-06-17 08:52:34 -0700 | [diff] [blame] | 845 | PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS, |
Ilia Mirkin | 899d779 | 2014-07-25 17:03:33 -0400 | [diff] [blame] | 846 | PIPE_SHADER_CAP_TGSI_DROUND_SUPPORTED, /* all rounding modes */ |
Ilia Mirkin | 924ee3f | 2014-07-25 17:48:01 -0400 | [diff] [blame] | 847 | PIPE_SHADER_CAP_TGSI_DFRACEXP_DLDEXP_SUPPORTED, |
Marek Olšák | 216543e | 2015-02-28 00:26:31 +0100 | [diff] [blame] | 848 | PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED, |
Marek Olšák | 814f314 | 2015-10-20 18:26:02 +0200 | [diff] [blame] | 849 | PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE, |
| 850 | PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT, |
Ilia Mirkin | 266d001 | 2015-09-26 20:27:42 -0400 | [diff] [blame] | 851 | PIPE_SHADER_CAP_MAX_SHADER_BUFFERS, |
Samuel Pitoiset | 5e09ac7 | 2016-02-03 18:57:58 +0100 | [diff] [blame] | 852 | PIPE_SHADER_CAP_SUPPORTED_IRS, |
Ilia Mirkin | 9fbfa1a | 2016-01-08 22:56:23 -0500 | [diff] [blame] | 853 | PIPE_SHADER_CAP_MAX_SHADER_IMAGES, |
Marek Olšák | 72217d4 | 2016-10-28 22:34:20 +0200 | [diff] [blame] | 854 | PIPE_SHADER_CAP_LOWER_IF_THRESHOLD, |
Samuel Pitoiset | 3a927e0 | 2017-04-25 00:31:46 +0200 | [diff] [blame] | 855 | PIPE_SHADER_CAP_TGSI_SKIP_MERGE_REGISTERS, |
Francisco Jerez | 57c048f | 2012-03-18 23:59:33 +0100 | [diff] [blame] | 856 | }; |
| 857 | |
| 858 | /** |
| 859 | * Shader intermediate representation. |
Rob Clark | 425dc4c | 2015-10-17 13:34:24 -0400 | [diff] [blame] | 860 | * |
| 861 | * Note that if the driver requests something other than TGSI, it must |
| 862 | * always be prepared to receive TGSI in addition to its preferred IR. |
| 863 | * If the driver requests TGSI as its preferred IR, it will *always* |
| 864 | * get TGSI. |
| 865 | * |
| 866 | * Note that PIPE_SHADER_IR_TGSI should be zero for backwards compat with |
| 867 | * state trackers that only understand TGSI. |
Francisco Jerez | 57c048f | 2012-03-18 23:59:33 +0100 | [diff] [blame] | 868 | */ |
| 869 | enum pipe_shader_ir |
| 870 | { |
Rob Clark | 425dc4c | 2015-10-17 13:34:24 -0400 | [diff] [blame] | 871 | PIPE_SHADER_IR_TGSI = 0, |
Tom Stellard | 8b7cc90 | 2014-09-25 09:14:53 -0400 | [diff] [blame] | 872 | PIPE_SHADER_IR_LLVM, |
Rob Clark | 425dc4c | 2015-10-17 13:34:24 -0400 | [diff] [blame] | 873 | PIPE_SHADER_IR_NATIVE, |
Rob Clark | e1d80f8 | 2016-01-30 13:11:47 -0500 | [diff] [blame] | 874 | PIPE_SHADER_IR_NIR, |
Luca Barbieri | a508d2d | 2010-09-05 20:50:50 +0200 | [diff] [blame] | 875 | }; |
Brian Paul | 07aaf3a | 2008-05-02 14:00:08 -0600 | [diff] [blame] | 876 | |
Francisco Jerez | d9d82dc | 2012-04-25 22:15:16 +0200 | [diff] [blame] | 877 | /** |
| 878 | * Compute-specific implementation capability. They can be queried |
| 879 | * using pipe_screen::get_compute_param. |
| 880 | */ |
| 881 | enum pipe_compute_cap |
| 882 | { |
Jan Vesely | c7af849 | 2016-08-28 04:06:28 -0400 | [diff] [blame] | 883 | PIPE_COMPUTE_CAP_ADDRESS_BITS, |
Francisco Jerez | c4c5115 | 2012-03-23 01:40:40 +0100 | [diff] [blame] | 884 | PIPE_COMPUTE_CAP_IR_TARGET, |
Francisco Jerez | d9d82dc | 2012-04-25 22:15:16 +0200 | [diff] [blame] | 885 | PIPE_COMPUTE_CAP_GRID_DIMENSION, |
| 886 | PIPE_COMPUTE_CAP_MAX_GRID_SIZE, |
| 887 | PIPE_COMPUTE_CAP_MAX_BLOCK_SIZE, |
Christoph Bumiller | 5c9bccc | 2012-05-12 19:32:46 +0200 | [diff] [blame] | 888 | PIPE_COMPUTE_CAP_MAX_THREADS_PER_BLOCK, |
Francisco Jerez | d9d82dc | 2012-04-25 22:15:16 +0200 | [diff] [blame] | 889 | PIPE_COMPUTE_CAP_MAX_GLOBAL_SIZE, |
| 890 | PIPE_COMPUTE_CAP_MAX_LOCAL_SIZE, |
| 891 | PIPE_COMPUTE_CAP_MAX_PRIVATE_SIZE, |
Tom Stellard | 0e3c30c | 2012-09-21 20:19:14 +0000 | [diff] [blame] | 892 | PIPE_COMPUTE_CAP_MAX_INPUT_SIZE, |
Tom Stellard | 5fe1a0e | 2014-04-18 17:35:59 +0200 | [diff] [blame] | 893 | PIPE_COMPUTE_CAP_MAX_MEM_ALLOC_SIZE, |
Bruno Jiménez | 8f4d378 | 2014-05-30 17:31:10 +0200 | [diff] [blame] | 894 | PIPE_COMPUTE_CAP_MAX_CLOCK_FREQUENCY, |
Tom Stellard | 1607a8e | 2014-07-23 20:37:07 -0400 | [diff] [blame] | 895 | PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITS, |
Grigori Goronzy | 249a9df | 2015-05-28 12:40:29 +0200 | [diff] [blame] | 896 | PIPE_COMPUTE_CAP_IMAGES_SUPPORTED, |
Samuel Pitoiset | 07bb451 | 2016-09-10 16:31:27 +0200 | [diff] [blame] | 897 | PIPE_COMPUTE_CAP_SUBGROUP_SIZE, |
| 898 | PIPE_COMPUTE_CAP_MAX_VARIABLE_THREADS_PER_BLOCK, |
Francisco Jerez | d9d82dc | 2012-04-25 22:15:16 +0200 | [diff] [blame] | 899 | }; |
Younes Manton | f547472 | 2009-09-27 19:49:06 -0400 | [diff] [blame] | 900 | |
Zack Rusin | be7d8dd | 2010-06-07 12:14:56 -0400 | [diff] [blame] | 901 | /** |
| 902 | * Composite query types |
| 903 | */ |
Marek Olšák | 102ed41 | 2012-03-27 21:51:50 +0200 | [diff] [blame] | 904 | |
| 905 | /** |
| 906 | * Query result for PIPE_QUERY_SO_STATISTICS. |
| 907 | */ |
Zack Rusin | be7d8dd | 2010-06-07 12:14:56 -0400 | [diff] [blame] | 908 | struct pipe_query_data_so_statistics |
| 909 | { |
| 910 | uint64_t num_primitives_written; |
| 911 | uint64_t primitives_storage_needed; |
| 912 | }; |
Marek Olšák | 102ed41 | 2012-03-27 21:51:50 +0200 | [diff] [blame] | 913 | |
| 914 | /** |
| 915 | * Query result for PIPE_QUERY_TIMESTAMP_DISJOINT. |
| 916 | */ |
Zack Rusin | e433b73 | 2010-06-22 12:14:29 -0400 | [diff] [blame] | 917 | struct pipe_query_data_timestamp_disjoint |
| 918 | { |
| 919 | uint64_t frequency; |
| 920 | boolean disjoint; |
| 921 | }; |
Keith Whitwell | 8e4a95a | 2007-05-24 10:41:34 +0100 | [diff] [blame] | 922 | |
Marek Olšák | 102ed41 | 2012-03-27 21:51:50 +0200 | [diff] [blame] | 923 | /** |
| 924 | * Query result for PIPE_QUERY_PIPELINE_STATISTICS. |
| 925 | */ |
| 926 | struct pipe_query_data_pipeline_statistics |
| 927 | { |
| 928 | uint64_t ia_vertices; /**< Num vertices read by the vertex fetcher. */ |
| 929 | uint64_t ia_primitives; /**< Num primitives read by the vertex fetcher. */ |
| 930 | uint64_t vs_invocations; /**< Num vertex shader invocations. */ |
| 931 | uint64_t gs_invocations; /**< Num geometry shader invocations. */ |
| 932 | uint64_t gs_primitives; /**< Num primitives output by a geometry shader. */ |
| 933 | uint64_t c_invocations; /**< Num primitives sent to the rasterizer. */ |
| 934 | uint64_t c_primitives; /**< Num primitives that were rendered. */ |
| 935 | uint64_t ps_invocations; /**< Num pixel shader invocations. */ |
| 936 | uint64_t hs_invocations; /**< Num hull shader invocations. */ |
| 937 | uint64_t ds_invocations; /**< Num domain shader invocations. */ |
| 938 | uint64_t cs_invocations; /**< Num compute shader invocations. */ |
| 939 | }; |
| 940 | |
| 941 | /** |
Nicolai Hähnle | d61d4df | 2015-11-10 14:06:59 +0100 | [diff] [blame] | 942 | * For batch queries. |
| 943 | */ |
| 944 | union pipe_numeric_type_union |
| 945 | { |
| 946 | uint64_t u64; |
| 947 | uint32_t u32; |
| 948 | float f; |
| 949 | }; |
| 950 | |
| 951 | /** |
Marek Olšák | 102ed41 | 2012-03-27 21:51:50 +0200 | [diff] [blame] | 952 | * Query result (returned by pipe_context::get_query_result). |
| 953 | */ |
| 954 | union pipe_query_result |
| 955 | { |
| 956 | /* PIPE_QUERY_OCCLUSION_PREDICATE */ |
| 957 | /* PIPE_QUERY_SO_OVERFLOW_PREDICATE */ |
Nicolai Hähnle | a677799 | 2017-07-26 19:16:14 +0200 | [diff] [blame] | 958 | /* PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE */ |
Marek Olšák | 102ed41 | 2012-03-27 21:51:50 +0200 | [diff] [blame] | 959 | /* PIPE_QUERY_GPU_FINISHED */ |
| 960 | boolean b; |
| 961 | |
| 962 | /* PIPE_QUERY_OCCLUSION_COUNTER */ |
| 963 | /* PIPE_QUERY_TIMESTAMP */ |
| 964 | /* PIPE_QUERY_TIME_ELAPSED */ |
| 965 | /* PIPE_QUERY_PRIMITIVES_GENERATED */ |
| 966 | /* PIPE_QUERY_PRIMITIVES_EMITTED */ |
Samuel Pitoiset | d5b2832 | 2014-07-09 13:00:37 +0200 | [diff] [blame] | 967 | /* PIPE_DRIVER_QUERY_TYPE_UINT64 */ |
Nicolai Hähnle | 4e13396 | 2015-11-06 14:19:54 +0100 | [diff] [blame] | 968 | /* PIPE_DRIVER_QUERY_TYPE_BYTES */ |
| 969 | /* PIPE_DRIVER_QUERY_TYPE_MICROSECONDS */ |
Marek Olšák | 6b47b89 | 2015-08-02 17:06:17 +0200 | [diff] [blame] | 970 | /* PIPE_DRIVER_QUERY_TYPE_HZ */ |
Marek Olšák | 102ed41 | 2012-03-27 21:51:50 +0200 | [diff] [blame] | 971 | uint64_t u64; |
| 972 | |
Samuel Pitoiset | d5b2832 | 2014-07-09 13:00:37 +0200 | [diff] [blame] | 973 | /* PIPE_DRIVER_QUERY_TYPE_UINT */ |
| 974 | uint32_t u32; |
| 975 | |
| 976 | /* PIPE_DRIVER_QUERY_TYPE_FLOAT */ |
| 977 | /* PIPE_DRIVER_QUERY_TYPE_PERCENTAGE */ |
| 978 | float f; |
| 979 | |
Marek Olšák | 102ed41 | 2012-03-27 21:51:50 +0200 | [diff] [blame] | 980 | /* PIPE_QUERY_SO_STATISTICS */ |
| 981 | struct pipe_query_data_so_statistics so_statistics; |
| 982 | |
| 983 | /* PIPE_QUERY_TIMESTAMP_DISJOINT */ |
| 984 | struct pipe_query_data_timestamp_disjoint timestamp_disjoint; |
| 985 | |
| 986 | /* PIPE_QUERY_PIPELINE_STATISTICS */ |
| 987 | struct pipe_query_data_pipeline_statistics pipeline_statistics; |
Nicolai Hähnle | d61d4df | 2015-11-10 14:06:59 +0100 | [diff] [blame] | 988 | |
Jose Fonseca | c127e6a | 2015-11-25 13:33:08 +0000 | [diff] [blame] | 989 | /* batch queries (variable length) */ |
| 990 | union pipe_numeric_type_union batch[1]; |
Marek Olšák | 102ed41 | 2012-03-27 21:51:50 +0200 | [diff] [blame] | 991 | }; |
| 992 | |
Ilia Mirkin | 40d7f02 | 2015-05-02 20:28:11 -0400 | [diff] [blame] | 993 | enum pipe_query_value_type |
| 994 | { |
| 995 | PIPE_QUERY_TYPE_I32, |
| 996 | PIPE_QUERY_TYPE_U32, |
| 997 | PIPE_QUERY_TYPE_I64, |
| 998 | PIPE_QUERY_TYPE_U64, |
| 999 | }; |
| 1000 | |
Dave Airlie | 6dd284f | 2011-09-16 09:39:34 +0100 | [diff] [blame] | 1001 | union pipe_color_union |
| 1002 | { |
| 1003 | float f[4]; |
| 1004 | int i[4]; |
| 1005 | unsigned int ui[4]; |
| 1006 | }; |
Thomas Balling Sørensen | 1218430 | 2010-10-05 12:04:08 +0200 | [diff] [blame] | 1007 | |
Samuel Pitoiset | b620829 | 2014-07-04 11:41:46 +0200 | [diff] [blame] | 1008 | enum pipe_driver_query_type |
| 1009 | { |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 1010 | PIPE_DRIVER_QUERY_TYPE_UINT64, |
| 1011 | PIPE_DRIVER_QUERY_TYPE_UINT, |
| 1012 | PIPE_DRIVER_QUERY_TYPE_FLOAT, |
| 1013 | PIPE_DRIVER_QUERY_TYPE_PERCENTAGE, |
| 1014 | PIPE_DRIVER_QUERY_TYPE_BYTES, |
| 1015 | PIPE_DRIVER_QUERY_TYPE_MICROSECONDS, |
| 1016 | PIPE_DRIVER_QUERY_TYPE_HZ, |
Steven Toth | 8c60bcb | 2016-09-28 12:58:00 -0600 | [diff] [blame] | 1017 | PIPE_DRIVER_QUERY_TYPE_DBM, |
| 1018 | PIPE_DRIVER_QUERY_TYPE_TEMPERATURE, |
| 1019 | PIPE_DRIVER_QUERY_TYPE_VOLTS, |
| 1020 | PIPE_DRIVER_QUERY_TYPE_AMPS, |
Steven Toth | 1d466b9 | 2016-09-29 08:11:00 -0600 | [diff] [blame] | 1021 | PIPE_DRIVER_QUERY_TYPE_WATTS, |
Samuel Pitoiset | b620829 | 2014-07-04 11:41:46 +0200 | [diff] [blame] | 1022 | }; |
| 1023 | |
Marek Olšák | 97a65d9 | 2015-08-02 17:24:30 +0200 | [diff] [blame] | 1024 | /* Whether an average value per frame or a cumulative value should be |
| 1025 | * displayed. |
| 1026 | */ |
| 1027 | enum pipe_driver_query_result_type |
| 1028 | { |
Marek Olšák | 0135bd4 | 2016-04-16 13:35:08 +0200 | [diff] [blame] | 1029 | PIPE_DRIVER_QUERY_RESULT_TYPE_AVERAGE, |
| 1030 | PIPE_DRIVER_QUERY_RESULT_TYPE_CUMULATIVE, |
Marek Olšák | 97a65d9 | 2015-08-02 17:24:30 +0200 | [diff] [blame] | 1031 | }; |
| 1032 | |
Nicolai Hähnle | d61d4df | 2015-11-10 14:06:59 +0100 | [diff] [blame] | 1033 | /** |
| 1034 | * Some hardware requires some hardware-specific queries to be submitted |
| 1035 | * as batched queries. The corresponding query objects are created using |
| 1036 | * create_batch_query, and at most one such query may be active at |
| 1037 | * any time. |
| 1038 | */ |
| 1039 | #define PIPE_DRIVER_QUERY_FLAG_BATCH (1 << 0) |
Samuel Pitoiset | 546ec98 | 2014-07-07 23:49:14 +0200 | [diff] [blame] | 1040 | |
Nicolai Hähnle | f36d985 | 2015-11-19 12:13:43 +0100 | [diff] [blame] | 1041 | /* Do not list this query in the HUD. */ |
| 1042 | #define PIPE_DRIVER_QUERY_FLAG_DONT_LIST (1 << 1) |
| 1043 | |
Marek Olšák | 8ddcd71 | 2013-03-21 19:32:24 +0100 | [diff] [blame] | 1044 | struct pipe_driver_query_info |
| 1045 | { |
| 1046 | const char *name; |
| 1047 | unsigned query_type; /* PIPE_QUERY_DRIVER_SPECIFIC + i */ |
Samuel Pitoiset | 546ec98 | 2014-07-07 23:49:14 +0200 | [diff] [blame] | 1048 | union pipe_numeric_type_union max_value; /* max value that can be returned */ |
Samuel Pitoiset | b620829 | 2014-07-04 11:41:46 +0200 | [diff] [blame] | 1049 | enum pipe_driver_query_type type; |
Marek Olšák | 97a65d9 | 2015-08-02 17:24:30 +0200 | [diff] [blame] | 1050 | enum pipe_driver_query_result_type result_type; |
Samuel Pitoiset | b620829 | 2014-07-04 11:41:46 +0200 | [diff] [blame] | 1051 | unsigned group_id; |
Nicolai Hähnle | d61d4df | 2015-11-10 14:06:59 +0100 | [diff] [blame] | 1052 | unsigned flags; |
Marek Olšák | 8ddcd71 | 2013-03-21 19:32:24 +0100 | [diff] [blame] | 1053 | }; |
| 1054 | |
Samuel Pitoiset | f137f5c | 2014-07-04 11:24:02 +0200 | [diff] [blame] | 1055 | struct pipe_driver_query_group_info |
| 1056 | { |
| 1057 | const char *name; |
Samuel Pitoiset | f137f5c | 2014-07-04 11:24:02 +0200 | [diff] [blame] | 1058 | unsigned max_active_queries; |
| 1059 | unsigned num_queries; |
| 1060 | }; |
| 1061 | |
Ilia Mirkin | fc76cc0 | 2015-10-30 03:17:35 -0400 | [diff] [blame] | 1062 | enum pipe_debug_type |
| 1063 | { |
| 1064 | PIPE_DEBUG_TYPE_OUT_OF_MEMORY = 1, |
| 1065 | PIPE_DEBUG_TYPE_ERROR, |
| 1066 | PIPE_DEBUG_TYPE_SHADER_INFO, |
| 1067 | PIPE_DEBUG_TYPE_PERF_INFO, |
| 1068 | PIPE_DEBUG_TYPE_INFO, |
| 1069 | PIPE_DEBUG_TYPE_FALLBACK, |
| 1070 | PIPE_DEBUG_TYPE_CONFORMANCE, |
| 1071 | }; |
| 1072 | |
| 1073 | |
Keith Whitwell | 8e4a95a | 2007-05-24 10:41:34 +0100 | [diff] [blame] | 1074 | #ifdef __cplusplus |
| 1075 | } |
| 1076 | #endif |
| 1077 | |
| 1078 | #endif |