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

Author: Eric Anholt <e...@anholt.net>
Date:   Thu Apr 12 15:20:17 2018 -0700

broadcom/vc5: Assert that created BOs have offset != 0.

The kernel shouldn't return a bo at NULL, and the HW special-cases NULL
address values for things like OQs.

---

 src/gallium/drivers/vc5/vc5_bufmgr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/gallium/drivers/vc5/vc5_bufmgr.c 
b/src/gallium/drivers/vc5/vc5_bufmgr.c
index 1b91fbbdae..ef6995e4de 100644
--- a/src/gallium/drivers/vc5/vc5_bufmgr.c
+++ b/src/gallium/drivers/vc5/vc5_bufmgr.c
@@ -366,6 +366,7 @@ vc5_bo_open_handle(struct vc5_screen *screen,
                 return NULL;
         }
         bo->offset = get.offset;
+        assert(bo->offset != 0);
 
         util_hash_table_set(screen->bo_handles, (void *)(uintptr_t)handle, bo);
 

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to