p_defines.h

Go to the documentation of this file.
00001 /**************************************************************************
00002  * 
00003  * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
00004  * All Rights Reserved.
00005  * 
00006  * Permission is hereby granted, free of charge, to any person obtaining a
00007  * copy of this software and associated documentation files (the
00008  * "Software"), to deal in the Software without restriction, including
00009  * without limitation the rights to use, copy, modify, merge, publish,
00010  * distribute, sub license, and/or sell copies of the Software, and to
00011  * permit persons to whom the Software is furnished to do so, subject to
00012  * the following conditions:
00013  * 
00014  * The above copyright notice and this permission notice (including the
00015  * next paragraph) shall be included in all copies or substantial portions
00016  * of the Software.
00017  * 
00018  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
00019  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00020  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
00021  * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
00022  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
00023  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
00024  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00025  * 
00026  **************************************************************************/
00027 
00028 #ifndef PIPE_DEFINES_H
00029 #define PIPE_DEFINES_H
00030 
00031 #include "p_format.h"
00032 
00033 #ifdef __cplusplus
00034 extern "C" {
00035 #endif
00036 
00037 #define PIPE_BLENDFACTOR_ONE                 0x1
00038 #define PIPE_BLENDFACTOR_SRC_COLOR           0x2
00039 #define PIPE_BLENDFACTOR_SRC_ALPHA           0x3
00040 #define PIPE_BLENDFACTOR_DST_ALPHA           0x4
00041 #define PIPE_BLENDFACTOR_DST_COLOR           0x5
00042 #define PIPE_BLENDFACTOR_SRC_ALPHA_SATURATE  0x6
00043 #define PIPE_BLENDFACTOR_CONST_COLOR         0x7
00044 #define PIPE_BLENDFACTOR_CONST_ALPHA         0x8
00045 #define PIPE_BLENDFACTOR_SRC1_COLOR          0x9
00046 #define PIPE_BLENDFACTOR_SRC1_ALPHA          0x0A
00047 #define PIPE_BLENDFACTOR_ZERO                0x11
00048 #define PIPE_BLENDFACTOR_INV_SRC_COLOR       0x12
00049 #define PIPE_BLENDFACTOR_INV_SRC_ALPHA       0x13
00050 #define PIPE_BLENDFACTOR_INV_DST_ALPHA       0x14
00051 #define PIPE_BLENDFACTOR_INV_DST_COLOR       0x15
00052 #define PIPE_BLENDFACTOR_INV_CONST_COLOR     0x17
00053 #define PIPE_BLENDFACTOR_INV_CONST_ALPHA     0x18
00054 #define PIPE_BLENDFACTOR_INV_SRC1_COLOR      0x19
00055 #define PIPE_BLENDFACTOR_INV_SRC1_ALPHA      0x1A
00056 
00057 #define PIPE_BLEND_ADD               0
00058 #define PIPE_BLEND_SUBTRACT          1
00059 #define PIPE_BLEND_REVERSE_SUBTRACT  2
00060 #define PIPE_BLEND_MIN               3
00061 #define PIPE_BLEND_MAX               4
00062 
00063 #define PIPE_LOGICOP_CLEAR            0
00064 #define PIPE_LOGICOP_NOR              1
00065 #define PIPE_LOGICOP_AND_INVERTED     2
00066 #define PIPE_LOGICOP_COPY_INVERTED    3
00067 #define PIPE_LOGICOP_AND_REVERSE      4
00068 #define PIPE_LOGICOP_INVERT           5
00069 #define PIPE_LOGICOP_XOR              6
00070 #define PIPE_LOGICOP_NAND             7
00071 #define PIPE_LOGICOP_AND              8
00072 #define PIPE_LOGICOP_EQUIV            9
00073 #define PIPE_LOGICOP_NOOP             10
00074 #define PIPE_LOGICOP_OR_INVERTED      11
00075 #define PIPE_LOGICOP_COPY             12
00076 #define PIPE_LOGICOP_OR_REVERSE       13
00077 #define PIPE_LOGICOP_OR               14
00078 #define PIPE_LOGICOP_SET              15  
00079 
00080 #define PIPE_MASK_R  0x1
00081 #define PIPE_MASK_G  0x2
00082 #define PIPE_MASK_B  0x4
00083 #define PIPE_MASK_A  0x8
00084 #define PIPE_MASK_RGBA 0xf
00085 
00086 
00091 #define PIPE_FUNC_NEVER    0
00092 #define PIPE_FUNC_LESS     1
00093 #define PIPE_FUNC_EQUAL    2
00094 #define PIPE_FUNC_LEQUAL   3
00095 #define PIPE_FUNC_GREATER  4
00096 #define PIPE_FUNC_NOTEQUAL 5
00097 #define PIPE_FUNC_GEQUAL   6
00098 #define PIPE_FUNC_ALWAYS   7
00099 
00101 #define PIPE_POLYGON_MODE_FILL  0
00102 #define PIPE_POLYGON_MODE_LINE  1
00103 #define PIPE_POLYGON_MODE_POINT 2
00104 
00106 #define PIPE_WINDING_NONE 0
00107 #define PIPE_WINDING_CW   1
00108 #define PIPE_WINDING_CCW  2
00109 #define PIPE_WINDING_BOTH (PIPE_WINDING_CW | PIPE_WINDING_CCW)
00110 
00112 #define PIPE_STENCIL_OP_KEEP       0
00113 #define PIPE_STENCIL_OP_ZERO       1
00114 #define PIPE_STENCIL_OP_REPLACE    2
00115 #define PIPE_STENCIL_OP_INCR       3
00116 #define PIPE_STENCIL_OP_DECR       4
00117 #define PIPE_STENCIL_OP_INCR_WRAP  5
00118 #define PIPE_STENCIL_OP_DECR_WRAP  6
00119 #define PIPE_STENCIL_OP_INVERT     7
00120 
00122 enum pipe_texture_target {
00123    PIPE_TEXTURE_1D   = 0,
00124    PIPE_TEXTURE_2D   = 1,
00125    PIPE_TEXTURE_3D   = 2,
00126    PIPE_TEXTURE_CUBE = 3
00127 };
00128 
00129 #define PIPE_TEX_FACE_POS_X 0
00130 #define PIPE_TEX_FACE_NEG_X 1
00131 #define PIPE_TEX_FACE_POS_Y 2
00132 #define PIPE_TEX_FACE_NEG_Y 3
00133 #define PIPE_TEX_FACE_POS_Z 4
00134 #define PIPE_TEX_FACE_NEG_Z 5
00135 
00136 #define PIPE_TEX_WRAP_REPEAT                   0
00137 #define PIPE_TEX_WRAP_CLAMP                    1
00138 #define PIPE_TEX_WRAP_CLAMP_TO_EDGE            2
00139 #define PIPE_TEX_WRAP_CLAMP_TO_BORDER          3
00140 #define PIPE_TEX_WRAP_MIRROR_REPEAT            4
00141 #define PIPE_TEX_WRAP_MIRROR_CLAMP             5
00142 #define PIPE_TEX_WRAP_MIRROR_CLAMP_TO_EDGE     6
00143 #define PIPE_TEX_WRAP_MIRROR_CLAMP_TO_BORDER   7
00144 
00145 /* Between mipmaps, ie mipfilter
00146  */
00147 #define PIPE_TEX_MIPFILTER_NEAREST  0
00148 #define PIPE_TEX_MIPFILTER_LINEAR   1
00149 #define PIPE_TEX_MIPFILTER_NONE     2
00150 
00151 /* Within a mipmap, ie min/mag filter 
00152  */
00153 #define PIPE_TEX_FILTER_NEAREST      0
00154 #define PIPE_TEX_FILTER_LINEAR       1
00155 #define PIPE_TEX_FILTER_ANISO        2 
00156 
00157 
00158 #define PIPE_TEX_COMPARE_NONE          0
00159 #define PIPE_TEX_COMPARE_R_TO_TEXTURE  1
00160 
00161 #define PIPE_TEX_FACE_POS_X   0
00162 #define PIPE_TEX_FACE_NEG_X   1
00163 #define PIPE_TEX_FACE_POS_Y   2
00164 #define PIPE_TEX_FACE_NEG_Y   3
00165 #define PIPE_TEX_FACE_POS_Z   4
00166 #define PIPE_TEX_FACE_NEG_Z   5
00167 #define PIPE_TEX_FACE_MAX     6
00168 
00169 #define PIPE_TEXTURE_USAGE_RENDER_TARGET   0x1
00170 #define PIPE_TEXTURE_USAGE_DISPLAY_TARGET  0x2 /* ie a backbuffer */
00171 #define PIPE_TEXTURE_USAGE_PRIMARY         0x4 /* ie a frontbuffer */
00172 #define PIPE_TEXTURE_USAGE_DEPTH_STENCIL   0x8
00173 #define PIPE_TEXTURE_USAGE_SAMPLER         0x10
00174 
00175 #define PIPE_TEXTURE_GEOM_NON_SQUARE       0x1
00176 #define PIPE_TEXTURE_GEOM_NON_POWER_OF_TWO 0x2
00177 
00178 
00182 #define PIPE_SURFACE_LAYOUT_LINEAR  0
00183 
00184 
00188 #define PIPE_SURFACE_STATUS_UNDEFINED  0
00189 #define PIPE_SURFACE_STATUS_DEFINED    1
00190 #define PIPE_SURFACE_STATUS_CLEAR      2
00191 
00192 
00196 #define PIPE_BUFFER_USAGE_CPU_READ  (1 << 0)
00197 #define PIPE_BUFFER_USAGE_CPU_WRITE (1 << 1)
00198 #define PIPE_BUFFER_USAGE_GPU_READ  (1 << 2)
00199 #define PIPE_BUFFER_USAGE_GPU_WRITE (1 << 3)
00200 #define PIPE_BUFFER_USAGE_PIXEL     (1 << 4)
00201 #define PIPE_BUFFER_USAGE_VERTEX    (1 << 5)
00202 #define PIPE_BUFFER_USAGE_INDEX     (1 << 6)
00203 #define PIPE_BUFFER_USAGE_CONSTANT  (1 << 7)
00204 #define PIPE_BUFFER_USAGE_DISCARD   (1 << 8)
00205 #define PIPE_BUFFER_USAGE_DONTBLOCK (1 << 9)
00206 
00207 #define PIPE_BUFFER_USAGE_CUSTOM    (1 << 16)
00208 
00209 /* Convenient shortcuts */
00210 #define PIPE_BUFFER_USAGE_CPU_READ_WRITE \
00211    ( PIPE_BUFFER_USAGE_CPU_READ | PIPE_BUFFER_USAGE_CPU_WRITE )
00212 #define PIPE_BUFFER_USAGE_GPU_READ_WRITE \
00213    ( PIPE_BUFFER_USAGE_GPU_READ | PIPE_BUFFER_USAGE_GPU_WRITE )
00214 #define PIPE_BUFFER_USAGE_WRITE \
00215    ( PIPE_BUFFER_USAGE_CPU_WRITE | PIPE_BUFFER_USAGE_GPU_WRITE )
00216 
00217 
00221 #define PIPE_FLUSH_RENDER_CACHE   0x1
00222 #define PIPE_FLUSH_TEXTURE_CACHE  0x2
00223 #define PIPE_FLUSH_SWAPBUFFERS    0x4
00224 #define PIPE_FLUSH_FRAME          0x8 
00230 #define PIPE_SHADER_VERTEX   0
00231 #define PIPE_SHADER_FRAGMENT 1
00232 #define PIPE_SHADER_TYPES    2
00233 
00234 
00238 #define PIPE_PRIM_POINTS          0
00239 #define PIPE_PRIM_LINES           1
00240 #define PIPE_PRIM_LINE_LOOP       2
00241 #define PIPE_PRIM_LINE_STRIP      3
00242 #define PIPE_PRIM_TRIANGLES       4
00243 #define PIPE_PRIM_TRIANGLE_STRIP  5
00244 #define PIPE_PRIM_TRIANGLE_FAN    6
00245 #define PIPE_PRIM_QUADS           7
00246 #define PIPE_PRIM_QUAD_STRIP      8
00247 #define PIPE_PRIM_POLYGON         9
00248 
00249 
00253 #define PIPE_QUERY_OCCLUSION_COUNTER     0
00254 #define PIPE_QUERY_PRIMITIVES_GENERATED  1
00255 #define PIPE_QUERY_PRIMITIVES_EMITTED    2
00256 #define PIPE_QUERY_TYPES                 3
00257 
00258 
00262 #define PIPE_SPRITE_COORD_NONE       0
00263 #define PIPE_SPRITE_COORD_UPPER_LEFT 1
00264 #define PIPE_SPRITE_COORD_LOWER_LEFT 2
00265 
00266 
00272 #define PIPE_CAP_MAX_TEXTURE_IMAGE_UNITS 1
00273 #define PIPE_CAP_NPOT_TEXTURES           2
00274 #define PIPE_CAP_TWO_SIDED_STENCIL       3
00275 #define PIPE_CAP_GLSL                    4  /* XXX need something better */
00276 #define PIPE_CAP_S3TC                    5
00277 #define PIPE_CAP_ANISOTROPIC_FILTER      6
00278 #define PIPE_CAP_POINT_SPRITE            7
00279 #define PIPE_CAP_MAX_RENDER_TARGETS      8
00280 #define PIPE_CAP_OCCLUSION_QUERY         9
00281 #define PIPE_CAP_TEXTURE_SHADOW_MAP      10
00282 #define PIPE_CAP_MAX_TEXTURE_2D_LEVELS   11
00283 #define PIPE_CAP_MAX_TEXTURE_3D_LEVELS   12
00284 #define PIPE_CAP_MAX_TEXTURE_CUBE_LEVELS 13
00285 #define PIPE_CAP_MAX_LINE_WIDTH          14
00286 #define PIPE_CAP_MAX_LINE_WIDTH_AA       15
00287 #define PIPE_CAP_MAX_POINT_WIDTH         16
00288 #define PIPE_CAP_MAX_POINT_WIDTH_AA      17
00289 #define PIPE_CAP_MAX_TEXTURE_ANISOTROPY  18
00290 #define PIPE_CAP_MAX_TEXTURE_LOD_BIAS    19
00291 #define PIPE_CAP_GUARD_BAND_LEFT         20  /*< float */
00292 #define PIPE_CAP_GUARD_BAND_TOP          21  /*< float */
00293 #define PIPE_CAP_GUARD_BAND_RIGHT        22  /*< float */
00294 #define PIPE_CAP_GUARD_BAND_BOTTOM       23  /*< float */
00295 #define PIPE_CAP_TEXTURE_MIRROR_CLAMP    24
00296 #define PIPE_CAP_TEXTURE_MIRROR_REPEAT   25
00297 
00298 
00299 
00300 #ifdef __cplusplus
00301 }
00302 #endif
00303 
00304 #endif

Generated on Tue Sep 29 06:25:17 2009 for Gallium3D by  doxygen 1.5.4