From cc1acbf2f69fc356640c4861ed166603f7d0d26b Mon Sep 17 00:00:00 2001 From: Oivind Boge Date: Thu, 10 Aug 2017 12:24:02 +0200 Subject: [PATCH] Fixed incorrect calculation of GCD The calculation of greatest common divisor was implemented incorrect when first added. The function was using the input parameter instead of its local copy of the input, which is updated for each iteration of the calculation. Affects: dEQP-VK.api.image_clearing.* Components: Vulkan VK-GL-CTS issue: 625 Change-Id: I6619e4a30d89148d2567a725dbd27161fcf29a47 --- external/vulkancts/modules/vulkan/api/vktApiImageClearingTests.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/external/vulkancts/modules/vulkan/api/vktApiImageClearingTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiImageClearingTests.cpp index 01fb791..d7e7260 100644 --- a/external/vulkancts/modules/vulkan/api/vktApiImageClearingTests.cpp +++ b/external/vulkancts/modules/vulkan/api/vktApiImageClearingTests.cpp @@ -150,7 +150,7 @@ deUint32 greatestCommonDivisor (const deUint32 a, const deUint32 b) deUint32 x=a; deUint32 y=b; - while (x%b != 0) + while (x%y != 0) { temp = y; y = x%y; -- 2.7.4