1
1

mir.d 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. Boost Software License - Version 1.0 - August 17th, 2003
  3. Permission is hereby granted, free of charge, to any person or organization
  4. obtaining a copy of the software and accompanying documentation covered by
  5. this license (the "Software") to use, reproduce, display, distribute,
  6. execute, and transmit the Software, and to prepare derivative works of the
  7. Software, and to permit third-parties to whom the Software is furnished to
  8. do so, all subject to the following:
  9. The copyright notices in the Software and this entire statement, including
  10. the above license grant, this restriction and the following disclaimer,
  11. must be included in all copies of the Software, in whole or in part, and
  12. all derivative works of the Software, unless such copies or derivative
  13. works are solely in the form of machine-executable object code generated by
  14. a source language processor.
  15. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
  18. SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
  19. FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
  20. ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  21. DEALINGS IN THE SOFTWARE.
  22. */
  23. module derelict.vulkan.system.posix.mir;
  24. version (VK_USE_PLATFORM_MIR_KHR):
  25. extern(System):
  26. public {
  27. import derelict.vulkan.base;
  28. import derelict.vulkan.types;
  29. }
  30. mixin VK_DEFINE_NON_DISPATCHABLE_HANDLE!"MirConnectionHandle";
  31. mixin VK_DEFINE_NON_DISPATCHABLE_HANDLE!"MirSurfaceHandle";
  32. enum VK_KHR_mir_surface = 1;
  33. enum VK_KHR_MIR_SURFACE_SPEC_VERSION = 4;
  34. enum VK_KHR_MIR_SURFACE_EXTENSION_NAME = "VK_KHR_mir_surface";
  35. alias VkMirSurfaceCreateFlagsKHR = VkFlags;
  36. struct VkMirSurfaceCreateInfoKHR {
  37. VkStructureType sType ;
  38. const(void)* pNext ;
  39. VkMirSurfaceCreateFlagsKHR flags ;
  40. MirConnectionHandle connection;
  41. MirSurfaceHandle mirSurface;
  42. }
  43. alias PFN_vkCreateMirSurfaceKHR = nothrow
  44. VkResult function( VkInstance instance
  45. , const(VkMirSurfaceCreateInfoKHR)* pCreateInfo
  46. , const(VkAllocationCallbacks)* pAllocator
  47. , VkSurfaceKHR* pSurface );
  48. alias PFN_vkGetPhysicalDeviceMirPresentationSupportKHR = nothrow
  49. VkBool32 function( VkPhysicalDevice physicalDevice
  50. , uint queueFamilyIndex
  51. , MirConnectionHandle connection);
  52. mixin template MirFunctions() {
  53. PFN_vkCreateMirSurfaceKHR vkCreateMirSurfaceKHR;
  54. PFN_vkGetPhysicalDeviceMirPresentationSupportKHR vkGetPhysicalDeviceMirPresentationSupportKHR;
  55. pragma(inline, true)
  56. void bindFunctionsMir(alias bind)() {
  57. bind(cast(void**)&vkCreateMirSurfaceKHR, "vkCreateMirSurfaceKHR");
  58. bind( cast(void**)&vkGetPhysicalDeviceMirPresentationSupportKHR
  59. , "vkGetPhysicalDeviceMirPresentationSupportKHR");
  60. }
  61. }
  62. version (none) {
  63. VkResult vkCreateMirSurfaceKHR( VkInstance instance
  64. , const(VkMirSurfaceCreateInfoKHR)* pCreateInfo
  65. , const(VkAllocationCallbacks)* pAllocator
  66. , VkSurfaceKHR* pSurface );
  67. VkBool32 vkGetPhysicalDeviceMirPresentationSupportKHR( VkPhysicalDevice physicalDevice
  68. , uint queueFamilyIndex
  69. , MirConnectionHandle connection );
  70. }