summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_bufmgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/iris/iris_bufmgr.c')
-rw-r--r--src/gallium/drivers/iris/iris_bufmgr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gallium/drivers/iris/iris_bufmgr.c b/src/gallium/drivers/iris/iris_bufmgr.c
index e6c61a7a14c..659840c47aa 100644
--- a/src/gallium/drivers/iris/iris_bufmgr.c
+++ b/src/gallium/drivers/iris/iris_bufmgr.c
@@ -443,11 +443,12 @@ retry:
if (zeroed) {
void *map = iris_bo_map(NULL, bo, MAP_WRITE | MAP_RAW);
- if (!map) {
+ if (map) {
+ memset(map, 0, bo_size);
+ } else {
+ alloc_from_cache = false;
bo_free(bo);
- goto retry;
}
- memset(map, 0, bo_size);
}
}
}