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

Author: Mike Blumenkrantz <[email protected]>
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 <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
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

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to