mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 11:00:11 +01:00
Cell: added cell_batch_free_space()
This commit is contained in:
parent
651e8e9a73
commit
8dc5972908
2 changed files with 14 additions and 0 deletions
|
|
@ -96,6 +96,15 @@ cell_batch_flush(struct cell_context *cell)
|
|||
}
|
||||
|
||||
|
||||
uint
|
||||
cell_batch_free_space(const struct cell_context *cell)
|
||||
{
|
||||
uint free = CELL_BATCH_BUFFER_SIZE
|
||||
- cell->batch_buffer_size[cell->cur_batch];
|
||||
return free;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \param cmd command to append
|
||||
* \param length command size in bytes
|
||||
|
|
@ -129,6 +138,8 @@ cell_batch_alloc(struct cell_context *cell, uint bytes)
|
|||
void *pos;
|
||||
uint size;
|
||||
|
||||
ASSERT(bytes % 4 == 0);
|
||||
|
||||
assert(cell->cur_batch >= 0);
|
||||
|
||||
size = cell->batch_buffer_size[cell->cur_batch];
|
||||
|
|
|
|||
|
|
@ -38,6 +38,9 @@ struct cell_context;
|
|||
extern void
|
||||
cell_batch_flush(struct cell_context *cell);
|
||||
|
||||
extern uint
|
||||
cell_batch_free_space(const struct cell_context *cell);
|
||||
|
||||
extern void
|
||||
cell_batch_append(struct cell_context *cell, const void *cmd, uint length);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue