diff --git a/src/intel/compiler/brw_fs.cpp b/src/intel/compiler/brw_fs.cpp index e3cdf95b2e8..fc3a493388f 100644 --- a/src/intel/compiler/brw_fs.cpp +++ b/src/intel/compiler/brw_fs.cpp @@ -2712,6 +2712,12 @@ fs_visitor::dump_instruction_to_file(const fs_inst *inst, FILE *file, const brw: if (inst->has_no_mask_send_params) fprintf(file, "NoMaskParams "); + if (inst->sched.pipe != TGL_PIPE_NONE) { + fprintf(file, "{ "); + brw_print_swsb(file, devinfo, inst->sched); + fprintf(file, " } "); + } + fprintf(file, "\n"); } @@ -4588,3 +4594,30 @@ namespace brw { inst->conditional_mod = BRW_CONDITIONAL_NZ; } } + +void +brw_print_swsb(FILE *f, const struct intel_device_info *devinfo, const tgl_swsb swsb) +{ + if (swsb.pipe == TGL_PIPE_NONE) + return; + + if (swsb.regdist) { + fprintf(f, "%s@%d", + (devinfo && devinfo->verx10 < 125 ? "" : + swsb.pipe == TGL_PIPE_FLOAT ? "F" : + swsb.pipe == TGL_PIPE_INT ? "I" : + swsb.pipe == TGL_PIPE_LONG ? "L" : + swsb.pipe == TGL_PIPE_ALL ? "A" : + swsb.pipe == TGL_PIPE_MATH ? "M" : "" ), + swsb.regdist); + } + + if (swsb.mode) { + if (swsb.regdist) + fprintf(f, " "); + + fprintf(f, "$%d%s", swsb.sbid, + (swsb.mode & TGL_SBID_SET ? "" : + swsb.mode & TGL_SBID_DST ? ".dst" : ".src")); + } +} diff --git a/src/intel/compiler/brw_fs.h b/src/intel/compiler/brw_fs.h index 3769dceb629..1b443d7299d 100644 --- a/src/intel/compiler/brw_fs.h +++ b/src/intel/compiler/brw_fs.h @@ -504,6 +504,8 @@ public: int iteration, int pass_num) const; }; +void brw_print_swsb(FILE *f, const struct intel_device_info *devinfo, const tgl_swsb swsb); + /** * Return the flag register used in fragment shaders to keep track of live * samples. On Gfx7+ we use f1.0-f1.1 to allow discard jumps in SIMD32 diff --git a/src/intel/compiler/test_fs_scoreboard.cpp b/src/intel/compiler/test_fs_scoreboard.cpp index 2a44f532bfc..9b050dac2a4 100644 --- a/src/intel/compiler/test_fs_scoreboard.cpp +++ b/src/intel/compiler/test_fs_scoreboard.cpp @@ -130,18 +130,20 @@ bool operator ==(const tgl_swsb &a, const tgl_swsb &b) } std::ostream &operator<<(std::ostream &os, const tgl_swsb &swsb) { - if (swsb.regdist) - os << "@" << swsb.regdist; + char *buf; + size_t len; + FILE *f = open_memstream(&buf, &len); - if (swsb.mode) { - if (swsb.regdist) - os << " "; - os << "$" << swsb.sbid; - if (swsb.mode & TGL_SBID_DST) - os << ".dst"; - if (swsb.mode & TGL_SBID_SRC) - os << ".src"; - } + /* Because we don't have a devinfo to pass here, for TGL we'll see + * F@1 annotations instead of @1 since the float pipe is the only one + * used there. + */ + brw_print_swsb(f, NULL, swsb); + fflush(f); + fclose(f); + + os << buf; + free(buf); return os; }