}
break;
- case PROG_PRINT_NV:
- switch (f) {
- case PROGRAM_INPUT:
- if (prog->Target == GL_VERTEX_PROGRAM_ARB)
- sprintf(str, "v[%d]", index);
- else
- sprintf(str, "f[%d]", index);
- break;
- case PROGRAM_OUTPUT:
- sprintf(str, "o[%d]", index);
- break;
- case PROGRAM_TEMPORARY:
- sprintf(str, "R%d", index);
- break;
- case PROGRAM_ENV_PARAM:
- sprintf(str, "c[%d]", index);
- break;
- case PROGRAM_VARYING: /* extension */
- sprintf(str, "varying[%s%d]", addr, index);
- break;
- case PROGRAM_UNIFORM: /* extension */
- sprintf(str, "uniform[%s%d]", addr, index);
- break;
- case PROGRAM_CONSTANT: /* extension */
- sprintf(str, "constant[%s%d]", addr, index);
- break;
- case PROGRAM_STATE_VAR: /* extension */
- sprintf(str, "state[%s%d]", addr, index);
- break;
- default:
- _mesa_problem(NULL, "bad file in reg_string()");
- }
- break;
-
default:
_mesa_problem(NULL, "bad mode in reg_string()");
}
break;
case OPCODE_BGNSUB:
- if (mode == PROG_PRINT_NV) {
- fprintf(f, "%s:\n", inst->Comment); /* comment is label */
- return indent;
- }
- else {
- fprintf(f, "BGNSUB");
- fprint_comment(f, inst);
- return indent + 3;
- }
+ fprintf(f, "BGNSUB");
+ fprint_comment(f, inst);
+ return indent + 3;
case OPCODE_ENDSUB:
if (mode == PROG_PRINT_DEBUG) {
fprintf(f, "ENDSUB");
}
break;
case OPCODE_CAL:
- if (mode == PROG_PRINT_NV) {
- fprintf(f, "CAL %s; # (goto %d)\n", inst->Comment, inst->BranchTarget);
- }
- else {
- fprintf(f, "CAL %u", inst->BranchTarget);
- fprint_comment(f, inst);
- }
+ fprintf(f, "CAL %u", inst->BranchTarget);
+ fprint_comment(f, inst);
break;
case OPCODE_RET:
fprintf(f, "RET (%s%s)",
case GL_VERTEX_PROGRAM_ARB:
if (mode == PROG_PRINT_ARB)
fprintf(f, "!!ARBvp1.0\n");
- else if (mode == PROG_PRINT_NV)
- fprintf(f, "!!VP1.0\n");
else
fprintf(f, "# Vertex Program/Shader %u\n", prog->Id);
break;
case GL_FRAGMENT_PROGRAM_ARB:
- case GL_FRAGMENT_PROGRAM_NV:
if (mode == PROG_PRINT_ARB)
fprintf(f, "!!ARBfp1.0\n");
- else if (mode == PROG_PRINT_NV)
- fprintf(f, "!!FP1.0\n");
else
fprintf(f, "# Fragment Program/Shader %u\n", prog->Id);
break;