Fixed incorrect calculation of GCD
authorOivind Boge <oivind.boge@arm.com>
Thu, 10 Aug 2017 10:24:02 +0000 (12:24 +0200)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 11 Aug 2017 15:11:58 +0000 (11:11 -0400)
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

index 01fb791..d7e7260 100644 (file)
@@ -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;