// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once #include "common/common_types.h" namespace Vulkan { struct ScreenRectVertex { ScreenRectVertex() = default; explicit ScreenRectVertex(f32 x, f32 y, f32 u, f32 v) : position{{x, y}}, tex_coord{{u, v}} {} std::array position; std::array tex_coord; }; static inline std::array MakeOrthographicMatrix(f32 width, f32 height) { // clang-format off return { 2.f / width, 0.f, 0.f, 0.f, 0.f, 2.f / height, 0.f, 0.f, 0.f, 0.f, 1.f, 0.f, -1.f, -1.f, 0.f, 1.f}; // clang-format on } struct PresentPushConstants { std::array modelview_matrix; std::array vertices; }; static_assert(sizeof(PresentPushConstants) <= 128, "Push constants are too large"); } // namespace Vulkan