This allows us to assert that there is no dangling command in
tu_cs_begin, rather than discarding them silently.
VkResult
tu_cs_begin(struct tu_device *dev, struct tu_cs *cs, uint32_t reserve_size)
{
- assert(reserve_size);
+ /* no dangling command packet */
+ assert(cs->start == cs->cur);
if (cs->end - cs->cur < reserve_size) {
uint32_t new_size = MAX2(16384, reserve_size * sizeof(uint32_t));
if (result != VK_SUCCESS)
return result;
}
- cs->start = cs->cur;
return VK_SUCCESS;
}
.offset = (cs->start - (uint32_t *) bo->map) * sizeof(uint32_t),
};
+ cs->start = cs->cur;
+
return VK_SUCCESS;
}