mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
pan/bi: Use canonical syntax for registers/uniforms/imms
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6749>
This commit is contained in:
parent
f8fc21059f
commit
5a569d09f4
1 changed files with 17 additions and 17 deletions
|
|
@ -225,25 +225,25 @@ static void dump_regs(FILE *fp, struct bifrost_regs srcs)
|
||||||
struct bifrost_reg_ctrl ctrl = DecodeRegCtrl(fp, srcs);
|
struct bifrost_reg_ctrl ctrl = DecodeRegCtrl(fp, srcs);
|
||||||
fprintf(fp, "# ");
|
fprintf(fp, "# ");
|
||||||
if (ctrl.read_reg0)
|
if (ctrl.read_reg0)
|
||||||
fprintf(fp, "port 0: R%d ", get_reg0(srcs));
|
fprintf(fp, "port 0: r%d ", get_reg0(srcs));
|
||||||
if (ctrl.read_reg1)
|
if (ctrl.read_reg1)
|
||||||
fprintf(fp, "port 1: R%d ", get_reg1(srcs));
|
fprintf(fp, "port 1: r%d ", get_reg1(srcs));
|
||||||
|
|
||||||
if (ctrl.fma_write_unit == REG_WRITE_TWO)
|
if (ctrl.fma_write_unit == REG_WRITE_TWO)
|
||||||
fprintf(fp, "port 2: R%d (write FMA) ", srcs.reg2);
|
fprintf(fp, "port 2: r%d (write FMA) ", srcs.reg2);
|
||||||
else if (ctrl.add_write_unit == REG_WRITE_TWO)
|
else if (ctrl.add_write_unit == REG_WRITE_TWO)
|
||||||
fprintf(fp, "port 2: R%d (write ADD) ", srcs.reg2);
|
fprintf(fp, "port 2: r%d (write ADD) ", srcs.reg2);
|
||||||
|
|
||||||
if (ctrl.fma_write_unit == REG_WRITE_THREE)
|
if (ctrl.fma_write_unit == REG_WRITE_THREE)
|
||||||
fprintf(fp, "port 3: R%d (write FMA) ", srcs.reg3);
|
fprintf(fp, "port 3: r%d (write FMA) ", srcs.reg3);
|
||||||
else if (ctrl.add_write_unit == REG_WRITE_THREE)
|
else if (ctrl.add_write_unit == REG_WRITE_THREE)
|
||||||
fprintf(fp, "port 3: R%d (write ADD) ", srcs.reg3);
|
fprintf(fp, "port 3: r%d (write ADD) ", srcs.reg3);
|
||||||
else if (ctrl.read_reg3)
|
else if (ctrl.read_reg3)
|
||||||
fprintf(fp, "port 3: R%d (read) ", srcs.reg3);
|
fprintf(fp, "port 3: r%d (read) ", srcs.reg3);
|
||||||
|
|
||||||
if (srcs.uniform_const) {
|
if (srcs.uniform_const) {
|
||||||
if (srcs.uniform_const & 0x80) {
|
if (srcs.uniform_const & 0x80) {
|
||||||
fprintf(fp, "uniform: U%d", (srcs.uniform_const & 0x7f) * 2);
|
fprintf(fp, "uniform: u%d", (srcs.uniform_const & 0x7f) * 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -312,8 +312,8 @@ static uint64_t get_const(uint64_t *consts, struct bifrost_regs srcs)
|
||||||
static void dump_uniform_const_src(FILE *fp, struct bifrost_regs srcs, uint64_t *consts, bool high32)
|
static void dump_uniform_const_src(FILE *fp, struct bifrost_regs srcs, uint64_t *consts, bool high32)
|
||||||
{
|
{
|
||||||
if (srcs.uniform_const & 0x80) {
|
if (srcs.uniform_const & 0x80) {
|
||||||
unsigned uniform = (srcs.uniform_const & 0x7f) * 2;
|
unsigned uniform = (srcs.uniform_const & 0x7f);
|
||||||
fprintf(fp, "U%d", uniform + (high32 ? 1 : 0));
|
fprintf(fp, "u%d.w%d", uniform, high32);
|
||||||
} else if (srcs.uniform_const >= 0x20) {
|
} else if (srcs.uniform_const >= 0x20) {
|
||||||
uint64_t imm = get_const(consts, srcs);
|
uint64_t imm = get_const(consts, srcs);
|
||||||
if (high32)
|
if (high32)
|
||||||
|
|
@ -358,19 +358,19 @@ dump_src(FILE *fp, unsigned src, struct bifrost_regs srcs, uint64_t *consts, boo
|
||||||
{
|
{
|
||||||
switch (src) {
|
switch (src) {
|
||||||
case 0:
|
case 0:
|
||||||
fprintf(fp, "R%d", get_reg0(srcs));
|
fprintf(fp, "r%d", get_reg0(srcs));
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
fprintf(fp, "R%d", get_reg1(srcs));
|
fprintf(fp, "r%d", get_reg1(srcs));
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
fprintf(fp, "R%d", srcs.reg3);
|
fprintf(fp, "r%d", srcs.reg3);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (isFMA)
|
if (isFMA)
|
||||||
fprintf(fp, "0");
|
fprintf(fp, "#0");
|
||||||
else
|
else
|
||||||
fprintf(fp, "T"); // i.e. the output of FMA this cycle
|
fprintf(fp, "t"); // i.e. the output of FMA this cycle
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
dump_uniform_const_src(fp, srcs, consts, false);
|
dump_uniform_const_src(fp, srcs, consts, false);
|
||||||
|
|
@ -379,10 +379,10 @@ dump_src(FILE *fp, unsigned src, struct bifrost_regs srcs, uint64_t *consts, boo
|
||||||
dump_uniform_const_src(fp, srcs, consts, true);
|
dump_uniform_const_src(fp, srcs, consts, true);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
fprintf(fp, "T0");
|
fprintf(fp, "t0");
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
fprintf(fp, "T1");
|
fprintf(fp, "t1");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue