[VK, MacOS] Fix strict output type mismatch on Metal (MK8D/TOTK fix) (#3414)

Metal validation requires fragment shader output types to strictly match the render target format (e.g., writing float to RGBA32Uint is invalid).

This commit:
1. Adds color_output_types to RuntimeInfo.
2. Detects Integer/SignedInteger render targets in the Vulkan backend (MoltenVK only).
3. Updates the SPIR-V emitter to declare the correct output type (Uint/Sint) and bitcast values accordingly.

This fixes the VK_ERROR_INITIALIZATION_FAILED crash on macOS.

Co-authored-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3414
Co-authored-by: rayman30 <silentbitdev@gmail.com>
Co-committed-by: rayman30 <silentbitdev@gmail.com>
This commit is contained in:
rayman30 2026-01-29 17:24:36 +01:00 committed by crueter
parent 025bc799f7
commit 643f11d972
No known key found for this signature in database
GPG key ID: 425ACD2D4830EBC6
4 changed files with 42 additions and 4 deletions

View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@ -104,6 +107,9 @@ struct RuntimeInfo {
/// Transform feedback state for each varying
std::array<TransformFeedbackVarying, 256> xfb_varyings{};
u32 xfb_count{0};
/// Output types for each color attachment
std::array<AttributeType, 8> color_output_types{};
};
} // namespace Shader