From: Alyssa Rosenzweig Date: Mon, 10 Jun 2019 18:51:54 +0000 (-0700) Subject: panfrost/midgard/disasm: LOD immediate/register select X-Git-Tag: upstream/19.3.0~5627 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f4ee8d055c8b32190faab4346d279ae7ebc25f45;p=platform%2Fupstream%2Fmesa.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 49e2042..0007c01 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 bc283bb..354d611 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