Improve GLSL source program support
authorPyry Haulos <phaulos@google.com>
Thu, 4 May 2017 22:29:08 +0000 (15:29 -0700)
committerPyry Haulos <phaulos@google.com>
Fri, 5 May 2017 18:02:28 +0000 (11:02 -0700)
commitfa7a45c9bcb909be38ffd55549beb6db5115a65b
treedc619fe824435af211b2d24310f3e1d332bee193
parent69a7a0079a6cc06d556ecb5314f275d2fa01a60d
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
40 files changed:
AndroidGen.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/api/vktApiGetMemoryCommitment.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/vktPipelineMultisampleBaseResolve.cpp
external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleBaseResolveAndPerSampleFetch.cpp
external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleImageTests.cpp
external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleInterpolationTests.cpp
external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleShaderBuiltInTests.cpp
external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleTests.cpp
external/vulkancts/modules/vulkan/pipeline/vktPipelineRenderToImageTests.cpp
external/vulkancts/modules/vulkan/robustness/vktRobustnessVertexAccessTests.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/vktDrawUtil.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