mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 02:47:02 +02:00
gpu: approximate PPSA24156 EQAA with 2x MSAA and warn once
This commit is contained in:
@@ -72,7 +72,16 @@ void RenderExecutor::ResolveRenderColorTarget(CommandBuffer& buffer, RenderColor
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const auto samples = render_sample_count(rt.attrib.num_fragments);
|
const auto samples = render_sample_count(rt.attrib.num_fragments);
|
||||||
if (samples == 0 || rt.attrib.num_samples != rt.attrib.num_fragments) {
|
// TODO(PPSA24156): Replace this 2x MSAA approximation with proper 4-coverage/2-fragment EQAA.
|
||||||
|
const bool approximate_eqaa = rt.attrib.num_samples == 2 && rt.attrib.num_fragments == 1;
|
||||||
|
if (approximate_eqaa) {
|
||||||
|
static std::atomic_bool logged = false;
|
||||||
|
if (!logged.exchange(true, std::memory_order_relaxed)) {
|
||||||
|
Log::WriteToConsoleAndLog(
|
||||||
|
"Warning: approximating 4-coverage/2-fragment EQAA with 2x MSAA.\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (samples == 0 || (rt.attrib.num_samples != rt.attrib.num_fragments && !approximate_eqaa)) {
|
||||||
EXIT("unsupported render-target sample configuration: samples=%u fragments=%u\n",
|
EXIT("unsupported render-target sample configuration: samples=%u fragments=%u\n",
|
||||||
rt.attrib.num_samples, rt.attrib.num_fragments);
|
rt.attrib.num_samples, rt.attrib.num_fragments);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user