[Mesa-dev] [PATCH 06/18] panfrost/midgard/disasm: LOD immediate/register select
Alyssa Rosenzweig
alyssa.rosenzweig at collabora.com
Mon Jun 10 22:01:34 UTC 2019
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
---
src/gallium/drivers/panfrost/midgard/disassemble.c | 8 ++++++--
src/gallium/drivers/panfrost/midgard/midgard.h | 8 +++++++-
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/gallium/drivers/panfrost/midgard/disassemble.c b/src/gallium/drivers/panfrost/midgard/disassemble.c
index 58a07e4535c..10729ca122b 100644
--- a/src/gallium/drivers/panfrost/midgard/disassemble.c
+++ b/src/gallium/drivers/panfrost/midgard/disassemble.c
@@ -1139,8 +1139,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 743fdf3811a..dbcee0f53b5 100644
--- a/src/gallium/drivers/panfrost/midgard/midgard.h
+++ b/src/gallium/drivers/panfrost/midgard/midgard.h
@@ -517,7 +517,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
--
2.20.1
More information about the mesa-dev
mailing list