intel/aubinator: Gracefully handle dynamic state not being available

Some older versions of the Vulkan driver didn't properly tag dynamic
state as needing to be captured.  Also, this prevents crashes when
looking at dumps on older kernels.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
This commit is contained in:
Jason Ekstrand 2017-12-27 08:40:30 -08:00
parent a92d52c3c1
commit 69fa3fb77f
1 changed files with 5 additions and 0 deletions

View File

@ -582,6 +582,11 @@ decode_dynamic_state_pointers(struct gen_batch_decode_ctx *ctx,
const char *struct_type, const uint32_t *p,
int count)
{
if (ctx->dynamic_base.map == NULL) {
fprintf(ctx->fp, " dynamic %s state unavailable\n", struct_type);
return;
}
struct gen_group *inst = gen_spec_find_instruction(ctx->spec, p);
struct gen_group *state = gen_spec_find_struct(ctx->spec, struct_type);