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 14:43:06 +0000 (09:43 -0500)
commitda8680744328ce5dc061d8047acf4f1a28587559
tree62fbbc05c064b622fd0d9f63a95eb86ded4856fe
parentac416a7b17a7ea8c202b5f964165f72301cbd1d0
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
(cherry picked from commit 0f25191c03f324762437615d961bad978b9d5e15)
external/vulkancts/modules/vulkan/pipeline/vktPipelinePushDescriptorTests.cpp
framework/delibs/decpp/deDefs.hpp