summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2018-01-11 17:22:58 -0800
committerEric Anholt <eric@anholt.net>2018-01-12 21:57:30 -0800
commit95873a184e735b37e39ad1ba5ce05391f27b52e2 (patch)
treeebebf56646a64834e180a40f44dbb1513b5c7790
parent368bab43fd63ec395a2e178ce067f41bae7a1ea0 (diff)
broadcom/vc5: Print the buffer name in simulator overflow checks.
Revealed that I was writing past the TSDA, not the Z buffer as I expected.
-rw-r--r--src/gallium/drivers/vc5/vc5_simulator.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/vc5/vc5_simulator.c b/src/gallium/drivers/vc5/vc5_simulator.c
index d3ab2bc539..93e8d44e30 100644
--- a/src/gallium/drivers/vc5/vc5_simulator.c
+++ b/src/gallium/drivers/vc5/vc5_simulator.c
@@ -257,8 +257,10 @@ vc5_simulator_unpin_bos(int fd, struct vc5_job *job)
struct vc5_simulator_bo *sim_bo =
vc5_get_simulator_bo(file, bo->handle);
- assert(*(uint32_t *)(sim_bo->vaddr +
- sim_bo->size) == BO_SENTINEL);
+ if (*(uint32_t *)(sim_bo->vaddr +
+ sim_bo->size) != BO_SENTINEL) {
+ fprintf(stderr, "Buffer overflow in %s\n", bo->name);
+ }
vc5_bo_map(bo);
memcpy(bo->map, sim_bo->vaddr, bo->size);