diff options
author | Kelebek1 <eeeedddccc@hotmail.co.uk> | 2023-05-09 23:13:15 +0200 |
---|---|---|
committer | Kelebek1 <eeeedddccc@hotmail.co.uk> | 2023-05-09 23:13:15 +0200 |
commit | a386003b649e24a9df916a81b95cbcc9ab8bcbaa (patch) | |
tree | 4d7bf0db0171c49f9cac8e346e17cf23441f1bc4 /src | |
parent | Merge pull request #10183 from liamwhite/mods (diff) | |
download | yuzu-a386003b649e24a9df916a81b95cbcc9ab8bcbaa.tar yuzu-a386003b649e24a9df916a81b95cbcc9ab8bcbaa.tar.gz yuzu-a386003b649e24a9df916a81b95cbcc9ab8bcbaa.tar.bz2 yuzu-a386003b649e24a9df916a81b95cbcc9ab8bcbaa.tar.lz yuzu-a386003b649e24a9df916a81b95cbcc9ab8bcbaa.tar.xz yuzu-a386003b649e24a9df916a81b95cbcc9ab8bcbaa.tar.zst yuzu-a386003b649e24a9df916a81b95cbcc9ab8bcbaa.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 628e1376f..cbf23552c 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -349,25 +349,12 @@ void RasterizerVulkan::Clear(u32 layer_count) { const u32 color_attachment = regs.clear_surface.RT; if (use_color && framebuffer->HasAspectColorBit(color_attachment)) { - VkClearValue clear_value; - bool is_integer = false; - bool is_signed = false; - size_t int_size = 8; - for (std::size_t i = 0; i < Tegra::Engines::Maxwell3D::Regs::NumRenderTargets; ++i) { - const auto& this_rt = regs.rt[i]; - if (this_rt.Address() == 0) { - continue; - } - if (this_rt.format == Tegra::RenderTargetFormat::NONE) { - continue; - } - const auto format = - VideoCore::Surface::PixelFormatFromRenderTargetFormat(this_rt.format); - is_integer = IsPixelFormatInteger(format); - is_signed = IsPixelFormatSignedInteger(format); - int_size = PixelComponentSizeBitsInteger(format); - break; - } + const auto format = + VideoCore::Surface::PixelFormatFromRenderTargetFormat(regs.rt[color_attachment].format); + bool is_integer = IsPixelFormatInteger(format); + bool is_signed = IsPixelFormatSignedInteger(format); + size_t int_size = PixelComponentSizeBitsInteger(format); + VkClearValue clear_value{}; if (!is_integer) { std::memcpy(clear_value.color.float32, regs.clear_color.data(), regs.clear_color.size() * sizeof(f32)); |