// Copyright 2014-2021 The Khronos Group, Inc.
//
// SPDX-License-Identifier: CC-BY-4.0

[[platformCreateSurface_streamdescriptor,platformCreateSurface_streamdescriptor]]
=== Google Games Platform

[open,refpage='vkCreateStreamDescriptorSurfaceGGP',desc='Create a slink:VkSurfaceKHR object for a Google Games Platform stream',type='protos']
--
To create a sname:VkSurfaceKHR object for a Google Games Platform stream
descriptor, call:

include::{generated}/api/protos/vkCreateStreamDescriptorSurfaceGGP.txt[]

  * pname:instance is the instance to associate with the surface.
  * pname:pCreateInfo is a pointer to a
    sname:VkStreamDescriptorSurfaceCreateInfoGGP structure containing
    parameters that affect 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
    <<memory-allocation,Memory Allocation>>).
  * pname:pSurface is a pointer to a slink:VkSurfaceKHR handle in which the
    created surface object is returned.

include::{generated}/validity/protos/vkCreateStreamDescriptorSurfaceGGP.txt[]
--

[open,refpage='VkStreamDescriptorSurfaceCreateInfoGGP',desc='Structure specifying parameters of a newly created Google Games Platform stream surface object',type='structs']
--
The sname:VkStreamDescriptorSurfaceCreateInfoGGP structure is defined as:

include::{generated}/api/structs/VkStreamDescriptorSurfaceCreateInfoGGP.txt[]

  * pname:sType is the type of this structure.
  * pname:pNext is `NULL` or a pointer to a structure extending this
    structure.
  * pname:flags is reserved for future use.
  * pname:streamDescriptor is a code:GgpStreamDescriptor referring to the
    GGP stream descriptor to associate with the surface.

.Valid Usage
****
  * [[VUID-VkStreamDescriptorSurfaceCreateInfoGGP-streamDescriptor-02681]]
    pname:streamDescriptor must: be a valid code:GgpStreamDescriptor
****

include::{generated}/validity/structs/VkStreamDescriptorSurfaceCreateInfoGGP.txt[]
--

On Google Games Platform, the surface extents are dynamic.
The pname:minImageExtent will never be greater than 1080p and the
pname:maxImageExtent will never be less than 1080p.
The pname:currentExtent will reflect the current optimal resolution.

ifdef::VK_KHR_swapchain[]
Applications are expected to choose an appropriate size for the swapchain’s
pname:imageExtent, within the bounds of the surface.
Using the surface's pname:currentExtent will offer the best performance and
quality.
When a swapchain's pname:imageExtent does not match the surface's
pname:currentExtent, the presentable images are scaled to the surface's
dimensions during presentation if possible and ename:VK_SUBOPTIMAL_KHR is
returned, otherwise presentation fails with ename:VK_ERROR_OUT_OF_DATE_KHR.
endif::VK_KHR_swapchain[]

[open,refpage='VkStreamDescriptorSurfaceCreateFlagsGGP',desc='Reserved for future use',type='flags']
--
include::{generated}/api/flags/VkStreamDescriptorSurfaceCreateFlagsGGP.txt[]

tname:VkStreamDescriptorSurfaceCreateFlagsGGP is a bitmask type for setting
a mask, but is currently reserved for future use.
--
