panvk: Drop panvk_descriptor

The API-style representation of descriptors is no longer used by
anything so let's get rid of it.  All we really need is the data in the
descriptor set itself.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16276>
This commit is contained in:
Jason Ekstrand
2022-05-03 17:37:46 -05:00
committed by Marge Bot
parent d783f8949e
commit ad05bc9315
3 changed files with 1 additions and 33 deletions
@@ -191,7 +191,6 @@ panvk_CreatePipelineLayout(VkDevice _device,
}
_mesa_sha1_update(&ctx, &binding_layout->type, sizeof(binding_layout->type));
_mesa_sha1_update(&ctx, &binding_layout->array_size, sizeof(binding_layout->array_size));
_mesa_sha1_update(&ctx, &binding_layout->desc_idx, sizeof(binding_layout->sampler_idx));
_mesa_sha1_update(&ctx, &binding_layout->shader_stages, sizeof(binding_layout->shader_stages));
}
}
@@ -348,7 +347,6 @@ panvk_descriptor_set_destroy(struct panvk_device *device,
vk_free(&device->vk.alloc, set->dyn_ssbos);
vk_free(&device->vk.alloc, set->img_fmts);
vk_free(&device->vk.alloc, set->img_attrib_bufs);
vk_free(&device->vk.alloc, set->descs);
if (set->desc_bo)
panfrost_bo_unreference(set->desc_bo);
vk_object_free(&device->vk, NULL, set);
-21
View File
@@ -316,24 +316,6 @@ struct panvk_device_memory {
struct panfrost_bo *bo;
};
struct panvk_descriptor {
union {
struct {
VkImageLayout layout;
struct panvk_image_view *view;
struct panvk_sampler *sampler;
} image;
struct {
struct panvk_buffer *buffer;
uint64_t offset;
uint64_t range;
} buffer_info;
struct panvk_buffer_view *buffer_view;
};
};
struct panvk_buffer_desc {
struct panvk_buffer *buffer;
VkDeviceSize offset;
@@ -344,7 +326,6 @@ struct panvk_descriptor_set {
struct vk_object_base base;
struct panvk_descriptor_pool *pool;
const struct panvk_descriptor_set_layout *layout;
struct panvk_descriptor *descs;
struct panvk_buffer_desc *dyn_ssbos;
void *ubos;
struct panvk_buffer_desc *dyn_ubos;
@@ -365,7 +346,6 @@ struct panvk_descriptor_set_binding_layout {
unsigned array_size;
/* Indices in the desc arrays */
unsigned desc_idx;
union {
struct {
union {
@@ -401,7 +381,6 @@ struct panvk_descriptor_set_layout {
/* Shader stages affected by this descriptor set */
uint16_t shader_stages;
unsigned num_descs;
unsigned num_samplers;
unsigned num_textures;
unsigned num_ubos;
+1 -10
View File
@@ -129,7 +129,7 @@ panvk_per_arch(CreateDescriptorSetLayout)(VkDevice _device,
set_layout->binding_count = num_bindings;
unsigned sampler_idx = 0, tex_idx = 0, ubo_idx = 0;
unsigned dyn_ubo_idx = 0, dyn_ssbo_idx = 0, desc_idx = 0, img_idx = 0;
unsigned dyn_ubo_idx = 0, dyn_ssbo_idx = 0, img_idx = 0;
uint32_t desc_ubo_size = 0;
for (unsigned i = 0; i < pCreateInfo->bindingCount; i++) {
@@ -150,8 +150,6 @@ panvk_per_arch(CreateDescriptorSetLayout)(VkDevice _device,
}
}
binding_layout->desc_idx = desc_idx;
desc_idx += binding->descriptorCount;
switch (binding_layout->type) {
case VK_DESCRIPTOR_TYPE_SAMPLER:
binding_layout->sampler_idx = sampler_idx;
@@ -214,7 +212,6 @@ panvk_per_arch(CreateDescriptorSetLayout)(VkDevice _device,
if (desc_ubo_size > 0)
set_layout->desc_ubo_index = ubo_idx++;
set_layout->num_descs = desc_idx;
set_layout->num_samplers = sampler_idx;
set_layout->num_textures = tex_idx;
set_layout->num_ubos = ubo_idx;
@@ -253,11 +250,6 @@ panvk_per_arch(descriptor_set_create)(struct panvk_device *device,
return vk_error(device, VK_ERROR_OUT_OF_HOST_MEMORY);
set->layout = layout;
set->descs = vk_alloc(&device->vk.alloc,
sizeof(*set->descs) * layout->num_descs, 8,
VK_OBJECT_TYPE_DESCRIPTOR_SET);
if (!set->descs)
goto err_free_set;
if (layout->num_ubos) {
set->ubos = vk_zalloc(&device->vk.alloc,
@@ -353,7 +345,6 @@ err_free_set:
vk_free(&device->vk.alloc, set->dyn_ssbos);
vk_free(&device->vk.alloc, set->img_fmts);
vk_free(&device->vk.alloc, set->img_attrib_bufs);
vk_free(&device->vk.alloc, set->descs);
if (set->desc_bo)
panfrost_bo_unreference(set->desc_bo);
vk_object_free(&device->vk, NULL, set);