Module: Mesa Branch: main Commit: fdd20b9469dd962b221f9c1c0e31068a779cfc21 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fdd20b9469dd962b221f9c1c0e31068a779cfc21
Author: Erik Faye-Lund <[email protected]> Date: Tue Feb 14 12:39:53 2023 +0100 mesa/main: drop disasm-code from ffvertex_prog.c We're about to rewrite this code to emit NIR directly, so let's drop this needless logic. Acked-by: Marek Olšák <[email protected]> Reviewed-by: Emma Anholt <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22520> --- src/mesa/main/ffvertex_prog.c | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/src/mesa/main/ffvertex_prog.c b/src/mesa/main/ffvertex_prog.c index b78ee9baccd..f524342e7cc 100644 --- a/src/mesa/main/ffvertex_prog.c +++ b/src/mesa/main/ffvertex_prog.c @@ -44,7 +44,6 @@ #include "program/prog_cache.h" #include "program/prog_instruction.h" #include "program/prog_parameter.h" -#include "program/prog_print.h" #include "program/prog_statevars.h" #include "util/bitscan.h" @@ -279,13 +278,6 @@ static void make_state_key( struct gl_context *ctx, struct state_key *key ) -/* Very useful debugging tool - produces annotated listing of - * generated program with line/function references for each - * instruction back into this file: - */ -#define DISASSEM 0 - - /* Use uregs to represent registers internally, translate to Mesa's * expected formats on emit. * @@ -550,23 +542,6 @@ static void emit_dst( struct prog_dst_register *dst, } -static void debug_insn( struct prog_instruction *inst, const char *fn, - GLuint line ) -{ - if (DISASSEM) { - static const char *last_fn; - - if (fn != last_fn) { - last_fn = fn; - printf("%s:\n", fn); - } - - printf("%d:\t", line); - _mesa_print_instruction(inst); - } -} - - static void emit_op3fn(struct tnl_program *p, enum prog_opcode op, struct ureg dest, @@ -614,8 +589,6 @@ static void emit_op3fn(struct tnl_program *p, emit_arg( &inst->SrcReg[2], src2 ); emit_dst( &inst->DstReg, dest, mask ); - - debug_insn(inst, fn, line); } @@ -1685,12 +1658,6 @@ static void build_tnl_program( struct tnl_program *p ) /* Finish up: */ emit_op1(p, OPCODE_END, undef, 0, undef); - - /* Disassemble: - */ - if (DISASSEM) { - printf ("\n"); - } }
