Improve GLSL source program support
authorPyry Haulos <phaulos@google.com>
Thu, 4 May 2017 22:29:08 +0000 (15:29 -0700)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Sun, 18 Jun 2017 14:53:35 +0000 (10:53 -0400)
commitb5c2f56daa415384202d097073cd8cb5dfcf2408
tree818a018b67b9fce1a93bcc710ad0cf9a61a301c9
parent38cdcf98c372cb8af8a865dc64c2d3e287d3a8ae
Improve GLSL source program support

Old GLSL source program support in Vulkan framework was built on top
of glu::ProgramSources. This had two problems:

1) There was no obvious way to extend/annotate sources with SPIR-V
-specific information such as target SPIR-V version.

2) Most of glu::ProgramSources, such as attribute bindings or TF
configuration, was completely ignored.

This change introduces new vk::GlslSource type that replaces
glu::ProgramSources in vk::SourceCollections. vk::GlslSource contains
shader source strings as well as build options (vk::GlslBuildOptions).

vk::GlslBuildOptions doesn't currently contain anything useful but can
be later extended to support selecting target SPIR-V version for
example.

The change is mostly transparent to existing code, except:

 * vkSpirvProgram.hpp was somewhat unnecessarily including
tcuTestLog.hpp and changing that to a forward declaration required
fixing includes in several test code files.

  * vktShaderExecutor.cpp has been extended to allow specifying build
options.

Components: Vulkan

Change-Id: I69a6cd55ea91215585515b9d41860d818cbc97ae
(cherry picked from commit fa7a45c9bcb909be38ffd55549beb6db5115a65b)
35 files changed:
Android.mk
external/vulkancts/framework/vulkan/CMakeLists.txt
external/vulkancts/framework/vulkan/vkBinaryRegistry.cpp
external/vulkancts/framework/vulkan/vkDefs.hpp
external/vulkancts/framework/vulkan/vkGlslProgram.cpp [new file with mode: 0644]
external/vulkancts/framework/vulkan/vkGlslProgram.hpp [new file with mode: 0644]
external/vulkancts/framework/vulkan/vkGlslToSpirV.cpp
external/vulkancts/framework/vulkan/vkGlslToSpirV.hpp
external/vulkancts/framework/vulkan/vkPrograms.cpp
external/vulkancts/framework/vulkan/vkPrograms.hpp
external/vulkancts/framework/vulkan/vkSpirVProgram.hpp
external/vulkancts/modules/vulkan/api/vktApiCopiesAndBlittingTests.cpp
external/vulkancts/modules/vulkan/clipping/vktClippingTests.cpp
external/vulkancts/modules/vulkan/draw/vktDrawNegativeViewportHeightTests.cpp
external/vulkancts/modules/vulkan/fragment_ops/vktFragmentOperationsEarlyFragmentTests.cpp
external/vulkancts/modules/vulkan/geometry/vktGeometryInstancedRenderingTests.cpp
external/vulkancts/modules/vulkan/geometry/vktGeometryLayeredRenderingTests.cpp
external/vulkancts/modules/vulkan/geometry/vktGeometryTestsUtil.hpp
external/vulkancts/modules/vulkan/image/vktImageMultisampleLoadStoreTests.cpp
external/vulkancts/modules/vulkan/pipeline/vktPipelineImageSamplingInstance.cpp
external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleImageTests.cpp
external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleInterpolationTests.cpp
external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleTests.cpp
external/vulkancts/modules/vulkan/pipeline/vktPipelineRenderToImageTests.cpp
external/vulkancts/modules/vulkan/shaderexecutor/vktShaderExecutor.cpp
external/vulkancts/modules/vulkan/shaderexecutor/vktShaderExecutor.hpp
external/vulkancts/modules/vulkan/shaderrender/vktShaderRenderBuiltinVarTests.cpp
external/vulkancts/modules/vulkan/sparse_resources/vktSparseResourcesBufferTests.cpp
external/vulkancts/modules/vulkan/ssbo/vktSSBOLayoutTests.cpp
external/vulkancts/modules/vulkan/vktBuildPrograms.cpp
external/vulkancts/modules/vulkan/vktShaderLibrary.cpp
external/vulkancts/modules/vulkan/vktTestPackage.cpp
external/vulkancts/modules/vulkan/wsi/vktWsiDisplayTimingTests.cpp
external/vulkancts/modules/vulkan/wsi/vktWsiIncrementalPresentTests.cpp
external/vulkancts/modules/vulkan/wsi/vktWsiSharedPresentableImageTests.cpp