[Mesa-dev] [PATCH 04/12] i965/fs: print non-1 strides when dumping instructions
Connor Abbott
cwabbott0 at gmail.com
Fri Aug 14 15:30:13 PDT 2015
Signed-off-by: Connor Abbott <connor.w.abbott at intel.com>
---
src/mesa/drivers/dri/i965/brw_fs.cpp | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index ce1edc3..812648f 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -4506,6 +4506,8 @@ fs_visitor::dump_instruction(backend_instruction *be_inst, FILE *file)
fprintf(file, "???");
break;
}
+ if (inst->dst.stride != 1)
+ fprintf(file, "<%u>", inst->dst.stride);
fprintf(file, ":%s, ", brw_reg_type_letters(inst->dst.type));
for (int i = 0; i < inst->sources; i++) {
@@ -4605,6 +4607,18 @@ fs_visitor::dump_instruction(backend_instruction *be_inst, FILE *file)
fprintf(file, "|");
if (inst->src[i].file != IMM) {
+ unsigned stride;
+ if (inst->src[i].file == HW_REG) {
+ unsigned hstride = inst->src[i].fixed_hw_reg.hstride;
+ stride = (hstride == 0 ? 0 : (1 << (hstride - 1)));
+ } else {
+ stride = inst->src[i].stride;
+ }
+ if (stride != 1)
+ fprintf(file, "<%u>", stride);
+ }
+
+ if (inst->src[i].file != IMM) {
fprintf(file, ":%s", brw_reg_type_letters(inst->src[i].type));
}
--
2.4.3
More information about the mesa-dev
mailing list