Refactor vktShaderExecutor
authorPyry Haulos <phaulos@google.com>
Wed, 8 Mar 2017 21:05:00 +0000 (13:05 -0800)
committerPyry Haulos <phaulos@google.com>
Thu, 9 Mar 2017 23:28:57 +0000 (15:28 -0800)
commitb95a9d798050499a8720ec4ada9a70a2093e24f0
treed350529be607943d6385b2bcc0a915e87eedc223
parent7fc7fd51fb1a7b00aa6fa6639dd036724b883338
Refactor vktShaderExecutor

ShaderExecutor Vulkan port had several issues:

 * Lifetime of ShaderExecutor was designed to extend from TestCase to
TestInstance. This was done in order to allow generating shader sources at
TestCase and later reuse same object to do actual execution when Vulkan
device was available. Result was total lifetime mess and leak of Vulkan
objects beyond TestInstance lifetime.

 * Whole UniformSetup system was badly designed mess that provided
functionality for just a few tests.

Following cleanups and fixes have been made:

 * ShaderExecutor objects are now expected to be live only when Vulkan
device is available, i.e. only within vkt::TestInstance. Shader source
generation part has been moved into a separate utility.

 * UniformSetup mess is removed and replaced with much leaner and
extensible way to supply additional resources. Descriptor set 1 is
reserved for test case specific resources and those can be provided by
supplying custom descriptor layout and descriptor set. Tests using old
UniformSetup system have been adjusted accordingly.

There is still room for additional improvements, such as moving much of
pipeline construction from ShaderExecutor::execute() into constructors,
but these can be done in follow-up CLs.

Affects following test groups:

dEQP-VK.glsl.builtin.*
dEQP-VK.glsl.opaque_type_indexing.
dEQP-VK.texture.explicit_lod.*

VK-GL-CTS issue: 182
Components: Vulkan

Change-Id: Icfc45a36cb4651f39f12608842ef347a55353d84
external/vulkancts/modules/vulkan/shaderexecutor/vktOpaqueTypeIndexingTests.cpp
external/vulkancts/modules/vulkan/shaderexecutor/vktShaderBuiltinPrecisionTests.cpp
external/vulkancts/modules/vulkan/shaderexecutor/vktShaderCommonFunctionTests.cpp
external/vulkancts/modules/vulkan/shaderexecutor/vktShaderExecutor.cpp
external/vulkancts/modules/vulkan/shaderexecutor/vktShaderExecutor.hpp
external/vulkancts/modules/vulkan/shaderexecutor/vktShaderIntegerFunctionTests.cpp
external/vulkancts/modules/vulkan/shaderexecutor/vktShaderPackingFunctionTests.cpp
external/vulkancts/modules/vulkan/texture/vktTextureFilteringExplicitLodTests.cpp