diff options
author | Lionel Landwerlin <[email protected]> | 2018-11-09 16:49:13 +0000 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2018-11-16 11:40:38 +0000 |
commit | 0db898cef2f5a455138e5845689c075aadba1c1f (patch) | |
tree | 70f929a2249149fd6d08c97d952963a04db30c40 | |
parent | ac324a6809c09c54d3b0bfdb00e5e62987ec4ad8 (diff) |
intel/aub_viewer: Print blend states properly
Identical fix to :
commit 70de31d0c106f58d6b7e6d5b79b8d90c1c112a3b
Author: Jason Ekstrand <[email protected]>
Date: Fri Aug 24 16:05:08 2018 -0500
intel/batch_decoder: Print blend states properly
Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Toni Lönnberg <[email protected]>
-rw-r--r-- | src/intel/tools/aubinator_viewer_decoder.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/intel/tools/aubinator_viewer_decoder.cpp b/src/intel/tools/aubinator_viewer_decoder.cpp index fd3bc739bd7..0222fdee2ef 100644 --- a/src/intel/tools/aubinator_viewer_decoder.cpp +++ b/src/intel/tools/aubinator_viewer_decoder.cpp @@ -625,8 +625,6 @@ decode_dynamic_state_pointers(struct aub_viewer_decode_ctx *ctx, struct gen_group *inst, const uint32_t *p, const char *struct_type, int count) { - struct gen_group *state = gen_spec_find_struct(ctx->spec, struct_type); - uint32_t state_offset = 0; struct gen_field_iterator iter; @@ -649,6 +647,22 @@ decode_dynamic_state_pointers(struct aub_viewer_decode_ctx *ctx, return; } + struct gen_group *state = gen_spec_find_struct(ctx->spec, struct_type); + if (strcmp(struct_type, "BLEND_STATE") == 0) { + /* Blend states are different from the others because they have a header + * struct called BLEND_STATE which is followed by a variable number of + * BLEND_STATE_ENTRY structs. + */ + ImGui::Text("%s", struct_type); + aub_viewer_print_group(ctx, state, state_addr, state_map); + + state_addr += state->dw_length * 4; + state_map += state->dw_length * 4; + + struct_type = "BLEND_STATE_ENTRY"; + state = gen_spec_find_struct(ctx->spec, struct_type); + } + for (int i = 0; i < count; i++) { ImGui::Text("%s %d", struct_type, i); aub_viewer_print_group(ctx, state, state_addr, state_map); |