diff options
author | riperiperi <rhy3756547@hotmail.com> | 2022-12-26 18:50:27 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-26 15:50:27 -0300 |
commit | 470be03c2ff22346a1f0ae53fa25f53c4d1790b5 (patch) | |
tree | 7ce75f2ac860063279893571c762257806e197b5 /Ryujinx.Graphics.Vulkan/VulkanRenderer.cs | |
parent | c963b3c80488f88c9d7f44588b6ba45051af3e2d (diff) |
GPU: Add fallback when 16-bit formats are not supported (#4108)1.1.492
* Add conversion for 16 bit RGBA formats (not supported in Rosetta)
* Rebase fix
Rebase fix
* Forgot to remove this
* Fix RGBA16 format conversion
* Add RGBA4 -> RGBA8 conversion
* Handle host stride alignment
* Address Feedback Part 1
* Can't count
* Don't zero out rgb when alpha is 0
* Separate RGBA4 and 5-bit component formats
Not sure of a better way to name them...
* Add A1B5G5R5 conversion
* Put this in the right place.
* Make format naming consistent for capabilities
* Change method names
Diffstat (limited to 'Ryujinx.Graphics.Vulkan/VulkanRenderer.cs')
-rw-r--r-- | Ryujinx.Graphics.Vulkan/VulkanRenderer.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs b/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs index a32400f5..3c446abf 100644 --- a/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs +++ b/Ryujinx.Graphics.Vulkan/VulkanRenderer.cs @@ -396,6 +396,17 @@ namespace Ryujinx.Graphics.Vulkan GAL.Format.Etc2RgbSrgb, GAL.Format.Etc2RgbUnorm); + bool supports5BitComponentFormat = FormatCapabilities.OptimalFormatsSupport(compressedFormatFeatureFlags, + GAL.Format.R5G6B5Unorm, + GAL.Format.R5G5B5A1Unorm, + GAL.Format.R5G5B5X1Unorm, + GAL.Format.B5G6R5Unorm, + GAL.Format.B5G5R5A1Unorm, + GAL.Format.A1B5G5R5Unorm); + + bool supportsR4G4B4A4Format = FormatCapabilities.OptimalFormatsSupport(compressedFormatFeatureFlags, + GAL.Format.R4G4B4A4Unorm); + PhysicalDeviceVulkan12Features featuresVk12 = new PhysicalDeviceVulkan12Features() { SType = StructureType.PhysicalDeviceVulkan12Features @@ -425,7 +436,9 @@ namespace Ryujinx.Graphics.Vulkan supports3DTextureCompression: true, supportsBgraFormat: true, supportsR4G4Format: false, + supportsR4G4B4A4Format: supportsR4G4B4A4Format, supportsSnormBufferTextureFormat: true, + supports5BitComponentFormat: supports5BitComponentFormat, supportsFragmentShaderInterlock: Capabilities.SupportsFragmentShaderInterlock, supportsFragmentShaderOrderingIntel: false, supportsGeometryShaderPassthrough: Capabilities.SupportsGeometryShaderPassthrough, |