summaryrefslogtreecommitdiffstats
path: root/src/vulkan/anv_wsi.h
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2015-09-04 10:28:26 -0700
committerJason Ekstrand <[email protected]>2015-09-04 17:55:42 -0700
commitc0b97577e8900b46349c2b831784bf63b94eeee1 (patch)
treed661c5e7b5557dbb191d0d866c4d660f304afd67 /src/vulkan/anv_wsi.h
parentca3cfbf6f1e009c0208ffaa483c8a7e80394639d (diff)
vk/WSI: Use a callback mechanism instead of explicit switching
Diffstat (limited to 'src/vulkan/anv_wsi.h')
-rw-r--r--src/vulkan/anv_wsi.h32
1 files changed, 12 insertions, 20 deletions
diff --git a/src/vulkan/anv_wsi.h b/src/vulkan/anv_wsi.h
index 1c1870f5453..3a5fba13a56 100644
--- a/src/vulkan/anv_wsi.h
+++ b/src/vulkan/anv_wsi.h
@@ -25,17 +25,20 @@
#include "anv_private.h"
-enum anv_swap_chain_type {
- ANV_SWAP_CHAIN_TYPE_X11 = 11,
-};
-
struct anv_swap_chain {
- enum anv_swap_chain_type type;
-
struct anv_device * device;
-};
-struct anv_x11_swap_chain;
+ VkResult (*destroy)(struct anv_swap_chain *swap_chain);
+ VkResult (*get_swap_chain_info)(struct anv_swap_chain *swap_chain,
+ VkSwapChainInfoTypeWSI infoType,
+ size_t *pDataSize, void *pData);
+ VkResult (*acquire_next_image)(struct anv_swap_chain *swap_chain,
+ uint64_t timeout, VkSemaphore semaphore,
+ uint32_t *image_index);
+ VkResult (*queue_present)(struct anv_swap_chain *swap_chain,
+ struct anv_queue *queue,
+ uint32_t image_index);
+};
ANV_DEFINE_NONDISP_HANDLE_CASTS(anv_swap_chain, VkSwapChainWSI)
@@ -45,15 +48,4 @@ VkResult anv_x11_get_surface_info(struct anv_device *device,
size_t* pDataSize, void* pData);
VkResult anv_x11_create_swap_chain(struct anv_device *device,
const VkSwapChainCreateInfoWSI *pCreateInfo,
- struct anv_x11_swap_chain **swap_chain);
-VkResult anv_x11_destroy_swap_chain(struct anv_x11_swap_chain *swap_chain);
-VkResult anv_x11_get_swap_chain_info(struct anv_x11_swap_chain *swap_chain,
- VkSwapChainInfoTypeWSI infoType,
- size_t* pDataSize, void* pData);
-VkResult anv_x11_acquire_next_image(struct anv_x11_swap_chain *swap_chain,
- uint64_t timeout,
- VkSemaphore semaphore,
- uint32_t *image_index);
-VkResult anv_x11_queue_present(struct anv_queue *queue,
- struct anv_x11_swap_chain *swap_chain,
- uint32_t image_index);
+ struct anv_swap_chain **swap_chain);