summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorTomeu Vizoso <[email protected]>2019-04-11 09:09:17 +0200
committerTomeu Vizoso <[email protected]>2019-04-12 07:11:52 +0200
commitc35ae93803aead8f28f039a7fd1c1251cacfd827 (patch)
treeccf7a33add9faca832b414a647c6735008417bd3 /src/gallium
parent604d89c2d10f4d40bbdf06abded60b408547fe9f (diff)
panfrost: split asserts in pandecode
Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/panfrost/pandecode/mmap.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gallium/drivers/panfrost/pandecode/mmap.h b/src/gallium/drivers/panfrost/pandecode/mmap.h
index 1a208336e81..e9acae877f7 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;
}