diff options
author | Eric Anholt <[email protected]> | 2018-12-04 15:03:15 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-12-07 16:48:23 -0800 |
commit | bad95bb13c7f857df0d9767040dd28d4187715c2 (patch) | |
tree | 3becf7a7d052327dd47807c73b14654312de5d32 /src/broadcom | |
parent | 1fc78ff3f1774d6c58f78e184f01b123cf854284 (diff) |
v3d: Add VIR dumping of TMU config p0/p1.
I had a bit of it for V3D 3.x, but didn't update it for 4.x.
Diffstat (limited to 'src/broadcom')
-rw-r--r-- | src/broadcom/compiler/v3d_compiler.h | 15 | ||||
-rw-r--r-- | src/broadcom/compiler/vir_dump.c | 12 |
2 files changed, 27 insertions, 0 deletions
diff --git a/src/broadcom/compiler/v3d_compiler.h b/src/broadcom/compiler/v3d_compiler.h index bed5b588e0d..6ab1176068d 100644 --- a/src/broadcom/compiler/v3d_compiler.h +++ b/src/broadcom/compiler/v3d_compiler.h @@ -252,6 +252,21 @@ enum quniform_contents { QUNIFORM_SPILL_SIZE_PER_THREAD, }; +static inline uint32_t v3d_tmu_config_data_create(uint32_t unit, uint32_t value) +{ + return unit << 24 | value; +} + +static inline uint32_t v3d_tmu_config_data_get_unit(uint32_t data) +{ + return data >> 24; +} + +static inline uint32_t v3d_tmu_config_data_get_value(uint32_t data) +{ + return data & 0xffffff; +} + struct v3d_varying_slot { uint8_t slot_and_component; }; diff --git a/src/broadcom/compiler/vir_dump.c b/src/broadcom/compiler/vir_dump.c index f02413c6877..d1c343f773e 100644 --- a/src/broadcom/compiler/vir_dump.c +++ b/src/broadcom/compiler/vir_dump.c @@ -103,6 +103,18 @@ vir_print_reg(struct v3d_compile *c, const struct qinst *inst, fprintf(stderr, " (tex[%d].p1)", data); break; + case QUNIFORM_TMU_CONFIG_P0: + fprintf(stderr, " (tex[%d].p0 | 0x%x)", + v3d_tmu_config_data_get_unit(data), + v3d_tmu_config_data_get_value(data)); + break; + + case QUNIFORM_TMU_CONFIG_P1: + fprintf(stderr, " (tex[%d].p1 | 0x%x)", + v3d_tmu_config_data_get_unit(data), + v3d_tmu_config_data_get_value(data)); + break; + case QUNIFORM_TEXTURE_WIDTH: fprintf(stderr, " (tex[%d].width)", data); break; |