Fix buffer offsets in push descriptor tests
authorRicardo Garcia <rgarcia@igalia.com>
Thu, 26 Nov 2020 16:35:07 +0000 (17:35 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Mon, 7 Dec 2020 13:42:06 +0000 (08:42 -0500)
commit0f25191c03f324762437615d961bad978b9d5e15
treef7443a5625f8ac98ad3577e4be3d109974594c52
parent75334af0029ec95fea2f7eaee2d79a07b5473a82
Fix buffer offsets in push descriptor tests

This commit fixes push descriptor tests that were updating storage
buffer descriptors using offset values that may not have been multiples
of minStorageBufferOffsetAlignment.

In addition, it fixes image layout problems with some of these tests
that were causing validation errors.

Finally, it introduces the de::gcd and de::lcm functions to calculate
the greatest common divisor and least common multiple of two numbers.
These are useful when calculating alignments that need to meet several
base alignment requirements.

Affected tests:
dEQP-VK.pipeline.push_descriptor.*

Components: Framework, Vulkan
VK-GL-CTS issue: 2661

Change-Id: I36bcaf6114994ec5b42bcd5acc11340f079823dd
external/vulkancts/modules/vulkan/pipeline/vktPipelinePushDescriptorTests.cpp
framework/delibs/decpp/deDefs.hpp