shader_recompiler: Fix alpha-to-coverage fragment output interface

The Vulkan spec requires fragment shaders to declare an output covering
Location 0, Component 3 (alpha) when alpha-to-coverage is enabled. This change:

- Tracks alpha_to_coverage_enabled through RuntimeInfo from pipeline state
- Forces declaration of frag_color[0] with full RGBA when enabled
- Initializes alpha to 1.0 in shader epilogue if not explicitly written

Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
Zephyron
2025-10-17 16:07:35 +10:00
parent 7dea15e642
commit d8d54c5ccf
5 changed files with 34 additions and 1 deletions

View File

@@ -1,4 +1,5 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
@@ -93,6 +94,7 @@ struct RuntimeInfo {
std::optional<float> fixed_state_point_size;
std::optional<CompareFunction> alpha_test_func;
float alpha_test_reference{};
bool alpha_to_coverage_enabled{};
/// Static Y negate value
bool y_negate{};