1 /* $Id: nvvertprog.h,v 1.1 2003/01/14 04:55:46 brianp Exp $ */
4 * Mesa 3-D graphics library
7 * Copyright (C) 1999-2002 Brian Paul All Rights Reserved.
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
16 * The above copyright notice and this permission notice shall be included
17 * in all copies or substantial portions of the Software.
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
22 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
23 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
24 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28 /* Private vertex program types and constants only used by files
29 * related to vertex programs.
36 #define VP_NUM_INPUT_REGS MAX_NV_VERTEX_PROGRAM_INPUTS
37 #define VP_NUM_OUTPUT_REGS MAX_NV_VERTEX_PROGRAM_INPUTS
38 #define VP_NUM_TEMP_REGS MAX_NV_VERTEX_PROGRAM_TEMPS
39 #define VP_NUM_PROG_REGS MAX_NV_VERTEX_PROGRAM_PARAMS
41 /* Location of register groups within the whole register file */
42 #define VP_INPUT_REG_START 0
43 #define VP_INPUT_REG_END (VP_INPUT_REG_START + VP_NUM_INPUT_REGS - 1)
44 #define VP_OUTPUT_REG_START (VP_INPUT_REG_END + 1)
45 #define VP_OUTPUT_REG_END (VP_OUTPUT_REG_START + VP_NUM_OUTPUT_REGS - 1)
46 #define VP_TEMP_REG_START (VP_OUTPUT_REG_END + 1)
47 #define VP_TEMP_REG_END (VP_TEMP_REG_START + VP_NUM_TEMP_REGS - 1)
48 #define VP_PROG_REG_START (VP_TEMP_REG_END + 1)
49 #define VP_PROG_REG_END (VP_PROG_REG_START + VP_NUM_PROG_REGS - 1)
52 /* Vertex program opcodes */
80 /* Instruction source register */
81 struct vp_src_register
83 GLint Register
; /* or the offset from the address register */
90 /* Instruction destination register */
91 struct vp_dst_register
94 GLboolean WriteMask
[4];
98 /* Vertex program instruction */
101 enum vp_opcode Opcode
;
102 struct vp_src_register SrcReg
[3];
103 struct vp_dst_register DstReg
;
107 #endif /* VERTPROG_H */