mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
ilo: add ilo_builder_{dynamic,surface}_used()
Return how many DWords are used in dynamic and surface buffers respectively. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
This commit is contained in:
parent
2df2f60e8d
commit
ce2bda300d
1 changed files with 15 additions and 0 deletions
|
|
@ -311,6 +311,15 @@ ilo_builder_dynamic_write(struct ilo_builder *builder,
|
|||
return offset;
|
||||
}
|
||||
|
||||
static inline unsigned
|
||||
ilo_builder_dynamic_used(const struct ilo_builder *builder)
|
||||
{
|
||||
const enum ilo_builder_writer_type which = ILO_BUILDER_WRITER_BATCH;
|
||||
const struct ilo_builder_writer *writer = &builder->writers[which];
|
||||
|
||||
return writer->stolen >> 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Write a surface state to the surface buffer. The offset, in bytes, of the
|
||||
* state is returned.
|
||||
|
|
@ -344,6 +353,12 @@ ilo_builder_surface_reloc(struct ilo_builder *builder,
|
|||
bo, bo_offset, reloc_flags);
|
||||
}
|
||||
|
||||
static inline unsigned
|
||||
ilo_builder_surface_used(const struct ilo_builder *builder)
|
||||
{
|
||||
return ilo_builder_dynamic_used(builder);
|
||||
}
|
||||
|
||||
/**
|
||||
* Write a kernel to the instruction buffer. The offset, in bytes, of the
|
||||
* kernel is returned.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue