Shader validation: respect Vulkan version, relaxed layout requirement
authorDavid Neto <dneto@google.com>
Fri, 21 Sep 2018 14:36:56 +0000 (10:36 -0400)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Tue, 25 Sep 2018 10:28:07 +0000 (06:28 -0400)
commit6d10706988d07f2fbe34914ec63dccd24447a10e
treefbe03614cb832fd872a0a49a9f96d6be079ecde1
parenta59c084f55be1fdece754730142f87efb30ca1fb
Shader validation: respect Vulkan version, relaxed layout requirement

Pass more info to SPIR-V validation:
- Target Vulkan version
- Whether the test case requested relaxed layout

When a shader is built with VK_KHR_relaxed_block_layout, the SPIR-V
module does not record the setting.  But SPIR-V module validation
for Vulkan 1.0 must know if block layout should be relaxed.
Vulkan 1.1 includes VK_KHR_relaxed_block_layout in core.

Adds the necessary state to framework program build options objects to
pass those options to the SPIR-V validator.

Update SPIRV-Tools, SPIRV-Headers, Glslang to just befor NV Turing extensions.
Make sure we have the entry point:
  spvValidatorOptionsSetRelaxedBlockLayout

Change-Id: I74511629a4e56a4fea370ffe3a21677465a4510f
Component: Framework
VK-GL-CTS: 1266, 1270
30 files changed:
external/fetch_sources.py
external/vulkancts/framework/vulkan/vkPrograms.cpp
external/vulkancts/framework/vulkan/vkPrograms.hpp
external/vulkancts/framework/vulkan/vkShaderProgram.hpp
external/vulkancts/framework/vulkan/vkSpirVAsm.cpp
external/vulkancts/framework/vulkan/vkSpirVAsm.hpp
external/vulkancts/framework/vulkan/vkSpirVProgram.hpp
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsm16bitStorageTests.cpp
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmComputeShaderCase.cpp
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmGraphicsShaderTestUtil.cpp
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmLoopDepInfTests.cpp
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmLoopDepLenTests.cpp
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmSpirvVersionTests.cpp
external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmVariableInitTests.cpp
external/vulkancts/modules/vulkan/ssbo/vktSSBOLayoutCase.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsArithmeticTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotBroadcastTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotOtherTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBallotTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBasicTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinMaskVarTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsBuiltinVarTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsClusteredTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsPartitionedTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsQuadTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShapeTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsShuffleTests.cpp
external/vulkancts/modules/vulkan/subgroups/vktSubgroupsVoteTests.cpp
external/vulkancts/modules/vulkan/vktBuildPrograms.cpp
external/vulkancts/modules/vulkan/vktTestPackage.cpp