diff --git a/src/panfrost/vulkan/panvk_descriptor_set.c b/src/panfrost/vulkan/panvk_descriptor_set.c index 8e296781d6a..451028548db 100644 --- a/src/panfrost/vulkan/panvk_descriptor_set.c +++ b/src/panfrost/vulkan/panvk_descriptor_set.c @@ -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); diff --git a/src/panfrost/vulkan/panvk_private.h b/src/panfrost/vulkan/panvk_private.h index 6b5255cbb95..b2b99dfc222 100644 --- a/src/panfrost/vulkan/panvk_private.h +++ b/src/panfrost/vulkan/panvk_private.h @@ -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; diff --git a/src/panfrost/vulkan/panvk_vX_descriptor_set.c b/src/panfrost/vulkan/panvk_vX_descriptor_set.c index 10c9b07256b..1a87a19231d 100644 --- a/src/panfrost/vulkan/panvk_vX_descriptor_set.c +++ b/src/panfrost/vulkan/panvk_vX_descriptor_set.c @@ -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);