aboutsummaryrefslogtreecommitdiffstats
path: root/src/freedreno/vulkan/tu_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/freedreno/vulkan/tu_cs.c')
-rw-r--r--src/freedreno/vulkan/tu_cs.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/freedreno/vulkan/tu_cs.c b/src/freedreno/vulkan/tu_cs.c
index 193ae5cc9fe..11e1737d5d3 100644
--- a/src/freedreno/vulkan/tu_cs.c
+++ b/src/freedreno/vulkan/tu_cs.c
@@ -307,7 +307,11 @@ tu_cs_reserve_space(struct tu_device *dev,
VkResult result = tu_cs_add_bo(dev, cs, new_size);
if (result != VK_SUCCESS)
return result;
- cs->next_bo_size = new_size * 2;
+
+ /* double the size for the next bo */
+ new_size <<= 1;
+ if (cs->next_bo_size < new_size)
+ cs->next_bo_size = new_size;
}
assert(tu_cs_get_space(cs) >= reserved_size);