Signed-off-by: Tomeu Vizoso <tomeu.viz...@collabora.com>
---
 src/gallium/drivers/panfrost/pandecode/mmap.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/panfrost/pandecode/mmap.h 
b/src/gallium/drivers/panfrost/pandecode/mmap.h
index 1a208336e814..e9acae877f7f 100644
--- a/src/gallium/drivers/panfrost/pandecode/mmap.h
+++ b/src/gallium/drivers/panfrost/pandecode/mmap.h
@@ -54,9 +54,8 @@ __pandecode_fetch_gpu_mem(const struct 
pandecode_mapped_memory *mem,
         if (!mem)
                 mem = pandecode_find_mapped_gpu_mem_containing(gpu_va);
 
-        if (!mem ||
-                        size + (gpu_va - mem->gpu_va) > mem->length)
-                assert(0);
+        assert(mem);
+        assert(size + (gpu_va - mem->gpu_va) <= mem->length);
 
         return mem->addr + gpu_va - mem->gpu_va;
 }
-- 
2.20.1

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

Reply via email to