summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-03-19 23:28:31 +0100
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:23 +0200
commit260743f371236f7c57b01334b1c3474b15a47c39 (patch)
tree312d89fa8215199ef5f7ec1fc84b025df526e107 /src/video_core/renderer_vulkan/maxwell_to_vk.cpp
parentshader: Implement DADD (diff)
downloadyuzu-260743f371236f7c57b01334b1c3474b15a47c39.tar
yuzu-260743f371236f7c57b01334b1c3474b15a47c39.tar.gz
yuzu-260743f371236f7c57b01334b1c3474b15a47c39.tar.bz2
yuzu-260743f371236f7c57b01334b1c3474b15a47c39.tar.lz
yuzu-260743f371236f7c57b01334b1c3474b15a47c39.tar.xz
yuzu-260743f371236f7c57b01334b1c3474b15a47c39.tar.zst
yuzu-260743f371236f7c57b01334b1c3474b15a47c39.zip
Diffstat (limited to 'src/video_core/renderer_vulkan/maxwell_to_vk.cpp')
-rw-r--r--src/video_core/renderer_vulkan/maxwell_to_vk.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
index f088447e9..dc4ff0da2 100644
--- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
+++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp
@@ -741,4 +741,28 @@ VkSamplerReductionMode SamplerReduction(Tegra::Texture::SamplerReduction reducti
return VK_SAMPLER_REDUCTION_MODE_WEIGHTED_AVERAGE_EXT;
}
+VkSampleCountFlagBits MsaaMode(Tegra::Texture::MsaaMode msaa_mode) {
+ switch (msaa_mode) {
+ case Tegra::Texture::MsaaMode::Msaa1x1:
+ return VK_SAMPLE_COUNT_1_BIT;
+ case Tegra::Texture::MsaaMode::Msaa2x1:
+ case Tegra::Texture::MsaaMode::Msaa2x1_D3D:
+ return VK_SAMPLE_COUNT_2_BIT;
+ case Tegra::Texture::MsaaMode::Msaa2x2:
+ case Tegra::Texture::MsaaMode::Msaa2x2_VC4:
+ case Tegra::Texture::MsaaMode::Msaa2x2_VC12:
+ return VK_SAMPLE_COUNT_4_BIT;
+ case Tegra::Texture::MsaaMode::Msaa4x2:
+ case Tegra::Texture::MsaaMode::Msaa4x2_D3D:
+ case Tegra::Texture::MsaaMode::Msaa4x2_VC8:
+ case Tegra::Texture::MsaaMode::Msaa4x2_VC24:
+ return VK_SAMPLE_COUNT_8_BIT;
+ case Tegra::Texture::MsaaMode::Msaa4x4:
+ return VK_SAMPLE_COUNT_16_BIT;
+ default:
+ UNREACHABLE_MSG("Invalid msaa_mode={}", static_cast<int>(msaa_mode));
+ return VK_SAMPLE_COUNT_1_BIT;
+ }
+}
+
} // namespace Vulkan::MaxwellToVK