mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
Merges yaps2/main (github.com/yaps2/yaps2,c16b88cb7) into ARMSX2, replacing the arm64 recompiler family with the yaps2 JITs and importing the yaps2 testing, perf, and libretro infrastructure. Common ancestor is upstream PCSX2342db5152(2026-06-19); git auto-merged all but 38 files. Replaced (deleted in this merge, recoverable from history): - arm64/aR5900*, aR3000A*, aVU* -> arm64/iR5900*/iR3000A*/microVU*-arm64: EE static-pin register file with lazy dirty tracking, dual-residence allocator, IOP block linking, native COP2 macro ops, inline unaligned fastmem, persisted VU program cache, call-ret shadow ring, VU0 spin fast-forward. - MVU_DIFF shadow-run hooks in shared VU interpreter TUs (superseded by the offline vurunner JIT-vs-interp oracle). Imported from yaps2: - tests/ctest/core/recompilers: ~80 gtest suites (EE/IOP/VU differential harnesses, fuzzers, ABI digest tripwire, capture format pins) plus the gs_vertex_tests kernel oracle. - pcsx2-vurunner / pcsx2-eerunner headless capture-replay runners. - tools/perf counter-based A/B rigs, perf jitdump productionization, PmuCounters, clang-perf/clang-handheld presets. - pcsx2-libretro core (ENABLE_LIBRETRO, default OFF; rename pending). - GS vertex-kick fast path (GV series): TBL-based packed parse, register-resident kick, scalar-outcode cull, fused draw-rect/FindMinMax. - Null renderer, VK_KHR_display direct WSI, swapchain PresentStats. - SPU2 NEON mixer vectorization, EE timer read clamp (NFL 2K5 hang), IOP ioman signed-compare fix, assorted UB fixes. Kept from ARMSX2 in the both-touched files: - iOS dual-map W^X and fastmem-unavailable resilience (Memory, HostSys, vtlb). The split data/code area model is retained; both areas now take fixed VA hints so cached VU JIT code stays deterministic on Linux. - Android thread-affinity model, VMState shutdown early-outs, all platform frontends, branding, CI, RetroAchievements identity/policy. - GSDeviceVK: ARMSX2's push-descriptor decision logic (Mali crash gate, proprietary-vs-turnip Adreno split) merged with yaps2's descriptor-pool exhaustion recovery (flush + render-pass restart instead of dropped binds). Vendor feature policy is the union: Mali fbfetch policy with MediaTek/G57/Xclipse gates from ARMSX2; Adreno stencil/ROV/ test-and-sample-depth hang avoidance and no_ps2_z_quantization from yaps2. Build-system notes: - The Qt debugger is now gated behind ENABLE_QT_DEBUGGER (default off on arm64) so handheld builds drop the KDDockWidgets dependency. - GSDeviceNone and remaining yaps2 GS code were ported to the newer upstream GSTexture Usage-flags API. The replaced backend's interpreter-fallback glue (intExecuteOneInst, AndroidEEOpHist) and the EEDiffVerify runtime differ are retained for now; dead pieces will be removed in a follow-up commit.
55 lines
1.5 KiB
C++
55 lines
1.5 KiB
C++
// SPDX-FileCopyrightText: 2002-2026 PCSX2 Dev Team
|
|
// SPDX-License-Identifier: GPL-3.0+
|
|
|
|
#pragma once
|
|
#include "Pcsx2Defs.h"
|
|
|
|
#include <optional>
|
|
|
|
/// Contains the information required to create a graphics context in a window.
|
|
struct WindowInfo
|
|
{
|
|
enum class Type
|
|
{
|
|
Surfaceless,
|
|
Win32,
|
|
X11,
|
|
Wayland,
|
|
MacOS,
|
|
Android,
|
|
|
|
// Vulkan VK_KHR_display direct-to-monitor (no compositor / no GBM
|
|
// intermediate). Frontend supplies no native window handle; the
|
|
// renderer enumerates displays itself. surface_width/surface_height
|
|
// carry the requested mode (0 = pick the display's preferred mode).
|
|
VulkanDirect
|
|
};
|
|
|
|
/// The type of the surface. Surfaceless indicates it will not be displayed on screen at all.
|
|
Type type = Type::Surfaceless;
|
|
|
|
/// Connection to the display server. On most platforms except X11/Wayland, this is implicit and null.
|
|
void* display_connection = nullptr;
|
|
|
|
/// Abstract handle to the window. This depends on the surface type.
|
|
void* window_handle = nullptr;
|
|
|
|
/// For platforms where a separate surface/layer handle is needed, it is stored here (e.g. MacOS).
|
|
void* surface_handle = nullptr;
|
|
|
|
/// Width of the surface in pixels.
|
|
u32 surface_width = 0;
|
|
|
|
/// Height of the surface in pixels.
|
|
u32 surface_height = 0;
|
|
|
|
/// DPI scale for the surface.
|
|
float surface_scale = 1.0f;
|
|
|
|
/// Refresh rate of the surface, if available.
|
|
float surface_refresh_rate = 0.0f;
|
|
|
|
/// Returns the host's refresh rate for the given window, if available.
|
|
static std::optional<float> QueryRefreshRateForWindow(const WindowInfo& wi);
|
|
};
|