From: Lingfeng Yang Date: Fri, 8 Feb 2019 15:36:00 +0000 (-0800) Subject: Fix stack underflow in incremental present test X-Git-Tag: upstream/1.3.5~2247 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a268922558ed0c353a7d8b6845f8d6279b72af29;p=platform%2Fupstream%2FVK-GL-CTS.git Fix stack underflow in incremental present test This uses the current object's m_queueFamilyIndex instead of a queue family index that is on the stack, avoiding using a stale stack address when the test runs. VK-GL-CTS issue: 1585 Affects: dEQP-VK.wsi.*.incremental_present.* Components: Vulkan Change-Id: I80228651b799d3444676cdcbf5cc845bcb195fe9 --- diff --git a/external/vulkancts/modules/vulkan/wsi/vktWsiIncrementalPresentTests.cpp b/external/vulkancts/modules/vulkan/wsi/vktWsiIncrementalPresentTests.cpp index 9b851b2..13f7aa6 100644 --- a/external/vulkancts/modules/vulkan/wsi/vktWsiIncrementalPresentTests.cpp +++ b/external/vulkancts/modules/vulkan/wsi/vktWsiIncrementalPresentTests.cpp @@ -709,7 +709,7 @@ private: }; std::vector generateSwapchainConfigs (vk::VkSurfaceKHR surface, - deUint32 queueFamilyIndex, + const deUint32 *queueFamilyIndex, Scaling scaling, const vk::VkSurfaceCapabilitiesKHR& properties, const vector& formats, @@ -784,7 +784,7 @@ std::vector generateSwapchainConfigs (vk::VkSurfac imageUsage, vk::VK_SHARING_MODE_EXCLUSIVE, 1u, - &queueFamilyIndex, + queueFamilyIndex, preTransform, compositeAlpha, presentMode, @@ -809,7 +809,7 @@ std::vector generateSwapchainConfigs (vk::VkSurfac imageUsage, vk::VK_SHARING_MODE_EXCLUSIVE, 1u, - &queueFamilyIndex, + queueFamilyIndex, preTransform, compositeAlpha, presentMode, @@ -856,7 +856,7 @@ IncrementalPresentTestInstance::IncrementalPresentTestInstance (Context& context , m_freeAcquireSemaphore ((vk::VkSemaphore)0) , m_freeRenderSemaphore ((vk::VkSemaphore)0) - , m_swapchainConfigs (generateSwapchainConfigs(*m_surface, m_queueFamilyIndex, testConfig.scaling, m_surfaceProperties, m_surfaceFormats, m_presentModes, testConfig.presentMode)) + , m_swapchainConfigs (generateSwapchainConfigs(*m_surface, &m_queueFamilyIndex, testConfig.scaling, m_surfaceProperties, m_surfaceFormats, m_presentModes, testConfig.presentMode)) , m_swapchainConfigNdx (0u) , m_frameCount (60u * 5u) @@ -1079,7 +1079,7 @@ tcu::TestStatus IncrementalPresentTestInstance::iterate (void) { if (error.getError() == vk::VK_ERROR_OUT_OF_DATE_KHR) { - m_swapchainConfigs = generateSwapchainConfigs(*m_surface, m_queueFamilyIndex, m_testConfig.scaling, m_surfaceProperties, m_surfaceFormats, m_presentModes, m_testConfig.presentMode); + m_swapchainConfigs = generateSwapchainConfigs(*m_surface, &m_queueFamilyIndex, m_testConfig.scaling, m_surfaceProperties, m_surfaceFormats, m_presentModes, m_testConfig.presentMode); if (m_outOfDateCount < m_maxOutOfDateCount) {