1 // 2 // Copyright 2023 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 // DisplayVkOffscreen.cpp: 7 // Implements the class methods for DisplayVkOffscreen. 8 // 9 10 #include "DisplayVkOffscreen.h" 11 12 #include "common/debug.h" 13 #include "libANGLE/renderer/vulkan/vk_caps_utils.h" 14 15 namespace rx 16 { 17 DisplayVkOffscreen(const egl::DisplayState & state)18DisplayVkOffscreen::DisplayVkOffscreen(const egl::DisplayState &state) : DisplayVkLinux(state) {} 19 isValidNativeWindow(EGLNativeWindowType window) const20bool DisplayVkOffscreen::isValidNativeWindow(EGLNativeWindowType window) const 21 { 22 return false; 23 } 24 createWindowSurfaceVk(const egl::SurfaceState & state,EGLNativeWindowType window)25SurfaceImpl *DisplayVkOffscreen::createWindowSurfaceVk(const egl::SurfaceState &state, 26 EGLNativeWindowType window) 27 { 28 UNREACHABLE(); 29 return nullptr; 30 } 31 generateConfigs()32egl::ConfigSet DisplayVkOffscreen::generateConfigs() 33 { 34 constexpr GLenum kColorFormats[] = {GL_RGBA8, GL_BGRA8_EXT, GL_RGB565, GL_RGB8}; 35 36 return egl_vk::GenerateConfigs(kColorFormats, egl_vk::kConfigDepthStencilFormats, this); 37 } 38 checkConfigSupport(egl::Config * config)39void DisplayVkOffscreen::checkConfigSupport(egl::Config *config) {} 40 getWSIExtension() const41const char *DisplayVkOffscreen::getWSIExtension() const 42 { 43 return nullptr; 44 } 45 IsVulkanOffscreenDisplayAvailable()46bool IsVulkanOffscreenDisplayAvailable() 47 { 48 return true; 49 } 50 CreateVulkanOffscreenDisplay(const egl::DisplayState & state)51DisplayImpl *CreateVulkanOffscreenDisplay(const egl::DisplayState &state) 52 { 53 return new DisplayVkOffscreen(state); 54 } 55 56 } // namespace rx 57