case FP_OPCODE_X2D:
fprintf(stderr, "FP_OPCODE_XPD"); break;
+
+ default:
+ _mesa_warning(NULL, "Bad opcode in debug_fg_inst()");
}
fprintf(stderr, " D(0x%x:%d:%d%d%d%d) ",
#if DEBUG_FP
debug_fp_inst(ap.Base.NumInstructions, ap.FPInstructions);
+#else
+ (void) debug_fp_inst;
#endif
/* copy the relvant contents of the arb_program struct into the
program->Instructions = ap.FPInstructions;
program->InputsRead = ap.InputsRead;
program->OutputsWritten = ap.OutputsWritten;
- for (retval=0; retval<MAX_TEXTURE_IMAGE_UNITS; retval++)
+ for (retval=0; retval<MAX_TEXTURE_IMAGE_UNITS; retval++)
program->TexturesUsed[retval] = ap.TexturesUsed[retval];
program->NumAluInstructions = ap.NumAluInstructions;
program->NumTexInstructions = ap.NumTexInstructions;
#include "nvfragprog.h"
#include "arbparse.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
/* TODO:
* Fragment Program Stuff:
(byte *) "internal error 1001: out of physical memory";
static const byte *UNRESOLVED_REFERENCE =
(byte *) "internal error 1002: unresolved reference '$'";
+/*
static const byte *INVALID_PARAMETER =
(byte *) "internal error 1003: invalid parameter";
+*/
static const byte *error_message = NULL;
static byte *error_param = NULL; /* this is inserted into error_message in place of $ */
static byte *
error_get_token (error * er, dict * di, const byte * text, unsigned int ind)
{
- byte *str = NULL, *result = NULL;
+ byte *str = NULL;
if (er->m_token) {
barray *ba;
case FACE_BACK:
return 1;
}
+ return 0;
}
/**
parse_result_binding (GLcontext * ctx, byte ** inst, GLuint * binding,
GLuint * binding_idx, struct arb_program *Program)
{
- GLint a;
GLuint b;
switch (*(*inst)++) {
struct arb_program *Program, GLboolean use)
{
GLint idx;
- GLuint found, specified_length, err;
+ GLuint err;
GLint state_tokens[6];
GLfloat const_values[4];
- char *error_msg;
err = 0;
struct arb_program *Program)
{
GLuint found, specified_length, err;
- GLint state_tokens[6];
- GLfloat const_values[4];
char *error_msg;
struct var_cache *param_var;
struct var_cache **vc_head, struct arb_program *Program,
GLint * File, GLint * Index, GLboolean * WriteMask)
{
- GLuint err, result;
+ GLuint result;
byte mask;
struct var_cache *dst;
struct arb_program *Program, GLint * Index,
GLboolean * WriteMask)
{
- GLuint err, result;
- byte mask;
struct var_cache *dst;
+ GLuint result;
dst = parse_string (inst, vc_head, Program, &result);
Program->Position = parse_position (inst);
GLint * File, GLint * Index, GLboolean * Negate,
GLubyte * Swizzle)
{
- GLint a;
-
/* Grab the sign */
*Negate = parse_sign (inst);
#include "glheader.h"
#include "context.h"
+#include "arbvertparse.h"
#include "hash.h"
#include "imports.h"
#include "macros.h"
GLuint retval;
struct arb_program ap;
- retval = _mesa_parse_arb_program(ctx, str, len, &ap);
+ retval = _mesa_parse_arb_program(ctx, str, len, &ap);
/* XXX: Parse error. Cleanup things and return */
if (retval)
#if DEBUG_VP
debug_vp_inst(ap.Base.NumInstructions, ap.VPInstructions);
+#else
+ (void) debug_vp_inst;
#endif
/* copy the relvant contents of the arb_program struct into the