freedreno/ir3: add generic get_barycentric()
[mesa.git] / src / freedreno / ir3 / disasm-a3xx.c
index 6dd3da04924ba952737ef2c20c9e72b86371bb0c..de8387f3bcafe470c2d41825a37c613240388271 100644 (file)
@@ -147,6 +147,13 @@ static void print_reg(struct disasm_ctx *ctx, reg_t reg, bool full,
                fprintf(ctx->out, "p0.%c", component[reg.comp]);
        } else {
                fprintf(ctx->out, "%s%c%d.%c", full ? "" : "h", type, reg.num, component[reg.comp]);
+               if (0 && full && !c) {
+                       reg_t hr0 = reg;
+                       hr0.iim_val *= 2;
+                       reg_t hr1 = hr0;
+                       hr1.iim_val += 1;
+                       fprintf(ctx->out, " (hr%d.%c,hr%d.%c)", hr0.num, component[hr0.comp], hr1.num, component[hr1.comp]);
+               }
        }
 }
 
@@ -955,9 +962,10 @@ static void print_instr_cat6_a3xx(struct disasm_ctx *ctx, instr_t *instr)
                /* note: dst might actually be a src (ie. address to store to) */
                print_src(ctx, &dst);
                if (cat6->dst_off && cat6->g) {
-                       struct reginfo dstoff_reg = {0};
-                       dstoff_reg.reg = (reg_t) cat6->c.off;
-                       dstoff_reg.full  = true;
+                       struct reginfo dstoff_reg = {
+                               .reg = (reg_t) cat6->c.off,
+                               .full  = true
+                       };
                        fprintf(ctx->out, "+");
                        print_src(ctx, &dstoff_reg);
                } else if (dstoff)