summaryrefslogtreecommitdiffstats
path: root/src/vulkan
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2017-11-16 08:46:41 +1000
committerJason Ekstrand <[email protected]>2017-12-04 10:04:19 -0800
commit2cbeb32555421ae302222e6e730b412c82742d74 (patch)
treefa571f717974501b6188f88191572c612410d2d2 /src/vulkan
parent55a97db52347f62111a24715078c6035380d3e19 (diff)
vulkan/wsi: use function ptr definitions from the spec.
This just seems cleaner, and we may expand this in future. Signed-off-by: Dave Airlie <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/vulkan')
-rw-r--r--src/vulkan/wsi/wsi_common.h6
-rw-r--r--src/vulkan/wsi/wsi_common_wayland.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/vulkan/wsi/wsi_common.h b/src/vulkan/wsi/wsi_common.h
index 8166b7dd344..7be0182adfa 100644
--- a/src/vulkan/wsi/wsi_common.h
+++ b/src/vulkan/wsi/wsi_common.h
@@ -118,11 +118,11 @@ struct wsi_device {
struct wsi_interface * wsi[VK_ICD_WSI_PLATFORM_MAX];
};
+#define WSI_CB(cb) PFN_vk##cb cb
struct wsi_callbacks {
- void (*get_phys_device_format_properties)(VkPhysicalDevice physicalDevice,
- VkFormat format,
- VkFormatProperties *pFormatProperties);
+ WSI_CB(GetPhysicalDeviceFormatProperties);
};
+#undef WSI_CB
#define WSI_DEFINE_NONDISP_HANDLE_CASTS(__wsi_type, __VkType) \
\
diff --git a/src/vulkan/wsi/wsi_common_wayland.c b/src/vulkan/wsi/wsi_common_wayland.c
index 4c94cd60a54..b93c3d7e0d7 100644
--- a/src/vulkan/wsi/wsi_common_wayland.c
+++ b/src/vulkan/wsi/wsi_common_wayland.c
@@ -84,7 +84,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->get_phys_device_format_properties(display->wsi_wl->physical_device,
+ display->wsi_wl->cbs->GetPhysicalDeviceFormatProperties(display->wsi_wl->physical_device,
format, &props);
if (!(props.optimalTilingFeatures & VK_FORMAT_FEATURE_COLOR_ATTACHMENT_BIT))
return;