mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 12:00:12 +01:00
anv: make layout size computation helper available across compilation units
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
parent
c83e33e6ee
commit
c2d199adec
2 changed files with 6 additions and 3 deletions
|
|
@ -391,8 +391,8 @@ struct pool_free_list_entry {
|
|||
uint32_t size;
|
||||
};
|
||||
|
||||
static size_t
|
||||
layout_size(const struct anv_descriptor_set_layout *layout)
|
||||
size_t
|
||||
anv_descriptor_set_layout_size(const struct anv_descriptor_set_layout *layout)
|
||||
{
|
||||
return
|
||||
sizeof(struct anv_descriptor_set) +
|
||||
|
|
@ -412,7 +412,7 @@ anv_descriptor_set_create(struct anv_device *device,
|
|||
struct anv_descriptor_set **out_set)
|
||||
{
|
||||
struct anv_descriptor_set *set;
|
||||
const size_t size = layout_size(layout);
|
||||
const size_t size = anv_descriptor_set_layout_size(layout);
|
||||
|
||||
set = NULL;
|
||||
if (size <= pool->size - pool->next) {
|
||||
|
|
|
|||
|
|
@ -935,6 +935,9 @@ struct anv_descriptor_pool {
|
|||
char data[0];
|
||||
};
|
||||
|
||||
size_t
|
||||
anv_descriptor_set_layout_size(const struct anv_descriptor_set_layout *layout);
|
||||
|
||||
VkResult
|
||||
anv_descriptor_set_create(struct anv_device *device,
|
||||
struct anv_descriptor_pool *pool,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue