diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index f723f4c6ef..e6b8dc26b2 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp @@ -2362,8 +2362,8 @@ Sampler::Sampler(TextureCacheRuntime& runtime, const Tegra::Texture::TSCEntry& t // 2. If only customBorderColors: Use VK_BORDER_COLOR_FLOAT_CUSTOM_EXT + specific format (spec compliant) // 3. If only customBorderColorWithoutFormat: Shouldn't happen per spec, but handle as case 2 // 4. If neither: Use standard border colors (fallback) - const bool has_custom_colors = device.features.custom_border_color.customBorderColors; - const bool has_without_format = device.features.custom_border_color.customBorderColorWithoutFormat; + const bool has_custom_colors = device.HasCustomBorderColorFeature(); + const bool has_without_format = device.HasCustomBorderColorWithoutFormatFeature(); const bool use_custom_border = arbitrary_borders && has_custom_colors; const VkSamplerCustomBorderColorCreateInfoEXT border_ci{ diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index 03b063befc..fa5cf3eb3d 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h @@ -552,6 +552,16 @@ public: return extensions.custom_border_color; } + /// Returns true if customBorderColors feature is enabled (allows VK_BORDER_COLOR_*_CUSTOM_EXT). + bool HasCustomBorderColorFeature() const { + return features.custom_border_color.customBorderColors; + } + + /// Returns true if customBorderColorWithoutFormat feature is enabled (allows VK_FORMAT_UNDEFINED). + bool HasCustomBorderColorWithoutFormatFeature() const { + return features.custom_border_color.customBorderColorWithoutFormat; + } + /// Base Vulkan Dynamic State support checks. /// These provide granular control over each base dynamic state, allowing individual states /// to be disabled if broken driver implementations are detected at device initialization.