14a49301eSmrg/**************************************************************************
24a49301eSmrg *
3af69d88dSmrg * Copyright 2007 VMware, Inc.
44a49301eSmrg * All Rights Reserved.
54a49301eSmrg *
64a49301eSmrg * Permission is hereby granted, free of charge, to any person obtaining a
74a49301eSmrg * copy of this software and associated documentation files (the
84a49301eSmrg * "Software"), to deal in the Software without restriction, including
94a49301eSmrg * without limitation the rights to use, copy, modify, merge, publish,
104a49301eSmrg * distribute, sub license, and/or sell copies of the Software, and to
114a49301eSmrg * permit persons to whom the Software is furnished to do so, subject to
124a49301eSmrg * the following conditions:
134a49301eSmrg *
144a49301eSmrg * The above copyright notice and this permission notice (including the
154a49301eSmrg * next paragraph) shall be included in all copies or substantial portions
164a49301eSmrg * of the Software.
174a49301eSmrg *
184a49301eSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
194a49301eSmrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
204a49301eSmrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21af69d88dSmrg * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
224a49301eSmrg * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
234a49301eSmrg * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
244a49301eSmrg * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
254a49301eSmrg *
264a49301eSmrg **************************************************************************/
274a49301eSmrg
284a49301eSmrg#ifndef PIPE_DEFINES_H
294a49301eSmrg#define PIPE_DEFINES_H
304a49301eSmrg
313464ebd5Sriastradh#include "p_compiler.h"
324a49301eSmrg
334a49301eSmrg#ifdef __cplusplus
344a49301eSmrgextern "C" {
354a49301eSmrg#endif
364a49301eSmrg
374a49301eSmrg/**
384a49301eSmrg * Gallium error codes.
394a49301eSmrg *
404a49301eSmrg * - A zero value always means success.
414a49301eSmrg * - A negative value always means failure.
424a49301eSmrg * - The meaning of a positive value is function dependent.
434a49301eSmrg */
4401e04c3fSmrgenum pipe_error
4501e04c3fSmrg{
464a49301eSmrg   PIPE_OK = 0,
474a49301eSmrg   PIPE_ERROR = -1,    /**< Generic error */
484a49301eSmrg   PIPE_ERROR_BAD_INPUT = -2,
494a49301eSmrg   PIPE_ERROR_OUT_OF_MEMORY = -3,
504a49301eSmrg   PIPE_ERROR_RETRY = -4
514a49301eSmrg   /* TODO */
524a49301eSmrg};
534a49301eSmrg
5401e04c3fSmrgenum pipe_blendfactor {
5501e04c3fSmrg   PIPE_BLENDFACTOR_ONE = 1,
5601e04c3fSmrg   PIPE_BLENDFACTOR_SRC_COLOR,
5701e04c3fSmrg   PIPE_BLENDFACTOR_SRC_ALPHA,
5801e04c3fSmrg   PIPE_BLENDFACTOR_DST_ALPHA,
5901e04c3fSmrg   PIPE_BLENDFACTOR_DST_COLOR,
6001e04c3fSmrg   PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE,
6101e04c3fSmrg   PIPE_BLENDFACTOR_CONST_COLOR,
6201e04c3fSmrg   PIPE_BLENDFACTOR_CONST_ALPHA,
6301e04c3fSmrg   PIPE_BLENDFACTOR_SRC1_COLOR,
6401e04c3fSmrg   PIPE_BLENDFACTOR_SRC1_ALPHA,
6501e04c3fSmrg
6601e04c3fSmrg   PIPE_BLENDFACTOR_ZERO = 0x11,
6701e04c3fSmrg   PIPE_BLENDFACTOR_INV_SRC_COLOR,
6801e04c3fSmrg   PIPE_BLENDFACTOR_INV_SRC_ALPHA,
6901e04c3fSmrg   PIPE_BLENDFACTOR_INV_DST_ALPHA,
7001e04c3fSmrg   PIPE_BLENDFACTOR_INV_DST_COLOR,
7101e04c3fSmrg
7201e04c3fSmrg   PIPE_BLENDFACTOR_INV_CONST_COLOR = 0x17,
7301e04c3fSmrg   PIPE_BLENDFACTOR_INV_CONST_ALPHA,
7401e04c3fSmrg   PIPE_BLENDFACTOR_INV_SRC1_COLOR,
7501e04c3fSmrg   PIPE_BLENDFACTOR_INV_SRC1_ALPHA,
7601e04c3fSmrg};
774a49301eSmrg
7801e04c3fSmrgenum pipe_blend_func {
7901e04c3fSmrg   PIPE_BLEND_ADD,
8001e04c3fSmrg   PIPE_BLEND_SUBTRACT,
8101e04c3fSmrg   PIPE_BLEND_REVERSE_SUBTRACT,
8201e04c3fSmrg   PIPE_BLEND_MIN,
8301e04c3fSmrg   PIPE_BLEND_MAX,
8401e04c3fSmrg};
8501e04c3fSmrg
8601e04c3fSmrgenum pipe_logicop {
8701e04c3fSmrg   PIPE_LOGICOP_CLEAR,
8801e04c3fSmrg   PIPE_LOGICOP_NOR,
8901e04c3fSmrg   PIPE_LOGICOP_AND_INVERTED,
9001e04c3fSmrg   PIPE_LOGICOP_COPY_INVERTED,
9101e04c3fSmrg   PIPE_LOGICOP_AND_REVERSE,
9201e04c3fSmrg   PIPE_LOGICOP_INVERT,
9301e04c3fSmrg   PIPE_LOGICOP_XOR,
9401e04c3fSmrg   PIPE_LOGICOP_NAND,
9501e04c3fSmrg   PIPE_LOGICOP_AND,
9601e04c3fSmrg   PIPE_LOGICOP_EQUIV,
9701e04c3fSmrg   PIPE_LOGICOP_NOOP,
9801e04c3fSmrg   PIPE_LOGICOP_OR_INVERTED,
9901e04c3fSmrg   PIPE_LOGICOP_COPY,
10001e04c3fSmrg   PIPE_LOGICOP_OR_REVERSE,
10101e04c3fSmrg   PIPE_LOGICOP_OR,
10201e04c3fSmrg   PIPE_LOGICOP_SET,
10301e04c3fSmrg};
1044a49301eSmrg
1054a49301eSmrg#define PIPE_MASK_R  0x1
1064a49301eSmrg#define PIPE_MASK_G  0x2
1074a49301eSmrg#define PIPE_MASK_B  0x4
1084a49301eSmrg#define PIPE_MASK_A  0x8
1094a49301eSmrg#define PIPE_MASK_RGBA 0xf
110af69d88dSmrg#define PIPE_MASK_Z  0x10
111af69d88dSmrg#define PIPE_MASK_S  0x20
112af69d88dSmrg#define PIPE_MASK_ZS 0x30
113af69d88dSmrg#define PIPE_MASK_RGBAZS (PIPE_MASK_RGBA|PIPE_MASK_ZS)
1144a49301eSmrg
1154a49301eSmrg
1164a49301eSmrg/**
1174a49301eSmrg * Inequality functions.  Used for depth test, stencil compare, alpha
1184a49301eSmrg * test, shadow compare, etc.
1194a49301eSmrg */
12001e04c3fSmrgenum pipe_compare_func {
12101e04c3fSmrg   PIPE_FUNC_NEVER,
12201e04c3fSmrg   PIPE_FUNC_LESS,
12301e04c3fSmrg   PIPE_FUNC_EQUAL,
12401e04c3fSmrg   PIPE_FUNC_LEQUAL,
12501e04c3fSmrg   PIPE_FUNC_GREATER,
12601e04c3fSmrg   PIPE_FUNC_NOTEQUAL,
12701e04c3fSmrg   PIPE_FUNC_GEQUAL,
12801e04c3fSmrg   PIPE_FUNC_ALWAYS,
12901e04c3fSmrg};
1304a49301eSmrg
1314a49301eSmrg/** Polygon fill mode */
13201e04c3fSmrgenum {
13301e04c3fSmrg   PIPE_POLYGON_MODE_FILL,
13401e04c3fSmrg   PIPE_POLYGON_MODE_LINE,
13501e04c3fSmrg   PIPE_POLYGON_MODE_POINT,
13601e04c3fSmrg   PIPE_POLYGON_MODE_FILL_RECTANGLE,
13701e04c3fSmrg};
1384a49301eSmrg
1393464ebd5Sriastradh/** Polygon face specification, eg for culling */
1403464ebd5Sriastradh#define PIPE_FACE_NONE           0
1413464ebd5Sriastradh#define PIPE_FACE_FRONT          1
1423464ebd5Sriastradh#define PIPE_FACE_BACK           2
1433464ebd5Sriastradh#define PIPE_FACE_FRONT_AND_BACK (PIPE_FACE_FRONT | PIPE_FACE_BACK)
1444a49301eSmrg
1454a49301eSmrg/** Stencil ops */
14601e04c3fSmrgenum pipe_stencil_op {
14701e04c3fSmrg   PIPE_STENCIL_OP_KEEP,
14801e04c3fSmrg   PIPE_STENCIL_OP_ZERO,
14901e04c3fSmrg   PIPE_STENCIL_OP_REPLACE,
15001e04c3fSmrg   PIPE_STENCIL_OP_INCR,
15101e04c3fSmrg   PIPE_STENCIL_OP_DECR,
15201e04c3fSmrg   PIPE_STENCIL_OP_INCR_WRAP,
15301e04c3fSmrg   PIPE_STENCIL_OP_DECR_WRAP,
15401e04c3fSmrg   PIPE_STENCIL_OP_INVERT,
15501e04c3fSmrg};
1564a49301eSmrg
1573464ebd5Sriastradh/** Texture types.
15801e04c3fSmrg * See the documentation for info on PIPE_TEXTURE_RECT vs PIPE_TEXTURE_2D
15901e04c3fSmrg */
16001e04c3fSmrgenum pipe_texture_target
16101e04c3fSmrg{
16201e04c3fSmrg   PIPE_BUFFER,
16301e04c3fSmrg   PIPE_TEXTURE_1D,
16401e04c3fSmrg   PIPE_TEXTURE_2D,
16501e04c3fSmrg   PIPE_TEXTURE_3D,
16601e04c3fSmrg   PIPE_TEXTURE_CUBE,
16701e04c3fSmrg   PIPE_TEXTURE_RECT,
16801e04c3fSmrg   PIPE_TEXTURE_1D_ARRAY,
16901e04c3fSmrg   PIPE_TEXTURE_2D_ARRAY,
17001e04c3fSmrg   PIPE_TEXTURE_CUBE_ARRAY,
17101e04c3fSmrg   PIPE_MAX_TEXTURE_TYPES,
17201e04c3fSmrg};
17301e04c3fSmrg
17401e04c3fSmrgenum pipe_tex_face {
17501e04c3fSmrg   PIPE_TEX_FACE_POS_X,
17601e04c3fSmrg   PIPE_TEX_FACE_NEG_X,
17701e04c3fSmrg   PIPE_TEX_FACE_POS_Y,
17801e04c3fSmrg   PIPE_TEX_FACE_NEG_Y,
17901e04c3fSmrg   PIPE_TEX_FACE_POS_Z,
18001e04c3fSmrg   PIPE_TEX_FACE_NEG_Z,
18101e04c3fSmrg   PIPE_TEX_FACE_MAX,
18201e04c3fSmrg};
18301e04c3fSmrg
18401e04c3fSmrgenum pipe_tex_wrap {
18501e04c3fSmrg   PIPE_TEX_WRAP_REPEAT,
18601e04c3fSmrg   PIPE_TEX_WRAP_CLAMP,
18701e04c3fSmrg   PIPE_TEX_WRAP_CLAMP_TO_EDGE,
18801e04c3fSmrg   PIPE_TEX_WRAP_CLAMP_TO_BORDER,
18901e04c3fSmrg   PIPE_TEX_WRAP_MIRROR_REPEAT,
19001e04c3fSmrg   PIPE_TEX_WRAP_MIRROR_CLAMP,
19101e04c3fSmrg   PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE,
19201e04c3fSmrg   PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER,
19301e04c3fSmrg};
19401e04c3fSmrg
19501e04c3fSmrg/** Between mipmaps, ie mipfilter */
19601e04c3fSmrgenum pipe_tex_mipfilter {
19701e04c3fSmrg   PIPE_TEX_MIPFILTER_NEAREST,
19801e04c3fSmrg   PIPE_TEX_MIPFILTER_LINEAR,
19901e04c3fSmrg   PIPE_TEX_MIPFILTER_NONE,
20001e04c3fSmrg};
20101e04c3fSmrg
20201e04c3fSmrg/** Within a mipmap, ie min/mag filter */
20301e04c3fSmrgenum pipe_tex_filter {
20401e04c3fSmrg   PIPE_TEX_FILTER_NEAREST,
20501e04c3fSmrg   PIPE_TEX_FILTER_LINEAR,
20601e04c3fSmrg};
20701e04c3fSmrg
20801e04c3fSmrgenum pipe_tex_compare {
20901e04c3fSmrg   PIPE_TEX_COMPARE_NONE,
21001e04c3fSmrg   PIPE_TEX_COMPARE_R_TO_TEXTURE,
21101e04c3fSmrg};
2124a49301eSmrg
2137ec681f3Smrgenum pipe_tex_reduction_mode {
2147ec681f3Smrg   PIPE_TEX_REDUCTION_WEIGHTED_AVERAGE,
2157ec681f3Smrg   PIPE_TEX_REDUCTION_MIN,
2167ec681f3Smrg   PIPE_TEX_REDUCTION_MAX,
2177ec681f3Smrg};
2187ec681f3Smrg
2194a49301eSmrg/**
2204a49301eSmrg * Clear buffer bits
2214a49301eSmrg */
222af69d88dSmrg#define PIPE_CLEAR_DEPTH        (1 << 0)
223af69d88dSmrg#define PIPE_CLEAR_STENCIL      (1 << 1)
224af69d88dSmrg#define PIPE_CLEAR_COLOR0       (1 << 2)
225af69d88dSmrg#define PIPE_CLEAR_COLOR1       (1 << 3)
226af69d88dSmrg#define PIPE_CLEAR_COLOR2       (1 << 4)
227af69d88dSmrg#define PIPE_CLEAR_COLOR3       (1 << 5)
228af69d88dSmrg#define PIPE_CLEAR_COLOR4       (1 << 6)
229af69d88dSmrg#define PIPE_CLEAR_COLOR5       (1 << 7)
230af69d88dSmrg#define PIPE_CLEAR_COLOR6       (1 << 8)
231af69d88dSmrg#define PIPE_CLEAR_COLOR7       (1 << 9)
232af69d88dSmrg/** Combined flags */
2334a49301eSmrg/** All color buffers currently bound */
234af69d88dSmrg#define PIPE_CLEAR_COLOR        (PIPE_CLEAR_COLOR0 | PIPE_CLEAR_COLOR1 | \
235af69d88dSmrg                                 PIPE_CLEAR_COLOR2 | PIPE_CLEAR_COLOR3 | \
236af69d88dSmrg                                 PIPE_CLEAR_COLOR4 | PIPE_CLEAR_COLOR5 | \
237af69d88dSmrg                                 PIPE_CLEAR_COLOR6 | PIPE_CLEAR_COLOR7)
2383464ebd5Sriastradh#define PIPE_CLEAR_DEPTHSTENCIL (PIPE_CLEAR_DEPTH | PIPE_CLEAR_STENCIL)
2394a49301eSmrg
2404a49301eSmrg/**
2417ec681f3Smrg * CPU access map flags
2424a49301eSmrg */
2437ec681f3Smrgenum pipe_map_flags
24401e04c3fSmrg{
2453464ebd5Sriastradh   /**
2463464ebd5Sriastradh    * Resource contents read back (or accessed directly) at transfer
2473464ebd5Sriastradh    * create time.
2483464ebd5Sriastradh    */
2497ec681f3Smrg   PIPE_MAP_READ = 1 << 0,
2503464ebd5Sriastradh
2513464ebd5Sriastradh   /**
2527ec681f3Smrg    * Resource contents will be written back at buffer/texture_unmap
2533464ebd5Sriastradh    * time (or modified as a result of being accessed directly).
2543464ebd5Sriastradh    */
2557ec681f3Smrg   PIPE_MAP_WRITE = 1 << 1,
2563464ebd5Sriastradh
2573464ebd5Sriastradh   /**
2583464ebd5Sriastradh    * Read/modify/write
2593464ebd5Sriastradh    */
2607ec681f3Smrg   PIPE_MAP_READ_WRITE = PIPE_MAP_READ | PIPE_MAP_WRITE,
2613464ebd5Sriastradh
2624a49301eSmrg   /**
2634a49301eSmrg    * The transfer should map the texture storage directly. The driver may
2647ec681f3Smrg    * return NULL if that isn't possible, and the gallium frontend needs to cope
2654a49301eSmrg    * with that and use an alternative path without this flag.
2664a49301eSmrg    *
2677ec681f3Smrg    * E.g. the gallium frontend could have a simpler path which maps textures and
2684a49301eSmrg    * does read/modify/write cycles on them directly, and a more complicated
2694a49301eSmrg    * path which uses minimal read and write transfers.
2707ec681f3Smrg    *
2717ec681f3Smrg    * This flag supresses implicit "DISCARD" for buffer_subdata.
2724a49301eSmrg    */
2737ec681f3Smrg   PIPE_MAP_DIRECTLY = 1 << 2,
2744a49301eSmrg
2753464ebd5Sriastradh   /**
2763464ebd5Sriastradh    * Discards the memory within the mapped region.
2773464ebd5Sriastradh    *
2787ec681f3Smrg    * It should not be used with PIPE_MAP_READ.
2793464ebd5Sriastradh    *
2803464ebd5Sriastradh    * See also:
2813464ebd5Sriastradh    * - OpenGL's ARB_map_buffer_range extension, MAP_INVALIDATE_RANGE_BIT flag.
2823464ebd5Sriastradh    */
2837ec681f3Smrg   PIPE_MAP_DISCARD_RANGE = 1 << 3,
2844a49301eSmrg
2853464ebd5Sriastradh   /**
2863464ebd5Sriastradh    * Fail if the resource cannot be mapped immediately.
2873464ebd5Sriastradh    *
2883464ebd5Sriastradh    * See also:
2893464ebd5Sriastradh    * - Direct3D's D3DLOCK_DONOTWAIT flag.
29001e04c3fSmrg    * - Mesa's MESA_MAP_NOWAIT_BIT flag.
2913464ebd5Sriastradh    * - WDDM's D3DDDICB_LOCKFLAGS.DonotWait flag.
2923464ebd5Sriastradh    */
2937ec681f3Smrg   PIPE_MAP_DONTBLOCK = 1 << 4,
2944a49301eSmrg
2953464ebd5Sriastradh   /**
2963464ebd5Sriastradh    * Do not attempt to synchronize pending operations on the resource when mapping.
2973464ebd5Sriastradh    *
2987ec681f3Smrg    * It should not be used with PIPE_MAP_READ.
2993464ebd5Sriastradh    *
3003464ebd5Sriastradh    * See also:
3013464ebd5Sriastradh    * - OpenGL's ARB_map_buffer_range extension, MAP_UNSYNCHRONIZED_BIT flag.
3023464ebd5Sriastradh    * - Direct3D's D3DLOCK_NOOVERWRITE flag.
3033464ebd5Sriastradh    * - WDDM's D3DDDICB_LOCKFLAGS.IgnoreSync flag.
3043464ebd5Sriastradh    */
3057ec681f3Smrg   PIPE_MAP_UNSYNCHRONIZED = 1 << 5,
3064a49301eSmrg
3073464ebd5Sriastradh   /**
3083464ebd5Sriastradh    * Written ranges will be notified later with
3093464ebd5Sriastradh    * pipe_context::transfer_flush_region.
3103464ebd5Sriastradh    *
3117ec681f3Smrg    * It should not be used with PIPE_MAP_READ.
3123464ebd5Sriastradh    *
3133464ebd5Sriastradh    * See also:
3143464ebd5Sriastradh    * - pipe_context::transfer_flush_region
3153464ebd5Sriastradh    * - OpenGL's ARB_map_buffer_range extension, MAP_FLUSH_EXPLICIT_BIT flag.
3163464ebd5Sriastradh    */
3177ec681f3Smrg   PIPE_MAP_FLUSH_EXPLICIT = 1 << 6,
3184a49301eSmrg
3193464ebd5Sriastradh   /**
3203464ebd5Sriastradh    * Discards all memory backing the resource.
3213464ebd5Sriastradh    *
3227ec681f3Smrg    * It should not be used with PIPE_MAP_READ.
3233464ebd5Sriastradh    *
3243464ebd5Sriastradh    * This is equivalent to:
3253464ebd5Sriastradh    * - OpenGL's ARB_map_buffer_range extension, MAP_INVALIDATE_BUFFER_BIT
3263464ebd5Sriastradh    * - BufferData(NULL) on a GL buffer
3273464ebd5Sriastradh    * - Direct3D's D3DLOCK_DISCARD flag.
3283464ebd5Sriastradh    * - WDDM's D3DDDICB_LOCKFLAGS.Discard flag.
3293464ebd5Sriastradh    * - D3D10 DDI's D3D10_DDI_MAP_WRITE_DISCARD flag
3303464ebd5Sriastradh    * - D3D10's D3D10_MAP_WRITE_DISCARD flag.
3313464ebd5Sriastradh    */
3327ec681f3Smrg   PIPE_MAP_DISCARD_WHOLE_RESOURCE = 1 << 7,
3334a49301eSmrg
334af69d88dSmrg   /**
335af69d88dSmrg    * Allows the resource to be used for rendering while mapped.
336af69d88dSmrg    *
337af69d88dSmrg    * PIPE_RESOURCE_FLAG_MAP_PERSISTENT must be set when creating
338af69d88dSmrg    * the resource.
339af69d88dSmrg    *
340af69d88dSmrg    * If COHERENT is not set, memory_barrier(PIPE_BARRIER_MAPPED_BUFFER)
341af69d88dSmrg    * must be called to ensure the device can see what the CPU has written.
342af69d88dSmrg    */
3437ec681f3Smrg   PIPE_MAP_PERSISTENT = 1 << 8,
344af69d88dSmrg
345af69d88dSmrg   /**
346af69d88dSmrg    * If PERSISTENT is set, this ensures any writes done by the device are
347af69d88dSmrg    * immediately visible to the CPU and vice versa.
348af69d88dSmrg    *
349af69d88dSmrg    * PIPE_RESOURCE_FLAG_MAP_COHERENT must be set when creating
350af69d88dSmrg    * the resource.
351af69d88dSmrg    */
3527ec681f3Smrg   PIPE_MAP_COHERENT = 1 << 9,
3537ec681f3Smrg
3547ec681f3Smrg   /**
3557ec681f3Smrg    * Map a resource in a thread-safe manner, because the calling thread can
3567ec681f3Smrg    * be any thread. It can only be used if both WRITE and UNSYNCHRONIZED are
3577ec681f3Smrg    * set.
3587ec681f3Smrg    */
3597ec681f3Smrg   PIPE_MAP_THREAD_SAFE = 1 << 10,
3607ec681f3Smrg
3617ec681f3Smrg   /**
3627ec681f3Smrg    * Map only the depth aspect of a resource
3637ec681f3Smrg    */
3647ec681f3Smrg   PIPE_MAP_DEPTH_ONLY = 1 << 11,
3657ec681f3Smrg
3667ec681f3Smrg   /**
3677ec681f3Smrg    * Map only the stencil aspect of a resource
3687ec681f3Smrg    */
3697ec681f3Smrg   PIPE_MAP_STENCIL_ONLY = 1 << 12,
3707ec681f3Smrg
3717ec681f3Smrg   /**
3727ec681f3Smrg    * Mapping will be used only once (never remapped).
3737ec681f3Smrg    */
3747ec681f3Smrg   PIPE_MAP_ONCE = 1 << 13,
3759f464c52Smaya
3769f464c52Smaya   /**
3779f464c52Smaya    * This and higher bits are reserved for private use by drivers. Drivers
3787ec681f3Smrg    * should use this as (PIPE_MAP_DRV_PRV << i).
3799f464c52Smaya    */
3807ec681f3Smrg   PIPE_MAP_DRV_PRV = 1 << 14,
3813464ebd5Sriastradh};
3824a49301eSmrg
383af69d88dSmrg/**
384af69d88dSmrg * Flags for the flush function.
385af69d88dSmrg */
38601e04c3fSmrgenum pipe_flush_flags
38701e04c3fSmrg{
38801e04c3fSmrg   PIPE_FLUSH_END_OF_FRAME = (1 << 0),
38901e04c3fSmrg   PIPE_FLUSH_DEFERRED = (1 << 1),
39001e04c3fSmrg   PIPE_FLUSH_FENCE_FD = (1 << 2),
39101e04c3fSmrg   PIPE_FLUSH_ASYNC = (1 << 3),
39201e04c3fSmrg   PIPE_FLUSH_HINT_FINISH = (1 << 4),
39301e04c3fSmrg   PIPE_FLUSH_TOP_OF_PIPE = (1 << 5),
39401e04c3fSmrg   PIPE_FLUSH_BOTTOM_OF_PIPE = (1 << 6),
395af69d88dSmrg};
396af69d88dSmrg
39701e04c3fSmrg/**
39801e04c3fSmrg * Flags for pipe_context::dump_debug_state.
39901e04c3fSmrg */
40001e04c3fSmrg#define PIPE_DUMP_DEVICE_STATUS_REGISTERS    (1 << 0)
40101e04c3fSmrg
40201e04c3fSmrg/**
40301e04c3fSmrg * Create a compute-only context. Use in pipe_screen::context_create.
40401e04c3fSmrg * This disables draw, blit, and clear*, render_condition, and other graphics
40501e04c3fSmrg * functions. Interop with other graphics contexts is still allowed.
40601e04c3fSmrg * This allows scheduling jobs on a compute-only hardware command queue that
40701e04c3fSmrg * can run in parallel with graphics without stalling it.
40801e04c3fSmrg */
40901e04c3fSmrg#define PIPE_CONTEXT_COMPUTE_ONLY      (1 << 0)
41001e04c3fSmrg
41101e04c3fSmrg/**
41201e04c3fSmrg * Gather debug information and expect that pipe_context::dump_debug_state
41301e04c3fSmrg * will be called. Use in pipe_screen::context_create.
41401e04c3fSmrg */
41501e04c3fSmrg#define PIPE_CONTEXT_DEBUG             (1 << 1)
41601e04c3fSmrg
41701e04c3fSmrg/**
41801e04c3fSmrg * Whether out-of-bounds shader loads must return zero and out-of-bounds
41901e04c3fSmrg * shader stores must be dropped.
42001e04c3fSmrg */
42101e04c3fSmrg#define PIPE_CONTEXT_ROBUST_BUFFER_ACCESS (1 << 2)
42201e04c3fSmrg
42301e04c3fSmrg/**
42401e04c3fSmrg * Prefer threaded pipe_context. It also implies that video codec functions
42501e04c3fSmrg * will not be used. (they will be either no-ops or NULL when threading is
42601e04c3fSmrg * enabled)
42701e04c3fSmrg */
42801e04c3fSmrg#define PIPE_CONTEXT_PREFER_THREADED   (1 << 3)
42901e04c3fSmrg
43001e04c3fSmrg/**
43101e04c3fSmrg * Create a high priority context.
43201e04c3fSmrg */
43301e04c3fSmrg#define PIPE_CONTEXT_HIGH_PRIORITY     (1 << 4)
43401e04c3fSmrg
43501e04c3fSmrg/**
43601e04c3fSmrg * Create a low priority context.
43701e04c3fSmrg */
43801e04c3fSmrg#define PIPE_CONTEXT_LOW_PRIORITY      (1 << 5)
43901e04c3fSmrg
4409f464c52Smaya/** Stop execution if the device is reset. */
4419f464c52Smaya#define PIPE_CONTEXT_LOSE_CONTEXT_ON_RESET (1 << 6)
4429f464c52Smaya
443af69d88dSmrg/**
444af69d88dSmrg * Flags for pipe_context::memory_barrier.
445af69d88dSmrg */
446af69d88dSmrg#define PIPE_BARRIER_MAPPED_BUFFER     (1 << 0)
44701e04c3fSmrg#define PIPE_BARRIER_SHADER_BUFFER     (1 << 1)
44801e04c3fSmrg#define PIPE_BARRIER_QUERY_BUFFER      (1 << 2)
44901e04c3fSmrg#define PIPE_BARRIER_VERTEX_BUFFER     (1 << 3)
45001e04c3fSmrg#define PIPE_BARRIER_INDEX_BUFFER      (1 << 4)
45101e04c3fSmrg#define PIPE_BARRIER_CONSTANT_BUFFER   (1 << 5)
45201e04c3fSmrg#define PIPE_BARRIER_INDIRECT_BUFFER   (1 << 6)
45301e04c3fSmrg#define PIPE_BARRIER_TEXTURE           (1 << 7)
45401e04c3fSmrg#define PIPE_BARRIER_IMAGE             (1 << 8)
45501e04c3fSmrg#define PIPE_BARRIER_FRAMEBUFFER       (1 << 9)
45601e04c3fSmrg#define PIPE_BARRIER_STREAMOUT_BUFFER  (1 << 10)
45701e04c3fSmrg#define PIPE_BARRIER_GLOBAL_BUFFER     (1 << 11)
4589f464c52Smaya#define PIPE_BARRIER_UPDATE_BUFFER     (1 << 12)
4599f464c52Smaya#define PIPE_BARRIER_UPDATE_TEXTURE    (1 << 13)
4609f464c52Smaya#define PIPE_BARRIER_ALL               ((1 << 14) - 1)
4619f464c52Smaya
4629f464c52Smaya#define PIPE_BARRIER_UPDATE \
4639f464c52Smaya   (PIPE_BARRIER_UPDATE_BUFFER | PIPE_BARRIER_UPDATE_TEXTURE)
46401e04c3fSmrg
46501e04c3fSmrg/**
46601e04c3fSmrg * Flags for pipe_context::texture_barrier.
46701e04c3fSmrg */
46801e04c3fSmrg#define PIPE_TEXTURE_BARRIER_SAMPLER      (1 << 0)
46901e04c3fSmrg#define PIPE_TEXTURE_BARRIER_FRAMEBUFFER  (1 << 1)
4704a49301eSmrg
47101e04c3fSmrg/**
4727ec681f3Smrg * Resource binding flags -- gallium frontends must specify in advance all
4733464ebd5Sriastradh * the ways a resource might be used.
4743464ebd5Sriastradh */
4753464ebd5Sriastradh#define PIPE_BIND_DEPTH_STENCIL        (1 << 0) /* create_surface */
4763464ebd5Sriastradh#define PIPE_BIND_RENDER_TARGET        (1 << 1) /* create_surface */
477af69d88dSmrg#define PIPE_BIND_BLENDABLE            (1 << 2) /* create_surface */
478af69d88dSmrg#define PIPE_BIND_SAMPLER_VIEW         (1 << 3) /* create_sampler_view */
479af69d88dSmrg#define PIPE_BIND_VERTEX_BUFFER        (1 << 4) /* set_vertex_buffers */
480af69d88dSmrg#define PIPE_BIND_INDEX_BUFFER         (1 << 5) /* draw_elements */
481af69d88dSmrg#define PIPE_BIND_CONSTANT_BUFFER      (1 << 6) /* set_constant_buffer */
48201e04c3fSmrg#define PIPE_BIND_DISPLAY_TARGET       (1 << 7) /* flush_front_buffer */
48301e04c3fSmrg/* gap */
48401e04c3fSmrg#define PIPE_BIND_STREAM_OUTPUT        (1 << 10) /* set_stream_output_buffers */
48501e04c3fSmrg#define PIPE_BIND_CURSOR               (1 << 11) /* mouse cursor */
4867ec681f3Smrg#define PIPE_BIND_CUSTOM               (1 << 12) /* gallium frontend/winsys usages */
48701e04c3fSmrg#define PIPE_BIND_GLOBAL               (1 << 13) /* set_global_binding */
48801e04c3fSmrg#define PIPE_BIND_SHADER_BUFFER        (1 << 14) /* set_shader_buffers */
48901e04c3fSmrg#define PIPE_BIND_SHADER_IMAGE         (1 << 15) /* set_shader_images */
49001e04c3fSmrg#define PIPE_BIND_COMPUTE_RESOURCE     (1 << 16) /* set_compute_resources */
49101e04c3fSmrg#define PIPE_BIND_COMMAND_ARGS_BUFFER  (1 << 17) /* pipe_draw_info.indirect */
49201e04c3fSmrg#define PIPE_BIND_QUERY_BUFFER         (1 << 18) /* get_query_result_resource */
49301e04c3fSmrg
49401e04c3fSmrg/**
49501e04c3fSmrg * The first two flags above were previously part of the amorphous
4963464ebd5Sriastradh * TEXTURE_USAGE, most of which are now descriptions of the ways a
4973464ebd5Sriastradh * particular texture can be bound to the gallium pipeline.  The two flags
4983464ebd5Sriastradh * below do not fit within that and probably need to be migrated to some
4993464ebd5Sriastradh * other place.
5004a49301eSmrg *
5017ec681f3Smrg * Scanout is used to ask for a texture suitable for actual scanout (hence
5027ec681f3Smrg * the name), which implies extra layout constraints on some hardware.
5037ec681f3Smrg * It may also have some special meaning regarding mouse cursor images.
5044a49301eSmrg *
5053464ebd5Sriastradh * The shared flag is quite underspecified, but certainly isn't a
5063464ebd5Sriastradh * binding flag - it seems more like a message to the winsys to create
5073464ebd5Sriastradh * a shareable allocation.
508af69d88dSmrg *
509af69d88dSmrg * The third flag has been added to be able to force textures to be created
510af69d88dSmrg * in linear mode (no tiling).
5114a49301eSmrg */
51201e04c3fSmrg#define PIPE_BIND_SCANOUT     (1 << 19) /*  */
51301e04c3fSmrg#define PIPE_BIND_SHARED      (1 << 20) /* get_texture_handle ??? */
514af69d88dSmrg#define PIPE_BIND_LINEAR      (1 << 21)
5157ec681f3Smrg#define PIPE_BIND_PROTECTED   (1 << 22) /* Resource will be protected/encrypted */
5167ec681f3Smrg#define PIPE_BIND_SAMPLER_REDUCTION_MINMAX (1 << 23) /* PIPE_CAP_SAMPLER_REDUCTION_MINMAX */
5174a49301eSmrg
5184a49301eSmrg
51901e04c3fSmrg/**
52001e04c3fSmrg * Flags for the driver about resource behaviour:
5213464ebd5Sriastradh */
522af69d88dSmrg#define PIPE_RESOURCE_FLAG_MAP_PERSISTENT (1 << 0)
523af69d88dSmrg#define PIPE_RESOURCE_FLAG_MAP_COHERENT   (1 << 1)
52401e04c3fSmrg#define PIPE_RESOURCE_FLAG_TEXTURING_MORE_LIKELY (1 << 2)
52501e04c3fSmrg#define PIPE_RESOURCE_FLAG_SPARSE                (1 << 3)
5267ec681f3Smrg#define PIPE_RESOURCE_FLAG_SINGLE_THREAD_USE     (1 << 4)
5277ec681f3Smrg#define PIPE_RESOURCE_FLAG_ENCRYPTED             (1 << 5)
5287ec681f3Smrg#define PIPE_RESOURCE_FLAG_DONT_OVER_ALLOCATE    (1 << 6)
5297ec681f3Smrg#define PIPE_RESOURCE_FLAG_DONT_MAP_DIRECTLY     (1 << 7) /* for small visible VRAM */
5309f464c52Smaya#define PIPE_RESOURCE_FLAG_DRV_PRIV    (1 << 8) /* driver/winsys private */
5317ec681f3Smrg#define PIPE_RESOURCE_FLAG_FRONTEND_PRIV         (1 << 24) /* gallium frontend private */
5324a49301eSmrg
53301e04c3fSmrg/**
53401e04c3fSmrg * Hint about the expected lifecycle of a resource.
535af69d88dSmrg * Sorted according to GPU vs CPU access.
5364a49301eSmrg */
53701e04c3fSmrgenum pipe_resource_usage {
53801e04c3fSmrg   PIPE_USAGE_DEFAULT,        /* fast GPU access */
53901e04c3fSmrg   PIPE_USAGE_IMMUTABLE,      /* fast GPU access, immutable */
54001e04c3fSmrg   PIPE_USAGE_DYNAMIC,        /* uploaded data is used multiple times */
54101e04c3fSmrg   PIPE_USAGE_STREAM,         /* uploaded data is used once */
54201e04c3fSmrg   PIPE_USAGE_STAGING,        /* fast CPU access */
54301e04c3fSmrg};
5444a49301eSmrg
5454a49301eSmrg/**
5464a49301eSmrg * Shaders
5474a49301eSmrg */
54801e04c3fSmrgenum pipe_shader_type {
54901e04c3fSmrg   PIPE_SHADER_VERTEX,
55001e04c3fSmrg   PIPE_SHADER_FRAGMENT,
55101e04c3fSmrg   PIPE_SHADER_GEOMETRY,
55201e04c3fSmrg   PIPE_SHADER_TESS_CTRL,
55301e04c3fSmrg   PIPE_SHADER_TESS_EVAL,
55401e04c3fSmrg   PIPE_SHADER_COMPUTE,
55501e04c3fSmrg   PIPE_SHADER_TYPES,
55601e04c3fSmrg};
5574a49301eSmrg
5584a49301eSmrg/**
5594a49301eSmrg * Primitive types:
5604a49301eSmrg */
56101e04c3fSmrgenum pipe_prim_type {
56201e04c3fSmrg   PIPE_PRIM_POINTS,
56301e04c3fSmrg   PIPE_PRIM_LINES,
56401e04c3fSmrg   PIPE_PRIM_LINE_LOOP,
56501e04c3fSmrg   PIPE_PRIM_LINE_STRIP,
56601e04c3fSmrg   PIPE_PRIM_TRIANGLES,
56701e04c3fSmrg   PIPE_PRIM_TRIANGLE_STRIP,
56801e04c3fSmrg   PIPE_PRIM_TRIANGLE_FAN,
56901e04c3fSmrg   PIPE_PRIM_QUADS,
57001e04c3fSmrg   PIPE_PRIM_QUAD_STRIP,
57101e04c3fSmrg   PIPE_PRIM_POLYGON,
57201e04c3fSmrg   PIPE_PRIM_LINES_ADJACENCY,
57301e04c3fSmrg   PIPE_PRIM_LINE_STRIP_ADJACENCY,
57401e04c3fSmrg   PIPE_PRIM_TRIANGLES_ADJACENCY,
57501e04c3fSmrg   PIPE_PRIM_TRIANGLE_STRIP_ADJACENCY,
57601e04c3fSmrg   PIPE_PRIM_PATCHES,
57701e04c3fSmrg   PIPE_PRIM_MAX,
5787ec681f3Smrg} ENUM_PACKED;
5794a49301eSmrg
58001e04c3fSmrg/**
58101e04c3fSmrg * Tessellator spacing types
58201e04c3fSmrg */
58301e04c3fSmrgenum pipe_tess_spacing {
58401e04c3fSmrg   PIPE_TESS_SPACING_FRACTIONAL_ODD,
58501e04c3fSmrg   PIPE_TESS_SPACING_FRACTIONAL_EVEN,
58601e04c3fSmrg   PIPE_TESS_SPACING_EQUAL,
58701e04c3fSmrg};
5884a49301eSmrg
5894a49301eSmrg/**
5904a49301eSmrg * Query object types
5914a49301eSmrg */
59201e04c3fSmrgenum pipe_query_type {
59301e04c3fSmrg   PIPE_QUERY_OCCLUSION_COUNTER,
59401e04c3fSmrg   PIPE_QUERY_OCCLUSION_PREDICATE,
59501e04c3fSmrg   PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE,
59601e04c3fSmrg   PIPE_QUERY_TIMESTAMP,
59701e04c3fSmrg   PIPE_QUERY_TIMESTAMP_DISJOINT,
59801e04c3fSmrg   PIPE_QUERY_TIME_ELAPSED,
59901e04c3fSmrg   PIPE_QUERY_PRIMITIVES_GENERATED,
60001e04c3fSmrg   PIPE_QUERY_PRIMITIVES_EMITTED,
60101e04c3fSmrg   PIPE_QUERY_SO_STATISTICS,
60201e04c3fSmrg   PIPE_QUERY_SO_OVERFLOW_PREDICATE,
60301e04c3fSmrg   PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE,
60401e04c3fSmrg   PIPE_QUERY_GPU_FINISHED,
60501e04c3fSmrg   PIPE_QUERY_PIPELINE_STATISTICS,
6069f464c52Smaya   PIPE_QUERY_PIPELINE_STATISTICS_SINGLE,
60701e04c3fSmrg   PIPE_QUERY_TYPES,
60801e04c3fSmrg   /* start of driver queries, see pipe_screen::get_driver_query_info */
60901e04c3fSmrg   PIPE_QUERY_DRIVER_SPECIFIC = 256,
61001e04c3fSmrg};
611af69d88dSmrg
6129f464c52Smaya/**
6139f464c52Smaya * Index for PIPE_QUERY_PIPELINE_STATISTICS subqueries.
6149f464c52Smaya */
6159f464c52Smayaenum pipe_statistics_query_index {
6169f464c52Smaya   PIPE_STAT_QUERY_IA_VERTICES,
6179f464c52Smaya   PIPE_STAT_QUERY_IA_PRIMITIVES,
6189f464c52Smaya   PIPE_STAT_QUERY_VS_INVOCATIONS,
6199f464c52Smaya   PIPE_STAT_QUERY_GS_INVOCATIONS,
6209f464c52Smaya   PIPE_STAT_QUERY_GS_PRIMITIVES,
6219f464c52Smaya   PIPE_STAT_QUERY_C_INVOCATIONS,
6229f464c52Smaya   PIPE_STAT_QUERY_C_PRIMITIVES,
6239f464c52Smaya   PIPE_STAT_QUERY_PS_INVOCATIONS,
6249f464c52Smaya   PIPE_STAT_QUERY_HS_INVOCATIONS,
6259f464c52Smaya   PIPE_STAT_QUERY_DS_INVOCATIONS,
6269f464c52Smaya   PIPE_STAT_QUERY_CS_INVOCATIONS,
6279f464c52Smaya};
6289f464c52Smaya
62901e04c3fSmrg/**
63001e04c3fSmrg * Conditional rendering modes
63101e04c3fSmrg */
63201e04c3fSmrgenum pipe_render_cond_flag {
63301e04c3fSmrg   PIPE_RENDER_COND_WAIT,
63401e04c3fSmrg   PIPE_RENDER_COND_NO_WAIT,
63501e04c3fSmrg   PIPE_RENDER_COND_BY_REGION_WAIT,
63601e04c3fSmrg   PIPE_RENDER_COND_BY_REGION_NO_WAIT,
63701e04c3fSmrg};
6384a49301eSmrg
63901e04c3fSmrg/**
64001e04c3fSmrg * Point sprite coord modes
64101e04c3fSmrg */
64201e04c3fSmrgenum pipe_sprite_coord_mode {
64301e04c3fSmrg   PIPE_SPRITE_COORD_UPPER_LEFT,
64401e04c3fSmrg   PIPE_SPRITE_COORD_LOWER_LEFT,
64501e04c3fSmrg};
6464a49301eSmrg
647cdc920a0Smrg/**
64801e04c3fSmrg * Texture & format swizzles
649cdc920a0Smrg */
65001e04c3fSmrgenum pipe_swizzle {
65101e04c3fSmrg   PIPE_SWIZZLE_X,
65201e04c3fSmrg   PIPE_SWIZZLE_Y,
65301e04c3fSmrg   PIPE_SWIZZLE_Z,
65401e04c3fSmrg   PIPE_SWIZZLE_W,
65501e04c3fSmrg   PIPE_SWIZZLE_0,
65601e04c3fSmrg   PIPE_SWIZZLE_1,
65701e04c3fSmrg   PIPE_SWIZZLE_NONE,
65801e04c3fSmrg   PIPE_SWIZZLE_MAX, /**< Number of enums counter (must be last) */
65901e04c3fSmrg};
66001e04c3fSmrg
6617ec681f3Smrg/**
6627ec681f3Smrg * Viewport swizzles
6637ec681f3Smrg */
6647ec681f3Smrgenum pipe_viewport_swizzle {
6657ec681f3Smrg   PIPE_VIEWPORT_SWIZZLE_POSITIVE_X,
6667ec681f3Smrg   PIPE_VIEWPORT_SWIZZLE_NEGATIVE_X,
6677ec681f3Smrg   PIPE_VIEWPORT_SWIZZLE_POSITIVE_Y,
6687ec681f3Smrg   PIPE_VIEWPORT_SWIZZLE_NEGATIVE_Y,
6697ec681f3Smrg   PIPE_VIEWPORT_SWIZZLE_POSITIVE_Z,
6707ec681f3Smrg   PIPE_VIEWPORT_SWIZZLE_NEGATIVE_Z,
6717ec681f3Smrg   PIPE_VIEWPORT_SWIZZLE_POSITIVE_W,
6727ec681f3Smrg   PIPE_VIEWPORT_SWIZZLE_NEGATIVE_W,
6737ec681f3Smrg};
6747ec681f3Smrg
67501e04c3fSmrg#define PIPE_TIMEOUT_INFINITE 0xffffffffffffffffull
676cdc920a0Smrg
677cdc920a0Smrg
6784a49301eSmrg/**
67901e04c3fSmrg * Device reset status.
6804a49301eSmrg */
68101e04c3fSmrgenum pipe_reset_status
68201e04c3fSmrg{
68301e04c3fSmrg   PIPE_NO_RESET,
68401e04c3fSmrg   PIPE_GUILTY_CONTEXT_RESET,
68501e04c3fSmrg   PIPE_INNOCENT_CONTEXT_RESET,
68601e04c3fSmrg   PIPE_UNKNOWN_CONTEXT_RESET,
68701e04c3fSmrg};
6884a49301eSmrg
6894a49301eSmrg
6904a49301eSmrg/**
69101e04c3fSmrg * Conservative rasterization modes.
6924a49301eSmrg */
69301e04c3fSmrgenum pipe_conservative_raster_mode
69401e04c3fSmrg{
69501e04c3fSmrg   PIPE_CONSERVATIVE_RASTER_OFF,
6969f464c52Smaya
6979f464c52Smaya   /**
6989f464c52Smaya    * The post-snap mode means the conservative rasterization occurs after
6999f464c52Smaya    * the conversion from floating-point to fixed-point coordinates
7009f464c52Smaya    * on the subpixel grid.
7019f464c52Smaya    */
70201e04c3fSmrg   PIPE_CONSERVATIVE_RASTER_POST_SNAP,
7039f464c52Smaya
7049f464c52Smaya   /**
7059f464c52Smaya    * The pre-snap mode means the conservative rasterization occurs before
7069f464c52Smaya    * the conversion from floating-point to fixed-point coordinates.
7079f464c52Smaya    */
70801e04c3fSmrg   PIPE_CONSERVATIVE_RASTER_PRE_SNAP,
70901e04c3fSmrg};
7104a49301eSmrg
7114a49301eSmrg
71201e04c3fSmrg/**
71301e04c3fSmrg * resource_get_handle flags.
71401e04c3fSmrg */
71501e04c3fSmrg/* Requires pipe_context::flush_resource before external use. */
71601e04c3fSmrg#define PIPE_HANDLE_USAGE_EXPLICIT_FLUSH     (1 << 0)
71701e04c3fSmrg/* Expected external use of the resource: */
71801e04c3fSmrg#define PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE  (1 << 1)
71901e04c3fSmrg#define PIPE_HANDLE_USAGE_SHADER_WRITE       (1 << 2)
72001e04c3fSmrg
72101e04c3fSmrg/**
72201e04c3fSmrg * pipe_image_view access flags.
72301e04c3fSmrg */
72401e04c3fSmrg#define PIPE_IMAGE_ACCESS_READ       (1 << 0)
72501e04c3fSmrg#define PIPE_IMAGE_ACCESS_WRITE      (1 << 1)
72601e04c3fSmrg#define PIPE_IMAGE_ACCESS_READ_WRITE (PIPE_IMAGE_ACCESS_READ | \
72701e04c3fSmrg                                      PIPE_IMAGE_ACCESS_WRITE)
7283464ebd5Sriastradh
7294a49301eSmrg/**
7303464ebd5Sriastradh * Implementation capabilities/limits which are queried through
731af69d88dSmrg * pipe_screen::get_param()
7324a49301eSmrg */
73301e04c3fSmrgenum pipe_cap
73401e04c3fSmrg{
7357ec681f3Smrg   PIPE_CAP_GRAPHICS,
73601e04c3fSmrg   PIPE_CAP_NPOT_TEXTURES,
73701e04c3fSmrg   PIPE_CAP_MAX_DUAL_SOURCE_RENDER_TARGETS,
73801e04c3fSmrg   PIPE_CAP_ANISOTROPIC_FILTER,
73901e04c3fSmrg   PIPE_CAP_POINT_SPRITE,
74001e04c3fSmrg   PIPE_CAP_MAX_RENDER_TARGETS,
74101e04c3fSmrg   PIPE_CAP_OCCLUSION_QUERY,
74201e04c3fSmrg   PIPE_CAP_QUERY_TIME_ELAPSED,
7437ec681f3Smrg   PIPE_CAP_TEXTURE_SHADOW_MAP,
74401e04c3fSmrg   PIPE_CAP_TEXTURE_SWIZZLE,
7457ec681f3Smrg   PIPE_CAP_MAX_TEXTURE_2D_SIZE,
74601e04c3fSmrg   PIPE_CAP_MAX_TEXTURE_3D_LEVELS,
74701e04c3fSmrg   PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS,
74801e04c3fSmrg   PIPE_CAP_TEXTURE_MIRROR_CLAMP,
74901e04c3fSmrg   PIPE_CAP_BLEND_EQUATION_SEPARATE,
75001e04c3fSmrg   PIPE_CAP_MAX_STREAM_OUTPUT_BUFFERS,
75101e04c3fSmrg   PIPE_CAP_PRIMITIVE_RESTART,
7527ec681f3Smrg   /** subset of PRIMITIVE_RESTART where the restart index is always the fixed
7537ec681f3Smrg    * maximum value for the index type
7547ec681f3Smrg    */
7557ec681f3Smrg   PIPE_CAP_PRIMITIVE_RESTART_FIXED_INDEX,
7563464ebd5Sriastradh   /** blend enables and write masks per rendertarget */
75701e04c3fSmrg   PIPE_CAP_INDEP_BLEND_ENABLE,
7583464ebd5Sriastradh   /** different blend funcs per rendertarget */
75901e04c3fSmrg   PIPE_CAP_INDEP_BLEND_FUNC,
76001e04c3fSmrg   PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS,
76101e04c3fSmrg   PIPE_CAP_TGSI_FS_COORD_ORIGIN_UPPER_LEFT,
76201e04c3fSmrg   PIPE_CAP_TGSI_FS_COORD_ORIGIN_LOWER_LEFT,
76301e04c3fSmrg   PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_HALF_INTEGER,
76401e04c3fSmrg   PIPE_CAP_TGSI_FS_COORD_PIXEL_CENTER_INTEGER,
76501e04c3fSmrg   PIPE_CAP_DEPTH_CLIP_DISABLE,
76601e04c3fSmrg   PIPE_CAP_DEPTH_CLIP_DISABLE_SEPARATE,
7677ec681f3Smrg   PIPE_CAP_DEPTH_CLAMP_ENABLE,
76801e04c3fSmrg   PIPE_CAP_SHADER_STENCIL_EXPORT,
76901e04c3fSmrg   PIPE_CAP_TGSI_INSTANCEID,
77001e04c3fSmrg   PIPE_CAP_VERTEX_ELEMENT_INSTANCE_DIVISOR,
77101e04c3fSmrg   PIPE_CAP_FRAGMENT_COLOR_CLAMPED,
77201e04c3fSmrg   PIPE_CAP_MIXED_COLORBUFFER_FORMATS,
77301e04c3fSmrg   PIPE_CAP_SEAMLESS_CUBE_MAP,
77401e04c3fSmrg   PIPE_CAP_SEAMLESS_CUBE_MAP_PER_TEXTURE,
77501e04c3fSmrg   PIPE_CAP_MIN_TEXEL_OFFSET,
77601e04c3fSmrg   PIPE_CAP_MAX_TEXEL_OFFSET,
77701e04c3fSmrg   PIPE_CAP_CONDITIONAL_RENDER,
77801e04c3fSmrg   PIPE_CAP_TEXTURE_BARRIER,
77901e04c3fSmrg   PIPE_CAP_MAX_STREAM_OUTPUT_SEPARATE_COMPONENTS,
78001e04c3fSmrg   PIPE_CAP_MAX_STREAM_OUTPUT_INTERLEAVED_COMPONENTS,
78101e04c3fSmrg   PIPE_CAP_STREAM_OUTPUT_PAUSE_RESUME,
78201e04c3fSmrg   PIPE_CAP_TGSI_CAN_COMPACT_CONSTANTS,
78301e04c3fSmrg   PIPE_CAP_VERTEX_COLOR_UNCLAMPED,
78401e04c3fSmrg   PIPE_CAP_VERTEX_COLOR_CLAMPED,
78501e04c3fSmrg   PIPE_CAP_GLSL_FEATURE_LEVEL,
78601e04c3fSmrg   PIPE_CAP_GLSL_FEATURE_LEVEL_COMPATIBILITY,
7879f464c52Smaya   PIPE_CAP_ESSL_FEATURE_LEVEL,
78801e04c3fSmrg   PIPE_CAP_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION,
78901e04c3fSmrg   PIPE_CAP_USER_VERTEX_BUFFERS,
79001e04c3fSmrg   PIPE_CAP_VERTEX_BUFFER_OFFSET_4BYTE_ALIGNED_ONLY,
79101e04c3fSmrg   PIPE_CAP_VERTEX_BUFFER_STRIDE_4BYTE_ALIGNED_ONLY,
79201e04c3fSmrg   PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY,
79301e04c3fSmrg   PIPE_CAP_COMPUTE,
79401e04c3fSmrg   PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT,
79501e04c3fSmrg   PIPE_CAP_START_INSTANCE,
79601e04c3fSmrg   PIPE_CAP_QUERY_TIMESTAMP,
79701e04c3fSmrg   PIPE_CAP_TEXTURE_MULTISAMPLE,
79801e04c3fSmrg   PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT,
79901e04c3fSmrg   PIPE_CAP_CUBE_MAP_ARRAY,
80001e04c3fSmrg   PIPE_CAP_TEXTURE_BUFFER_OBJECTS,
80101e04c3fSmrg   PIPE_CAP_TEXTURE_BUFFER_OFFSET_ALIGNMENT,
80201e04c3fSmrg   PIPE_CAP_BUFFER_SAMPLER_VIEW_RGBA_ONLY,
80301e04c3fSmrg   PIPE_CAP_TGSI_TEXCOORD,
8047ec681f3Smrg   PIPE_CAP_TEXTURE_BUFFER_SAMPLER,
80501e04c3fSmrg   PIPE_CAP_PREFER_BLIT_BASED_TEXTURE_TRANSFER,
80601e04c3fSmrg   PIPE_CAP_QUERY_PIPELINE_STATISTICS,
80701e04c3fSmrg   PIPE_CAP_TEXTURE_BORDER_COLOR_QUIRK,
80801e04c3fSmrg   PIPE_CAP_MAX_TEXTURE_BUFFER_SIZE,
80901e04c3fSmrg   PIPE_CAP_MAX_VIEWPORTS,
81001e04c3fSmrg   PIPE_CAP_ENDIANNESS,
81101e04c3fSmrg   PIPE_CAP_MIXED_FRAMEBUFFER_SIZES,
81201e04c3fSmrg   PIPE_CAP_TGSI_VS_LAYER_VIEWPORT,
81301e04c3fSmrg   PIPE_CAP_MAX_GEOMETRY_OUTPUT_VERTICES,
81401e04c3fSmrg   PIPE_CAP_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS,
81501e04c3fSmrg   PIPE_CAP_MAX_TEXTURE_GATHER_COMPONENTS,
81601e04c3fSmrg   PIPE_CAP_TEXTURE_GATHER_SM5,
81701e04c3fSmrg   PIPE_CAP_BUFFER_MAP_PERSISTENT_COHERENT,
81801e04c3fSmrg   PIPE_CAP_FAKE_SW_MSAA,
81901e04c3fSmrg   PIPE_CAP_TEXTURE_QUERY_LOD,
82001e04c3fSmrg   PIPE_CAP_MIN_TEXTURE_GATHER_OFFSET,
82101e04c3fSmrg   PIPE_CAP_MAX_TEXTURE_GATHER_OFFSET,
82201e04c3fSmrg   PIPE_CAP_SAMPLE_SHADING,
82301e04c3fSmrg   PIPE_CAP_TEXTURE_GATHER_OFFSETS,
82401e04c3fSmrg   PIPE_CAP_TGSI_VS_WINDOW_SPACE_POSITION,
82501e04c3fSmrg   PIPE_CAP_MAX_VERTEX_STREAMS,
82601e04c3fSmrg   PIPE_CAP_DRAW_INDIRECT,
82701e04c3fSmrg   PIPE_CAP_TGSI_FS_FINE_DERIVATIVE,
82801e04c3fSmrg   PIPE_CAP_VENDOR_ID,
82901e04c3fSmrg   PIPE_CAP_DEVICE_ID,
83001e04c3fSmrg   PIPE_CAP_ACCELERATED,
83101e04c3fSmrg   PIPE_CAP_VIDEO_MEMORY,
83201e04c3fSmrg   PIPE_CAP_UMA,
83301e04c3fSmrg   PIPE_CAP_CONDITIONAL_RENDER_INVERTED,
83401e04c3fSmrg   PIPE_CAP_MAX_VERTEX_ATTRIB_STRIDE,
83501e04c3fSmrg   PIPE_CAP_SAMPLER_VIEW_TARGET,
83601e04c3fSmrg   PIPE_CAP_CLIP_HALFZ,
83701e04c3fSmrg   PIPE_CAP_VERTEXID_NOBASE,
83801e04c3fSmrg   PIPE_CAP_POLYGON_OFFSET_CLAMP,
83901e04c3fSmrg   PIPE_CAP_MULTISAMPLE_Z_RESOLVE,
84001e04c3fSmrg   PIPE_CAP_RESOURCE_FROM_USER_MEMORY,
8417ec681f3Smrg   PIPE_CAP_RESOURCE_FROM_USER_MEMORY_COMPUTE_ONLY,
84201e04c3fSmrg   PIPE_CAP_DEVICE_RESET_STATUS_QUERY,
84301e04c3fSmrg   PIPE_CAP_MAX_SHADER_PATCH_VARYINGS,
84401e04c3fSmrg   PIPE_CAP_TEXTURE_FLOAT_LINEAR,
84501e04c3fSmrg   PIPE_CAP_TEXTURE_HALF_FLOAT_LINEAR,
84601e04c3fSmrg   PIPE_CAP_DEPTH_BOUNDS_TEST,
84701e04c3fSmrg   PIPE_CAP_TGSI_TXQS,
84801e04c3fSmrg   PIPE_CAP_FORCE_PERSAMPLE_INTERP,
84901e04c3fSmrg   PIPE_CAP_SHAREABLE_SHADERS,
85001e04c3fSmrg   PIPE_CAP_COPY_BETWEEN_COMPRESSED_AND_PLAIN_FORMATS,
85101e04c3fSmrg   PIPE_CAP_CLEAR_TEXTURE,
8527ec681f3Smrg   PIPE_CAP_CLEAR_SCISSORED,
85301e04c3fSmrg   PIPE_CAP_DRAW_PARAMETERS,
85401e04c3fSmrg   PIPE_CAP_TGSI_PACK_HALF_FLOAT,
85501e04c3fSmrg   PIPE_CAP_MULTI_DRAW_INDIRECT,
85601e04c3fSmrg   PIPE_CAP_MULTI_DRAW_INDIRECT_PARAMS,
85701e04c3fSmrg   PIPE_CAP_TGSI_FS_POSITION_IS_SYSVAL,
8587ec681f3Smrg   PIPE_CAP_TGSI_FS_POINT_IS_SYSVAL,
85901e04c3fSmrg   PIPE_CAP_TGSI_FS_FACE_IS_INTEGER_SYSVAL,
86001e04c3fSmrg   PIPE_CAP_SHADER_BUFFER_OFFSET_ALIGNMENT,
86101e04c3fSmrg   PIPE_CAP_INVALIDATE_BUFFER,
86201e04c3fSmrg   PIPE_CAP_GENERATE_MIPMAP,
86301e04c3fSmrg   PIPE_CAP_STRING_MARKER,
86401e04c3fSmrg   PIPE_CAP_SURFACE_REINTERPRET_BLOCKS,
86501e04c3fSmrg   PIPE_CAP_QUERY_BUFFER_OBJECT,
86601e04c3fSmrg   PIPE_CAP_QUERY_MEMORY_INFO,
86701e04c3fSmrg   PIPE_CAP_PCI_GROUP,
86801e04c3fSmrg   PIPE_CAP_PCI_BUS,
86901e04c3fSmrg   PIPE_CAP_PCI_DEVICE,
87001e04c3fSmrg   PIPE_CAP_PCI_FUNCTION,
87101e04c3fSmrg   PIPE_CAP_FRAMEBUFFER_NO_ATTACHMENT,
87201e04c3fSmrg   PIPE_CAP_ROBUST_BUFFER_ACCESS_BEHAVIOR,
87301e04c3fSmrg   PIPE_CAP_CULL_DISTANCE,
87401e04c3fSmrg   PIPE_CAP_TGSI_VOTE,
87501e04c3fSmrg   PIPE_CAP_MAX_WINDOW_RECTANGLES,
87601e04c3fSmrg   PIPE_CAP_POLYGON_OFFSET_UNITS_UNSCALED,
87701e04c3fSmrg   PIPE_CAP_VIEWPORT_SUBPIXEL_BITS,
87801e04c3fSmrg   PIPE_CAP_RASTERIZER_SUBPIXEL_BITS,
87901e04c3fSmrg   PIPE_CAP_MIXED_COLOR_DEPTH_BITS,
88001e04c3fSmrg   PIPE_CAP_TGSI_ARRAY_COMPONENTS,
88101e04c3fSmrg   PIPE_CAP_STREAM_OUTPUT_INTERLEAVE_BUFFERS,
88201e04c3fSmrg   PIPE_CAP_TGSI_CAN_READ_OUTPUTS,
88301e04c3fSmrg   PIPE_CAP_NATIVE_FENCE_FD,
88401e04c3fSmrg   PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY,
8859f464c52Smaya   PIPE_CAP_GLSL_TESS_LEVELS_AS_INPUTS,
8867ec681f3Smrg   PIPE_CAP_FBFETCH,
88701e04c3fSmrg   PIPE_CAP_TGSI_MUL_ZERO_WINS,
88801e04c3fSmrg   PIPE_CAP_DOUBLES,
88901e04c3fSmrg   PIPE_CAP_INT64,
89001e04c3fSmrg   PIPE_CAP_INT64_DIVMOD,
89101e04c3fSmrg   PIPE_CAP_TGSI_TEX_TXF_LZ,
89201e04c3fSmrg   PIPE_CAP_TGSI_CLOCK,
89301e04c3fSmrg   PIPE_CAP_POLYGON_MODE_FILL_RECTANGLE,
89401e04c3fSmrg   PIPE_CAP_SPARSE_BUFFER_PAGE_SIZE,
89501e04c3fSmrg   PIPE_CAP_TGSI_BALLOT,
89601e04c3fSmrg   PIPE_CAP_TGSI_TES_LAYER_VIEWPORT,
89701e04c3fSmrg   PIPE_CAP_CAN_BIND_CONST_BUFFER_AS_VERTEX,
89801e04c3fSmrg   PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION,
89901e04c3fSmrg   PIPE_CAP_POST_DEPTH_COVERAGE,
90001e04c3fSmrg   PIPE_CAP_BINDLESS_TEXTURE,
90101e04c3fSmrg   PIPE_CAP_NIR_SAMPLERS_AS_DEREF,
90201e04c3fSmrg   PIPE_CAP_QUERY_SO_OVERFLOW,
90301e04c3fSmrg   PIPE_CAP_MEMOBJ,
90401e04c3fSmrg   PIPE_CAP_LOAD_CONSTBUF,
90501e04c3fSmrg   PIPE_CAP_TGSI_ANY_REG_AS_ADDRESS,
90601e04c3fSmrg   PIPE_CAP_TILE_RASTER_ORDER,
90701e04c3fSmrg   PIPE_CAP_MAX_COMBINED_SHADER_OUTPUT_RESOURCES,
90801e04c3fSmrg   PIPE_CAP_FRAMEBUFFER_MSAA_CONSTRAINTS,
90901e04c3fSmrg   PIPE_CAP_SIGNED_VERTEX_BUFFER_OFFSET,
91001e04c3fSmrg   PIPE_CAP_CONTEXT_PRIORITY_MASK,
91101e04c3fSmrg   PIPE_CAP_FENCE_SIGNAL,
91201e04c3fSmrg   PIPE_CAP_CONSTBUF0_FLAGS,
91301e04c3fSmrg   PIPE_CAP_PACKED_UNIFORMS,
91401e04c3fSmrg   PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_TRIANGLES,
91501e04c3fSmrg   PIPE_CAP_CONSERVATIVE_RASTER_POST_SNAP_POINTS_LINES,
91601e04c3fSmrg   PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_TRIANGLES,
91701e04c3fSmrg   PIPE_CAP_CONSERVATIVE_RASTER_PRE_SNAP_POINTS_LINES,
91801e04c3fSmrg   PIPE_CAP_MAX_CONSERVATIVE_RASTER_SUBPIXEL_PRECISION_BIAS,
91901e04c3fSmrg   PIPE_CAP_CONSERVATIVE_RASTER_POST_DEPTH_COVERAGE,
9209f464c52Smaya   PIPE_CAP_CONSERVATIVE_RASTER_INNER_COVERAGE,
92101e04c3fSmrg   PIPE_CAP_PROGRAMMABLE_SAMPLE_LOCATIONS,
92201e04c3fSmrg   PIPE_CAP_MAX_GS_INVOCATIONS,
92301e04c3fSmrg   PIPE_CAP_MAX_SHADER_BUFFER_SIZE,
92401e04c3fSmrg   PIPE_CAP_TEXTURE_MIRROR_CLAMP_TO_EDGE,
92501e04c3fSmrg   PIPE_CAP_MAX_COMBINED_SHADER_BUFFERS,
92601e04c3fSmrg   PIPE_CAP_MAX_COMBINED_HW_ATOMIC_COUNTERS,
92701e04c3fSmrg   PIPE_CAP_MAX_COMBINED_HW_ATOMIC_COUNTER_BUFFERS,
92801e04c3fSmrg   PIPE_CAP_MAX_TEXTURE_UPLOAD_MEMORY_BUDGET,
92901e04c3fSmrg   PIPE_CAP_MAX_VERTEX_ELEMENT_SRC_OFFSET,
9309f464c52Smaya   PIPE_CAP_SURFACE_SAMPLE_COUNT,
9319f464c52Smaya   PIPE_CAP_TGSI_ATOMFADD,
9329f464c52Smaya   PIPE_CAP_QUERY_PIPELINE_STATISTICS_SINGLE,
9339f464c52Smaya   PIPE_CAP_RGB_OVERRIDE_DST_ALPHA_BLEND,
9349f464c52Smaya   PIPE_CAP_DEST_SURFACE_SRGB_CONTROL,
9359f464c52Smaya   PIPE_CAP_NIR_COMPACT_ARRAYS,
9369f464c52Smaya   PIPE_CAP_MAX_VARYINGS,
9379f464c52Smaya   PIPE_CAP_COMPUTE_GRID_INFO_LAST_BLOCK,
9389f464c52Smaya   PIPE_CAP_COMPUTE_SHADER_DERIVATIVES,
9399f464c52Smaya   PIPE_CAP_TGSI_SKIP_SHRINK_IO_ARRAYS,
9409f464c52Smaya   PIPE_CAP_IMAGE_LOAD_FORMATTED,
9417ec681f3Smrg   PIPE_CAP_THROTTLE,
9429f464c52Smaya   PIPE_CAP_DMABUF,
9439f464c52Smaya   PIPE_CAP_PREFER_COMPUTE_FOR_MULTIMEDIA,
9447ec681f3Smrg   PIPE_CAP_FRAGMENT_SHADER_INTERLOCK,
9457ec681f3Smrg   PIPE_CAP_FBFETCH_COHERENT,
9467ec681f3Smrg   PIPE_CAP_CS_DERIVED_SYSTEM_VALUES_SUPPORTED,
9477ec681f3Smrg   PIPE_CAP_ATOMIC_FLOAT_MINMAX,
9489f464c52Smaya   PIPE_CAP_TGSI_DIV,
9497ec681f3Smrg   PIPE_CAP_FRAGMENT_SHADER_TEXTURE_LOD,
9507ec681f3Smrg   PIPE_CAP_FRAGMENT_SHADER_DERIVATIVES,
9517ec681f3Smrg   PIPE_CAP_VERTEX_SHADER_SATURATE,
9527ec681f3Smrg   PIPE_CAP_TEXTURE_SHADOW_LOD,
9537ec681f3Smrg   PIPE_CAP_SHADER_SAMPLES_IDENTICAL,
9547ec681f3Smrg   PIPE_CAP_TGSI_ATOMINC_WRAP,
9557ec681f3Smrg   PIPE_CAP_PREFER_IMM_ARRAYS_AS_CONSTBUF,
9567ec681f3Smrg   PIPE_CAP_GL_SPIRV,
9577ec681f3Smrg   PIPE_CAP_GL_SPIRV_VARIABLE_POINTERS,
9587ec681f3Smrg   PIPE_CAP_DEMOTE_TO_HELPER_INVOCATION,
9597ec681f3Smrg   PIPE_CAP_TGSI_TG4_COMPONENT_IN_SWIZZLE,
9607ec681f3Smrg   PIPE_CAP_FLATSHADE,
9617ec681f3Smrg   PIPE_CAP_ALPHA_TEST,
9627ec681f3Smrg   PIPE_CAP_POINT_SIZE_FIXED,
9637ec681f3Smrg   PIPE_CAP_TWO_SIDED_COLOR,
9647ec681f3Smrg   PIPE_CAP_CLIP_PLANES,
9657ec681f3Smrg   PIPE_CAP_MAX_VERTEX_BUFFERS,
9667ec681f3Smrg   PIPE_CAP_OPENCL_INTEGER_FUNCTIONS,
9677ec681f3Smrg   PIPE_CAP_INTEGER_MULTIPLY_32X16,
9687ec681f3Smrg   /* Turn draw, dispatch, blit into NOOP */
9697ec681f3Smrg   PIPE_CAP_FRONTEND_NOOP,
9707ec681f3Smrg   PIPE_CAP_NIR_IMAGES_AS_DEREF,
9717ec681f3Smrg   PIPE_CAP_PACKED_STREAM_OUTPUT,
9727ec681f3Smrg   PIPE_CAP_VIEWPORT_TRANSFORM_LOWERED,
9737ec681f3Smrg   PIPE_CAP_PSIZ_CLAMPED,
9747ec681f3Smrg   PIPE_CAP_GL_BEGIN_END_BUFFER_SIZE,
9757ec681f3Smrg   PIPE_CAP_VIEWPORT_SWIZZLE,
9767ec681f3Smrg   PIPE_CAP_SYSTEM_SVM,
9777ec681f3Smrg   PIPE_CAP_VIEWPORT_MASK,
9787ec681f3Smrg   PIPE_CAP_ALPHA_TO_COVERAGE_DITHER_CONTROL,
9797ec681f3Smrg   PIPE_CAP_MAP_UNSYNCHRONIZED_THREAD_SAFE,
9807ec681f3Smrg   PIPE_CAP_GLSL_ZERO_INIT,
9817ec681f3Smrg   PIPE_CAP_BLEND_EQUATION_ADVANCED,
9827ec681f3Smrg   PIPE_CAP_NIR_ATOMICS_AS_DEREF,
9837ec681f3Smrg   PIPE_CAP_NO_CLIP_ON_COPY_TEX,
9847ec681f3Smrg   PIPE_CAP_MAX_TEXTURE_MB,
9857ec681f3Smrg   PIPE_CAP_SHADER_ATOMIC_INT64,
9867ec681f3Smrg   PIPE_CAP_DEVICE_PROTECTED_CONTENT,
9877ec681f3Smrg   PIPE_CAP_PREFER_REAL_BUFFER_IN_CONSTBUF0,
9887ec681f3Smrg   PIPE_CAP_GL_CLAMP,
9897ec681f3Smrg   PIPE_CAP_TEXRECT,
9907ec681f3Smrg   PIPE_CAP_SAMPLER_REDUCTION_MINMAX,
9917ec681f3Smrg   PIPE_CAP_SAMPLER_REDUCTION_MINMAX_ARB,
9927ec681f3Smrg   PIPE_CAP_ALLOW_DYNAMIC_VAO_FASTPATH,
9937ec681f3Smrg   PIPE_CAP_EMULATE_NONFIXED_PRIMITIVE_RESTART,
9947ec681f3Smrg   PIPE_CAP_SUPPORTED_PRIM_MODES,
9957ec681f3Smrg   PIPE_CAP_SUPPORTED_PRIM_MODES_WITH_RESTART,
9967ec681f3Smrg   PIPE_CAP_PREFER_BACK_BUFFER_REUSE,
9977ec681f3Smrg   PIPE_CAP_DRAW_VERTEX_STATE,
9987ec681f3Smrg
9997ec681f3Smrg   PIPE_CAP_LAST,
10007ec681f3Smrg   /* XXX do not add caps after PIPE_CAP_LAST! */
1001af69d88dSmrg};
1002af69d88dSmrg
100301e04c3fSmrg/**
100401e04c3fSmrg * Possible bits for PIPE_CAP_CONTEXT_PRIORITY_MASK param, which should
100501e04c3fSmrg * return a bitmask of the supported priorities.  If the driver does not
100601e04c3fSmrg * support prioritized contexts, it can return 0.
100701e04c3fSmrg *
10087ec681f3Smrg * Note that these match __DRI2_RENDERER_HAS_CONTEXT_PRIORITY_*
100901e04c3fSmrg */
101001e04c3fSmrg#define PIPE_CONTEXT_PRIORITY_LOW     (1 << 0)
101101e04c3fSmrg#define PIPE_CONTEXT_PRIORITY_MEDIUM  (1 << 1)
101201e04c3fSmrg#define PIPE_CONTEXT_PRIORITY_HIGH    (1 << 2)
101301e04c3fSmrg
1014af69d88dSmrg#define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_NV50 (1 << 0)
1015af69d88dSmrg#define PIPE_QUIRK_TEXTURE_BORDER_COLOR_SWIZZLE_R600 (1 << 1)
1016af69d88dSmrg
101701e04c3fSmrgenum pipe_endian
101801e04c3fSmrg{
1019af69d88dSmrg   PIPE_ENDIAN_LITTLE = 0,
1020af69d88dSmrg   PIPE_ENDIAN_BIG = 1,
10217ec681f3Smrg#if UTIL_ARCH_LITTLE_ENDIAN
1022af69d88dSmrg   PIPE_ENDIAN_NATIVE = PIPE_ENDIAN_LITTLE
10237ec681f3Smrg#elif UTIL_ARCH_BIG_ENDIAN
1024af69d88dSmrg   PIPE_ENDIAN_NATIVE = PIPE_ENDIAN_BIG
1025af69d88dSmrg#endif
1026af69d88dSmrg};
1027af69d88dSmrg
1028af69d88dSmrg/**
1029af69d88dSmrg * Implementation limits which are queried through
1030af69d88dSmrg * pipe_screen::get_paramf()
1031af69d88dSmrg */
1032af69d88dSmrgenum pipe_capf
1033af69d88dSmrg{
1034af69d88dSmrg   PIPE_CAPF_MAX_LINE_WIDTH,
1035af69d88dSmrg   PIPE_CAPF_MAX_LINE_WIDTH_AA,
1036af69d88dSmrg   PIPE_CAPF_MAX_POINT_WIDTH,
1037af69d88dSmrg   PIPE_CAPF_MAX_POINT_WIDTH_AA,
1038af69d88dSmrg   PIPE_CAPF_MAX_TEXTURE_ANISOTROPY,
1039af69d88dSmrg   PIPE_CAPF_MAX_TEXTURE_LOD_BIAS,
104001e04c3fSmrg   PIPE_CAPF_MIN_CONSERVATIVE_RASTER_DILATE,
104101e04c3fSmrg   PIPE_CAPF_MAX_CONSERVATIVE_RASTER_DILATE,
104201e04c3fSmrg   PIPE_CAPF_CONSERVATIVE_RASTER_DILATE_GRANULARITY,
10433464ebd5Sriastradh};
10444a49301eSmrg
104501e04c3fSmrg/** Shader caps not specific to any single stage */
10463464ebd5Sriastradhenum pipe_shader_cap
10473464ebd5Sriastradh{
1048af69d88dSmrg   PIPE_SHADER_CAP_MAX_INSTRUCTIONS, /* if 0, it means the stage is unsupported */
1049af69d88dSmrg   PIPE_SHADER_CAP_MAX_ALU_INSTRUCTIONS,
1050af69d88dSmrg   PIPE_SHADER_CAP_MAX_TEX_INSTRUCTIONS,
1051af69d88dSmrg   PIPE_SHADER_CAP_MAX_TEX_INDIRECTIONS,
1052af69d88dSmrg   PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH,
1053af69d88dSmrg   PIPE_SHADER_CAP_MAX_INPUTS,
105401e04c3fSmrg   PIPE_SHADER_CAP_MAX_OUTPUTS,
1055af69d88dSmrg   PIPE_SHADER_CAP_MAX_CONST_BUFFER_SIZE,
1056af69d88dSmrg   PIPE_SHADER_CAP_MAX_CONST_BUFFERS,
1057af69d88dSmrg   PIPE_SHADER_CAP_MAX_TEMPS,
10583464ebd5Sriastradh   /* boolean caps */
1059af69d88dSmrg   PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED,
1060af69d88dSmrg   PIPE_SHADER_CAP_INDIRECT_INPUT_ADDR,
1061af69d88dSmrg   PIPE_SHADER_CAP_INDIRECT_OUTPUT_ADDR,
1062af69d88dSmrg   PIPE_SHADER_CAP_INDIRECT_TEMP_ADDR,
1063af69d88dSmrg   PIPE_SHADER_CAP_INDIRECT_CONST_ADDR,
1064af69d88dSmrg   PIPE_SHADER_CAP_SUBROUTINES, /* BGNSUB, ENDSUB, CAL, RET */
1065af69d88dSmrg   PIPE_SHADER_CAP_INTEGERS,
106601e04c3fSmrg   PIPE_SHADER_CAP_INT64_ATOMICS,
106701e04c3fSmrg   PIPE_SHADER_CAP_FP16,
10687ec681f3Smrg   PIPE_SHADER_CAP_FP16_DERIVATIVES,
10697ec681f3Smrg   PIPE_SHADER_CAP_FP16_CONST_BUFFERS,
10707ec681f3Smrg   PIPE_SHADER_CAP_INT16,
10717ec681f3Smrg   PIPE_SHADER_CAP_GLSL_16BIT_CONSTS,
1072af69d88dSmrg   PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS,
1073af69d88dSmrg   PIPE_SHADER_CAP_PREFERRED_IR,
1074af69d88dSmrg   PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED,
1075af69d88dSmrg   PIPE_SHADER_CAP_MAX_SAMPLER_VIEWS,
107601e04c3fSmrg   PIPE_SHADER_CAP_TGSI_DROUND_SUPPORTED, /* all rounding modes */
107701e04c3fSmrg   PIPE_SHADER_CAP_TGSI_DFRACEXP_DLDEXP_SUPPORTED,
107801e04c3fSmrg   PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED,
107901e04c3fSmrg   PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE,
108001e04c3fSmrg   PIPE_SHADER_CAP_MAX_UNROLL_ITERATIONS_HINT,
108101e04c3fSmrg   PIPE_SHADER_CAP_MAX_SHADER_BUFFERS,
108201e04c3fSmrg   PIPE_SHADER_CAP_SUPPORTED_IRS,
108301e04c3fSmrg   PIPE_SHADER_CAP_MAX_SHADER_IMAGES,
108401e04c3fSmrg   PIPE_SHADER_CAP_LOWER_IF_THRESHOLD,
108501e04c3fSmrg   PIPE_SHADER_CAP_TGSI_SKIP_MERGE_REGISTERS,
108601e04c3fSmrg   PIPE_SHADER_CAP_TGSI_LDEXP_SUPPORTED,
108701e04c3fSmrg   PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTERS,
108801e04c3fSmrg   PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTER_BUFFERS,
10893464ebd5Sriastradh};
10904a49301eSmrg
1091af69d88dSmrg/**
1092af69d88dSmrg * Shader intermediate representation.
109301e04c3fSmrg *
109401e04c3fSmrg * Note that if the driver requests something other than TGSI, it must
109501e04c3fSmrg * always be prepared to receive TGSI in addition to its preferred IR.
109601e04c3fSmrg * If the driver requests TGSI as its preferred IR, it will *always*
109701e04c3fSmrg * get TGSI.
109801e04c3fSmrg *
109901e04c3fSmrg * Note that PIPE_SHADER_IR_TGSI should be zero for backwards compat with
11007ec681f3Smrg * gallium frontends that only understand TGSI.
1101af69d88dSmrg */
1102af69d88dSmrgenum pipe_shader_ir
1103af69d88dSmrg{
110401e04c3fSmrg   PIPE_SHADER_IR_TGSI = 0,
110501e04c3fSmrg   PIPE_SHADER_IR_NATIVE,
110601e04c3fSmrg   PIPE_SHADER_IR_NIR,
11077ec681f3Smrg   PIPE_SHADER_IR_NIR_SERIALIZED,
1108af69d88dSmrg};
1109af69d88dSmrg
1110af69d88dSmrg/**
1111af69d88dSmrg * Compute-specific implementation capability.  They can be queried
1112af69d88dSmrg * using pipe_screen::get_compute_param.
1113af69d88dSmrg */
1114af69d88dSmrgenum pipe_compute_cap
1115af69d88dSmrg{
111601e04c3fSmrg   PIPE_COMPUTE_CAP_ADDRESS_BITS,
1117af69d88dSmrg   PIPE_COMPUTE_CAP_IR_TARGET,
1118af69d88dSmrg   PIPE_COMPUTE_CAP_GRID_DIMENSION,
1119af69d88dSmrg   PIPE_COMPUTE_CAP_MAX_GRID_SIZE,
1120af69d88dSmrg   PIPE_COMPUTE_CAP_MAX_BLOCK_SIZE,
1121af69d88dSmrg   PIPE_COMPUTE_CAP_MAX_THREADS_PER_BLOCK,
1122af69d88dSmrg   PIPE_COMPUTE_CAP_MAX_GLOBAL_SIZE,
1123af69d88dSmrg   PIPE_COMPUTE_CAP_MAX_LOCAL_SIZE,
1124af69d88dSmrg   PIPE_COMPUTE_CAP_MAX_PRIVATE_SIZE,
1125af69d88dSmrg   PIPE_COMPUTE_CAP_MAX_INPUT_SIZE,
1126af69d88dSmrg   PIPE_COMPUTE_CAP_MAX_MEM_ALLOC_SIZE,
1127af69d88dSmrg   PIPE_COMPUTE_CAP_MAX_CLOCK_FREQUENCY,
1128af69d88dSmrg   PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITS,
112901e04c3fSmrg   PIPE_COMPUTE_CAP_IMAGES_SUPPORTED,
113001e04c3fSmrg   PIPE_COMPUTE_CAP_SUBGROUP_SIZE,
113101e04c3fSmrg   PIPE_COMPUTE_CAP_MAX_VARIABLE_THREADS_PER_BLOCK,
113201e04c3fSmrg};
113301e04c3fSmrg
11347ec681f3Smrg/**
11357ec681f3Smrg * Resource parameters. They can be queried using
11367ec681f3Smrg * pipe_screen::get_resource_param.
11377ec681f3Smrg */
11387ec681f3Smrgenum pipe_resource_param
11397ec681f3Smrg{
11407ec681f3Smrg   PIPE_RESOURCE_PARAM_NPLANES,
11417ec681f3Smrg   PIPE_RESOURCE_PARAM_STRIDE,
11427ec681f3Smrg   PIPE_RESOURCE_PARAM_OFFSET,
11437ec681f3Smrg   PIPE_RESOURCE_PARAM_MODIFIER,
11447ec681f3Smrg   PIPE_RESOURCE_PARAM_HANDLE_TYPE_SHARED,
11457ec681f3Smrg   PIPE_RESOURCE_PARAM_HANDLE_TYPE_KMS,
11467ec681f3Smrg   PIPE_RESOURCE_PARAM_HANDLE_TYPE_FD,
11477ec681f3Smrg   PIPE_RESOURCE_PARAM_LAYER_STRIDE,
11487ec681f3Smrg};
11497ec681f3Smrg
115001e04c3fSmrg/**
115101e04c3fSmrg * Types of parameters for pipe_context::set_context_param.
115201e04c3fSmrg */
115301e04c3fSmrgenum pipe_context_param
115401e04c3fSmrg{
115501e04c3fSmrg   /* A hint for the driver that it should pin its execution threads to
115601e04c3fSmrg    * a group of cores sharing a specific L3 cache if the CPU has multiple
115701e04c3fSmrg    * L3 caches. This is needed for good multithreading performance on
115801e04c3fSmrg    * AMD Zen CPUs. "value" is the L3 cache index. Drivers that don't have
115901e04c3fSmrg    * any internal threads or don't run on affected CPUs can ignore this.
116001e04c3fSmrg    */
116101e04c3fSmrg   PIPE_CONTEXT_PARAM_PIN_THREADS_TO_L3_CACHE,
1162af69d88dSmrg};
11634a49301eSmrg
11643464ebd5Sriastradh/**
11653464ebd5Sriastradh * Composite query types
11663464ebd5Sriastradh */
1167af69d88dSmrg
1168af69d88dSmrg/**
1169af69d88dSmrg * Query result for PIPE_QUERY_SO_STATISTICS.
1170af69d88dSmrg */
11713464ebd5Sriastradhstruct pipe_query_data_so_statistics
11724a49301eSmrg{
11733464ebd5Sriastradh   uint64_t num_primitives_written;
11743464ebd5Sriastradh   uint64_t primitives_storage_needed;
11754a49301eSmrg};
1176af69d88dSmrg
1177af69d88dSmrg/**
1178af69d88dSmrg * Query result for PIPE_QUERY_TIMESTAMP_DISJOINT.
1179af69d88dSmrg */
11803464ebd5Sriastradhstruct pipe_query_data_timestamp_disjoint
11814a49301eSmrg{
11823464ebd5Sriastradh   uint64_t frequency;
11837ec681f3Smrg   bool     disjoint;
11844a49301eSmrg};
11854a49301eSmrg
1186af69d88dSmrg/**
1187af69d88dSmrg * Query result for PIPE_QUERY_PIPELINE_STATISTICS.
1188af69d88dSmrg */
1189af69d88dSmrgstruct pipe_query_data_pipeline_statistics
1190af69d88dSmrg{
1191af69d88dSmrg   uint64_t ia_vertices;    /**< Num vertices read by the vertex fetcher. */
1192af69d88dSmrg   uint64_t ia_primitives;  /**< Num primitives read by the vertex fetcher. */
1193af69d88dSmrg   uint64_t vs_invocations; /**< Num vertex shader invocations. */
1194af69d88dSmrg   uint64_t gs_invocations; /**< Num geometry shader invocations. */
1195af69d88dSmrg   uint64_t gs_primitives;  /**< Num primitives output by a geometry shader. */
1196af69d88dSmrg   uint64_t c_invocations;  /**< Num primitives sent to the rasterizer. */
1197af69d88dSmrg   uint64_t c_primitives;   /**< Num primitives that were rendered. */
1198af69d88dSmrg   uint64_t ps_invocations; /**< Num pixel shader invocations. */
1199af69d88dSmrg   uint64_t hs_invocations; /**< Num hull shader invocations. */
1200af69d88dSmrg   uint64_t ds_invocations; /**< Num domain shader invocations. */
1201af69d88dSmrg   uint64_t cs_invocations; /**< Num compute shader invocations. */
1202af69d88dSmrg};
1203af69d88dSmrg
120401e04c3fSmrg/**
120501e04c3fSmrg * For batch queries.
120601e04c3fSmrg */
120701e04c3fSmrgunion pipe_numeric_type_union
120801e04c3fSmrg{
120901e04c3fSmrg   uint64_t u64;
121001e04c3fSmrg   uint32_t u32;
121101e04c3fSmrg   float f;
121201e04c3fSmrg};
121301e04c3fSmrg
1214af69d88dSmrg/**
1215af69d88dSmrg * Query result (returned by pipe_context::get_query_result).
1216af69d88dSmrg */
1217af69d88dSmrgunion pipe_query_result
1218af69d88dSmrg{
1219af69d88dSmrg   /* PIPE_QUERY_OCCLUSION_PREDICATE */
122001e04c3fSmrg   /* PIPE_QUERY_OCCLUSION_PREDICATE_CONSERVATIVE */
1221af69d88dSmrg   /* PIPE_QUERY_SO_OVERFLOW_PREDICATE */
122201e04c3fSmrg   /* PIPE_QUERY_SO_OVERFLOW_ANY_PREDICATE */
1223af69d88dSmrg   /* PIPE_QUERY_GPU_FINISHED */
12247ec681f3Smrg   bool b;
1225af69d88dSmrg
1226af69d88dSmrg   /* PIPE_QUERY_OCCLUSION_COUNTER */
1227af69d88dSmrg   /* PIPE_QUERY_TIMESTAMP */
1228af69d88dSmrg   /* PIPE_QUERY_TIME_ELAPSED */
1229af69d88dSmrg   /* PIPE_QUERY_PRIMITIVES_GENERATED */
1230af69d88dSmrg   /* PIPE_QUERY_PRIMITIVES_EMITTED */
123101e04c3fSmrg   /* PIPE_DRIVER_QUERY_TYPE_UINT64 */
123201e04c3fSmrg   /* PIPE_DRIVER_QUERY_TYPE_BYTES */
123301e04c3fSmrg   /* PIPE_DRIVER_QUERY_TYPE_MICROSECONDS */
123401e04c3fSmrg   /* PIPE_DRIVER_QUERY_TYPE_HZ */
1235af69d88dSmrg   uint64_t u64;
1236af69d88dSmrg
123701e04c3fSmrg   /* PIPE_DRIVER_QUERY_TYPE_UINT */
123801e04c3fSmrg   uint32_t u32;
123901e04c3fSmrg
124001e04c3fSmrg   /* PIPE_DRIVER_QUERY_TYPE_FLOAT */
124101e04c3fSmrg   /* PIPE_DRIVER_QUERY_TYPE_PERCENTAGE */
124201e04c3fSmrg   float f;
124301e04c3fSmrg
1244af69d88dSmrg   /* PIPE_QUERY_SO_STATISTICS */
1245af69d88dSmrg   struct pipe_query_data_so_statistics so_statistics;
1246af69d88dSmrg
1247af69d88dSmrg   /* PIPE_QUERY_TIMESTAMP_DISJOINT */
1248af69d88dSmrg   struct pipe_query_data_timestamp_disjoint timestamp_disjoint;
1249af69d88dSmrg
1250af69d88dSmrg   /* PIPE_QUERY_PIPELINE_STATISTICS */
1251af69d88dSmrg   struct pipe_query_data_pipeline_statistics pipeline_statistics;
125201e04c3fSmrg
125301e04c3fSmrg   /* batch queries (variable length) */
125401e04c3fSmrg   union pipe_numeric_type_union batch[1];
125501e04c3fSmrg};
125601e04c3fSmrg
125701e04c3fSmrgenum pipe_query_value_type
125801e04c3fSmrg{
125901e04c3fSmrg   PIPE_QUERY_TYPE_I32,
126001e04c3fSmrg   PIPE_QUERY_TYPE_U32,
126101e04c3fSmrg   PIPE_QUERY_TYPE_I64,
126201e04c3fSmrg   PIPE_QUERY_TYPE_U64,
1263af69d88dSmrg};
1264af69d88dSmrg
1265af69d88dSmrgunion pipe_color_union
1266af69d88dSmrg{
1267af69d88dSmrg   float f[4];
1268af69d88dSmrg   int i[4];
1269af69d88dSmrg   unsigned int ui[4];
1270af69d88dSmrg};
1271af69d88dSmrg
127201e04c3fSmrgenum pipe_driver_query_type
127301e04c3fSmrg{
127401e04c3fSmrg   PIPE_DRIVER_QUERY_TYPE_UINT64,
127501e04c3fSmrg   PIPE_DRIVER_QUERY_TYPE_UINT,
127601e04c3fSmrg   PIPE_DRIVER_QUERY_TYPE_FLOAT,
127701e04c3fSmrg   PIPE_DRIVER_QUERY_TYPE_PERCENTAGE,
127801e04c3fSmrg   PIPE_DRIVER_QUERY_TYPE_BYTES,
127901e04c3fSmrg   PIPE_DRIVER_QUERY_TYPE_MICROSECONDS,
128001e04c3fSmrg   PIPE_DRIVER_QUERY_TYPE_HZ,
128101e04c3fSmrg   PIPE_DRIVER_QUERY_TYPE_DBM,
128201e04c3fSmrg   PIPE_DRIVER_QUERY_TYPE_TEMPERATURE,
128301e04c3fSmrg   PIPE_DRIVER_QUERY_TYPE_VOLTS,
128401e04c3fSmrg   PIPE_DRIVER_QUERY_TYPE_AMPS,
128501e04c3fSmrg   PIPE_DRIVER_QUERY_TYPE_WATTS,
128601e04c3fSmrg};
128701e04c3fSmrg
128801e04c3fSmrg/* Whether an average value per frame or a cumulative value should be
128901e04c3fSmrg * displayed.
129001e04c3fSmrg */
129101e04c3fSmrgenum pipe_driver_query_result_type
129201e04c3fSmrg{
129301e04c3fSmrg   PIPE_DRIVER_QUERY_RESULT_TYPE_AVERAGE,
129401e04c3fSmrg   PIPE_DRIVER_QUERY_RESULT_TYPE_CUMULATIVE,
129501e04c3fSmrg};
129601e04c3fSmrg
129701e04c3fSmrg/**
129801e04c3fSmrg * Some hardware requires some hardware-specific queries to be submitted
129901e04c3fSmrg * as batched queries. The corresponding query objects are created using
130001e04c3fSmrg * create_batch_query, and at most one such query may be active at
130101e04c3fSmrg * any time.
130201e04c3fSmrg */
130301e04c3fSmrg#define PIPE_DRIVER_QUERY_FLAG_BATCH     (1 << 0)
130401e04c3fSmrg
130501e04c3fSmrg/* Do not list this query in the HUD. */
130601e04c3fSmrg#define PIPE_DRIVER_QUERY_FLAG_DONT_LIST (1 << 1)
130701e04c3fSmrg
1308af69d88dSmrgstruct pipe_driver_query_info
1309af69d88dSmrg{
1310af69d88dSmrg   const char *name;
1311af69d88dSmrg   unsigned query_type; /* PIPE_QUERY_DRIVER_SPECIFIC + i */
131201e04c3fSmrg   union pipe_numeric_type_union max_value; /* max value that can be returned */
131301e04c3fSmrg   enum pipe_driver_query_type type;
131401e04c3fSmrg   enum pipe_driver_query_result_type result_type;
131501e04c3fSmrg   unsigned group_id;
131601e04c3fSmrg   unsigned flags;
131701e04c3fSmrg};
131801e04c3fSmrg
131901e04c3fSmrgstruct pipe_driver_query_group_info
132001e04c3fSmrg{
132101e04c3fSmrg   const char *name;
132201e04c3fSmrg   unsigned max_active_queries;
132301e04c3fSmrg   unsigned num_queries;
132401e04c3fSmrg};
132501e04c3fSmrg
132601e04c3fSmrgenum pipe_fd_type
132701e04c3fSmrg{
132801e04c3fSmrg   PIPE_FD_TYPE_NATIVE_SYNC,
132901e04c3fSmrg   PIPE_FD_TYPE_SYNCOBJ,
1330af69d88dSmrg};
1331af69d88dSmrg
13327ec681f3Smrg/**
13337ec681f3Smrg * counter type and counter data type enums used by INTEL_performance_query
13347ec681f3Smrg * APIs in gallium drivers.
13357ec681f3Smrg */
13367ec681f3Smrgenum pipe_perf_counter_type
13377ec681f3Smrg{
13387ec681f3Smrg   PIPE_PERF_COUNTER_TYPE_EVENT,
13397ec681f3Smrg   PIPE_PERF_COUNTER_TYPE_DURATION_NORM,
13407ec681f3Smrg   PIPE_PERF_COUNTER_TYPE_DURATION_RAW,
13417ec681f3Smrg   PIPE_PERF_COUNTER_TYPE_THROUGHPUT,
13427ec681f3Smrg   PIPE_PERF_COUNTER_TYPE_RAW,
13437ec681f3Smrg   PIPE_PERF_COUNTER_TYPE_TIMESTAMP,
13447ec681f3Smrg};
13457ec681f3Smrg
13467ec681f3Smrgenum pipe_perf_counter_data_type
134701e04c3fSmrg{
13487ec681f3Smrg   PIPE_PERF_COUNTER_DATA_TYPE_BOOL32,
13497ec681f3Smrg   PIPE_PERF_COUNTER_DATA_TYPE_UINT32,
13507ec681f3Smrg   PIPE_PERF_COUNTER_DATA_TYPE_UINT64,
13517ec681f3Smrg   PIPE_PERF_COUNTER_DATA_TYPE_FLOAT,
13527ec681f3Smrg   PIPE_PERF_COUNTER_DATA_TYPE_DOUBLE,
135301e04c3fSmrg};
135401e04c3fSmrg
135501e04c3fSmrg#define PIPE_UUID_SIZE 16
135601e04c3fSmrg
13577ec681f3Smrg#ifdef PIPE_OS_UNIX
13587ec681f3Smrg#define PIPE_MEMORY_FD
13597ec681f3Smrg#endif
13607ec681f3Smrg
13614a49301eSmrg#ifdef __cplusplus
13624a49301eSmrg}
13634a49301eSmrg#endif
13644a49301eSmrg
13654a49301eSmrg#endif
1366