From d1aed76a20debaca92c9979c0e9e917353d8c369 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Wed, 7 Sep 2022 22:02:21 +0800 Subject: Fix crash when executing `SubViewport.set_size_2d_override_stretch` --- drivers/vulkan/rendering_device_vulkan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/vulkan') diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp index 6a88f2c442..73ae108961 100644 --- a/drivers/vulkan/rendering_device_vulkan.cpp +++ b/drivers/vulkan/rendering_device_vulkan.cpp @@ -9011,7 +9011,7 @@ VkSampleCountFlagBits RenderingDeviceVulkan::_ensure_supported_sample_count(Text // Find the closest lower supported sample count. VkSampleCountFlagBits sample_count = rasterization_sample_count[p_requested_sample_count]; while (sample_count > VK_SAMPLE_COUNT_1_BIT) { - if (sample_count_flags & rasterization_sample_count[sample_count]) { + if (sample_count_flags & sample_count) { return sample_count; } sample_count = (VkSampleCountFlagBits)(sample_count >> 1); -- cgit v1.2.3