diff options
| author | 2021-12-23 22:30:10 -0500 | |
|---|---|---|
| committer | 2021-12-23 22:35:19 -0500 | |
| commit | f9e0681d59adaed2f077eb94642f6dbc3acf246e (patch) | |
| tree | 1a36ad994e4e103ca7095df81cbc62c2c2ecf343 /src/video_core/vulkan_common | |
| parent | Merge pull request #7614 from liushuyu/fix-linux-inhibit (diff) | |
| download | yuzu-f9e0681d59adaed2f077eb94642f6dbc3acf246e.tar.gz yuzu-f9e0681d59adaed2f077eb94642f6dbc3acf246e.tar.xz yuzu-f9e0681d59adaed2f077eb94642f6dbc3acf246e.zip | |
vk_texture_cache: Use 3D scale helpers for MSAA texture scaling on Intel Windows drivers
Fixes a crash when scaling MSAA textures in titles such as Sonic Colors Ultimate.
Diffstat (limited to 'src/video_core/vulkan_common')
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 9 | ||||
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.h | 5 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 9862b815b..3d78efddc 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp | |||
| @@ -638,15 +638,20 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR | |||
| 638 | } | 638 | } |
| 639 | } | 639 | } |
| 640 | 640 | ||
| 641 | if (ext_vertex_input_dynamic_state && driver_id == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS) { | 641 | const bool is_intel_windows = driver_id == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS; |
| 642 | if (ext_vertex_input_dynamic_state && is_intel_windows) { | ||
| 642 | LOG_WARNING(Render_Vulkan, "Blacklisting Intel for VK_EXT_vertex_input_dynamic_state"); | 643 | LOG_WARNING(Render_Vulkan, "Blacklisting Intel for VK_EXT_vertex_input_dynamic_state"); |
| 643 | ext_vertex_input_dynamic_state = false; | 644 | ext_vertex_input_dynamic_state = false; |
| 644 | } | 645 | } |
| 645 | if (is_float16_supported && driver_id == VK_DRIVER_ID_INTEL_PROPRIETARY_WINDOWS) { | 646 | if (is_float16_supported && is_intel_windows) { |
| 646 | // Intel's compiler crashes when using fp16 on Astral Chain, disable it for the time being. | 647 | // Intel's compiler crashes when using fp16 on Astral Chain, disable it for the time being. |
| 647 | LOG_WARNING(Render_Vulkan, "Blacklisting Intel proprietary from float16 math"); | 648 | LOG_WARNING(Render_Vulkan, "Blacklisting Intel proprietary from float16 math"); |
| 648 | is_float16_supported = false; | 649 | is_float16_supported = false; |
| 649 | } | 650 | } |
| 651 | if (is_intel_windows) { | ||
| 652 | LOG_WARNING(Render_Vulkan, "Intel proprietary drivers do not support MSAA image blits"); | ||
| 653 | cant_blit_msaa = true; | ||
| 654 | } | ||
| 650 | 655 | ||
| 651 | supports_d24_depth = | 656 | supports_d24_depth = |
| 652 | IsFormatSupported(VK_FORMAT_D24_UNORM_S8_UINT, | 657 | IsFormatSupported(VK_FORMAT_D24_UNORM_S8_UINT, |
diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index 4c9d86aad..37d140ebd 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h | |||
| @@ -350,6 +350,10 @@ public: | |||
| 350 | return supports_d24_depth; | 350 | return supports_d24_depth; |
| 351 | } | 351 | } |
| 352 | 352 | ||
| 353 | bool CantBlitMSAA() const { | ||
| 354 | return cant_blit_msaa; | ||
| 355 | } | ||
| 356 | |||
| 353 | private: | 357 | private: |
| 354 | /// Checks if the physical device is suitable. | 358 | /// Checks if the physical device is suitable. |
| 355 | void CheckSuitability(bool requires_swapchain) const; | 359 | void CheckSuitability(bool requires_swapchain) const; |
| @@ -443,6 +447,7 @@ private: | |||
| 443 | bool has_renderdoc{}; ///< Has RenderDoc attached | 447 | bool has_renderdoc{}; ///< Has RenderDoc attached |
| 444 | bool has_nsight_graphics{}; ///< Has Nsight Graphics attached | 448 | bool has_nsight_graphics{}; ///< Has Nsight Graphics attached |
| 445 | bool supports_d24_depth{}; ///< Supports D24 depth buffers. | 449 | bool supports_d24_depth{}; ///< Supports D24 depth buffers. |
| 450 | bool cant_blit_msaa{}; ///< Does not support MSAA<->MSAA blitting. | ||
| 446 | 451 | ||
| 447 | // Telemetry parameters | 452 | // Telemetry parameters |
| 448 | std::string vendor_name; ///< Device's driver name. | 453 | std::string vendor_name; ///< Device's driver name. |