diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c index 3f320b0192e..4681557c24a 100644 --- a/src/gallium/drivers/iris/iris_bufmgr.c +++ b/src/gallium/drivers/iris/iris_bufmgr.c @@ -1038,6 +1038,12 @@ alloc_bo_from_cache(struct iris_bufmgr *bufmgr, if (cur->real.capture != !!(flags & BO_ALLOC_CAPTURE)) continue; + /* Make sure we don't recycle compressed vs non-compressed. */ + if ((iris_heap_is_compressed(flags_to_heap(bufmgr, flags))) != + iris_heap_is_compressed(cur->real.heap)) { + continue; + } + /* If the last BO in the cache is busy, there are no idle BOs. Bail, * either falling back to a non-matching memzone, or if that fails, * allocating a fresh buffer.