Mesa (master): intel: avoid dumping null cs sampler/binding states

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Apr 7 14:34:00 UTC 2021


Module: Mesa
Branch: master
Commit: 387189a95542082e055f3a98066e75b5637b2e45
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=387189a95542082e055f3a98066e75b5637b2e45

Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date:   Wed Apr  7 10:08:26 2021 -0400

intel: avoid dumping null cs sampler/binding states

this crashes the driver

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10077>

---

 src/intel/common/intel_batch_decoder.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/intel/common/intel_batch_decoder.c b/src/intel/common/intel_batch_decoder.c
index 579a8649a0a..491c3a4ebd6 100644
--- a/src/intel/common/intel_batch_decoder.c
+++ b/src/intel/common/intel_batch_decoder.c
@@ -390,8 +390,10 @@ handle_interface_descriptor_data(struct intel_batch_decode_ctx *ctx,
    ctx_disassemble_program(ctx, ksp, "compute shader");
    fprintf(ctx->fp, "\n");
 
-   dump_samplers(ctx, sampler_offset, sampler_count);
-   dump_binding_table(ctx, binding_table_offset, binding_entry_count);
+   if (sampler_count)
+      dump_samplers(ctx, sampler_offset, sampler_count);
+   if (binding_entry_count)
+      dump_binding_table(ctx, binding_table_offset, binding_entry_count);
 }
 
 static void



More information about the mesa-commit mailing list