mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
pvr: Clean up extension tables
Switches PVR_USE_WSI_PLATFORM to be an always defined boolean to allow for cleaner use in the extension tables (borrowed from tu) and extends the pattern to create PVR_USE_WSI_PLATFORM_* equivalents for each supported platform. Also fixes the ordering to match the struct definitions. Signed-off-by: Matt Coster <matt.coster@imgtec.com> Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24489>
This commit is contained in:
parent
efb3c93d5f
commit
afe9b73cd5
1 changed files with 12 additions and 10 deletions
|
|
@ -87,7 +87,15 @@
|
||||||
#define PVR_GLOBAL_FREE_LIST_GROW_THRESHOLD 13U
|
#define PVR_GLOBAL_FREE_LIST_GROW_THRESHOLD 13U
|
||||||
|
|
||||||
#if defined(VK_USE_PLATFORM_DISPLAY_KHR)
|
#if defined(VK_USE_PLATFORM_DISPLAY_KHR)
|
||||||
# define PVR_USE_WSI_PLATFORM
|
# define PVR_USE_WSI_PLATFORM_DISPLAY true
|
||||||
|
#else
|
||||||
|
# define PVR_USE_WSI_PLATFORM_DISPLAY false
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if PVR_USE_WSI_PLATFORM_DISPLAY
|
||||||
|
# define PVR_USE_WSI_PLATFORM true
|
||||||
|
#else
|
||||||
|
# define PVR_USE_WSI_PLATFORM false
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define PVR_API_VERSION VK_MAKE_VERSION(1, 0, VK_HEADER_VERSION)
|
#define PVR_API_VERSION VK_MAKE_VERSION(1, 0, VK_HEADER_VERSION)
|
||||||
|
|
@ -131,14 +139,10 @@ static const struct pvr_drm_device_config pvr_drm_configs[] = {
|
||||||
#undef DEF_CONFIG
|
#undef DEF_CONFIG
|
||||||
|
|
||||||
static const struct vk_instance_extension_table pvr_instance_extensions = {
|
static const struct vk_instance_extension_table pvr_instance_extensions = {
|
||||||
#if defined(VK_USE_PLATFORM_DISPLAY_KHR)
|
.KHR_display = PVR_USE_WSI_PLATFORM_DISPLAY,
|
||||||
.KHR_display = true,
|
|
||||||
#endif
|
|
||||||
.KHR_external_memory_capabilities = true,
|
.KHR_external_memory_capabilities = true,
|
||||||
.KHR_get_physical_device_properties2 = true,
|
.KHR_get_physical_device_properties2 = true,
|
||||||
#if defined(PVR_USE_WSI_PLATFORM)
|
.KHR_surface = PVR_USE_WSI_PLATFORM,
|
||||||
.KHR_surface = true,
|
|
||||||
#endif
|
|
||||||
.EXT_debug_report = true,
|
.EXT_debug_report = true,
|
||||||
.EXT_debug_utils = true,
|
.EXT_debug_utils = true,
|
||||||
};
|
};
|
||||||
|
|
@ -150,10 +154,8 @@ static void pvr_physical_device_get_supported_extensions(
|
||||||
*extensions = (struct vk_device_extension_table){
|
*extensions = (struct vk_device_extension_table){
|
||||||
.KHR_external_memory = true,
|
.KHR_external_memory = true,
|
||||||
.KHR_external_memory_fd = true,
|
.KHR_external_memory_fd = true,
|
||||||
|
.KHR_swapchain = PVR_USE_WSI_PLATFORM,
|
||||||
.KHR_timeline_semaphore = true,
|
.KHR_timeline_semaphore = true,
|
||||||
#if defined(PVR_USE_WSI_PLATFORM)
|
|
||||||
.KHR_swapchain = true,
|
|
||||||
#endif
|
|
||||||
.EXT_external_memory_dma_buf = true,
|
.EXT_external_memory_dma_buf = true,
|
||||||
.EXT_private_data = true,
|
.EXT_private_data = true,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue