diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2018-08-24 16:05:08 -0500 |
---|---|---|
committer | Andres Gomez <agomez@igalia.com> | 2018-08-28 15:50:59 +0300 |
commit | 633ef670bb36d6543611ae6ea3c06217cb998483 (patch) | |
tree | b49764e60c419e4e18014e89d5076dd22cbe8f8e /src/intel | |
parent | d963a1635292388f278367a453a76dd7acb688eb (diff) |
intel/batch_decoder: Print blend states properly
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
(cherry picked from commit 70de31d0c106f58d6b7e6d5b79b8d90c1c112a3b)
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/common/gen_batch_decoder.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/intel/common/gen_batch_decoder.c b/src/intel/common/gen_batch_decoder.c index 9297dd4a691..f2510e21b4f 100644 --- a/src/intel/common/gen_batch_decoder.c +++ b/src/intel/common/gen_batch_decoder.c @@ -642,7 +642,6 @@ decode_dynamic_state_pointers(struct gen_batch_decode_ctx *ctx, int count) { struct gen_group *inst = gen_spec_find_instruction(ctx->spec, p); - struct gen_group *state = gen_spec_find_struct(ctx->spec, struct_type); uint32_t state_offset = 0; @@ -664,6 +663,22 @@ decode_dynamic_state_pointers(struct gen_batch_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. + */ + fprintf(ctx->fp, "%s\n", struct_type); + ctx_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++) { fprintf(ctx->fp, "%s %d\n", struct_type, i); ctx_print_group(ctx, state, state_addr, state_map); |