Commit d84cd611 authored by Iago Toral's avatar Iago Toral Committed by Marge Bot
Browse files

v3dv: expose KHR_variable_pointers



We only support the VariablePointersStorageBuffer feature for now,
which is the only one that is mandatory, and for which we seem to
be passing all the relevant tests already.

Exposing the optional VariablePointers feature would require that
we support non-constant indexing on UBO/SSBO first.

Relevant CTS tests:
dEQP-VK.*pointer*
Reviewed-by: Alejandro Piñeiro's avatarAlejandro Piñeiro <apinheiro@igalia.com>
Part-of: <!11257>
parent f05dfdde
......@@ -443,7 +443,7 @@ Vulkan 1.1 -- all DONE: anv, lvp, radv, tu, vn
VK_KHR_sampler_ycbcr_conversion DONE (anv, radv, tu, vn)
VK_KHR_shader_draw_parameters DONE (anv, lvp, radv, tu, vn)
VK_KHR_storage_buffer_storage_class DONE (anv, lvp, radv, tu, v3dv, vn)
VK_KHR_variable_pointers DONE (anv, lvp, radv, tu, vn)
VK_KHR_variable_pointers DONE (anv, lvp, radv, tu, v3dv, vn)
Vulkan 1.2 -- all DONE: anv, vn
......
......@@ -125,6 +125,7 @@ get_device_extensions(const struct v3dv_physical_device *device,
#ifdef V3DV_HAS_SURFACE
.KHR_swapchain = true,
#endif
.KHR_variable_pointers = true,
.EXT_external_memory_dma_buf = true,
.EXT_private_data = true,
};
......@@ -1012,7 +1013,15 @@ v3dv_GetPhysicalDeviceFeatures2(VkPhysicalDevice physicalDevice,
features->privateData = true;
break;
}
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VARIABLE_POINTERS_FEATURES: {
VkPhysicalDeviceVariablePointersFeatures *features = (void *) ext;
features->variablePointersStorageBuffer = true;
/* FIXME: for this we need to support non-constant indexing on
* UBO/SSBO.
*/
features->variablePointers = false;
break;
}
default:
v3dv_debug_ignored_stype(ext->sType);
break;
......
......@@ -174,6 +174,7 @@ v3dv_DestroyPipeline(VkDevice _device,
static const struct spirv_to_nir_options default_spirv_options = {
.caps = {
.device_group = true,
.variable_pointers = true,
},
.ubo_addr_format = nir_address_format_32bit_index_offset,
.ssbo_addr_format = nir_address_format_32bit_index_offset,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment