mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 03:48:06 +02:00
anv: Conditionally expose VK_KHR_present_wait on ANV.
Gate it behind driconf query for now. Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19279>
This commit is contained in:
parent
f1f78fa297
commit
4889be3883
1 changed files with 26 additions and 0 deletions
|
|
@ -67,6 +67,7 @@ static const driOptionDescription anv_dri_options[] = {
|
|||
DRI_CONF_ADAPTIVE_SYNC(true)
|
||||
DRI_CONF_VK_X11_OVERRIDE_MIN_IMAGE_COUNT(0)
|
||||
DRI_CONF_VK_X11_STRICT_IMAGE_COUNT(false)
|
||||
DRI_CONF_VK_KHR_PRESENT_WAIT(false)
|
||||
DRI_CONF_VK_XWAYLAND_WAIT_READY(true)
|
||||
DRI_CONF_ANV_ASSUME_FULL_SUBGROUPS(false)
|
||||
DRI_CONF_ANV_SAMPLE_MASK_OUT_OPENGL_BEHAVIOUR(false)
|
||||
|
|
@ -231,6 +232,17 @@ get_device_extensions(const struct anv_physical_device *device,
|
|||
device->use_call_secondary,
|
||||
.KHR_pipeline_executable_properties = true,
|
||||
.KHR_pipeline_library = true,
|
||||
/* Hide these behind dri configs for now since we cannot implement it reliably on
|
||||
* all surfaces yet. There is no surface capability query for present wait/id,
|
||||
* but the feature is useful enough to hide behind an opt-in mechanism for now.
|
||||
* If the instance only enables surface extensions that unconditionally support present wait,
|
||||
* we can also expose the extension that way. */
|
||||
.KHR_present_id =
|
||||
driQueryOptionb(&device->instance->dri_options, "vk_khr_present_wait") ||
|
||||
wsi_common_vk_instance_supports_present_wait(&device->instance->vk),
|
||||
.KHR_present_wait =
|
||||
driQueryOptionb(&device->instance->dri_options, "vk_khr_present_wait") ||
|
||||
wsi_common_vk_instance_supports_present_wait(&device->instance->vk),
|
||||
.KHR_push_descriptor = true,
|
||||
.KHR_ray_query =
|
||||
ANV_SUPPORT_RT && device->info.has_ray_tracing,
|
||||
|
|
@ -1789,6 +1801,20 @@ void anv_GetPhysicalDeviceFeatures2(
|
|||
break;
|
||||
}
|
||||
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_ID_FEATURES_KHR: {
|
||||
VkPhysicalDevicePresentIdFeaturesKHR *features =
|
||||
(VkPhysicalDevicePresentIdFeaturesKHR *) ext;
|
||||
features->presentId = pdevice->vk.supported_extensions.KHR_present_id;
|
||||
break;
|
||||
}
|
||||
|
||||
case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PRESENT_WAIT_FEATURES_KHR: {
|
||||
VkPhysicalDevicePresentWaitFeaturesKHR *features =
|
||||
(VkPhysicalDevicePresentWaitFeaturesKHR *) ext;
|
||||
features->presentWait = pdevice->vk.supported_extensions.KHR_present_wait;
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
anv_debug_ignored_stype(ext->sType);
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue