Safe Haskell | None |
---|---|
Language | Haskell2010 |
Name
VK_KHR_android_surface - instance extension
VK_KHR_android_surface
- Name String
VK_KHR_android_surface
- Extension Type
- Instance extension
- Registered Extension Number
- 9
- Revision
- 6
- Extension and Version Dependencies
- Requires Vulkan 1.0
- Requires
VK_KHR_surface
- Contact
Other Extension Metadata
- Last Modified Date
- 2016-01-14
- IP Status
- No known IP claims.
- Contributors
- Patrick Doane, Blizzard
- Jason Ekstrand, Intel
- Ian Elliott, LunarG
- Courtney Goeltzenleuchter, LunarG
- Jesse Hall, Google
- James Jones, NVIDIA
- Antoine Labour, Google
- Jon Leech, Khronos
- David Mao, AMD
- Norbert Nopper, Freescale
- Alon Or-bach, Samsung
- Daniel Rakos, AMD
- Graham Sellers, AMD
- Ray Smith, ARM
- Jeff Vigil, Qualcomm
- Chia-I Wu, LunarG
Description
The VK_KHR_android_surface
extension is an instance extension. It
provides a mechanism to create a SurfaceKHR
object (defined by the VK_KHR_surface
extension) that refers to an
ANativeWindow
, Android’s native surface type. The ANativeWindow
represents the producer endpoint of any buffer queue, regardless of
consumer endpoint. Common consumer endpoints for ANativeWindows
are
the system window compositor, video encoders, and application-specific
compositors importing the images through a SurfaceTexture
.
New Base Types
New Commands
New Structures
New Bitmasks
New Enum Constants
Issues
1) Does Android need a way to query for compatibility between a particular physical device (and queue family?) and a specific Android display?
RESOLVED: No. Currently on Android, any physical device is expected to be able to present to the system compositor, and all queue families must support the necessary image layout transitions and synchronization operations.
Version History
Revision 1, 2015-09-23 (Jesse Hall)
- Initial draft.
Revision 2, 2015-10-26 (Ian Elliott)
- Renamed from VK_EXT_KHR_android_surface to VK_KHR_android_surface.
Revision 3, 2015-11-03 (Daniel Rakos)
- Added allocation callbacks to surface creation function.
Revision 4, 2015-11-10 (Jesse Hall)
- Removed VK_ERROR_INVALID_ANDROID_WINDOW_KHR.
Revision 5, 2015-11-28 (Daniel Rakos)
- Updated the surface create function to take a pCreateInfo structure.
Revision 6, 2016-01-14 (James Jones)
- Moved VK_ERROR_NATIVE_WINDOW_IN_USE_KHR from the VK_KHR_android_surface to the VK_KHR_surface extension.
See Also
ANativeWindow
, AndroidSurfaceCreateFlagsKHR
,
AndroidSurfaceCreateInfoKHR
, createAndroidSurfaceKHR
Document Notes
For more information, see the Vulkan Specification
This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.
Synopsis
- createAndroidSurfaceKHR :: forall io. MonadIO io => Instance -> AndroidSurfaceCreateInfoKHR -> ("allocator" ::: Maybe AllocationCallbacks) -> io SurfaceKHR
- data AndroidSurfaceCreateInfoKHR = AndroidSurfaceCreateInfoKHR {}
- newtype AndroidSurfaceCreateFlagsKHR = AndroidSurfaceCreateFlagsKHR Flags
- type KHR_ANDROID_SURFACE_SPEC_VERSION = 6
- pattern KHR_ANDROID_SURFACE_SPEC_VERSION :: forall a. Integral a => a
- type KHR_ANDROID_SURFACE_EXTENSION_NAME = "VK_KHR_android_surface"
- pattern KHR_ANDROID_SURFACE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- data ANativeWindow
- newtype SurfaceKHR = SurfaceKHR Word64
Documentation
createAndroidSurfaceKHR Source #
:: forall io. MonadIO io | |
=> Instance |
|
-> AndroidSurfaceCreateInfoKHR |
|
-> ("allocator" ::: Maybe AllocationCallbacks) |
|
-> io SurfaceKHR |
vkCreateAndroidSurfaceKHR - Create a
SurfaceKHR
object for an Android native
window
Description
During the lifetime of a surface created using a particular
ANativeWindow
handle any attempts to create another surface for the
same ANativeWindow
and any attempts to connect to the same
ANativeWindow
through other platform mechanisms will fail.
Note
In particular, only one SurfaceKHR
can
exist at a time for a given window. Similarly, a native window cannot
be used by both a SurfaceKHR
and
EGLSurface
simultaneously.
If successful, createAndroidSurfaceKHR
increments the
ANativeWindow
’s reference count, and
destroySurfaceKHR
will decrement it.
On Android, when a swapchain’s imageExtent
does not match the
surface’s currentExtent
, the presentable images will be scaled to the
surface’s dimensions during presentation. minImageExtent
is (1,1), and
maxImageExtent
is the maximum image size supported by the consumer.
For the system compositor, currentExtent
is the window size (i.e. the
consumer’s preferred size).
Valid Usage (Implicit)
-
instance
must be a validInstance
handle
-
pCreateInfo
must be a valid pointer to a validAndroidSurfaceCreateInfoKHR
structure - If
pAllocator
is notNULL
,pAllocator
must be a valid pointer to a validAllocationCallbacks
structure -
pSurface
must be a valid pointer to aSurfaceKHR
handle
Return Codes
See Also
AllocationCallbacks
,
AndroidSurfaceCreateInfoKHR
, Instance
,
SurfaceKHR
data AndroidSurfaceCreateInfoKHR Source #
VkAndroidSurfaceCreateInfoKHR - Structure specifying parameters of a newly created Android surface object
Valid Usage (Implicit)
See Also
AndroidSurfaceCreateFlagsKHR
,
StructureType
,
createAndroidSurfaceKHR
AndroidSurfaceCreateInfoKHR | |
|
Instances
newtype AndroidSurfaceCreateFlagsKHR Source #
VkAndroidSurfaceCreateFlagsKHR - Reserved for future use
Description
AndroidSurfaceCreateFlagsKHR
is a bitmask type for setting a mask, but
is currently reserved for future use.
See Also
Instances
type KHR_ANDROID_SURFACE_SPEC_VERSION = 6 Source #
pattern KHR_ANDROID_SURFACE_SPEC_VERSION :: forall a. Integral a => a Source #
type KHR_ANDROID_SURFACE_EXTENSION_NAME = "VK_KHR_android_surface" Source #
pattern KHR_ANDROID_SURFACE_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #
data ANativeWindow Source #
newtype SurfaceKHR Source #
VkSurfaceKHR - Opaque handle to a surface object
Description
The VK_KHR_surface
extension declares the SurfaceKHR
object, and
provides a function for destroying SurfaceKHR
objects. Separate
platform-specific extensions each provide a function for creating a
SurfaceKHR
object for the respective platform. From the application’s
perspective this is an opaque handle, just like the handles of other
Vulkan objects.
See Also
PhysicalDeviceSurfaceInfo2KHR
,
SwapchainCreateInfoKHR
,
createAndroidSurfaceKHR
,
createDirectFBSurfaceEXT
,
createDisplayPlaneSurfaceKHR
,
createHeadlessSurfaceEXT
,
createIOSSurfaceMVK
,
createImagePipeSurfaceFUCHSIA
,
createMacOSSurfaceMVK
,
createMetalSurfaceEXT
,
createStreamDescriptorSurfaceGGP
,
createViSurfaceNN
,
createWaylandSurfaceKHR
,
createWin32SurfaceKHR
,
createXcbSurfaceKHR
,
createXlibSurfaceKHR
,
destroySurfaceKHR
,
getDeviceGroupSurfacePresentModesKHR
,
getPhysicalDevicePresentRectanglesKHR
,
getPhysicalDeviceSurfaceCapabilities2EXT
,
getPhysicalDeviceSurfaceCapabilitiesKHR
,
getPhysicalDeviceSurfaceFormatsKHR
,
getPhysicalDeviceSurfacePresentModesKHR
,
getPhysicalDeviceSurfaceSupportKHR