diff options
author | Chia-I Wu <[email protected]> | 2019-01-18 14:24:45 -0800 |
---|---|---|
committer | Chia-I Wu <[email protected]> | 2019-03-11 10:01:41 -0700 |
commit | 3b3af6321b9231752014ed441ba9b056219e23aa (patch) | |
tree | 08bb7f240827ebbce409ba368a4585b03675d72e /src/freedreno/vulkan/tu_cs.c | |
parent | aaa59ef70c100fe861c099197581a1131f2bc8a4 (diff) |
turnip: add tu_cs_reserve_space(_assert)
They are used like
tu_cs_reserve_space(...);
tu_cs_emit(...);
...;
tu_cs_reserve_space_assert();
to make sure we reserved enough space at the beginning.
Diffstat (limited to 'src/freedreno/vulkan/tu_cs.c')
-rw-r--r-- | src/freedreno/vulkan/tu_cs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/freedreno/vulkan/tu_cs.c b/src/freedreno/vulkan/tu_cs.c index efc38b17757..ffb1dc4f10f 100644 --- a/src/freedreno/vulkan/tu_cs.c +++ b/src/freedreno/vulkan/tu_cs.c @@ -117,6 +117,8 @@ tu_cs_begin(struct tu_device *dev, struct tu_cs *cs, uint32_t reserve_size) return result; } + assert(cs->end - cs->cur >= reserve_size); + return VK_SUCCESS; } |