diff options
author | Jason Ekstrand <[email protected]> | 2017-11-16 12:38:26 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-12-04 10:04:19 -0800 |
commit | 2e3e55110b0b528f23339453e9acf73513dfd6bb (patch) | |
tree | 0ce47301841b33cda3f4a8e4902aaf2cb8eff28b /src/vulkan | |
parent | c1b1be5196f38776405b58c01a6f138a0f031edb (diff) |
vulkan/wsi: Drop some unneeded cruft from the API
This drops the unneeded callbacks struct as well as the queue_get_family
callback we were using before we'd pulled QueuePresent inside.
Reviewed-by: Dave Airlie <[email protected]>
Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/vulkan')
-rw-r--r-- | src/vulkan/wsi/wsi_common.c | 1 | ||||
-rw-r--r-- | src/vulkan/wsi/wsi_common.h | 17 | ||||
-rw-r--r-- | src/vulkan/wsi/wsi_common_wayland.c | 11 |
3 files changed, 8 insertions, 21 deletions
diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c index a303aabf2c4..9a5c78381ce 100644 --- a/src/vulkan/wsi/wsi_common.c +++ b/src/vulkan/wsi/wsi_common.c @@ -64,6 +64,7 @@ wsi_device_init(struct wsi_device *wsi, WSI_GET_CB(GetImageMemoryRequirements); WSI_GET_CB(GetImageSubresourceLayout); WSI_GET_CB(GetMemoryFdKHR); + WSI_GET_CB(GetPhysicalDeviceFormatProperties); WSI_GET_CB(ResetFences); WSI_GET_CB(QueueSubmit); WSI_GET_CB(WaitForFences); diff --git a/src/vulkan/wsi/wsi_common.h b/src/vulkan/wsi/wsi_common.h index 5e705755019..65814435ce4 100644 --- a/src/vulkan/wsi/wsi_common.h +++ b/src/vulkan/wsi/wsi_common.h @@ -56,8 +56,6 @@ struct wsi_device { VkPhysicalDeviceMemoryProperties memory_props; uint32_t queue_family_count; - uint32_t (*queue_get_family_index)(VkQueue queue); - #define WSI_CB(cb) PFN_vk##cb cb WSI_CB(AllocateMemory); WSI_CB(AllocateCommandBuffers); @@ -80,6 +78,7 @@ struct wsi_device { WSI_CB(GetImageMemoryRequirements); WSI_CB(GetImageSubresourceLayout); WSI_CB(GetMemoryFdKHR); + WSI_CB(GetPhysicalDeviceFormatProperties); WSI_CB(ResetFences); WSI_CB(QueueSubmit); WSI_CB(WaitForFences); @@ -95,17 +94,6 @@ wsi_device_init(struct wsi_device *wsi, VkPhysicalDevice pdevice, WSI_FN_GetPhysicalDeviceProcAddr proc_addr); -#define WSI_CB(cb) PFN_vk##cb cb -struct wsi_callbacks { - VkPhysicalDevice (*device_get_physical)(VkDevice); - - WSI_CB(GetDeviceProcAddr); - WSI_CB(GetPhysicalDeviceFormatProperties); - WSI_CB(GetPhysicalDeviceMemoryProperties); - WSI_CB(GetPhysicalDeviceQueueFamilyProperties); -}; -#undef WSI_CB - #define ICD_DEFINE_NONDISP_HANDLE_CASTS(__VkIcdType, __VkType) \ \ static inline __VkIcdType * \ @@ -131,8 +119,7 @@ void wsi_x11_finish_wsi(struct wsi_device *wsi_device, const VkAllocationCallbacks *alloc); VkResult wsi_wl_init_wsi(struct wsi_device *wsi_device, const VkAllocationCallbacks *alloc, - VkPhysicalDevice physical_device, - const struct wsi_callbacks *cbs); + VkPhysicalDevice physical_device); void wsi_wl_finish_wsi(struct wsi_device *wsi_device, const VkAllocationCallbacks *alloc); diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c index 3e2ff49dc17..be7635bbf84 100644 --- a/src/vulkan/wsi/wsi_common_wayland.c +++ b/src/vulkan/wsi/wsi_common_wayland.c @@ -67,10 +67,10 @@ struct wsi_wl_display { struct wsi_wayland { struct wsi_interface base; + struct wsi_device *wsi; + const VkAllocationCallbacks *alloc; VkPhysicalDevice physical_device; - - const struct wsi_callbacks *cbs; }; static void @@ -85,7 +85,7 @@ wsi_wl_display_add_vk_format(struct wsi_wl_display *display, VkFormat format) /* Don't add formats that aren't renderable. */ VkFormatProperties props; - display->wsi_wl->cbs->GetPhysicalDeviceFormatProperties(display->wsi_wl->physical_device, + display->wsi_wl->wsi->GetPhysicalDeviceFormatProperties(display->wsi_wl->physical_device, format, &props); if (!(props.optimalTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT)) return; @@ -872,8 +872,7 @@ fail: VkResult wsi_wl_init_wsi(struct wsi_device *wsi_device, const VkAllocationCallbacks *alloc, - VkPhysicalDevice physical_device, - const struct wsi_callbacks *cbs) + VkPhysicalDevice physical_device) { struct wsi_wayland *wsi; VkResult result; @@ -887,7 +886,7 @@ wsi_wl_init_wsi(struct wsi_device *wsi_device, wsi->physical_device = physical_device; wsi->alloc = alloc; - wsi->cbs = cbs; + wsi->wsi = wsi_device; wsi->base.get_support = wsi_wl_surface_get_support; wsi->base.get_capabilities = wsi_wl_surface_get_capabilities; |