Mesa (master): i965: disable shadow batches when batch debugging.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat May 2 20:10:18 UTC 2020


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

Author: Dave Airlie <airlied at gmail.com>
Date:   Fri May  1 13:28:56 2020 +1000

i965: disable shadow batches when batch debugging.

If you want to dump batch state, it needs to have the relocs processed
but the relocs don't get processed on the shadow batch.

Choose debugging over speed here.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4846>

---

 src/mesa/drivers/dri/i965/intel_batchbuffer.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/intel_batchbuffer.c b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
index 74d2a3dc53e..bfb39c1ea86 100644
--- a/src/mesa/drivers/dri/i965/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/i965/intel_batchbuffer.c
@@ -130,7 +130,11 @@ intel_batchbuffer_init(struct brw_context *brw)
    struct intel_batchbuffer *batch = &brw->batch;
    const struct gen_device_info *devinfo = &screen->devinfo;
 
-   batch->use_shadow_copy = !devinfo->has_llc;
+   if (unlikely(INTEL_DEBUG & DEBUG_BATCH)) {
+      /* The shadow doesn't get relocs written so state decode fails. */
+      batch->use_shadow_copy = false;
+   } else
+      batch->use_shadow_copy = !devinfo->has_llc;
 
    init_reloc_list(&batch->batch_relocs, 250);
    init_reloc_list(&batch->state_relocs, 250);



More information about the mesa-commit mailing list