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 <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11257>
This commit is contained in:
committed by
Marge Bot
parent
f05dfddeb1
commit
d84cd611eb
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user