diff options
author | Eric Anholt <[email protected]> | 2012-08-27 14:35:01 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2012-10-08 08:50:27 -0700 |
commit | 97615b2d8c7c3cea6fd3a43bcb1739a96e2046c4 (patch) | |
tree | e8b5b5bedbf9ec120b2b2cbecce3fda3e49795e8 /src/mesa/drivers/dri/i965/brw_fs_emit.cpp | |
parent | 014aaa97d3d7f78629e6e030953be0e9fb7f33dd (diff) |
i965: Replace brw_wm_* with dumping code into the fs_visitor.
This makes a giant pile of code newly dead. It also fixes TXB on newer
chipsets, which has been totally broken (I now have a piglit test for that).
It passes the same set of Ian's ARB_fragment_program tests. It also improves
high-settings ETQW performance by 3.2 +/- 1.9% (n=3), thanks to better
optimization and having 8-wide along with 16-wide shaders.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=24355
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_fs_emit.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_emit.cpp | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp index e477a6168a9..aa60ed571da 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_emit.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_emit.cpp @@ -726,11 +726,16 @@ fs_visitor::generate_code() { int last_native_insn_offset = p->next_insn_offset; const char *last_annotation_string = NULL; - ir_instruction *last_annotation_ir = NULL; + const void *last_annotation_ir = NULL; if (unlikely(INTEL_DEBUG & DEBUG_WM)) { - printf("Native code for fragment shader %d (%d-wide dispatch):\n", - prog->Name, c->dispatch_width); + if (shader) { + printf("Native code for fragment shader %d (%d-wide dispatch):\n", + prog->Name, c->dispatch_width); + } else { + printf("Native code for fragment program %d (%d-wide dispatch):\n", + c->fp->program.Base.Id, c->dispatch_width); + } } fs_cfg *cfg = NULL; @@ -762,7 +767,16 @@ fs_visitor::generate_code() last_annotation_ir = inst->ir; if (last_annotation_ir) { printf(" "); - last_annotation_ir->print(); + if (shader) + ((ir_instruction *)inst->ir)->print(); + else { + const prog_instruction *fpi; + fpi = (const prog_instruction *)inst->ir; + printf("%d: ", (int)(fpi - fp->Base.Instructions)); + _mesa_fprint_instruction_opt(stdout, + fpi, + 0, PROG_PRINT_DEBUG, NULL); + } printf("\n"); } } |