radv: move more descriptor related declarations to radv_descriptor_set.h
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26713>
This commit is contained in:
parent
a080390c3c
commit
c0d7ef1e58
2 changed files with 92 additions and 91 deletions
|
|
@ -89,6 +89,94 @@ struct radv_descriptor_set_layout {
|
|||
struct radv_descriptor_set_binding_layout binding[0];
|
||||
};
|
||||
|
||||
struct radv_descriptor_range {
|
||||
uint64_t va;
|
||||
uint32_t size;
|
||||
};
|
||||
|
||||
struct radv_descriptor_set_header {
|
||||
struct vk_object_base base;
|
||||
struct radv_descriptor_set_layout *layout;
|
||||
uint32_t size;
|
||||
uint32_t buffer_count;
|
||||
|
||||
struct radeon_winsys_bo *bo;
|
||||
uint64_t va;
|
||||
uint32_t *mapped_ptr;
|
||||
struct radv_descriptor_range *dynamic_descriptors;
|
||||
};
|
||||
|
||||
struct radv_descriptor_set {
|
||||
struct radv_descriptor_set_header header;
|
||||
|
||||
struct radeon_winsys_bo *descriptors[];
|
||||
};
|
||||
|
||||
struct radv_push_descriptor_set {
|
||||
struct radv_descriptor_set_header set;
|
||||
uint32_t capacity;
|
||||
};
|
||||
|
||||
struct radv_descriptor_pool_entry {
|
||||
uint32_t offset;
|
||||
uint32_t size;
|
||||
struct radv_descriptor_set *set;
|
||||
};
|
||||
|
||||
struct radv_descriptor_pool {
|
||||
struct vk_object_base base;
|
||||
struct radeon_winsys_bo *bo;
|
||||
uint8_t *host_bo;
|
||||
uint8_t *mapped_ptr;
|
||||
uint64_t current_offset;
|
||||
uint64_t size;
|
||||
|
||||
uint8_t *host_memory_base;
|
||||
uint8_t *host_memory_ptr;
|
||||
uint8_t *host_memory_end;
|
||||
|
||||
uint32_t entry_count;
|
||||
uint32_t max_entry_count;
|
||||
|
||||
union {
|
||||
struct radv_descriptor_set *sets[0];
|
||||
struct radv_descriptor_pool_entry entries[0];
|
||||
};
|
||||
};
|
||||
|
||||
struct radv_descriptor_update_template_entry {
|
||||
VkDescriptorType descriptor_type;
|
||||
|
||||
/* The number of descriptors to update */
|
||||
uint32_t descriptor_count;
|
||||
|
||||
/* Into mapped_ptr or dynamic_descriptors, in units of the respective array */
|
||||
uint32_t dst_offset;
|
||||
|
||||
/* In dwords. Not valid/used for dynamic descriptors */
|
||||
uint32_t dst_stride;
|
||||
|
||||
uint32_t buffer_offset;
|
||||
|
||||
/* Only valid for combined image samplers and samplers */
|
||||
uint8_t has_sampler;
|
||||
uint8_t sampler_offset;
|
||||
|
||||
/* In bytes */
|
||||
size_t src_offset;
|
||||
size_t src_stride;
|
||||
|
||||
/* For push descriptors */
|
||||
const uint32_t *immutable_samplers;
|
||||
};
|
||||
|
||||
struct radv_descriptor_update_template {
|
||||
struct vk_object_base base;
|
||||
uint32_t entry_count;
|
||||
VkPipelineBindPoint bind_point;
|
||||
struct radv_descriptor_update_template_entry entry[0];
|
||||
};
|
||||
|
||||
struct radv_pipeline_layout {
|
||||
struct vk_object_base base;
|
||||
struct {
|
||||
|
|
@ -140,4 +228,8 @@ void radv_pipeline_layout_add_set(struct radv_pipeline_layout *layout, uint32_t
|
|||
void radv_pipeline_layout_hash(struct radv_pipeline_layout *layout);
|
||||
void radv_pipeline_layout_finish(struct radv_device *device, struct radv_pipeline_layout *layout);
|
||||
|
||||
VkResult radv_create_descriptor_pool(struct radv_device *device, const VkDescriptorPoolCreateInfo *pCreateInfo,
|
||||
const VkAllocationCallbacks *pAllocator, VkDescriptorPool *pDescriptorPool,
|
||||
bool is_internal);
|
||||
|
||||
#endif /* RADV_DESCRIPTOR_SET_H */
|
||||
|
|
|
|||
|
|
@ -1096,94 +1096,6 @@ struct radv_device_memory {
|
|||
void radv_device_memory_init(struct radv_device_memory *mem, struct radv_device *device, struct radeon_winsys_bo *bo);
|
||||
void radv_device_memory_finish(struct radv_device_memory *mem);
|
||||
|
||||
struct radv_descriptor_range {
|
||||
uint64_t va;
|
||||
uint32_t size;
|
||||
};
|
||||
|
||||
struct radv_descriptor_set_header {
|
||||
struct vk_object_base base;
|
||||
struct radv_descriptor_set_layout *layout;
|
||||
uint32_t size;
|
||||
uint32_t buffer_count;
|
||||
|
||||
struct radeon_winsys_bo *bo;
|
||||
uint64_t va;
|
||||
uint32_t *mapped_ptr;
|
||||
struct radv_descriptor_range *dynamic_descriptors;
|
||||
};
|
||||
|
||||
struct radv_descriptor_set {
|
||||
struct radv_descriptor_set_header header;
|
||||
|
||||
struct radeon_winsys_bo *descriptors[];
|
||||
};
|
||||
|
||||
struct radv_push_descriptor_set {
|
||||
struct radv_descriptor_set_header set;
|
||||
uint32_t capacity;
|
||||
};
|
||||
|
||||
struct radv_descriptor_pool_entry {
|
||||
uint32_t offset;
|
||||
uint32_t size;
|
||||
struct radv_descriptor_set *set;
|
||||
};
|
||||
|
||||
struct radv_descriptor_pool {
|
||||
struct vk_object_base base;
|
||||
struct radeon_winsys_bo *bo;
|
||||
uint8_t *host_bo;
|
||||
uint8_t *mapped_ptr;
|
||||
uint64_t current_offset;
|
||||
uint64_t size;
|
||||
|
||||
uint8_t *host_memory_base;
|
||||
uint8_t *host_memory_ptr;
|
||||
uint8_t *host_memory_end;
|
||||
|
||||
uint32_t entry_count;
|
||||
uint32_t max_entry_count;
|
||||
|
||||
union {
|
||||
struct radv_descriptor_set *sets[0];
|
||||
struct radv_descriptor_pool_entry entries[0];
|
||||
};
|
||||
};
|
||||
|
||||
struct radv_descriptor_update_template_entry {
|
||||
VkDescriptorType descriptor_type;
|
||||
|
||||
/* The number of descriptors to update */
|
||||
uint32_t descriptor_count;
|
||||
|
||||
/* Into mapped_ptr or dynamic_descriptors, in units of the respective array */
|
||||
uint32_t dst_offset;
|
||||
|
||||
/* In dwords. Not valid/used for dynamic descriptors */
|
||||
uint32_t dst_stride;
|
||||
|
||||
uint32_t buffer_offset;
|
||||
|
||||
/* Only valid for combined image samplers and samplers */
|
||||
uint8_t has_sampler;
|
||||
uint8_t sampler_offset;
|
||||
|
||||
/* In bytes */
|
||||
size_t src_offset;
|
||||
size_t src_stride;
|
||||
|
||||
/* For push descriptors */
|
||||
const uint32_t *immutable_samplers;
|
||||
};
|
||||
|
||||
struct radv_descriptor_update_template {
|
||||
struct vk_object_base base;
|
||||
uint32_t entry_count;
|
||||
VkPipelineBindPoint bind_point;
|
||||
struct radv_descriptor_update_template_entry entry[0];
|
||||
};
|
||||
|
||||
struct radv_buffer {
|
||||
struct vk_buffer vk;
|
||||
|
||||
|
|
@ -3067,9 +2979,6 @@ VkResult radv_alloc_memory(struct radv_device *device, const VkMemoryAllocateInf
|
|||
const VkAllocationCallbacks *pAllocator, VkDeviceMemory *pMem, bool is_internal);
|
||||
VkResult radv_create_query_pool(struct radv_device *device, const VkQueryPoolCreateInfo *pCreateInfo,
|
||||
const VkAllocationCallbacks *pAllocator, VkQueryPool *pQueryPool, bool is_internal);
|
||||
VkResult radv_create_descriptor_pool(struct radv_device *device, const VkDescriptorPoolCreateInfo *pCreateInfo,
|
||||
const VkAllocationCallbacks *pAllocator, VkDescriptorPool *pDescriptorPool,
|
||||
bool is_internal);
|
||||
VkResult radv_create_event(struct radv_device *device, const VkEventCreateInfo *pCreateInfo,
|
||||
const VkAllocationCallbacks *pAllocator, VkEvent *pEvent, bool is_internal);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue