~mmach/netext73/webkit2gtk

« back to all changes in this revision

Viewing changes to Source/ThirdParty/ANGLE/src/libANGLE/renderer/vulkan/ggp/DisplayVkGGP.cpp

  • Committer: mmach
  • Date: 2023-06-16 17:21:37 UTC
  • Revision ID: netbit73@gmail.com-20230616172137-2rqx6yr96ga9g3kp
1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
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.
 
5
//
 
6
// DisplayVkGGP.cpp:
 
7
//    Implements the class methods for DisplayVkGGP.
 
8
//
 
9
 
 
10
#include "libANGLE/renderer/vulkan/ggp/DisplayVkGGP.h"
 
11
 
 
12
#include "libANGLE/renderer/vulkan/ggp/WindowSurfaceVkGGP.h"
 
13
#include "libANGLE/renderer/vulkan/vk_caps_utils.h"
 
14
 
 
15
namespace rx
 
16
{
 
17
DisplayVkGGP::DisplayVkGGP(const egl::DisplayState &state) : DisplayVk(state) {}
 
18
 
 
19
bool DisplayVkGGP::isValidNativeWindow(EGLNativeWindowType window) const
 
20
{
 
21
    // GGP doesn't use window handles.
 
22
    return true;
 
23
}
 
24
 
 
25
SurfaceImpl *DisplayVkGGP::createWindowSurfaceVk(const egl::SurfaceState &state,
 
26
                                                 EGLNativeWindowType window)
 
27
{
 
28
    return new WindowSurfaceVkGGP(state, window);
 
29
}
 
30
 
 
31
egl::ConfigSet DisplayVkGGP::generateConfigs()
 
32
{
 
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);
 
36
}
 
37
 
 
38
bool DisplayVkGGP::checkConfigSupport(egl::Config *config)
 
39
{
 
40
    return true;
 
41
}
 
42
 
 
43
const char *DisplayVkGGP::getWSIExtension() const
 
44
{
 
45
    return VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME;
 
46
}
 
47
 
 
48
bool IsVulkanGGPDisplayAvailable()
 
49
{
 
50
    return true;
 
51
}
 
52
 
 
53
DisplayImpl *CreateVulkanGGPDisplay(const egl::DisplayState &state)
 
54
{
 
55
    return new DisplayVkGGP(state);
 
56
}
 
57
}  // namespace rx