// Copyright (c) 2014-2018 Khronos Group. This work is licensed under a // Creative Commons Attribution 4.0 International License; see // http://creativecommons.org/licenses/by/4.0/ [[platformCreateSurface_mir,platformCreateSurface_mir]] === Mir Platform [open,refpage='vkCreateMirSurfaceKHR',desc='Create a slink:VkSurfaceKHR object for a Mir window',type='protos'] -- To create a sname:VkSurfaceKHR object for a Mir window, call: include::../../api/protos/vkCreateMirSurfaceKHR.txt[] * pname:instance is the instance to associate the surface with. * pname:pCreateInfo is a pointer to an instance of the slink:VkMirSurfaceCreateInfoKHR structure containing parameters affecting the creation of the surface object. * pname:pAllocator is the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see <>). * pname:pSurface points to a slink:VkSurfaceKHR handle in which the created surface object is returned. include::../../validity/protos/vkCreateMirSurfaceKHR.txt[] -- [open,refpage='VkMirSurfaceCreateInfoKHR',desc='Structure specifying parameters of a newly created Mir surface object',type='structs'] -- The sname:VkMirSurfaceCreateInfoKHR structure is defined as: include::../../api/structs/VkMirSurfaceCreateInfoKHR.txt[] * pname:sType is the type of this structure. * pname:pNext is `NULL` or a pointer to an extension-specific structure. * pname:flags is reserved for future use. * pname:connection and pname:surface are pointers to the code:MirConnection and code:MirSurface for the window to associate the surface with. .Valid Usage **** * [[VUID-VkMirSurfaceCreateInfoKHR-connection-01263]] pname:connection must: point to a valid code:MirConnection. * [[VUID-VkMirSurfaceCreateInfoKHR-surface-01264]] pname:surface must: point to a valid code:MirSurface. **** include::../../validity/structs/VkMirSurfaceCreateInfoKHR.txt[] -- On Mir, when a swapchain's pname:imageExtent does not match the surface's pname:currentExtent, the presentable images will be scaled to the surface's dimensions during presentation. pname:minImageExtent is [eq]#(1,1)#, and pname:maxImageExtent is the maximum supported surface size.