mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-02-21 16:43:35 +00:00
If S8D24 is not supported, use D32FS8
This commit is contained in:
parent
8cac0e2b51
commit
ed681977f9
3 changed files with 9 additions and 5 deletions
|
@ -69,11 +69,10 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
requiredFeatures |= FormatFeatureFlags.FormatFeatureStorageImageBit;
|
||||
}
|
||||
|
||||
if (!FormatSupports(requiredFeatures, srcFormat) ||
|
||||
(srcFormat == GAL.Format.D24UnormS8Uint && VulkanConfiguration.ForceD24S8Unsupported))
|
||||
if (!FormatSupports(requiredFeatures, srcFormat) || (IsD24S8(srcFormat) && VulkanConfiguration.ForceD24S8Unsupported))
|
||||
{
|
||||
// The format is not supported. Can we convert it to a higher precision format?
|
||||
if (srcFormat == GAL.Format.D24UnormS8Uint)
|
||||
if (IsD24S8(srcFormat))
|
||||
{
|
||||
format = VkFormat.D32SfloatS8Uint;
|
||||
}
|
||||
|
@ -85,5 +84,10 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
return format;
|
||||
}
|
||||
|
||||
public static bool IsD24S8(GAL.Format format)
|
||||
{
|
||||
return format == GAL.Format.D24UnormS8Uint || format == GAL.Format.S8UintD24Unorm;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -399,7 +399,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
private bool NeedsD24S8Conversion()
|
||||
{
|
||||
return Info.Format == GAL.Format.D24UnormS8Uint && VkFormat == VkFormat.D32SfloatS8Uint;
|
||||
return FormatCapabilities.IsD24S8(Info.Format) && VkFormat == VkFormat.D32SfloatS8Uint;
|
||||
}
|
||||
|
||||
public void SetModification(AccessFlags accessFlags, PipelineStageFlags stage)
|
||||
|
|
|
@ -964,7 +964,7 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
|
||||
private bool NeedsD24S8Conversion()
|
||||
{
|
||||
return Info.Format == GAL.Format.D24UnormS8Uint && VkFormat == VkFormat.D32SfloatS8Uint;
|
||||
return FormatCapabilities.IsD24S8(Info.Format) && VkFormat == VkFormat.D32SfloatS8Uint;
|
||||
}
|
||||
|
||||
public void CopyFromOrToBuffer(
|
||||
|
|
Loading…
Reference in a new issue