2
// Copyright 2019 The ANGLE Project Authors. All rights reserved.
3
// Use of this source code is governed by a BSD-style license that can be
4
// found in the LICENSE file.
7
// Implements the class methods for DisplayVkGGP.
10
#include "libANGLE/renderer/vulkan/ggp/DisplayVkGGP.h"
12
#include "libANGLE/renderer/vulkan/ggp/WindowSurfaceVkGGP.h"
13
#include "libANGLE/renderer/vulkan/vk_caps_utils.h"
17
DisplayVkGGP::DisplayVkGGP(const egl::DisplayState &state) : DisplayVk(state) {}
19
bool DisplayVkGGP::isValidNativeWindow(EGLNativeWindowType window) const
21
// GGP doesn't use window handles.
25
SurfaceImpl *DisplayVkGGP::createWindowSurfaceVk(const egl::SurfaceState &state,
26
EGLNativeWindowType window)
28
return new WindowSurfaceVkGGP(state, window);
31
egl::ConfigSet DisplayVkGGP::generateConfigs()
33
// Not entirely sure what backbuffer formats GGP supports.
34
constexpr GLenum kColorFormats[] = {GL_BGRA8_EXT, GL_BGRX8_ANGLEX};
35
return egl_vk::GenerateConfigs(kColorFormats, egl_vk::kConfigDepthStencilFormats, this);
38
bool DisplayVkGGP::checkConfigSupport(egl::Config *config)
43
const char *DisplayVkGGP::getWSIExtension() const
45
return VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME;
48
bool IsVulkanGGPDisplayAvailable()
53
DisplayImpl *CreateVulkanGGPDisplay(const egl::DisplayState &state)
55
return new DisplayVkGGP(state);