| 230 | |
| 231 | OVR_PUBLIC_FUNCTION(ovrResult) |
| 232 | ovr_CreateMirrorTextureWithOptionsVk( |
| 233 | ovrSession session, |
| 234 | VkDevice device, |
| 235 | const ovrMirrorTextureDesc* desc, |
| 236 | ovrMirrorTexture* out_MirrorTexture) |
| 237 | { |
| 238 | REV_TRACE(ovr_CreateMirrorTextureWithOptionsVk); |
| 239 | |
| 240 | if (!session) |
| 241 | return ovrError_InvalidSession; |
| 242 | |
| 243 | if (!device || !desc || !out_MirrorTexture) |
| 244 | return ovrError_InvalidParameter; |
| 245 | |
| 246 | ovrMirrorTexture mirrorTexture = new ovrMirrorTextureData(); |
| 247 | mirrorTexture->Desc = *desc; |
| 248 | *out_MirrorTexture = mirrorTexture; |
| 249 | |
| 250 | ovrTextureSwapChainDesc swapDesc; |
| 251 | swapDesc.Type = ovrTexture_2D; |
| 252 | swapDesc.Format = desc->Format; |
| 253 | swapDesc.ArraySize = 1; |
| 254 | swapDesc.Width = desc->Width; |
| 255 | swapDesc.Height = desc->Height; |
| 256 | swapDesc.MipLevels = 1; |
| 257 | swapDesc.SampleCount = 1; |
| 258 | swapDesc.StaticImage = ovrTrue; |
| 259 | swapDesc.MiscFlags = desc->MiscFlags; |
| 260 | swapDesc.BindFlags = 0; |
| 261 | return ovr_CreateTextureSwapChainVk(session, device, &swapDesc, &mirrorTexture->Dummy); |
| 262 | } |
| 263 | |
| 264 | OVR_PUBLIC_FUNCTION(ovrResult) |
| 265 | ovr_GetMirrorTextureBufferVk( |
nothing calls this directly
no test coverage detected