summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_vulkan/vk_texture_cache.cpp2
-rw-r--r--src/video_core/vulkan_common/vulkan_device.cpp25
-rw-r--r--src/video_core/vulkan_common/vulkan_device.h6
3 files changed, 22 insertions, 11 deletions
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
index ff979a7ac..3b87640b5 100644
--- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
@@ -127,7 +127,7 @@ constexpr VkBorderColor ConvertBorderColor(const std::array<float, 4>& color) {
127 const auto format_info = MaxwellToVK::SurfaceFormat(device, FormatType::Optimal, false, format); 127 const auto format_info = MaxwellToVK::SurfaceFormat(device, FormatType::Optimal, false, format);
128 VkImageCreateFlags flags = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT; 128 VkImageCreateFlags flags = VK_IMAGE_CREATE_MUTABLE_FORMAT_BIT;
129 if (info.type == ImageType::e2D && info.resources.layers >= 6 && 129 if (info.type == ImageType::e2D && info.resources.layers >= 6 &&
130 info.size.width == info.size.height) { 130 info.size.width == info.size.height && !device.HasBrokenCubeImageCompability()) {
131 flags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT; 131 flags |= VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT;
132 } 132 }
133 if (info.type == ImageType::e3D) { 133 if (info.type == ImageType::e3D) {
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp
index c2ec9f76a..6388ed2eb 100644
--- a/src/video_core/vulkan_common/vulkan_device.cpp
+++ b/src/video_core/vulkan_common/vulkan_device.cpp
@@ -588,22 +588,27 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
588 ext_extended_dynamic_state = false; 588 ext_extended_dynamic_state = false;
589 } 589 }
590 } 590 }
591
592 sets_per_pool = 64; 591 sets_per_pool = 64;
593 if (driver_id == VK_DRIVER_ID_AMD_PROPRIETARY || driver_id == VK_DRIVER_ID_AMD_OPEN_SOURCE) { 592
593 const bool is_amd =
594 driver_id == VK_DRIVER_ID_AMD_PROPRIETARY || driver_id == VK_DRIVER_ID_AMD_OPEN_SOURCE;
595 if (is_amd) {
594 // AMD drivers need a higher amount of Sets per Pool in certain circunstances like in XC2. 596 // AMD drivers need a higher amount of Sets per Pool in certain circunstances like in XC2.
595 sets_per_pool = 96; 597 sets_per_pool = 96;
596 } 598 // Disable VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT on AMD GCN4 and lower as it is broken.
597
598 const bool is_amd = driver_id == VK_DRIVER_ID_AMD_PROPRIETARY ||
599 driver_id == VK_DRIVER_ID_MESA_RADV ||
600 driver_id == VK_DRIVER_ID_AMD_OPEN_SOURCE;
601 if (ext_sampler_filter_minmax && is_amd) {
602 // Disable ext_sampler_filter_minmax on AMD GCN4 and lower as it is broken.
603 if (!is_float16_supported) { 599 if (!is_float16_supported) {
604 LOG_WARNING( 600 LOG_WARNING(
605 Render_Vulkan, 601 Render_Vulkan,
606 "Blacklisting AMD GCN4 and lower for VK_EXT_SAMPLER_FILTER_MINMAX_EXTENSION_NAME"); 602 "AMD GCN4 and earlier do not properly support VK_IMAGE_CREATE_CUBE_COMPATIBLE_BIT");
603 has_broken_cube_compatibility = true;
604 }
605 }
606 const bool is_amd_or_radv = is_amd || driver_id == VK_DRIVER_ID_MESA_RADV;
607 if (ext_sampler_filter_minmax && is_amd_or_radv) {
608 // Disable ext_sampler_filter_minmax on AMD GCN4 and lower as it is broken.
609 if (!is_float16_supported) {
610 LOG_WARNING(Render_Vulkan,
611 "Blacklisting AMD GCN4 and earlier for VK_EXT_sampler_filter_minmax");
607 ext_sampler_filter_minmax = false; 612 ext_sampler_filter_minmax = false;
608 } 613 }
609 } 614 }
diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h
index bc180a32a..d9e74f1aa 100644
--- a/src/video_core/vulkan_common/vulkan_device.h
+++ b/src/video_core/vulkan_common/vulkan_device.h
@@ -309,6 +309,11 @@ public:
309 return has_renderdoc || has_nsight_graphics; 309 return has_renderdoc || has_nsight_graphics;
310 } 310 }
311 311
312 /// Returns true when the device does not properly support cube compatibility.
313 bool HasBrokenCubeImageCompability() const {
314 return has_broken_cube_compatibility;
315 }
316
312 /// Returns the vendor name reported from Vulkan. 317 /// Returns the vendor name reported from Vulkan.
313 std::string_view GetVendorName() const { 318 std::string_view GetVendorName() const {
314 return vendor_name; 319 return vendor_name;
@@ -417,6 +422,7 @@ private:
417 bool ext_conservative_rasterization{}; ///< Support for VK_EXT_conservative_rasterization. 422 bool ext_conservative_rasterization{}; ///< Support for VK_EXT_conservative_rasterization.
418 bool ext_provoking_vertex{}; ///< Support for VK_EXT_provoking_vertex. 423 bool ext_provoking_vertex{}; ///< Support for VK_EXT_provoking_vertex.
419 bool nv_device_diagnostics_config{}; ///< Support for VK_NV_device_diagnostics_config. 424 bool nv_device_diagnostics_config{}; ///< Support for VK_NV_device_diagnostics_config.
425 bool has_broken_cube_compatibility{}; ///< Has broken cube compatiblity bit
420 bool has_renderdoc{}; ///< Has RenderDoc attached 426 bool has_renderdoc{}; ///< Has RenderDoc attached
421 bool has_nsight_graphics{}; ///< Has Nsight Graphics attached 427 bool has_nsight_graphics{}; ///< Has Nsight Graphics attached
422 428