summaryrefslogtreecommitdiffstats
path: root/src/freedreno
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2019-02-25 14:44:52 -0800
committerChia-I Wu <[email protected]>2019-03-11 10:02:13 -0700
commitaa7dd6cb7f54180af91e40e38bf8890c5cc12197 (patch)
tree72f0acac436ad0e16b3b9ff04b578098d159b8a8 /src/freedreno
parentb8a5e10d0d6e6cb79417cf10ef09474eb8d8fc4e (diff)
turnip: use 32-bit offset in tu_cs_entry
We don't support nor expect BOs to be that big in tu_cs.
Diffstat (limited to 'src/freedreno')
-rw-r--r--src/freedreno/vulkan/tu_cs.c6
-rw-r--r--src/freedreno/vulkan/tu_private.h2
2 files changed, 6 insertions, 2 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);
diff --git a/src/freedreno/vulkan/tu_private.h b/src/freedreno/vulkan/tu_private.h
index 2f46134f962..f4c455d0d9d 100644
--- a/src/freedreno/vulkan/tu_private.h
+++ b/src/freedreno/vulkan/tu_private.h
@@ -484,7 +484,7 @@ struct tu_cs_entry
const struct tu_bo *bo;
uint32_t size;
- uint64_t offset;
+ uint32_t offset;
};
enum tu_cs_mode