mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-28 16:10:23 +01:00
turnip: add tu_cs_discard_entries
We will start a draw IB at the beginning of a subpass and consume it at the end of the subpass. With tu_cs_discard_entries, we can reuse the same tu_cs for all subpasses.
This commit is contained in:
parent
10c5013442
commit
fffaa9b4b3
1 changed files with 11 additions and 0 deletions
|
|
@ -59,6 +59,17 @@ tu_cs_reserve_space(struct tu_device *dev,
|
|||
void
|
||||
tu_cs_reset(struct tu_device *dev, struct tu_cs *cs);
|
||||
|
||||
/**
|
||||
* Discard all entries. This allows \a cs to be reused while keeping the
|
||||
* existing BOs and command packets intact.
|
||||
*/
|
||||
static inline void
|
||||
tu_cs_discard_entries(struct tu_cs *cs)
|
||||
{
|
||||
assert(cs->mode == TU_CS_MODE_GROW);
|
||||
cs->entry_count = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the size needed for tu_cs_emit_call.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue