1// Copyright 2014-2021 The Khronos Group, Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5[[platformCreateSurface_streamdescriptor,platformCreateSurface_streamdescriptor]] 6=== Google Games Platform 7 8[open,refpage='vkCreateStreamDescriptorSurfaceGGP',desc='Create a slink:VkSurfaceKHR object for a Google Games Platform stream',type='protos'] 9-- 10To create a sname:VkSurfaceKHR object for a Google Games Platform stream 11descriptor, call: 12 13include::{generated}/api/protos/vkCreateStreamDescriptorSurfaceGGP.txt[] 14 15 * pname:instance is the instance to associate with the surface. 16 * pname:pCreateInfo is a pointer to a 17 sname:VkStreamDescriptorSurfaceCreateInfoGGP structure containing 18 parameters that affect the creation of the surface object. 19 * pname:pAllocator is the allocator used for host memory allocated for the 20 surface object when there is no more specific allocator available (see 21 <<memory-allocation,Memory Allocation>>). 22 * pname:pSurface is a pointer to a slink:VkSurfaceKHR handle in which the 23 created surface object is returned. 24 25include::{generated}/validity/protos/vkCreateStreamDescriptorSurfaceGGP.txt[] 26-- 27 28[open,refpage='VkStreamDescriptorSurfaceCreateInfoGGP',desc='Structure specifying parameters of a newly created Google Games Platform stream surface object',type='structs'] 29-- 30The sname:VkStreamDescriptorSurfaceCreateInfoGGP structure is defined as: 31 32include::{generated}/api/structs/VkStreamDescriptorSurfaceCreateInfoGGP.txt[] 33 34 * pname:sType is the type of this structure. 35 * pname:pNext is `NULL` or a pointer to a structure extending this 36 structure. 37 * pname:flags is reserved for future use. 38 * pname:streamDescriptor is a code:GgpStreamDescriptor referring to the 39 GGP stream descriptor to associate with the surface. 40 41.Valid Usage 42**** 43 * [[VUID-VkStreamDescriptorSurfaceCreateInfoGGP-streamDescriptor-02681]] 44 pname:streamDescriptor must: be a valid code:GgpStreamDescriptor 45**** 46 47include::{generated}/validity/structs/VkStreamDescriptorSurfaceCreateInfoGGP.txt[] 48-- 49 50On Google Games Platform, the surface extents are dynamic. 51The pname:minImageExtent will never be greater than 1080p and the 52pname:maxImageExtent will never be less than 1080p. 53The pname:currentExtent will reflect the current optimal resolution. 54 55ifdef::VK_KHR_swapchain[] 56Applications are expected to choose an appropriate size for the swapchain's 57pname:imageExtent, within the bounds of the surface. 58Using the surface's pname:currentExtent will offer the best performance and 59quality. 60When a swapchain's pname:imageExtent does not match the surface's 61pname:currentExtent, the presentable images are scaled to the surface's 62dimensions during presentation if possible and ename:VK_SUBOPTIMAL_KHR is 63returned, otherwise presentation fails with ename:VK_ERROR_OUT_OF_DATE_KHR. 64endif::VK_KHR_swapchain[] 65 66[open,refpage='VkStreamDescriptorSurfaceCreateFlagsGGP',desc='Reserved for future use',type='flags'] 67-- 68include::{generated}/api/flags/VkStreamDescriptorSurfaceCreateFlagsGGP.txt[] 69 70tname:VkStreamDescriptorSurfaceCreateFlagsGGP is a bitmask type for setting 71a mask, but is currently reserved for future use. 72-- 73