diff options
| author | 2023-08-02 14:25:52 -0400 | |
|---|---|---|
| committer | 2023-08-02 14:25:52 -0400 | |
| commit | fca7d975fdbeb1c63677b80efc03920affee4b12 (patch) | |
| tree | bbded6cf80886c6def87bae92cf6784340165de9 /src/video_core/renderer_vulkan | |
| parent | Merge pull request #11204 from liamwhite/eds3-blend-amd (diff) | |
| parent | config(qt): Fix name of network category (diff) | |
| download | yuzu-fca7d975fdbeb1c63677b80efc03920affee4b12.tar.gz yuzu-fca7d975fdbeb1c63677b80efc03920affee4b12.tar.xz yuzu-fca7d975fdbeb1c63677b80efc03920affee4b12.zip | |
Merge pull request #10839 from lat9nq/pgc-plus
general: Reimplement per-game configurations
Diffstat (limited to 'src/video_core/renderer_vulkan')
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_swapchain.cpp | 12 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_texture_cache.cpp | 19 |
2 files changed, 19 insertions, 12 deletions
diff --git a/src/video_core/renderer_vulkan/vk_swapchain.cpp b/src/video_core/renderer_vulkan/vk_swapchain.cpp index d3cddac69..81ef98f61 100644 --- a/src/video_core/renderer_vulkan/vk_swapchain.cpp +++ b/src/video_core/renderer_vulkan/vk_swapchain.cpp | |||
| @@ -45,8 +45,8 @@ static VkPresentModeKHR ChooseSwapPresentMode(bool has_imm, bool has_mailbox, | |||
| 45 | return mode; | 45 | return mode; |
| 46 | } | 46 | } |
| 47 | switch (mode) { | 47 | switch (mode) { |
| 48 | case Settings::VSyncMode::FIFO: | 48 | case Settings::VSyncMode::Fifo: |
| 49 | case Settings::VSyncMode::FIFORelaxed: | 49 | case Settings::VSyncMode::FifoRelaxed: |
| 50 | if (has_mailbox) { | 50 | if (has_mailbox) { |
| 51 | return Settings::VSyncMode::Mailbox; | 51 | return Settings::VSyncMode::Mailbox; |
| 52 | } else if (has_imm) { | 52 | } else if (has_imm) { |
| @@ -59,8 +59,8 @@ static VkPresentModeKHR ChooseSwapPresentMode(bool has_imm, bool has_mailbox, | |||
| 59 | }(); | 59 | }(); |
| 60 | if ((setting == Settings::VSyncMode::Mailbox && !has_mailbox) || | 60 | if ((setting == Settings::VSyncMode::Mailbox && !has_mailbox) || |
| 61 | (setting == Settings::VSyncMode::Immediate && !has_imm) || | 61 | (setting == Settings::VSyncMode::Immediate && !has_imm) || |
| 62 | (setting == Settings::VSyncMode::FIFORelaxed && !has_fifo_relaxed)) { | 62 | (setting == Settings::VSyncMode::FifoRelaxed && !has_fifo_relaxed)) { |
| 63 | setting = Settings::VSyncMode::FIFO; | 63 | setting = Settings::VSyncMode::Fifo; |
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | switch (setting) { | 66 | switch (setting) { |
| @@ -68,9 +68,9 @@ static VkPresentModeKHR ChooseSwapPresentMode(bool has_imm, bool has_mailbox, | |||
| 68 | return VK_PRESENT_MODE_IMMEDIATE_KHR; | 68 | return VK_PRESENT_MODE_IMMEDIATE_KHR; |
| 69 | case Settings::VSyncMode::Mailbox: | 69 | case Settings::VSyncMode::Mailbox: |
| 70 | return VK_PRESENT_MODE_MAILBOX_KHR; | 70 | return VK_PRESENT_MODE_MAILBOX_KHR; |
| 71 | case Settings::VSyncMode::FIFO: | 71 | case Settings::VSyncMode::Fifo: |
| 72 | return VK_PRESENT_MODE_FIFO_KHR; | 72 | return VK_PRESENT_MODE_FIFO_KHR; |
| 73 | case Settings::VSyncMode::FIFORelaxed: | 73 | case Settings::VSyncMode::FifoRelaxed: |
| 74 | return VK_PRESENT_MODE_FIFO_RELAXED_KHR; | 74 | return VK_PRESENT_MODE_FIFO_RELAXED_KHR; |
| 75 | default: | 75 | default: |
| 76 | return VK_PRESENT_MODE_FIFO_KHR; | 76 | return VK_PRESENT_MODE_FIFO_KHR; |
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index bf6ad6c79..53d749bd4 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp | |||
| @@ -817,7 +817,7 @@ TextureCacheRuntime::TextureCacheRuntime(const Device& device_, Scheduler& sched | |||
| 817 | : device{device_}, scheduler{scheduler_}, memory_allocator{memory_allocator_}, | 817 | : device{device_}, scheduler{scheduler_}, memory_allocator{memory_allocator_}, |
| 818 | staging_buffer_pool{staging_buffer_pool_}, blit_image_helper{blit_image_helper_}, | 818 | staging_buffer_pool{staging_buffer_pool_}, blit_image_helper{blit_image_helper_}, |
| 819 | render_pass_cache{render_pass_cache_}, resolution{Settings::values.resolution_info} { | 819 | render_pass_cache{render_pass_cache_}, resolution{Settings::values.resolution_info} { |
| 820 | if (Settings::values.accelerate_astc) { | 820 | if (Settings::values.accelerate_astc.GetValue() == Settings::AstcDecodeMode::Gpu) { |
| 821 | astc_decoder_pass.emplace(device, scheduler, descriptor_pool, staging_buffer_pool, | 821 | astc_decoder_pass.emplace(device, scheduler, descriptor_pool, staging_buffer_pool, |
| 822 | compute_pass_descriptor_queue, memory_allocator); | 822 | compute_pass_descriptor_queue, memory_allocator); |
| 823 | } | 823 | } |
| @@ -1301,12 +1301,19 @@ Image::Image(TextureCacheRuntime& runtime_, const ImageInfo& info_, GPUVAddr gpu | |||
| 1301 | runtime->ViewFormats(info.format))), | 1301 | runtime->ViewFormats(info.format))), |
| 1302 | aspect_mask(ImageAspectMask(info.format)) { | 1302 | aspect_mask(ImageAspectMask(info.format)) { |
| 1303 | if (IsPixelFormatASTC(info.format) && !runtime->device.IsOptimalAstcSupported()) { | 1303 | if (IsPixelFormatASTC(info.format) && !runtime->device.IsOptimalAstcSupported()) { |
| 1304 | if (Settings::values.async_astc.GetValue()) { | 1304 | switch (Settings::values.accelerate_astc.GetValue()) { |
| 1305 | case Settings::AstcDecodeMode::Gpu: | ||
| 1306 | if (Settings::values.astc_recompression.GetValue() == | ||
| 1307 | Settings::AstcRecompression::Uncompressed && | ||
| 1308 | info.size.depth == 1) { | ||
| 1309 | flags |= VideoCommon::ImageFlagBits::AcceleratedUpload; | ||
| 1310 | } | ||
| 1311 | break; | ||
| 1312 | case Settings::AstcDecodeMode::CpuAsynchronous: | ||
| 1305 | flags |= VideoCommon::ImageFlagBits::AsynchronousDecode; | 1313 | flags |= VideoCommon::ImageFlagBits::AsynchronousDecode; |
| 1306 | } else if (Settings::values.astc_recompression.GetValue() == | 1314 | break; |
| 1307 | Settings::AstcRecompression::Uncompressed && | 1315 | default: |
| 1308 | Settings::values.accelerate_astc.GetValue() && info.size.depth == 1) { | 1316 | break; |
| 1309 | flags |= VideoCommon::ImageFlagBits::AcceleratedUpload; | ||
| 1310 | } | 1317 | } |
| 1311 | flags |= VideoCommon::ImageFlagBits::Converted; | 1318 | flags |= VideoCommon::ImageFlagBits::Converted; |
| 1312 | flags |= VideoCommon::ImageFlagBits::CostlyLoad; | 1319 | flags |= VideoCommon::ImageFlagBits::CostlyLoad; |