Gen9 is mostly the same as Gen8. NOTE: There are some things intentionally left out of this decoding.
Signed-off-by: Ben Widawsky <b...@bwidawsk.net> --- src/mesa/drivers/dri/i965/brw_state_dump.c | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_state_dump.c b/src/mesa/drivers/dri/i965/brw_state_dump.c index abda1e9..d199a89 100644 --- a/src/mesa/drivers/dri/i965/brw_state_dump.c +++ b/src/mesa/drivers/dri/i965/brw_state_dump.c @@ -449,9 +449,19 @@ static void dump_gen8_surface_state(struct brw_context *brw, uint32_t offset) const char *name = "SURF"; uint32_t *surf = brw->batch.bo->virtual + offset; const char *tiling_modes[] = { "LINEAR", "W-tiled", "X-tiled", "Y-tiled" }; - const char *aux_mode[] = + char *aux_mode[] = {"AUX_NONE", "AUX_MCS", "AUX_APPEND", "AUX_HIZ", "RSVD", "RSVD"}; + if (brw->gen >= 9) { + if (GET_BITS(surf[4], 5, 3) > 0) { + aux_mode[1] = "AUX_CCS_D (MCS)"; + aux_mode[5] = "AUX_CCS_E (MCS)"; + } else { + aux_mode[1] = "AUX_CCS_D (CCS)"; + aux_mode[5] = "AUX_CCS_E (CCS)"; + } + } + batch_out(brw, "SURF'", offset, 0, "%s %s %s VALIGN%d HALIGN%d %s\n", get_965_surfacetype(GET_FIELD(surf[0], BRW_SURFACE_TYPE)), get_965_surface_format(GET_FIELD(surf[0], BRW_SURFACE_FORMAT)), @@ -489,12 +499,18 @@ static void dump_gen8_surface_state(struct brw_context *brw, uint32_t offset) GET_FIELD(surf[6], GEN8_SURFACE_AUX_QPITCH) << 2, GET_FIELD(surf[6], GEN8_SURFACE_AUX_PITCH) << 2 ); - batch_out(brw, name, offset, 7, "Clear color: %c%c%c%c\n", - GET_BITS(surf[7], 31, 31) ? 'R' : '-', - GET_BITS(surf[7], 30, 30) ? 'G' : '-', - GET_BITS(surf[7], 29, 29) ? 'B' : '-', - GET_BITS(surf[7], 28, 28) ? 'A' : '-' - ); + if (brw->gen >= 9) { + batch_out(brw, name, offset, 7, "Clear color: R(%x)G(%x)B(%x)A(%x)\n", + surf[12], surf[13], surf[14], surf[15] + ); + } else { + batch_out(brw, name, offset, 7, "Clear color: %c%c%c%c\n", + GET_BITS(surf[7], 31, 31) ? 'R' : '-', + GET_BITS(surf[7], 30, 30) ? 'G' : '-', + GET_BITS(surf[7], 29, 29) ? 'B' : '-', + GET_BITS(surf[7], 28, 28) ? 'A' : '-' + ); + } } static void -- 2.3.5 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev