p_defines.h revision 02a47549ad182d28d330063d4f452108e3a4b452
17234550cf759fdf3ab325465090c7f5eb3b5d320Brian/**************************************************************************
27234550cf759fdf3ab325465090c7f5eb3b5d320Brian *
37234550cf759fdf3ab325465090c7f5eb3b5d320Brian * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas.
47234550cf759fdf3ab325465090c7f5eb3b5d320Brian * All Rights Reserved.
57234550cf759fdf3ab325465090c7f5eb3b5d320Brian *
67234550cf759fdf3ab325465090c7f5eb3b5d320Brian * Permission is hereby granted, free of charge, to any person obtaining a
77234550cf759fdf3ab325465090c7f5eb3b5d320Brian * copy of this software and associated documentation files (the
87234550cf759fdf3ab325465090c7f5eb3b5d320Brian * "Software"), to deal in the Software without restriction, including
97234550cf759fdf3ab325465090c7f5eb3b5d320Brian * without limitation the rights to use, copy, modify, merge, publish,
107234550cf759fdf3ab325465090c7f5eb3b5d320Brian * distribute, sub license, and/or sell copies of the Software, and to
117234550cf759fdf3ab325465090c7f5eb3b5d320Brian * permit persons to whom the Software is furnished to do so, subject to
127234550cf759fdf3ab325465090c7f5eb3b5d320Brian * the following conditions:
137234550cf759fdf3ab325465090c7f5eb3b5d320Brian *
147234550cf759fdf3ab325465090c7f5eb3b5d320Brian * The above copyright notice and this permission notice (including the
157234550cf759fdf3ab325465090c7f5eb3b5d320Brian * next paragraph) shall be included in all copies or substantial portions
167234550cf759fdf3ab325465090c7f5eb3b5d320Brian * of the Software.
177234550cf759fdf3ab325465090c7f5eb3b5d320Brian *
187234550cf759fdf3ab325465090c7f5eb3b5d320Brian * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
197234550cf759fdf3ab325465090c7f5eb3b5d320Brian * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
207234550cf759fdf3ab325465090c7f5eb3b5d320Brian * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
217234550cf759fdf3ab325465090c7f5eb3b5d320Brian * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
227234550cf759fdf3ab325465090c7f5eb3b5d320Brian * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
237234550cf759fdf3ab325465090c7f5eb3b5d320Brian * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
247234550cf759fdf3ab325465090c7f5eb3b5d320Brian * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
257234550cf759fdf3ab325465090c7f5eb3b5d320Brian *
267234550cf759fdf3ab325465090c7f5eb3b5d320Brian **************************************************************************/
277234550cf759fdf3ab325465090c7f5eb3b5d320Brian
287234550cf759fdf3ab325465090c7f5eb3b5d320Brian#ifndef SP_DEFINES_H
297234550cf759fdf3ab325465090c7f5eb3b5d320Brian#define SP_DEFINES_H
308e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell
318e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLENDFACTOR_ONE                 0x1
328e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLENDFACTOR_SRC_COLOR           0x2
338e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLENDFACTOR_SRC_ALPHA           0x3
348e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLENDFACTOR_DST_ALPHA           0x4
358e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLENDFACTOR_DST_COLOR           0x5
368e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLENDFACTOR_SRC_ALPHA_SATURATE  0x6
378e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLENDFACTOR_CONST_COLOR         0x7
388e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLENDFACTOR_CONST_ALPHA         0x8
398e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLENDFACTOR_SRC1_COLOR          0x9
408e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLENDFACTOR_SRC1_ALPHA          0x0A
418e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLENDFACTOR_ZERO                0x11
428e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLENDFACTOR_INV_SRC_COLOR       0x12
438e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLENDFACTOR_INV_SRC_ALPHA       0x13
448e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLENDFACTOR_INV_DST_ALPHA       0x14
458e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLENDFACTOR_INV_DST_COLOR       0x15
468e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLENDFACTOR_INV_CONST_COLOR     0x17
478e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLENDFACTOR_INV_CONST_ALPHA     0x18
488e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLENDFACTOR_INV_SRC1_COLOR      0x19
498e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLENDFACTOR_INV_SRC1_ALPHA      0x1A
508e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell
518e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLEND_ADD               0
528e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLEND_SUBTRACT          1
538e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLEND_REVERSE_SUBTRACT  2
548e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLEND_MIN               3
558e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_BLEND_MAX               4
568e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell
578e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_LOGICOP_CLEAR            0
588e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_LOGICOP_NOR              1
598e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_LOGICOP_AND_INVERTED     2
608e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_LOGICOP_COPY_INVERTED    3
618e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_LOGICOP_AND_REVERSE      4
628e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_LOGICOP_INVERT           5
638e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_LOGICOP_XOR              6
648e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_LOGICOP_NAND             7
658e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_LOGICOP_AND              8
668e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_LOGICOP_EQUIV            9
678e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_LOGICOP_NOOP             10
688e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_LOGICOP_OR_INVERTED      11
698e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_LOGICOP_COPY             12
708e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_LOGICOP_OR_REVERSE       13
718e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_LOGICOP_OR               14
728e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell#define SP_LOGICOP_SET              15
738e4a95a93d15a6707a29454cd47e10b08314cda2Keith Whitwell
74008fb50174fb6717f3b71836427bc6be4e44613cBrian#define SP_STENCIL_FUNC_NEVER    0
75008fb50174fb6717f3b71836427bc6be4e44613cBrian#define SP_STENCIL_FUNC_LESS     1
76008fb50174fb6717f3b71836427bc6be4e44613cBrian#define SP_STENCIL_FUNC_EQUAL    2
77008fb50174fb6717f3b71836427bc6be4e44613cBrian#define SP_STENCIL_FUNC_LEQUAL   3
78008fb50174fb6717f3b71836427bc6be4e44613cBrian#define SP_STENCIL_FUNC_GREATER  4
79008fb50174fb6717f3b71836427bc6be4e44613cBrian#define SP_STENCIL_FUNC_NOTEQUAL 5
80008fb50174fb6717f3b71836427bc6be4e44613cBrian#define SP_STENCIL_FUNC_GEQUAL   6
81008fb50174fb6717f3b71836427bc6be4e44613cBrian#define SP_STENCIL_FUNC_ALWAYS   7
82008fb50174fb6717f3b71836427bc6be4e44613cBrian
83008fb50174fb6717f3b71836427bc6be4e44613cBrian#define SP_STENCIL_OP_KEEP       0
84008fb50174fb6717f3b71836427bc6be4e44613cBrian#define SP_STENCIL_OP_ZERO       1
85008fb50174fb6717f3b71836427bc6be4e44613cBrian#define SP_STENCIL_OP_REPLACE    2
86008fb50174fb6717f3b71836427bc6be4e44613cBrian#define SP_STENCIL_OP_INCR       3
87008fb50174fb6717f3b71836427bc6be4e44613cBrian#define SP_STENCIL_OP_DECR       4
88008fb50174fb6717f3b71836427bc6be4e44613cBrian#define SP_STENCIL_OP_INCR_WRAP  5
89008fb50174fb6717f3b71836427bc6be4e44613cBrian#define SP_STENCIL_OP_DECR_WRAP  6
90008fb50174fb6717f3b71836427bc6be4e44613cBrian#define SP_STENCIL_OP_INVERT     7
91008fb50174fb6717f3b71836427bc6be4e44613cBrian
9202a47549ad182d28d330063d4f452108e3a4b452Brian/* Note: same as stencil funcs.  Also used for shadow/depth compare */
938f2888758129b0a40d71fa4ce10d606b4bcf7631Brian#define SP_DEPTH_FUNC_NEVER    0
948f2888758129b0a40d71fa4ce10d606b4bcf7631Brian#define SP_DEPTH_FUNC_LESS     1
958f2888758129b0a40d71fa4ce10d606b4bcf7631Brian#define SP_DEPTH_FUNC_EQUAL    2
968f2888758129b0a40d71fa4ce10d606b4bcf7631Brian#define SP_DEPTH_FUNC_LEQUAL   3
978f2888758129b0a40d71fa4ce10d606b4bcf7631Brian#define SP_DEPTH_FUNC_GREATER  4
988f2888758129b0a40d71fa4ce10d606b4bcf7631Brian#define SP_DEPTH_FUNC_NOTEQUAL 5
998f2888758129b0a40d71fa4ce10d606b4bcf7631Brian#define SP_DEPTH_FUNC_GEQUAL   6
1008f2888758129b0a40d71fa4ce10d606b4bcf7631Brian#define SP_DEPTH_FUNC_ALWAYS   7
1018f2888758129b0a40d71fa4ce10d606b4bcf7631Brian
10202a47549ad182d28d330063d4f452108e3a4b452Brian#define SP_TEX_WRAP_REPEAT                   0
10302a47549ad182d28d330063d4f452108e3a4b452Brian#define SP_TEX_WRAP_CLAMP                    1
10402a47549ad182d28d330063d4f452108e3a4b452Brian#define SP_TEX_WRAP_CLAMP_TO_EDGE            2
10502a47549ad182d28d330063d4f452108e3a4b452Brian#define SP_TEX_WRAP_CLAMP_TO_BORDER          3
10602a47549ad182d28d330063d4f452108e3a4b452Brian#define SP_TEX_WRAP_MIRROR_REPEAT            4
10702a47549ad182d28d330063d4f452108e3a4b452Brian#define SP_TEX_WRAP_MIRROR_CLAMP             5
10802a47549ad182d28d330063d4f452108e3a4b452Brian#define SP_TEX_WRAP_MIRROR_CLAMP_TO_EDGE     6
10902a47549ad182d28d330063d4f452108e3a4b452Brian#define SP_TEX_WRAP_MIRROR_CLAMP_TO_BORDER   7
11002a47549ad182d28d330063d4f452108e3a4b452Brian
11102a47549ad182d28d330063d4f452108e3a4b452Brian#define SP_TEX_FILTER_NEAREST                0
11202a47549ad182d28d330063d4f452108e3a4b452Brian#define SP_TEX_FILTER_LINEAR                 1
11302a47549ad182d28d330063d4f452108e3a4b452Brian#define SP_TEX_FILTER_NEAREST_MIPMAP_NEAREST 2
11402a47549ad182d28d330063d4f452108e3a4b452Brian#define SP_TEX_FILTER_NEAREST_MIPMAP_LINEAR  3
11502a47549ad182d28d330063d4f452108e3a4b452Brian#define SP_TEX_FILTER_LINEAR_MIPMAP_NEAREST  4
11602a47549ad182d28d330063d4f452108e3a4b452Brian#define SP_TEX_FILTER_LINEAR_MIPMAP_LINEAR   5
11702a47549ad182d28d330063d4f452108e3a4b452Brian
11802a47549ad182d28d330063d4f452108e3a4b452Brian#define SP_TEX_COMPARE_NONE          0
11902a47549ad182d28d330063d4f452108e3a4b452Brian#define SP_TEX_COMPARE_R_TO_TEXTURE  1
1208f2888758129b0a40d71fa4ce10d606b4bcf7631Brian
1217234550cf759fdf3ab325465090c7f5eb3b5d320Brian#endif
122