- cerr << setw(4) << line << ": ";
- for (int i = 0; i < indent; ++i)
- cerr << " ";
- cerr << tgsi_get_opcode_name(info->opcode) << " ";
-
- bool has_operators = false;
- for (unsigned j = 0; j < num_inst_dst_regs(&inst); j++) {
- has_operators = true;
- if (j > 0)
- cerr << ", ";
-
- const st_dst_reg& dst = inst.dst[j];
- cerr << tgsi_file_names[dst.file];
-
- if (dst.file == PROGRAM_ARRAY)
- cerr << "(" << dst.array_id << ")";
-
- cerr << "[" << dst.index << "]";
-
- if (dst.writemask != TGSI_WRITEMASK_XYZW) {
- cerr << ".";
- if (dst.writemask & TGSI_WRITEMASK_X) cerr << "x";
- if (dst.writemask & TGSI_WRITEMASK_Y) cerr << "y";
- if (dst.writemask & TGSI_WRITEMASK_Z) cerr << "z";
- if (dst.writemask & TGSI_WRITEMASK_W) cerr << "w";
- }
- }
- if (has_operators)
- cerr << " := ";
-
- for (unsigned j = 0; j < num_inst_src_regs(&inst); j++) {
- if (j > 0)
- cerr << ", ";
-
- const st_src_reg& src = inst.src[j];
- cerr << tgsi_file_names[src.file]
- << "[" << src.index << "]";
- if (src.swizzle != SWIZZLE_XYZW) {
- cerr << ".";
- for (int idx = 0; idx < 4; ++idx) {
- int swz = GET_SWZ(src.swizzle, idx);
- if (swz < 4) {
- cerr << swizzle_txt[swz];
- }
- }
- }
- }
-
- if (inst.tex_offset_num_offset > 0) {
- cerr << ", TEXOFS: ";
- for (unsigned j = 0; j < inst.tex_offset_num_offset; j++) {
- if (j > 0)
- cerr << ", ";
-
- const st_src_reg& src = inst.tex_offsets[j];
- cerr << tgsi_file_names[src.file]
- << "[" << src.index << "]";
- if (src.swizzle != SWIZZLE_XYZW) {
- cerr << ".";
- for (int idx = 0; idx < 4; ++idx) {
- int swz = GET_SWZ(src.swizzle, idx);
- if (swz < 4) {
- cerr << swizzle_txt[swz];
- }
- }
- }
- }
- }
- cerr << "\n";