summaryrefslogtreecommitdiff
path: root/src/mesa/shader/arbprogparse.h
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2005-11-19 15:36:28 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2005-11-19 15:36:28 +0000
commit8c41a14c5ef0b8d2b0f1a1cd094f5abc41fa48f8 (patch)
tree81e0ebcd5230a636c59f27b10ee08cd3d4c458ef /src/mesa/shader/arbprogparse.h
parent57548094215c8c2d869417c09c9a391f1b7e28f2 (diff)
Remove the _mesa_parse_arb_vertex/fragment_program() functions into
arbprogparse.c and remove arbvertparse.[ch] and arbfragparse.[ch]. Clean up quite a bit of the arb parsing code. Rewrite parser extension code to avoid a mess of string operations every time the parser was used.
Diffstat (limited to 'src/mesa/shader/arbprogparse.h')
-rw-r--r--src/mesa/shader/arbprogparse.h57
1 files changed, 8 insertions, 49 deletions
diff --git a/src/mesa/shader/arbprogparse.h b/src/mesa/shader/arbprogparse.h
index b8498ff281..ad4046dfac 100644
--- a/src/mesa/shader/arbprogparse.h
+++ b/src/mesa/shader/arbprogparse.h
@@ -26,57 +26,16 @@
#ifndef ARBPROGPARSE_H
#define ARBPROGPARSE_H
-#include "context.h"
#include "mtypes.h"
-#include "program_instruction.h"
+extern void
+_mesa_parse_arb_vertex_program(GLcontext *ctx, GLenum target,
+ const GLvoid *str, GLsizei len,
+ struct vertex_program *program);
-#define MAX_INSTRUCTIONS 256
-
-
-/**
- * This is basically a union of the vertex_program and fragment_program
- * structs that we can use to parse the program into
- *
- * XXX we can probably get rid of this entirely someday.
- */
-struct arb_program
-{
- struct program Base;
-#if 0
- struct program_parameter_list *Parameters;
- GLbitfield InputsRead;
- GLbitfield OutputsWritten;
-#endif
-
- GLuint Position; /* Just used for error reporting while parsing */
- GLuint MajorVersion;
- GLuint MinorVersion;
-
- /* ARB_vertex_program specifics */
- struct prog_instruction VPInstructions[MAX_INSTRUCTIONS];
-
- /* Options currently recognized by the parser */
- /* ARB_fp */
- GLenum PrecisionOption; /* GL_DONT_CARE, GL_NICEST or GL_FASTEST */
- GLenum FogOption; /* GL_NONE, GL_LINEAR, GL_EXP or GL_EXP2 */
-
- /* ARB_fp & _vp */
- GLboolean HintPositionInvariant;
-
- /* ARB_fragment_program specifics */
- struct prog_instruction FPInstructions[MAX_INSTRUCTIONS];
- GLbitfield TexturesUsed[MAX_TEXTURE_IMAGE_UNITS];
- GLuint NumAluInstructions;
- GLuint NumTexInstructions;
- GLuint NumTexIndirections;
-
- GLboolean UsesKill;
-};
-
-
-extern GLboolean
-_mesa_parse_arb_program( GLcontext *ctx, const GLubyte *str, GLsizei len,
- struct arb_program *program );
+extern void
+_mesa_parse_arb_fragment_program(GLcontext *ctx, GLenum target,
+ const GLvoid *str, GLsizei len,
+ struct fragment_program *program);
#endif