From 95873a184e735b37e39ad1ba5ce05391f27b52e2 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 11 Jan 2018 17:22:58 -0800 Subject: [PATCH] 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. --- src/gallium/drivers/vc5/vc5_simulator.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/vc5/vc5_simulator.c b/src/gallium/drivers/vc5/vc5_simulator.c index d3ab2bc539d..93e8d44e30e 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); -- 2.30.2