1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-20 10:54:16 +01:00

[d3d9] Add a config option for D24 -> D32

This commit is contained in:
Georg Lehmann 2022-09-26 10:41:21 +02:00 committed by Joshie
parent 7552cfe62a
commit 6188ffa23a
4 changed files with 15 additions and 2 deletions

View File

@ -451,6 +451,15 @@
# d3d9.supportDFFormats = True
# Use D32f for D24
#
# Useful for reproducing AMD issues on other hw.
#
# Supported values:
# - True/False
# d3d9.useD32forD24 = False
# Support X4R4G4B4
#
# Support the X4R4G4B4 format.

View File

@ -434,7 +434,8 @@ namespace dxvk {
// AMD do not support 24-bit depth buffers on Vulkan,
// so we have to fall back to a 32-bit depth format.
m_d24s8Support = CheckImageFormatSupport(adapter, VK_FORMAT_D24_UNORM_S8_UINT,
m_d24s8Support = !options.useD32forD24 &&
CheckImageFormatSupport(adapter, VK_FORMAT_D24_UNORM_S8_UINT,
VK_FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT |
VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT);
@ -444,7 +445,6 @@ namespace dxvk {
VK_FORMAT_FEATURE_2_DEPTH_STENCIL_ATTACHMENT_BIT |
VK_FORMAT_FEATURE_2_SAMPLED_IMAGE_BIT);
// VK_EXT_4444_formats
if (!m_d24s8Support)
Logger::info("D3D9: VK_FORMAT_D24_UNORM_S8_UINT -> VK_FORMAT_D32_SFLOAT_S8_UINT");

View File

@ -55,6 +55,7 @@ namespace dxvk {
this->supportDFFormats = config.getOption<bool> ("d3d9.supportDFFormats", true);
this->supportX4R4G4B4 = config.getOption<bool> ("d3d9.supportX4R4G4B4", true);
this->supportD32 = config.getOption<bool> ("d3d9.supportD32", true);
this->useD32forD24 = config.getOption<bool> ("d3d9.useD32forD24", false);
this->disableA8RT = config.getOption<bool> ("d3d9.disableA8RT", false);
this->invariantPosition = config.getOption<bool> ("d3d9.invariantPosition", true);
this->memoryTrackTest = config.getOption<bool> ("d3d9.memoryTrackTest", false);

View File

@ -91,6 +91,9 @@ namespace dxvk {
/// Support D32
bool supportD32;
/// Use D32f for D24
bool useD32forD24;
/// Disable D3DFMT_A8 for render targets.
/// Specifically to work around a game
/// bug in The Sims 2 that happens on native too!