From: Alyssa Rosenzweig Date: Mon, 10 Jun 2019 18:51:54 +0000 (-0700) Subject: panfrost/midgard/disasm: LOD immediate/register select X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f4ee8d055c8b32190faab4346d279ae7ebc25f45;p=mesa.git panfrost/midgard/disasm: LOD immediate/register select Signed-off-by: Alyssa Rosenzweig --- diff --git a/src/gallium/drivers/panfrost/midgard/disassemble.c b/src/gallium/drivers/panfrost/midgard/disassemble.c index 49e2042f7fd..0007c01e3d0 100644 --- a/src/gallium/drivers/panfrost/midgard/disassemble.c +++ b/src/gallium/drivers/panfrost/midgard/disassemble.c @@ -1137,8 +1137,12 @@ print_texture_word(uint32_t *word, unsigned tabs) printf(","); } - if (texture->bias) - printf("%f, ", texture->bias / 256.0f); + if (texture->lod_register) { + /* TODO: Decode */ + printf("lod/bias/grad reg 0x%X, ", texture->bias); + } else if (texture->bias) { + printf("%f /* %d */, ", texture->bias / 256.0f, texture->bias); + } printf("\n"); diff --git a/src/gallium/drivers/panfrost/midgard/midgard.h b/src/gallium/drivers/panfrost/midgard/midgard.h index bc283bb3651..354d611e9df 100644 --- a/src/gallium/drivers/panfrost/midgard/midgard.h +++ b/src/gallium/drivers/panfrost/midgard/midgard.h @@ -520,7 +520,13 @@ __attribute__((__packed__)) unsigned cont : 1; unsigned last : 1; - unsigned format : 5; + unsigned format : 4; + + /* Is a register used to specify the + * LOD/bias/offset? If set, use the `bias` field as + * a register index. If clear, use the `bias` field + * as an immediate. */ + unsigned lod_register : 1; /* Is a register used to specify an offset? If set, use the * offset_reg_* fields to encode this, duplicated for each of the