summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2004-01-11 16:48:14 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2004-01-11 16:48:14 +0000
commitb673fc49b9d3a436c8fde79d1eb238afd72b55de (patch)
tree2b2d1e45a608dd47893345c887c5a9139ca5d230
parent8bc3ce92a2fa1b8b4ae2b928d4102389f2298917 (diff)
fix vertex program debugger issues (Bug 874382)
-rw-r--r--src/mesa/main/arbparse.c8
-rw-r--r--src/mesa/main/nvvertexec.c8
2 files changed, 11 insertions, 5 deletions
diff --git a/src/mesa/main/arbparse.c b/src/mesa/main/arbparse.c
index 54fef928f3..4be39533ac 100644
--- a/src/mesa/main/arbparse.c
+++ b/src/mesa/main/arbparse.c
@@ -5893,6 +5893,10 @@ parse_arb_program (GLcontext * ctx, GLubyte * inst, struct var_cache **vc_head,
(Program->Base.NumInstructions+1)*sizeof(struct fp_instruction));
Program->FPInstructions[Program->Base.NumInstructions].Opcode = FP_OPCODE_END;
+ /* YYY Wrong Position in program, whatever, at least not random -> crash
+ Program->Position = parse_position (&inst);
+ */
+ Program->FPInstructions[Program->Base.NumInstructions].StringPos = Program->Position;
}
else {
Program->VPInstructions =
@@ -5901,6 +5905,10 @@ parse_arb_program (GLcontext * ctx, GLubyte * inst, struct var_cache **vc_head,
(Program->Base.NumInstructions+1)*sizeof(struct vp_instruction));
Program->VPInstructions[Program->Base.NumInstructions].Opcode = VP_OPCODE_END;
+ /* YYY Wrong Position in program, whatever, at least not random -> crash
+ Program->Position = parse_position (&inst);
+ */
+ Program->VPInstructions[Program->Base.NumInstructions].StringPos = Program->Position;
}
/* increment Program->Base.NumInstructions */
diff --git a/src/mesa/main/nvvertexec.c b/src/mesa/main/nvvertexec.c
index 66b3363365..fd1519e9a8 100644
--- a/src/mesa/main/nvvertexec.c
+++ b/src/mesa/main/nvvertexec.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 5.1
+ * Version: 6.0
*
- * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -382,9 +382,7 @@ _mesa_exec_vertex_program(GLcontext *ctx, const struct vertex_program *program)
ctx->VertexProgram.Current->OutputsWritten |= 0x1;
}
-
-
- for (inst = program->Instructions; inst->Opcode != VP_OPCODE_END; inst++) {
+ for (inst = program->Instructions; /*inst->Opcode != VP_OPCODE_END*/; inst++) {
if (ctx->VertexProgram.CallbackEnabled &&
ctx->VertexProgram.Callback) {