From: Eric Anholt Date: Fri, 12 Jan 2018 01:22:58 +0000 (-0800) Subject: broadcom/vc5: Print the buffer name in simulator overflow checks. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=95873a184e735b37e39ad1ba5ce05391f27b52e2;p=mesa.git 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. --- 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);