Portability: handle vertex input stride
authorPiotr Byszewski <piotr.byszewski@mobica.com>
Sat, 1 May 2021 10:27:00 +0000 (12:27 +0200)
committerPiotr Byszewski <piotr.byszewski@mobica.com>
Fri, 14 May 2021 10:17:13 +0000 (12:17 +0200)
commit535dfe49fc49f579dceef288861d55b3d30cee15
treeb7ef6c549b67c1b12bfe6232bdf27a558ce5c6ef
parent1c4a387382ea6b27625a358f9c8eb7c817dfdf8b
Portability: handle vertex input stride

KHR_portability_subset provides minVertexInputBindingStrideAlignment
property that indicates the minimum alignment for vertex input strides.
This change fixes all cases where vertex attribute offsets exceeded
vertex buffer stride on MacOS.

Note that minVertexInputBindingStrideAlignment has value of 4 on MacOS
and becouse of that check for this was not added to all 250 places in
cts code that use VkVertexInputBindingDescription. All those places
currently use stride that is multiple of 4. Check was only added to
haderrender, shaderexecutor and in spirv_assembly module.

See:
https://github.com/KhronosGroup/MoltenVK/issues/1285

Components: Vulkan

Affects:
dEQP-VK.*

Change-Id: Ia7d74b9950e8af88c2d7a8462a830c3a6469538f
external/vulkancts/modules/vulkan/amber/vktAmberTestCase.cpp
external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp
external/vulkancts/modules/vulkan/memory/vktMemoryPipelineBarrierTests.cpp
external/vulkancts/modules/vulkan/pipeline/vktPipelineVertexInputTests.cpp
external/vulkancts/modules/vulkan/shaderexecutor/vktShaderExecutor.cpp
external/vulkancts/modules/vulkan/shaderrender/vktShaderRender.cpp
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmGraphicsShaderTestUtil.cpp