Skip to content

Commit

Permalink
Fix SuperRes check for non-nvidia platforms
Browse files Browse the repository at this point in the history
SuperRes validity check should now output as false for platforms that do not support it.
RTX Video HDR/Auto SDR-to-HDR should now turn the window to HDR mode for all platforms that support this feature, not just nvidia.
  • Loading branch information
JTGaming committed Feb 6, 2024
1 parent 7c79738 commit 18143f5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Source/DX11VideoProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1085,8 +1085,11 @@ bool CDX11VideoProcessor::SuperResValid()
OutputEqualToOrLargerThanInput && (!SourceIsHDR() || (!m_bHdrPassthroughSupport || !m_bHdrPassthrough));
return superres_valid;
}
else if (m_VendorId == PCIV_INTEL) {
return ValidSettings;
}

return ValidSettings;
return false;
}

void CDX11VideoProcessor::UpdateRenderRect()
Expand Down Expand Up @@ -1435,9 +1438,10 @@ HRESULT CDX11VideoProcessor::InitSwapChain()
}

//If being output in higher than 8bit and using an HDR display,
// RTX Video requires the window to be in HDR to output correct colors
// Nvidia's SuperRes implementation requires the window to be in HDR to output correct colors
//SDR-to-HDR requires window to be in HDR for all platforms.
const auto Prefer10Bit = Preferred10BitOutput();
const auto bHdrOutput = m_bHdrPassthroughSupport && (m_bHdrPassthrough && SourceIsHDR() || (m_VendorId == PCIV_NVIDIA) && (Prefer10Bit && SuperResValid() || RTXVideoHDRValid()));
const auto bHdrOutput = m_bHdrPassthroughSupport && (m_bHdrPassthrough && SourceIsHDR() || ((m_VendorId == PCIV_NVIDIA) && Prefer10Bit && SuperResValid() || RTXVideoHDRValid()));
const auto b10BitOutput = bHdrOutput || Prefer10Bit;
m_SwapChainFmt = b10BitOutput ? DXGI_FORMAT_R10G10B10A2_UNORM : DXGI_FORMAT_B8G8R8A8_UNORM;

Expand Down

0 comments on commit 18143f5

Please sign in to comment.