Fix bug in calcFloatDiff
authorNishit Shah <nishit.shah@samsung.com>
Thu, 20 Jan 2022 17:23:14 +0000 (11:23 -0600)
committerTomasz Gregorek <t.gregorek@partner.samsung.com>
Tue, 25 Jan 2022 15:43:44 +0000 (09:43 -0600)
bsign variable in function calcFloatDiff is wrongly declared. Fixing.

VK-GL-CTS issue: 3472

Affects:
dEQP-VK.api.image_clearing.core.clear_depth_stencil_image*
and all the tests from the vktApiImageClearingTests.cpp file.

Components: Vulkan
Signed-off-by: Nishit Shah <nishit.shah@samsung.com>
Change-Id: I654920c9de460eb04caaca988552f65da3aa2687

external/vulkancts/modules/vulkan/api/vktApiImageClearingTests.cpp

index ac9fee8..43ddd99 100644 (file)
@@ -240,7 +240,7 @@ inline bool isInInitialClearRange (bool isAttachmentformat, deUint32 mipLevel, d
 int calcFloatDiff (float a, float b)
 {
        const int                       asign   = Float32(a).sign();
-       const int                       bsign   = Float32(a).sign();
+       const int                       bsign   = Float32(b).sign();
 
        const deUint32          avalue  = (Float32(a).bits() & ((0x1u << 31u) - 1u));
        const deUint32          bvalue  = (Float32(b).bits() & ((0x1u << 31u) - 1u));