summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/nvvertparse.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2003-07-21 04:22:40 +0000
committerBrian Paul <[email protected]>2003-07-21 04:22:40 +0000
commit08ff059f203f05a0cc417a46fe37f83929963db5 (patch)
treea60fb074a49d3430f3a62c0319db1a7e1ef50224 /src/mesa/main/nvvertparse.c
parent190c11e06d0f33c6815c19f36bb6f8f90d2ac2be (diff)
Initial implementation of GL_MESA_program_debug - a vertex/fragment program
debugging extension.
Diffstat (limited to 'src/mesa/main/nvvertparse.c')
-rw-r--r--src/mesa/main/nvvertparse.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/mesa/main/nvvertparse.c b/src/mesa/main/nvvertparse.c
index 2e18c7abe43..9d0cd5f54d4 100644
--- a/src/mesa/main/nvvertparse.c
+++ b/src/mesa/main/nvvertparse.c
@@ -262,12 +262,12 @@ Parse_String(struct parse_state *parseState, const char *pattern)
/**********************************************************************/
-static const char *InputRegisters[] = {
+static const char *InputRegisters[MAX_NV_VERTEX_PROGRAM_INPUTS + 1] = {
"OPOS", "WGHT", "NRML", "COL0", "COL1", "FOGC", "6", "7",
"TEX0", "TEX1", "TEX2", "TEX3", "TEX4", "TEX5", "TEX6", "TEX7", NULL
};
-static const char *OutputRegisters[] = {
+static const char *OutputRegisters[MAX_NV_VERTEX_PROGRAM_OUTPUTS + 1] = {
"HPOS", "COL0", "COL1", "BFC0", "BFC1", "FOGC", "PSIZ",
"TEX0", "TEX1", "TEX2", "TEX3", "TEX4", "TEX5", "TEX6", "TEX7", NULL
};
@@ -1472,3 +1472,18 @@ _mesa_print_nv_vertex_program(const struct vertex_program *program)
}
}
+
+const char *
+_mesa_nv_vertex_input_register_name(GLuint i)
+{
+ ASSERT(i < MAX_NV_VERTEX_PROGRAM_INPUTS);
+ return InputRegisters[i];
+}
+
+
+const char *
+_mesa_nv_vertex_output_register_name(GLuint i)
+{
+ ASSERT(i < MAX_NV_VERTEX_PROGRAM_OUTPUTS);
+ return OutputRegisters[i];
+}