mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
radv: Implement VK_EXT_mutable_descriptor_type.
Trivial promotion from VALVE, just rename enums and types. Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18610>
This commit is contained in:
parent
3bfda5cc0e
commit
f5b46a643f
5 changed files with 17 additions and 14 deletions
|
|
@ -615,6 +615,7 @@ Khronos extensions that are not part of any Vulkan version:
|
|||
VK_AMD_shader_trinary_minmax DONE (radv)
|
||||
VK_AMD_texture_gather_bias_lod DONE (radv)
|
||||
VK_ARM_rasterization_order_attachment_access DONE (lvp, tu)
|
||||
VK_EXT_mutable_descriptor_type DONE (radv)
|
||||
|
||||
|
||||
OpenCL 1.0 -- all DONE:
|
||||
|
|
|
|||
|
|
@ -5,3 +5,4 @@ VK_EXT_attachment_feedback_loop_layout on RADV, lavapipe
|
|||
VK_KHR_global_priority on RADV
|
||||
GL_KHR_blend_equation_advanced_coherent on zink
|
||||
VK_EXT_load_store_op_none on RADV
|
||||
VK_EXT_mutable_descriptor_type on RADV
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ radv_dump_descriptor_set(struct radv_device *device, struct radv_descriptor_set
|
|||
break;
|
||||
case VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC:
|
||||
case VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC:
|
||||
case VK_DESCRIPTOR_TYPE_MUTABLE_VALVE:
|
||||
case VK_DESCRIPTOR_TYPE_MUTABLE_EXT:
|
||||
case VK_DESCRIPTOR_TYPE_ACCELERATION_STRUCTURE_KHR:
|
||||
/* todo */
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ radv_descriptor_type_buffer_count(VkDescriptorType type)
|
|||
case VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE:
|
||||
case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT:
|
||||
case VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER:
|
||||
case VK_DESCRIPTOR_TYPE_MUTABLE_VALVE:
|
||||
case VK_DESCRIPTOR_TYPE_MUTABLE_EXT:
|
||||
return 3;
|
||||
default:
|
||||
return 1;
|
||||
|
|
@ -119,8 +119,8 @@ radv_CreateDescriptorSetLayout(VkDevice _device, const VkDescriptorSetLayoutCrea
|
|||
assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO);
|
||||
const VkDescriptorSetLayoutBindingFlagsCreateInfo *variable_flags =
|
||||
vk_find_struct_const(pCreateInfo->pNext, DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO);
|
||||
const VkMutableDescriptorTypeCreateInfoVALVE *mutable_info =
|
||||
vk_find_struct_const(pCreateInfo->pNext, MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE);
|
||||
const VkMutableDescriptorTypeCreateInfoEXT *mutable_info =
|
||||
vk_find_struct_const(pCreateInfo->pNext, MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT);
|
||||
|
||||
uint32_t num_bindings = 0;
|
||||
uint32_t immutable_sampler_count = 0;
|
||||
|
|
@ -262,7 +262,7 @@ radv_CreateDescriptorSetLayout(VkDevice _device, const VkDescriptorSetLayoutCrea
|
|||
set_layout->binding[b].size = 16;
|
||||
alignment = 16;
|
||||
break;
|
||||
case VK_DESCRIPTOR_TYPE_MUTABLE_VALVE: {
|
||||
case VK_DESCRIPTOR_TYPE_MUTABLE_EXT: {
|
||||
uint64_t mutable_size = 0, mutable_align = 0;
|
||||
radv_mutable_descriptor_type_size_alignment(&mutable_info->pMutableDescriptorTypeLists[j],
|
||||
&mutable_size, &mutable_align);
|
||||
|
|
@ -370,8 +370,8 @@ radv_GetDescriptorSetLayoutSupport(VkDevice device,
|
|||
vk_find_struct_const(pCreateInfo->pNext, DESCRIPTOR_SET_LAYOUT_BINDING_FLAGS_CREATE_INFO);
|
||||
VkDescriptorSetVariableDescriptorCountLayoutSupport *variable_count = vk_find_struct(
|
||||
(void *)pCreateInfo->pNext, DESCRIPTOR_SET_VARIABLE_DESCRIPTOR_COUNT_LAYOUT_SUPPORT);
|
||||
const VkMutableDescriptorTypeCreateInfoVALVE *mutable_info =
|
||||
vk_find_struct_const(pCreateInfo->pNext, MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE);
|
||||
const VkMutableDescriptorTypeCreateInfoEXT *mutable_info =
|
||||
vk_find_struct_const(pCreateInfo->pNext, MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT);
|
||||
if (variable_count) {
|
||||
variable_count->maxVariableDescriptorCount = 0;
|
||||
}
|
||||
|
|
@ -423,7 +423,7 @@ radv_GetDescriptorSetLayoutSupport(VkDevice device,
|
|||
descriptor_size = descriptor_count;
|
||||
descriptor_count = 1;
|
||||
break;
|
||||
case VK_DESCRIPTOR_TYPE_MUTABLE_VALVE:
|
||||
case VK_DESCRIPTOR_TYPE_MUTABLE_EXT:
|
||||
if (!radv_mutable_descriptor_type_size_alignment(
|
||||
&mutable_info->pMutableDescriptorTypeLists[i], &descriptor_size,
|
||||
&descriptor_alignment)) {
|
||||
|
|
@ -784,8 +784,8 @@ radv_CreateDescriptorPool(VkDevice _device, const VkDescriptorPoolCreateInfo *pC
|
|||
uint64_t size = sizeof(struct radv_descriptor_pool);
|
||||
uint64_t bo_size = 0, bo_count = 0, range_count = 0;
|
||||
|
||||
const VkMutableDescriptorTypeCreateInfoVALVE *mutable_info =
|
||||
vk_find_struct_const(pCreateInfo->pNext, MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_VALVE);
|
||||
const VkMutableDescriptorTypeCreateInfoEXT *mutable_info =
|
||||
vk_find_struct_const(pCreateInfo->pNext, MUTABLE_DESCRIPTOR_TYPE_CREATE_INFO_EXT);
|
||||
|
||||
vk_foreach_struct_const(ext, pCreateInfo->pNext)
|
||||
{
|
||||
|
|
@ -827,7 +827,7 @@ radv_CreateDescriptorPool(VkDevice _device, const VkDescriptorPoolCreateInfo *pC
|
|||
case VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT:
|
||||
bo_size += 64 * pCreateInfo->pPoolSizes[i].descriptorCount;
|
||||
break;
|
||||
case VK_DESCRIPTOR_TYPE_MUTABLE_VALVE:
|
||||
case VK_DESCRIPTOR_TYPE_MUTABLE_EXT:
|
||||
/* Per spec, if a mutable descriptor type list is provided for the pool entry, we
|
||||
* allocate enough memory to hold any subset of that list.
|
||||
* If there is no mutable descriptor type list available,
|
||||
|
|
|
|||
|
|
@ -552,6 +552,7 @@ radv_physical_device_get_supported_extensions(const struct radv_physical_device
|
|||
.EXT_mesh_shader =
|
||||
radv_taskmesh_enabled(device) && device->instance->perftest_flags & RADV_PERFTEST_EXT_MS,
|
||||
.EXT_multi_draw = true,
|
||||
.EXT_mutable_descriptor_type = true, /* Trivial promotion from VALVE. */
|
||||
.EXT_non_seamless_cube_map = true,
|
||||
.EXT_pci_bus_info = true,
|
||||
#ifndef _WIN32
|
||||
|
|
@ -1584,9 +1585,9 @@ radv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
|
|||
features->sparseImageInt64Atomics = true;
|
||||
break;
|
||||
}
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_VALVE: {
|
||||
VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE *features =
|
||||
(VkPhysicalDeviceMutableDescriptorTypeFeaturesVALVE *)ext;
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MUTABLE_DESCRIPTOR_TYPE_FEATURES_EXT: {
|
||||
VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT *features =
|
||||
(VkPhysicalDeviceMutableDescriptorTypeFeaturesEXT *)ext;
|
||||
features->mutableDescriptorType = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue