vulkan-3.17: Bindings to the Vulkan graphics API.
Safe HaskellNone
LanguageHaskell2010

Vulkan.Extensions.VK_KHR_android_surface

Description

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

Documentation

createAndroidSurfaceKHR Source #

Arguments

:: forall io. MonadIO io 
=> Instance

instance is the instance to associate the surface with.

-> AndroidSurfaceCreateInfoKHR

pCreateInfo is a pointer to a AndroidSurfaceCreateInfoKHR structure containing parameters affecting the creation of the surface object.

-> ("allocator" ::: Maybe AllocationCallbacks)

pAllocator is the allocator used for host memory allocated for the surface object when there is no more specific allocator available (see Memory Allocation).

-> 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 valid Instance handle

Return Codes

Success
Failure

See Also

VK_KHR_android_surface, AllocationCallbacks, AndroidSurfaceCreateInfoKHR, Instance, SurfaceKHR

data AndroidSurfaceCreateInfoKHR Source #

VkAndroidSurfaceCreateInfoKHR - Structure specifying parameters of a newly created Android surface object

Valid Usage (Implicit)

See Also

VK_KHR_android_surface, AndroidSurfaceCreateFlagsKHR, StructureType, createAndroidSurfaceKHR

Constructors

AndroidSurfaceCreateInfoKHR 

Fields

Instances

Instances details
Eq AndroidSurfaceCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_android_surface

Show AndroidSurfaceCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_android_surface

Storable AndroidSurfaceCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_android_surface

FromCStruct AndroidSurfaceCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_android_surface

ToCStruct AndroidSurfaceCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_android_surface

Zero AndroidSurfaceCreateInfoKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_android_surface

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

VK_KHR_android_surface, AndroidSurfaceCreateInfoKHR

Instances

Instances details
Eq AndroidSurfaceCreateFlagsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_android_surface

Ord AndroidSurfaceCreateFlagsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_android_surface

Read AndroidSurfaceCreateFlagsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_android_surface

Show AndroidSurfaceCreateFlagsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_android_surface

Storable AndroidSurfaceCreateFlagsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_android_surface

Bits AndroidSurfaceCreateFlagsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_android_surface

Methods

(.&.) :: AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR #

(.|.) :: AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR #

xor :: AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR #

complement :: AndroidSurfaceCreateFlagsKHR -> AndroidSurfaceCreateFlagsKHR #

shift :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR #

rotate :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR #

zeroBits :: AndroidSurfaceCreateFlagsKHR #

bit :: Int -> AndroidSurfaceCreateFlagsKHR #

setBit :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR #

clearBit :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR #

complementBit :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR #

testBit :: AndroidSurfaceCreateFlagsKHR -> Int -> Bool #

bitSizeMaybe :: AndroidSurfaceCreateFlagsKHR -> Maybe Int #

bitSize :: AndroidSurfaceCreateFlagsKHR -> Int #

isSigned :: AndroidSurfaceCreateFlagsKHR -> Bool #

shiftL :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR #

unsafeShiftL :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR #

shiftR :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR #

unsafeShiftR :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR #

rotateL :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR #

rotateR :: AndroidSurfaceCreateFlagsKHR -> Int -> AndroidSurfaceCreateFlagsKHR #

popCount :: AndroidSurfaceCreateFlagsKHR -> Int #

FiniteBits AndroidSurfaceCreateFlagsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_android_surface

Zero AndroidSurfaceCreateFlagsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_android_surface

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 #

newtype SurfaceKHR Source #

Constructors

SurfaceKHR Word64 

Instances

Instances details
Eq SurfaceKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Ord SurfaceKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Show SurfaceKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Storable SurfaceKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Zero SurfaceKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

HasObjectType SurfaceKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles

IsHandle SurfaceKHR Source # 
Instance details

Defined in Vulkan.Extensions.Handles