iris: Add an assert to iris_bo_gem_mmap_legacy()
It only supports two caching modes so we should assert that the only mode we ever see is one of them. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11888>
This commit is contained in:

committed by
Marge Bot

parent
24031700a7
commit
373f0d6acc
@@ -1017,6 +1017,9 @@ iris_bo_gem_mmap_legacy(struct pipe_debug_callback *dbg, struct iris_bo *bo)
|
||||
{
|
||||
struct iris_bufmgr *bufmgr = bo->bufmgr;
|
||||
|
||||
assert(bufmgr->vram.size == 0);
|
||||
assert(bo->mmap_mode == IRIS_MMAP_WB || bo->mmap_mode == IRIS_MMAP_WC);
|
||||
|
||||
struct drm_i915_gem_mmap mmap_arg = {
|
||||
.handle = bo->gem_handle,
|
||||
.size = bo->size,
|
||||
|
Reference in New Issue
Block a user