Hash :
d2a6b2a0
Author :
Date :
2023-08-04T14:15:11
Use offscreen DisplayVk on ChromeOS Currently, we always use DisplayVkHeadless on ChromeOS which can fail if the drivers do not support VK_EXT_headless_surface (like on Intel). At the end of the day, CrOS never really uses Vulkan WSI, so it shouldn't need a WSI extension anyways. This CL introduces a simple DisplayVkOffscreen that requires no WSI. We then configure CrOS to use this new DisplayVk. Bug: b/292249282 Change-Id: I1fcbb48d187eb656c6e03bc7ac7b15ac8ad0a4ae Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4752416 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Brian Ho <hob@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
//
// Copyright 2023 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// DisplayVkOffscreen.h:
// Defines the class interface for DisplayVkOffscreen, implementing
// DisplayVk for Linux when window surfaces are not supported.
//
#ifndef LIBANGLE_RENDERER_VULKAN_LINUX_DISPLAYVKOFFSCREEN_H_
#define LIBANGLE_RENDERER_VULKAN_LINUX_DISPLAYVKOFFSCREEN_H_
#include "libANGLE/renderer/vulkan/linux/DisplayVkLinux.h"
namespace rx
{
class DisplayVkOffscreen : public DisplayVkLinux
{
public:
DisplayVkOffscreen(const egl::DisplayState &state);
bool isValidNativeWindow(EGLNativeWindowType window) const override;
bool isUsingSwapchain() const override;
SurfaceImpl *createWindowSurfaceVk(const egl::SurfaceState &state,
EGLNativeWindowType window) override;
egl::ConfigSet generateConfigs() override;
void checkConfigSupport(egl::Config *config) override;
const char *getWSIExtension() const override;
};
} // namespace rx
#endif // LIBANGLE_RENDERER_VULKAN_LINUX_DISPLAYVKOFFSCREEN_H_