panfrost/midgard/disasm: LOD immediate/register select

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
This commit is contained in:
Alyssa Rosenzweig 2019-06-10 11:51:54 -07:00
parent 59fa7c95c8
commit f4ee8d055c
2 changed files with 13 additions and 3 deletions

View file

@ -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");

View file

@ -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